mac80211: compute the links of each AP VLAN on its own

At an AP link change, ieee80211_update_apvlan_links() carried the link
mask of one 4-address AP VLAN over to the next. With two Multi-AP
backhaul MLDs on different link sets, the second VLAN lost links that
its station holds, and mac80211 removed them from the station.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau committed 2026-10-28 14:46:20 +00:00
1 parent f37e174443
commit d179d224ce
1 file changed
+34
@@ -0,0 +1,34 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sat, 24 Oct 2026 04:00:57 +0200
Subject: [PATCH] wifi: mac80211: compute the links of each AP VLAN on its own
ieee80211_update_apvlan_links() narrows one link mask for every
4-address AP VLAN of the AP with the links of that VLAN's station, and
never resets it between VLANs. Each VLAN after the first thus gets only
the links that the stations of all earlier VLANs hold as well. A link
change of an AP with two WDS MLD stations on different link sets takes
links from the second VLAN that its station uses. Reachable via
ieee80211_vif_update_links() on an AP link add or removal.
Start from the links of the AP for each VLAN.
Fixes: 469d5d5a3b7a ("wifi: mac80211: synchronize valid links for WDS AP_VLAN interfaces")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/link.c
+++ b/net/mac80211/link.c
@@ -17,13 +17,13 @@ static void ieee80211_update_apvlan_link
unsigned long rem = ~sdata->vif.valid_links &
GENMASK(IEEE80211_MLD_MAX_NUM_LINKS - 1, 0);
struct ieee80211_local *local = sdata->local;
- unsigned long add = sdata->vif.valid_links;
struct wiphy *wiphy = local->hw.wiphy;
struct ieee80211_sub_if_data *vlan;
struct ieee80211_link_data *link;
struct sta_info *sta;
list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) {
+ unsigned long add = sdata->vif.valid_links;
int link_id;
if (vlan->wdev.use_4addr) {