Skip to content

Commit 2bc4d2c

Browse files
rado17cvinayak
authored andcommitted
[nrf fromlist] wifi: shell: Support WPA auto personal security mode
Applications need to run a scan to identify the security mode before attempting the connection which adds to the time taken for connection to be established. To avoid the initial scan, support auto security mode which will enable STA to choose between WPA, WPA2 and WPA3, based on the network configuration. Upstream PR: zephyrproject-rtos/zephyr#71044 Signed-off-by: Ravi Dondaputi <[email protected]>
1 parent d69fb6b commit 2bc4d2c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

include/zephyr/net/wifi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ enum wifi_security_type {
4949
WIFI_SECURITY_TYPE_WEP,
5050
/** WPA-PSK security. */
5151
WIFI_SECURITY_TYPE_WPA_PSK,
52+
/** WPA/WPA2/WPA3 PSK security. */
53+
WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL,
5254

5355
__WIFI_SECURITY_TYPE_AFTER_LAST,
5456
WIFI_SECURITY_TYPE_MAX = __WIFI_SECURITY_TYPE_AFTER_LAST - 1,

subsys/net/l2/wifi/wifi_mgmt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ static int wifi_connect(uint32_t mgmt_request, struct net_if *iface,
275275
(params->ssid_length == 0U) ||
276276
((params->security == WIFI_SECURITY_TYPE_PSK ||
277277
params->security == WIFI_SECURITY_TYPE_WPA_PSK ||
278-
params->security == WIFI_SECURITY_TYPE_PSK_SHA256) &&
278+
params->security == WIFI_SECURITY_TYPE_PSK_SHA256 ||
279+
params->security == WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL) &&
279280
((params->psk_length < 8) || (params->psk_length > 64) ||
280281
(params->psk_length == 0U) || !params->psk)) ||
281282
((params->security == WIFI_SECURITY_TYPE_SAE) &&

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,8 +1868,9 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_commands,
18681868
"[-c --channel]: Channel that needs to be scanned for connection. 0:any channel.\n"
18691869
"[-b, --band] 0: any band (2:2.4GHz, 5:5GHz, 6:6GHz]\n"
18701870
"[-p, --psk]: Passphrase (valid only for secure SSIDs)\n"
1871-
"[-k, --key-mgmt]: Key Management type\n"
1872-
"0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE, 4:WAPI, 5:EAP, 6:WEP, 7: WPA-PSK\n"
1871+
"[-k, --key-mgmt]: Key Management type (valid only for secure SSIDs)\n"
1872+
"0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE, 4:WAPI, 5:EAP, 6:WEP,"
1873+
" 7: WPA-PSK, 8: WPA-Auto-Personal\n"
18731874
"[-w, --ieee-80211w]: MFP (optional: needs security type to be specified)\n"
18741875
": 0:Disable, 1:Optional, 2:Required.\n"
18751876
"[-m, --bssid]: MAC address of the AP (BSSID).\n"

0 commit comments

Comments
 (0)