mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
net: dsa: Skip calling .port_vlan_filtering on no change
Even if VLAN filtering is global, DSA will call this callback once per each port. Drivers should not have to compare the global state with the requested change. So let DSA do it. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2a1305515b
commit
ec9121e7d2
1 changed files with 3 additions and 0 deletions
|
|
@ -203,6 +203,9 @@ int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
|
|||
if (!dsa_port_can_apply_vlan_filtering(dp, vlan_filtering))
|
||||
return -EINVAL;
|
||||
|
||||
if (dsa_port_is_vlan_filtering(dp) == vlan_filtering)
|
||||
return 0;
|
||||
|
||||
err = ds->ops->port_vlan_filtering(ds, dp->index,
|
||||
vlan_filtering);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue