net: dsa: Keep the vlan_filtering setting in dsa_switch if it's global
authorVladimir Oltean <olteanv@gmail.com>
Sun, 28 Apr 2019 18:45:48 +0000 (21:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 03:05:29 +0000 (23:05 -0400)
commit145746765f06a3dbc7869c81d0165b3ab96f935a
tree7dbd7d07d906df7f43044bbbaa92ec91627c2da0
parente3ee07d14fac20ce12e93a72048fa6fd51348826
net: dsa: Keep the vlan_filtering setting in dsa_switch if it's global

The current behavior is not as obvious as one would assume (which is
that, if the driver set vlan_filtering_is_global = 1, then checking any
dp->vlan_filtering would yield the same result). Only the ports which
are actively enslaved into a bridge would have vlan_filtering set.

This makes it tricky for drivers to check what the global state is.
So fix this and make the struct dsa_switch hold this global setting.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/port.c