From f7dfffe1d4517317108aef2d7a95e1223f67485b Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Wed, 20 Dec 2023 21:02:45 +0000 Subject: [PATCH] Delete ra_timer --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 1 - .../NR_MAC_gNB/gNB_scheduler_primitives.c | 22 ------------------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 1 - openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 1 - 4 files changed, 25 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index e1d63bc6d8..6c2174164e 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1884,7 +1884,6 @@ static void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, s 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; } else { LOG_I(NR_MAC, "%4d.%2d UE %04x: RA Procedure failed at Msg4!\n", frame, slot, ra->rnti); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 2022f46a5b..1e2719f70a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2401,10 +2401,6 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf /* Set default BWPs */ AssertFatal(UE->sc_info.n_ul_bwp <= NR_MAX_NUM_BWP, "uplinkBWP_ToAddModList has %d BWP!\n", UE->sc_info.n_ul_bwp); - if (get_softmodem_params()->phy_test == 0) { - UE->ra_timer = 12000 << UE->current_DL_BWP.scs; // 12000 ms is arbitrary and found to be a good timeout from experiments - } - /* get Number of HARQ processes for this UE */ // pdsch_servingcellconfig == NULL in SA -> will create default (8) number of HARQ processes create_dl_harq_list(sched_ctrl, &UE->sc_info); @@ -2959,24 +2955,6 @@ void nr_mac_update_timers(module_id_t module_id, if (sched_ctrl->rrc_processing_timer == 0) nr_mac_apply_cellgroup(mac, UE, frame, slot); } - - // RA timer - if (UE->ra_timer > 0) { - UE->ra_timer--; - if (UE->ra_timer == 0) { - const rnti_t rnti = UE->rnti; - LOG_W(NR_MAC, "Removing UE %04x because RA timer expired\n", rnti); - mac_remove_nr_ue(mac, rnti); - NR_COMMON_channels_t *cc = &mac->common_channels[0]; - for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { - if (cc->ra[i].rnti == rnti) { - nr_clear_ra_proc(module_id, 0, frame, &cc->ra[i]); - } - } - // don't skip a UE, current UE does not exist anymore - UE--; - } - } } } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index a812986d1f..5a83ceb268 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -765,7 +765,6 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP, nr_mac_reset_ul_failure(UE_scheduling_control); reset_dl_harq_list(UE_scheduling_control); reset_ul_harq_list(UE_scheduling_control); - UE_msg3_stage->ra_timer = 0; nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); process_CellGroup(ra->CellGroup, UE_msg3_stage); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 042d17c899..f255b42a9d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -712,7 +712,6 @@ typedef struct { // UE selected beam index uint8_t UE_beam_index; bool Msg4_ACKed; - uint32_t ra_timer; float ul_thr_ue; float dl_thr_ue; long pdsch_HARQ_ACK_Codebook;