1 Index: linux-5.4.77/net/dsa/tag_trailer.c
2 ===================================================================
3 --- linux-5.4.77.orig/net/dsa/tag_trailer.c
4 +++ linux-5.4.77/net/dsa/tag_trailer.c
5 @@ -44,7 +44,12 @@ static struct sk_buff *trailer_xmit(stru
7 trailer = skb_put(nskb, 4);
10 +#ifdef CONFIG_NET_DSA_RTL83XX
11 + trailer[1] = dp->index;
13 trailer[1] = 1 << dp->index;
14 +#endif /* CONFIG_NET_DSA_RTL83XX */
18 @@ -61,12 +66,20 @@ static struct sk_buff *trailer_rcv(struc
21 trailer = skb_tail_pointer(skb) - 4;
23 +#ifdef CONFIG_NET_DSA_RTL83XX
24 + if (trailer[0] != 0x80 || (trailer[1] & 0xe0) != 0x00 ||
25 + (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
28 + source_port = trailer[1] & 0x1f;
30 if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
31 (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
34 source_port = trailer[1] & 7;
37 skb->dev = dsa_master_find_slave(dev, 0, source_port);