+}
+
+/*******************************************************************
+ *
+ * @brief Function to update/allocate dedLC Info
+ *
+ * @details
+ *
+ * Function : updateDedLcInfo
+ *
+ * Functionality: Function to fill DLDedLcInfo
+ *
+ * @params[arg] scheduler instance,
+ * snssai pointer,
+ * SchRrmPolicy pointer,
+ * SchLcPrbEstimate pointer , It will be filled
+ * isDedicated pointer,(Address of isDedicated flag in LC Context)
+ *
+ * @return ROK >> This LC is part of RRM MemberList.
+ * RFAILED >> FATAL Error
+ * ROKIGNORE >> This LC is not part of this RRM MemberList
+ *
+ * ****************************************************************/
+
+uint8_t updateDedLcInfo(Inst inst, Snssai *snssai, uint16_t *rsvdDedicatedPRB, bool *isDedicated)
+{
+ CmLList *sliceCfg = schCb[inst].sliceCfg.first;
+ SchRrmPolicyOfSlice *rrmPolicyOfSlices;
+
+ while(sliceCfg)
+ {
+ rrmPolicyOfSlices = (SchRrmPolicyOfSlice*)sliceCfg->node;
+ if(rrmPolicyOfSlices && (memcmp(snssai, &(rrmPolicyOfSlices->snssai), sizeof(Snssai)) == 0))
+ {
+ /*Updating latest RrmPolicy*/
+ *rsvdDedicatedPRB = \
+ (uint16_t)(((rrmPolicyOfSlices->rrmPolicyRatioInfo.dedicatedRatio)*(MAX_NUM_RB))/100);
+ *isDedicated = TRUE;
+ DU_LOG("\nINFO --> SCH : Updated RRM policy, reservedPOOL:%d",*rsvdDedicatedPRB);
+ break;
+ }
+ sliceCfg = sliceCfg->next;
+ }
+ /*case: This LcCtxt is either a Default LC or this LC is part of someother RRM_MemberList*/
+ if(*isDedicated != TRUE)
+ {
+ DU_LOG("\nINFO --> SCH : This SNSSAI is not a part of this RRMPolicy");
+ }
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Function to fill SpCellCfg in SchUeCb From SchUeCfg Req
+ *
+ * @details
+ *
+ * Function : fillSpCellInSchCb
+ *
+ * Functionality: Function to fill SpCellCfg in SchUeCb
+ *
+ * @params[in] Scheduler instance,
+ * SchUeCb pointer,
+ * SchUeCfg pointer
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+void fillSpCellInSchCb(SchSpCellRecfg *destSpCellCfg, SchSpCellCfg *srcSpCellCfg)
+{
+ destSpCellCfg->servCellIdx = srcSpCellCfg->servCellIdx;
+ memcpy(&destSpCellCfg->servCellRecfg.initDlBwp, &srcSpCellCfg->servCellCfg.initDlBwp, sizeof(SchInitalDlBwp));
+ destSpCellCfg->servCellRecfg.numDlBwpToAddOrMod = srcSpCellCfg->servCellCfg.numDlBwpToAdd;
+ if(destSpCellCfg->servCellRecfg.numDlBwpToAddOrMod > 0)
+ {
+ memcpy(destSpCellCfg->servCellRecfg.dlBwpToAddOrModList, srcSpCellCfg->servCellCfg.dlBwpToAddList,\
+ (sizeof(SchDlBwpInfo) * srcSpCellCfg->servCellCfg.numDlBwpToAdd));
+ }
+ destSpCellCfg->servCellRecfg.firstActvDlBwpId = srcSpCellCfg->servCellCfg.firstActvDlBwpId;
+ destSpCellCfg->servCellRecfg.defaultDlBwpId = srcSpCellCfg->servCellCfg.defaultDlBwpId;
+ destSpCellCfg->servCellRecfg.bwpInactivityTmr = srcSpCellCfg->servCellCfg.bwpInactivityTmr;
+ memcpy(&destSpCellCfg->servCellRecfg.pdschServCellCfg, &srcSpCellCfg->servCellCfg.pdschServCellCfg, sizeof(SchPdschServCellCfg));
+ memcpy(&destSpCellCfg->servCellRecfg.initUlBwp, &srcSpCellCfg->servCellCfg.initUlBwp, sizeof(SchInitialUlBwp));
+
+ destSpCellCfg->servCellRecfg.numDlBwpToAddOrMod = srcSpCellCfg->servCellCfg.numDlBwpToAdd;
+ if(destSpCellCfg->servCellRecfg.numDlBwpToAddOrMod > 0)
+ {
+ memcpy(destSpCellCfg->servCellRecfg.ulBwpToAddOrModList, srcSpCellCfg->servCellCfg.ulBwpToAddList,\
+ (sizeof(SchUlBwpInfo) * srcSpCellCfg->servCellCfg.numUlBwpToAdd));
+ }
+ destSpCellCfg->servCellRecfg.firstActvUlBwpId = srcSpCellCfg->servCellCfg.firstActvUlBwpId;
+ return;
+}
+
+/*******************************************************************
+ *
+ * @brief Function to fill SchUeCb From UeCfg Req
+ *
+ * @details
+ *
+ * Function : fillSchUeCbFrmCfgReq
+ *
+ * Functionality: Function to fill SchUeCb
+ *
+ * @params[in] Scheduler instance,
+ * SchUeCb pointer,
+ * SchUeCfg pointer
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+uint8_t fillSchUeCbFrmCfgReq(Inst inst, SchUeCb *ueCb, SchUeCfgReq *ueCfg)
+{
+ uint8_t lcIdx, ueLcIdx, idx;
+ SchPdschCfgCmn pdschCfg;
+ SchPucchDlDataToUlAck *dlDataToUlAck;
+ uint8_t retDL = ROK, retUL = ROK;
+ bool isLcIdValid = FALSE;
+
+ ueCb->ueCfg.cellId = ueCfg->cellId;
+ ueCb->ueCfg.ueId = ueCb->ueId;
+ ueCb->ueCfg.crnti = ueCfg->crnti;
+ if(ueCfg->macCellGrpCfgPres == true)
+ {
+ memcpy(&ueCb->ueCfg.macCellGrpCfg , &ueCfg->macCellGrpCfg, sizeof(SchMacCellGrpCfg));
+ ueCb->ueCfg.macCellGrpCfgPres = true;
+#ifdef NR_DRX
+ if(ueCfg->macCellGrpCfg.drxCfgPresent == true)
+ {
+ if(ueCb->ueDrxInfoPres == false)
+ {
+ ueCb->ueDrxInfoPres = true;
+ /* intialize the drxUeCb */
+ schInitDrxUeCb(ueCb);
+
+ /* intialize the Dl drxHarqCb */
+ for(idx =0; idx<ueCb->dlHqEnt.numHqPrcs; idx++)
+ {
+ schInitDrxHarqCb(&ueCb->dlHqEnt.procs[idx].dlDrxHarqCb);
+ }
+ /* intialize the Ul drxHarqCb */
+ for(idx =0; idx<ueCb->ulHqEnt.numHqPrcs; idx++)
+ {
+ schInitDrxHarqCb(&ueCb->ulHqEnt.procs[idx].ulDrxHarqCb);
+ }
+ /* convert all the drx configuration recived in ms/subms into number of slots and store into the drxUeCb */
+ schFillDrxUeCb(ueCb->cellCb->numerology, ueCfg->macCellGrpCfg.drxCfg, &ueCb->drxUeCb);
+ /* Calculate the onduration timer and short cycle timer (if shortcycle configuration is present) as soon as we
+ * recived ueCfg request */
+ schAddUeInOndurationList(ueCb->cellCb, ueCb, 0);
+
+ }
+ else
+ {
+ /* convert all the drx configuration recived in ms/subms into number
+ * of slots and store into the drxUeCb */
+ schFillDrxUeCb(ueCb->cellCb->numerology, ueCfg->macCellGrpCfg.drxCfg, &ueCb->drxUeCb);
+
+ /* Recalculate/Restart timer based on their presence */
+ schDrxUeReCfgTimer(ueCb->cellCb, ueCb);
+ }
+ }
+#endif
+ }
+
+ if(ueCfg->phyCellGrpCfgPres == true)
+ {
+ memcpy(&ueCb->ueCfg.phyCellGrpCfg , &ueCfg->phyCellGrpCfg, sizeof(SchPhyCellGrpCfg));
+ ueCb->ueCfg.phyCellGrpCfgPres = true;
+ }
+
+ if(ueCfg->spCellCfgPres == true)
+ {
+ if(ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfgPres == true)
+ {
+ if(ueCb->ueCfg.spCellCfgPres && ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdschCfgPres == true)
+ {
+ for(idx = 0; idx < ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg.numTimeDomRsrcAlloc; idx++)
+ {
+ if(ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0 && ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0)
+ {
+ SCH_FREE(ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0, sizeof(uint8_t));
+ }
+ }
+ }
+ }
+ fillSpCellInSchCb(&ueCb->ueCfg.spCellCfg, &ueCfg->spCellCfg);
+
+ ueCb->ueCfg.spCellCfgPres = true;
+ dlDataToUlAck = ueCfg->spCellCfg.servCellCfg.initUlBwp.pucchCfg.dlDataToUlAck;
+ if(ueCb->cellCb)
+ {
+ if(dlDataToUlAck)
+ {
+ BuildK0K1Table(ueCb->cellCb, &ueCb->k0K1InfoTbl, false, pdschCfg,\
+ ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg, dlDataToUlAck->dlDataToUlAckListCount,\
+ dlDataToUlAck->dlDataToUlAckList);
+ ueCb->k0K1TblPrsnt = true;
+ BuildK2InfoTable(ueCb->cellCb, ueCfg->spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList,\
+ ueCfg->spCellCfg.servCellCfg.initUlBwp.puschCfg.numTimeDomRsrcAlloc,\
+ NULLP, &ueCb->k2InfoTbl);
+ ueCb->k2TblPrsnt = true;
+ }
+ }
+ }
+
+ if(ueCfg->ambrCfg)
+ {
+ SCH_FREE(ueCb->ueCfg.ambrCfg, sizeof(SchAmbrCfg));
+ ueCb->ueCfg.ambrCfg = ueCfg->ambrCfg;
+ }
+ memcpy(&ueCb->ueCfg.dlModInfo, &ueCfg->dlModInfo , sizeof(SchModulationInfo));
+ memcpy(&ueCb->ueCfg.ulModInfo, &ueCfg->ulModInfo , sizeof(SchModulationInfo));
+ //Updating SchUlCb and SchDlCb DB in SchUeCb
+ for(lcIdx = 0; lcIdx < ueCfg->numLcsToAdd; lcIdx++)
+ {
+ isLcIdValid = FALSE; /*Re-Initializing*/
+
+ ueLcIdx = ueCfg->schLcCfg[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], &ueCfg->schLcCfg[lcIdx]);
+ fillSchDlLcCtxt(&ueCb->dlInfo.dlLcCtxt[ueLcIdx], &ueCfg->schLcCfg[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(ueCfg->schLcCfg[lcIdx].drbQos, sizeof(SchDrbQosInfo));
+ SCH_FREE(ueCfg->schLcCfg[lcIdx].snssai, sizeof(Snssai));
+
+ }/* End of outer for loop */
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Function to fill SchUeCb From UeReconfig Req
+ *
+ * @details
+ *
+ * Function : fillSchUeCbFrmRecfgReq
+ *
+ * Functionality: Function to fill SchUeCb
+ *
+ * @params[in] Scheduler instance,
+ * SchUeCb pointer,
+ * SchUeCfg pointer
+ * @return ROK/RFAILED
+ *
+ * ****************************************************************/
+
+uint8_t fillSchUeCbFrmRecfgReq(Inst inst, SchUeCb *ueCb, SchUeRecfgReq *ueRecfg)
+{
+ uint8_t lcIdx, ueLcIdx, idx;
+ SchPdschCfgCmn pdschCfg;
+ SchPucchDlDataToUlAck *dlDataToUlAck;
+ uint8_t retDL = ROK, retUL = ROK;
+ bool isLcIdValid = FALSE;
+
+
+ ueCb->ueCfg.cellId = ueRecfg->cellId;
+ ueCb->ueCfg.crnti = ueRecfg->crnti;
+ GET_UE_ID(ueRecfg->crnti, ueCb->ueCfg.ueId);
+ ueCb->ueCfg.dataTransmissionAction = ueRecfg->dataTransmissionInfo;
+ if(ueRecfg->macCellGrpRecfgPres == true)
+ {
+ memcpy(&ueCb->ueCfg.macCellGrpCfg , &ueRecfg->macCellGrpRecfg, sizeof(SchMacCellGrpCfg));
+ ueCb->ueCfg.macCellGrpCfgPres = true;
+#ifdef NR_DRX
+ if(ueRecfg->macCellGrpRecfg.drxCfgPresent == true)
+ {
+ if(ueCb->ueDrxInfoPres == false)
+ {
+ ueCb->ueDrxInfoPres = true;
+ /* intialize the drxUeCb */
+ schInitDrxUeCb(ueCb);
+
+ /* intialize the Dl drxHarqCb */
+ for(idx =0; idx<ueCb->dlHqEnt.numHqPrcs; idx++)
+ {
+ schInitDrxHarqCb(&ueCb->dlHqEnt.procs[idx].dlDrxHarqCb);
+ }
+ /* intialize the Ul drxHarqCb */
+ for(idx =0; idx<ueCb->ulHqEnt.numHqPrcs; idx++)
+ {
+ schInitDrxHarqCb(&ueCb->ulHqEnt.procs[idx].ulDrxHarqCb);
+ }
+ /* convert all the drx configuration recived in ms/subms into number of slots and store into the drxUeCb */
+ schFillDrxUeCb(ueCb->cellCb->numerology, ueRecfg->macCellGrpRecfg.drxCfg, &ueCb->drxUeCb);
+ /* Calculate the onduration timer and short cycle timer (if shortcycle configuration is present) as soon as we
+ * recived ueCfg request */
+ schAddUeInOndurationList(ueCb->cellCb, ueCb, 0);
+
+ }
+ else
+ {
+ /* convert all the drx configuration recived in ms/subms into number
+ * of slots and store into the drxUeCb */
+ schFillDrxUeCb(ueCb->cellCb->numerology, ueRecfg->macCellGrpRecfg.drxCfg, &ueCb->drxUeCb);
+
+ /* Recalculate/Restart timer based on their presence */
+ schDrxUeReCfgTimer(ueCb->cellCb, ueCb);
+ }
+ }
+#endif
+ }
+
+#ifdef NR_DRX
+ if(ueRecfg->drxConfigIndicatorRelease == true)
+ {
+ if(ueCb->ueDrxInfoPres == true)
+ {
+ schDeleteUeDrxInfo(ueCb->cellCb, ueCb);
+ ueCb->ueDrxInfoPres = false;
+ }
+ }
+#endif
+
+ if(ueRecfg->phyCellGrpRecfgPres == true)
+ {
+ memcpy(&ueCb->ueCfg.phyCellGrpCfg , &ueRecfg->phyCellGrpRecfg, sizeof(SchPhyCellGrpCfg));
+ ueCb->ueCfg.phyCellGrpCfgPres = true;
+ }
+
+ if(ueRecfg->spCellRecfgPres == true)
+ {
+ if(ueRecfg->spCellRecfg.servCellRecfg.initDlBwp.pdschCfgPres == true)
+ {
+ if(ueCb->ueCfg.spCellCfgPres && ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdschCfgPres == true)
+ {
+ for(idx = 0; idx < ueRecfg->spCellRecfg.servCellRecfg.initDlBwp.pdschCfg.numTimeDomRsrcAlloc; idx++)
+ {
+ if(ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0 && ueRecfg->spCellRecfg.servCellRecfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0)
+ {
+ SCH_FREE(ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0, sizeof(uint8_t));
+ }
+ }
+ }
+ }
+ memcpy(&ueCb->ueCfg.spCellCfg , &ueRecfg->spCellRecfg, sizeof(SchSpCellRecfg));
+
+ 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*/
+
+ SCH_FREE(ueRecfg->schLcCfgMod[lcIdx].drbQos, sizeof(SchDrbQosInfo));
+ SCH_FREE(ueRecfg->schLcCfgMod[lcIdx].snssai, sizeof(Snssai));
+ }/* End of outer for loop */
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Function to get SCH Cell Cb
+ *
+ * @details
+ *
+ * Function : getSchCellCb
+ *
+ * Functionality: Function to get SCH Cell Cb
+ *
+ * @params[in] event, SchUeCfg pointer
+ * @return schUeCb pointer - success
+ * NULLP - failure
+ *
+ * ****************************************************************/
+
+SchCellCb *getSchCellCb(uint16_t srcEvent, Inst inst, uint16_t cellId)
+{
+ uint8_t idx = 0;
+ SchCellCb *cellCb = NULLP;