summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/virtual/mac80211_hwsim.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2023-09-20 21:25:23 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-09-25 09:12:33 +0200
commitf605d10ad12bb2d414c610e0a7c640d1cf097d46 (patch)
tree1d0772baf0374c2a38ee4f6619f73d5b77407c95 /drivers/net/wireless/virtual/mac80211_hwsim.c
parent041a74cbe49048abc3adb6129141256e50b84b6e (diff)
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>
Diffstat (limited to 'drivers/net/wireless/virtual/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/virtual/mac80211_hwsim.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index 17ecd5fe7258..c7b4414cc6c3 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -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,