diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-01-29 20:00:52 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-02-02 14:20:43 +0100 |
commit | 358ddc7bfa980888b69b406a7c4ce0a5b0ac5c30 (patch) | |
tree | 769ee77e5825995611b668f20e86e87a0bf8c5c0 /drivers/net/wireless/virtual/mac80211_hwsim.c | |
parent | 57d1b4632e03e5f938972055c45b0f2e475e6929 (diff) |
wifi: mac80211_hwsim: enable all links only in MLO
The existing code is enabling all usable links when moving to
authorized state, but this should happen only for MLO connections.
Fix this.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240129200054.f5459f6c29c8.I397814449e17950fcf882ef44a1e790a71aa1dce@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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index 3adc11bcaf12..a06a462d38f0 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -4,7 +4,7 @@ * Copyright (c) 2008, Jouni Malinen <j@w1.fi> * Copyright (c) 2011, Javier Lopez <jlopex@gmail.com> * Copyright (c) 2016 - 2017 Intel Deutschland GmbH - * Copyright (C) 2018 - 2023 Intel Corporation + * Copyright (C) 2018 - 2024 Intel Corporation */ /* @@ -2671,10 +2671,11 @@ static int mac80211_hwsim_sta_state(struct ieee80211_hw *hw, return mac80211_hwsim_sta_add(hw, vif, sta); /* - * when client is authorized (AP station marked as such), - * enable all links + * in an MLO connection, when client is authorized + * (AP station marked as such), enable all links */ - if (vif->type == NL80211_IFTYPE_STATION && + if (ieee80211_vif_is_mld(vif) && + vif->type == NL80211_IFTYPE_STATION && new_state == IEEE80211_STA_AUTHORIZED && !sta->tdls) ieee80211_set_active_links_async(vif, ieee80211_vif_usable_links(vif)); |