+ slot = (cell->slotInfo.slot + SCHED_DELTA + PHY_DELTA + BO_DELTA) % cell->numSlots;
+ schDlSlotInfo = cell->schDlSlotInfo[slot];
+
+ SCH_ALLOC(schDlSlotInfo->dlMsgInfo, sizeof(DlMsgInfo));
+ if(!schDlSlotInfo->dlMsgInfo)
+ {
+ DU_LOG("\nERROR --> SCH : Memory allocation failed for dlMsgInfo");
+ schDlSlotInfo = NULL;
+ return RFAILED;
+ }
+ schDlSlotInfo->dlMsgInfo->crnti = dlBoInfo->crnti;
+ schDlSlotInfo->dlMsgInfo->ndi = 1;
+ schDlSlotInfo->dlMsgInfo->harqProcNum = 0;
+ schDlSlotInfo->dlMsgInfo->dlAssignIdx = 0;
+ schDlSlotInfo->dlMsgInfo->pucchTpc = 0;
+ schDlSlotInfo->dlMsgInfo->pucchResInd = 0;
+ schDlSlotInfo->dlMsgInfo->harqFeedbackInd = 0;
+ schDlSlotInfo->dlMsgInfo->dciFormatId = 1;
+ if(lcId == SRB0_LCID)
+ schDlSlotInfo->dlMsgInfo->isMsg4Pdu = true;
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes BSR indiation from MAC
+ *
+ * @details
+ *
+ * Function : MacSchBsr
+ *
+ * Functionality:
+ * Processes DL BSR from MAC
+ *
+ * @params[in] Pst pst
+ * UlBufferStatusRptInd bsrInd
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd)
+{
+ Inst schInst = pst->dstInst-SCH_INST_START;
+ SchCellCb *cellCb = NULLP;
+ SchUeCb *ueCb = NULLP;
+ uint8_t lcgIdx;
+
+ DU_LOG("\nDEBUG --> SCH : Received BSR");
+ cellCb = schCb[schInst].cells[schInst];
+ ueCb = schGetUeCb(cellCb, bsrInd->crnti);
+
+ /* store dataVolume per lcg in uecb */
+ for(lcgIdx = 0; lcgIdx < bsrInd->numLcg; lcgIdx++)
+ {
+ ueCb->bsrInfo[lcgIdx].priority = 1; //TODO: determining LCG priority?
+ ueCb->bsrInfo[lcgIdx].dataVol = bsrInd->dataVolInfo[lcgIdx].dataVol;
+ }