Skip to content

Commit

Permalink
modules: hostap: Add support for WPA Auto security
Browse files Browse the repository at this point in the history
Support WPA Auto security mode wherein supplicant can
implicitly choose the highest security among WPA, WPA2
and WPA3 for association with a network based on network support.

Fixes SHEL-1131.

Signed-off-by: Ravi Dondaputi <[email protected]>
  • Loading branch information
rado17 committed Apr 18, 2024
1 parent 0e8f2fd commit 0bea90b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/hostap/src/supp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,17 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s,
_wpa_cli_cmd_v("set_network %d proto WPA",
resp.network_id);
}
} else if (params->security == WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL) {
if (params->sae_password) {
_wpa_cli_cmd_v("set_network %d sae_password \"%s\"",
resp.network_id, params->sae_password);
}
_wpa_cli_cmd_v("set_network %d psk \"%s\"",
resp.network_id, params->psk);
_wpa_cli_cmd_v("set_network %d key_mgmt WPA-PSK WPA-PSK-SHA256 SAE",
resp.network_id);
_wpa_cli_cmd_v("set_network %d proto WPA RSN",
resp.network_id);
} else {
ret = -1;
wpa_printf(MSG_ERROR, "Unsupported security type: %d",
Expand Down

0 comments on commit 0bea90b

Please sign in to comment.