diff --git a/samples/wifi/radio_test/src/nrf_wifi_radio_test_shell.c b/samples/wifi/radio_test/src/nrf_wifi_radio_test_shell.c index a7ac1adcbc1f..70a8e51520fc 100644 --- a/samples/wifi/radio_test/src/nrf_wifi_radio_test_shell.c +++ b/samples/wifi/radio_test/src/nrf_wifi_radio_test_shell.c @@ -1617,27 +1617,12 @@ static int nrf_wifi_radio_get_temperature(const struct shell *shell, const char *argv[]) { enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; - char *ptr = NULL; - unsigned long val = 0; int ret = -ENOEXEC; - val = strtoul(argv[1], &ptr, 10); - - if (val > 1) { - shell_fprintf(shell, - SHELL_ERROR, - "Invalid value %lu\n", - val); - shell_help(shell); + if (!check_test_in_prog(shell)) { goto out; } - if (val == 1) { - if (!check_test_in_prog(shell)) { - goto out; - } - } - ctx->rf_test_run = true; ctx->rf_test = NRF_WIFI_RF_TEST_GET_TEMPERATURE; @@ -1664,27 +1649,12 @@ static int nrf_wifi_radio_get_rf_rssi(const struct shell *shell, const char *argv[]) { enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL; - char *ptr = NULL; - unsigned long val = 0; int ret = -ENOEXEC; - val = strtoul(argv[1], &ptr, 10); - - if (val > 1) { - shell_fprintf(shell, - SHELL_ERROR, - "Invalid value %lu\n", - val); - shell_help(shell); + if (!check_test_in_prog(shell)) { goto out; } - if (val == 1) { - if (!check_test_in_prog(shell)) { - goto out; - } - } - ctx->rf_test_run = true; ctx->rf_test = NRF_WIFI_RF_TEST_RF_RSSI;