wifi: iwlwifi: mvm: adjust iwl_mvm_sec_key_remove_ap to MLO
It has to be done per link. We still don't support keys configuration for several links, but the single vif link can still point to a link different from deflink. For now handle the removal of keys for the default link. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230329100039.19d729cc4654.I4ebe8e3eb5fc00a994761f7c0ad40107382705ca@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
6a2a71e563
commit
ba9eef6ba6
@ -2699,7 +2699,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
|
||||
if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART,
|
||||
&mvm->status)) {
|
||||
/* first remove remaining keys */
|
||||
iwl_mvm_sec_key_remove_ap(mvm, vif);
|
||||
iwl_mvm_sec_key_remove_ap(mvm, vif,
|
||||
&mvmvif->deflink);
|
||||
|
||||
/*
|
||||
* Remove AP station now that
|
||||
|
@ -207,14 +207,14 @@ static void iwl_mvm_sec_key_remove_ap_iter(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
void iwl_mvm_sec_key_remove_ap(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif)
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_vif_link_info *link)
|
||||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
u32 sec_key_id = WIDE_ID(DATA_PATH_GROUP, SEC_KEY_CMD);
|
||||
u8 sec_key_ver = iwl_fw_lookup_cmd_ver(mvm->fw, sec_key_id, 0);
|
||||
|
||||
if (WARN_ON_ONCE(vif->type != NL80211_IFTYPE_STATION ||
|
||||
mvmvif->deflink.ap_sta_id == IWL_MVM_INVALID_STA))
|
||||
link->ap_sta_id == IWL_MVM_INVALID_STA))
|
||||
return;
|
||||
|
||||
if (!sec_key_ver)
|
||||
|
@ -538,14 +538,13 @@ static void iwl_mvm_mld_vif_delete_all_stas(struct iwl_mvm *mvm,
|
||||
if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
|
||||
return;
|
||||
|
||||
iwl_mvm_sec_key_remove_ap(mvm, vif);
|
||||
|
||||
for_each_mvm_vif_valid_link(mvmvif, i) {
|
||||
struct iwl_mvm_vif_link_info *link = mvmvif->link[i];
|
||||
|
||||
if (!link)
|
||||
continue;
|
||||
|
||||
iwl_mvm_sec_key_remove_ap(mvm, vif, link);
|
||||
ret = iwl_mvm_mld_rm_sta_id(mvm, vif, link->ap_sta_id);
|
||||
if (ret)
|
||||
IWL_ERR(mvm, "failed to remove AP station\n");
|
||||
|
@ -2326,7 +2326,8 @@ int iwl_mvm_sec_key_del(struct iwl_mvm *mvm,
|
||||
struct ieee80211_sta *sta,
|
||||
struct ieee80211_key_conf *keyconf);
|
||||
void iwl_mvm_sec_key_remove_ap(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif);
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_vif_link_info *link);
|
||||
|
||||
int iwl_rfi_send_config_cmd(struct iwl_mvm *mvm,
|
||||
struct iwl_rfi_lut_entry *rfi_table);
|
||||
|
@ -2022,7 +2022,7 @@ bool iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
return true;
|
||||
|
||||
/* first remove remaining keys */
|
||||
iwl_mvm_sec_key_remove_ap(mvm, vif);
|
||||
iwl_mvm_sec_key_remove_ap(mvm, vif, &mvmvif->deflink);
|
||||
|
||||
/* unassoc - go ahead - remove the AP STA now */
|
||||
mvmvif->deflink.ap_sta_id = IWL_MVM_INVALID_STA;
|
||||
|
Loading…
x
Reference in New Issue
Block a user