From 110bbd10bc5852421f7eb67e987946717c61496b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 25 Nov 2025 19:36:15 +0100 Subject: [PATCH] Simplify RLC reestablishment The idea is to reestablish all RLC entities (it's a new UE, and we set reestablishRLC on all bearerrs), so we should reestablish all RLC entities on gNB side as well, without any additional loop. Co-authored-by: Roberto Magueta --- openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index cf0f2286bc..8f98aabbee 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -681,11 +681,9 @@ void ue_context_setup_request(const f1ap_ue_context_setup_req_t *req) /* new UE: tell the UE to reestablish RLC */ struct NR_CellGroupConfig__rlc_BearerToAddModList *addmod = new_CellGroup->rlc_BearerToAddModList; for (int i = 0; i < addmod->list.count; ++i) { - asn1cCallocOne(addmod->list.array[i]->reestablishRLC, NR_RLC_BearerConfig__reestablishRLC_true); - for (int i = 1; i < seq_arr_size(&UE->UE_sched_ctrl.lc_config); ++i) { - nr_lc_config_t *lc_config = seq_arr_at(&UE->UE_sched_ctrl.lc_config, i); - nr_rlc_reestablish_entity(UE->rnti, lc_config->lcid); - } + NR_RLC_BearerConfig_t *bc = addmod->list.array[i]; + asn1cCallocOne(bc->reestablishRLC, NR_RLC_BearerConfig__reestablishRLC_true); + nr_rlc_reestablish_entity(UE->rnti, bc->logicalChannelIdentity); } }