]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: dsa: do not check orig_dev in vlan del
authorVivien Didelot <vivien.didelot@gmail.com>
Fri, 14 Jun 2019 17:49:19 +0000 (13:49 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jun 2019 03:20:07 +0000 (20:20 -0700)
The current DSA code handling switchdev objects does not recurse into
the lower devices thus is never called with an orig_dev member being
a bridge device, hence remove this useless check.

At the same time, remove the comments about the callers, which is
unlikely to be updated if the code changes and thus will be confusing.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/port.c

index 585b6b9a9433a23d54e6e9951a93314a7d680aa2..d2b65e8dc60cb2258ac56c41e7b56acb34dce4d3 100644 (file)
@@ -336,9 +336,6 @@ int dsa_port_vlan_add(struct dsa_port *dp,
                .vlan = vlan,
        };
 
-       /* Can be called from dsa_slave_port_obj_add() or
-        * dsa_slave_vlan_rx_add_vid()
-        */
        if (!dp->bridge_dev || br_vlan_enabled(dp->bridge_dev))
                return dsa_port_notify(dp, DSA_NOTIFIER_VLAN_ADD, &info);
 
@@ -354,12 +351,6 @@ int dsa_port_vlan_del(struct dsa_port *dp,
                .vlan = vlan,
        };
 
-       if (vlan->obj.orig_dev && netif_is_bridge_master(vlan->obj.orig_dev))
-               return -EOPNOTSUPP;
-
-       /* Can be called from dsa_slave_port_obj_del() or
-        * dsa_slave_vlan_rx_kill_vid()
-        */
        if (!dp->bridge_dev || br_vlan_enabled(dp->bridge_dev))
                return dsa_port_notify(dp, DSA_NOTIFIER_VLAN_DEL, &info);