Skip to content

Commit b48a39e

Browse files
Loic PoulainUlrich Hecht
authored andcommitted
wifi: ath10k: Fix connection after GTK rekeying
[ Upstream commit 487e8a8c3421df0af3707e54c7e069f1d89cbda7 ] It appears that not all hardware/firmware implementations support group key deletion correctly, which can lead to connection hangs and deauthentication following GTK rekeying (delete and install). To avoid this issue, instead of attempting to delete the key using the special WMI_CIPHER_NONE value, we now replace the key with an invalid (random) value. This behavior has been observed with WCN39xx chipsets. Tested-on: WCN3990 hw1.0 WLAN.HL.3.3.7.c2-00931-QCAHLSWMTPLZ-1 Reported-by: Alexey Klimov <alexey.klimov@linaro.org> Closes: https://lore.kernel.org/all/DAWJQ2NIKY28.1XOG35E4A682G@linaro.org Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Tested-by: Alexey Klimov <alexey.klimov@linaro.org> # QRB2210 RB1 Link: https://patch.msgid.link/20250902143225.837487-1-loic.poulain@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org> [uli: backport to 4.19] Signed-off-by: Ulrich Hecht <uli@kernel.org> Reviewed-by: Pavel Machek <pavel@nabladev.com>
1 parent 43fd6b4 commit b48a39e

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • drivers/net/wireless/ath/ath10k

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <net/mac80211.h>
2323
#include <linux/etherdevice.h>
2424
#include <linux/acpi.h>
25+
#include <linux/random.h>
2526

2627
#include "hif.h"
2728
#include "core.h"
@@ -268,8 +269,15 @@ static int ath10k_send_key(struct ath10k_vif *arvif,
268269
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
269270

270271
if (cmd == DISABLE_KEY) {
271-
arg.key_cipher = WMI_CIPHER_NONE;
272-
arg.key_data = NULL;
272+
if (flags & WMI_KEY_GROUP) {
273+
/* Not all hardware handles group-key deletion operation
274+
* correctly. Replace the key with a junk value to invalidate it.
275+
*/
276+
get_random_bytes(key->key, key->keylen);
277+
} else {
278+
arg.key_cipher = WMI_CIPHER_NONE;
279+
arg.key_data = NULL;
280+
}
273281
}
274282

275283
return ath10k_wmi_vdev_install_key(arvif->ar, &arg);

0 commit comments

Comments
 (0)