Skip to content

Commit ae91f87

Browse files
author
Jarkko Paso
committed
MAC: Increase backoff exponent when retry count grows
1 parent bba1105 commit ae91f87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/MAC/IEEE802_15_4/mac_pd_sap.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,10 @@ static void mac_sap_no_ack_cb(protocol_interface_rf_mac_setup_s *rf_ptr)
355355
rf_ptr->mac_cca_retry = 0;
356356
rf_ptr->mac_tx_retry++; //Update retry counter
357357
mac_csma_param_init(rf_ptr);
358+
// Increase current backoff exponent when retry count grows
359+
for (int retry_index = rf_ptr->mac_tx_retry; retry_index > 0; retry_index--) {
360+
mac_csma_BE_update(rf_ptr);
361+
}
358362
rf_ptr->mac_tx_status.retry++;
359363
/*Send retry using random interval*/
360364
if (mcps_pd_data_rebuild(rf_ptr, rf_ptr->active_pd_data_request)) {

0 commit comments

Comments
 (0)