Skip to content

Commit

Permalink
net: l2: wifi: fix AP sets band failed with channel 0
Browse files Browse the repository at this point in the history
Should support setting band for both STA and SAP mode.

Signed-off-by: Maochen Wang <[email protected]>
  • Loading branch information
MaochenWang1 authored and carlescufi committed Oct 17, 2024
1 parent 829c03b commit 4af697a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subsys/net/l2/wifi/wifi_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,8 @@ static int __wifi_args_to_params(const struct shell *sh, size_t argc, char *argv
params->channel = channel;
break;
case 'b':
if (iface_mode == WIFI_MODE_INFRA) {
if (iface_mode == WIFI_MODE_INFRA ||
iface_mode == WIFI_MODE_AP) {
switch (atoi(state->optarg)) {
case 2:
params->band = WIFI_FREQ_BAND_2_4_GHZ;
Expand Down

0 comments on commit 4af697a

Please sign in to comment.