]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: mld: call iwl_mld_free_ap_early_key() for AP only
authorAvraham Stern <avraham.stern@intel.com>
Tue, 12 May 2026 19:34:31 +0000 (22:34 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 26 May 2026 12:17:11 +0000 (15:17 +0300)
The driver supports intalling IGTK on a NAN device interface. When
the IGTK is removed, iwl_mld_free_ap_early_key() is called which
results in a warning since no links are attached to this interface.
The iwl_mld_free_ap_early_key() function should be called for AP or
IBSS interfaces only. Check the interface type before calling it.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20260512222731.d67d658b421d.Ife2d1f3b17119ce696582ce6a2a69026d368d8af@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c

index 4315b1b2b36bcb4a51e1735d4fa083c00d4f81bd..41bc47e4e00c4764b1b76c073f26187056bcf5be 100644 (file)
@@ -2227,7 +2227,9 @@ static void iwl_mld_set_key_remove(struct iwl_mld *mld,
        }
 
        /* if this key was stored to be added later to the FW - free it here */
-       if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+       if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE) &&
+           (vif->type == NL80211_IFTYPE_AP ||
+            vif->type == NL80211_IFTYPE_ADHOC))
                iwl_mld_free_ap_early_key(mld, key, mld_vif);
 
        /* We already removed it */