mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhao Li <enderaoelyther@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Benjamin Berg <benjamin.berg@intel.com>,
	linux-kernel@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>,
	Zhao Li <enderaoelyther@gmail.com>
Subject: [PATCH wireless] wifi: wil6210: restore the GTK as a group key after recovery
Date: Sat,  7 Nov 2026 21:50:30 +0800	[thread overview]
Message-ID: <20261107135030.10329-1-enderaoelyther@gmail.com> (raw)

AP recovery fails to reinstall the saved GTK because the key-type
conversion changed the former false pairwise argument into
NL80211_KEYTYPE_PAIRWISE. With no peer address, the pairwise path finds
no station and returns -EINVAL, or, if the AP advertises FT, sends the
GTK to the firmware as a pairwise key.

Pass NL80211_KEYTYPE_GROUP so AP recovery selects WMI_KEY_USE_TX_GROUP and
reinstalls the saved group key through wmi_add_cipher_key().

AI assistance was used.

Fixes: 3191dfbf0779 ("wifi: cfg80211: add Control Integrity Protocol (CIP) APIs")
Signed-off-by: Zhao Li <enderaoelyther@gmail.com>
---
Compile-tested only; no new W=1 GCC/Clang, sparse or smatch warnings.

 drivers/net/wireless/ath/wil6210/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index bf060281c9a2..2563073b4766 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -2075,7 +2075,7 @@ void wil_cfg80211_ap_recovery(struct wil6210_priv *wil)
 		key_params.seq_len = IEEE80211_GCMP_PN_LEN;
 		rc = wil_cfg80211_add_key(wiphy, vif_to_wdev(vif), -1,
 					  vif->gtk_index,
-					  NL80211_KEYTYPE_PAIRWISE,
+					  NL80211_KEYTYPE_GROUP,
 					  NULL, &key_params);
 		if (rc)
 			wil_err(wil, "vif %d recovery add key failed (%d)\n",

base-commit: 6b4b543fa18757297ac756a6fe6e64f506b7844a
-- 
2.56.0


                 reply	other threads:[~2026-11-07 13:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261107135030.10329-1-enderaoelyther@gmail.com \
    --to=enderaoelyther@gmail.com \
    --cc=benjamin.berg@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®