@@ -760,6 +760,27 @@ static int nrf_wifi_radio_test_set_rx_capture_length(size_t argc,
760
760
return 0 ;
761
761
}
762
762
763
+ static int nrf_wifi_radio_test_set_rx_capture_timeout (size_t argc ,
764
+ const char * argv []) {
765
+ char * ptr = NULL ;
766
+ unsigned short int val = 0 ;
767
+
768
+ val = strtoul (argv [1 ], & ptr , 10 );
769
+
770
+ if (val > CAPTURE_DURATION_IN_SEC ) {
771
+ RT_SHELL_PRINTF_ERROR ("'capture_timeout' has to be less than or equal to %d seconds\n" , CAPTURE_DURATION_IN_SEC );
772
+ return - ENOEXEC ;
773
+ }
774
+
775
+ if (!check_test_in_prog ()) {
776
+ return - ENOEXEC ;
777
+ }
778
+
779
+ ctx -> conf_params .capture_timeout = val ;
780
+
781
+ return 0 ;
782
+ }
783
+
763
784
static int nrf_wifi_radio_test_set_ru_tone (size_t argc , const char * argv []) {
764
785
char * ptr = NULL ;
765
786
unsigned long val = 0 ;
@@ -1055,6 +1076,14 @@ static int nrf_wifi_radio_test_rx_cap(size_t argc, const char *argv[]) {
1055
1076
goto out ;
1056
1077
}
1057
1078
1079
+ if (rx_cap_type == NRF_WIFI_RF_TEST_RX_DYN_PKT_CAP ) {
1080
+ if (!ctx -> conf_params .capture_timeout ) {
1081
+ RT_SHELL_PRINTF_ERROR ("%s: Invalid rx_capture_timeout %d\n" ,__func__ ,
1082
+ ctx -> conf_params .capture_timeout );
1083
+ goto out ;
1084
+ }
1085
+ }
1086
+
1058
1087
if (!check_test_in_prog ()) {
1059
1088
goto out ;
1060
1089
}
@@ -1445,6 +1474,7 @@ static int nrf_wifi_radio_test_show_cfg(size_t argc, const char *argv[]) {
1445
1474
1446
1475
RT_SHELL_PRINTF_INFO ("rx_capture_length = %d\n" , conf_params -> capture_length );
1447
1476
1477
+ RT_SHELL_PRINTF_INFO ("rx_capture_timeout = %d\n" , conf_params -> capture_timeout );
1448
1478
#if defined(CONFIG_BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP ) || \
1449
1479
defined(CONFIG_BOARD_NRF7002DK_NRF5340_CPUAPP )
1450
1480
RT_SHELL_PRINTF_INFO ("sr_ant_switch_ctrl = %d\n" ,
@@ -1652,6 +1682,7 @@ DEFINE_CMD_HANDLER(nrf_wifi_radio_test_sr_ant_switch_ctrl)
1652
1682
DEFINE_CMD_HANDLER (nrf_wifi_radio_test_set_rx_lna_gain )
1653
1683
DEFINE_CMD_HANDLER (nrf_wifi_radio_test_set_rx_bb_gain )
1654
1684
DEFINE_CMD_HANDLER (nrf_wifi_radio_test_set_rx_capture_length )
1685
+ DEFINE_CMD_HANDLER (nrf_wifi_radio_test_set_rx_capture_timeout )
1655
1686
DEFINE_CMD_HANDLER (nrf_wifi_radio_test_rx_cap )
1656
1687
DEFINE_CMD_HANDLER (nrf_wifi_radio_test_set_tx_tone_freq )
1657
1688
DEFINE_CMD_HANDLER (nrf_wifi_radio_test_tx_tone )
@@ -1791,6 +1822,11 @@ SHELL_STATIC_SUBCMD_SET_CREATE(
1791
1822
"Max allowed length is 16384 complex samples" ,
1792
1823
RTSH (nrf_wifi_radio_test_set_rx_capture_length ), 2 ,
1793
1824
0 ),
1825
+ SHELL_CMD_ARG (rx_capture_timeout , NULL ,
1826
+ "<val> - Wait time allowed in seconds\n"
1827
+ "Max timeout allowed is 600 seconds" ,
1828
+ RTSH (nrf_wifi_radio_test_set_rx_capture_timeout ), 2 ,
1829
+ 0 ),
1794
1830
SHELL_CMD_ARG (rx_cap , NULL ,
1795
1831
"0 = ADC capture\n"
1796
1832
"1 = Static packet capture\n"
0 commit comments