Skip to content

Commit

Permalink
Merge pull request ARMmbed#2008 from ARMmbed/IOTTHD-3234
Browse files Browse the repository at this point in the history
MAC: Increase backoff exponent when retry count grows
  • Loading branch information
Jarkko Paso committed Mar 12, 2019
2 parents 274abdd + ae91f87 commit a0e893b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/MAC/IEEE802_15_4/mac_pd_sap.c
Expand Up @@ -355,6 +355,10 @@ static void mac_sap_no_ack_cb(protocol_interface_rf_mac_setup_s *rf_ptr)
rf_ptr->mac_cca_retry = 0;
rf_ptr->mac_tx_retry++; //Update retry counter
mac_csma_param_init(rf_ptr);
// Increase current backoff exponent when retry count grows
for (int retry_index = rf_ptr->mac_tx_retry; retry_index > 0; retry_index--) {
mac_csma_BE_update(rf_ptr);
}
rf_ptr->mac_tx_status.retry++;
/*Send retry using random interval*/
if (mcps_pd_data_rebuild(rf_ptr, rf_ptr->active_pd_data_request)) {
Expand Down

0 comments on commit a0e893b

Please sign in to comment.