From 29ddb924e373dd21f20e88c87307f03d9b593d8b Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 6 Feb 2024 12:39:45 +0100 Subject: [PATCH] do not call RCconfig_NR_L1 twice in monolithic mode --- executables/nr-softmodem.c | 7 ++++--- openair2/GNB_APP/gnb_config.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 2a8ebabef2..6192dacb86 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -299,7 +299,6 @@ static int create_gNB_tasks(ngran_node_t node_type, configmodule_interface_t *cf RCconfig_verify(cfg, node_type); - RCconfig_NR_L1(); RCconfig_nr_prs(); if (RC.nb_nr_macrlc_inst > 0) @@ -682,11 +681,13 @@ int main( int argc, char **argv ) { #endif LOG_I(HW, "Version: %s\n", PACKAGE_VERSION); - if (RC.nb_nr_L1_inst > 0) - RCconfig_NR_L1(); // don't create if node doesn't connect to RRC/S1/GTP const ngran_node_t node_type = get_node_type(); + + if (RC.nb_nr_L1_inst > 0) + RCconfig_NR_L1(); + if (NFAPI_MODE != NFAPI_MODE_PNF) { int ret = create_gNB_tasks(node_type, uniqCfg); AssertFatal(ret == 0, "cannot create ITTI tasks\n"); diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 61af471e9d..3b5d159d34 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -809,7 +809,6 @@ void RCconfig_nr_prs(void) void RCconfig_NR_L1(void) { int j = 0; - if (RC.gNB == NULL) { RC.gNB = (PHY_VARS_gNB **)malloc((1 + NUMBER_OF_gNB_MAX) * sizeof(PHY_VARS_gNB *)); LOG_I(NR_PHY, "RC.gNB = %p\n", RC.gNB);