File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -507,7 +507,14 @@ static int8_t mac_data_interface_tx_done_cb(protocol_interface_rf_mac_setup_s *r
507507 }
508508 }
509509VALIDATE_TX_TIME :
510- // TODO: Validate TX time here
510+ if (rf_ptr -> active_pd_data_request && rf_ptr -> active_pd_data_request -> tx_time && !rf_ptr -> mac_ack_tx_active && !rf_ptr -> mac_edfe_tx_active ) {
511+ int32_t tx_time_error_us = mac_mcps_sap_get_phy_timestamp (rf_ptr ) - rf_ptr -> active_pd_data_request -> tx_time ;
512+ // Positive error means that TX is too late. Do not allow transmit if transmission is delayed over 5ms
513+ if (tx_time_error_us > 5000 ) {
514+ mac_sap_cca_fail_cb (rf_ptr , 0xffff );
515+ return PHY_TX_NOT_ALLOWED ;
516+ }
517+ }
511518#ifdef TIMING_TOOL_TRACES
512519 tr_info ("%u TX_start %u" , mac_mcps_sap_get_phy_timestamp (rf_ptr ), rf_ptr -> mac_channel );
513520#endif
You can’t perform that action at this time.
0 commit comments