X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_fcfs.c;h=ef74b58d6f2ee281639be0a2ad9d5cd2656445d5;hb=8264f7ce2ba9f4a1874c4ec1018127cc27fa12cb;hp=e949f3b10a607693d009de85d8f0fb920df3a7da;hpb=6728f585748724cc547847596e2f300d83b3ffce;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_fcfs.c b/src/5gnrsch/sch_fcfs.c index e949f3b10..ef74b58d6 100644 --- a/src/5gnrsch/sch_fcfs.c +++ b/src/5gnrsch/sch_fcfs.c @@ -906,8 +906,8 @@ uint8_t schFcfsScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTime, ui uint8_t ret = RFAILED; uint16_t startPrb = 0; uint32_t totDataReq = 0; /* in bytes */ - SchUeCb *ueCb; - SchPuschInfo *puschInfo; + SchUeCb *ueCb = NULLP; + SchPuschInfo *puschInfo = NULLP; DciInfo *dciInfo = NULLP; cell = (*hqP)->hqEnt->cell; @@ -936,22 +936,18 @@ uint8_t schFcfsScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTime, ui /* Update PUSCH allocation */ if(schFillPuschAlloc(ueCb, puschTime, totDataReq, startSymb, symbLen, startPrb, isRetx, *hqP) == ROK) { - if(cell->schUlSlotInfo[puschTime.slot]->schPuschInfo) + puschInfo = cell->schUlSlotInfo[puschTime.slot]->schPuschInfo[ueCb->ueId - 1]; + if(puschInfo != NULLP) { - puschInfo = cell->schUlSlotInfo[puschTime.slot]->schPuschInfo; - if(puschInfo != NULLP) - { - /* Fill DCI for UL grant */ - schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP); - ueCb->srRcvd = false; - ueCb->bsrRcvd = false; - cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId; - if(fcfsHqProcCb->lcCb.dedLcList.count != 0) - updateBsrAndLcList(&(fcfsHqProcCb->lcCb.dedLcList), ueCb->bsrInfo, ROK); - updateBsrAndLcList(&(fcfsHqProcCb->lcCb.defLcList), ueCb->bsrInfo, ROK); - cmLListAdd2Tail(&(ueCb->hqUlmap[puschTime.slot]->hqList), &(*hqP)->ulSlotLnk); - return ROK; - } + /* Fill DCI for UL grant */ + schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP); + ueCb->srRcvd = false; + ueCb->bsrRcvd = false; + if(fcfsHqProcCb->lcCb.dedLcList.count != 0) + updateBsrAndLcList(&(fcfsHqProcCb->lcCb.dedLcList), ueCb->bsrInfo, ROK); + updateBsrAndLcList(&(fcfsHqProcCb->lcCb.defLcList), ueCb->bsrInfo, ROK); + cmLListAdd2Tail(&(ueCb->hqUlmap[puschTime.slot]->hqList), &(*hqP)->ulSlotLnk); + return ROK; } } if(fcfsHqProcCb->lcCb.dedLcList.count != 0) @@ -1274,12 +1270,23 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst) else { #ifdef NR_DRX - schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], PHY_DELTA_DL + SCHED_DELTA); + schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], gConfigInfo.gPhyDeltaDl + SCHED_DELTA); #endif } } } - + } +#ifdef NR_DRX + if((cell->ueCb[ueId-1].ueDrxInfoPres == true) && (cell->ueCb[ueId-1].drxUeCb.drxUlUeActiveStatus != true)) + { + if(pendingUeNode->node) + { + cmLListAdd2Tail(&fcfsCell->ueToBeScheduled, cmLListDelFrm(&fcfsCell->ueToBeScheduled, pendingUeNode)); + } + } + else +#endif + { /* Scheduling of UL grant */ node = NULLP; if(fcfsUeCb) @@ -1309,7 +1316,7 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst) else { #ifdef NR_DRX - schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], PHY_DELTA_UL + SCHED_DELTA); + schHdlDrxInActvStrtTmr(cell, &cell->ueCb[ueId-1], gConfigInfo.gPhyDeltaUl + SCHED_DELTA); #endif } }