- SchCellCb *cell = schCb[inst].cells[inst];
- SchDlAlloc *dlAlloc = \
- cell->dlAlloc[(cell->slotInfo.slot + SCHED_DELTA) % SCH_NUM_SLOTS];
-
- for(lcIdx = 0; lcIdx < dlBoInfo->numLc; lcIdx++)
- {
- if(dlBoInfo->boInfo[lcIdx].lcId == CCCH_LCID)
- {
- SCH_ALLOC(dlAlloc->msg4Info, sizeof(Msg4Info));
- if(!dlAlloc->msg4Info)
- {
- DU_LOG("\nSCH : Memory allocation failed for msg4Info");
- dlAlloc = NULL;
- return RFAILED;
- }
- dlAlloc->msg4Info->crnti = dlBoInfo->crnti;
- dlAlloc->msg4Info->ndi = 1;
- dlAlloc->msg4Info->harqProcNum = 0;
- dlAlloc->msg4Info->dlAssignIdx = 0;
- dlAlloc->msg4Info->pucchTpc = 0;
- dlAlloc->msg4Info->pucchResInd = 0;
- dlAlloc->msg4Info->harqFeedbackInd = 0;
- dlAlloc->msg4Info->dciFormatId = 1;
- }
+#ifdef CALL_FLOW_DEBUG_LOG
+ DU_LOG("\nCall Flow: ENTMAC -> ENTSCH : EVENT_DL_RLC_BO_INFO_TO_SCH\n");
+#endif
+
+ DU_LOG("\nDEBUG --> SCH : Received RLC BO Status indication");
+ cell = schCb[inst].cells[inst];
+
+ if(cell == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : MacSchDlRlcBoInfo(): Cell does not exists");
+ return RFAILED;
+ }
+
+ GET_UE_IDX(dlBoInfo->crnti, ueIdx);
+ ueCb = &cell->ueCb[ueIdx-1];
+ lcId = dlBoInfo->lcId;
+
+ if(lcId == SRB1_LCID || lcId == SRB2_LCID || lcId == SRB3_LCID || \
+ (lcId >= MIN_DRB_LCID && lcId <= MAX_DRB_LCID))
+ {
+ SET_ONE_BIT(ueIdx, cell->boIndBitMap);
+ ueCb->dlInfo.dlLcCtxt[lcId].bo = dlBoInfo->dataVolume;
+ }
+ else if(lcId != SRB0_LCID)
+ {
+ DU_LOG("\nERROR --> SCH : Invalid LC Id %d in MacSchDlRlcBoInfo", lcId);
+ return RFAILED;
+ }
+
+ slot = (cell->slotInfo.slot + SCHED_DELTA + PHY_DELTA_DL + BO_DELTA) % cell->numSlots;
+#ifdef NR_TDD
+ while(schGetSlotSymbFrmt(cell->slotFrmtBitMap, slot) != DL_SLOT)
+ {
+ slot = (slot + 1)%cell->numSlots;
+ slotIdx++;
+ if(slotIdx==cell->numSlots)
+ {
+ DU_LOG("\nERROR --> SCH : No DL Slot available");
+ return RFAILED;
+ }
+ }
+#endif
+
+ schDlSlotInfo = cell->schDlSlotInfo[slot];
+
+ if(schDlSlotInfo == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : MacSchDlRlcBoInfo(): schDlSlotInfo does not exists");
+ return RFAILED;
+ }
+ SCH_ALLOC(schDlSlotInfo->dlMsgInfo, sizeof(DlMsgInfo));
+ if(schDlSlotInfo->dlMsgInfo == NULLP)
+ {
+ 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;
+ schDlSlotInfo->dlMsgInfo->dlMsgPduLen = dlBoInfo->dataVolume;