+/*******************************************************************
+ *
+ * @brief Send LC schedule result report to RLC
+ *
+ * @details
+ *
+ * Function : sendSchRptToRlc
+ *
+ * Functionality: Send LC schedule result report to RLC
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t sendSchedRptToRlc(DlSchedInfo dlInfo, SlotIndInfo slotInfo)
+{
+ Pst pst;
+ uint8_t lcIdx;
+ RlcSchedResultRpt *schedRpt = NULLP;
+
+ MAC_ALLOC_SHRABL_BUF(schedRpt, sizeof(RlcSchedResultRpt));
+ if(!schedRpt)
+ {
+ DU_LOG("\nMAC: Memory allocation failure in sendSchResultRepToRlc");
+ return RFAILED;
+ }
+ DU_LOG("\nMAC: Send scheduled result report for sfn %d slot %d", slotInfo.sfn, slotInfo.slot);
+
+ schedRpt->cellId = dlInfo.cellId;
+ schedRpt->rnti = dlInfo.dlMsgAlloc->crnti;
+ schedRpt->numLc = dlInfo.dlMsgAlloc->numLc;
+ schedRpt->slotInfo.sfn = slotInfo.sfn;
+ schedRpt->slotInfo.slot = slotInfo.slot;
+
+ for(lcIdx = 0; lcIdx < schedRpt->numLc; lcIdx++)
+ {
+ schedRpt->lcSch[lcIdx].lcId = dlInfo.dlMsgAlloc->lcSchInfo[lcIdx].lcId;
+ schedRpt->lcSch[lcIdx].bufSize = dlInfo.dlMsgAlloc->lcSchInfo[lcIdx].schBytes;
+ schedRpt->lcSch[lcIdx].commCh = false;
+ }
+
+ /* Fill Pst */
+ FILL_PST_MAC_TO_RLC(pst, RLC_DL_INST, EVENT_SCHED_RESULT_TO_RLC);
+ if(MacSendSchedResultRptToRlc(&pst, schedRpt) != ROK)
+ {
+ DU_LOG("\nMAC: Failed to send Schedule result report to RLC");
+ MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, schedRpt, sizeof(RlcSchedResultRpt));
+ return RFAILED;
+ }
+
+ return ROK;
+}