/** @file sch_slot_ind.c
@brief This module processes slot indications
*/
-#include "stdbool.h"
-#include "envopt.h" /* environment options */
-#include "envdep.h" /* environment dependent */
-#include "envind.h" /* environment independent */
-#include "gen.h" /* general layer */
-#include "ssi.h" /* system service interface */
-#include "cm_tkns.h" /* Common Token Defines */
-#include "cm_llist.h" /* Common Link List Defines */
-#include "cm_hash.h" /* Common Hash List Defines */
-#include "cm_mblk.h" /* common memory link list library */
-#include "cm_lte.h" /* Common LTE Defines */
+#include "common_def.h"
#include "tfu.h"
#include "lrg.h"
-
-#include "gen.x" /* general layer typedefs */
-#include "ssi.x" /* system services typedefs */
-#include "cm5.x" /* system services */
-#include "cm_tkns.x" /* Common Token Definitions */
-#include "cm_llist.x" /* Common Link List Definitions */
-#include "cm_lib.x" /* Common Library Definitions */
-#include "cm_hash.x" /* Common Hash List Definitions */
-#include "cm_mblk.x" /* common memory link list library */
-#include "cm_lte.x" /* Common LTE Defines */
#include "tfu.x"
#include "lrg.x"
#include "du_log.h"
SchMacDlAllocFunc schMacDlAllocOpts[] =
{
- packSchMacDlAlloc,
- MacProcDlAlloc,
- packSchMacDlAlloc
+ packSchMacDlAlloc,
+ MacProcDlAlloc,
+ packSchMacDlAlloc
};
-extern SchCb schCb[SCH_MAX_INST];
-extern int schFillRar(RarAlloc *rarAlloc, uint16_t raRnti, uint16_t pci, uint8_t
-offsetPointA);
+SchCb schCb[SCH_MAX_INST];
/*******************************************************************
*
* RFAILED - failure
*
* ****************************************************************/
-int sendDlAllocToMac(DlAlloc *dlAlloc, Inst inst)
+uint8_t sendDlAllocToMac(DlSchedInfo *dlSchedInfo, Inst inst)
{
- Pst pst;
+ Pst pst;
memset(&pst, 0, sizeof(Pst));
- SCH_FILL_RSP_PST(pst, inst);
- pst.event = EVENT_DL_ALLOC;
+ FILL_PST_SCH_TO_MAC(pst, inst);
+ pst.event = EVENT_DL_SCH_INFO;
- return(*schMacDlAllocOpts[pst.selector])(&pst, dlAlloc);
+ return(*schMacDlAllocOpts[pst.selector])(&pst, dlSchedInfo);
}
*
* @details
*
- * Function : schProcessSlotInd
+ * Function : schCalcSlotValues
*
* Functionality:
* Handles TTI indication received from PHY
* RFAILED - failure
*
* ****************************************************************/
-uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
+void schCalcSlotValues(SlotTimingInfo slotInd, SchSlotValue *schSlotValue)
{
- int ret = ROK;
- uint8_t ssb_rep;
- uint16_t sfn = slotInd->sfn;
- uint16_t slot = slotInd->slot;
- uint16_t sfnSlot = 0;
- DlAlloc dlAlloc;
- memset(&dlAlloc,0,sizeof(DlAlloc));
- DlBrdcstAlloc *dlBrdcstAlloc = &dlAlloc.brdcstAlloc;
- RarAlloc *rarAlloc = &dlAlloc.rarAlloc;
- Msg4Alloc *msg4Alloc;
- dlBrdcstAlloc->ssbTrans = NO_SSB;
- dlBrdcstAlloc->sib1Trans = NO_SIB1;
-
-
- SchCellCb *cell = schCb[schInst].cells[schInst];
-
-#ifdef LTE_L2_MEAS
- glblTtiCnt++;
-#endif
-
-// schDlResAlloc(cell, slotInd);
-
- ssb_rep = cell->cellCfg.ssbSchCfg.ssbPeriod;
- memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
- dlBrdcstAlloc->ssbIdxSupported = 1;
-
- if((slot + SCHED_DELTA) >= SCH_NUM_SLOTS)
- {
- sfn = (sfn+1)%SCH_MAX_SFN;
- }
- slot = ((slot + SCHED_DELTA) % SCH_NUM_SLOTS);
- sfnSlot = ((sfn * 10) + slot);
-
- dlAlloc.slotIndInfo.sfn = sfn;
- dlAlloc.slotIndInfo.slot = slot;
- dlAlloc.cellId = cell->cellId;
-
- /* Identify SSB ocassion*/
- if (sfnSlot % SCH_MIB_TRANS == 0)
- {
- dlBrdcstAlloc->ssbTrans = SSB_TRANSMISSION;
- }
- else if (sfnSlot % ssb_rep == 0)
- {
- dlBrdcstAlloc->ssbTrans = SSB_REPEAT;
- }
- else
- {
- /* not SSB occassion */
- }
+ /****************************************************************
+ * PHY_DELTA - the physical layer delta *
+ * SCHED_DELTA - scheduler schedules one slot ahead *
+ * BO_DELTA - this delay is considered for BO response and *
+ * RLC buffer packet to received at MAC *
+ * lower-mac (FAPI filling) will be working on PHY_DELTA *
+ * brdcast scheduler will working on PHY_DELTA + SCHED_DELTA *
+ * RAR scheduler will working on PHY_DELTA + SCHED_DELTA *
+ * msg4 scheduler will working on PHY_DELTA + SCHED_DELTA *
+ * dedicated DL msg scheduler will working *
+ * on PHY_DELTA + SCHED_DELTA + BO_DELTA *
+ ****************************************************************/
+
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->currentTime, PHY_DELTA_DL);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->broadcastTime, PHY_DELTA_DL + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->rarTime, PHY_DELTA_DL + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->dlMsgTime, PHY_DELTA_DL + SCHED_DELTA);
+}
+
+/*******************************************************************
+ *
+ * @brief Checks if a slot is to be scheduled for SSB transmission
+ *
+ * @details
+ *
+ * Function : schCheckSsbOcc
+ *
+ * Functionality:
+ * Checks if a slot is to be scheduled for SSB transmission
+ *
+ * @params[in] SlotTimingInfo slotTime
+ * SchCellCb *cell
+ * @return Pdu transmission
+ *
+ * ****************************************************************/
+PduTxOccsaion schCheckSsbOcc(SchCellCb *cell, SlotTimingInfo slotTime)
+{
+ uint8_t ssb_rep;
+
+ ssb_rep = cell->cellCfg.ssbSchCfg.ssbPeriod;
+
+ /* Identify SSB ocassion*/
+ if ((slotTime.sfn % SCH_MIB_TRANS == 0) && (slotTime.slot ==0))
+ {
+ return NEW_TRANSMISSION;
+ }
+ else if(cell->firstSsbTransmitted)
+ {
+ if((ssb_rep == 5) && ((slotTime.slot == 0 || slotTime.slot == 10)))
+ return REPEATITION;
+ else if((slotTime.sfn % (ssb_rep/10) == 0) && slotTime.slot == 0)
+ return REPEATITION;
+ }
+ /* not SSB occassion */
+ return NO_TRANSMISSION;
+}
+/*******************************************************************
+ *
+ * @brief Checks if a slot is to be scheduled for SIB1 transmission
+ *
+ * @details
+ *
+ * Function : schCheckSib1Occ
+ *
+ * Functionality:
+ * Checks if a slot is to be scheduled for SIB1 transmission
+ *
+ * @params[in] SlotTimingInfo slotTime
+ * SchCellCb *cell
+ * @return Pdu transmission
+ *
+ * ****************************************************************/
+PduTxOccsaion schCheckSib1Occ(SchCellCb *cell, SlotTimingInfo slotTime)
+{
/* Identify SIB1 occasions */
- if(sfnSlot % cell->cellCfg.sib1SchCfg.sib1NewTxPeriod == 0)
- {
- dlBrdcstAlloc->sib1Trans = SIB1_TRANSMISSION;
- }
- else if (sfnSlot % cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod == 0)
- {
- dlBrdcstAlloc->sib1Trans = SIB1_REPITITION;
- }
- else
- {
- /* not SIB1 occassion */
- }
-
- if(dlBrdcstAlloc->ssbTrans || dlBrdcstAlloc->sib1Trans)
- {
- dlAlloc.isBroadcastPres = true;
- ret = schBroadcastAlloc(cell, dlBrdcstAlloc,slot);
- if(ret != ROK)
+ if((slotTime.sfn % SCH_SIB1_TRANS == 0) && (slotTime.slot ==0))
+ {
+ return NEW_TRANSMISSION;
+ }
+ else if(cell->firstSib1Transmitted)
+ {
+ if((slotTime.sfn % (cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod/10) == 0) &&
+ (slotTime.slot == 0))
+ {
+ return REPEATITION;
+ }
+ }
+ /* not SIB1 occassion */
+ return NO_TRANSMISSION;
+}
+
+/*******************************************************************
+ *
+ * @brief
+ *
+ * @details
+ *
+ * Function :
+ *
+ * Functionality:
+
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t schFillBoGrantDlSchedInfo(SchCellCb *cell, DlSchedInfo *dlSchedInfo, DlMsgAlloc *dlMsgAlloc)
+{
+ uint8_t ueIdx, lcIdx;
+ uint16_t slot;
+ uint16_t crnti = 0;
+ uint32_t accumalatedSize = 0;
+ SchUeCb *ueCb = NULLP;
+
+ while(cell->boIndBitMap)
+ {
+ slot = dlSchedInfo->schSlotValue.dlMsgTime.slot;
+
+ GET_RIGHT_MOST_SET_BIT(cell->boIndBitMap, ueIdx);
+ GET_CRNTI(crnti,ueIdx);
+ ueCb = &cell->ueCb[ueIdx-1];
+
+ /* allocate PDCCH and PDSCH resources for the ue */
+ SCH_ALLOC(dlMsgAlloc, sizeof(DlMsgAlloc));
+ if(!dlMsgAlloc)
+ {
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for ded DL msg alloc");
+ return RFAILED;
+ }
+ memset(dlMsgAlloc, 0, sizeof(DlMsgAlloc));
+ dlSchedInfo->dlMsgAlloc = dlMsgAlloc;
+ dlMsgAlloc->crnti = crnti;
+
+ /* Dl ded Msg info is copied, this was earlier filled in macSchDlRlcBoInfo */
+ memcpy(&dlMsgAlloc->dlMsgInfo, cell->schDlSlotInfo[slot]->dlMsgInfo, \
+ sizeof(DlMsgInfo));
+
+ /* scheduled LC data fill */
+ dlMsgAlloc->numLc = 0;
+ for(lcIdx = 0; lcIdx < MAX_NUM_LC; lcIdx++)
+ {
+ if(ueCb->dlInfo.dlLcCtxt[lcIdx].bo)
+ {
+ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].lcId = lcIdx;
+
+ /* calculation for BO includse RLC and MAC header size */
+ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes = \
+ ueCb->dlInfo.dlLcCtxt[lcIdx].bo + MAC_HDR_SIZE;
+ accumalatedSize += dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes;
+ dlMsgAlloc->numLc++;
+ }
+ ueCb->dlInfo.dlLcCtxt[lcIdx].bo = 0;
+ }
+
+ if (!dlMsgAlloc->numLc)
+ {
+ DU_LOG("\nDEBUG --> SCH : No pending BO for any LC id\n");
+ /* Free the dl ded msg info allocated in macSchDlRlcBoInfo */
+ SCH_FREE(dlMsgAlloc, sizeof(DlMsgAlloc));
+ dlSchedInfo->dlMsgAlloc = NULLP;
+ return ROK;
+ }
+
+ /* pdcch and pdsch data is filled */
+ if((schDlRsrcAllocDlMsg(cell, dlSchedInfo->schSlotValue.dlMsgTime, crnti, &accumalatedSize, dlMsgAlloc)) != ROK)
{
- DU_LOG("\nschBroadcastAlloc failed");
- RETVALUE(ret);
+ DU_LOG("\nERROR --> SCH : Scheduling of DL dedicated message failed");
+ /* Free the dl ded msg info allocated in macSchDlRlcBoInfo */
+ SCH_FREE(dlMsgAlloc, sizeof(DlMsgAlloc));
+ dlSchedInfo->dlMsgAlloc = NULLP;
+ return RFAILED;
+
}
+
+ /* TODO : Update the scheduling byte report for multiple LC based on QCI
+ * and Priority */
+ /* As of now, the total number of bytes scheduled for a slot is divided
+ * equally amongst all LC with pending data. This is avoid starving of any
+ * LC
+ * */
+ accumalatedSize = accumalatedSize/dlMsgAlloc->numLc;
+ for(lcIdx = 0; lcIdx < dlMsgAlloc->numLc; lcIdx ++)
+ dlMsgAlloc->lcSchInfo[lcIdx].schBytes = accumalatedSize;
+
+ /* PUCCH resource */
+ schAllocPucchResource(cell, dlMsgAlloc->crnti, slot);
+
+ /* after allocation is done, unset the bo bit for that ue */
+ UNSET_ONE_BIT(ueIdx, cell->boIndBitMap);
+ }
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Handles slot indication at SCH
+ *
+ * @details
+ *
+ * Function : schProcessSlotInd
+ *
+ * Functionality:
+ * Handles TTI indication received from PHY
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t schProcessSlotInd(SlotTimingInfo *slotInd, Inst schInst)
+{
+ uint8_t ueIdx, lcgIdx, ret = ROK;
+ uint16_t slot;
+ DlSchedInfo dlSchedInfo;
+ DlBrdcstAlloc *dlBrdcstAlloc = NULLP;
+ DlMsgAlloc *msg4Alloc = NULLP;
+ DlMsgAlloc *dlMsgAlloc = NULLP;
+ SchCellCb *cell = NULLP;
+
+ memset(&dlSchedInfo,0,sizeof(DlSchedInfo));
+ dlSchedInfo.dlMsgAlloc = NULLP;
+ schCalcSlotValues(*slotInd, &dlSchedInfo.schSlotValue);
+ dlBrdcstAlloc = &dlSchedInfo.brdcstAlloc;
+ dlBrdcstAlloc->ssbTrans = NO_TRANSMISSION;
+ dlBrdcstAlloc->sib1Trans = NO_TRANSMISSION;
+
+ cell = schCb[schInst].cells[schInst];
+ if(cell == NULLP)
+ {
+ DU_LOG("\nERROR --> SCH : Cell Does not exist");
+ return RFAILED;
}
+ memcpy(&cell->slotInfo, slotInd, sizeof(SlotTimingInfo));
+ dlBrdcstAlloc->ssbIdxSupported = SSB_IDX_SUPPORTED;
- /* check for RAR */
- if(cell->dlAlloc[slot]->rarPres == true)
- {
- dlAlloc.isRarPres = true;
- /* RAR info is copied, this was earlier filled in schProcessRachInd */
- memcpy(&rarAlloc->rarInfo, &cell->dlAlloc[slot]->rarInfo, sizeof(RarInfo));
+ dlSchedInfo.cellId = cell->cellId;
- /* pdcch and pdsch data is filled */
- schFillRar(rarAlloc,
- cell->dlAlloc[slot]->rarInfo.raRnti,
- cell->cellCfg.phyCellId,
- cell->cellCfg.ssbSchCfg.ssbOffsetPointA);
+ slot = dlSchedInfo.schSlotValue.broadcastTime.slot;
- cell->dlAlloc[slot]->rarPres = false;
+ /* Check for SSB occassion */
+ dlBrdcstAlloc->ssbTrans = schCheckSsbOcc(cell, dlSchedInfo.schSlotValue.broadcastTime);
+ if(dlBrdcstAlloc->ssbTrans)
+ {
+ if(schBroadcastSsbAlloc(cell, dlSchedInfo.schSlotValue.broadcastTime, dlBrdcstAlloc) != ROK)
+ {
+ DU_LOG("\nERROR --> SCH : schBroadcastSsbAlloc failed");
+ dlBrdcstAlloc->ssbTrans = NO_TRANSMISSION;
+ }
+ else
+ {
+ dlSchedInfo.isBroadcastPres = true;
+ if((dlBrdcstAlloc->ssbTrans == NEW_TRANSMISSION) && (!cell->firstSsbTransmitted))
+ cell->firstSsbTransmitted = true;
+ }
}
- /* check for MSG4 */
- if(cell->dlAlloc[slot]->msg4Info)
+ /* Check for SIB1 occassion */
+ dlBrdcstAlloc->sib1Trans = schCheckSib1Occ(cell, dlSchedInfo.schSlotValue.broadcastTime);
+ if(dlBrdcstAlloc->sib1Trans)
{
- SCH_ALLOC(msg4Alloc, sizeof(Msg4Alloc));
- if(!msg4Alloc)
- {
- DU_LOG("\nMAC: Memory Allocation failed for msg4 alloc");
- return RFAILED;
- }
-
- dlAlloc.msg4Alloc = msg4Alloc;
-
- /* Msg4 info is copied, this was earlier filled in macSchDlRlcBoInfo */
- memcpy(&msg4Alloc->msg4Info, cell->dlAlloc[slot]->msg4Info, \
- sizeof(Msg4Info));
-
- /* pdcch and pdsch data is filled */
- schDlRsrcAllocMsg4(msg4Alloc, cell, slot);
- SCH_FREE(cell->dlAlloc[slot]->msg4Info, sizeof(Msg4Info));
- cell->dlAlloc[slot]->msg4Info = NULL;
+ if(schBroadcastSib1Alloc(cell, dlSchedInfo.schSlotValue.broadcastTime, dlBrdcstAlloc) != ROK)
+ {
+ DU_LOG("\nERROR --> SCH : schBroadcastSib1Alloc failed");
+ dlBrdcstAlloc->sib1Trans = NO_TRANSMISSION;
+ }
+ else
+ {
+ dlSchedInfo.isBroadcastPres = true;
+ if((dlBrdcstAlloc->sib1Trans == NEW_TRANSMISSION) && (!cell->firstSib1Transmitted))
+ cell->firstSib1Transmitted = true;
+ }
}
+ /* Check for Pending RA Requests */
+ schProcessRaReq(*slotInd, cell);
- /* send msg to MAC */
- ret = sendDlAllocToMac(&dlAlloc, schInst);
+ /* Check for RAR */
+ if(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.rarTime.slot]->rarAlloc != NULLP)
+ {
+ slot = dlSchedInfo.schSlotValue.rarTime.slot;
+ dlSchedInfo.rarAlloc = cell->schDlSlotInfo[slot]->rarAlloc;
+ cell->schDlSlotInfo[slot]->rarAlloc = NULLP;
+ }
+
+ /* Check for MSG4 */
+ if((cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo != NULLP) &&
+ (cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo->isMsg4Pdu))
+ {
+ slot = dlSchedInfo.schSlotValue.dlMsgTime.slot;
+
+ SCH_ALLOC(msg4Alloc, sizeof(DlMsgAlloc));
+ if(!msg4Alloc)
+ {
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for msg4 alloc");
+ return RFAILED;
+ }
+
+ dlSchedInfo.dlMsgAlloc = msg4Alloc;
+
+ /* Msg4 info is copied, this was earlier filled in macSchDlRlcBoInfo */
+ memcpy(&msg4Alloc->dlMsgInfo, cell->schDlSlotInfo[slot]->dlMsgInfo, \
+ sizeof(DlMsgInfo));
+
+ /* pdcch and pdsch data is filled */
+ if((schDlRsrcAllocMsg4(cell, dlSchedInfo.schSlotValue.dlMsgTime, msg4Alloc)) != ROK)
+ {
+ DU_LOG("\nERROR --> SCH : MSG4 scheduling failed");
+ SCH_FREE(msg4Alloc, sizeof(DlMsgAlloc));
+ dlSchedInfo.dlMsgAlloc = NULLP;
+ SCH_FREE(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo, sizeof(DlMsgInfo));
+ return RFAILED;
+ }
+
+ /* PUCCH resource */
+ schAllocPucchResource(cell, msg4Alloc->dlMsgInfo.crnti, dlSchedInfo.schSlotValue.dlMsgTime.slot);
+
+ SCH_FREE(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo, sizeof(DlMsgInfo));
+ }
+
+ /* Check if UL grant must be sent in this slot for a SR/BSR that had been received */
+ for(ueIdx=0; ueIdx<cell->numActvUe; ueIdx++)
+ {
+ uint32_t totDataReq = 0; /* in bytes */
+ DciInfo *dciInfo = NULLP;
+ SchUeCb *ueCb = NULLP;
+
+ ueCb = &cell->ueCb[ueIdx];
+ /* check for SR */
+ if(ueCb->srRcvd)
+ {
+ totDataReq = UL_GRANT_SIZE; /*fixing so that all control msgs can be handled in SR */
+ ueCb->srRcvd = false;
+ }
+ /* check for BSR */
+ for(lcgIdx=0; lcgIdx<MAX_NUM_LOGICAL_CHANNEL_GROUPS; lcgIdx++)
+ {
+ totDataReq+= ueCb->bsrInfo[lcgIdx].dataVol;
+ ueCb->bsrInfo[lcgIdx].dataVol = 0;
+ }
+ if(totDataReq > 0) /* UL grant must be provided for this UE in this slot */
+ {
+ SchPuschInfo schPuschInfo;
+ memset(&schPuschInfo, 0, sizeof(SchPuschInfo));
+
+ SCH_ALLOC(dciInfo, sizeof(DciInfo));
+ if(!dciInfo)
+ {
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for dciInfo alloc");
+ return RFAILED;
+ }
+ memset(dciInfo,0,sizeof(DciInfo));
+ /* update the SFN and SLOT */
+ memcpy(&dlSchedInfo.schSlotValue.ulDciTime, slotInd, sizeof(SlotTimingInfo));
+ slot = dlSchedInfo.schSlotValue.ulDciTime.slot;
+ /* Update PUSCH allocation */
+ schFillPuschAlloc(ueCb, slot, totDataReq, &schPuschInfo);
+ /* Fill DCI for UL grant */
+ schFillUlDci(ueCb, schPuschInfo, dciInfo);
+ memcpy(&dciInfo->slotIndInfo, &dlSchedInfo.schSlotValue.ulDciTime, sizeof(SlotTimingInfo));
+ dlSchedInfo.ulGrant = dciInfo;
+ }
+ }
+
+ /* Check for pending BO grant for LC */
+ if((cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo != NULLP) &&
+ (!cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo->isMsg4Pdu))
+ {
+ if((schFillBoGrantDlSchedInfo(cell, &dlSchedInfo, dlMsgAlloc)) != ROK)
+ {
+ DU_LOG("\nERROR --> SCH : DL MSG scheduling failed");
+ SCH_FREE(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo, sizeof(DlMsgInfo));
+ return RFAILED;
+ }
+
+ /* Free the dl ded msg info allocated in macSchDlRlcBoInfo */
+ SCH_FREE(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.dlMsgTime.slot]->dlMsgInfo, sizeof(DlMsgInfo));
+ }
+
+ /* Send msg to MAC */
+ ret = sendDlAllocToMac(&dlSchedInfo, schInst);
if(ret != ROK)
{
- DU_LOG("\nSending DL Broadcast allocation from SCH to MAC failed");
- RETVALUE(ret);
+ DU_LOG("\nERROR --> SCH : Sending DL Broadcast allocation from SCH to MAC failed");
+ return (ret);
}
-
- schUlResAlloc(cell, schInst);
- return ret;
+ schInitDlSlot(cell->schDlSlotInfo[slot]);
+ schUlResAlloc(cell, schInst);
+
+
+ return ret;
}
/**********************************************************************