X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_slot_ind.c;h=8b423b27aa622554463157709a15ec7a9fbd7dee;hb=42e50f5a3e46d7ca3afe97907b39d2a0c79a21c2;hp=62c1bbbcac913ac024ce6a36cc90f15ac8fff9b5;hpb=d84801d796815c8d5ad3be643687b470511af945;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 62c1bbbca..8b423b27a 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -242,8 +242,6 @@ bool schFillBoGrantDlSchedInfo(SchCellCb *cell, SlotTimingInfo currTime, uint8_t } } - schAllocPucchResource(cell, pucchTime, crnti, ueCb, isRetx, *hqP); - cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId; /*Re-setting the BO's of all DL LCs in this UE*/ @@ -422,6 +420,7 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, { uint8_t numK0 = 0, k0TblIdx = 0, k0Val = 0, k0Index =0 ; uint8_t k1TblIdx = 0, k1Index = 0, k1Val = 0, numK1 = 0; + uint8_t ret = RFAILED; SchUeCb *ueCb = NULLP; SchK0K1TimingInfoTbl *k0K1InfoTbl; @@ -434,14 +433,14 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, } #endif + ueCb = &cell->ueCb[ueId-1]; if(dedMsg == true) { - ueCb = &cell->ueCb[ueId-1]; k0K1InfoTbl = &ueCb->k0K1InfoTbl; if(schDlCandidateSelection(ueCb, *pdcchTime, pdcchAllocInfo) == false) { - DU_LOG("\nDEBUG --> SCH: DL candidate Selection failed bcz PDCCH is unavailable for this slot"); - return false; + DU_LOG("\nDEBUG --> SCH: DL candidate Selection failed bcz PDCCH is unavailable for this slot"); + return false; } } else @@ -520,9 +519,20 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, pdcchTime->cellId = cell->cellId; pdschTime->cellId = cell->cellId; + cell->schUlSlotInfo[pucchTime->slot]->pucchUe = ueId; + + /*Availability of PUCCH for HARQ resources*/ + ret = schAllocPucchResource(cell, *pucchTime, ueCb, hqP, pdcchAllocInfo); + if(ret == RFAILED) + { + /*DL allocation can't go through as PUCCH is unavailable*/ + return false; + } return true; } } + + /* * Number of symbols in case of retransmisson should be same as it was in * original transmisson. Symbol availablity checks need to be added.