diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-09-26 10:07:20 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-10-23 11:42:07 +0200 |
commit | 63ef576c9facf5d92702e249ad213fa73eb434bf (patch) | |
tree | a1cd061a6b9848e3154cd83c2ad31eb72b00f935 /drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | |
parent | wifi: iwlwifi: mvm: offload IGTK in AP if BIGTK is supported (diff) | |
download | linux-63ef576c9facf5d92702e249ad213fa73eb434bf.tar.xz linux-63ef576c9facf5d92702e249ad213fa73eb434bf.zip |
wifi: iwlwifi: mvm: use correct sta ID for IGTK/BIGTK
We don't (yet) send the IGTK down to the firmware, but when
we do it needs to be with the broadcast station ID, not the
multicast station ID. Same for the BIGTK, which we may send
already if firmware advertises it (but it doesn't yet.)
Fixes: a5de7de7e78e ("wifi: iwlwifi: mvm: enable TX beacon protection")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230926110319.dbc653913353.I82e90c86010f0b9588a180d9835fd11f666f5196@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c index 2c9f2f71b083..f49820647041 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c @@ -24,10 +24,15 @@ static u32 iwl_mvm_get_sec_sta_mask(struct iwl_mvm *mvm, return 0; } - /* AP group keys are per link and should be on the mcast STA */ + /* AP group keys are per link and should be on the mcast/bcast STA */ if (vif->type == NL80211_IFTYPE_AP && - !(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE)) + !(keyconf->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { + /* IGTK/BIGTK to bcast STA */ + if (keyconf->keyidx >= 4) + return BIT(link_info->bcast_sta.sta_id); + /* GTK for data to mcast STA */ return BIT(link_info->mcast_sta.sta_id); + } /* for client mode use the AP STA also for group keys */ if (!sta && vif->type == NL80211_IFTYPE_STATION) |