aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-22 13:31:17 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-23 12:58:49 +0100
commit735a27df814d1287ecdb0dfe46ca45c9a8246a1b (patch)
treec950e1566c5a98e86c0b30b2eb3ad094e96f2aa0
parent91a65f6c88aaf3155409f10ff6e8d55386ab13a0 (diff)
downloadupstream-735a27df814d1287ecdb0dfe46ca45c9a8246a1b.tar.gz
upstream-735a27df814d1287ecdb0dfe46ca45c9a8246a1b.tar.bz2
upstream-735a27df814d1287ecdb0dfe46ca45c9a8246a1b.zip
lantiq: fix broadcast packets leaking on the wrong vlan on xrx200
The ethernet driver uses a port map override via special tag to control the ports on which multicast packets are sent. This was added to work around an issue in the switch that was occasionally leaking packets onto the wrong vlan. Unfortunately the change had some leftover lines that were overwrting the port map with a list of all ports, thus always leaking packets onto the wront vlan. Fix this by only enabling the override with the VLAN port map and only if a matching VLAN port map was actually found Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch11
-rw-r--r--target/linux/lantiq/patches-4.9/0025-NET-MIPS-lantiq-adds-xrx200-net.patch11
2 files changed, 12 insertions, 10 deletions
diff --git a/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
index acaadba984..b84e205823 100644
--- a/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
+++ b/target/linux/lantiq/patches-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
@@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+};
--- /dev/null
+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -0,0 +1,1850 @@
+@@ -0,0 +1,1851 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -1262,6 +1262,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ struct xrx200_chan *ch;
+ struct ltq_dma_desc *desc;
+ u32 byte_offset;
++ u16 port_map = 0;
+ int ret = NETDEV_TX_OK;
+ int len;
+#ifdef SW_ROUTING
@@ -1279,8 +1280,6 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+
+#ifdef SW_ROUTING
+ if (is_multicast_ether_addr(eth_hdr(skb)->h_dest)) {
-+ u16 port_map = priv->port_map;
-+ special_tag |= PORT_MAP_SEL | PORT_MAP_EN;
+ if (skb->protocol == htons(ETH_P_8021Q)) {
+ u16 vid;
+ int i;
@@ -1294,9 +1293,11 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ }
+ }
+ }
-+ special_tag |= port_map << PORT_MAP_SHIFT;
+ }
-+ special_tag |= priv->port_map << PORT_MAP_SHIFT;
++ if (port_map) {
++ special_tag |= (port_map << PORT_MAP_SHIFT) |
++ PORT_MAP_SEL | PORT_MAP_EN;
++ }
+ if(priv->wan)
+ special_tag |= (1 << DPID_SHIFT);
+ if(skb_headroom(skb) < 4) {
diff --git a/target/linux/lantiq/patches-4.9/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.9/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
index 3c2ad4b65c..a3693ee2df 100644
--- a/target/linux/lantiq/patches-4.9/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
+++ b/target/linux/lantiq/patches-4.9/0025-NET-MIPS-lantiq-adds-xrx200-net.patch
@@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+};
--- /dev/null
+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -0,0 +1,1849 @@
+@@ -0,0 +1,1850 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -1262,6 +1262,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ struct xrx200_chan *ch;
+ struct ltq_dma_desc *desc;
+ u32 byte_offset;
++ u16 port_map = 0;
+ int ret = NETDEV_TX_OK;
+ int len;
+#ifdef SW_ROUTING
@@ -1279,8 +1280,6 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+
+#ifdef SW_ROUTING
+ if (is_multicast_ether_addr(eth_hdr(skb)->h_dest)) {
-+ u16 port_map = priv->port_map;
-+ special_tag |= PORT_MAP_SEL | PORT_MAP_EN;
+ if (skb->protocol == htons(ETH_P_8021Q)) {
+ u16 vid;
+ int i;
@@ -1294,9 +1293,11 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net
+ }
+ }
+ }
-+ special_tag |= port_map << PORT_MAP_SHIFT;
+ }
-+ special_tag |= priv->port_map << PORT_MAP_SHIFT;
++ if (port_map) {
++ special_tag |= (port_map << PORT_MAP_SHIFT) |
++ PORT_MAP_SEL | PORT_MAP_EN;
++ }
+ if(priv->wan)
+ special_tag |= (1 << DPID_SHIFT);
+ if(skb_headroom(skb) < 4) {