Commit c0b7f7d7 authored by Horatiu Vultur's avatar Horatiu Vultur Committed by David S. Miller

net: ocelot: Fix the call to switchdev_bridge_port_offload

In the blamed commit, the call to the function
switchdev_bridge_port_offload was passing the wrong argument for
atomic_nb. It was ocelot_netdevice_nb instead of ocelot_swtchdev_nb.
This patch fixes this issue.

Fixes: 4e51bf44 ("net: bridge: move the switchdev object replay helpers to "push" mode")
Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 429e3d12
...@@ -1187,7 +1187,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev, ...@@ -1187,7 +1187,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
ocelot_port_bridge_join(ocelot, port, bridge); ocelot_port_bridge_join(ocelot, port, bridge);
err = switchdev_bridge_port_offload(brport_dev, dev, priv, err = switchdev_bridge_port_offload(brport_dev, dev, priv,
&ocelot_netdevice_nb, &ocelot_switchdev_nb,
&ocelot_switchdev_blocking_nb, &ocelot_switchdev_blocking_nb,
false, extack); false, extack);
if (err) if (err)
...@@ -1201,7 +1201,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev, ...@@ -1201,7 +1201,7 @@ static int ocelot_netdevice_bridge_join(struct net_device *dev,
err_switchdev_sync: err_switchdev_sync:
switchdev_bridge_port_unoffload(brport_dev, priv, switchdev_bridge_port_unoffload(brport_dev, priv,
&ocelot_netdevice_nb, &ocelot_switchdev_nb,
&ocelot_switchdev_blocking_nb); &ocelot_switchdev_blocking_nb);
err_switchdev_offload: err_switchdev_offload:
ocelot_port_bridge_leave(ocelot, port, bridge); ocelot_port_bridge_leave(ocelot, port, bridge);
...@@ -1214,7 +1214,7 @@ static void ocelot_netdevice_pre_bridge_leave(struct net_device *dev, ...@@ -1214,7 +1214,7 @@ static void ocelot_netdevice_pre_bridge_leave(struct net_device *dev,
struct ocelot_port_private *priv = netdev_priv(dev); struct ocelot_port_private *priv = netdev_priv(dev);
switchdev_bridge_port_unoffload(brport_dev, priv, switchdev_bridge_port_unoffload(brport_dev, priv,
&ocelot_netdevice_nb, &ocelot_switchdev_nb,
&ocelot_switchdev_blocking_nb); &ocelot_switchdev_blocking_nb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment