From 953a5ed33ee6863177092370ac311600883a37af Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 17 Apr 2025 11:59:55 +0200 Subject: [PATCH] Trigger release request on RA timeout only once Checking for < 0 makes the contention resolution timer trigger on each iteration once it is < 0. Instead, use == 0, which will trigger only once. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 0c5a2c759c..edddd535b0 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -2262,7 +2262,7 @@ void nr_schedule_RA(module_id_t module_idP, // Check RA Contention Resolution timer (TODO check this procedure) if (ra->ra_type == RA_4_STEP && ra->ra_state > nrRA_WAIT_Msg3) { ra->contention_resolution_timer--; - if (ra->contention_resolution_timer < 0) { + if (ra->contention_resolution_timer == 0) { LOG_W(NR_MAC, "(%d.%d) RA Contention Resolution timer expired for UE 0x%04x, RA procedure failed...\n", frameP, slotP, UE->rnti); bool requested = nr_mac_request_release_ue(mac, UE->rnti); if (!requested)