net: dsa: b53: Let DSA call .port_vlan_filtering only when necessary
authorVladimir Oltean <olteanv@gmail.com>
Sun, 28 Apr 2019 18:45:52 +0000 (21:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 03:05:29 +0000 (23:05 -0400)
Since DSA has recently learned to treat better with drivers that set
vlan_filtering_is_global, doing this is no longer required.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/b53/b53_common.c

index a779b9c3ab6e689f37d2f0889919018a4712038f..9fbeb20ba263f2f8f1932180b28a423e5fa4e156 100644 (file)
@@ -1286,13 +1286,13 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
 
        b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), &pvid);
        new_pvid = pvid;
-       if (dev->vlan_filtering_enabled && !vlan_filtering) {
+       if (!vlan_filtering) {
                /* Filtering is currently enabled, use the default PVID since
                 * the bridge does not expect tagging anymore
                 */
                dev->ports[port].pvid = pvid;
                new_pvid = b53_default_pvid(dev);
-       } else if (!dev->vlan_filtering_enabled && vlan_filtering) {
+       } else {
                /* Filtering is currently disabled, restore the previous PVID */
                new_pvid = dev->ports[port].pvid;
        }