Skip to content

Commit 4af697a

Browse files
MaochenWang1carlescufi
authored andcommitted
net: l2: wifi: fix AP sets band failed with channel 0
Should support setting band for both STA and SAP mode. Signed-off-by: Maochen Wang <[email protected]>
1 parent 829c03b commit 4af697a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,8 @@ static int __wifi_args_to_params(const struct shell *sh, size_t argc, char *argv
587587
params->channel = channel;
588588
break;
589589
case 'b':
590-
if (iface_mode == WIFI_MODE_INFRA) {
590+
if (iface_mode == WIFI_MODE_INFRA ||
591+
iface_mode == WIFI_MODE_AP) {
591592
switch (atoi(state->optarg)) {
592593
case 2:
593594
params->band = WIFI_FREQ_BAND_2_4_GHZ;

0 commit comments

Comments
 (0)