diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-03-18 14:14:02 +0200 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 13:39:12 +0000 |
commit | b5d887820bedd910fe5555464716be32042e7eb6 (patch) | |
tree | c6f993966a8e9bb6be8586ac6b6e8a665885fb4c | |
parent | 3d42f95cc4b8f2dd8ec7c13efd063579fabd2d43 (diff) | |
download | backport-iwlwifi-b5d887820bedd910fe5555464716be32042e7eb6.tar.gz |
[BUGFIX] wifi: iwlwifi: mvm: select STA mask only for active links
During reconfig, we might send keys, but those should be only
sent to already active link stations. Iterate only active ones
to fix that issue.
type=bugfix
fixes=Iae07b736c3109d085ad5b74ec8282ce45020da39
ticket=jira:WIFI-396982
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: I6357f05c55ef111002ddc169287eb356ca0c1b21
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/99762
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/100279
Reviewed-by: Golan Ben Ami <golan.ben.ami@intel.com>
x-iwlwifi-stack-dev: 1f552791923f9c0bfd5533a487c8b61dc789400c
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 11 | ||||
-rw-r--r-- | versions | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 476aaa86c9..3ddf06abf1 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -9,7 +9,9 @@ u32 iwl_mvm_sta_fw_id_mask(struct iwl_mvm *mvm, struct ieee80211_sta *sta, int filter_link_id) { + struct ieee80211_link_sta *link_sta; struct iwl_mvm_sta *mvmsta; + struct ieee80211_vif *vif; unsigned int link_id; u32 result = 0; @@ -17,26 +19,27 @@ u32 iwl_mvm_sta_fw_id_mask(struct iwl_mvm *mvm, struct ieee80211_sta *sta, return 0; mvmsta = iwl_mvm_sta_from_mac80211(sta); + vif = mvmsta->vif; /* it's easy when the STA is not an MLD */ if (!sta->valid_links) return BIT(mvmsta->deflink.sta_id); /* but if it is an MLD, get the mask of all the FW STAs it has ... */ - for (link_id = 0; link_id < ARRAY_SIZE(mvmsta->link); link_id++) { - struct iwl_mvm_link_sta *link_sta; + for_each_sta_active_link(vif, sta, link_sta, link_id) { + struct iwl_mvm_link_sta *mvm_link_sta; /* unless we have a specific link in mind */ if (filter_link_id >= 0 && link_id != filter_link_id) continue; - link_sta = + mvm_link_sta = rcu_dereference_check(mvmsta->link[link_id], lockdep_is_held(&mvm->mutex)); if (!link_sta) continue; - result |= BIT(link_sta->sta_id); + result |= BIT(mvm_link_sta->sta_id); } return result; @@ -2,5 +2,5 @@ BACKPORTS_VERSION="(see git)" BACKPORTED_KERNEL_VERSION="(see git)" BACKPORTED_KERNEL_NAME="iwlwifi" BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ -BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12032:d8de0c74" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12033:1f552791" BACKPORTS_BRANCH_TSTAMP="Apr 17 2024 13:11:40" |