mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e3ee07d14f
commit
145746765f
2 changed files with 9 additions and 1 deletions
|
|
@ -208,7 +208,10 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
dp->vlan_filtering = vlan_filtering;
|
||||
if (ds->vlan_filtering_is_global)
|
||||
ds->vlan_filtering = vlan_filtering;
|
||||
else
|
||||
dp->vlan_filtering = vlan_filtering;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue