From 263ddc236a9a185439110110910ac567010e3596 Mon Sep 17 00:00:00 2001 From: Maochen Wang Date: Mon, 13 Jan 2025 11:06:39 +0800 Subject: [PATCH] hostap: Fix wrong security printing about WPA3 PWE 'wifi status' CMD shows wrong security information when STA connects to Ext-AP with WIFI_SECURITY_TYPE_SAE_HNP, after connection using WIFI_SECURITY_TYPE_SAE_AUTO. Setting sae_pwe for all the WPA3 SAE types can fix this issue. Signed-off-by: Maochen Wang --- modules/hostap/src/supp_api.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/hostap/src/supp_api.c b/modules/hostap/src/supp_api.c index 1bd8edb857c8..0469f3f952c4 100644 --- a/modules/hostap/src/supp_api.c +++ b/modules/hostap/src/supp_api.c @@ -1045,14 +1045,14 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s, } } - if (params->security == WIFI_SECURITY_TYPE_SAE_H2E || - params->security == WIFI_SECURITY_TYPE_SAE_AUTO) { - if (!wpa_cli_cmd_v("set sae_pwe %d", - (params->security == WIFI_SECURITY_TYPE_SAE_H2E) - ? 1 - : 2)) { - goto out; - } + + if (!wpa_cli_cmd_v("set sae_pwe %d", + (params->security == WIFI_SECURITY_TYPE_SAE_H2E) + ? 1 + : ((params->security == WIFI_SECURITY_TYPE_SAE_AUTO) + ? 2 + : 0))) { + goto out; } if (!wpa_cli_cmd_v("set_network %d key_mgmt SAE%s", resp.network_id,