wifi: shell: Fix AP argument checks and help

AP enable takes the same parameters as connect, so, update the help and
also fix the optional parameter count when security is involved.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
Chaitanya Tata 2023-12-14 21:13:44 +05:30 committed by Carles Cufí
parent 4e37071f57
commit 9736cc7f29

View file

@ -1602,9 +1602,16 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_cmd_ap,
"Disable Access Point mode",
cmd_wifi_ap_disable,
1, 0),
SHELL_CMD_ARG(enable, NULL, "<SSID> [channel] [PSK]",
SHELL_CMD_ARG(enable, NULL,
"\"<SSID>\"\n"
"[channel number: 0 means all]\n"
"[PSK: valid only for secure SSIDs]\n"
"[Security type: valid only for secure SSIDs]\n"
"0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE, 4:WAPI, 5:EAP, 6:WEP, 7: WPA-PSK\n"
"[MFP (optional: needs security type to be specified)]\n"
": 0:Disable, 1:Optional, 2:Required",
cmd_wifi_ap_enable,
2, 1),
2, 4),
SHELL_SUBCMD_SET_END
);