wifi: wlcore: Add support for IGTK key

This change re-applies commit 2b7aadd3b9 ("wlcore: Adding suppoprt for IGTK key in
wlcore driver") (sic), but only enables WLAN_CIPHER_SUITE_AES_CMAC with modern
firmware. This patch is required to support WPA3 connections.

Signed-off-by: Peter Åstrand <astrand@lysator.liu.se>
Link: https://patch.msgid.link/0d3df7ab-6c41-c3cc-83cc-5ba55fe4e4bd@lysator.liu.se
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Peter Åstrand 2026-01-16 18:58:58 +01:00 committed by Johannes Berg
parent 0acd76b728
commit c34dbc5900
2 changed files with 10 additions and 0 deletions

View File

@ -455,6 +455,7 @@ enum wl1271_cmd_key_type {
KEY_TKIP = 2,
KEY_AES = 3,
KEY_GEM = 4,
KEY_IGTK = 5,
};
struct wl1271_cmd_set_keys {

View File

@ -2419,6 +2419,11 @@ static int wl12xx_init_fw(struct wl1271 *wl)
strscpy(wiphy->fw_version, wl->chip.fw_ver_str,
sizeof(wiphy->fw_version));
/* WLAN_CIPHER_SUITE_AES_CMAC must be last in cipher_suites;
support only with firmware 8.9.1 and newer */
if (wl->chip.fw_ver[FW_VER_MAJOR] < 1)
wl->hw->wiphy->n_cipher_suites--;
/*
* Now we know if 11a is supported (info from the NVS), so disable
* 11a channels if not supported
@ -3585,6 +3590,9 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
case WL1271_CIPHER_SUITE_GEM:
key_type = KEY_GEM;
break;
case WLAN_CIPHER_SUITE_AES_CMAC:
key_type = KEY_IGTK;
break;
default:
wl1271_error("Unknown key algo 0x%x", key_conf->cipher);
@ -6196,6 +6204,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
WLAN_CIPHER_SUITE_TKIP,
WLAN_CIPHER_SUITE_CCMP,
WL1271_CIPHER_SUITE_GEM,
WLAN_CIPHER_SUITE_AES_CMAC,
};
/* The tx descriptor buffer */