Skip to content

Commit cd88646

Browse files
lunndavem330
authored andcommitted
net: dsa: mv88e6xxx: Fixed port netdev check for VLANs
Having the same VLAN on multiple bridges is currently unsupported as an offload. mv88e6xxx_port_check_hw_vlan() is used to ensure that a VLAN is not on multiple bridges when adding a VLAN range to a port. It loops the ports and checks to see if there are ports in a different bridge with the same VLAN. While walking all switch ports, the code was checking if the new port has a netdev slave attached to it. If not, skip checking the port being walked. This seems like a typ0. If the new port does not have a slave, how has a VLAN been added to it in the first place, requiring this check be performed at all? More likely, we should be checking if the port being walked has a slave. Without the port having a slave, it cannot have a VLAN on it, so there is no need to check further for that particular port. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 13edbdb commit cd88646

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+1
-1
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
11371137
if (dsa_is_dsa_port(ds, i) || dsa_is_cpu_port(ds, i))
11381138
continue;
11391139

1140-
if (!ds->ports[port].slave)
1140+
if (!ds->ports[i].slave)
11411141
continue;
11421142

11431143
if (vlan.member[i] ==

0 commit comments

Comments
 (0)