mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 02:27:18 +01:00
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@gmail.com> Signed-off-by: Sven Eckelmann <se@simonwunderlich.de> Link: https://github.com/openwrt/openwrt/pull/20421 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
280cf19cdb
commit
2d14c1008e
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue