From: Jouni Malinen Date: Mon, 30 Jan 2023 21:07:21 +0000 (+0200) Subject: SAE: Extend automatic enabling of H2E on 6 GHz to additional cases X-Git-Tag: hostap_2_11~1329 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37f8257c4f3ba9401e6dc95f3243a63c25adbb09;p=thirdparty%2Fhostap.git 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 --- 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 &&