Loading include/linux/dsa/tag_qca.h +10 −0 Original line number Diff line number Diff line Loading @@ -62,4 +62,14 @@ struct qca_mgmt_ethhdr { __be16 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; #endif /* __TAG_QCA_H */ net/dsa/tag_qca.c +4 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,10 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev) if (pk_type == QCA_HDR_RECV_TYPE_RW_REG_ACK) return NULL; /* Ethernet MIB counter packet */ if (pk_type == QCA_HDR_RECV_TYPE_MIB) return NULL; /* Remove QCA tag and recalculate checksum */ skb_pull_rcsum(skb, QCA_HDR_LEN); dsa_strip_etype_header(skb, QCA_HDR_LEN); Loading Loading
include/linux/dsa/tag_qca.h +10 −0 Original line number Diff line number Diff line Loading @@ -62,4 +62,14 @@ struct qca_mgmt_ethhdr { __be16 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; #endif /* __TAG_QCA_H */
net/dsa/tag_qca.c +4 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,10 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev) if (pk_type == QCA_HDR_RECV_TYPE_RW_REG_ACK) return NULL; /* Ethernet MIB counter packet */ if (pk_type == QCA_HDR_RECV_TYPE_MIB) return NULL; /* Remove QCA tag and recalculate checksum */ skb_pull_rcsum(skb, QCA_HDR_LEN); dsa_strip_etype_header(skb, QCA_HDR_LEN); Loading