lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[net-next RFC PATCH v3 09/15] net: dsa: tag_qca: add define for handling MIB packet
Date
Add struct to correctly parse a mib Ethernet packet.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.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
\
 
 \ /
  Last update: 2021-12-11 03:05    [W:2.204 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site