From d5257ca82013bd60c8d131e3e9c8415ceb6500d7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 5 Jan 2024 11:55:04 +0100 Subject: [PATCH] Remove superfluous function, rename variable The function rrc_gNB_process_RRCReconfigurationComplete() does almost nothing, we can delete it. The variable name ue_reconfiguration_after_reestablishment_counter is misleading, as it counts all reconfigurations; rename to make it clear. --- common/utils/telnetsrv/telnetsrv_ci.c | 4 ++-- openair2/RRC/NR/nr_rrc_defs.h | 2 +- openair2/RRC/NR/rrc_gNB.c | 11 +---------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/common/utils/telnetsrv/telnetsrv_ci.c b/common/utils/telnetsrv/telnetsrv_ci.c index 943a3eec29..0f56f72cfd 100644 --- a/common/utils/telnetsrv/telnetsrv_ci.c +++ b/common/utils/telnetsrv/telnetsrv_ci.c @@ -92,10 +92,10 @@ int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt) ERROR_MSG_RET("could not find UE with RNTI %04x in RRC\n"); } - prnt("UE RNTI %04x reestab %d reconf_after_reestab %d\n", + prnt("UE RNTI %04x reestab %d reconfig %d\n", ue->ue_context.rnti, ue->ue_context.ue_reestablishment_counter, - ue->ue_context.ue_reconfiguration_after_reestablishment_counter); + ue->ue_context.ue_reconfiguration_counter); return 0; } diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index 5846383bdc..becf1b75ed 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -300,7 +300,7 @@ typedef struct gNB_RRC_UE_s { uint8_t e_rab_release_command_flag; uint32_t ue_rrc_inactivity_timer; uint32_t ue_reestablishment_counter; - uint32_t ue_reconfiguration_after_reestablishment_counter; + uint32_t ue_reconfiguration_counter; NR_CellGroupId_t cellGroupId; struct NR_SpCellConfig *spCellConfig; struct NR_CellGroupConfig__sCellToAddModList *sCellconfig; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index b5d8deee2e..bc4702e19b 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -948,15 +948,6 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( nr_rrc_transfer_protected_rrc_message(rrc, ue_p, DCCH, buffer, size); } -//----------------------------------------------------------------------------- -/* -* Process the RRC Reconfiguration Complete from the UE -*/ -static void rrc_gNB_process_RRCReconfigurationComplete(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, const uint8_t xid) -{ - ue_context_pP->ue_context.ue_reconfiguration_after_reestablishment_counter++; -} - //----------------------------------------------------------------------------- static void rrc_gNB_generate_RRCReestablishment(rrc_gNB_ue_context_t *ue_context_pP, const uint8_t *masterCellGroup_from_DU, @@ -1500,7 +1491,7 @@ static void handle_rrcReconfigurationComplete(const protocol_ctxt_t *const ctxt_ gNB_RRC_UE_t *UE = &ue_context_p->ue_context; uint8_t xid = reconfig_complete->rrc_TransactionIdentifier; - rrc_gNB_process_RRCReconfigurationComplete(ctxt_pP, ue_context_p, xid); + UE->ue_reconfiguration_counter++; bool successful_reconfig = true; switch (UE->xids[xid]) {