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 <spiriou31@gmail.com>
This commit is contained in:
Simon Piriou 2025-07-05 12:18:07 +02:00 committed by Daniel DeGrasse
parent 503011d0a2
commit 732a3a5c66

View File

@ -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;
}