net: dpaa2-switch: assign port_priv->mac after dpaa2_mac_connect() call
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 29 Nov 2022 14:12:15 +0000 (16:12 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 1 Dec 2022 12:40:22 +0000 (13:40 +0100)
commit88d64367cea019fa6197d0d97a85ac90279919b7
tree5037ff40f128bf2ee1810204f3469585c72f0cc6
parent02d61948e8daf3844d0af41ba5d563ef03cc7c4f
net: dpaa2-switch: assign port_priv->mac after dpaa2_mac_connect() call

The dpaa2-switch has the exact same locking requirements when connected
to a DPMAC, so it needs port_priv->mac to always point either to NULL,
or to a DPMAC with a fully initialized phylink instance.

Make the same preparatory change in the dpaa2-switch driver as in the
dpaa2-eth one.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c