Skip to content

Commit

Permalink
[nrf fromtree] wifi: shell: Fix missing case sensitivity
Browse files Browse the repository at this point in the history
This was missed in earlier that tried to fix all string comparisons to
use case insensitive comparison.

Signed-off-by: Chaitanya Tata <[email protected]>
(cherry picked from commit 2ce295b)
  • Loading branch information
krish2718 committed Jan 17, 2024
1 parent 0dece4c commit df305f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subsys/net/l2/wifi/wifi_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,9 @@ static int wifi_scan_args_to_params(const struct shell *sh,
state = getopt_state_get();
switch (opt) {
case 't':
if (!strcmp(optarg, "passive")) {
if (!strncasecmp(optarg, "passive", 7)) {
params->scan_type = WIFI_SCAN_TYPE_PASSIVE;
} else if (!strcmp(optarg, "active")) {
} else if (!strncasecmp(optarg, "active", 6)) {
params->scan_type = WIFI_SCAN_TYPE_ACTIVE;
} else {
shell_fprintf(sh, SHELL_ERROR, "Invalid scan type %s\n", optarg);
Expand Down

0 comments on commit df305f4

Please sign in to comment.