summaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2019-04-28 14:45:48 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-30 23:05:29 -0400
commit145746765f06a3dbc7869c81d0165b3ab96f935a (patch)
tree7dbd7d07d906df7f43044bbbaa92ec91627c2da0 /include/net/dsa.h
parente3ee07d14fac20ce12e93a72048fa6fd51348826 (diff)
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>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index aab3c2029edd..4e0f7e9c5aa1 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -233,6 +233,11 @@ struct dsa_switch {
233 */ 233 */
234 bool vlan_filtering_is_global; 234 bool vlan_filtering_is_global;
235 235
236 /* In case vlan_filtering_is_global is set, the VLAN awareness state
237 * should be retrieved from here and not from the per-port settings.
238 */
239 bool vlan_filtering;
240
236 unsigned long *bitmap; 241 unsigned long *bitmap;
237 unsigned long _bitmap; 242 unsigned long _bitmap;
238 243