net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 13 Jul 2021 09:33:50 +0000 (12:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jul 2021 16:30:46 +0000 (09:30 -0700)
commite56c6bbd98dc1cefb6f9c5d795fd29016e4f2fe7
tree76fdf4b19d4c1957b1a9af0622a4ab59f8c46880
parent01757f536ac825e3614d583fee9acb48c64ed084
net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload

The point with a *dev and a *brport_dev is that when we have a LAG net
device that is a bridge port, *dev is an ocelot net device and
*brport_dev is the bonding/team net device. The ocelot net device
beneath the LAG does not exist from the bridge's perspective, so we need
to sync the switchdev objects belonging to the brport_dev and not to the
dev.

Fixes: e4bd44e89dcf ("net: ocelot: replay switchdev events when joining bridge")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_net.c