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