summaryrefslogtreecommitdiff
path: root/net/dsa/tag_lan9303.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/tag_lan9303.c')
-rw-r--r--net/dsa/tag_lan9303.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c
index e8ad3727433e..d06951273127 100644
--- a/net/dsa/tag_lan9303.c
+++ b/net/dsa/tag_lan9303.c
@@ -86,13 +86,7 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev)
return NULL;
}
- /* '->data' points into the middle of our special VLAN tag information:
- *
- * ~ MAC src | 0x81 | 0x00 | 0xyy | 0xzz | ether type
- * ^
- * ->data
- */
- lan9303_tag = (__be16 *)(skb->data - 2);
+ lan9303_tag = dsa_etype_header_pos_rx(skb);
if (lan9303_tag[0] != htons(ETH_P_8021Q)) {
dev_warn_ratelimited(&dev->dev, "Dropping packet due to invalid VLAN marker\n");