net: dsa: sja1105: reset the port pvid when leaving a VLAN-aware bridge
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 28 Jul 2021 21:54:27 +0000 (00:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Jul 2021 14:35:01 +0000 (15:35 +0100)
commitcde8078e83e32022e30a4f670c2c8179f2f08991
treeac1703ec8d6c265772803f67f03ab3469fe1dbb4
parente5fe3a5fe333b9967eeb99966bcf3ec710318554
net: dsa: sja1105: reset the port pvid when leaving a VLAN-aware bridge

Now that we no longer have the ultra-central sja1105_build_vlan_table(),
we need to be more careful about checking all corner cases manually.

For example, when a port leaves a VLAN-aware bridge, it becomes
standalone so its pvid should become a tag_8021q RX VLAN again. However,
sja1105_commit_pvid() only gets called from sja1105_bridge_vlan_add()
and from sja1105_vlan_filtering(), and no VLAN awareness change takes
place (VLAN filtering is a global setting for sja1105, so the switch
remains VLAN-aware overall).

This means that we need to put another sja1105_commit_pvid() call in
sja1105_bridge_member().

Fixes: 6dfd23d35e75 ("net: dsa: sja1105: delete vlan delta save/restore logic")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c