]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
MLD STA: Use AP MLD address in PMKSA cache attempts for driver-SME case
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Sat, 24 Dec 2022 09:41:05 +0000 (15:11 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 31 Jan 2023 09:20:18 +0000 (11:20 +0200)
The previous implementation handles PMKSA cache attempts with AP MLD
address only for SME-in-wpa_supplicant cases since wpa_s->valid_links
wouldn't be set for SME-in-driver cases.

Fix SME-in-driver behavior by enabling PMKSA cache attempts with AP MLD
address when driver supports MLO and SME offload to driver.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
wpa_supplicant/wpa_supplicant.c

index 61aa55f81ea0a298421d814a02e7bd8e631c6cd0..3766e8b7cae6d3bd1e403bdad319dd51ba82cfbb 100644 (file)
@@ -3164,7 +3164,13 @@ static u8 * wpas_populate_assoc_ies(
                const u8 *cache_id = NULL;
                const u8 *addr = bss->bssid;
 
-               if (wpa_s->valid_links)
+               if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+                   (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO) &&
+                   !is_zero_ether_addr(bss->mld_addr))
+                       addr = bss->mld_addr;
+
+               if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+                   wpa_s->valid_links)
                        addr = wpa_s->ap_mld_addr;
 
                try_opportunistic = (ssid->proactive_key_caching < 0 ?