From df305f40ab96b8a467a91e38327e80ec93c54e4d Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Wed, 10 Jan 2024 23:12:39 +0530 Subject: [PATCH] [nrf fromtree] wifi: shell: Fix missing case sensitivity This was missed in earlier that tried to fix all string comparisons to use case insensitive comparison. Signed-off-by: Chaitanya Tata (cherry picked from commit 2ce295b71e396f5305d39d819ada2fb179128748) --- subsys/net/l2/wifi/wifi_shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/net/l2/wifi/wifi_shell.c b/subsys/net/l2/wifi/wifi_shell.c index 4f378a5029b..450b7b00eb5 100644 --- a/subsys/net/l2/wifi/wifi_shell.c +++ b/subsys/net/l2/wifi/wifi_shell.c @@ -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);