From 37f8257c4f3ba9401e6dc95f3243a63c25adbb09 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 30 Jan 2023 23:07:21 +0200 Subject: [PATCH] SAE: Extend automatic enabling of H2E on 6 GHz to additional cases Commit 3a0edb2cd86e ("SAE: Enable H2E for 6 GHz BSS") started enabling H2E automatically for SAE use on the 6 GHz band, but it did not update these steps in verifying whether the STA has matching configuration for a BSS that mandates use of H2E and whether to use PT for SAE in SME. Update these to be aware of automatic H2E enabling. Signed-off-by: Jouni Malinen --- wpa_supplicant/events.c | 1 + wpa_supplicant/sme.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 6452a3bee..b06487805 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -981,6 +981,7 @@ static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, if (wpa_s->conf->sae_pwe == SAE_PWE_HUNT_AND_PECK && !ssid->sae_password_id && + !is_6ghz_freq(bss->freq) && wpa_key_mgmt_sae(ssid->key_mgmt)) { if (debug_print) wpa_dbg(wpa_s, MSG_DEBUG, diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index d04fb0d41..1fffebbdd 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -198,6 +198,9 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s, if (wpa_key_mgmt_sae_ext_key(key_mgmt) && wpa_s->conf->sae_pwe != SAE_PWE_FORCE_HUNT_AND_PECK) use_pt = 1; + if (bss && is_6ghz_freq(bss->freq) && + wpa_s->conf->sae_pwe != SAE_PWE_FORCE_HUNT_AND_PECK) + use_pt = 1; #ifdef CONFIG_SAE_PK if ((rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_PK)) && ssid->sae_pk != SAE_PK_MODE_DISABLED && -- 2.47.3