From 732a3a5c66553969ea01bacec19e2820b9d6b2e2 Mon Sep 17 00:00:00 2001 From: Simon Piriou Date: Sat, 5 Jul 2025 12:18:07 +0200 Subject: [PATCH] net: l2: ieee802154: shell: fix scan argc validation Bump the argc check from 3 to 4 as the shell scan command has 3 required parameters, the last being the scan duration: - argv[0] - passive|active - channels - per-channel duration in ms Signed-off-by: Simon Piriou --- subsys/net/l2/ieee802154/ieee802154_shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/net/l2/ieee802154/ieee802154_shell.c b/subsys/net/l2/ieee802154/ieee802154_shell.c index 777e7c6e46f..4369b3034f6 100644 --- a/subsys/net/l2/ieee802154/ieee802154_shell.c +++ b/subsys/net/l2/ieee802154/ieee802154_shell.c @@ -227,7 +227,7 @@ static int cmd_ieee802154_scan(const struct shell *sh, uint64_t scan_type; int ret = 0; - if (argc < 3) { + if (argc < 4) { shell_help(sh); return -ENOEXEC; }