net: dsa: tag_qca: add support for handling mgmt and MIB Ethernet packet

Add connect/disconnect helper to assign private struct to the DSA switch.
Add support for Ethernet mgmt and MIB if the DSA driver provide an handler
to correctly parse and elaborate the data.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ansuel Smith
2022-02-02 01:03:27 +01:00
committed by David S. Miller
parent 18be654a43
commit 31eb6b4386
2 changed files with 43 additions and 3 deletions

View File

@@ -72,4 +72,11 @@ struct mib_ethhdr {
__be16 hdr; /* qca hdr */
} __packed;
struct qca_tagger_data {
void (*rw_reg_ack_handler)(struct dsa_switch *ds,
struct sk_buff *skb);
void (*mib_autocast_handler)(struct dsa_switch *ds,
struct sk_buff *skb);
};
#endif /* __TAG_QCA_H */