wifi: iwlwifi: mld/mvm: set beacon protection capability in wowlan config

Although the FW knows if a BIGTK was installed and can conclude from
that the beacon protection capability, the specific component
of the FW that is responsible for rekeying while in wowlan, doesn't know
what keys were installed.
So we need to tell that the FW when we go to wowlan, otherwise it will
ignore the BIGTK rekey, if such occurs.
Set this bit when needed.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.d3968487865e.I784f564ab85f618f26d3f082197a384bb219e07c@changeid
This commit is contained in:
Miri Korenblit 2025-08-21 20:47:18 +03:00
parent 6a1adca41f
commit 205a7309cc
5 changed files with 26 additions and 2 deletions

View File

@ -367,6 +367,7 @@ enum iwl_wowlan_flags {
ENABLE_NBNS_FILTERING = BIT(2),
ENABLE_DHCP_FILTERING = BIT(3),
ENABLE_STORE_BEACON = BIT(4),
HAS_BEACON_PROTECTION = BIT(5),
};
/**

View File

@ -1570,7 +1570,8 @@ static void
iwl_mld_set_wowlan_config_cmd(struct iwl_mld *mld,
struct cfg80211_wowlan *wowlan,
struct iwl_wowlan_config_cmd *wowlan_config_cmd,
struct ieee80211_sta *ap_sta)
struct ieee80211_sta *ap_sta,
struct ieee80211_bss_conf *link)
{
wowlan_config_cmd->is_11n_connection =
ap_sta->deflink.ht_cap.ht_supported;
@ -1580,6 +1581,9 @@ iwl_mld_set_wowlan_config_cmd(struct iwl_mld *mld,
if (ap_sta->mfp)
wowlan_config_cmd->flags |= IS_11W_ASSOC;
if (iwl_mld_beacon_protection_enabled(mld, link))
wowlan_config_cmd->flags |= HAS_BEACON_PROTECTION;
if (wowlan->disconnect)
wowlan_config_cmd->wakeup_filter |=
cpu_to_le32(IWL_WOWLAN_WAKEUP_BEACON_MISS |
@ -1777,7 +1781,7 @@ iwl_mld_wowlan_config(struct iwl_mld *mld, struct ieee80211_vif *bss_vif,
return ret;
iwl_mld_set_wowlan_config_cmd(mld, wowlan,
&wowlan_config_cmd, ap_sta);
&wowlan_config_cmd, ap_sta, link_conf);
ret = iwl_mld_send_cmd_pdu(mld, WOWLAN_CONFIGURATION,
&wowlan_config_cmd);
if (ret)

View File

@ -394,3 +394,15 @@ void iwl_mld_track_bigtk(struct iwl_mld *mld,
else
RCU_INIT_POINTER(link->bigtks[key->keyidx - 6], NULL);
}
bool iwl_mld_beacon_protection_enabled(struct iwl_mld *mld,
struct ieee80211_bss_conf *link)
{
struct iwl_mld_link *mld_link = iwl_mld_link_from_mac80211(link);
if (WARN_ON(!mld_link))
return false;
return rcu_access_pointer(mld_link->bigtks[0]) ||
rcu_access_pointer(mld_link->bigtks[1]);
}

View File

@ -40,4 +40,7 @@ void iwl_mld_track_bigtk(struct iwl_mld *mld,
struct ieee80211_vif *vif,
struct ieee80211_key_conf *key, bool add);
bool iwl_mld_beacon_protection_enabled(struct iwl_mld *mld,
struct ieee80211_bss_conf *link);
#endif /* __iwl_mld_key_h__ */

View File

@ -928,6 +928,10 @@ iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm,
if (ap_sta->mfp)
wowlan_config_cmd->flags |= IS_11W_ASSOC;
if (rcu_access_pointer(mvmvif->bcn_prot.keys[0]) ||
rcu_access_pointer(mvmvif->bcn_prot.keys[1]))
wowlan_config_cmd->flags |= HAS_BEACON_PROTECTION;
if (iwl_fw_lookup_cmd_ver(mvm->fw, WOWLAN_CONFIGURATION, 0) < 6) {
/* Query the last used seqno and set it */
int ret = iwl_mvm_get_last_nonqos_seq(mvm, vif);