Skip to content

Commit

Permalink
MAC stabilisation fixes (ARMmbed#2591)
Browse files Browse the repository at this point in the history
* Do not reset CCA count in "no Ack"

* Do not stop TX poll timer
  • Loading branch information
Jarkko Paso authored Mar 12, 2021
1 parent e936a26 commit 70743a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions source/MAC/IEEE802_15_4/mac_pd_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ static void mac_sap_no_ack_cb(protocol_interface_rf_mac_setup_s *rf_ptr)
#endif
rf_ptr->macRfRadioTxActive = false;
if (rf_ptr->mac_tx_retry < rf_ptr->mac_mlme_retry_max) {
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
Expand Down
6 changes: 1 addition & 5 deletions source/Service_Libs/fhss/fhss_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,9 +1029,7 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
return 0;
}
platform_enter_critical();
if (fhss_structure->ws->broadcast_timer_running == false) {
eventOS_callback_timer_stop(fhss_structure->fhss_event_timer);
}

uint16_t own_bc_slot = fhss_structure->ws->bc_slot;
uint32_t prev_synchronization_time = fhss_structure->ws->synchronization_time;
fhss_structure->ws->synchronization_time = fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api);
Expand Down Expand Up @@ -1143,8 +1141,6 @@ int fhss_ws_configuration_set(fhss_structure_t *fhss_structure, const fhss_ws_co
// No one would poll TX queue if schedule timers were not started. Start poll timer with 10ms (200*50us) interval.
if ((fhss_structure->ws->unicast_timer_running == false) && (fhss_structure->ws->broadcast_timer_running == false)) {
eventOS_callback_timer_start(fhss_structure->fhss_event_timer, 200);
} else {
eventOS_callback_timer_stop(fhss_structure->fhss_event_timer);
}

fhss_structure->number_of_channels = fhss_configuration->channel_mask_size;
Expand Down

0 comments on commit 70743a1

Please sign in to comment.