summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-07-15 17:16:58 +0200
committerJakub Kicinski <kuba@kernel.org>2022-07-19 05:14:23 +0200
commit4db2a5ef4ccbe6d138828284cfab241b434b5d95 (patch)
treefd16065cdf104ed7e2991d2ead1622fcbd8c4f1a /net/dsa
parentixgbe: Add locking to prevent panic when setting sriov_numvfs to zero (diff)
downloadlinux-4db2a5ef4ccbe6d138828284cfab241b434b5d95.tar.xz
linux-4db2a5ef4ccbe6d138828284cfab241b434b5d95.zip
net: dsa: fix dsa_port_vlan_filtering when global
The blamed refactoring commit changed a "port" iterator with "other_dp", but still looked at the slave_dev of the dp outside the loop, instead of other_dp->slave from the loop. As a result, dsa_port_vlan_filtering() would not call dsa_slave_manage_vlan_filtering() except for the port in cause, and not for all switch ports as expected. Fixes: d0004a020bb5 ("net: dsa: remove the "dsa_to_port in a loop" antipattern from the core") Reported-by: Lucian Banu <Lucian.Banu@westermo.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c
index 3738f2d40a0b..a4052174ac50 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -799,7 +799,7 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
ds->vlan_filtering = vlan_filtering;
dsa_switch_for_each_user_port(other_dp, ds) {
- struct net_device *slave = dp->slave;
+ struct net_device *slave = other_dp->slave;
/* We might be called in the unbind path, so not
* all slave devices might still be registered.