diff options
author | Ilan Peer <ilan.peer@intel.com> | 2024-02-01 00:08:16 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-02-02 15:46:40 +0300 |
commit | 619a900f279800876e425ce4ef41c4e493bdf7d4 (patch) | |
tree | bc97bc40268e0a53c5852d145ffc53b6365a52dc /drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c | |
parent | 10159a45666bf127afe8d7c654351d542e7fcb42 (diff) | |
download | linux-619a900f279800876e425ce4ef41c4e493bdf7d4.tar.xz |
wifi: iwlwifi: mvm: Add support for removing responder TKs
When removing a PASN station, the TK must be removed before
the station is removed as otherwise the FW would assert.
To handle this, store the key configuration, and use it to remove
the key when the station is removed.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240131230734.3e6364730c04.Ia76dc4a9d399f1f68ac6b157d844b63f74d5159f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c index 8f10590f9cdd..f72ca38d7c0e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c @@ -12,6 +12,9 @@ struct iwl_mvm_pasn_sta { struct list_head list; struct iwl_mvm_int_sta int_sta; u8 addr[ETH_ALEN]; + + /* must be last as it followed by buffer holding the key */ + struct ieee80211_key_conf keyconf; }; struct iwl_mvm_pasn_hltk_data { @@ -303,6 +306,10 @@ static void iwl_mvm_resp_del_pasn_sta(struct iwl_mvm *mvm, { list_del(&sta->list); + if (sta->keyconf.keylen) + iwl_mvm_sec_key_del_pasn(mvm, vif, BIT(sta->int_sta.sta_id), + &sta->keyconf); + if (iwl_mvm_has_mld_api(mvm->fw)) iwl_mvm_mld_rm_sta_id(mvm, sta->int_sta.sta_id); else @@ -352,12 +359,12 @@ int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm, } if (tk && tk_len) { - sta = kzalloc(sizeof(*sta), GFP_KERNEL); + sta = kzalloc(sizeof(*sta) + tk_len, GFP_KERNEL); if (!sta) return -ENOBUFS; ret = iwl_mvm_add_pasn_sta(mvm, vif, &sta->int_sta, addr, - cipher, tk, tk_len); + cipher, tk, tk_len, &sta->keyconf); if (ret) { kfree(sta); return ret; |