[openwrt/openwrt] realtek: dsa: Automatically return lost VLANs to CIST
LEDE Commits
lede-commits at lists.infradead.org
Sat Nov 15 07:22:10 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2d14c1008e13da5bba9773ba19fc340207ad0a98
commit 2d14c1008e13da5bba9773ba19fc340207ad0a98
Author: Sven Eckelmann <se at simonwunderlich.de>
AuthorDate: Tue Oct 28 08:55:38 2025 +0100
realtek: dsa: Automatically return lost VLANs to CIST
If a VLAN doesn't have any members anymore, then it is removed and
implicitly returns back from any MSTI to CIST. The DSA layer will not
create any call to .vlan_msti_set and the driver is required to handle this
directly.
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 | 4 ++++
1 file changed, 4 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 f83ac7bd26..1a950fff55 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
@@ -1819,6 +1819,10 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port,
info.untagged_ports &= (~BIT_ULL(port));
info.member_ports &= (~BIT_ULL(port));
+ /* VLANs without members are set back (implicitly) to CIST by DSA */
+ if (!info.member_ports)
+ info.fid = 0;
+
priv->r->vlan_set_untagged(vlan->vid, info.untagged_ports);
pr_debug("Untagged ports, VLAN %d: %llx\n", vlan->vid, info.untagged_ports);
More information about the lede-commits
mailing list