]> 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)
commit0c50b34ba336dec1be2c0f04ef82402039580465
tree7dbd7d07d906df7f43044bbbaa92ec91627c2da0
parentdb74a7815982d1fc6b49a116d4066d751a0a6182
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