From 3301cba15970f7f32bcfb0f1871f76cdc33e092d Mon Sep 17 00:00:00 2001 From: Sagar Parsawar Date: Tue, 9 Aug 2022 11:55:55 +0200 Subject: [PATCH] Resolved seg fault in UE in absence of prs_config file --- executables/nr-ue.c | 11 ++++- .../gnb.sa.band78.fr1.106PRB.usrpb210.conf | 20 -------- .../GENERIC-NR-5GC/CONF/ue_nr_prs.conf | 47 ------------------- 3 files changed, 9 insertions(+), 69 deletions(-) delete mode 100644 targets/PROJECTS/GENERIC-NR-5GC/CONF/ue_nr_prs.conf diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 795541f888..55730a7d4b 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -161,7 +161,14 @@ void RCconfig_nrUE_prs(void *cfg) paramlist_def_t gParamList = {CONFIG_STRING_PRS_LIST,NULL,0}; paramdef_t gParams[] = PRS_GLOBAL_PARAMS_DESC; config_getlist( &gParamList,gParams,sizeof(gParams)/sizeof(paramdef_t), NULL); - ue->prs_active_gNBs = *(gParamList.paramarray[j][PRS_ACTIVE_GNBS_IDX].uptr); + if (gParamList.numelt > 0) + { + ue->prs_active_gNBs = *(gParamList.paramarray[j][PRS_ACTIVE_GNBS_IDX].uptr); + } + else + { + LOG_I(PHY,"%s configuration NOT found..!! Skipping configuring UE for the PRS reception\n", CONFIG_STRING_PRS_CONFIG); + } paramlist_def_t PRS_ParamList = {{0},NULL,0}; for(int i = 0; i < ue->prs_active_gNBs; i++) @@ -247,7 +254,7 @@ void RCconfig_nrUE_prs(void *cfg) } else { - LOG_I(NR_PHY,"No %s configuration found\n", PRS_ParamList.listname); + LOG_I(PHY,"No %s configuration found\n", PRS_ParamList.listname); } } } diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index c11c6952fa..7f2d90e141 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -269,26 +269,6 @@ MACRLCs = ( } ); -prs_config = ( -{ - NumPRSResources = 1; - PRSResourceSetPeriod = [20, 2]; - SymbolStart = [7, 7]; - NumPRSSymbols = [6, 6]; - NumRB = 106; - RBOffset = 0; - CombSize = 4; - REOffset = [0, 1]; - PRSResourceOffset = [0, 0]; - PRSResourceRepetition = 2; - PRSResourceTimeGap = 1; - NPRS_ID = [10, 5]; - MutingPattern1 = []; - MutingPattern2 = []; - MutingBitRepetition = 1; -} -); - L1s = ( { num_cc = 1; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue_nr_prs.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue_nr_prs.conf deleted file mode 100644 index c94bb292a2..0000000000 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue_nr_prs.conf +++ /dev/null @@ -1,47 +0,0 @@ -PRSs = -( - { - Active_gNBs = 1; - prs_config0 = ( - { - gNB_id = 0; - NumPRSResources = 1; - PRSResourceSetPeriod = [20, 2]; - SymbolStart = [7, 7]; - NumPRSSymbols = [6, 6]; - NumRB = 106; - RBOffset = 0; - CombSize = 4; - REOffset = [0, 1]; - PRSResourceOffset = [0, 0]; - PRSResourceRepetition = 2; - PRSResourceTimeGap = 1; - NPRS_ID = [10, 5]; - MutingPattern1 = []; - MutingPattern2 = []; - MutingBitRepetition = 1; - } - ); - - prs_config1 = ( - { - gNB_id = 1; - NumPRSResources = 1; - PRSResourceSetPeriod = [20, 5]; - SymbolStart = [8]; - NumPRSSymbols = [5]; - NumRB = 106; - RBOffset = 0; - CombSize = 4; - REOffset = [1]; - PRSResourceOffset = [1]; - PRSResourceRepetition = 1; - PRSResourceTimeGap = 1; - NPRS_ID = [5]; - MutingPattern1 = []; - MutingPattern2 = []; - MutingBitRepetition = 1; - } - ); - } -);