[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211211195758.28962-10-ansuelsmth@gmail.com>
Date: Sat, 11 Dec 2021 20:57:52 +0100
From: Ansuel Smith <ansuelsmth@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Cc: Ansuel Smith <ansuelsmth@...il.com>
Subject: [net-next RFC PATCH v4 09/15] net: dsa: tag_qca: add define for handling MIB packet
Add struct to correctly parse a mib Ethernet packet.
Signed-off-by: Ansuel Smith <ansuelsmth@...il.com>
---
include/linux/dsa/tag_qca.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/linux/dsa/tag_qca.h b/include/linux/dsa/tag_qca.h
index 578a4aeafd92..f3369b939107 100644
--- a/include/linux/dsa/tag_qca.h
+++ b/include/linux/dsa/tag_qca.h
@@ -59,4 +59,21 @@ struct mdio_ethhdr {
u16 hdr; /* qca hdr */
} __packed;
+enum mdio_cmd {
+ MDIO_WRITE = 0x0,
+ MDIO_READ
+};
+
+struct mib_ethhdr {
+ u32 data[3]; /* first 3 mib counter */
+ __be16 hdr; /* qca hdr */
+} __packed;
+
+struct tag_qca_priv {
+ void (*rw_reg_ack_handler)(struct dsa_port *dp,
+ struct sk_buff *skb);
+ void (*mib_autocast_handler)(struct dsa_port *dp,
+ struct sk_buff *skb);
+};
+
#endif /* __TAG_QCA_H */
--
2.32.0
Powered by blists - more mailing lists