X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_cfg.c;h=7dc8d0d88623aff113c8c5e2de7f3f9257870ef6;hb=3360eb21f592bfe7249f501fa59ef8739b8589c2;hp=f435a1c6da1907f9751086ce14d59de954249994;hpb=e550b2091fb29289d12a5722b189acbede7862f0;p=o-du%2Fl2.git diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index f435a1c6d..7dc8d0d88 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -180,25 +180,34 @@ S16 readMacCfg() /* PRACH configuration */ duCfgParam.macCellCfg.prachCfg.pres = TRUE; + duCfgParam.macCellCfg.prachCfg.prachCfgIdx = PRACH_CONFIG_IDX; duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN; duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = PRACH_SUBCARRIER_SPACING; duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG; - duCfgParam.macCellCfg.prachCfg.prachFdm = NUM_PRACH_FDM; + duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM; + duCfgParam.macCellCfg.prachCfg.msg1FreqStart = PRACH_FREQ_START; duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX; duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ; duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 1; duCfgParam.macCellCfg.prachCfg.fdm[0].zeroCorrZoneCfg = ZERO_CORRELATION_ZONE_CFG; duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq = NUM_UNUSED_ROOT_SEQ; - DU_ALLOC(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq, NUM_UNUSED_ROOT_SEQ * sizeof(U8)); - if(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP) - { - DU_LOG("\nDU_APP : Memory allocation failed"); - RETVALUE(RFAILED); - } - *(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq) = UNUSED_ROOT_SEQ; + if(duCfgParam.macCellCfg.prachCfg.fdm[0].numUnusedRootSeq != 0) + { + DU_ALLOC(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq, + NUM_UNUSED_ROOT_SEQ * sizeof(U8)); + if(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP) + { + DU_LOG("\nDU_APP : Memory allocation failed"); + RETVALUE(RFAILED); + } + *(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq) = UNUSED_ROOT_SEQ; + } duCfgParam.macCellCfg.prachCfg.ssbPerRach = SSB_PER_RACH; duCfgParam.macCellCfg.prachCfg.prachMultCarrBand = PRACH_MULT_CARRIER_BAND; - + duCfgParam.macCellCfg.prachCfg.raContResTmr = RA_CONT_RES_TIMER; + duCfgParam.macCellCfg.prachCfg.rsrpThreshSsb = RSRP_THRESHOLD_SSB; + duCfgParam.macCellCfg.prachCfg.raRspWindow = RA_RSP_WINDOW; + duCfgParam.macCellCfg.prachCfg.prachRestrictedSet = PRACH_RESTRICTED_SET; /* TDD configuration */ duCfgParam.macCellCfg.tddCfg.pres = TRUE; duCfgParam.macCellCfg.tddCfg.tddPeriod = TDD_PERIODICITY; @@ -618,8 +627,8 @@ S16 readCfg() DU_LOG("\nDU_APP: Memory allocation failure"); return RFAILED; } - strcpy(duCfgParam.srvdCellLst[i].duSysInfo.mibMsg, encBuf); - duCfgParam.srvdCellLst[i].duSysInfo.mibLen = encBufSize; + strcpy((char *)duCfgParam.srvdCellLst[i].duSysInfo.mibMsg, encBuf); + duCfgParam.srvdCellLst[i].duSysInfo.mibLen = encBufSize; /*gnb DU System Info mib msg*/ BuildSib1Msg();