+ ueCb->ueCfg.spCellCfgPres = true;
+ dlDataToUlAck = ueRecfg->spCellRecfg.servCellRecfg.initUlBwp.pucchCfg.dlDataToUlAck;
+ if(ueCb->cellCb)
+ {
+ if(dlDataToUlAck)
+ {
+ BuildK0K1Table(ueCb->cellCb, &ueCb->k0K1InfoTbl, false, pdschCfg,\
+ ueRecfg->spCellRecfg.servCellRecfg.initDlBwp.pdschCfg, dlDataToUlAck->dlDataToUlAckListCount,\
+ dlDataToUlAck->dlDataToUlAckList);
+ ueCb->k0K1TblPrsnt = true;
+ BuildK2InfoTable(ueCb->cellCb, ueRecfg->spCellRecfg.servCellRecfg.initUlBwp.puschCfg.timeDomRsrcAllocList,\
+ ueRecfg->spCellRecfg.servCellRecfg.initUlBwp.puschCfg.numTimeDomRsrcAlloc,\
+ NULLP, &ueCb->k2InfoTbl);
+ ueCb->k2TblPrsnt = true;
+ }
+ }
+ }
+
+ if(ueRecfg->ambrRecfg)
+ {
+ SCH_FREE(ueCb->ueCfg.ambrCfg, sizeof(SchAmbrCfg));
+ ueCb->ueCfg.ambrCfg = ueRecfg->ambrRecfg;
+ }
+ memcpy(&ueCb->ueCfg.dlModInfo, &ueRecfg->dlModInfo , sizeof(SchModulationInfo));
+ memcpy(&ueCb->ueCfg.ulModInfo, &ueRecfg->ulModInfo , sizeof(SchModulationInfo));
+ //Updating Num of LC to ADD SchUlCb and SchDlCb DB in SchUeCb
+ for(lcIdx = 0; lcIdx < ueRecfg->numLcsToAdd; lcIdx++)
+ {
+ isLcIdValid = FALSE; /*Re-Initializing*/
+
+ ueLcIdx = ueRecfg->schLcCfgAdd[lcIdx].lcId;
+ CHECK_LCID(ueLcIdx, isLcIdValid);
+ if(isLcIdValid == FALSE)
+ {
+ DU_LOG("ERROR --> SCH: LCID:%d is not Valid",ueLcIdx);
+ continue;
+ }
+ fillSchUlLcCtxt(&ueCb->ulInfo.ulLcCtxt[ueLcIdx], &ueRecfg->schLcCfgAdd[lcIdx]);
+ fillSchDlLcCtxt(&ueCb->dlInfo.dlLcCtxt[ueLcIdx], &ueRecfg->schLcCfgAdd[lcIdx]);
+
+ /*Checking whether this LC belong to Dedicated S-NSSAI
+ * and Create the Dedicated LC List & Update the Reserve PRB number*/
+ if(ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai != NULLP)
+ {
+ retDL = updateDedLcInfo(inst, ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai, &(ueCb->dlInfo.dlLcCtxt[ueLcIdx].rsvdDedicatedPRB),\
+ &(ueCb->dlInfo.dlLcCtxt[ueLcIdx].isDedicated));
+ }
+ if(ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai != NULLP)
+ {
+ retUL = updateDedLcInfo(inst, ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai, &(ueCb->ulInfo.ulLcCtxt[ueLcIdx].rsvdDedicatedPRB),\
+ &(ueCb->ulInfo.ulLcCtxt[ueLcIdx].isDedicated));
+ }
+
+ if(retUL == RFAILED || retDL == RFAILED)/*FATAL error*/
+ {
+ DU_LOG("\nERROR --> SCH : Failure in updateDedLcInfo");
+ return RFAILED;
+ }
+ SCH_FREE(ueRecfg->schLcCfgAdd[lcIdx].drbQos, sizeof(SchDrbQosInfo));
+ SCH_FREE(ueRecfg->schLcCfgAdd[lcIdx].snssai, sizeof(Snssai));
+ }
+ //Updating Num of LC to DEL SchUlCb and SchDlCb DB in SchUeCb
+ for(lcIdx = 0; lcIdx < ueRecfg->numLcsToDel; lcIdx++)
+ {
+ ueLcIdx = ueRecfg->lcIdToDel[lcIdx];
+
+ if(ueCb->dlInfo.dlLcCtxt[ueLcIdx].lcId == ueRecfg->lcIdToDel[lcIdx])
+ {
+ /*Delete the LC node from the DL LC List*/
+ if(ueCb->dlInfo.dlLcCtxt[ueLcIdx].isDedicated)
+ {
+ /*Remove from HARQ Transmission or retransmission*/
+ }
+ else
+ {
+ }
+ SCH_FREE(ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai, sizeof(Snssai));
+ memset(&ueCb->dlInfo.dlLcCtxt[ueLcIdx], 0, sizeof(SchDlLcCtxt));
+ }
+ if(ueCb->ulInfo.ulLcCtxt[ueLcIdx].lcId == ueRecfg->lcIdToDel[lcIdx])
+ {
+ /*Delete the LC node from the UL LC List*/
+ if(ueCb->ulInfo.ulLcCtxt[ueLcIdx].isDedicated)
+ {
+ /*Remove from HARQ Transmission or retransmission*/
+ }
+ else/*Default LC list*/
+ {
+
+ }
+ SCH_FREE(ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai, sizeof(Snssai));
+ memset(&ueCb->ulInfo.ulLcCtxt[ueLcIdx], 0, sizeof(SchUlLcCtxt));
+ }
+ }
+ //Updating Num of LC to DEL SchUlCb and SchDlCb DB in SchUeCb
+ for(lcIdx = 0; lcIdx < ueRecfg->numLcsToMod; lcIdx++)
+ {
+ ueLcIdx = ueRecfg->schLcCfgMod[lcIdx].lcId;
+
+ if(ueCb->ulInfo.ulLcCtxt[ueLcIdx].lcId == ueRecfg->schLcCfgMod[lcIdx].lcId)
+ {
+ fillSchUlLcCtxt(&ueCb->ulInfo.ulLcCtxt[ueLcIdx], &ueRecfg->schLcCfgMod[lcIdx]);
+ /*Updating the RRM reserved pool PRB count*/
+ if(ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai != NULLP)
+ {
+ retUL = updateDedLcInfo(inst, ueCb->ulInfo.ulLcCtxt[ueLcIdx].snssai, &(ueCb->ulInfo.ulLcCtxt[ueLcIdx].rsvdDedicatedPRB),\
+ &(ueCb->ulInfo.ulLcCtxt[ueLcIdx].isDedicated));
+ }
+ if(retUL == RFAILED)
+ {
+ DU_LOG("\nERROR --> SCH : Failed in updating Ded Lc info");
+ return RFAILED;
+ }
+ }/*End of UL LC Ctxt*/
+
+ if(ueCb->dlInfo.dlLcCtxt[ueLcIdx].lcId == ueRecfg->schLcCfgMod[lcIdx].lcId)
+ {
+ fillSchDlLcCtxt(&ueCb->dlInfo.dlLcCtxt[ueLcIdx], &ueRecfg->schLcCfgMod[lcIdx]);
+ /*Updating the RRM policy*/
+ if(ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai != NULLP)
+ {
+ retDL = updateDedLcInfo(inst, ueCb->dlInfo.dlLcCtxt[ueLcIdx].snssai, &(ueCb->dlInfo.dlLcCtxt[ueLcIdx].rsvdDedicatedPRB), \
+ &(ueCb->dlInfo.dlLcCtxt[ueLcIdx].isDedicated));
+ }
+ if(retDL == RFAILED)
+ {
+ DU_LOG("\nERROR --> SCH : Failed in updating Ded Lc info");
+ return RFAILED;
+ }
+ }/*End of DL LC ctxt*/