+ else
+ {
+ GET_CELL_IDX(cellDelete->cellId, cellIdx);
+ if(schCb[inst].cells[cellIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : SchProcCellDeleteReq(): cell Id[%d] is not available", cellDelete->cellId);
+ result = RSP_NOK;
+ }
+ else
+ {
+ if(schCb[inst].cells[cellIdx]->cellId == cellDelete->cellId)
+ {
+ deleteSchCellCb(schCb[inst].cells[cellIdx]);
+ result = RSP_OK;
+ ret = ROK;
+ SCH_FREE(schCb[inst].cells[cellIdx], sizeof(SchCellCb));
+ DU_LOG("\nINFO --> SCH : Sending Cell Delete response to MAC");
+ }
+ else
+ {
+ DU_LOG("\nERROR --> SCH : SchProcCellDeleteReq(): cell Id[%d] is not available",cellDelete->cellId);
+ result = RSP_NOK;
+ }
+ }
+
+ if(SchSendCellDeleteRspToMac(cellDelete, inst, result)!=ROK)
+ {
+ DU_LOG("\nERROR --> SCH : SchProcCellDeleteReq(): failed to send Cell Delete response");
+ ret = RFAILED;
+ }
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes DL RLC BO info from MAC
+ *
+ * @details
+ *
+ * Function : SchProcDlRlcBoInfo
+ *
+ * Functionality:
+ * Processes DL RLC BO info from MAC
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t SchProcDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo)
+{
+ uint8_t lcId = 0;
+ uint16_t ueId = 0;
+ bool isLcIdValid = false;
+ SchUeCb *ueCb = NULLP;
+ SchCellCb *cell = NULLP;
+ Inst inst = pst->dstInst-SCH_INST_START;
+
+ DU_LOG("\nDEBUG --> SCH : Received RLC BO Status indication LCId [%d] BO [%d]", dlBoInfo->lcId, dlBoInfo->dataVolume);
+ cell = schCb[inst].cells[inst];
+
+ if(cell == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : SchProcDlRlcBoInfo(): Cell does not exists");
+ return RFAILED;
+ }
+
+ GET_UE_ID(dlBoInfo->crnti, ueId);
+ ueCb = &cell->ueCb[ueId-1];
+ if(ueCb->ueCfg.dataTransmissionAction == STOP_DATA_TRANSMISSION)
+ {
+ DU_LOG("INFO --> SCH : DL Data transmission not allowed for UE %d", ueCb->ueCfg.ueId);
+ return ROK;
+ }
+
+ lcId = dlBoInfo->lcId;
+ CHECK_LCID(lcId, isLcIdValid);
+ if(isLcIdValid == FALSE)
+ {
+ DU_LOG("ERROR --> SCH: LCID:%d is not valid", lcId);
+ return RFAILED;
+ }
+
+ /*Expected when theres a case of Retransmission Failure or Resetablishment
+ *By Zero BO, the RLC is informing that previous data can be cleared out
+ *Thus clearing out the LC from the Lc priority list*/
+ if(dlBoInfo->dataVolume == 0)
+ {
+ /* TODO : Check the LC is Dedicated or default and accordingly LCList
+ * will be used*/
+ return ROK;
+ }
+
+ if(lcId == SRB0_LCID)
+ {
+ cell->raCb[ueId -1].msg4recvd = true;
+ cell->raCb[ueId -1].dlMsgPduLen = dlBoInfo->dataVolume;
+ }
+ else
+ {
+ /* TODO : These part of changes will be corrected during DL scheduling as
+ * per K0 - K1 -K2 */
+ SET_ONE_BIT(ueId, cell->boIndBitMap);
+ if(ueCb->dlInfo.dlLcCtxt[lcId].lcId == lcId)
+ {
+ ueCb->dlInfo.dlLcCtxt[lcId].bo = dlBoInfo->dataVolume;
+ }
+ else
+ {
+ DU_LOG("ERROR --> SCH: LCID:%d is not configured in SCH Cb",lcId);
+ return RFAILED;
+ }
+ }
+ /* Adding UE Id to list of pending UEs to be scheduled */
+ cell->api->SchDlRlcBoInfo(cell, ueId);
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes BSR indiation from MAC
+ *
+ * @details
+ *
+ * Function : SchProcBsr
+ *
+ * Functionality:
+ * Processes DL BSR from MAC
+ *
+ * @params[in] Pst pst
+ * UlBufferStatusRptInd bsrInd
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t SchProcBsr(Pst *pst, UlBufferStatusRptInd *bsrInd)
+{
+ Inst schInst = pst->dstInst-SCH_INST_START;
+ SchCellCb *cellCb = NULLP;
+ SchUeCb *ueCb = NULLP;
+ uint8_t lcgIdx = 0;
+
+ DU_LOG("\nDEBUG --> SCH : Received BSR");
+ if(bsrInd == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : BSR Ind is empty");
+ return RFAILED;
+ }
+ cellCb = schCb[schInst].cells[schInst];