]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: exit sja1105_vlan_filtering when called multiple times
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 12 May 2020 17:20:31 +0000 (20:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2020 20:08:08 +0000 (13:08 -0700)
commitc3a856a0d28910ab7ed79f2f879f1edde88b33f1
treee2d2ed1d597ea566ddbfe75693dc0c2770baa528
parentae1ac036e3a41a5830c7bb8db44d1b6ad426202a
net: dsa: sja1105: exit sja1105_vlan_filtering when called multiple times

VLAN filtering is a global property for sja1105, and that means that we
rely on the DSA core to not call us more than once.

But we need to introduce some per-port state for the tagger, namely the
xmit_tpid, and the best place to do that is where the xmit_tpid changes,
namely in sja1105_vlan_filtering. So at the moment, exit early from the
function to avoid unnecessarily resetting the switch for each port call.
Then we'll change the xmit_tpid prior to the early exit in the next
patch.

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