Skip to content

Commit a1c1901

Browse files
KanjiMonsterkuba-moo
authored andcommitted
net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave
The untagged default VLAN is added to the default vlan, which may be one, but we modify the VLAN 0 entry on bridge leave. Fix this to use the correct VLAN entry for the default pvid. Fixes: fea8335 ("net: dsa: b53: Fix default VLAN ID") Signed-off-by: Jonas Gorski <[email protected]> Tested-by: Florian Fainelli <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 083c6b2 commit a1c1901

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ EXPORT_SYMBOL(b53_br_join);
19861986
void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
19871987
{
19881988
struct b53_device *dev = ds->priv;
1989-
struct b53_vlan *vl = &dev->vlans[0];
1989+
struct b53_vlan *vl;
19901990
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
19911991
unsigned int i;
19921992
u16 pvlan, reg, pvid;
@@ -2012,6 +2012,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
20122012
dev->ports[port].vlan_ctl_mask = pvlan;
20132013

20142014
pvid = b53_default_pvid(dev);
2015+
vl = &dev->vlans[pvid];
20152016

20162017
/* Make this port join all VLANs without VLAN entries */
20172018
if (is58xx(dev)) {

0 commit comments

Comments
 (0)