Skip to content

Commit 70743a1

Browse files
author
Jarkko Paso
authored
MAC stabilisation fixes (#2591)
* Do not reset CCA count in "no Ack" * Do not stop TX poll timer
1 parent e936a26 commit 70743a1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

source/MAC/IEEE802_15_4/mac_pd_sap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ static void mac_sap_no_ack_cb(protocol_interface_rf_mac_setup_s *rf_ptr)
385385
#endif
386386
rf_ptr->macRfRadioTxActive = false;
387387
if (rf_ptr->mac_tx_retry < rf_ptr->mac_mlme_retry_max) {
388+
rf_ptr->mac_cca_retry = 0;
388389
rf_ptr->mac_tx_retry++; //Update retry counter
389390
mac_csma_param_init(rf_ptr);
390391
// Increase current backoff exponent when retry count grows

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,9 +1029,7 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
10291029
return 0;
10301030
}
10311031
platform_enter_critical();
1032-
if (fhss_structure->ws->broadcast_timer_running == false) {
1033-
eventOS_callback_timer_stop(fhss_structure->fhss_event_timer);
1034-
}
1032+
10351033
uint16_t own_bc_slot = fhss_structure->ws->bc_slot;
10361034
uint32_t prev_synchronization_time = fhss_structure->ws->synchronization_time;
10371035
fhss_structure->ws->synchronization_time = fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api);
@@ -1143,8 +1141,6 @@ int fhss_ws_configuration_set(fhss_structure_t *fhss_structure, const fhss_ws_co
11431141
// No one would poll TX queue if schedule timers were not started. Start poll timer with 10ms (200*50us) interval.
11441142
if ((fhss_structure->ws->unicast_timer_running == false) && (fhss_structure->ws->broadcast_timer_running == false)) {
11451143
eventOS_callback_timer_start(fhss_structure->fhss_event_timer, 200);
1146-
} else {
1147-
eventOS_callback_timer_stop(fhss_structure->fhss_event_timer);
11481144
}
11491145

11501146
fhss_structure->number_of_channels = fhss_configuration->channel_mask_size;

0 commit comments

Comments
 (0)