summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2025-08-21 20:47:26 +0300
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>2025-08-26 18:39:45 +0300
commit433570ee392f2f8f792a454bc2d34a4d3ce8d47d (patch)
tree1941666368a56d2cfd3df7dfeb96fb710d2c091f
parent370fc69ed95ea3547dc106fb0508651fd4478412 (diff)
downloadlinux-433570ee392f2f8f792a454bc2d34a4d3ce8d47d.tar.gz
linux-433570ee392f2f8f792a454bc2d34a4d3ce8d47d.zip
wifi: iwlwifi: mld: don't validate keys state on resume
When resuming, we iterate over all the (installed) keys to update the PNs. If we find a key with an unexpected cipher we disconnect. But there is no reason for us to validate the internal key state specifically on resume, it should be the same as it was before the suspend. Remove the 'unhandled_cipher' from the iteration data. Also remove the num_keys indication as it is not really needed. If no keys were installed before the suspend, we will have num_of_gtk_rekeys = 0 and we will return early anyway. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250821204455.fb7e3bd4a967.I7eb24756ee27ad7b6731c0fb5dce5acb5d986694@changeid
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/d3.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/d3.c b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
index b27b874b3e84..6a32aa22ffb8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
@@ -41,8 +41,6 @@ enum iwl_mld_d3_notif {
struct iwl_mld_resume_key_iter_data {
struct iwl_mld *mld;
struct iwl_mld_wowlan_status *wowlan_status;
- u32 num_keys;
- bool unhandled_cipher;
};
struct iwl_mld_suspend_key_iter_data {
@@ -747,14 +745,7 @@ iwl_mld_resume_keys_iter(struct ieee80211_hw *hw,
struct iwl_mld_wowlan_status *wowlan_status = data->wowlan_status;
u8 status_idx;
- if (data->unhandled_cipher)
- return;
-
switch (key->cipher) {
- case WLAN_CIPHER_SUITE_WEP40:
- case WLAN_CIPHER_SUITE_WEP104:
- /* ignore WEP completely, nothing to do */
- return;
case WLAN_CIPHER_SUITE_CCMP:
case WLAN_CIPHER_SUITE_GCMP:
case WLAN_CIPHER_SUITE_GCMP_256:
@@ -785,11 +776,7 @@ iwl_mld_resume_keys_iter(struct ieee80211_hw *hw,
&wowlan_status->bigtk[status_idx]);
}
break;
- default:
- data->unhandled_cipher = true;
- return;
}
- data->num_keys++;
}
static void
@@ -922,15 +909,10 @@ iwl_mld_update_sec_keys(struct iwl_mld *mld,
ieee80211_iter_keys(mld->hw, vif, iwl_mld_resume_keys_iter,
&key_iter_data);
- if (key_iter_data.unhandled_cipher)
- return false;
-
- IWL_DEBUG_WOWLAN(mld,
- "Number of installed keys: %d, Number of rekeys: %d\n",
- key_iter_data.num_keys,
+ IWL_DEBUG_WOWLAN(mld, "Number of rekeys: %d\n",
wowlan_status->num_of_gtk_rekeys);
- if (!key_iter_data.num_keys || !wowlan_status->num_of_gtk_rekeys)
+ if (!wowlan_status->num_of_gtk_rekeys)
return true;
iwl_mld_add_all_rekeys(mld, vif, wowlan_status,