dpaa2-switch: setup learning state on STP state change
authorIoana Ciornei <ioana.ciornei@nxp.com>
Tue, 30 Mar 2021 14:54:19 +0000 (17:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 00:18:26 +0000 (17:18 -0700)
commitbc96781a895996c66f1d20411202f24000bfbab8
tree07da12432be7470ca29826b0578fb59c8e0cd3bd
parent1a64ed129cce958921bebbde0842d9a0ba0205ba
dpaa2-switch: setup learning state on STP state change

Depending on what STP state a port is in, the learning on that port
should be enabled or disabled.

When the STP state is DISABLED, BLOCKING or LISTENING no learning should
be happening irrespective of what the bridge previously requested. The
learning state is changed to be the one setup by the bridge when the STP
state is LEARNING or FORWARDING.

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