aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2020-11-26 12:02:21 +0100
committerJohn Crispin <john@phrozen.org>2020-11-26 13:29:27 +0100
commit2b88563ee5aafd9571d965b7f2093a0f58d98a31 (patch)
treed2997a6745fe0cffab8db73d4a735c3366a301b0 /target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
parent4e39949dd1f7eb706d857e1c44a992ae752132a7 (diff)
downloadupstream-2b88563ee5aafd9571d965b7f2093a0f58d98a31.tar.gz
upstream-2b88563ee5aafd9571d965b7f2093a0f58d98a31.tar.bz2
upstream-2b88563ee5aafd9571d965b7f2093a0f58d98a31.zip
realtek: update the tree to the latest refactored version
* rename the target to realtek * add refactored DSA driver * add latest gpio driver * lots of arch cleanups * new irq driver * additional boards Signed-off-by: Bert Vermeulen <bert@biot.com> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de> Signed-off-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch')
-rw-r--r--target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch b/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
new file mode 100644
index 0000000000..9d4140c8e1
--- /dev/null
+++ b/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
@@ -0,0 +1,39 @@
+Index: linux-5.4.77/net/dsa/tag_trailer.c
+===================================================================
+--- linux-5.4.77.orig/net/dsa/tag_trailer.c
++++ linux-5.4.77/net/dsa/tag_trailer.c
+@@ -44,7 +44,12 @@ static struct sk_buff *trailer_xmit(stru
+
+ trailer = skb_put(nskb, 4);
+ trailer[0] = 0x80;
++
++#ifdef CONFIG_NET_DSA_RTL83XX
++ trailer[1] = dp->index;
++#else
+ trailer[1] = 1 << dp->index;
++#endif /* CONFIG_NET_DSA_RTL83XX */
+ trailer[2] = 0x10;
+ trailer[3] = 0x00;
+
+@@ -61,12 +66,20 @@ static struct sk_buff *trailer_rcv(struc
+ return NULL;
+
+ trailer = skb_tail_pointer(skb) - 4;
++
++#ifdef CONFIG_NET_DSA_RTL83XX
++ if (trailer[0] != 0x80 || (trailer[1] & 0xe0) != 0x00 ||
++ (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
++ return NULL;
++
++ source_port = trailer[1] & 0x1f;
++#else
+ if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
+ (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
+ return NULL;
+
+ source_port = trailer[1] & 7;
+-
++#endif
+ skb->dev = dsa_master_find_slave(dev, 0, source_port);
+ if (!skb->dev)
+ return NULL;