[openwrt/openwrt] realtek: dsa: Sync CIST with MSTI state for unbridged ports
LEDE Commits
lede-commits at lists.infradead.org
Sat Nov 15 07:22:12 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5e77a81877dd987f143d38f9cd1cdad7453a3acc
commit 5e77a81877dd987f143d38f9cd1cdad7453a3acc
Author: Sven Eckelmann <se at simonwunderlich.de>
AuthorDate: Mon Oct 27 17:19:24 2025 +0100
realtek: dsa: Sync CIST with MSTI state for unbridged ports
The VLANs and their MSTIs are shared on the realtek switch HW between
bridged and unbridged ports. But the MSTI state cannot be updated for an
unbridged port via DSA. To ensure that the port is still configured
correctly after leaving a bridge, the CIST state updates via DSA must also
be propagated to the MSTI states.
Suggested-by: Jonas Gorski <jonas.gorski at gmail.com>
Signed-off-by: Sven Eckelmann <se at simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20421
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index 0312ee413d..e595df93ba 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -1597,9 +1597,20 @@ static void rtldsa_port_xstp_state_set(struct rtl838x_switch_priv *priv, int por
void rtl83xx_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
{
struct rtl838x_switch_priv *priv = ds->priv;
+ struct dsa_port *dp = dsa_to_port(ds, port);
+ unsigned int i;
mutex_lock(&priv->reg_mutex);
rtldsa_port_xstp_state_set(priv, port, state, 0);
+
+ if (dp->bridge)
+ goto unlock;
+
+ /* for unbridged ports, also force the same state to the MSTIs */
+ for (i = 1; i < priv->n_mst; i++)
+ rtldsa_port_xstp_state_set(priv, port, state, i);
+
+unlock:
mutex_unlock(&priv->reg_mutex);
}
More information about the lede-commits
mailing list