*/
/* header include files -- defines (.h) */
-#include "envopt.h" /* environment options */
-#include "envdep.h" /* environment dependent */
-#include "envind.h" /* environment independent */
-
-#include "gen.h" /* general */
-#include "ssi.h" /* system services */
-
-#include "cm_lte.h" /* Common LTE */
-#include "cm_tkns.h" /* Common Token Defines */
-#include "cm_llist.h" /* Common Link List Defines */
-#include "cm_hash.h" /* Common Hash List Defines */
-#include "cm_mblk.h" /* memory management */
-
+#include "common_def.h"
#include "rg_env.h" /* MAC Environment Defines */
#include "tfu.h" /* TFU Interface defines */
#include "rgr.h" /* RGR Interface defines */
#include "rg_sch_err.h" /* MAC error defines */
/* header/extern include files (.x) */
-#include "gen.x" /* general */
-#include "ssi.x" /* system services */
-#include "cm5.x" /* system services */
-#include "cm_lte.x" /* Common LTE */
-#include "cm_tkns.x" /* Common Token Definitions */
-#include "cm_llist.x" /* Common Link List Definitions */
-#include "cm_lib.x" /* Common Library Definitions */
-#include "cm_hash.x" /* Common Hash List Definitions */
-#include "cm_mblk.x" /* memory management */
#include "tfu.x" /* TFU Interface defines */
#include "rgr.x" /* RGR Interface includes */
/* forward references */
#ifdef EMTC_ENABLE
- U32 gUlRetxPassCntr = 0;
- /*EXTERN U32 gUlRetxFailCntr;
- EXTERN U32 gUlCrcPassCounter;
- EXTERN U32 gUlCrcFailCounter;*/
+ uint32_t gUlRetxPassCntr = 0;
+ /*uint32_t gUlRetxFailCntr;
+ uint32_t gUlCrcPassCounter;
+ uint32_t gUlCrcFailCounter;*/
#endif
-PUBLIC U8 rgRvIdxTable[] = {0, 3, 1, 2}; /* This gives rvIdx for a given rv */
-PUBLIC U8 rgRvTable[] = {0, 2, 3 ,1}; /* This gives rv for a given rvIdx */
+uint8_t rgRvIdxTable[] = {0, 3, 1, 2}; /* This gives rvIdx for a given rv */
+uint8_t rgRvTable[] = {0, 2, 3 ,1}; /* This gives rv for a given rvIdx */
#ifdef EMTC_ENABLE
-PUBLIC Void rgSCHCmnEmtcHdlHarqProcFail
+Void rgSCHCmnEmtcHdlHarqProcFail
(
RgSchCellCb *cell,
RgSchUeCb *ue,
RgSchUlHqProcCb *hqProc,
CmLteTimingInfo frm
);
-PUBLIC Void rgSCHEmtcInitUlUeHqEnt
+Void rgSCHEmtcInitUlUeHqEnt
(
RgSchCellCb *cell,
RgrUeCfg *ueCfg,
**/
#ifndef MAC_SCH_STATS
#ifdef ANSI
-PUBLIC Void rgSCHUhmProcDatInd
+Void rgSCHUhmProcDatInd
(
RgSchCellCb *cell,
RgSchUeCb *ue,
CmLteTimingInfo frm
)
#else
-PUBLIC Void rgSCHUhmProcDatInd(cell, ue, frm)
+Void rgSCHUhmProcDatInd(cell, ue, frm)
RgSchCellCb *cell;
RgSchUeCb *ue;
CmLteTimingInfo frm;
#endif
#else /* MAC_SCH_STATS */
#ifdef ANSI
-PUBLIC Void rgSCHUhmProcDatInd
+Void rgSCHUhmProcDatInd
(
RgSchCellCb *cell,
RgSchUeCb *ue,
CmLteTimingInfo frm,
-U8 cqi
+uint8_t cqi
)
#else
-PUBLIC Void rgSCHUhmProcDatInd(cell, ue, frm, cqi)
+Void rgSCHUhmProcDatInd(cell, ue, frm, cqi)
RgSchCellCb *cell;
RgSchUeCb *ue;
CmLteTimingInfo frm;
-U8 cqi;
+uint8_t cqi;
#endif
#endif /* MAC_SCH_STATS */
{
#ifdef UL_LA
RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
S32 iTbs;
- U8 maxiTbs = rgSchCmnUlCqiToTbsTbl[cell->isCpUlExtend]
+ uint8_t maxiTbs = rgSchCmnUlCqiToTbsTbl[cell->isCpUlExtend]
[ueUl->maxUlCqi];
#endif
- TRC2(rgSCHUhmProcDatInd);
-
rgSCHUtlUlHqProcForUe(cell, frm, ue, &hqProc);
if (hqProc == NULLP)
{
printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
- ue->ueId, frm.sfn, frm.subframe);
- RETVOID;
+ ue->ueId, frm.sfn, frm.slot);
+ return;
}
hqProc->rcvdCrcInd = TRUE;
}
#endif
- RETVOID;
+ return;
} /* rgSCHUhmProcDatInd */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmProcMsg3DatInd
+Void rgSCHUhmProcMsg3DatInd
(
RgSchUlHqProcCb *hqProc
)
#else
-PUBLIC Void rgSCHUhmProcMsg3DatInd(hqProc)
+Void rgSCHUhmProcMsg3DatInd(hqProc)
RgSchUlHqProcCb *hqProc;
#endif
{
- TRC2(rgSCHUhmProcMsg3DatInd);
hqProc->rcvdCrcInd = TRUE;
hqProc->remTx = 0; /*Reseting the value of rem Tx*/
printf("\nrgSCHUhmProcMsg3DatInd,id:%u\n",hqProc->procId);
- RETVOID;
+ return;
} /* rgSCHUhmProcMsg3DatInd */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmProcMsg3Failure
+Void rgSCHUhmProcMsg3Failure
(
RgSchUlHqProcCb *hqProc
)
#else
-PUBLIC Void rgSCHUhmProcMsg3Failure(hqProc)
+Void rgSCHUhmProcMsg3Failure(hqProc)
RgSchUlHqProcCb *hqProc;
#endif
{
- TRC2(rgSCHUhmProcMsg3Failure);
#ifdef EMTC_ENABLE
RG_SCH_EMTC_IS_CRCIND_RCVD_CHK_RACB(hqProc);
#endif
hqProc->rcvdCrcInd = FALSE;
}
- RETVOID;
+ return;
} /* rgSCHUhmProcMsg3Failure */
/**
**/
#ifndef MAC_SCH_STATS
#ifdef ANSI
-PUBLIC Void rgSCHUhmProcHqFailure
+Void rgSCHUhmProcHqFailure
(
RgSchCellCb *cell,
RgSchUeCb *ue,
CmLteTimingInfo frm,
-TknU8 rv
+TknUInt8 rv
)
#else
-PUBLIC Void rgSCHUhmProcHqFailure(cell, ue, frm, rv)
+Void rgSCHUhmProcHqFailure(cell, ue, frm, rv)
RgSchCellCb *cell;
RgSchUeCb *ue;
CmLteTimingInfo frm;
-TknU8 rv;
+TknUInt8 rv;
#endif
#else /* MAC_SCH_STATS */
#ifdef ANSI
-PUBLIC Void rgSCHUhmProcHqFailure
+Void rgSCHUhmProcHqFailure
(
RgSchCellCb *cell,
RgSchUeCb *ue,
CmLteTimingInfo frm,
-TknU8 rv,
-U8 cqi
+TknUInt8 rv,
+uint8_t cqi
)
#else
-PUBLIC Void rgSCHUhmProcHqFailure(cell, ue, frm, rv, cqi)
+Void rgSCHUhmProcHqFailure(cell, ue, frm, rv, cqi)
RgSchCellCb *cell;
RgSchUeCb *ue;
CmLteTimingInfo frm;
-TknU8 rv;
-U8 cqi;
+TknUInt8 rv;
+uint8_t cqi;
#endif
#endif /* MAC_SCH_STATS */
{
RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue,cell);
S32 iTbs;
#endif
- TRC2(rgSCHUhmProcHqFailure);
rgSCHUtlUlHqProcForUe(cell, frm, ue, &hqProc);
if (hqProc == NULLP)
{
printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
- ue->ueId, frm.sfn, frm.subframe);
- RETVOID;
+ ue->ueId, frm.sfn, frm.slot);
+ return;
}
#ifdef UL_LA
{
#ifdef MAC_SCH_STATS
/** Stats update over here */
{
- static U32 retxCnt = 0;
+ static uint32_t retxCnt = 0;
++retxCnt;
hqFailStats.ulCqiStat[cqi - 1].numOfNacks++;
}
{
hqProc->rvIdxPhy.val = rgRvIdxTable[rv.val];
}
- RETVOID;
+ return;
} /* rgSCHUhmProcHqFailure */
/**
* -# NULL
**/
#ifdef ANSI
-PUBLIC RgSchUlHqProcCb* rgSCHUhmGetUlHqProc
+RgSchUlHqProcCb* rgSCHUhmGetUlHqProc
(
RgSchCellCb *cell,
RgSchUeCb *ue,
-U8 idx
+uint8_t idx
)
#else
-PUBLIC RgSchUlHqProcCb* rgSCHUhmGetUlHqProc(cell, ue, idx)
+RgSchUlHqProcCb* rgSCHUhmGetUlHqProc(cell, ue, idx)
RgSchCellCb *cell;
RgSchUeCb *ue;
-U8 idx;
+uint8_t idx;
#endif
{
RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
- TRC2(rgSCHUhmGetUlHqProc);
#if (ERRCLASS & ERRCLS_DEBUG)
if(idx >= ueUl->hqEnt.numHqPrcs)
{
- RETVALUE(NULLP);
+ return (NULLP);
}
#endif
- RETVALUE(&(ueUl->hqEnt.hqProcCb[idx]));
+ return (&(ueUl->hqEnt.hqProcCb[idx]));
} /* rgSCHUhmGetUlHqProc */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmNewTx
+Void rgSCHUhmNewTx
(
RgSchUlHqProcCb *hqProc,
-U8 maxHqRetx,
+uint8_t maxHqRetx,
RgSchUlAlloc *alloc
)
#else
-PUBLIC Void rgSCHUhmNewTx(hqProc, maxHqRetx, alloc)
+Void rgSCHUhmNewTx(hqProc, maxHqRetx, alloc)
RgSchUlHqProcCb *hqProc;
-U8 maxHqRetx;
+uint8_t maxHqRetx;
RgSchUlAlloc *alloc;
#endif
{
- TRC2(rgSCHUhmNewTx);
hqProc->ndi ^= 1;
hqProc->alloc = alloc;
((RgUeUlHqCb*)hqProc->hqEnt)->numBusyHqProcs++;
}
#endif
- RETVOID;
+ return;
} /* rgSCHUhmNewTx */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmFreeProc
+Void rgSCHUhmFreeProc
(
RgSchUlHqProcCb *hqProc,
RgSchCellCb *cell
)
#else
-PUBLIC Void rgSCHUhmFreeProc(hqProc, cell)
+Void rgSCHUhmFreeProc(hqProc, cell)
RgSchUlHqProcCb *hqProc;
RgSchCellCb *cell;
#endif
{
#ifdef LTE_L2_MEAS
RgSchUeCb *ueCb;
- U8 qci = 1;
+ uint8_t qci = 1;
#endif
- TRC2(rgSCHUhmFreeProc);
#ifdef LTE_L2_MEAS
if (hqProc->alloc && hqProc->alloc->ue)
ueCb = hqProc->alloc->ue;
if (ueCb && cell)
{
- U32 nonLcg0ReportedBs = ((RgSchCmnLcg *)(ueCb->ul.lcgArr[1].sch))->reportedBs + \
+ uint32_t nonLcg0ReportedBs = ((RgSchCmnLcg *)(ueCb->ul.lcgArr[1].sch))->reportedBs + \
((RgSchCmnLcg *)(ueCb->ul.lcgArr[2].sch))->reportedBs + \
((RgSchCmnLcg *)(ueCb->ul.lcgArr[3].sch))->reportedBs;
((RgUeUlHqCb*)hqProc->hqEnt)->numBusyHqProcs--;
#endif
hqProc->alloc = NULLP;
hqProc->ulSfIdx = RGSCH_INVALID_INFO;
- /*ccpu00116293 - Correcting relation between UL subframe and DL subframe based on RG_UL_DELTA*/
+ /*ccpu00116293 - Correcting relation between UL slot and DL slot based on RG_UL_DELTA*/
hqProc->isRetx = FALSE;
hqProc->remTx = 0; /*Reseting the remTx value to 0*/
#ifdef EMTC_ENABLE
{
printf("\nhqEnt is NULL\n");
}
- RETVOID;
+ return;
} /* rgSCHUhmFreeProc */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmRetx
+Void rgSCHUhmRetx
(
RgSchUlHqProcCb *hqProc,
RgSchUlAlloc *alloc
)
#else
-PUBLIC Void rgSCHUhmRetx(hqProc, alloc)
+Void rgSCHUhmRetx(hqProc, alloc)
RgSchUlHqProcCb *hqProc;
RgSchUlAlloc *alloc;
#endif
{
- TRC2(rgSCHUhmRetx);
hqProc->alloc = alloc;
--hqProc->remTx;
hqProc->rvIdx = (hqProc->rvIdx + 1) % 4;
hqProc->rvIdxPhy.pres = FALSE;
- RETVOID;
+ return;
} /* rgSCHUhmRetx */
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmRgrUeCfg
+Void rgSCHUhmRgrUeCfg
(
RgSchCellCb *cellCb,
RgSchUeCb *ueCb,
RgrUeCfg *ueCfg
)
#else
-PUBLIC Void rgSCHUhmRgrUeCfg(cellCb, ueCb, ueCfg)
+Void rgSCHUhmRgrUeCfg(cellCb, ueCb, ueCfg)
RgSchCellCb *cellCb;
RgSchUeCb *ueCb;
RgrUeCfg *ueCfg;
#endif
{
- U8 i;
+ uint8_t i;
RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ueCb, cellCb);
- TRC2(rgSCHUhmRgrUeCfg);
-
ueUl->hqEnt.maxHqRetx = ((ueCfg->ueUlHqCfg.maxUlHqTx) - 1);
#ifdef TFU_UPGRADE
/* Storing the delta HARQ offset for HARQ + PUSCH */
#ifdef EMTC_ENABLE
rgSCHEmtcInitUlUeHqEnt(cellCb, ueCfg, ueCb);
#endif
- RETVOID;
+ return;
} /* rgSCHUhmRgrUeCfg */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmRgrUeRecfg
+Void rgSCHUhmRgrUeRecfg
(
RgSchCellCb *cellCb,
RgSchUeCb *ueCb,
RgrUeRecfg *ueRecfg
)
#else
-PUBLIC Void rgSCHUhmRgrUeRecfg(cellCb, ueCb, ueRecfg)
+Void rgSCHUhmRgrUeRecfg(cellCb, ueCb, ueRecfg)
RgSchCellCb *cellCb;
RgSchUeCb *ueCb;
RgrUeRecfg *ueRecfg;
#endif
{
RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ueCb, cellCb);
- TRC2(rgSCHUhmRgrUeRecfg);
/* [ccpu00123958]-ADD- Check for HARQ Reconfig from the bit mask */
if(RGR_UE_ULHARQ_RECFG & ueRecfg->ueRecfgTypes)
ueUl->hqEnt.maxHqRetx = (ueRecfg->ueUlHqRecfg.maxUlHqTx - 1);
}
- RETVOID;
+ return;
} /* rgSCHUhmRgrUeRecfg */
/**
* @return Void
**/
#ifdef ANSI
-PUBLIC Void rgSCHUhmFreeUe
+Void rgSCHUhmFreeUe
(
RgSchCellCb *cellCb,
RgUeUlHqCb *hqEnt
)
#else
-PUBLIC Void rgSCHUhmFreeUe(cellCb, hqEnt)
+Void rgSCHUhmFreeUe(cellCb, hqEnt)
RgSchCellCb *cellCb;
RgUeUlHqCb *hqEnt;
#endif
{
- TRC2(rgSCHUhmFreeUe);
#ifdef LTE_TDD
/* ccpu00117052 - MOD - Passing double pointer
for proper NULLP assignment*/
hqEnt->numHqPrcs * sizeof(RgSchUlHqProcCb));
#endif
- RETVOID;
+ return;
} /* rgSCHUhmFreeUe */
* @return Void
*/
#ifdef ANSI
-PUBLIC S16 rgSCHUhmAppendPhich
+S16 rgSCHUhmAppendPhich
(
RgSchCellCb *cellCb,
CmLteTimingInfo frm,
-U8 idx
+uint8_t idx
)
#else
-PUBLIC S16 rgSCHUhmAppendPhich (cellCb, frm, idx)
+S16 rgSCHUhmAppendPhich (cellCb, frm, idx)
RgSchCellCb *cellCb;
CmLteTimingInfo frm;
-U8 idx;
+uint8_t idx;
#endif
{
- U8 nDmrs;
- U8 rbStart;
+ uint8_t nDmrs;
+ uint8_t rbStart;
#ifdef LTE_TDD
- U8 iPhich;
+ uint8_t iPhich;
#endif
RgSchUlAlloc *ulAlloc;
#ifdef LTEMAC_HDFDD
#endif /* LTEMAC_HDFDD */
RgSchCmnUlCell *cellUl = RG_SCH_CMN_GET_UL_CELL(cellCb);
- TRC2(rgSCHUhmAppendPhich)
-
#ifdef RG_5GTF
- RETVALUE(ROK);
+ return ROK;
#endif
if(cellUl->hqFdbkIdx[idx] != RGSCH_INVALID_INFO)
{
if (rgSCHUtlGetPhichInfo (ulAlloc->hqProc, &rbStart, &nDmrs) != ROK)
#endif
{
- RETVALUE (RFAILED);
+ return (RFAILED);
}
if(nDmrs != RGSCH_INVALID_NDMRS)
{
ulAlloc = rgSCHUtlNextHqFdbkAlloc (cellCb, ulAlloc, idx);
}
}
- RETVALUE(ROK);
+ return ROK;
} /* rgSCHUhmAppendPhich */
/**
*
**/
#ifdef ANSI
-PUBLIC S16 rgSCHUhmHqEntInit
+S16 rgSCHUhmHqEntInit
(
RgSchCellCb *cellCb,
RgSchUeCb *ueCb
)
#else
-PUBLIC S16 rgSCHUhmHqEntInit(cellCb, ueCb)
+S16 rgSCHUhmHqEntInit(cellCb, ueCb)
RgSchCellCb *cellCb;
RgSchUeCb *ueCb;
#endif
#ifdef LTE_TDD
Inst inst = ueCb->cell->instIdx;
#endif
- TRC2(rgSCHUhmHqEntInit)
#ifndef LTE_TDD
/* Init the HARQ processes */
ueUl->hqEnt.numHqPrcs * \
sizeof(RgSchUlHqProcCb)) != ROK)
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
#endif
- RETVALUE(ROK);
+ return ROK;
} /* rgSCHUhmHqEntInit */
#ifdef RG_5GTF
*
**/
#ifdef ANSI
-PUBLIC S16 rgSCHUhmGetAvlHqProc
+S16 rgSCHUhmGetAvlHqProc
(
RgSchCellCb *cell,
RgSchUeCb *ue,
RgSchUlHqProcCb **hqP
)
#else
-PUBLIC S16 rgSCHUhmGetAvlHqProc (cell, ue, hqP)
+S16 rgSCHUhmGetAvlHqProc (cell, ue, hqP)
RgSchCellCb *cell;
RgSchUeCb *ue;
RgSchUlHqProcCb **hqP;
CmLList *tmp;
RgUeUlHqCb *hqE;
- TRC2(rgSCHUhmGetAvlHqProc);
-
hqE = &ueUl->hqEnt;
CM_LLIST_FIRST_NODE(&(hqE->free), tmp);
//printf("5GTF_ERROR rgSCHUhmGetAvlHqProc cellId %d %ld inUse %ld ue %d"
//, cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId);
/* No Harq Process available in the free queue. */
- RETVALUE(RFAILED);
+ return RFAILED;
}
tmpHqProc = (RgSchUlHqProcCb *)(tmp->node);
cmLListAdd2Tail(&hqE->inUse, &tmpHqProc->lnk);
#ifdef UL_ADPT_DBG
- printf("rgSCHUhmGetAvlHqProc cellId %d free %ld inUse %ld ue %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.subframe);
+ printf("rgSCHUhmGetAvlHqProc cellId %d free %ld inUse %ld ue %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.slot);
#endif
tmpHqProc->schdTime = cellUl->schdTime;
*hqP = tmpHqProc;
- RETVALUE(ROK);
+ return ROK;
} /* rgSCHUhmGetAvlHqProc */
/**
* -# NULL
**/
#ifdef ANSI
-PUBLIC RgSchUlHqProcCb* rgSCHUhmGetUlProcByTime
+RgSchUlHqProcCb* rgSCHUhmGetUlProcByTime
(
RgSchCellCb *cell,
RgSchUeCb *ue,
CmLteTimingInfo frm
)
#else
-PUBLIC RgSchUlHqProcCb* rgSCHUhmGetUlProcByTime(cell, ue, frm)
+RgSchUlHqProcCb* rgSCHUhmGetUlProcByTime(cell, ue, frm)
RgSchCellCb *cell;
RgSchUeCb *ue;
CmLteTimingInfo frm;
CmLList *lnk = lst->first;
RgSchUlHqProcCb *proc;
- TRC2(rgSCHUhmGetUlProcByTime);
-
while (lnk)
{
proc = (RgSchUlHqProcCb *)(lnk->node);
lnk = lnk->next;
- // printf("compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.subframe,frm.sfn,frm.subframe ,proc->procId);
+ // printf("compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot,frm.sfn,frm.slot ,proc->procId);
if (RGSCH_TIMEINFO_SAME(proc->schdTime, frm))
{
- // printf("Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.subframe, proc->procId);
- RETVALUE(proc);
+ // printf("Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot, proc->procId);
+ return (proc);
}
}
- RETVALUE(NULLP);
+ return (NULLP);
} /* rgSCHUhmGetUlProcByTime */
#endif