]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mld: don't validate keys state on resume
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 21 Aug 2025 17:47:26 +0000 (20:47 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 26 Aug 2025 15:39:45 +0000 (18:39 +0300)
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
drivers/net/wireless/intel/iwlwifi/mld/d3.c

index b27b874b3e84c3d5a5dd6c315988df7c02aa1b4f..6a32aa22ffb88589de8ba070725d593f022ec90a 100644 (file)
@@ -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,