Hi, Wi-Fi 6GHz policy by WFA, H2E is enforced for SAE. As a result, it should override sae_pwe configuration if 6GHz BSS is about to be connected. Thank you for your time and consideration. Best regards, Jimmy
From f0844bd17aa289c19378929ea6e9553fa21e77a2 Mon Sep 17 00:00:00 2001 From: Jimmy Chen <jimmycmchen@xxxxxxxxxx> Date: Tue, 13 Apr 2021 14:55:52 +0800 Subject: [PATCH] wifi: enfoce H2E for 6Ghz BSS Signed-off-by: Jimmy Chen <jimmycmchen@xxxxxxxxxx> --- wpa_supplicant/ctrl_iface.c | 2 ++ wpa_supplicant/wpa_supplicant.c | 10 ++++++++++ wpa_supplicant/wpa_supplicant_i.h | 1 + 3 files changed, 13 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index bf83e4168..f9e97c145 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -829,6 +829,8 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s, wpa_s->sae_commit_override = wpabuf_parse_bin(value); } else if (os_strcasecmp(cmd, "driver_signal_override") == 0) { ret = wpas_ctrl_iface_set_dso(wpa_s, value); + } else if (os_strcasecmp(cmd, "force_hunting_and_pecking_pwe") == 0) { + wpa_s->force_hunting_and_pecking_pwe = (atoi(value) != 0) ? 1 : 0; #ifdef CONFIG_DPP } else if (os_strcasecmp(cmd, "dpp_config_obj_override") == 0) { os_free(wpa_s->dpp_config_obj_override); diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 835b33575..af63c8ecc 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1663,6 +1663,16 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, sae_pwe = wpa_s->conf->sae_pwe; if (ssid->sae_password_id && sae_pwe != 3) sae_pwe = 1; + if (bss && is_6ghz_freq(bss->freq)) { + wpa_dbg(wpa_s, MSG_DEBUG, "WPA: force hash-to-element mode for 6GHz BSS."); + sae_pwe = 1; + } +#ifdef CONFIG_TESTING_OPTIONS + if (wpa_s->force_hunting_and_pecking_pwe) { + wpa_dbg(wpa_s, MSG_DEBUG, "WPA: force huting and pecking mode."); + sae_pwe = 0; + } +#endif wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_SAE_PWE, sae_pwe); #ifdef CONFIG_SAE_PK wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_SAE_PK, diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index 49007cfc2..3d12801bc 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -1236,6 +1236,7 @@ struct wpa_supplicant { unsigned int oci_freq_override_ft_assoc; unsigned int oci_freq_override_fils_assoc; unsigned int oci_freq_override_wnm_sleep; + int force_hunting_and_pecking_pwe; #endif /* CONFIG_TESTING_OPTIONS */ struct wmm_ac_assoc_data *wmm_ac_assoc_info; -- 2.31.1.295.g9ea45b61b8-goog
_______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap