File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -290,15 +290,22 @@ void mac_pd_sap_state_machine(protocol_interface_rf_mac_setup_s *rf_mac_setup)
290
290
291
291
static void mac_sap_cca_fail_cb (protocol_interface_rf_mac_setup_s * rf_ptr )
292
292
{
293
- rf_ptr -> macRfRadioTxActive = false;
294
- if ( rf_ptr -> mac_cca_retry > rf_ptr -> macMaxCSMABackoffs || (rf_ptr -> active_pd_data_request && rf_ptr -> active_pd_data_request -> asynch_request ) ) {
295
- //Send MAC_CCA_FAIL
296
- mac_tx_done_state_set ( rf_ptr , MAC_CCA_FAIL );
293
+ if ( rf_ptr -> mac_ack_tx_active ) {
294
+ if (rf_ptr -> active_pd_data_request ) {
295
+ mac_csma_backoff_start ( rf_ptr );
296
+ }
297
297
} else {
298
- timer_mac_stop (rf_ptr );
299
- mac_csma_BE_update (rf_ptr );
300
- if (mcps_pd_data_rebuild (rf_ptr , rf_ptr -> active_pd_data_request ) ) {
298
+
299
+ rf_ptr -> macRfRadioTxActive = false;
300
+ if (rf_ptr -> mac_cca_retry > rf_ptr -> macMaxCSMABackoffs || (rf_ptr -> active_pd_data_request && rf_ptr -> active_pd_data_request -> asynch_request )) {
301
+ //Send MAC_CCA_FAIL
301
302
mac_tx_done_state_set (rf_ptr , MAC_CCA_FAIL );
303
+ } else {
304
+ timer_mac_stop (rf_ptr );
305
+ mac_csma_BE_update (rf_ptr );
306
+ if (mcps_pd_data_rebuild (rf_ptr , rf_ptr -> active_pd_data_request ) ) {
307
+ mac_tx_done_state_set (rf_ptr , MAC_CCA_FAIL );
308
+ }
302
309
}
303
310
}
304
311
}
You can’t perform that action at this time.
0 commit comments