From b69fb5bd74ef2d64fcdea38cc932bdb1ea3959fa Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Wed, 29 Mar 2023 19:33:42 +0100 Subject: [PATCH] Do not send TA command when rrc_processing_timer is active --- openair2/LAYER2/NR_MAC_gNB/config.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 38ae19c72a..87789e8c8a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -455,6 +455,12 @@ int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_S sched_ctrl->rrc_processing_timer = (rrc_reconfiguration_delay<rnti, rrc_reconfiguration_delay); + // it might happen that timing advance command should be sent during the RRC + // processing timer. To prevent this, set a variable as if we would have just + // sent it. This way, another TA command will for sure be sent in some + // frames, after RRC processing timer. + sched_ctrl->ta_frame = (RC.nrmac[Mod_idP]->frame - 1 + 1024) % 1024; + return 0; }