]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: sparx5: remove guards against !BRIDGE_VLAN_INFO_BRENTRY
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 16 Feb 2022 16:47:50 +0000 (18:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Feb 2022 14:17:09 +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/microchip/sparx5/sparx5_switchdev.c

index 649ca609884a3f893868a4dc0475ebc8820d54b2..f5271c3ec133eefaef192c52798d5b8505c5b962 100644 (file)
@@ -369,13 +369,11 @@ static int sparx5_handle_port_vlan_add(struct net_device *dev,
        struct sparx5_port *port = netdev_priv(dev);
 
        if (netif_is_bridge_master(dev)) {
-               if (v->flags & BRIDGE_VLAN_INFO_BRENTRY) {
-                       struct sparx5 *sparx5 =
-                               container_of(nb, struct sparx5,
-                                            switchdev_blocking_nb);
+               struct sparx5 *sparx5 =
+                       container_of(nb, struct sparx5,
+                                    switchdev_blocking_nb);
 
-                       sparx5_sync_bridge_dev_addr(dev, sparx5, v->vid, true);
-               }
+               sparx5_sync_bridge_dev_addr(dev, sparx5, v->vid, true);
                return 0;
        }