Skip to content

Commit

Permalink
hostap: Fix wrong security printing about WPA3 PWE
Browse files Browse the repository at this point in the history
'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 <maochen.wang@nxp.com>
  • Loading branch information
MaochenWang1 authored and kartben committed Jan 14, 2025
1 parent 74bbbdc commit 263ddc2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/hostap/src/supp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 263ddc2

Please sign in to comment.