X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_cfg_hdl.c;fp=src%2F5gnrmac%2Fmac_cfg_hdl.c;h=6b09b9a4a40206fac246a96a80c35037d2e373bc;hb=29d69003fa60ca371d31f79a474c9619f19648cd;hp=3957ac20a82f811fe8c6ff9213e794018d5729e8;hpb=d84801d796815c8d5ad3be643687b470511af945;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 3957ac20a..6b09b9a4a 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -192,28 +192,28 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) for(plmnIdx = 0; plmnIdx < MAX_PLMN; plmnIdx++) { - macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].numSupportedSlice = macCellCfg->cellCfg.plmnInfoList[plmnIdx].numSupportedSlice; - MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai, macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].numSupportedSlice\ + macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices = macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices; + MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai, macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices\ * sizeof(Snssai*)); - if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai == NULLP) + if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai == NULLP) { DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq"); return RFAILED; } - if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai) + if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai) { - for(sliceIdx=0; sliceIdxmacCellCfg.cellCfg.plmnInfoList[plmnIdx].numSupportedSlice; sliceIdx++) + for(sliceIdx=0; sliceIdxmacCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices; sliceIdx++) { - if(macCellCfg->cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx]) + if(macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx]) { - MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx], sizeof(Snssai)); - if(!macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx]) + MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], sizeof(Snssai)); + if(!macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx]) { DU_LOG("\nERROR --> MAC: Memory allocation failed at MacProcCellCfgReq"); return RFAILED; } - memcpy(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx], macCellCfg->cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx],\ + memcpy(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx],\ sizeof(Snssai)); } } @@ -267,26 +267,26 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) for(plmnIdx = 0; plmnIdx < MAX_PLMN; plmnIdx++) { schCellCfg.plmnInfoList[plmnIdx].plmn = macCellCfg->cellCfg.plmnInfoList[plmnIdx].plmn; - if(macCellCfg->cellCfg.plmnInfoList[plmnIdx].snssai) + if(macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai) { - schCellCfg.plmnInfoList[plmnIdx].numSliceSupport = macCellCfg->cellCfg.plmnInfoList[plmnIdx].numSupportedSlice; - MAC_ALLOC(schCellCfg.plmnInfoList[plmnIdx].snssai, schCellCfg.plmnInfoList[plmnIdx].numSliceSupport * sizeof(Snssai*)); - if(!schCellCfg.plmnInfoList[plmnIdx].snssai) + schCellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices = macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices; + MAC_ALLOC(schCellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai, schCellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices * sizeof(Snssai*)); + if(!schCellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai) { DU_LOG("\nERROR --> MAC: Memory allocation failed at MacSchCellCfgReq"); return RFAILED; } - for(sliceIdx=0; sliceIdxcellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx]) + if(macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx]) { - MAC_ALLOC(schCellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx], sizeof(Snssai)); - if(!schCellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx]) + MAC_ALLOC(schCellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], sizeof(Snssai)); + if(!schCellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx]) { DU_LOG("\nERROR --> MAC: Memory allocation failed at MacSchCellCfgReq"); return RFAILED; } - memcpy(schCellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx], macCellCfg->cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx], sizeof(Snssai)); + memcpy(schCellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], macCellCfg->cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], sizeof(Snssai)); } } } @@ -590,14 +590,14 @@ uint8_t MacProcSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDelRsp) cause = SUCCESSFUL; for(plmnIdx = 0; plmnIdx < MAX_PLMN; plmnIdx++) { - if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai) + if(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai) { - for(sliceIdx = 0; sliceIdxmacCellCfg.cellCfg.plmnInfoList[plmnIdx].numSupportedSlice; sliceIdx++) + for(sliceIdx = 0; sliceIdxmacCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.numSupportedSlices; sliceIdx++) { - MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai[sliceIdx], sizeof(Snssai)); + MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai[sliceIdx], sizeof(Snssai)); } - MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].snssai, macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].\ - numSupportedSlice * sizeof(Snssai*)); + MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].suppSliceList.snssai, macCb.macCell[cellIdx]->macCellCfg.cellCfg.plmnInfoList[plmnIdx].\ + suppSliceList.numSupportedSlices * sizeof(Snssai*)); } } MAC_FREE(macCb.macCell[cellIdx]->macCellCfg.cellCfg.sib1Cfg.sib1Pdu, \