SchCellCb *cell = schCb[inst].cells[inst];
SchPucchCfgCmn *pucchCfg = NULLP;
SchBwpParams *ulBwp = NULLP;
+ SchUeCb *ueCb = NULLP;
uint16_t startPrb;
GET_UE_ID(schPucchInfo->rnti, ueId);
ueIdx = ueId -1;
+#ifdef NR_DRX
+ ueCb = schGetUeCb(cell, schPucchInfo->rnti);
+ if(ueCb->ueDrxInfoPres)
+ {
+ if(!ueCb->drxUeCb.drxUlUeActiveStatus)
+ return RFAILED;
+ }
+#endif
if(cell->ueCb[ueIdx].ueCfg.spCellCfg.servCellCfg.initUlBwp.pucchCfgPres)
{
/* fill pucch dedicated cfg */
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
{
int ret = ROK;
+ SchUeCb *ueCb;
UlSchedInfo ulSchedInfo;
SchUlSlotInfo *schUlSlotInfo = NULLP;
SlotTimingInfo ulTimingInfo;
memset(&ulSchedInfo, 0, sizeof(UlSchedInfo));
/* add PHY delta */
- ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA_UL+SCHED_DELTA);
+ ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA_UL+SCHED_DELTA, cell->numSlots);
ulSchedInfo.cellId = cell->cellId;
ulSchedInfo.slotIndInfo.cellId = ulSchedInfo.cellId;
if(schUlSlotInfo->schPuschInfo)
{
ulSchedInfo.crnti = schUlSlotInfo->schPuschInfo->crnti;
+ /* Check the ue drx status if the UE is active for uplink scheduling or not */
+#ifdef NR_DRX
+ ueCb = schGetUeCb(cell, ulSchedInfo.crnti);
+ if(ueCb->ueDrxInfoPres)
+ {
+ if(!ueCb->drxUeCb.drxUlUeActiveStatus)
+ return RFAILED;
+ }
+#endif
ulSchedInfo.dataType |= SCH_DATATYPE_PUSCH;
memcpy(&ulSchedInfo.schPuschInfo, schUlSlotInfo->schPuschInfo,
sizeof(SchPuschInfo));
memcpy(&ulSchedInfo.schPucchInfo, &schUlSlotInfo->schPucchInfo,
sizeof(SchPucchInfo));
}
+ else
+ {
+ return RFAILED;
+ }
memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo));
}
/* set HARQ flag to true */
schUlSlotInfo->schPucchInfo.harqFlag = true;
schUlSlotInfo->schPucchInfo.numHarqBits = 1; /* 1 bit for HARQ */
- ADD_DELTA_TO_TIME(pucchTime, pucchTime, 3); /* SLOT_DELAY=3 */
+ ADD_DELTA_TO_TIME(pucchTime, pucchTime, 3, cell->numSlots); /* SLOT_DELAY=3 */
cmLListAdd2Tail(&(ueCb->hqDlmap[pucchTime.slot]->hqList), &hqP->ulSlotLnk);
}
return ROK;
*******************************************************************/
bool schProcessSrOrBsrReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, bool isRetx, SchUlHqProcCb **hqP)
{
- bool k2Found = FALSE, ret = RFAILED;
+ bool k2Found = FALSE;
+ uint8_t ret = RFAILED;
uint8_t startSymb = 0, symbLen = 0;
uint8_t k2TblIdx = 0, k2Index = 0, k2Val = 0;
uint16_t startPrb = 0;
}
/* Calculating time frame to send DCI for SR */
- ADD_DELTA_TO_TIME(currTime, dciTime, PHY_DELTA_DL + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(currTime, dciTime, PHY_DELTA_DL + SCHED_DELTA, cell->numSlots);
#ifdef NR_TDD
if(schGetSlotSymbFrmt(dciTime.slot, cell->slotFrmtBitMap) == DL_SLOT)
#endif
}
/* Check for number of Symbol of PUSCH should be same as original in case of transmisson*/
/* Calculating time frame to send PUSCH for SR */
- ADD_DELTA_TO_TIME(dciTime, puschTime, k2Val);
+ ADD_DELTA_TO_TIME(dciTime, puschTime, k2Val, cell->numSlots);
#ifdef NR_TDD
if(schGetSlotSymbFrmt(puschTime.slot, cell->slotFrmtBitMap) == DL_SLOT)
continue;
break;
}
}
-
+
if(k2Found == true)
{
ret = schCalculateUlTbs(ueCb, puschTime, symbLen, &startPrb, &totDataReq, isRetx, *hqP);
updateBsrAndLcList(&((*hqP)->ulLcPrbEst.defLcList), ueCb->bsrInfo, RFAILED);
}
}
- return (ret);
+ else
+ {
+ DU_LOG("\nERROR --> SCH : schProcessSrOrBsrReq(): K2 value is not found");
+ return false;
+ }
+ return true;
}