]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaea91f7c3d8a1b1b86cb9080d096940919f8790d
tree7dbd7d07d906df7f43044bbbaa92ec91627c2da0
parent8b09fb02ea85fb7a43cf9d7f6a88418b0c6ea1f2
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