Skip to content

Commit 263ddc2

Browse files
MaochenWang1kartben
authored andcommitted
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 <[email protected]>
1 parent 74bbbdc commit 263ddc2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/hostap/src/supp_api.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,14 +1045,14 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s,
10451045
}
10461046
}
10471047

1048-
if (params->security == WIFI_SECURITY_TYPE_SAE_H2E ||
1049-
params->security == WIFI_SECURITY_TYPE_SAE_AUTO) {
1050-
if (!wpa_cli_cmd_v("set sae_pwe %d",
1051-
(params->security == WIFI_SECURITY_TYPE_SAE_H2E)
1052-
? 1
1053-
: 2)) {
1054-
goto out;
1055-
}
1048+
1049+
if (!wpa_cli_cmd_v("set sae_pwe %d",
1050+
(params->security == WIFI_SECURITY_TYPE_SAE_H2E)
1051+
? 1
1052+
: ((params->security == WIFI_SECURITY_TYPE_SAE_AUTO)
1053+
? 2
1054+
: 0))) {
1055+
goto out;
10561056
}
10571057

10581058
if (!wpa_cli_cmd_v("set_network %d key_mgmt SAE%s", resp.network_id,

0 commit comments

Comments
 (0)