X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_common.c;h=76758a683d72d9417c416bac3479868feb748a43;hb=c449cf0b0cc8794c2e2d28dcc4c9bd8b9534e697;hp=c441a0c8c3126196ed4f643687ca262c9230f3d3;hpb=b7a8e8fc6abc7fba2f580684da44413d481be825;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c index c441a0c8c..76758a683 100644 --- a/src/5gnrsch/sch_common.c +++ b/src/5gnrsch/sch_common.c @@ -413,10 +413,19 @@ uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming 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 */ @@ -470,6 +479,7 @@ uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst) { int ret = ROK; + SchUeCb *ueCb; UlSchedInfo ulSchedInfo; SchUlSlotInfo *schUlSlotInfo = NULLP; SlotTimingInfo ulTimingInfo; @@ -491,6 +501,15 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst) 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)); @@ -507,6 +526,10 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst) memcpy(&ulSchedInfo.schPucchInfo, &schUlSlotInfo->schPucchInfo, sizeof(SchPucchInfo)); } + else + { + return RFAILED; + } memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo)); }