X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrsch%2Fsch_slot_ind.c;h=2a21774e5e8ce8b147dfdd8bcf6b76fb28cbf15e;hb=b3d5c17f74361fcdcb9b9febff450292197e3a57;hp=74574ebd99ff6414d16cc603f7e367c20f9f70f0;hpb=913519063008692a8245dd502002676cf1ee9290;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 74574ebd9..2a21774e5 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -40,6 +40,7 @@ File: sch_slot_ind.c #include "du_app_mac_inf.h" #include "mac_sch_interface.h" #include "sch.h" +#include "sch_tmr.h" #include "sch_utils.h" #ifdef NR_DRX #include "sch_drx.h" @@ -111,7 +112,7 @@ bool schFillBoGrantDlSchedInfo(SchCellCb *cell, SlotTimingInfo currTime, uint8_t } } - if(findValidK0K1Value(cell, currTime, ueId, ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1TblPrsnt,\ + if(findValidK0K1Value(cell, currTime, ueId, ueCb->k0K1TblPrsnt,\ &pdschStartSymbol, &pdschNumSymbols, &pdcchTime, &pdschTime, &pucchTime, isRetx, *hqP) != true ) { /* If a valid combination of slots to scheduled PDCCH, PDSCH and PUCCH is @@ -436,7 +437,7 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, if(dedMsg == true) { ueCb = &cell->ueCb[ueId-1]; - k0K1InfoTbl = &ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.k0K1InfoTbl; + k0K1InfoTbl = &ueCb->k0K1InfoTbl; } else { @@ -650,6 +651,8 @@ uint8_t SchProcSlotInd(Pst *pst, SlotTimingInfo *slotInd) DlBrdcstAlloc *dlBrdcstAlloc = NULLP; SchCellCb *cell = NULLP; Inst schInst = pst->dstInst-SCH_INST_START; + CmLList *node = NULLP; + TotalPrbUsage *dlTotalPrbUsage = NULLP; cell = schCb[schInst].cells[schInst]; if(cell == NULLP) @@ -749,11 +752,26 @@ uint8_t SchProcSlotInd(Pst *pst, SlotTimingInfo *slotInd) return (ret); } + /* Update DL PRB Usage for all stats group which requested for DL Total PRB Usage */ + node = cmLListFirst(&schCb[schInst].statistics.activeKpiList.dlTotPrbUseList); + while(node) + { + dlTotalPrbUsage = (TotalPrbUsage *)node->node; + dlTotalPrbUsage->numPrbUsedForTx += cell->schDlSlotInfo[slot]->prbAlloc.numPrbAlloc; + dlTotalPrbUsage->totalPrbAvailForTx += MAX_NUM_RB; + node = node->next; + } + + /* Re-initialize DL slot */ schInitDlSlot(cell->schDlSlotInfo[slot]); + + /* Send UL Resource allocation to MAC */ schUlResAlloc(cell, schInst); + #ifdef NR_DRX schHandleExpiryDrxTimer(cell); #endif + return ret; }