wifi: mac80211_hwsim: Handle BSS_CHANGED_VALID_LINKS

In station mode, set the active links to all the usable
links.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230920211508.6218307226d3.I249f52b4773423a33c3121e31002abe0a8d98e78@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Ilan Peer 2023-09-20 21:25:23 +03:00 committed by Johannes Berg
parent 041a74cbe4
commit f605d10ad1

View File

@ -2445,6 +2445,14 @@ static void mac80211_hwsim_vif_info_changed(struct ieee80211_hw *hw,
vp->assoc = vif->cfg.assoc;
vp->aid = vif->cfg.aid;
}
if (vif->type == NL80211_IFTYPE_STATION &&
changed & BSS_CHANGED_MLD_VALID_LINKS) {
u16 usable_links = ieee80211_vif_usable_links(vif);
if (vif->active_links != usable_links)
ieee80211_set_active_links_async(vif, usable_links);
}
}
static void mac80211_hwsim_link_info_changed(struct ieee80211_hw *hw,