From 4d4d0d4dd4548ed15519212e55c93be030d1e0f4 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 11 Feb 2026 08:38:22 +0100 Subject: [PATCH] Move RRC config to RRC header, rename openair2/COMMON/rrc_messages_types.h has mostly 4G types. The only 5G (gNB) RRC type is gNB_RrcConfigurationReq, which we can move to a header in the corresponding directory (where it is used). This allows to separate 5G gNB RRC module from the 4G types in rrc_messages_types.h in the next commit. --- openair2/COMMON/rrc_messages_types.h | 11 ----------- openair2/GNB_APP/gnb_config.c | 2 +- openair2/RRC/NR/MESSAGES/asn1_msg.c | 1 - openair2/RRC/NR/MESSAGES/asn1_msg.h | 1 - openair2/RRC/NR/nr_rrc_defs.h | 12 +++++++++++- openair2/RRC/NR/nr_rrc_proto.h | 2 +- openair2/RRC/NR/rrc_gNB.c | 4 ++-- openair2/RRC/NR/rrc_gNB_NGAP.c | 2 +- openair2/RRC/NR/rrc_gNB_du.c | 2 +- 9 files changed, 17 insertions(+), 20 deletions(-) diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index ee848f6f06..d11e6573c7 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -414,17 +414,6 @@ typedef struct NbIoTRrcConfigurationReq_s { long ue_TimersAndConstants_n311_NB; } NbIoTRrcConfigurationReq; -// gNB: GNB_APP -> RRC messages -typedef struct NRRrcConfigurationReq_s { - uint32_t tac; - plmn_id_t plmn[PLMN_LIST_MAX_SIZE]; - uint8_t num_plmn; - - bool um_on_default_drb; - bool enable_sdap; - int drbs; -} gNB_RrcConfigurationReq; - // eNB: realtime -> RRC messages typedef struct rrc_subframe_process_s { protocol_ctxt_t ctxt; diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 0b3845f5b9..8e1c4637b7 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -2068,7 +2068,7 @@ gNB_RRC_INST *RCconfig_NRRRC() // search if in active list - gNB_RrcConfigurationReq nrrrc_config = {0}; + nr_rrc_config_t nrrrc_config = {0}; for (k=0; k xids[xid] = RRC_SETUP; NR_SRB_ToAddModList_t *SRBs = createSRBlist(ue_p, false); - int size = do_RRCSetup(buf, sizeof(buf), xid, masterCellGroup, masterCellGroup_len, &rrc->configuration, SRBs); + int size = do_RRCSetup(buf, sizeof(buf), xid, masterCellGroup, masterCellGroup_len, SRBs); AssertFatal(size > 0, "do_RRCSetup failed\n"); AssertFatal(size <= 1024, "memory corruption\n"); diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index bf8a797a49..d9928e1abd 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -1590,7 +1590,7 @@ int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, instance_t instance) p->mnc_digit_length, p->mnc, msg->tac[tai_size]); - gNB_RrcConfigurationReq *req = &RC.nrrrc[instance]->configuration; + nr_rrc_config_t *req = &RC.nrrrc[instance]->configuration; for (uint8_t j = 0; j < req->num_plmn; j++) { plmn_id_t *req_plmn = &req->plmn[j]; if (req_plmn->mcc == p->mcc && req_plmn->mnc == p->mnc && req->tac == msg->tac[tai_size]) { diff --git a/openair2/RRC/NR/rrc_gNB_du.c b/openair2/RRC/NR/rrc_gNB_du.c index 246df60626..b2aa18158f 100644 --- a/openair2/RRC/NR/rrc_gNB_du.c +++ b/openair2/RRC/NR/rrc_gNB_du.c @@ -98,7 +98,7 @@ RB_GENERATE/*_STATIC*/(rrc_du_tree, nr_rrc_du_container_t, entries, du_compare); static bool rrc_gNB_plmn_matches(const gNB_RRC_INST *rrc, const f1ap_served_cell_info_t *info) { - const gNB_RrcConfigurationReq *conf = &rrc->configuration; + const nr_rrc_config_t *conf = &rrc->configuration; return conf->num_plmn == 1 // F1 supports only one && conf->plmn[0].mcc == info->plmn.mcc && conf->plmn[0].mnc == info->plmn.mnc; }