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.
This commit is contained in:
Robert Schmidt
2026-02-12 08:47:08 +01:00
parent 12e9ab1412
commit 4d4d0d4dd4
9 changed files with 17 additions and 20 deletions
-11
View File
@@ -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;
+1 -1
View File
@@ -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 <num_gnbs ; k++) {
if (strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[k], *(GNBParamList.paramarray[i][GNB_GNB_NAME_IDX].strptr) )== 0) {
-1
View File
@@ -325,7 +325,6 @@ int do_RRCSetup(uint8_t *const buffer,
const uint8_t transaction_id,
const uint8_t *masterCellGroup,
int masterCellGroup_len,
const gNB_RrcConfigurationReq *configuration,
NR_SRB_ToAddModList_t *SRBs)
//------------------------------------------------------------------------------
{
-1
View File
@@ -95,7 +95,6 @@ int do_RRCSetup(uint8_t *const buffer,
const uint8_t transaction_id,
const uint8_t *masterCellGroup,
int masterCellGroup_len,
const gNB_RrcConfigurationReq *configuration,
NR_SRB_ToAddModList_t *SRBs);
int do_NR_SecurityModeCommand(uint8_t *const buffer,
+11 -1
View File
@@ -148,6 +148,16 @@ typedef enum {
RRC_UECAPABILITY_ENQUIRY,
} rrc_action_t;
typedef struct nr_rrc_config {
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;
} nr_rrc_config_t;
/* Small state for delaying NG-triggered actions (setup/release) */
typedef struct {
int max_delays;
@@ -368,7 +378,7 @@ typedef struct gNB_RRC_INST_s {
uint64_t nr_cellid;
// RRC configuration
gNB_RrcConfigurationReq configuration;
nr_rrc_config_t configuration;
seq_arr_t *SIBs;
// gNB N3 GTPU instance
+1 -1
View File
@@ -117,7 +117,7 @@ byte_array_t rrc_gNB_encode_RRCReconfiguration(gNB_RRC_INST *rrc, gNB_RRC_UE_t *
nr_rrc_reconfig_param_t get_RRCReconfiguration_params(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, uint8_t srb_reest_bitmap, bool drb_reestablish);
f1ap_qos_flow_param_t get_qos_char_from_qos_flow_param(const pdusession_level_qos_parameter_t *qos_param);
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration);
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, nr_rrc_config_t *configuration);
NR_SRB_ToAddModList_t *createSRBlist(gNB_RRC_UE_t *ue, uint8_t reestablish);
NR_DRB_ToAddModList_t *createDRBlist(gNB_RRC_UE_t *ue, bool reestablish, bool do_integrity, bool do_ciphering);
void activate_srb(gNB_RRC_UE_t *UE, int srb_id);
+2 -2
View File
@@ -358,7 +358,7 @@ static void rrc_gNB_CU_DU_init(gNB_RRC_INST *rrc)
cu_init_f1_ue_data();
}
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration)
void openair_rrc_gNB_configuration(gNB_RRC_INST *rrc, nr_rrc_config_t *configuration)
{
AssertFatal(rrc != NULL, "RC.nrrrc not initialized!");
AssertFatal(MAX_MOBILES_PER_GNB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
@@ -589,7 +589,7 @@ static void rrc_gNB_generate_RRCSetup(instance_t instance,
ue_p->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");
+1 -1
View File
@@ -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]) {
+1 -1
View File
@@ -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;
}