realtek: dsa: Adjust MSTP states after joining/leaving bridge
authorSven Eckelmann <[email protected]>
Tue, 28 Oct 2025 07:55:38 +0000 (08:55 +0100)
committerHauke Mehrtens <[email protected]>
Sat, 15 Nov 2025 15:21:16 +0000 (16:21 +0100)
commit5d36445dc117e7b636a17e4b6f457df6145ce441
treeb46737dd2475ef15281bbec39b68ae8f4f84888d
parent2d14c1008e13da5bba9773ba19fc340207ad0a98
realtek: dsa: Adjust MSTP states after joining/leaving bridge

When joining a bridge or leaving a bridge, the CIST state will
automatically be adjusted by DSA using .port_stp_state_set(). But MSTIs are
completely unhandled.

If a port is joining a bridge, the default state must be disabled. The MSTP
daemon is then responsible for adjusting the state.

If the bridge is left, the forwarding state must be enforced because VLANs
(and with this also the MSTIs assigned to them) are shared between bridged
and non-bridged ports. An unbridged port must therefore not be left in an
blocked/disabled state for a VLAN (MSTI).

Suggested-by: Jonas Gorski <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20421
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c