dpaa2-switch: set interface MAC address only on endpoint change
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 19 Dec 2023 11:59:26 +0000 (13:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Dec 2023 01:18:59 +0000 (01:18 +0000)
commit365d0371a9ecf9f15fcf9e054e3bb7205603344d
treea3c78ffebbfe65f6d912fd78ecca04a994af71c7
parentd11db8ad388281cbf7aa3e6834253d844210f1e0
dpaa2-switch: set interface MAC address only on endpoint change

There is no point in updating the MAC address of a switch interface each
time the link state changes, this only needs to happen in case the
endpoint changes (the switch interface is [dis]connected from/to a MAC).

Just move the call to dpaa2_switch_port_set_mac_addr() under
DPSW_IRQ_EVENT_ENDPOINT_CHANGED.

Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c