[openwrt/openwrt] realtek: 6.6: copy patch net-dsa-add-rtl838x-support-for-tag-trailer
LEDE Commits
lede-commits at lists.infradead.org
Sat Sep 14 12:30:31 PDT 2024
svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c5c187432792656dce2885e8b628811d9927fdd0
commit c5c187432792656dce2885e8b628811d9927fdd0
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Sep 9 08:11:13 2024 -0400
realtek: 6.6: copy patch net-dsa-add-rtl838x-support-for-tag-trailer
Copy the patch file to 6.6. Reorder it in the 7xx range.
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
---
...t-dsa-add-rtl838x-support-for-tag-trailer.patch | 61 ++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/target/linux/realtek/patches-6.6/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch b/target/linux/realtek/patches-6.6/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch
new file mode 100644
index 0000000000..0cb784fcbf
--- /dev/null
+++ b/target/linux/realtek/patches-6.6/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch
@@ -0,0 +1,61 @@
+From 2b88563ee5aafd9571d965b7f2093a0f58d98a31 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Thu, 26 Nov 2020 12:02:21 +0100
+Subject: net: dsa: Add rtl838x support for tag trailer
+
+* rename the target to realtek
+* add refactored DSA driver
+* add latest gpio driver
+* lots of arch cleanups
+* new irq driver
+* additional boards
+
+Submitted-by: Bert Vermeulen <bert at biot.com>
+Submitted-by: Birger Koblitz <mail at birger-koblitz.de>
+Submitted-by: Sander Vanheule <sander at svanheule.net>
+Submitted-by: Bjørn Mork <bjorn at mork.no>
+Submitted-by: John Crispin <john at phrozen.org>
+---
+ net/dsa/tag_trailer.c | 16 +++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+--- a/net/dsa/tag_trailer.c
++++ b/net/dsa/tag_trailer.c
+@@ -17,7 +17,12 @@ static struct sk_buff *trailer_xmit(stru
+
+ trailer = skb_put(skb, 4);
+ trailer[0] = 0x80;
++
++#ifdef CONFIG_NET_DSA_RTL83XX
++ trailer[1] = dp->index;
++#else
+ trailer[1] = 1 << dp->index;
++#endif /* CONFIG_NET_DSA_RTL838X */
+ trailer[2] = 0x10;
+ trailer[3] = 0x00;
+
+@@ -33,12 +38,23 @@ 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] & 0x80) != 0x00 ||
++ (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
++ return NULL;
++
++ if (trailer[1] & 0x40)
++ skb->offload_fwd_mark = 1;
++
++ source_port = trailer[1] & 0x3f;
++#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;
More information about the lede-commits
mailing list