X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_cfg_hdl.c;h=2524a00a7b2cf7a78173e53ee60ffb46c7bb3355;hb=refs%2Fchanges%2F35%2F6535%2F5;hp=685b923eee6aa9af3c61d66f56acc60af66481ee;hpb=aa4c92c065ee9a7f469abeee26e1dd8e00ce11d5;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 685b923ee..2524a00a7 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -177,12 +177,6 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) } 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)); } return ret; @@ -206,7 +200,7 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) { SchCellCfg schCellCfg; Pst cfgPst; - uint8_t ret =0; + uint8_t idx=0, ret=0; memset(&cfgPst, 0, sizeof(Pst)); memset(&schCellCfg, 0, sizeof(SchCellCfg)); @@ -278,26 +272,37 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel8; schCellCfg.schInitialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel16 = macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel16; - schCellCfg.schInitialDlBwp.pdschCommon.k0 = macCellCfg->initialDlBwp.pdschCommon.k0; - schCellCfg.schInitialDlBwp.pdschCommon.mappingType = - macCellCfg->initialDlBwp.pdschCommon.mappingType; - schCellCfg.schInitialDlBwp.pdschCommon.startSymbol = - macCellCfg->initialDlBwp.pdschCommon.startSymbol; - schCellCfg.schInitialDlBwp.pdschCommon.lengthSymbol = - macCellCfg->initialDlBwp.pdschCommon.lengthSymbol; + schCellCfg.schInitialDlBwp.pdschCommon.numTimeDomAlloc = macCellCfg->initialDlBwp.pdschCommon.numTimeDomAlloc; + for(idx = 0; idxinitialDlBwp.pdschCommon.numTimeDomAlloc; idx++) + { + schCellCfg.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = + macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0; + schCellCfg.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType = + macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType; + schCellCfg.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol = + macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol; + schCellCfg.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol = + macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol; + } /* fill initial UL BWP */ schCellCfg.schInitialUlBwp.bwp.freqAlloc.startPrb = macCellCfg->initialUlBwp.bwp.firstPrb; schCellCfg.schInitialUlBwp.bwp.freqAlloc.numPrb = macCellCfg->initialUlBwp.bwp.numPrb; schCellCfg.schInitialUlBwp.bwp.scs = macCellCfg->initialUlBwp.bwp.scs; schCellCfg.schInitialUlBwp.bwp.cyclicPrefix = macCellCfg->initialUlBwp.bwp.cyclicPrefix; - schCellCfg.schInitialUlBwp.puschCommon.k2 = macCellCfg->initialUlBwp.puschCommon.k2; - schCellCfg.schInitialUlBwp.puschCommon.mappingType = - macCellCfg->initialUlBwp.puschCommon.mappingType; - schCellCfg.schInitialUlBwp.puschCommon.startSymbol = - macCellCfg->initialUlBwp.puschCommon.startSymbol; - schCellCfg.schInitialUlBwp.puschCommon.lengthSymbol = - macCellCfg->initialUlBwp.puschCommon.lengthSymbol; + schCellCfg.schInitialUlBwp.puschCommon.numTimeDomRsrcAlloc = \ + macCellCfg->initialUlBwp.puschCommon.numTimeDomRsrcAlloc; + for(idx = 0; idx < macCellCfg->initialUlBwp.puschCommon.numTimeDomRsrcAlloc; idx++) + { + schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].k2 = + macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].k2; + schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].mappingType = + macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].mappingType; + schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].startSymbol = + macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].startSymbol; + schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].symbolLength = + macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].symbolLength; + } #ifdef NR_TDD memcpy(&schCellCfg.tddCfg, &macCellCfg->tddCfg, sizeof(TDDCfg)); #endif @@ -362,6 +367,10 @@ uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm) { uint16_t *cellId = NULLP; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_SCH_CELL_CFG_CFM\n"); +#endif + if(schCellCfgCfm->rsp == RSP_OK) { cellId = &schCellCfgCfm->cellId; @@ -464,6 +473,10 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) uint8_t ret = ROK; uint16_t cellIdx=0; CellDeleteStatus status; + +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTSCH -> ENTMAC : EVENT_CELL_DELETE_RSP_TO_MAC\n"); +#endif if(schCellDelRsp) { @@ -476,8 +489,9 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) { if(macCb.macCell[cellIdx]->cellId == schCellDelRsp->cellId) { - memset(macCb.macCell[cellIdx], 0, sizeof(MacCellCb)); status = SUCCESSFUL_RSP; + MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu, \ + macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1PduLen); MAC_FREE(macCb.macCell[cellIdx], sizeof(MacCellCb)); } else