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=0e2c7f1a1fd3491ef8772aa24b16d142851ebce6;hpb=fcf583c575025651191abc59b4a4535a9d01eab1;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 0e2c7f1a1..8b423b27a 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -242,9 +242,6 @@ bool schFillBoGrantDlSchedInfo(SchCellCb *cell, SlotTimingInfo currTime, uint8_t } } - schAllocPucchResource(cell, pucchTime, crnti, ueCb, isRetx, *hqP); - - cell->schDlSlotInfo[pdschTime.slot]->pdschUe = ueId; cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId; /*Re-setting the BO's of all DL LCs in this UE*/ @@ -423,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; @@ -435,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 @@ -483,10 +481,6 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, continue; } #endif - if(cell->schDlSlotInfo[pdschTime->slot]->pdschUe != 0) - { - continue; - } numK1 = k0K1InfoTbl->k0k1TimingInfo[pdcchTime->slot].k0Indexes[k0TblIdx].k1TimingInfo.numK1; for(k1TblIdx = 0; k1TblIdx < numK1; k1TblIdx++) @@ -525,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.