X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_harq_ul.c;h=c5433f9fec1355de00dd94e9927eefca8dba7189;hb=f73456bd55152c329601f8286ae67fe9875025bc;hp=fdd5ffa5ab6c1d169f933dd51f05b685349c80f1;hpb=d9f7fc765d1fc24949ec5536c2a4e3296b250e5a;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_harq_ul.c b/src/5gnrsch/sch_harq_ul.c index fdd5ffa5a..c5433f9fe 100644 --- a/src/5gnrsch/sch_harq_ul.c +++ b/src/5gnrsch/sch_harq_ul.c @@ -24,7 +24,11 @@ #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" +#endif typedef struct schCellCb SchCellCb; typedef struct schUeCb SchUeCb; void schUlHqEntReset(SchCellCb *cellCb, SchUeCb *ueCb, SchUlHqEnt *hqE); @@ -46,7 +50,7 @@ void schUlHqAddToFreeList(SchUlHqProcCb *hqP); void schUlHqEntInit(SchCellCb *cellCb, SchUeCb *ueCb) { ueCb->ulHqEnt.numHqPrcs = SCH_MAX_NUM_UL_HQ_PROC; - ueCb->ulHqEnt.maxHqTx = cellCb->cellCfg.schHqCfg.maxUlDataHqTx; + ueCb->ulHqEnt.maxHqTx = cellCb->schHqCfg.maxUlDataHqTx; ueCb->ulHqEnt.cell = cellCb; ueCb->ulHqEnt.ue =ueCb; schUlHqEntReset(cellCb, ueCb, &ueCb->ulHqEnt); @@ -81,9 +85,11 @@ void schUlHqEntReset(SchCellCb *cellCb, SchUeCb *ueCb, SchUlHqEnt *hqE) hqP->ulHqEntLnk.node = (PTR)hqP; hqP->ulHqProcLink.node = (PTR)hqP; hqP->ulSlotLnk.node = (PTR)hqP; + cellCb->api->SchInitUlHqProcCb(hqP); schUlHqAddToFreeList(hqP); } } + /** * @brief Add hq process to free list of UL Harq entity * @@ -210,12 +216,15 @@ uint8_t schUlGetAvlHqProcess(SchCellCb *cellCb, SchUeCb *ueCb, SchUlHqProcCb **h **/ void schUlReleaseHqProcess(SchUlHqProcCb *hqP, Bool togNdi) { + SchCellCb *cellCb = NULLP; if (togNdi == TRUE) { hqP->tbInfo.ndi ^= 1; } - cmLListDeleteLList(&hqP->ulLcPrbEst.dedLcList); - cmLListDeleteLList(&hqP->ulLcPrbEst.defLcList); + + cellCb = hqP->hqEnt->cell; + cellCb->api->SchFreeUlHqProcCb(hqP); + schUlHqDeleteFromInUseList(hqP); schUlHqAddToFreeList(hqP); } @@ -236,8 +245,7 @@ void schUlHqProcessNack(SchUlHqProcCb *hqP) { if (hqP->tbInfo.txCntr < hqP->maxHqTxPerHqP) { - cmLListAdd2Tail(&(hqP->hqEnt->ue->ulRetxHqList), &hqP->ulHqProcLink); - addUeToBeScheduled(hqP->hqEnt->cell, hqP->hqEnt->ue->ueId); + hqP->hqEnt->cell->api->SchAddToUlHqRetxList(hqP); } else { @@ -261,6 +269,35 @@ void schUlHqProcessAck(SchUlHqProcCb *hqP) { schUlReleaseHqProcess(hqP, TRUE); } + +/** + * @brief Deletes HARQ Entity + * + * @details + * + * Function : schUlHqEntDelete + * + * This function deletes HARQ entity and its member paremeters + * + * @param[in] Pointer to UE + * @return + * -# void + **/ +void schUlHqEntDelete(SchUeCb *ueCb) +{ + uint8_t count; + SchUlHqProcCb *hqP; + + cmLListDeleteLList(&ueCb->ulHqEnt.free); + cmLListDeleteLList(&ueCb->ulHqEnt.inUse); + for(count=0; count < ueCb->ulHqEnt.numHqPrcs; count++) + { + hqP = &(ueCb->ulHqEnt.procs[count]); + ueCb->cellCb->api->SchDeleteUlHqProcCb(hqP); + } + memset(&ueCb->ulHqEnt, 0, sizeof(SchUlHqEnt)); +} + /********************************************************************** End of file - **********************************************************************/ \ No newline at end of file + **********************************************************************/