Skip to content

Commit 2a7d846

Browse files
KanjiMonsterSasha Levin
authored andcommitted
net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave
[ Upstream commit a1c1901 ] 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 <jonas.gorski@gmail.com> Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/20250429201710.330937-6-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 792f9bf commit 2a7d846

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
@@ -1987,7 +1987,7 @@ EXPORT_SYMBOL(b53_br_join);
19871987
void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
19881988
{
19891989
struct b53_device *dev = ds->priv;
1990-
struct b53_vlan *vl = &dev->vlans[0];
1990+
struct b53_vlan *vl;
19911991
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
19921992
unsigned int i;
19931993
u16 pvlan, reg, pvid;
@@ -2013,6 +2013,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
20132013
dev->ports[port].vlan_ctl_mask = pvlan;
20142014

20152015
pvid = b53_default_pvid(dev);
2016+
vl = &dev->vlans[pvid];
20162017

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

0 commit comments

Comments
 (0)