aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-08-30 21:58:44 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-09-03 17:42:33 +0200
commitf7be5f6a2174bc94d0230d7aeb42fc08da18956f (patch)
tree14ecac48f721ebac09934aba20d21fdd1d1314cf
parentac2cc73cc930262825e740e81dcb4e3118dc73f2 (diff)
downloadwireless-next-mld-wip.tar.gz
wifi: mac80211_hwsim: always activate all linksmld-wip
By default, even in client mode, hwsim always had all links active, where it then uses them in a round-robin fashion. Re-enable that by activating all valid links work right after the connection is authorized. Change-Id: I1e04b12b2784ea52f91f4bffb2c4af7686482435 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index f044db1621dd9..96f7333f7ce11 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2476,6 +2476,14 @@ static int mac80211_hwsim_sta_state(struct ieee80211_hw *hw,
if (old_state == IEEE80211_STA_NOTEXIST)
return mac80211_hwsim_sta_add(hw, vif, sta);
+ /*
+ * when client is authorized (AP station marked as such),
+ * enable all links
+ */
+ if (vif->type == NL80211_IFTYPE_STATION &&
+ new_state == IEEE80211_STA_AUTHORIZED && !sta->tdls)
+ ieee80211_set_active_links_async(vif, vif->valid_links);
+
return 0;
}