X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrmac%2Frg_lmm.c;h=d7e6e1b015658ab107a1ea4b9f15435f8bb7a025;hb=392607b7a8cbf1b7415b15517275dd1ef4e897a9;hp=1fc073e8f8a315230c30a3a01b2adbb501101eea;hpb=105199ef642ffe9736ea24a01d4546578fa25e60;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_lmm.c b/src/5gnrmac/rg_lmm.c index 1fc073e8f..d7e6e1b01 100755 --- a/src/5gnrmac/rg_lmm.c +++ b/src/5gnrmac/rg_lmm.c @@ -2119,16 +2119,36 @@ int MacHdlCellCfgReq memset(macCellCb, 0, sizeof(MacCellCb)); macCb.macCell = macCellCb; macCb.macCell->cellId = macCellCfg->cellId; - /* Send cell cfg to scheduler */ + + MAC_ALLOC(cellCb->macCellCfg.sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1PduLen); + if(cellCb->macCellCfg.sib1Cfg.sib1Pdu == NULLP) + { + DU_LOG("\nMAC : macCellCb is NULL at handling of sib1Pdu of macCellCfg\n"); + return RFAILED; + } + memcpy(cellCb->macCellCfg.sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1PduLen); + + /* Send cell cfg to scheduler */ ret = MacSchCellCfgReq(pst, macCellCfg); if(ret != ROK) { MacCellCfgCfm macCellCfgCfm; macCellCfgCfm.rsp = RSP_NOK; - macCellCfgCfm.transId = macCellCfg->transId; + macCellCfgCfm.cellId = macCellCfg->cellId; macCellCfgFillCfmPst(pst,&cfmPst); ret = (*packMacCellCfmOpts[cfmPst.selector])(&cfmPst,&macCellCfgCfm); } + else + { + if(macCellCfg->prachCfg.fdm[0].numUnusedRootSeq != 0) + { + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg->prachCfg.fdm[0].unsuedRootSeq, + macCellCfg->prachCfg.fdm[0].numUnusedRootSeq* sizeof(uint8_t)); + } + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg->sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1PduLen); + MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg ,sizeof(MacCellCfg)); + } + #ifdef INTEL_WLS LwrMacEnqueueWlsBlock(); #endif @@ -2286,7 +2306,7 @@ void MacSendCellCfgCfm(uint8_t response) cmMemset((U8 *)&pst, 0, sizeof(Pst)); cellCb = rgCb[macCb.macInst].cell; - macCellCfgCfm.transId = cellCb->macCellCfg.transId; + macCellCfgCfm.cellId = cellCb->macCellCfg.cellId; macCellCfgCfm.rsp = response; memcpy((void *)&pst, (void *)&rgCb[macCb.macInst].rgInit.lmPst, sizeof(Pst));