@@ -848,7 +848,11 @@ static void rf_cca_timer_interrupt(void)
848
848
rf_flush_tx_fifo ();
849
849
tx_finnish_time = rf_get_timestamp ();
850
850
if (device_driver.phy_tx_done_cb ) {
851
- device_driver.phy_tx_done_cb (rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL, 0 , 0 );
851
+ if (rf_state == RF_RX_STARTED) {
852
+ device_driver.phy_tx_done_cb (rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL_RX, 0 , 0 );
853
+ } else {
854
+ device_driver.phy_tx_done_cb (rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL, 0 , 0 );
855
+ }
852
856
}
853
857
} else {
854
858
if (status == PHY_RESTART_CSMA) {
@@ -1143,7 +1147,7 @@ static void rf_irq_task_process_irq(void)
1143
1147
tx_finnish_time = rf_get_timestamp ();
1144
1148
rf_update_tx_active_time ();
1145
1149
TEST_TX_DONE
1146
- device_driver.phy_tx_done_cb (rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL , 1 , 0 );
1150
+ device_driver.phy_tx_done_cb (rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL_RX , 1 , 0 );
1147
1151
rf_send_command (S2LP_CMD_SABORT);
1148
1152
rf_poll_state_change (S2LP_STATE_READY);
1149
1153
rf_send_command (S2LP_CMD_FLUSHTXFIFO);
0 commit comments