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 <olteanv@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
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)