Skip to content

Commit

Permalink
[nrf fromtree] net: wifi_utils: Fix max channels allow for scan
Browse files Browse the repository at this point in the history
Fix the maximum channels allow for scan command
input.

Signed-off-by: Kapil Bhatt <[email protected]>
(cherry picked from commit 3e8dbaf)
  • Loading branch information
kapbh authored and rlubos committed Jan 19, 2024
1 parent 79858b9 commit 0b0b17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/l2/wifi/wifi_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ int wifi_utils_parse_scan_chan(char *scan_chan_str,
memset(chan_str, 0, sizeof(chan_str));

if (chan_start) {
if ((chan_idx + (chan_val - chan_start)) >= max_channels) {
if ((chan_idx + (chan_val - chan_start)) > max_channels) {
NET_ERR("Too many channels specified (%d)", max_channels);
return -EINVAL;
}
Expand Down

0 comments on commit 0b0b17e

Please sign in to comment.