summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2022-08-10 13:21:15 +0300
committerJason Liu <jason.hui.liu@nxp.com>2022-08-11 13:16:31 +0200
commita7aa868b21e5c1557c1d240a52ec14f07ab6681f (patch)
tree0c260c9de486762a9acab2e68521e4a6243245ee
parent28290559d8e7b1d3d88443db437a690f3c02e9c8 (diff)
dpaa2-switch: fix bridge port and context passed to switchdev_bridge_port_unoffload
The switchdev_bridge_port_offload() call was changed to pass the bridge port and the context (a port_priv) but the associated switchdev_bridge_port_unoffload() call was not changed. Fix this issue with this patch. Fixes: 4726cdce0741 ("dpaa2-switch: say that the bond device is offloaded as a bridge port") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
index 3316e700b3c2..34571089847f 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
@@ -2182,7 +2182,12 @@ static int dpaa2_switch_port_restore_rxvlan(struct net_device *vdev, int vid, vo
static void dpaa2_switch_port_pre_bridge_leave(struct net_device *netdev)
{
- switchdev_bridge_port_unoffload(netdev, NULL,
+ struct ethsw_port_priv *port_priv = netdev_priv(netdev);
+ struct net_device *brport_dev;
+
+ brport_dev = dpaa2_switch_port_to_bridge_port(port_priv);
+
+ switchdev_bridge_port_unoffload(brport_dev, port_priv,
&dpaa2_switch_port_switchdev_nb,
&dpaa2_switch_port_switchdev_blocking_nb);
}