Skip to content

Commit 4a1847e

Browse files
krish2718carlescufi
authored andcommitted
wifi: shell: Make channel mandatory for AP
For starting an AP mode, channel is mandatory, so, fix the arguments and the help text. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 2a8b256 commit 4a1847e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static int __wifi_args_to_params(size_t argc, char *argv[],
463463
return -EINVAL;
464464
}
465465

466-
/* Channel (optional) */
466+
/* Channel (optional: STA, mandatory: AP) */
467467
if ((idx < argc) && (strlen(argv[idx]) <= 3)) {
468468
params->channel = strtol(argv[idx], &endptr, 10);
469469
if (*endptr != '\0') {
@@ -1782,14 +1782,14 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_cmd_ap,
17821782
1, 0),
17831783
SHELL_CMD_ARG(enable, NULL,
17841784
"\"<SSID>\"\n"
1785-
"[channel number: 0 means all]\n"
1785+
"<channel number>\n"
17861786
"[PSK: valid only for secure SSIDs]\n"
17871787
"[Security type: valid only for secure SSIDs]\n"
17881788
"0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE, 4:WAPI, 5:EAP, 6:WEP, 7: WPA-PSK\n"
17891789
"[MFP (optional: needs security type to be specified)]\n"
17901790
": 0:Disable, 1:Optional, 2:Required.\n",
17911791
cmd_wifi_ap_enable,
1792-
2, 4),
1792+
3, 3),
17931793
SHELL_CMD_ARG(stations, NULL,
17941794
"List stations connected to the AP",
17951795
cmd_wifi_ap_stations,

0 commit comments

Comments
 (0)