#include "mac_sch_interface.h"
#include "sch.h"
#include "sch_utils.h"
+#ifdef NR_DRX
+#include "sch_drx.h"
+#endif
SchMacDlAllocFunc schMacDlAllocOpts[] =
{
dlSchedInfo.cellId = cell->cellId;
slot = dlSchedInfo.schSlotValue.broadcastTime.slot;
+#ifdef NR_DRX
+ schHandleStartDrxTimer(cell);
+#endif
+
/* Check for SSB occassion */
dlBrdcstAlloc->ssbTrans = schCheckSsbOcc(cell, dlSchedInfo.schSlotValue.broadcastTime);
if(dlBrdcstAlloc->ssbTrans)
{
ueNode = (uint8_t *)pendingUeNode->node;
ueId = *(uint8_t *)(pendingUeNode->node);
+
/* If RAR is pending for this UE, schedule PDCCH,PDSCH to send RAR and
* PUSCH to receive MSG3 as per k0-k2 configuration*/
if(cell->raReq[ueId-1] != NULLP)
schMsg3RetxSchedulingForUe(&(cell->raCb[ueId-1]));
}
+#ifdef NR_DRX
+ if(!(cell->ueCb[ueId-1].ueDrxInfoPres) && !(cell->ueCb[ueId-1].drxUeCb.drxDlUeActiveStatus))//&& !(cell->ueCb[ueId-1].drxUeCb.drxUlUeActiveStatus))
+ {
+ cmLListAdd2Tail(&cell->ueToBeScheduled, cmLListDelFrm(&cell->ueToBeScheduled, pendingUeNode));
+ }
+ else
+#endif
+ {
/* If MSG4 is pending for this UE, schedule PDCCH,PDSCH to send MSG4 and
* PUCCH to receive UL msg as per k0-k1 configuration */
if (cell->ueCb[ueId-1].retxMsg4HqProc) //should work from dlmap later tbd
/* If DL scheduling failed, free the newly assigned HARQ process */
if(!isDlMsgScheduled)
schDlReleaseHqProcess(hqP);
+ else
+ {
+#ifdef NR_DRX
+ if(cell->ueCb[ueId-1].ueDrxInfoPres)
+ schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], PHY_DELTA_DL + SCHED_DELTA);
+#endif
+ }
}
}
isUlGrantScheduled = schProcessSrOrBsrReq(cell, *slotInd, ueId, FALSE, &ulHqP);
if(!isUlGrantScheduled)
schUlReleaseHqProcess(ulHqP, FALSE);
+ else
+ {
+#ifdef NR_DRX
+ if(cell->ueCb[ueId-1].ueDrxInfoPres)
+ schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], PHY_DELTA_UL + SCHED_DELTA);
+#endif
+ }
}
}
SCH_FREE(ueNode, sizeof(uint8_t));
deleteNodeFromLList(&cell->ueToBeScheduled, pendingUeNode);
}
- }
+ }}
}
/* Check if any PDU is scheduled at this slot for any UE */
schInitDlSlot(cell->schDlSlotInfo[slot]);
schUlResAlloc(cell, schInst);
-
+#ifdef NR_DRX
+ schHandleExpiryDrxTimer(cell);
+#endif
return ret;
}