Merge remote-tracking branch 'origin/nr-gnb-config-refactor' into integration_2025_w16 (!3293)
Cleanup and refactor initial gNB configuration This is follow-up on !3048 (merged). Major changes in this MR: - Add config functions to reduce redundant code repeated in multiple places in the file - Add macros to reduce redundant code in gNB configuration - Refactor RCconfig_NR_NG - Cleanup obsolete and commented out code - Refactor includes in executables/nr-gnb.c - Introduce platform type plmn_id_t for consistency across the stack: F1AP, NGAP can now use the same struct type - And other minor formatting
This commit is contained in:
@@ -518,9 +518,9 @@ static void initialize_agent(ngran_node_t node_type, e2_agent_args_t oai_args)
|
||||
const gNB_RRC_INST* rrc = RC.nrrrc[0];
|
||||
assert(rrc != NULL && "rrc cannot be NULL");
|
||||
|
||||
const int mcc = rrc->configuration.mcc[0];
|
||||
const int mnc = rrc->configuration.mnc[0];
|
||||
const int mnc_digit_len = rrc->configuration.mnc_digit_length[0];
|
||||
const int mcc = rrc->configuration.plmn[0].mcc;
|
||||
const int mnc = rrc->configuration.plmn[0].mnc;
|
||||
const int mnc_digit_len = rrc->configuration.plmn[0].mnc_digit_length;
|
||||
// const ngran_node_t node_type = rrc->node_type;
|
||||
int nb_id = 0;
|
||||
int cu_du_id = 0;
|
||||
@@ -597,8 +597,6 @@ int main( int argc, char **argv ) {
|
||||
char *pckg = strdup(OAI_PACKAGE_VERSION);
|
||||
LOG_I(HW, "Version: %s\n", pckg);
|
||||
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
const ngran_node_t node_type = get_node_type();
|
||||
// Init RAN context
|
||||
if (!(CONFIG_ISFLAGSET(CONFIG_ABORT)))
|
||||
NRRCConfig();
|
||||
@@ -613,6 +611,9 @@ int main( int argc, char **argv ) {
|
||||
RCconfig_nr_prs();
|
||||
}
|
||||
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
const ngran_node_t node_type = get_node_type();
|
||||
|
||||
if (NFAPI_MODE != NFAPI_MODE_PNF) {
|
||||
int ret = create_gNB_tasks(node_type, uniqCfg);
|
||||
AssertFatal(ret == 0, "cannot create ITTI tasks\n");
|
||||
|
||||
Reference in New Issue
Block a user