#include "du_app_mac_inf.h"
#include "mac_sch_interface.h"
#include "sch.h"
+#include "sch_tmr.h"
#include "sch_utils.h"
#include "cm_llist.h"
-
-SchMacDlReleaseHarqFunc schMacDlReleaseHarqOpts[] =
-{
- packSchMacDlReleaseHarq,
- MacSchReleaseDlHarqProc,
- packSchMacDlReleaseHarq
-};
+#ifdef NR_DRX
+#include "sch_drx.h"
+#endif
typedef struct schCellCb SchCellCb;
typedef struct schUeCb SchUeCb;
void schDlHqEntInit(SchCellCb *cellCb, SchUeCb *ueCb)
{
ueCb->dlHqEnt.numHqPrcs = SCH_MAX_NUM_DL_HQ_PROC;
- ueCb->dlHqEnt.maxHqTx = cellCb->cellCfg.schHqCfg.maxDlDataHqTx;
+ ueCb->dlHqEnt.maxHqTx = cellCb->schHqCfg.maxDlDataHqTx;
ueCb->dlHqEnt.cell = cellCb;
ueCb->dlHqEnt.ue =ueCb;
schDlHqEntReset(cellCb, ueCb, &ueCb->dlHqEnt);
hqP->dlHqEntLnk.node = (PTR)hqP;
hqP->dlHqProcLink.node = (PTR)hqP;
hqP->ulSlotLnk.node = (PTR)hqP;
+ cellCb->api->SchInitDlHqProcCb(hqP);
schDlHqAddToFreeList(hqP);
}
}
**/
void schDlReleaseHqProcess(SchDlHqProcCb *hqP)
{
+ SchCellCb *cellCb = NULLP;
if(hqP)
{
- cmLListDeleteLList(&hqP->dlLcPrbEst.dedLcList);
- cmLListDeleteLList(&hqP->dlLcPrbEst.defLcList);
+ cellCb = hqP->hqEnt->cell;
+ cellCb->api->SchFreeDlHqProcCb(hqP);
schDlHqDeleteFromInUseList(hqP);
schDlHqAddToFreeList(hqP);
}
rlsHqInfo->ueHqInfo[0].crnti = hqP->hqEnt->ue->crnti;
rlsHqInfo->ueHqInfo[0].hqProcId = hqP->procId;
- return(*schMacDlReleaseHarqOpts[pst.selector])(&pst, rlsHqInfo);
+ return(MacMessageRouter(&pst, (void *)rlsHqInfo));
}
/**
* @brief Release Harq process TB from the DL Harq process
hqP->tbInfo[tbIdx].state = HQ_TB_NACKED;
if (HQ_TB_WAITING == hqP->tbInfo[tbIdx^1].state)
{
- cmLListAdd2Tail( &(hqP->hqEnt->ue->dlRetxHqList), &hqP->dlHqProcLink);
+ hqP->hqEnt->cell->api->SchAddToDlHqRetxList(hqP);
}
}
}
}
else
{
- if( hqP->tbInfo[0].txCntr >= hqP->hqEnt->cell->cellCfg.schHqCfg.maxMsg4HqTx)
+ if( hqP->tbInfo[0].txCntr >= hqP->hqEnt->cell->schHqCfg.maxMsg4HqTx)
{
schDlReleaseHqProcess(hqP);
- hqP->hqEnt->ue->msg4Proc = NULLP;
+ hqP->hqEnt->ue->msg4HqProc = NULLP;
hqP->hqEnt->ue->retxMsg4HqProc = NULLP;
/* Delete UE and RA context */
}
- addUeToBeScheduled(hqP->hqEnt->cell,hqP->hqEnt->ue->ueId);
+ hqP->hqEnt->cell->api->SchAddUeToSchedule(hqP->hqEnt->cell,hqP->hqEnt->ue->ueId);
hqP->hqEnt->ue->retxMsg4HqProc = hqP;
}
}
+
/**
* @brief Handles Harq feedback for DL Data
*
else
{
schDlHqTbFail(hqP, tbIdx, FALSE);
- addUeToBeScheduled(hqP->hqEnt->cell, hqP->hqEnt->ue->ueId);
}
}
}
}
}
+
+/**
+ * @brief Deletes HARQ Entity
+ *
+ * @details
+ *
+ * Function : schDlHqEntDelete
+ *
+ * This function deletes HARQ entity and its member paremeters
+ *
+ * @param[in] Pointer to UE
+ * @return
+ * -# void
+ **/
+void schDlHqEntDelete(SchUeCb *ueCb)
+{
+ uint8_t count;
+ SchDlHqProcCb *hqP;
+
+ cmLListDeleteLList(&ueCb->dlHqEnt.free);
+ cmLListDeleteLList(&ueCb->dlHqEnt.inUse);
+ for(count=0; count < ueCb->dlHqEnt.numHqPrcs; count++)
+ {
+ hqP = &(ueCb->dlHqEnt.procs[count]);
+ ueCb->cellCb->api->SchDeleteDlHqProcCb(hqP);
+ }
+ memset(&ueCb->dlHqEnt, 0, sizeof(SchDlHqEnt));
+}
+
/**********************************************************************
End of file
**********************************************************************/