From 3f22837d88908c89bc6e5404a987a2a0d78020cf Mon Sep 17 00:00:00 2001 From: luis_pereira87 <lpereira@allbesmart.pt> Date: Tue, 19 Dec 2023 07:45:44 +0000 Subject: [PATCH] Fix gNB RA procedures when Msg4 Ack not received When the gNB does not receive PUCCH with Ack for Msg4 we have to consider Msg4 received by the UE, so we need to apply the CellGroupConfig sent to the UE. There are two scenarios: 1 - The UE never decoded PDSCH for Msg4, the RA will fail because RA Contention Resolution timer, the UE will come with a new RA with new RRCSetupRequest 2 - The UE decoded PDSCH for Msg4, and if SR does not work and no resources for PUSCH, it will trigger RA with MAC CE C-RNTI in Msg3 (so, gNB must be ready for it) --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 04a374a4f6..369e61de81 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1885,18 +1885,17 @@ static void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, s if (harq->is_waiting == 0) { if (harq->round == 0) { - if (UE->Msg4_ACKed) { LOG_A(NR_MAC, "(UE RNTI 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", ra->rnti); UE->ra_timer = 0; - - // Pause scheduling according to: - // 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs - nr_mac_enable_ue_rrc_processing_timer(RC.nrmac[module_id], UE, false); } else { LOG_I(NR_MAC, "%4d.%2d UE %04x: RA Procedure failed at Msg4!\n", frame, slot, ra->rnti); } + // Pause scheduling according to: + // 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs + nr_mac_enable_ue_rrc_processing_timer(RC.nrmac[module_id], UE, false); + nr_clear_ra_proc(module_id, CC_id, frame, ra); if (sched_ctrl->retrans_dl_harq.head >= 0) { remove_nr_list(&sched_ctrl->retrans_dl_harq, current_harq_pid); -- 2.26.2