net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 16 Feb 2022 16:47:52 +0000 (18:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Feb 2022 14:17:10 +0000 (14:17 +0000)
Since commit 3116ad0696dd ("net: bridge: vlan: don't notify to switchdev
master VLANs without BRENTRY flag"), the bridge no longer emits
switchdev notifiers for VLANs that don't have the
BRIDGE_VLAN_INFO_BRENTRY flag, so these checks are dead code.
Remove them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_switchdev.c

index a7d97d4..ce85f76 100644 (file)
@@ -252,15 +252,11 @@ static int cpsw_port_vlans_add(struct cpsw_priv *priv,
 {
        bool untag = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
        struct net_device *orig_dev = vlan->obj.orig_dev;
-       bool cpu_port = netif_is_bridge_master(orig_dev);
        bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
 
        dev_dbg(priv->dev, "VID add: %s: vid:%u flags:%X\n",
                priv->ndev->name, vlan->vid, vlan->flags);
 
-       if (cpu_port && !(vlan->flags & BRIDGE_VLAN_INFO_BRENTRY))
-               return 0;
-
        return cpsw_port_vlan_add(priv, untag, pvid, vlan->vid, orig_dev);
 }