X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Frg_sch_utl.c;h=22092d80a9b57f5acbec99335f170103d009184d;hb=ba78fa13b01e0729fe0a6a7a18cbf1d52cdcda1c;hp=2be7491ec44582096ab1b4b40a59640ab014d8c6;hpb=3235ecfc7414aa0b72d0ad50db63ae8b5626045b;p=o-du%2Fl2.git diff --git a/src/5gnrsch/rg_sch_utl.c b/src/5gnrsch/rg_sch_utl.c index 2be7491ec..22092d80a 100755 --- a/src/5gnrsch/rg_sch_utl.c +++ b/src/5gnrsch/rg_sch_utl.c @@ -37,15 +37,7 @@ static int RLOG_MODULE_ID=4096; static int RLOG_FILE_ID=177; /* header include files -- defines (.h) */ -#include "envopt.h" /* environment options */ -#include "envdep.h" /* environment dependent */ -#include "envind.h" /* environment independent */ -#include "gen.h" /* general layer */ -#include "ssi.h" /* system service interface */ -#include "cm_hash.h" /* common hash list */ -#include "cm_llist.h" /* common linked list library */ -#include "cm_err.h" /* common error */ -#include "cm_lte.h" /* common LTE */ +#include "common_def.h" #include "lrg.h" #include "rgr.h" #include "tfu.h" @@ -59,15 +51,6 @@ static int RLOG_FILE_ID=177; #include "rl_common.h" /* header/extern include files (.x) */ -#include "gen.x" /* general layer typedefs */ -#include "ssi.x" /* system services typedefs */ -#include "cm5.x" /* common timers */ -#include "cm_hash.x" /* common hash list */ -#include "cm_lib.x" /* common library */ -#include "cm_llist.x" /* common linked list */ -#include "cm_mblk.x" /* memory management */ -#include "cm_tkns.x" /* common tokens */ -#include "cm_lte.x" /* common tokens */ #include "tfu.x" /* TFU types */ #include "lrg.x" /* layer management typedefs for MAC */ #include "rgr.x" /* layer management typedefs for MAC */ @@ -81,39 +64,39 @@ static int RLOG_FILE_ID=177; /* SR_RACH_STATS */ -U32 rgNumPrachRecvd =0; /* Num of Rach Req received including dedicated preambles */ -U32 rgNumRarSched =0; /* Num of RARs sent */ -U32 rgNumBI =0; /* Num of BackOff Ind sent */ -U32 rgNumMsg3CrcPassed =0; /* Num of CRC success for Msg3 */ -U32 rgNumMsg3CrcFailed =0; /* Num of CRC fail for Msg 3 */ -U32 rgNumMsg3FailMaxRetx =0; /* Num of Msg3 fail after Max Retx attempts */ -U32 rgNumMsg4Ack =0; /* Num of Acks for Msg4 Tx */ -U32 rgNumMsg4Nack =0; +uint32_t rgNumPrachRecvd =0; /* Num of Rach Req received including dedicated preambles */ +uint32_t rgNumRarSched =0; /* Num of RARs sent */ +uint32_t rgNumBI =0; /* Num of BackOff Ind sent */ +uint32_t rgNumMsg3CrcPassed =0; /* Num of CRC success for Msg3 */ +uint32_t rgNumMsg3CrcFailed =0; /* Num of CRC fail for Msg 3 */ +uint32_t rgNumMsg3FailMaxRetx =0; /* Num of Msg3 fail after Max Retx attempts */ +uint32_t rgNumMsg4Ack =0; /* Num of Acks for Msg4 Tx */ +uint32_t rgNumMsg4Nack =0; /* Num of Nacks for Msg4 Tx */ -U32 rgNumMsg4FailMaxRetx =0; /* Num of Msg4 Tx failed after Max Retx attempts */ -U32 rgNumSrRecvd =0; /* Num of Sched Req received */ -U32 rgNumSrGrant =0; /* Num of Sched Req Grants sent */ -U32 rgNumMsg3CrntiCE =0; /* Num of Msg 3 CRNTI CE received */ -U32 rgNumDedPream =0; /* Num of Dedicated Preambles recvd */ -U32 rgNumMsg3CCCHSdu =0; /* Num of Msg 3 CCCH Sdus recvd */ -U32 rgNumCCCHSduCrntiNotFound =0; /*UE Ctx not found for CCCH SDU Msg 3 */ -U32 rgNumCrntiCeCrntiNotFound =0; /*UE Ctx not found for CRNTI CE Msg 3 */ -U32 rgNumMsg4WithCCCHSdu =0; /* Num of Msg4 with CCCH Sdu */ -U32 rgNumMsg4WoCCCHSdu =0; /* Num of Msg4 without CCCH Sdu */ -U32 rgNumMsg4Dtx =0; /* Num of DTX received for Msg 4 */ -U32 rgNumMsg3AckSent =0; /* Num of PHICH Ack sent for Msg 3 */ -U32 rgNumMsg3NackSent =0; /* Num of PHICH Nack sent for Msg 3 */ -U32 rgNumMsg4PdcchWithCrnti =0; /* Num of PDCCH for CRNTI based contention resolution */ -U32 rgNumRarFailDuetoRntiExhaustion =0; /* Num of RACH Failures due to RNTI pool exhaution */ -U32 rgNumTAModified =0; /* Num of times TA received is different from prev value */ -U32 rgNumTASent =0; /* Num of TA Command sent */ -U32 rgNumMsg4ToBeTx =0; /* Num of times MSG4 that should be sent */ -U32 rgNumMsg4Txed =0; /* Num of MSG4 actually sent *//* ysNumMsg4ToBeTx -ysNumMsg4Txed == Failed MSG4 TX */ -U32 rgNumMsg3DtxRcvd =0; /* CRC Fail with SINR < 0 */ - -U32 rgNumDedPreamUECtxtFound =0; /* Num of Dedicated Preambles recvd */ - -PRIVATE U8 rgSchDciAmbigSizeTbl[61] = {0,0,0,0,0,0,0,0,0,0,0, +uint32_t rgNumMsg4FailMaxRetx =0; /* Num of Msg4 Tx failed after Max Retx attempts */ +uint32_t rgNumSrRecvd =0; /* Num of Sched Req received */ +uint32_t rgNumSrGrant =0; /* Num of Sched Req Grants sent */ +uint32_t rgNumMsg3CrntiCE =0; /* Num of Msg 3 CRNTI CE received */ +uint32_t rgNumDedPream =0; /* Num of Dedicated Preambles recvd */ +uint32_t rgNumMsg3CCCHSdu =0; /* Num of Msg 3 CCCH Sdus recvd */ +uint32_t rgNumCCCHSduCrntiNotFound =0; /*UE Ctx not found for CCCH SDU Msg 3 */ +uint32_t rgNumCrntiCeCrntiNotFound =0; /*UE Ctx not found for CRNTI CE Msg 3 */ +uint32_t rgNumMsg4WithCCCHSdu =0; /* Num of Msg4 with CCCH Sdu */ +uint32_t rgNumMsg4WoCCCHSdu =0; /* Num of Msg4 without CCCH Sdu */ +uint32_t rgNumMsg4Dtx =0; /* Num of DTX received for Msg 4 */ +uint32_t rgNumMsg3AckSent =0; /* Num of PHICH Ack sent for Msg 3 */ +uint32_t rgNumMsg3NackSent =0; /* Num of PHICH Nack sent for Msg 3 */ +uint32_t rgNumMsg4PdcchWithCrnti =0; /* Num of PDCCH for CRNTI based contention resolution */ +uint32_t rgNumRarFailDuetoRntiExhaustion =0; /* Num of RACH Failures due to RNTI pool exhaution */ +uint32_t rgNumTAModified =0; /* Num of times TA received is different from prev value */ +uint32_t rgNumTASent =0; /* Num of TA Command sent */ +uint32_t rgNumMsg4ToBeTx =0; /* Num of times MSG4 that should be sent */ +uint32_t rgNumMsg4Txed =0; /* Num of MSG4 actually sent *//* ysNumMsg4ToBeTx -ysNumMsg4Txed == Failed MSG4 TX */ +uint32_t rgNumMsg3DtxRcvd =0; /* CRC Fail with SINR < 0 */ + +uint32_t rgNumDedPreamUECtxtFound =0; /* Num of Dedicated Preambles recvd */ + +static uint8_t rgSchDciAmbigSizeTbl[61] = {0,0,0,0,0,0,0,0,0,0,0, 0,1,0,1,0,1,0,0,0,1, 0,0,0,1,0,1,0,0,0,0, 0,1,0,0,0,0,0,0,0,1, @@ -122,75 +105,75 @@ PRIVATE U8 rgSchDciAmbigSizeTbl[61] = {0,0,0,0,0,0,0,0,0,0,0, /* local defines */ -EXTERN U32 rgSchCmnBetaCqiOffstTbl[16]; -EXTERN U32 rgSchCmnBetaRiOffstTbl[16]; -EXTERN RgSchdApis rgSchCmnApis; -EXTERN PUBLIC S16 RgUiRgmSendPrbRprtInd ARGS(( +uint32_t rgSchCmnBetaCqiOffstTbl[16]; +uint32_t rgSchCmnBetaRiOffstTbl[16]; +RgSchdApis rgSchCmnApis; +S16 RgUiRgmSendPrbRprtInd ARGS(( Pst* pst, SuId suId, RgmPrbRprtInd *prbRprtInd )); -EXTERN PUBLIC S16 RgUiRgmSendTmModeChangeInd ARGS(( +S16 RgUiRgmSendTmModeChangeInd ARGS(( Pst* pst, SuId suId, RgmTransModeInd *txModeChngInd )); #ifdef EMTC_ENABLE -EXTERN PUBLIC S16 rgSCHEmtcUtlGetSfAlloc ARGS(( +S16 rgSCHEmtcUtlGetSfAlloc ARGS(( RgSchCellCb *cell )); -EXTERN PUBLIC S16 rgSCHEmtcUtlPutSfAlloc ARGS(( +S16 rgSCHEmtcUtlPutSfAlloc ARGS(( RgSchCellCb *cell )); -EXTERN PUBLIC Void rgSCHEmtcUtlUpdUeDciSize ARGS(( +Void rgSCHEmtcUtlUpdUeDciSize ARGS(( RgSchCellCb *cell, RgSchUeCb *ueCb )); -EXTERN PUBLIC Void rgSCHEmtcGetDciFrmt61ASize ARGS(( +Void rgSCHEmtcGetDciFrmt61ASize ARGS(( RgSchCellCb *cell )); -EXTERN PUBLIC Void rgSCHEmtcGetDciFrmt60ASize ARGS(( +Void rgSCHEmtcGetDciFrmt60ASize ARGS(( RgSchCellCb *cell )); -EXTERN PUBLIC S16 rgSCHEmtcUtlFillPdschDciInfo ARGS(( +S16 rgSCHEmtcUtlFillPdschDciInfo ARGS(( TfuPdschDciInfo *pdsch, TfuDciInfo *pdcchDci )); -EXTERN PUBLIC Void rgSCHEmtcUtlRlsRnti ARGS(( +Void rgSCHEmtcUtlRlsRnti ARGS(( RgSchCellCb *cell, RgSchRntiLnk *rntiLnk, -U8 *isLegacy +uint8_t *isLegacy )); -EXTERN PUBLIC S16 rgSCHEmtcPdcchAlloc ARGS(( +S16 rgSCHEmtcPdcchAlloc ARGS(( RgSchCellCb *cell, RgSchPdcch *pdcch )); -EXTERN PUBLIC Void rgSCHEmtcPdcchFree ARGS(( +Void rgSCHEmtcPdcchFree ARGS(( RgSchCellCb *cell, RgSchPdcch *pdcch )); #endif /* Functions specific to TM1/TM2/TM6/TM7 for PRB calculation*/ -PUBLIC Void rgSchUtlDlCalc1CwPrb ARGS(( RgSchCellCb *cell, +Void rgSchUtlDlCalc1CwPrb ARGS(( RgSchCellCb *cell, RgSchUeCb *ue, - U32 bo, - U32 *prbReqrd)); + uint32_t bo, + uint32_t *prbReqrd)); /* Functions specific to TM3/TM4 for PRB calculation*/ -PUBLIC Void rgSchUtlDlCalc2CwPrb ARGS(( RgSchCellCb *cell, +Void rgSchUtlDlCalc2CwPrb ARGS(( RgSchCellCb *cell, RgSchUeCb *ue, - U32 bo, - U32 *prbReqrd)); + uint32_t bo, + uint32_t *prbReqrd)); #ifdef LTE_ADV -PUBLIC RgSchCellCb* rgSchUtlGetCellCb ARGS(( Inst inst, - U16 cellId +RgSchCellCb* rgSchUtlGetCellCb ARGS(( Inst inst, + uint16_t cellId )); #endif typedef Void (*RgSchUtlDlCalcPrbFunc) ARGS((RgSchCellCb *cell, RgSchUeCb *ue, - U32 bo, U32 *prbRequrd)); + uint32_t bo, uint32_t *prbRequrd)); #ifndef LTE_ADV /* Functions specific to each transmission mode for PRB calculation*/ RgSchUtlDlCalcPrbFunc dlCalcPrbFunc[7] = {rgSchUtlDlCalc1CwPrb, @@ -208,49 +191,51 @@ NULLP, rgSchUtlDlCalc1CwPrb, rgSchUtlDlCalc1CwPrb, NULLP, NULLP}; #ifdef LTE_TDD /* The below table will be used to map the UL SF number in a TDD Cfg 0 frame to the ul Sf array maintained in cellCb */ -PRIVATE U8 rgSchTddCfg0UlSfTbl[] = {2, 3, 4, 7, 8, 9}; +static uint8_t rgSchTddCfg0UlSfTbl[] = {2, 3, 4, 7, 8, 9}; #endif -PRIVATE S16 rgSCHUtlUlAllocDbInit ARGS(( +static S16 rgSCHUtlUlAllocDbInit ARGS(( RgSchCellCb *cell, RgSchUlAllocDb *db, - U8 maxAllocs + uint8_t maxAllocs )); -PRIVATE Void rgSCHUtlUlAllocDbDeinit ARGS(( +static Void rgSCHUtlUlAllocDbDeinit ARGS(( RgSchCellCb *cell, RgSchUlAllocDb *db )); -PRIVATE S16 rgSCHUtlUlHoleDbInit ARGS(( +static S16 rgSCHUtlUlHoleDbInit ARGS(( RgSchCellCb *cell, RgSchUlHoleDb *db, - U8 maxHoles, - U8 start, - U8 num + uint8_t maxHoles, + uint8_t start, + uint8_t num )); -PRIVATE Void rgSCHUtlUlHoleDbDeinit ARGS(( +static Void rgSCHUtlUlHoleDbDeinit ARGS(( RgSchCellCb *cell, RgSchUlHoleDb *db )); -PRIVATE S16 rgSCHChkBoUpdate ARGS(( +static S16 rgSCHChkBoUpdate ARGS(( RgSchCellCb *cell, RgInfCmnBoRpt *boUpdt )); +#ifdef UNUSE_FUN #ifdef TFU_UPGRADE -PRIVATE U8 rgSCHUtlFetchPcqiBitSz ARGS(( +static uint8_t rgSCHUtlFetchPcqiBitSz ARGS(( RgSchCellCb *cell, - RgSchUeCb *ueCb, - U8 numTxAnt + RgSchUeCb *ueCb, + uint8_t numTxAnt )); #endif +#endif /* sorted in ascending order of tbSz */ -CONSTANT struct rgSchUtlBcchPcchTbSz +const struct rgSchUtlBcchPcchTbSz { - U8 rbIndex; /* RB index {2,3} */ - U16 tbSz; /* one of the Transport block size in bits of + uint8_t rbIndex; /* RB index {2,3} */ + uint16_t tbSz; /* one of the Transport block size in bits of * rbIndex 2 or 3 */ /* Corrected allocation for common channels */ - U8 mcs; /* imcs */ + uint8_t mcs; /* imcs */ } rgSchUtlBcchPcchTbSzTbl[44] = { { 2, 32, 0 }, { 2, 56, 1 }, { 2, 72, 2 }, { 3, 88, 1 }, { 2, 104, 3 }, { 2, 120, 4 }, { 2, 144, 5 }, { 2, 176, 6 }, @@ -271,7 +256,7 @@ CONSTANT struct rgSchUtlBcchPcchTbSz /* forward references */ #ifdef LTE_TDD -PRIVATE Void rgSCHUtlUpdPrachOcc ARGS(( +static Void rgSCHUtlUpdPrachOcc ARGS(( RgSchCellCb *cell, RgrTddPrachInfo *cellCfg)); #endif @@ -313,7 +298,7 @@ for proper NULLP assignment*/ } #ifdef TFU_UPGRADE -#define RGSCH_GETBIT(a, b) ((((U8*)a)[(b)>>3] >> ((7-((b)&7)))) & 1) +#define RGSCH_GETBIT(a, b) ((((uint8_t*)a)[(b)>>3] >> ((7-((b)&7)))) & 1) /* * @@ -329,28 +314,28 @@ for proper NULLP assignment*/ * */ #ifdef ANSI -PUBLIC F64 rgSCHUtlPower +F64 rgSCHUtlPower ( F64 x, F64 n ) #else -PUBLIC F64 rgSCHUtlPower(x, n) +F64 rgSCHUtlPower(x, n) F64 x; F64 n; #endif { if( n==0 ) { - RETVALUE( 1 ); + return ( 1 ); } else if ( n>0 ) { - RETVALUE( x * rgSCHUtlPower( x, n-1 ) ); + return ( x * rgSCHUtlPower( x, n-1 ) ); } else { - RETVALUE( (1/x) * rgSCHUtlPower( x, n+1 ) ); + return ( (1/x) * rgSCHUtlPower( x, n+1 ) ); } } /* end of rgSCHUtlPower*/ @@ -369,25 +354,24 @@ F64 n; * */ #ifdef ANSI -PUBLIC U32 rgSCHUtlParse +uint32_t rgSCHUtlParse ( -U8 *buff, -U8 startPos, -U8 endPos, -U8 buffSize +uint8_t *buff, +uint8_t startPos, +uint8_t endPos, +uint8_t buffSize ) #else -PUBLIC U32 rgSCHUtlParse(buff, startPos, endPos, buffSize) -U8 *buff; -U8 startPos; -U8 endPos; -U8 buffSize; +uint32_t rgSCHUtlParse(buff, startPos, endPos, buffSize) +uint8_t *buff; +uint8_t startPos; +uint8_t endPos; +uint8_t buffSize; #endif { - U8 pointToChar,pointToEnd, loop; - U8 size = endPos - startPos; + uint8_t pointToChar,pointToEnd, loop; + uint8_t size = endPos - startPos; F64 result = 0; - TRC2(rgSCHUtlParse); pointToEnd = (startPos)%8; for ( loop=0; loopinstIdx; S16 ret; - U16 offsetStepMask; - - TRC2(rgSCHUtlPdcchAvail); + uint16_t offsetStepMask; /* V5G_213 : 10.1 */ offset = 0; @@ -540,7 +522,7 @@ RgSchPdcch **pdcch; if ((offset >= ((pdcchInfo->nCce + 7) >> 3)) || ((aggrLvl == CM_LTE_AGGR_LVL16) && (offset > 0))) { - RETVALUE(FALSE); + return (FALSE); } byte = &pdcchInfo->map[offset]; @@ -555,7 +537,7 @@ RgSchPdcch **pdcch; ret = rgSCHUtlAllocSBuf(inst, (Data **)pdcch, sizeof(RgSchPdcch)); if(ROK != ret) { - RETVALUE(FALSE); + return (FALSE); } } @@ -573,7 +555,7 @@ RgSchPdcch **pdcch; (*pdcch)->nCce = aggrLvl; (*pdcch)->ue = NULLP; } - RETVALUE(TRUE); + return (TRUE); } @@ -594,30 +576,28 @@ RgSchPdcch **pdcch; * Invoked by: scheduler * * @param[in] RgSchPdcchInfo* pdcchInfo - * @param[in] U8 loc - * @param[in] U8 aggrLvl + * @param[in] uint8_t loc + * @param[in] uint8_t aggrLvl * @return Void * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlPdcchPut +Void rgSCHUtlPdcchPut ( RgSchCellCb *cell, RgSchPdcchInfo *pdcchInfo, RgSchPdcch *pdcch ) #else -PUBLIC Void rgSCHUtlPdcchPut(cell, pdcchInfo, pdcch) +Void rgSCHUtlPdcchPut(cell, pdcchInfo, pdcch) RgSchCellCb *cell; RgSchPdcchInfo *pdcchInfo; RgSchPdcch *pdcch; #endif { - U8 *byte; - U8 offset; - U8 mask; - - TRC2(rgSCHUtlPdcchPut); + uint8_t *byte; + uint8_t offset; + uint16_t mask; switch(pdcch->aggrLvl) { @@ -636,7 +616,7 @@ RgSchPdcch *pdcch; mask = 0xffff; break; default: - RETVOID; + return; } /* Placing common computation of byte from all the cases above here for optimization */ @@ -648,7 +628,7 @@ RgSchPdcch *pdcch; pdcch->ue = NULLP; (*byte) &= ~mask; - RETVOID; + return; } @@ -659,8 +639,8 @@ RgSchPdcch *pdcch; * * Function: rgSCHUtlPdcchInit * Purpose: This function initializes PDCCH information for - * a subframe. It removes the list of PDCCHs allocated - * in the prior use of this subframe structure. + * a slot. It removes the list of PDCCHs allocated + * in the prior use of this slot structure. * * Invoked by: rgSCHUtlSubFrmPut * @@ -670,26 +650,24 @@ RgSchPdcch *pdcch; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlPdcchInit +Void rgSCHUtlPdcchInit ( RgSchCellCb *cell, RgSchDlSf *subFrm, -U16 nCce +uint16_t nCce ) #else -PUBLIC Void rgSCHUtlPdcchInit(cell, subFrm, nCce) +Void rgSCHUtlPdcchInit(cell, subFrm, nCce) RgSchCellCb *cell; RgSchDlSf *subFrm; -U16 nCce; +uint16_t nCce; #endif { RgSchPdcchInfo *pdcchInfo; RgSchPdcch *pdcch; Inst inst = cell->instIdx; - U8 extraBits; - U32 cceMapSz; - - TRC2(rgSCHUtlPdcchInit); + uint8_t extraBits; + uint32_t cceMapSz; pdcchInfo = &subFrm->pdcchInfo; while(pdcchInfo->pdcchs.first != NULLP) @@ -724,11 +702,11 @@ U16 nCce; if (pdcchInfo->map == NULLP) { /* Generate log error here */ - RETVOID; + return; } } - cmMemset(subFrm->pdcchInfo.map, 0, cceMapSz); + memset(subFrm->pdcchInfo.map, 0, cceMapSz); /* If nCce is not exactly same as the bitMap size(no of bits allocated * to represent the Cce's, then mark the extra bits as unavailable extra bits = (((pdcchInfo->nCce + 7) >> 3)*8) - pdcchInfo->nCce @@ -737,7 +715,7 @@ U16 nCce; extraBits = (cceMapSz)*8 - pdcchInfo->nCce; subFrm->pdcchInfo.map[cceMapSz - 1] |= ((1 << extraBits) - 1) << (8 - extraBits); - RETVOID; + return; } /* LTE_ADV_FLAG_REMOVED_START */ @@ -755,20 +733,19 @@ U16 nCce; * **/ #ifdef ANSI -PUBLIC Void rgSchSFRTotalPoolFree +Void rgSchSFRTotalPoolFree ( RgSchSFRTotalPoolInfo *sfrTotalPoolInfo, RgSchCellCb *cell ) #else -PUBLIC Void rgSchSFRTotalPoolFree(sfrTotalPoolInfo, cell) +Void rgSchSFRTotalPoolFree(sfrTotalPoolInfo, cell) RgSchSFRTotalPoolInfo *sfrTotalPoolInfo; RgSchCellCb *cell; #endif { CmLListCp *l; CmLList *n; - TRC2(rgSchSFRTotalPoolFree); /*Deinitialise if these cc pools and ce pools are already existent*/ l = &sfrTotalPoolInfo->ccPool; @@ -817,13 +794,13 @@ PUBLIC Void rgSchSFRTotalPoolFree(sfrTotalPoolInfo, cell) * **/ #ifdef ANSI -PUBLIC S16 rgSchSFRTotalPoolInit +S16 rgSchSFRTotalPoolInit ( RgSchCellCb *cell, RgSchDlSf *sf ) #else -PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) +static Void rgSchSFRTotalPoolInit(cell, sf) RgSchCellCb *cell; RgSchDlSf *sf; #endif @@ -836,8 +813,6 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) CmLList *temp = NULLP; S16 ret = 0; - TRC2(rgSchSFRTotalPoolInit); - rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo, cell); sf->sfrTotalPoolInfo.CCPool1BwAvlbl = 0; sf->sfrTotalPoolInfo.CCPool2BwAvlbl = 0; @@ -853,7 +828,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "CE Pool memory allocation FAILED for cell"); rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo, cell); - RETVALUE(RFAILED); + return RFAILED; } ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp->node, sizeof(RgSchSFRPoolInfo)); @@ -862,7 +837,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "CE Pool memory allocation FAILED for cell "); rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell); - RETVALUE(RFAILED); + return RFAILED; } l = &sf->sfrTotalPoolInfo.cePool; @@ -896,7 +871,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "CC Pool memory allocation FAILED for cell "); rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell); - RETVALUE(RFAILED); + return RFAILED; } ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp->node, sizeof(RgSchSFRPoolInfo)); @@ -905,7 +880,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "CC Pool memory allocation FAILED for cell "); rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell); - RETVALUE(RFAILED); + return RFAILED; } l = &sf->sfrTotalPoolInfo.ccPool; @@ -958,7 +933,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "CC Pool memory allocation FAILED for cell "); rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell); - RETVALUE(RFAILED); + return RFAILED; } ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&temp->node, sizeof(RgSchSFRPoolInfo)); @@ -967,7 +942,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "CC Pool memory allocation FAILED for cell "); rgSchSFRTotalPoolFree(&sf->sfrTotalPoolInfo,cell); - RETVALUE(RFAILED); + return RFAILED; } cmLListAdd2Tail(l, temp); @@ -996,7 +971,7 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) sf->sfrTotalPoolInfo.ccBwFull = FALSE; sf->sfrTotalPoolInfo.ceBwFull = FALSE; sf->sfrTotalPoolInfo.isUeCellEdge = FALSE; - RETVALUE(ROK); + return ROK; } /** * @brief This function resets temporary variables in RNTP Prepration @@ -1012,23 +987,21 @@ PRIVATE Void rgSchSFRTotalPoolInit(cell, sf) * **/ #ifdef ANSI -PUBLIC S16 rgSchDSFRRntpInfoInit +S16 rgSchDSFRRntpInfoInit ( TknStrOSXL *rntpPtr, RgSchCellCb *cell, - U16 bw + uint16_t bw ) #else -PRIVATE Void rgSchDSFRRntpInfoInit(rntpPtr, cell, bw) +static Void rgSchDSFRRntpInfoInit(rntpPtr, cell, bw) TknStrOSXL *rntpPtr; RgSchCellCb *cell; - U16 bw; + uint16_t bw; #endif { Inst inst = cell->instIdx; - U16 len; - - TRC2(rgSchDSFRRntpInfoInit); + uint16_t len; rntpPtr->pres = PRSNT_NODEF; @@ -1038,17 +1011,17 @@ PRIVATE Void rgSchDSFRRntpInfoInit(rntpPtr, cell, bw) /* Allocate memory for "scheduled UE" Info */ if((rgSCHUtlAllocSBuf(inst, (Data**)&(rntpPtr->val), - (len * sizeof(U8)))) != ROK) + (len * sizeof(uint8_t)))) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for RNTP Alloc"); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /** - * @brief This function release RNTP pattern from subFrame and Cell + * @brief This function release RNTP pattern from slot and Cell * @details * * Function: rgSchDSFRRntpInfoFree @@ -1061,34 +1034,32 @@ PRIVATE Void rgSchDSFRRntpInfoInit(rntpPtr, cell, bw) * **/ #ifdef ANSI -PUBLIC S16 rgSchDSFRRntpInfoFree +S16 rgSchDSFRRntpInfoFree ( TknStrOSXL *rntpPtr, RgSchCellCb *cell, - U16 bw + uint16_t bw ) #else -PRIVATE Void rgSchDSFRRntpInfoFree(rntpPtr, cell, bw) +static Void rgSchDSFRRntpInfoFree(rntpPtr, cell, bw) TknStrOSXL *rntpPtr; RgSchCellCb *cell; - U16 bw; + uint16_t bw; #endif { Inst inst = cell->instIdx; - U16 len; - - TRC2(rgSchDSFRRntpInfoFree); + uint16_t len; len = (bw % 8 == 0) ? (bw/8) : (bw/8 + 1); if(rntpPtr->pres == PRSNT_NODEF) { - rgSCHUtlFreeSBuf(inst, (Data **)(&(rntpPtr->val)),(len * sizeof(U8))); + rgSCHUtlFreeSBuf(inst, (Data **)(&(rntpPtr->val)),(len * sizeof(uint8_t))); rntpPtr->pres = NOTPRSNT; rntpPtr->len = 0; } - RETVALUE(ROK); + return ROK; } /** @@ -1106,19 +1077,18 @@ PRIVATE Void rgSchDSFRRntpInfoFree(rntpPtr, cell, bw) * **/ #ifdef ANSI -PRIVATE Void rgSchSFRResetPoolVariables +static Void rgSchSFRResetPoolVariables ( RgSchCellCb *cell, RgSchSFRPoolInfo *pool ) #else -PRIVATE Void rgSchSFRResetPoolVariables(cell, pool) +static Void rgSchSFRResetPoolVariables(cell, pool) RgSchCellCb *cell; RgSchSFRPoolInfo *pool; #endif { - TRC2(rgSchSFRResetPoolVariables); pool->bwAlloced = 0; /*type0end will be the last RBG in pool with all available RBs*/ @@ -1129,7 +1099,7 @@ PRIVATE Void rgSchSFRResetPoolVariables(cell, pool) pool->type2Start = pool->poolstartRB; pool->bw = pool->poolendRB - pool->poolstartRB + 1; - RETVOID; + return; } /** * @brief This function resets SFR Pool information for frame @@ -1137,7 +1107,7 @@ PRIVATE Void rgSchSFRResetPoolVariables(cell, pool) * @details * * Function: rgSCHSFRUtlTotalPooReset - * Purpose: Update the dynamic variables in each pool as they will be modified in each subframe. + * Purpose: Update the dynamic variables in each pool as they will be modified in each slot. * Dont modify the static variables like startRB, endRB, BW * Invoked by: rgSCHUtlSubFrmPut * @@ -1147,13 +1117,13 @@ PRIVATE Void rgSchSFRResetPoolVariables(cell, pool) * **/ #ifdef ANSI -PRIVATE Void rgSCHSFRUtlTotalPoolReset +static Void rgSCHSFRUtlTotalPoolReset ( RgSchCellCb *cell, RgSchDlSf *subFrm ) #else -PRIVATE Void rgSCHSFRUtlTotalPoolReset(cell, subFrm) +static Void rgSCHSFRUtlTotalPoolReset(cell, subFrm) RgSchCellCb *cell; RgSchDlSf *subFrm; #endif @@ -1164,8 +1134,6 @@ PRIVATE Void rgSCHSFRUtlTotalPoolReset(cell, subFrm) CmLList *node = NULLP; RgSchSFRPoolInfo *tempPool = NULLP; - TRC2(rgSCHSFRUtlTotalPoolReset); - totalPoolInfo->ccBwFull = FALSE; totalPoolInfo->ceBwFull = FALSE; totalPoolInfo->isUeCellEdge = FALSE; @@ -1196,7 +1164,7 @@ PRIVATE Void rgSCHSFRUtlTotalPoolReset(cell, subFrm) totalPoolInfo->CEPoolBwAvlbl = tempPool->bw; } - RETVOID; + return; } /* LTE_ADV_FLAG_REMOVED_END */ /** @@ -1206,57 +1174,57 @@ PRIVATE Void rgSCHSFRUtlTotalPoolReset(cell, subFrm) * * Function: rgSCHUtlAddPhich * Purpose: This function appends PHICH information for - * a subframe. + * a slot. * * Invoked by: TOM * * @param[in] RgSchCellCb* cell * @param[in] RgSubFrm* subFrm - * @param[in] U8 hqFeedBack - * @param[in] U8 nDmrs - * @param[in] U8 rbStart + * @param[in] uint8_t hqFeedBack + * @param[in] uint8_t nDmrs + * @param[in] uint8_t rbStart * @return S16 * -# ROK * -# RFAILED **/ #ifdef LTE_TDD #ifdef ANSI -PUBLIC S16 rgSCHUtlAddPhich +S16 rgSCHUtlAddPhich ( RgSchCellCb *cell, CmLteTimingInfo frm, -U8 hqFeedBack, -U8 nDmrs, -U8 rbStart, -U8 iPhich +uint8_t hqFeedBack, +uint8_t nDmrs, +uint8_t rbStart, +uint8_t iPhich ) #else -PUBLIC S16 rgSCHUtlAddPhich(cell, frm, hqFeedBack, nDmrs, rbStart, iPhich) +S16 rgSCHUtlAddPhich(cell, frm, hqFeedBack, nDmrs, rbStart, iPhich) RgSchCellCb *cell; CmLteTimingInfo frm; -U8 hqFeedBack; -U8 nDmrs; -U8 rbStart; -U8 iPhich; +uint8_t hqFeedBack; +uint8_t nDmrs; +uint8_t rbStart; +uint8_t iPhich; #endif #else #ifdef ANSI -PUBLIC S16 rgSCHUtlAddPhich +S16 rgSCHUtlAddPhich ( RgSchCellCb *cell, CmLteTimingInfo frm, -U8 hqFeedBack, -U8 nDmrs, -U8 rbStart, +uint8_t hqFeedBack, +uint8_t nDmrs, +uint8_t rbStart, Bool isForMsg3 ) #else -PUBLIC S16 rgSCHUtlAddPhich(cell, frm, hqFeedBack, nDmrs, rbStart, isForMsg3) +S16 rgSCHUtlAddPhich(cell, frm, hqFeedBack, nDmrs, rbStart, isForMsg3) RgSchCellCb *cell; CmLteTimingInfo frm; -U8 hqFeedBack; -U8 nDmrs; -U8 rbStart; +uint8_t hqFeedBack; +uint8_t nDmrs; +uint8_t rbStart; Bool isForMsg3; #endif #endif @@ -1265,7 +1233,6 @@ Bool isForMsg3; RgSchPhich *phich; RgSchDlSf *dlSf; Inst inst = cell->instIdx; - TRC2(rgSCHUtlAddPhich); dlSf = rgSCHUtlSubFrmGet(cell, frm); RGSCH_PHICH_ALLOC(inst, phich,sizeof(RgSchPhich), ret); @@ -1274,7 +1241,7 @@ Bool isForMsg3; { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, " rgSCHUtlAddPhich(): " "Allocation of RgSchPhich failed"); - RETVALUE(RFAILED); + return RFAILED; } #ifdef LTE_TDD RGSCH_INITPHICH(phich, hqFeedBack, nDmrs, rbStart, iPhich); @@ -1282,7 +1249,7 @@ Bool isForMsg3; RGSCH_INITPHICH(phich, hqFeedBack, nDmrs, rbStart, isForMsg3); /*SR_RACH_STATS */ #endif cmLListAdd2Tail(&dlSf->phichInfo.phichs, &phich->lnk); - RETVALUE(ROK); + return ROK; } /* rgSCHUtlAddPhich */ /** @@ -1292,8 +1259,8 @@ Bool isForMsg3; * * Function: rgSCHUtlPhichReset * Purpose: This function initializes PHICH information for - * a subframe. It removes the list of PHICHs allocated - * in the prior use of this subframe structure. + * a slot. It removes the list of PHICHs allocated + * in the prior use of this slot structure. * * Invoked by: rgSCHUtlSubFrmPut * @@ -1303,13 +1270,13 @@ Bool isForMsg3; * **/ #ifdef ANSI -PRIVATE Void rgSCHUtlPhichReset +static Void rgSCHUtlPhichReset ( RgSchCellCb *cell, RgSchDlSf *subFrm ) #else -PRIVATE Void rgSCHUtlPhichReset(cell, subFrm) +static Void rgSCHUtlPhichReset(cell, subFrm) RgSchCellCb *cell; RgSchDlSf *subFrm; #endif @@ -1319,8 +1286,6 @@ RgSchDlSf *subFrm; UNUSED(cell); - TRC2(rgSCHUtlPhichReset); - phichInfo = &subFrm->phichInfo; while(phichInfo->phichs.first != NULLP) { @@ -1329,18 +1294,18 @@ RgSchDlSf *subFrm; RGSCH_PHICH_FREE(cell->instIdx, phich, sizeof(RgSchPhich)); } cmLListInit(&phichInfo->phichs); - RETVOID; + return; } /* rgSCHUtlPhichReset */ /** - * @brief This function returns subframe data structure for a cell + * @brief This function returns slot data structure for a cell * * @details * * Function: rgSCHUtlSubFrmGet - * Purpose: This function resets the subframe data structure - * when the subframe is released + * Purpose: This function resets the slot data structure + * when the slot is released * * Invoked by: scheduler * @@ -1349,21 +1314,19 @@ RgSchDlSf *subFrm; * **/ #ifdef ANSI -PUBLIC RgSchDlSf* rgSCHUtlSubFrmGet +RgSchDlSf* rgSCHUtlSubFrmGet ( RgSchCellCb *cell, CmLteTimingInfo frm ) #else -PUBLIC RgSchDlSf* rgSCHUtlSubFrmGet(cell, frm) +RgSchDlSf* rgSCHUtlSubFrmGet(cell, frm) RgSchCellCb *cell; CmLteTimingInfo frm; #endif { RgSchDlSf *sf; - U8 dlIdx; - - TRC2(rgSCHUtlSubFrmGet); + uint8_t dlIdx; #ifdef LTE_TDD dlIdx = rgSCHUtlGetDlSfIdx(cell, &frm); @@ -1371,26 +1334,26 @@ CmLteTimingInfo frm; sf = cell->subFrms[dlIdx]; #else /* Changing the idexing - so that proper subframe is selected */ - dlIdx = (((frm.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (frm.subframe % RGSCH_NUM_SUB_FRAMES)); + so that proper slot is selected */ + dlIdx = (((frm.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (frm.slot % RGSCH_NUM_SUB_FRAMES)); RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx); sf = cell->subFrms[dlIdx]; #endif /* CA dev Start */ sf->dlIdx = dlIdx; /* CA dev End */ - RETVALUE(sf); + return (sf); } /** - * @brief This function returns subframe data structure for a cell + * @brief This function returns slot data structure for a cell * * @details * * Function: rgSCHUtlSubFrmPut - * Purpose: This function resets the subframe data structure - * when the subframe is released + * Purpose: This function resets the slot data structure + * when the slot is released * * Invoked by: scheduler * @@ -1399,21 +1362,19 @@ CmLteTimingInfo frm; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlSubFrmPut +Void rgSCHUtlSubFrmPut ( RgSchCellCb *cell, RgSchDlSf *sf ) #else -PUBLIC Void rgSCHUtlSubFrmPut(cell, sf) +Void rgSCHUtlSubFrmPut(cell, sf) RgSchCellCb *cell; RgSchDlSf *sf; #endif { - U8 i; - U8 noRaRsps; - - TRC2(rgSCHUtlSubFrmPut); + uint8_t i; + uint8_t noRaRsps; #ifdef LTE_TDD /* Release all the held PDCCH information */ @@ -1436,7 +1397,7 @@ RgSchDlSf *sf; } sf->spsAllocdBw = 0; sf->type2Start = sf->bwAlloced; - cmMemset((U8*) &sf->dlSfAllocInfo, 0, sizeof(RgSchDlSfAllocInfo)); + memset( &sf->dlSfAllocInfo, 0, sizeof(RgSchDlSfAllocInfo)); #else sf->bwAlloced = 0; /* Fix for ccpu00123918*/ @@ -1445,7 +1406,7 @@ RgSchDlSf *sf; /* dsfr_pal_fixes ** 21-March-2013 ** SKS */ if (cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE) { - cmMemset((U8*) sf->rntpInfo.val, 0, sf->rntpInfo.len); + memset(sf->rntpInfo.val, 0, sf->rntpInfo.len); } /* LTE_ADV_FLAG_REMOVED_END */ #endif @@ -1503,7 +1464,7 @@ RgSchDlSf *sf; sf->cceCnt = 0; sf->isCceFailure = FALSE; sf->dlUlBothCmplt = 0; - RETVOID; + return; } @@ -1518,26 +1479,24 @@ RgSchDlSf *sf; * * Invoked by: Scheduler * - * @param[in] U32 n - * @return U8 + * @param[in] uint32_t n + * @return uint8_t * **/ #ifdef ANSI -PUBLIC U8 rgSCHUtlLog32bitNbase2 +uint8_t rgSCHUtlLog32bitNbase2 ( -U32 n +uint32_t n ) #else -PUBLIC U8 rgSCHUtlLog32bitNbase2(n) -U32 n; +uint8_t rgSCHUtlLog32bitNbase2(n) +uint32_t n; #endif { - U32 b[] = {0x2, 0xc, 0xf0, 0xff00, 0xffff0000}; - U32 s[] = {1, 2, 4, 8, 16}; - S16 i; - U8 ret = 0; - - TRC2(rgSCHUtlLog32bitNbase2) + uint32_t b[] = {0x2, 0xc, 0xf0, 0xff00, 0xffff0000}; + uint32_t s[] = {1, 2, 4, 8, 16}; + S16 i; + uint8_t ret = 0; for (i=4; i >= 0; i--) { @@ -1547,7 +1506,7 @@ U32 n; ret |= s[i]; } } - RETVALUE(ret); + return (ret); } #ifdef LTEMAC_SPS @@ -1565,27 +1524,26 @@ U32 n; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 isAck + * @param[in] uint8_t isAck * @return Void * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlRelPdcchFbk +Void rgSCHUtlDlRelPdcchFbk ( RgSchCellCb *cell, RgSchUeCb *ue, -U8 isAck +uint8_t isAck ) #else -PUBLIC Void rgSCHUtlDlRelPdcchFbk(cell, ue, isAck) +Void rgSCHUtlDlRelPdcchFbk(cell, ue, isAck) RgSchCellCb *cell; RgSchUeCb *ue; -U8 isAck; +uint8_t isAck; #endif { - TRC2(rgSCHUtlDlRelPdcchFbk); cell->sc.apis->rgSCHDlRelPdcchFbk(cell, ue, isAck); - RETVOID; + return; } @@ -1607,20 +1565,19 @@ U8 isAck; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlProcAck +Void rgSCHUtlDlProcAck ( RgSchCellCb *cell, RgSchDlHqProcCb *hqP ) #else -PUBLIC Void rgSCHUtlDlProcAck(cell, hqP) +Void rgSCHUtlDlProcAck(cell, hqP) RgSchCellCb *cell; RgSchDlHqProcCb *hqP; #endif { - TRC2(rgSCHUtlDlProcAck); cell->sc.apis->rgSCHDlProcAck(cell, hqP); - RETVOID; + return; } /** @@ -1639,21 +1596,20 @@ RgSchDlHqProcCb *hqP; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlHdlCrntiCE +Void rgSCHUtlHdlCrntiCE ( RgSchCellCb *cell, RgSchUeCb *ue ) #else -PUBLIC Void rgSCHUtlHdlCrntiCE(cell, ue) +Void rgSCHUtlHdlCrntiCE(cell, ue) RgSchCellCb *cell; RgSchUeCb *ue; #endif { - TRC2(rgSCHUtlHdlCrntiCE); cell->sc.apis->rgSCHHdlCrntiCE(cell, ue); - RETVOID; + return; } /* rgSCHUtlHdlCrntiCE */ #endif /* LTEMAC_SPS */ @@ -1664,7 +1620,7 @@ RgSchUeCb *ue; * Desc : Calculate total REGs, given a bandwidth, CFI * and number of antennas. * - * Ret : Total REGs (U16) + * Ret : Total REGs (uint16_t) * * Notes: Could optimise if bw values are limited * (taken from RRC spec) by indexing values from @@ -1676,23 +1632,22 @@ RgSchUeCb *ue; * **********************************************************/ #ifdef ANSI -PRIVATE U16 rgSCHUtlCalcTotalRegs +static uint16_t rgSCHUtlCalcTotalRegs ( -U8 bw, -U8 cfi, -U8 numAntna, +uint8_t bw, +uint8_t cfi, +uint8_t numAntna, Bool isEcp ) #else -PRIVATE U16 rgSCHUtlCalcTotalRegs(bw, cfi, numAntna, isEcp) -U8 bw; -U8 cfi; -U8 numAntna; +static uint16_t rgSCHUtlCalcTotalRegs(bw, cfi, numAntna, isEcp) +uint8_t bw; +uint8_t cfi; +uint8_t numAntna; Bool isEcp; #endif { - U16 regs = 0; - TRC2(rgSCHUtlCalcTotalRegs); + uint16_t regs = 0; /*ccpu00116757- removed check for (ERRCLASS & ERRCLS_DEBUG)*/ @@ -1726,7 +1681,7 @@ Bool isEcp; default: /* case 1 */ regs += bw * RGSCH_NUM_REGS_1ST_SYM; } - RETVALUE(regs); + return (regs); } /*********************************************************** @@ -1735,7 +1690,7 @@ Bool isEcp; * * Desc : Calculates number of PHICH REGs * - * Ret : Number of PHICH REGs (U8) + * Ret : Number of PHICH REGs (uint8_t) * * Notes: ng6 is Ng multiplied by 6 * @@ -1743,20 +1698,19 @@ Bool isEcp; * **********************************************************/ #ifdef ANSI -PRIVATE U16 rgSCHUtlCalcPhichRegs +static uint16_t rgSCHUtlCalcPhichRegs ( -U8 bw, -U8 ng6 +uint8_t bw, +uint8_t ng6 ) #else -PRIVATE U16 rgSCHUtlCalcPhichRegs(bw, ng6) -U8 bw; -U8 ng6; +static uint16_t rgSCHUtlCalcPhichRegs(bw, ng6) +uint8_t bw; +uint8_t ng6; #endif { - TRC2(rgSCHUtlCalcPhichRegs); /* ccpu00115330: Corrected the calculation for number of PHICH groups*/ - RETVALUE(RGSCH_CEIL((bw * ng6) ,(8 * 6)) * RGSCH_NUM_REG_PER_PHICH_GRP); + return (RGSCH_CEIL((bw * ng6) ,(8 * 6)) * RGSCH_NUM_REG_PER_PHICH_GRP); } #ifdef LTE_TDD @@ -1773,40 +1727,39 @@ U8 ng6; * * Invoked by: Scheduler * - * @param[in] U8 bw - * @param[in] U8 ng6 - * @param[in] U8 cfi - * @param[in] U8 mPhich - * @param[in] U8 numAntna + * @param[in] uint8_t bw + * @param[in] uint8_t ng6 + * @param[in] uint8_t cfi + * @param[in] uint8_t mPhich + * @param[in] uint8_t numAntna * @param[in] Bool isEcp - * @return N_cce (U8) + * @return N_cce (uint8_t) * **/ #ifdef ANSI -PUBLIC U8 rgSCHUtlCalcNCce +uint8_t rgSCHUtlCalcNCce ( -U8 bw, +uint8_t bw, RgrPhichNg ng, -U8 cfi, -U8 mPhich, -U8 numAntna, +uint8_t cfi, +uint8_t mPhich, +uint8_t numAntna, Bool isEcp ) #else -PUBLIC U8 rgSCHUtlCalcNCce(bw, ng, cfi, mPhich, numAntna, isEcp) -U8 bw; +uint8_t rgSCHUtlCalcNCce(bw, ng, cfi, mPhich, numAntna, isEcp) +uint8_t bw; RgrPhichNg ng; -U8 cfi; -U8 mPhich; -U8 numAntna; +uint8_t cfi; +uint8_t mPhich; +uint8_t numAntna; Bool isEcp; #endif { - U16 totalRegs; - U16 phichRegs; - U16 cceRegs; - U8 ng6; - TRC2(rgSCHUtlCalcNCce); + uint16_t totalRegs; + uint16_t phichRegs; + uint16_t cceRegs; + uint8_t ng6; /*ccpu00116757- removed check for (ERRCLASS & ERRCLS_DEBUG)*/ @@ -1831,7 +1784,7 @@ Bool isEcp; phichRegs = rgSCHUtlCalcPhichRegs(bw, ng6); cceRegs = totalRegs - mPhich*phichRegs - RGSCH_NUM_PCFICH_REG; - RETVALUE((U8)(cceRegs/RGSCH_NUM_REG_PER_CCE)); + return ((uint8_t)(cceRegs/RGSCH_NUM_REG_PER_CCE)); } #else @@ -1848,36 +1801,35 @@ Bool isEcp; * * Invoked by: Scheduler * - * @param[in] U8 bw - * @param[in] U8 ng6 - * @param[in] U8 cfi - * @param[in] U8 numAntna - * @return N_cce (U8) + * @param[in] uint8_t bw + * @param[in] uint8_t ng6 + * @param[in] uint8_t cfi + * @param[in] uint8_t numAntna + * @return N_cce (uint8_t) * **/ #ifdef ANSI -PUBLIC U8 rgSCHUtlCalcNCce +uint8_t rgSCHUtlCalcNCce ( -U8 bw, +uint8_t bw, RgrPhichNg ng, -U8 cfi, -U8 numAntna, +uint8_t cfi, +uint8_t numAntna, Bool isEcp ) #else -PUBLIC U8 rgSCHUtlCalcNCce(bw, ng, cfi, numAntna, isEcp) -U8 bw; +uint8_t rgSCHUtlCalcNCce(bw, ng, cfi, numAntna, isEcp) +uint8_t bw; RgrPhichNg ng; -U8 cfi; -U8 numAntna; +uint8_t cfi; +uint8_t numAntna; Bool isEcp; #endif { - U16 totalRegs; - U16 phichRegs; - U16 cceRegs; - U8 ng6; - TRC2(rgSCHUtlCalcNCce); + uint16_t totalRegs; + uint16_t phichRegs; + uint16_t cceRegs; + uint8_t ng6; /*ccpu00116757- removed check for (ERRCLASS & ERRCLS_DEBUG)*/ @@ -1902,7 +1854,7 @@ Bool isEcp; phichRegs = rgSCHUtlCalcPhichRegs(bw, ng6); cceRegs = totalRegs - phichRegs - RGSCH_NUM_PCFICH_REG; - RETVALUE((U8)(cceRegs/RGSCH_NUM_REG_PER_CCE)); + return ((uint8_t)(cceRegs/RGSCH_NUM_REG_PER_CCE)); } #endif @@ -1918,47 +1870,45 @@ Bool isEcp; * comprises RB start and N_dmrs. * * @param[in] RgSchUlHqProcCb *hqProc - * @param[out] U8 *rbStartRef - * @param[out] U8 *nDmrsRef + * @param[out] uint8_t *rbStartRef + * @param[out] uint8_t *nDmrsRef * @return S16 **/ #ifdef LTE_TDD #ifdef ANSI -PUBLIC S16 rgSCHUtlGetPhichInfo +S16 rgSCHUtlGetPhichInfo ( RgSchUlHqProcCb *hqProc, -U8 *rbStartRef, -U8 *nDmrsRef, -U8 *iPhich +uint8_t *rbStartRef, +uint8_t *nDmrsRef, +uint8_t *iPhich ) #else -PUBLIC S16 rgSCHUtlGetPhichInfo(hqProc, rbStartRef, nDmrsRef, iPhich) +S16 rgSCHUtlGetPhichInfo(hqProc, rbStartRef, nDmrsRef, iPhich) RgSchUlHqProcCb *hqProc; -U8 *rbStartRef; -U8 *nDmrsRef; -U8 *iPhich; +uint8_t *rbStartRef; +uint8_t *nDmrsRef; +uint8_t *iPhich; #endif #else #ifdef ANSI -PUBLIC S16 rgSCHUtlGetPhichInfo +S16 rgSCHUtlGetPhichInfo ( RgSchUlHqProcCb *hqProc, -U8 *rbStartRef, -U8 *nDmrsRef +uint8_t *rbStartRef, +uint8_t *nDmrsRef ) #else -PUBLIC S16 rgSCHUtlGetPhichInfo(hqProc, rbStartRef, nDmrsRef) +S16 rgSCHUtlGetPhichInfo(hqProc, rbStartRef, nDmrsRef) RgSchUlHqProcCb *hqProc; -U8 *rbStartRef; -U8 *nDmrsRef; +uint8_t *rbStartRef; +uint8_t *nDmrsRef; #endif #endif { /* ACC-TDD */ S16 ret = RFAILED; - TRC2(rgSCHUtlGetPhichInfo); - if ((hqProc != NULLP) && (hqProc->alloc != NULLP)) { *rbStartRef = hqProc->alloc->grnt.rbStart; @@ -1968,7 +1918,7 @@ U8 *nDmrsRef; #endif ret = ROK; } - RETVALUE(ret); + return (ret); } #ifndef TFU_UPGRADE /** @@ -1986,60 +1936,59 @@ U8 *nDmrsRef; * - RV * * @param[in] RgSchUlAlloc *alloc - * @param[out] U8 *rbStartRef - * @param[out] U8 *numRbRef - * @param[out] U8 *rvRef - * @param[out] U16 *size + * @param[out] uint8_t *rbStartRef + * @param[out] uint8_t *numRbRef + * @param[out] uint8_t *rvRef + * @param[out] uint16_t *size * @param[out] TfuModScheme *modType * @param[out] Bool *isRtx - * @param[out] U8 *nDmrs + * @param[out] uint8_t *nDmrs * @param[out] Bool *ndi - * @param[out] U8 *hqPId + * @param[out] uint8_t *hqPId * @return S16 **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlAllocRcptInfo +S16 rgSCHUtlAllocRcptInfo ( RgSchUlAlloc *alloc, CmLteRnti *rnti, -U8 *iMcsRef, -U8 *rbStartRef, -U8 *numRbRef, -U8 *rvRef, -U16 *size, +uint8_t *iMcsRef, +uint8_t *rbStartRef, +uint8_t *numRbRef, +uint8_t *rvRef, +uint16_t *size, TfuModScheme *modType, Bool *isRtx, -U8 *nDmrs, +uint8_t *nDmrs, Bool *ndi, -U8 *hqPId +uint8_t *hqPId ) #else -PUBLIC S16 rgSCHUtlAllocRcptInfo(alloc, rnti, iMcsRef, rbStartRef, numRbRef, +S16 rgSCHUtlAllocRcptInfo(alloc, rnti, iMcsRef, rbStartRef, numRbRef, rvRef, size, modType, isRtx, nDmrs, ndi, hqPId) RgSchUlAlloc *alloc; CmLteRnti *rnti; -U8 *iMcsRef; -U8 *rbStartRef; -U8 *numRbRef; -U8 *rvRef; -U16 *size; +uint8_t *iMcsRef; +uint8_t *rbStartRef; +uint8_t *numRbRef; +uint8_t *rvRef; +uint16_t *size; TfuModScheme *modType; Bool *isRtx; -U8 *nDmrs; +uint8_t *nDmrs; Bool *ndi; -U8 *hqPId; +uint8_t *hqPId; #endif { /* Modulation order for 16qam UEs would be * min(4,modulation order in grant). Please refer to 36.213-8.6.1*/ CmLteUeCategory ueCtgy; - TRC2(rgSCHUtlAllocRcptInfo); #if (ERRCLASS & ERRCLS_DEBUG) if ((alloc == NULLP) || (alloc->hqProc == NULLP)) { - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -2050,7 +1999,7 @@ U8 *hqPId; RLOG_ARG2(L_ERROR,DBG_CELLID,alloc->ue->cell->cellId, "Failed: ue->sch is null RNTI:%d,isRetx=%d", alloc->rnti, alloc->grnt.isRtx); - RETVALUE(RFAILED); + return RFAILED; } ueCtgy = (RG_SCH_CMN_GET_UE_CTGY(alloc->ue)); } @@ -2070,7 +2019,7 @@ U8 *hqPId; *ndi = alloc->hqProc->ndi; *hqPId = alloc->hqProc->procId; - RETVALUE(ROK); + return ROK; } #else /** @@ -2088,15 +2037,15 @@ U8 *hqPId; * - RV * * @param[in] RgSchUlAlloc *alloc - * @param[out] U8 *rbStartRef - * @param[out] U8 *numRbRef - * @param[out] U8 *rvRef - * @param[out] U16 *size + * @param[out] uint8_t *rbStartRef + * @param[out] uint8_t *numRbRef + * @param[out] uint8_t *rvRef + * @param[out] uint16_t *size * @param[out] TfuModScheme *modType * @return S16 **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlAllocRcptInfo +S16 rgSCHUtlAllocRcptInfo ( RgSchCellCb *cell, RgSchUlAlloc *alloc, @@ -2104,18 +2053,17 @@ CmLteTimingInfo *timeInfo, TfuUeUlSchRecpInfo *recpReq ) #else -PUBLIC S16 rgSCHUtlAllocRcptInfo(cell, alloc, timeInfo, recpReq) +S16 rgSCHUtlAllocRcptInfo(cell, alloc, timeInfo, recpReq) RgSchCellCb *cell; RgSchUlAlloc *alloc; CmLteTimingInfo *timeInfo; TfuUeUlSchRecpInfo *recpReq; #endif { - TRC2(rgSCHUtlAllocRcptInfo); #if (ERRCLASS & ERRCLS_DEBUG) if ((alloc == NULLP) || (alloc->hqProc == NULLP)) { - RETVALUE(RFAILED); + return RFAILED; } #endif recpReq->size = alloc->grnt.datSz; @@ -2188,18 +2136,18 @@ TfuUeUlSchRecpInfo *recpReq; } #endif /* ccpu00117050 - DEL - nSrs setting at rgSCHUtlAllocRcptInfo */ - RETVALUE(ROK); + return ROK; } #endif #ifdef LTE_TDD /** - * @brief This function initialises the PRACH subframe occasions + * @brief This function initialises the PRACH slot occasions * * @details * * Function: rgSCHUtlUpdPrachOcc - * Purpose: This function updates the PRACH subframes based on + * Purpose: This function updates the PRACH slots based on * RGR configuration. * * Invoked by: Scheduler @@ -2210,24 +2158,22 @@ TfuUeUlSchRecpInfo *recpReq; * **/ #ifdef ANSI -PRIVATE Void rgSCHUtlUpdPrachOcc +static Void rgSCHUtlUpdPrachOcc ( RgSchCellCb *cell, RgrTddPrachInfo *cellCfg ) #else -PRIVATE Void rgSCHUtlUpdPrachOcc(cell, cellCfg) +static Void rgSCHUtlUpdPrachOcc(cell, cellCfg) RgSchCellCb *cell; RgrTddPrachInfo *cellCfg; #endif { - U8 idx; - U8 count = 0; - U8 size; - U8 startIdx; - U8 endIdx; - - TRC2(rgSCHUtlUpdPrachOcc) + uint8_t idx; + uint8_t count = 0; + uint8_t size; + uint8_t startIdx; + uint8_t endIdx; /* In the 1st half frame */ if(cellCfg->halfFrm == 0) @@ -2244,19 +2190,19 @@ RgrTddPrachInfo *cellCfg; for(idx = startIdx; idx < endIdx; idx++) { if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx] - == RG_SCH_TDD_UL_SUBFRAME) + == RG_SCH_TDD_UL_slot) { if(cellCfg->ulStartSfIdx == count) { size = cell->rachCfg.raOccasion.size; - cell->rachCfg.raOccasion.subFrameNum[size] = idx; + cell->rachCfg.raOccasion.slotNum[size] = idx; cell->rachCfg.raOccasion.size++; break; } count ++; } } - RETVOID; + return; } /** @@ -2276,27 +2222,26 @@ RgrTddPrachInfo *cellCfg; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlPrachCfgInit +Void rgSCHUtlPrachCfgInit ( RgSchCellCb *cell, RgrCellCfg *cellCfg ) #else -PUBLIC Void rgSCHUtlPrachCfgInit(cell, cellCfg) +Void rgSCHUtlPrachCfgInit(cell, cellCfg) RgSchCellCb *cell; RgrCellCfg *cellCfg; #endif { - U8 idx; - U8 subfrmIdx; - U8 splFrm; + uint8_t idx; + uint8_t subfrmIdx; + uint8_t splFrm; - TRC2(rgSCHUtlPrachCfgInit) if(cellCfg->prachRscInfo.numRsc <= 0) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "Invalid" "PRACH resources Configuration "); - RETVOID; + return; } /* Update SFN occasions */ @@ -2305,7 +2250,7 @@ RgrCellCfg *cellCfg; cell->rachCfg.raOccasion.size = 0; - /* Update subframe occasions */ + /* Update slot occasions */ for(idx = 0; idx < cellCfg->prachRscInfo.numRsc; idx++) { if(cellCfg->prachRscInfo.prachInfo[idx].freqIdx == 0) @@ -2322,7 +2267,7 @@ RgrCellCfg *cellCfg; RGR_TDD_SPL_UL_IDX) { subfrmIdx = cell->rachCfg.raOccasion.size; - cell->rachCfg.raOccasion.subFrameNum[subfrmIdx] = splFrm; + cell->rachCfg.raOccasion.slotNum[subfrmIdx] = splFrm; cell->rachCfg.raOccasion.size++; } else @@ -2332,7 +2277,7 @@ RgrCellCfg *cellCfg; } } } - RETVOID; + return; } /** @@ -2342,7 +2287,7 @@ RgrCellCfg *cellCfg; * * Function: rgSCHUtlRgrCellCfg * Purpose: This function initialises the cell with RGR configuration - * and subframe related initialization. + * and slot related initialization. * * Invoked by: Scheduler * @@ -2353,38 +2298,36 @@ RgrCellCfg *cellCfg; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrCellCfg +S16 rgSCHUtlRgrCellCfg ( RgSchCellCb *cell, RgrCellCfg *cellCfg, RgSchErrInfo *errInfo ) #else -PUBLIC S16 rgSCHUtlRgrCellCfg(cell, cellCfg, errInfo) +S16 rgSCHUtlRgrCellCfg(cell, cellCfg, errInfo) RgSchCellCb *cell; RgrCellCfg *cellCfg; RgSchErrInfo *errInfo; #endif { - U8 i; - U8 sfn=0; - U8 sfNum = 0; + uint8_t i; + uint8_t sfn=0; + uint8_t sfNum = 0; RgSchDlSf *sf; CmLteTimingInfo frm; - U8 ulDlCfgIdx = cellCfg->ulDlCfgIdx; - U8 maxSubframes ; - U8 maxDlSubframes; + uint8_t ulDlCfgIdx = cellCfg->ulDlCfgIdx; + uint8_t maxslots ; + uint8_t maxDlslots; S16 ret = ROK; - U16 bw; /*!< Number of RBs in the cell */ + uint16_t bw; /*!< Number of RBs in the cell */ - TRC2(rgSCHUtlRgrCellCfg); - - cmMemset((U8 *)&frm,0,sizeof(CmLteTimingInfo)); + memset(&frm,0,sizeof(CmLteTimingInfo)); /* ccpu00132657-MOD- Determining DLSF array size independent of DELTAS */ - maxDlSubframes = rgSchTddNumDlSubfrmTbl[ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1]; - maxSubframes = 2 * maxDlSubframes; - cell->numDlSubfrms = maxSubframes; + maxDlslots = rgSchTddNumDlSubfrmTbl[ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1]; + maxslots = 2 * maxDlslots; + cell->numDlSubfrms = maxslots; /* ACC-TDD */ cell->tddHqSfnCycle = -1; cell->ulDlCfgIdx = ulDlCfgIdx; @@ -2417,17 +2360,17 @@ RgSchErrInfo *errInfo; bw = cell->bwCfg.dlTotalBw; rgSCHUtlAllocSBuf(cell->instIdx, - (Data **)&cell->subFrms, sizeof(RgSchDlSf *) * maxSubframes); + (Data **)&cell->subFrms, sizeof(RgSchDlSf *) * maxslots); if (cell->subFrms == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } /* Create memory for each frame. */ - for(i = 0; i < maxSubframes; i++) + for(i = 0; i < maxslots; i++) { while(rgSchTddUlDlSubfrmTbl[ulDlCfgIdx][sfNum] == - RG_SCH_TDD_UL_SUBFRAME) + RG_SCH_TDD_UL_slot) { sfNum = (sfNum+1) % RGSCH_NUM_SUB_FRAMES; } @@ -2437,7 +2380,7 @@ RgSchErrInfo *errInfo; { break; } - cmMemset((U8 *)sf, 0, sizeof(*sf)); + memset(sf, 0, sizeof(*sf)); #ifdef LTE_ADV if (ROK != rgSCHLaaInitDlSfCb(cell, sf)) @@ -2465,7 +2408,7 @@ RgSchErrInfo *errInfo; cell->subFrms[i] = sf; sfNum = (sfNum+1) % RGSCH_NUM_SUB_FRAMES; } - if (i != maxSubframes) + if (i != maxslots) { for (; i > 0; i--) { @@ -2480,9 +2423,9 @@ RgSchErrInfo *errInfo; /* ccpu00117052 - MOD - Passing double pointer for proper NULLP assignment*/ rgSCHUtlFreeSBuf(cell->instIdx, - (Data **)(&(cell->subFrms)), sizeof(RgSchDlSf *) * maxSubframes); + (Data **)(&(cell->subFrms)), sizeof(RgSchDlSf *) * maxslots); - RETVALUE(RFAILED); + return RFAILED; } if (cell->sc.apis == NULLP) @@ -2496,22 +2439,22 @@ RgSchErrInfo *errInfo; /* ccpu00132286- Removed deletion of sf nodes as the deletion will be * happening during CellDelete. Added return handling to provide negative * confirm*/ - RETVALUE(ret); + return (ret); } - /* Release the subframes and thereby perform the initialization */ - for (i = 0; i < maxSubframes; i++) + /* Release the slots and thereby perform the initialization */ + for (i = 0; i < maxslots; i++) { - if((i > 0) && (i%maxDlSubframes == 0)) + if((i > 0) && (i%maxDlslots == 0)) { sfn++; } frm.sfn = sfn; - frm.subframe = cell->subFrms[i]->sfNum; + frm.slot = cell->subFrms[i]->sfNum; rgSCHUtlDlRlsSubFrm(cell, frm); } - RETVALUE(ret); + return (ret); } #else @@ -2522,7 +2465,7 @@ RgSchErrInfo *errInfo; * @details * * Function: rgSCHUtlRgrCellCfg - * Purpose: This function creates the subframes needed for the + * Purpose: This function creates the slots needed for the * cell. It then peforms init of the scheduler by calling * scheduler specific cell init function. * @@ -2535,31 +2478,30 @@ RgSchErrInfo *errInfo; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrCellCfg +S16 rgSCHUtlRgrCellCfg ( RgSchCellCb *cell, RgrCellCfg *cellCfg, RgSchErrInfo *errInfo ) #else -PUBLIC S16 rgSCHUtlRgrCellCfg(cell, cellCfg, errInfo) +S16 rgSCHUtlRgrCellCfg(cell, cellCfg, errInfo) RgSchCellCb *cell; RgrCellCfg *cellCfg; RgSchErrInfo *errInfo; #endif { - U8 i; + uint8_t i; RgSchDlSf *sf; CmLteTimingInfo frm; S16 ret; Inst inst = cell->instIdx; /* LTE_ADV_FLAG_REMOVED_START */ - U16 len; - len = (U16)((cell->bwCfg.dlTotalBw % 8 == 0) ? (cell->bwCfg.dlTotalBw/8) : (cell->bwCfg.dlTotalBw/8 + 1)); /*KW fix for LTE_ADV */ + uint16_t len; + len = (uint16_t)((cell->bwCfg.dlTotalBw % 8 == 0) ? (cell->bwCfg.dlTotalBw/8) : (cell->bwCfg.dlTotalBw/8 + 1)); /*KW fix for LTE_ADV */ /* LTE_ADV_FLAG_REMOVED_END */ - TRC2(rgSCHUtlRgrCellCfg); - cmMemset((U8 *)&frm,0,sizeof(CmLteTimingInfo)); + memset(&frm,0,sizeof(CmLteTimingInfo)); /* determine the RBG size and no of RBGs for the configured * DL BW */ @@ -2582,15 +2524,15 @@ RgSchErrInfo *errInfo; cell->noOfRbgs = RGSCH_CEIL(cell->bwCfg.dlTotalBw, cell->rbgSize); /* Create memory for each frame. */ /* Changing loop limit from - RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_SUBFRAMES */ - for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++) + RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_slotS */ + for(i = 0; i < RGSCH_NUM_DL_slotS; i++) { rgSCHUtlAllocSBuf(inst, (Data **)&sf, sizeof(RgSchDlSf)); if (sf == NULLP) { break; } - cmMemset((U8 *)sf, 0, sizeof(*sf)); + memset(sf, 0, sizeof(*sf)); #ifdef LTE_ADV if (ROK != rgSCHLaaInitDlSfCb(cell, sf)) @@ -2612,7 +2554,7 @@ RgSchErrInfo *errInfo; /*initialize the RNTP Buffer*/ if(rgSchDSFRRntpInfoInit(&sf->rntpInfo, cell, sf->bw)) { - RETVALUE(RFAILED); + return RFAILED; } } @@ -2621,7 +2563,7 @@ RgSchErrInfo *errInfo; /*initialise the pools of CC and CE*/ if(rgSchSFRTotalPoolInit(cell, sf)) { - RETVALUE(RFAILED); + return RFAILED; } } /* LTE_ADV_FLAG_REMOVED_END */ @@ -2632,10 +2574,10 @@ RgSchErrInfo *errInfo; if (cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE) { if((rgSCHUtlAllocSBuf(inst, (Data**)&(cell->rntpAggrInfo.val), - (len * sizeof(U8)))) != ROK) + (len * sizeof(uint8_t)))) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for RNTP Alloc"); - RETVALUE(RFAILED); + return RFAILED; } cell->rntpAggrInfo.pres = PRSNT_NODEF; cell->rntpAggrInfo.len = len; @@ -2643,8 +2585,8 @@ RgSchErrInfo *errInfo; /* LTE_ADV_FLAG_REMOVED_END */ /* Changing loop limit from - RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_SUBFRAMES */ - if (i != RGSCH_NUM_DL_SUBFRAMES) + RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_slotS */ + if (i != RGSCH_NUM_DL_slotS) { for (; i > 0; i--) { @@ -2656,7 +2598,7 @@ RgSchErrInfo *errInfo; rgSCHLaaDeInitDlSfCb(cell, sf); #endif } - RETVALUE(RFAILED); + return RFAILED; } if (cell->sc.apis == NULLP) @@ -2664,8 +2606,8 @@ RgSchErrInfo *errInfo; cell->sc.apis = &rgSchCmnApis; } - /* Release the subframes and thereby perform the initialization */ - for (i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++) + /* Release the slots and thereby perform the initialization */ + for (i = 0; i < RGSCH_NUM_DL_slotS; i++) { if (i >= RGSCH_NUM_SUB_FRAMES) { @@ -2674,7 +2616,7 @@ RgSchErrInfo *errInfo; it to one */ frm.sfn = 1; } - frm.subframe = i % RGSCH_NUM_SUB_FRAMES; + frm.slot = i % RGSCH_NUM_SUB_FRAMES; rgSCHUtlDlRlsSubFrm(cell, frm); } @@ -2682,7 +2624,7 @@ RgSchErrInfo *errInfo; if (ret != ROK) { errInfo->errCause = RGSCHERR_SCH_CFG; - RETVALUE(RFAILED); + return RFAILED; } #ifdef EMTC_ENABLE if(cell->emtcEnable) @@ -2695,12 +2637,12 @@ RgSchErrInfo *errInfo; RGSCH_IOT_PUCCH_POOLSZ, RGSCH_IOT_PUCCH_DELTA, RGSCH_IOT_PUCCH_MAXFREQSZ) != ROK) { errInfo->errCause = RGSCHERR_SCH_CFG; - RETVALUE(RFAILED); + return RFAILED; } } #endif - RETVALUE(ret); + return (ret); } #endif @@ -2723,21 +2665,20 @@ RgSchErrInfo *errInfo; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrCellRecfg +S16 rgSCHUtlRgrCellRecfg ( RgSchCellCb *cell, RgrCellRecfg *recfg, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlRgrCellRecfg(cell, recfg, err) +S16 rgSCHUtlRgrCellRecfg(cell, recfg, err) RgSchCellCb *cell; RgrCellRecfg *recfg; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlRgrCellRecfg); - RETVALUE(cell->sc.apis->rgSCHRgrCellRecfg(cell, recfg, err)); + return (cell->sc.apis->rgSCHRgrCellRecfg(cell, recfg, err)); } @@ -2750,7 +2691,7 @@ RgSchErrInfo *err; * Function: rgSCHUtlFreeCell * Purpose: This function updates the value of Y stored in the * UE control block. It uses the previously computed - * value for computing for this subframe. + * value for computing for this slot. * * Invoked by: Scheduler * @@ -2759,41 +2700,40 @@ RgSchErrInfo *err; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlFreeCell +S16 rgSCHUtlFreeCell ( RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlFreeCell(cell) +S16 rgSCHUtlFreeCell(cell) RgSchCellCb *cell; #endif { - U8 i; + uint8_t i; CmLListCp *lst; RgSchPdcch *pdcch; RgSchPdcchInfo *pdcchInfo; RgSchPhichInfo *phichInfo; RgSchPhich *phich; Inst inst = cell->instIdx; - U8 maxSubframes; + uint8_t maxslots; #ifdef LTE_TDD RgSchRaReqInfo *raReqInfo; - U8 idx; + uint8_t idx; #endif - TRC2(rgSCHUtlFreeCell); #ifdef LTE_TDD - maxSubframes = cell->numDlSubfrms; + maxslots = cell->numDlSubfrms; #else - maxSubframes = RGSCH_NUM_DL_SUBFRAMES; + maxslots = RGSCH_NUM_DL_slotS; #endif /* Invoke the index for scheduler, cell deletion */ cell->sc.apis->rgSCHFreeCell(cell); - /* Release the subframes allocated */ - for (i = 0; i < maxSubframes; i++) + /* Release the slots allocated */ + for (i = 0; i < maxslots; i++) { #ifdef LTE_ADV rgSCHLaaDeInitDlSfCb(cell, cell->subFrms[i]); @@ -2834,11 +2774,11 @@ RgSchCellCb *cell; rgSCHUtlFreeSBuf(inst, (Data **)(&(cell->subFrms[i])), sizeof(RgSchDlSf)); } #ifdef LTE_TDD - /* Release the subframe pointers */ + /* Release the slot pointers */ /* ccpu00117052 - MOD - Passing double pointer for proper NULLP assignment*/ rgSCHUtlFreeSBuf(inst, - (Data **) (&(cell->subFrms)), sizeof(RgSchDlSf *) * maxSubframes); + (Data **) (&(cell->subFrms)), sizeof(RgSchDlSf *) * maxslots); for(idx=0; idx < cell->raInfo.lstSize; idx++) { @@ -2885,7 +2825,7 @@ RgSchCellCb *cell; rgSchDSFRRntpInfoFree(&cell->rntpAggrInfo, cell, cell->bwCfg.dlTotalBw); /* LTE_ADV_FLAG_REMOVED_END */ - RETVALUE(ROK); + return ROK; } @@ -2909,7 +2849,7 @@ RgSchCellCb *cell; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrUeCfg +S16 rgSCHUtlRgrUeCfg ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -2917,14 +2857,13 @@ RgrUeCfg *cfg, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlRgrUeCfg(cell, ue, cfg, err) +S16 rgSCHUtlRgrUeCfg(cell, ue, cfg, err) RgSchCellCb *cell; RgSchUeCb *ue; RgrUeCfg *cfg; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlRgrUeCfg); /* Assign TM 1 as UE's default TM */ ue->mimoInfo.txMode = RGR_UE_TM_1; @@ -2936,7 +2875,7 @@ RgSchErrInfo *err; if (cfg->txMode.txModeEnum == RGR_UE_TM_5) { err->errCause = RGSCHERR_SCH_CFG; - RETVALUE(RFAILED); + return RFAILED; } ue->mimoInfo.txMode = cfg->txMode.txModeEnum; } @@ -2949,7 +2888,7 @@ RgSchErrInfo *err; (cfg->puschDedCfg.bRIIdx > 15)) { err->errCause = RGSCHERR_SCH_CFG; - RETVALUE(RFAILED); + return RFAILED; } ue->ul.betaHqOffst = cfg->puschDedCfg.bACKIdx; ue->ul.betaCqiOffst = cfg->puschDedCfg.bCQIIdx; @@ -2957,10 +2896,10 @@ RgSchErrInfo *err; #endif ue->csgMmbrSta = cfg->csgMmbrSta; #ifdef RG_PFS_STATS - cmMemset((U8 *)&ue->pfsStats, 0, sizeof(RgSchPfsStats)); + memset(&ue->pfsStats, 0, sizeof(RgSchPfsStats)); #endif /* Call the handler of the scheduler based on cell configuration */ - RETVALUE(cell->sc.apis->rgSCHRgrUeCfg(cell, ue, cfg, err)); + return (cell->sc.apis->rgSCHRgrUeCfg(cell, ue, cfg, err)); } /* Start : LTEMAC_2.1_DEV_CFG */ @@ -2985,7 +2924,7 @@ RgSchErrInfo *err; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrLcCfg +S16 rgSCHUtlRgrLcCfg ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -2994,7 +2933,7 @@ RgrLchCfg *cfg, RgSchErrInfo *errInfo ) #else -PUBLIC S16 rgSCHUtlRgrLcCfg(cell, ue, dlLc, cfg, errInfo) +S16 rgSCHUtlRgrLcCfg(cell, ue, dlLc, cfg, errInfo) RgSchCellCb *cell; RgSchUeCb *ue; RgSchDlLcCb *dlLc; @@ -3002,8 +2941,7 @@ RgrLchCfg *cfg; RgSchErrInfo *errInfo; #endif { - TRC2(rgSCHUtlRgrLcCfg); - RETVALUE(cell->sc.apis->rgSCHRgrLchCfg(cell, ue, dlLc, cfg, errInfo)); + return (cell->sc.apis->rgSCHRgrLchCfg(cell, ue, dlLc, cfg, errInfo)); } @@ -3028,7 +2966,7 @@ RgSchErrInfo *errInfo; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrLcRecfg +S16 rgSCHUtlRgrLcRecfg ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -3037,7 +2975,7 @@ RgrLchRecfg *recfg, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlRgrLcRecfg(cell, ue, dlLc, recfg, err) +S16 rgSCHUtlRgrLcRecfg(cell, ue, dlLc, recfg, err) RgSchCellCb *cell; RgSchUeCb *ue; RgSchDlLcCb *dlLc; @@ -3045,8 +2983,7 @@ RgrLchRecfg *recfg; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlRgrLcRecfg); - RETVALUE(cell->sc.apis->rgSCHRgrLchRecfg(cell, ue, dlLc, recfg, err)); + return (cell->sc.apis->rgSCHRgrLchRecfg(cell, ue, dlLc, recfg, err)); } /** @@ -3062,30 +2999,29 @@ RgSchErrInfo *err; * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue * @param[in] CmLteLcId lcId - * @param[in] U8 lcgId + * @param[in] uint8_t lcgId * @return S16 * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrLcDel +S16 rgSCHUtlRgrLcDel ( RgSchCellCb *cell, RgSchUeCb *ue, CmLteLcId lcId, -U8 lcgId +uint8_t lcgId ) #else -PUBLIC S16 rgSCHUtlRgrLcDel(cell, ue, lcId, lcgId) +S16 rgSCHUtlRgrLcDel(cell, ue, lcId, lcgId) RgSchCellCb *cell; RgSchUeCb *ue; CmLteLcId lcId; -U8 lcgId; +uint8_t lcgId; #endif { - TRC2(rgSCHUtlRgrLcDel); cell->sc.apis->rgSCHRgrLchDel(cell, ue, lcId, lcgId); - RETVALUE (ROK); + return (ROK); } /* rgSCHUtlRgrLcDel */ /** @@ -3108,7 +3044,7 @@ U8 lcgId; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrLcgCfg +S16 rgSCHUtlRgrLcgCfg ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -3116,15 +3052,14 @@ RgrLcgCfg *cfg, RgSchErrInfo *errInfo ) #else -PUBLIC S16 rgSCHUtlRgrLcgCfg(cell, ue, cfg, errInfo) +S16 rgSCHUtlRgrLcgCfg(cell, ue, cfg, errInfo) RgSchCellCb *cell; RgSchUeCb *ue; RgrLcgCfg *cfg; RgSchErrInfo *errInfo; #endif { - TRC2(rgSCHUtlRgrLcgCfg); - RETVALUE(cell->sc.apis->rgSCHRgrLcgCfg(cell, ue, &(ue->ul.lcgArr[cfg->ulInfo.lcgId]), cfg, errInfo)); + return (cell->sc.apis->rgSCHRgrLcgCfg(cell, ue, &(ue->ul.lcgArr[cfg->ulInfo.lcgId]), cfg, errInfo)); } @@ -3148,7 +3083,7 @@ RgSchErrInfo *errInfo; * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrLcgRecfg +S16 rgSCHUtlRgrLcgRecfg ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -3156,15 +3091,14 @@ RgrLcgRecfg *recfg, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlRgrLcgRecfg(cell, ue, recfg, err) +S16 rgSCHUtlRgrLcgRecfg(cell, ue, recfg, err) RgSchCellCb *cell; RgSchUeCb *ue; RgrLcgRecfg *recfg; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlRgrLcgRecfg); - RETVALUE(cell->sc.apis->rgSCHRgrLcgRecfg(cell, ue, &(ue->ul.lcgArr[recfg->ulRecfg.lcgId]), recfg, err)); + return (cell->sc.apis->rgSCHRgrLcgRecfg(cell, ue, &(ue->ul.lcgArr[recfg->ulRecfg.lcgId]), recfg, err)); } /* rgSCHUtlRgrLcRecfg */ /** @@ -3186,24 +3120,23 @@ RgSchErrInfo *err; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlRgrLcgDel +Void rgSCHUtlRgrLcgDel ( RgSchCellCb *cell, RgSchUeCb *ue, -U8 lcgId +uint8_t lcgId ) #else -PUBLIC Void rgSCHUtlRgrLcgDel(cell, ue, lcgId) +Void rgSCHUtlRgrLcgDel(cell, ue, lcgId) RgSchCellCb *cell; RgSchUeCb *ue; -U8 lcgId; +uint8_t lcgId; #endif { - TRC2(rgSCHUtlRgrLcgDel); cell->sc.apis->rgSCHFreeLcg(cell, ue, &ue->ul.lcgArr[lcgId]); /* Stack Crash problem for TRACE5 changes. added the return below . */ - RETVOID; + return; } /* rgSCHUtlRgrLcgDel */ @@ -3227,23 +3160,22 @@ U8 lcgId; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDoaInd +Void rgSCHUtlDoaInd ( RgSchCellCb *cell, RgSchUeCb *ue, TfuDoaRpt *doaRpt ) #else -PUBLIC Void rgSCHUtlDoaInd(cell, ue, doaRpt) +Void rgSCHUtlDoaInd(cell, ue, doaRpt) RgSchCellCb *cell; RgSchUeCb *ue; TfuDoaRpt *doaRpt; #endif { - TRC2(rgSCHUtlDoaInd); ue->mimoInfo.doa.pres = PRSNT_NODEF; ue->mimoInfo.doa.val = doaRpt->doa; - RETVOID; + return; } /** @@ -3264,7 +3196,7 @@ TfuDoaRpt *doaRpt; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlCqiInd +Void rgSCHUtlDlCqiInd ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -3272,7 +3204,7 @@ TfuDlCqiRpt *dlCqiRpt, CmLteTimingInfo timingInfo ) #else -PUBLIC Void rgSCHUtlDlCqiInd(cell, ue, dlCqiRpt, timingInfo) +Void rgSCHUtlDlCqiInd(cell, ue, dlCqiRpt, timingInfo) RgSchCellCb *cell; RgSchUeCb *ue; TfuDlCqiRpt *dlCqiRpt; @@ -3280,7 +3212,6 @@ CmLteTimingInfo timingInfo; #endif { RgSchCellCb *sCellCb = NULLP; - TRC2(rgSCHUtlDlCqiInd); if (dlCqiRpt->isPucchInfo) { sCellCb = ue->cellInfo[dlCqiRpt->dlCqiInfo.pucchCqi.cellIdx]->cell; @@ -3289,7 +3220,7 @@ CmLteTimingInfo timingInfo; } else { - U32 idx; + uint32_t idx; for (idx = 0; idx < dlCqiRpt->dlCqiInfo.pusch.numOfCells; idx++) { sCellCb = ue->cellInfo[dlCqiRpt->dlCqiInfo.pusch.puschCqi[idx].cellIdx]->cell; @@ -3297,7 +3228,7 @@ CmLteTimingInfo timingInfo; (Void *)&dlCqiRpt->dlCqiInfo.pusch.puschCqi[idx], timingInfo); } } - RETVOID; + return; } @@ -3320,7 +3251,7 @@ CmLteTimingInfo timingInfo; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlSrsInd +Void rgSCHUtlSrsInd ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -3328,16 +3259,15 @@ TfuSrsRpt *srsRpt, CmLteTimingInfo timingInfo ) #else -PUBLIC Void rgSCHUtlSrsInd(cell, ue, srsRpt, timingInfo) +Void rgSCHUtlSrsInd(cell, ue, srsRpt, timingInfo) RgSchCellCb *cell; RgSchUeCb *ue; TfuSrsRpt *srsRpt; CmLteTimingInfo timingInfo; #endif { - TRC2(rgSCHUtlSrsInd); cell->sc.apis->rgSCHSrsInd(cell, ue, srsRpt, timingInfo); - RETVOID; + return; } #endif @@ -3357,20 +3287,19 @@ CmLteTimingInfo timingInfo; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlTARpt +Void rgSCHUtlDlTARpt ( RgSchCellCb *cell, RgSchUeCb *ue ) #else -PUBLIC Void rgSCHUtlDlTARpt(cell, ue) +Void rgSCHUtlDlTARpt(cell, ue) RgSchCellCb *cell; RgSchUeCb *ue; #endif { - TRC2(rgSCHUtlDlTARpt); cell->sc.apis->rgSCHDlTARpt(cell, ue); - RETVOID; + return; } @@ -3390,20 +3319,19 @@ RgSchUeCb *ue; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlRlsSubFrm +Void rgSCHUtlDlRlsSubFrm ( RgSchCellCb *cell, CmLteTimingInfo subFrm ) #else -PUBLIC Void rgSCHUtlDlRlsSubFrm(cell, subFrm) +Void rgSCHUtlDlRlsSubFrm(cell, subFrm) RgSchCellCb *cell; CmLteTimingInfo subFrm; #endif { - TRC2(rgSCHUtlDlRlsSubFrm); cell->sc.apis->rgSCHDlRlsSubFrm(cell, subFrm); - RETVOID; + return; } #ifdef TFU_UPGRADE @@ -3422,31 +3350,29 @@ CmLteTimingInfo subFrm; * grant req for APERCQI to SCH. * * @param[in] RgSchUeCb *ue - * @param[in] U8 isAck + * @param[in] uint8_t isAck * * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUpdACqiTrigWt +Void rgSCHUtlUpdACqiTrigWt ( RgSchUeCb *ue, RgSchUeCellInfo *cellInfo, -U8 isAck +uint8_t isAck ) #else -PUBLIC Void rgSCHUtlUpdACqiTrigWt(ue,cellInfo, isAck) +Void rgSCHUtlUpdACqiTrigWt(ue,cellInfo, isAck) RgSchUeCb *ue; RgSchUeCellInfo *cellInfo; -U8 isAck; +uint8_t isAck; #endif { #ifdef LTE_ADV - U8 triggerSet = 0; - U8 sIdx = 0; + uint8_t triggerSet = 0; + uint8_t sIdx = 0; #endif - TRC2(rgSCHUtlUpdACqiTrigWt); - if (isAck == TFU_HQFDB_ACK) { cellInfo->acqiCb.aCqiTrigWt += RG_APER_CQI_ACK_WGT; @@ -3466,7 +3392,7 @@ U8 isAck; /* Already one ACQI trigger procedure is going on * which is not yet satisfied. Delaying this request till * the previous is getting satisfied*/ - RETVOID; + return; } ue->dl.reqForCqi = TRUE; @@ -3491,7 +3417,7 @@ U8 isAck; rgSCHUtlSrRcvd(cell, ue, cell->crntTime, &unUsed); } - RETVOID; + return; } #endif @@ -3510,22 +3436,21 @@ U8 isAck; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlHdlUlTransInd +Void rgSCHUtlHdlUlTransInd ( RgSchCellCb *cell, RgSchUeCb *ue, CmLteTimingInfo timingInfo ) #else -PUBLIC Void rgSCHUtlHdlUlTransInd(cell, ue, timingInfo) +Void rgSCHUtlHdlUlTransInd(cell, ue, timingInfo) RgSchCellCb *cell; RgSchUeCb *ue; CmLteTimingInfo timingInfo; #endif { - TRC2(rgSCHUtlHdlUlTransInd); cell->sc.apis->rgSCHHdlUlTransInd(cell, ue, timingInfo); - RETVOID; + return; } #ifdef LTEMAC_SPS /** @@ -3543,22 +3468,21 @@ CmLteTimingInfo timingInfo; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlHdlCrcInd +Void rgSCHUtlHdlCrcInd ( RgSchCellCb *cell, RgSchUeCb *ue, CmLteTimingInfo timingInfo ) #else -PUBLIC Void rgSCHUtlHdlCrcInd(cell, ue, timingInfo) +Void rgSCHUtlHdlCrcInd(cell, ue, timingInfo) RgSchCellCb *cell; RgSchUeCb *ue; CmLteTimingInfo timingInfo; #endif { - TRC2(rgSCHUtlHdlCrcFail); cell->sc.apis->rgSCHUlCrcInd(cell, ue, timingInfo); - RETVOID; + return; } /* end of rgSCHUtlHdlCrcFailInd */ /** @@ -3576,22 +3500,21 @@ CmLteTimingInfo timingInfo; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlHdlCrcFailInd +Void rgSCHUtlHdlCrcFailInd ( RgSchCellCb *cell, RgSchUeCb *ue, CmLteTimingInfo timingInfo ) #else -PUBLIC Void rgSCHUtlHdlCrcFailInd(cell, ue, timingInfo) +Void rgSCHUtlHdlCrcFailInd(cell, ue, timingInfo) RgSchCellCb *cell; RgSchUeCb *ue; CmLteTimingInfo timingInfo; #endif { - TRC2(rgSCHUtlHdlCrcFail); cell->sc.apis->rgSCHUlCrcFailInd(cell, ue, timingInfo); - RETVOID; + return; } /* end of rgSCHUtlHdlCrcFailInd */ #endif /* LTEMAC_SPS */ @@ -3614,20 +3537,19 @@ CmLteTimingInfo timingInfo; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlProcAddToRetx +Void rgSCHUtlDlProcAddToRetx ( RgSchCellCb *cell, RgSchDlHqProcCb *hqP ) #else -PUBLIC Void rgSCHUtlDlProcAddToRetx(cell, hqP) +Void rgSCHUtlDlProcAddToRetx(cell, hqP) RgSchCellCb *cell; RgSchDlHqProcCb *hqP; #endif { - TRC2(rgSCHUtlDlProcAddToRetx); cell->sc.apis->rgSCHDlProcAddToRetx(cell, hqP); - RETVOID; + return; } @@ -3637,29 +3559,29 @@ RgSchDlHqProcCb *hqP; * @details * * Function: rgSCHUtlDlHqPTbAddToTx - * Purpose: This function a HarqProcess TB to the subframe + * Purpose: This function a HarqProcess TB to the slot * list. * * Invoked by: Scheduler * * @param[in] RgSubFrm* subFrm * @param[in] RgDlHqProc* hqP - * @param[in] U8 tbIdx + * @param[in] uint8_t tbIdx * @return Void * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlHqPTbAddToTx +Void rgSCHUtlDlHqPTbAddToTx ( RgSchDlSf *subFrm, RgSchDlHqProcCb *hqP, -U8 tbIdx +uint8_t tbIdx ) #else -PUBLIC Void rgSCHUtlDlHqPTbAddToTx(subFrm, hqP, tbIdx) +Void rgSCHUtlDlHqPTbAddToTx(subFrm, hqP, tbIdx) RgSchDlSf *subFrm; RgSchDlHqProcCb *hqP; -U8 tbIdx; +uint8_t tbIdx; #endif { RgSchUeCb *ue = NULLP; @@ -3688,7 +3610,7 @@ U8 tbIdx; cmLListAdd2Tail(&ue->dl.dlSfHqInfo[cell->cellId][subFrm->dlIdx].hqPLst,&hqP->hqPSfLnk); #ifdef CA_DBG { - extern U32 gSCellSchedCount,gPrimarySchedCount; + uint32_t gSCellSchedCount,gPrimarySchedCount; if(RG_SCH_IS_CELL_SEC(hqP->hqE->ue,hqP->hqE->cell)) { gSCellSchedCount++; @@ -3719,7 +3641,7 @@ U8 tbIdx; hqP->subFrm = subFrm; /* CA Dev End */ - RETVOID; + return; } @@ -3730,31 +3652,31 @@ U8 tbIdx; * @details * * Function: rgSCHUtlDlHqPTbRmvFrmTx - * Purpose: This function removes a HarqProcess TB to the subframe + * Purpose: This function removes a HarqProcess TB to the slot * list. * * Invoked by: Scheduler * * @param[in] RgSubFrm* subFrm * @param[in] RgDlHqProc* hqP - * @param[in] U8 tbIdx + * @param[in] uint8_t tbIdx * @param[in] Bool isRepeting * @return Void * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlHqPTbRmvFrmTx +Void rgSCHUtlDlHqPTbRmvFrmTx ( RgSchDlSf *subFrm, RgSchDlHqProcCb *hqP, -U8 tbIdx, +uint8_t tbIdx, Bool isRepeting ) #else -PUBLIC Void rgSCHUtlDlHqPTbRmvFrmTx(subFrm, hqP, tbIdx, isRepeting) +Void rgSCHUtlDlHqPTbRmvFrmTx(subFrm, hqP, tbIdx, isRepeting) RgSchDlSf *subFrm; RgSchDlHqProcCb *hqP; -U8 tbIdx; +uint8_t tbIdx; Bool isRepeting; #endif { @@ -3796,7 +3718,7 @@ Bool isRepeting; } hqP->subFrm = NULLP; } - RETVOID; + return; } #ifdef LTE_ADV @@ -3814,26 +3736,24 @@ Bool isRepeting; * @return RgSchUeCb* **/ #ifdef ANSI -PUBLIC RgSchCellCb* rgSchUtlGetCellCb +RgSchCellCb* rgSchUtlGetCellCb ( Inst inst, - U16 cellId + uint16_t cellId ) #else -PUBLIC RgSchCellCb* rgSchUtlGetCellCb(inst, cellId) +RgSchCellCb* rgSchUtlGetCellCb(inst, cellId) Inst inst; - U16 cellId; + uint16_t cellId; #endif { RgSchCellCb *cellCb = NULLP; - U8 strtCellId; - - TRC2(rgSchUtlGetCellCb); + uint8_t strtCellId; strtCellId = rgSchCb[inst].genCfg.startCellId; cellCb = rgSchCb[inst].cells[cellId - strtCellId]; - RETVALUE(cellCb); + return (cellCb); } /* rgSchUtlGetCellCb */ @@ -3847,32 +3767,30 @@ PUBLIC RgSchCellCb* rgSchUtlGetCellCb(inst, cellId) * * @param[in] *cellId * @param[in] RgSchUeCb *ue - * @return U8 servCellIdx + * @return uint8_t servCellIdx **/ #ifdef ANSI -PUBLIC U8 rgSchUtlGetServCellIdx +uint8_t rgSchUtlGetServCellIdx ( Inst inst, - U16 cellId, + uint16_t cellId, RgSchUeCb *ue ) #else -PUBLIC U8 rgSchUtlGetServCellIdx(inst,cellId,ue) +uint8_t rgSchUtlGetServCellIdx(inst,cellId,ue) Inst inst; - U16 cellId; + uint16_t cellId; RgSchUeCb *ue; #endif { - U8 servCellIdx; - U16 strtCellId; - - TRC2(rgSchUtlGetCellCb); + uint8_t servCellIdx; + uint16_t strtCellId; strtCellId = rgSchCb[inst].genCfg.startCellId; servCellIdx = ue->cellIdToCellIdxMap[cellId - strtCellId]; - RETVALUE(servCellIdx); + return (servCellIdx); } /* rgSchUtlGetCellCb */ @@ -3889,27 +3807,25 @@ PUBLIC U8 rgSchUtlGetServCellIdx(inst,cellId,ue) * @return RgSchUeCb* **/ #ifdef ANSI -PUBLIC S16 rgSchUtlVldtCellId +S16 rgSchUtlVldtCellId ( Inst inst, - U16 cellId + uint16_t cellId ) #else -PUBLIC S16 rgSchUtlVldtCellId(inst, cellId) +S16 rgSchUtlVldtCellId(inst, cellId) Inst inst; - U16 cellId; + uint16_t cellId; #endif { - U8 strtCellId; - - TRC2(rgSchUtlVldtCellId); + uint8_t strtCellId; strtCellId = rgSchCb[inst].genCfg.startCellId; if((cellId >= strtCellId) && ((cellId - strtCellId) < CM_LTE_MAX_CELLS)) { - RETVALUE(ROK); + return ROK; } - RETVALUE(RFAILED); + return RFAILED; } /* rgSchUtlVldtCellId */ #endif /* LTE_ADV*/ @@ -3932,7 +3848,7 @@ PUBLIC S16 rgSchUtlVldtCellId(inst, cellId) * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrUeRecfg +S16 rgSCHUtlRgrUeRecfg ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -3940,7 +3856,7 @@ RgrUeRecfg *ueRecfg, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlRgrUeRecfg(cell, ue, ueRecfg, err) +S16 rgSCHUtlRgrUeRecfg(cell, ue, ueRecfg, err) RgSchCellCb *cell; RgSchUeCb *ue; RgrUeRecfg *ueRecfg; @@ -3950,8 +3866,6 @@ RgSchErrInfo *err; /* Changes for UE Category Reconfiguration feature addition */ RgSchCmnUe *ueSch = RG_SCH_CMN_GET_UE(ue, cell); - TRC2(rgSCHUtlRgrUeRecfg); - /* Changes for UE Category Reconfiguration feature addition */ if (ueRecfg->ueRecfgTypes & RGR_UE_UECAT_RECFG) { @@ -3970,7 +3884,7 @@ RgSchErrInfo *err; if (ueRecfg->txMode.txModeEnum == RGR_UE_TM_5) { err->errCause = RGSCHERR_SCH_CFG; - RETVALUE(RFAILED); + return RFAILED; } #ifdef LTE_ADV if(ue->mimoInfo.txMode != ueRecfg->txMode.txModeEnum) @@ -4010,7 +3924,7 @@ RgSchErrInfo *err; /* Commenting here to assign garbage value when it is not set in APP. */ //ue->accessStratumRls = ueRecfg->accessStratumRls; - RETVALUE(cell->sc.apis->rgSCHRgrUeRecfg(cell, ue, ueRecfg, err)); + return (cell->sc.apis->rgSCHRgrUeRecfg(cell, ue, ueRecfg, err)); } /* rgSCHUtlRgrUeRecfg */ /** @@ -4030,24 +3944,23 @@ RgSchErrInfo *err; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlFreeDlLc +Void rgSCHUtlFreeDlLc ( RgSchCellCb *cell, RgSchUeCb *ue, RgSchDlLcCb *svc ) #else -PUBLIC Void rgSCHUtlFreeDlLc(cell, ue, svc) +Void rgSCHUtlFreeDlLc(cell, ue, svc) RgSchCellCb *cell; RgSchUeCb *ue; RgSchDlLcCb *svc; #endif { - TRC2(rgSCHUtlFreeDlLc); cell->sc.apis->rgSCHFreeDlLc(cell, ue, svc); /* Stack Crash problem for TRACE5 changes. added the return below . */ - RETVOID; + return; } @@ -4066,25 +3979,24 @@ RgSchDlLcCb *svc; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlFreeUe +Void rgSCHUtlFreeUe ( RgSchCellCb *cell, RgSchUeCb *ue ) #else -PUBLIC Void rgSCHUtlFreeUe(cell, ue) +Void rgSCHUtlFreeUe(cell, ue) RgSchCellCb *cell; RgSchUeCb *ue; #endif { - TRC2(rgSCHUtlFreeUe); #ifdef LTE_TDD rgSCHUtlDelUeANFdbkInfo(ue,RGSCH_PCELL_INDEX); #endif cell->sc.apis->rgSCHFreeUe(cell, ue); /* Stack Crash problem for TRACE5 changes. added the return below . */ - RETVOID; + return; } /* rgSCHUtlFreeUe */ @@ -4105,22 +4017,21 @@ RgSchUeCb *ue; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDlDedBoUpd +Void rgSCHUtlDlDedBoUpd ( RgSchCellCb *cell, RgSchUeCb *ue, RgSchDlLcCb *lc ) #else -PUBLIC Void rgSCHUtlDlDedBoUpd(cell, ue, lc) +Void rgSCHUtlDlDedBoUpd(cell, ue, lc) RgSchCellCb *cell; RgSchUeCb *ue; RgSchDlLcCb *lc; #endif { - TRC2(rgSCHUtlDlDedBoUpd); cell->sc.apis->rgSCHDlDedBoUpd(cell, ue, lc); - RETVOID; + return; } /** * @brief Record MSG3 allocation into the UE @@ -4138,22 +4049,21 @@ RgSchDlLcCb *lc; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlRecMsg3Alloc +Void rgSCHUtlRecMsg3Alloc ( RgSchCellCb *cell, RgSchUeCb *ue, RgSchRaCb *raCb ) #else -PUBLIC Void rgSCHUtlRecMsg3Alloc(cell, ue, raCb) +Void rgSCHUtlRecMsg3Alloc(cell, ue, raCb) RgSchCellCb *cell; RgSchUeCb *ue; RgSchRaCb *raCb; #endif { - TRC2(rgSCHUtlRecMsg3Alloc) cell->sc.apis->rgSCHUlRecMsg3Alloc(cell, ue, raCb); - RETVOID; + return; } /* rgSCHRecMsg3Alloc */ @@ -4177,21 +4087,20 @@ RgSchRaCb *raCb; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUpdUlHqProc +S16 rgSCHUtlUpdUlHqProc ( RgSchCellCb *cell, RgSchUlHqProcCb *curProc, RgSchUlHqProcCb *oldProc ) #else -PUBLIC S16 rgSCHUtlUpdUlHqProc(cell, curProc, oldProc) +S16 rgSCHUtlUpdUlHqProc(cell, curProc, oldProc) RgSchCellCb *cell; RgSchUlHqProcCb *curProc; RgSchUlHqProcCb *oldProc; #endif { - TRC2(rgSCHUtlUpdUlHqProc); - RETVALUE(cell->sc.apis->rgSCHUpdUlHqProc(cell, curProc, oldProc)); + return (cell->sc.apis->rgSCHUpdUlHqProc(cell, curProc, oldProc)); } /* rgSCHUtlUpdUlHqProc */ #endif /** @@ -4212,25 +4121,23 @@ RgSchUlHqProcCb *oldProc; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlContResUlGrant +S16 rgSCHUtlContResUlGrant ( RgSchCellCb *cell, RgSchUeCb *ue, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlContResUlGrant(cell, ue, err) +S16 rgSCHUtlContResUlGrant(cell, ue, err) RgSchCellCb *cell; RgSchUeCb *ue; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlContResUlGrant); - ue->isMsg4PdcchWithCrnti = TRUE; - RETVALUE(cell->sc.apis->rgSCHContResUlGrant(cell, ue, err)); + return (cell->sc.apis->rgSCHContResUlGrant(cell, ue, err)); } /* rgSCHUtlContResUlGrant */ /** @@ -4250,7 +4157,7 @@ RgSchErrInfo *err; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlSrRcvd +S16 rgSCHUtlSrRcvd ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -4258,15 +4165,14 @@ CmLteTimingInfo frm, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlSrRcvd(cell, ue, frm, err) +S16 rgSCHUtlSrRcvd(cell, ue, frm, err) RgSchCellCb *cell; RgSchUeCb *ue; CmLteTimingInfo frm; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlSrRcvd); - RETVALUE(cell->sc.apis->rgSCHSrRcvd(cell, ue, frm, err)); + return (cell->sc.apis->rgSCHSrRcvd(cell, ue, frm, err)); } /* rgSCHUtlSrRcvd */ /** @@ -4280,34 +4186,33 @@ RgSchErrInfo *err; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 lcgId - * @param[in] U8 bsr + * @param[in] uint8_t lcgId + * @param[in] uint8_t bsr * @param[out] RgSchErrInfo *err * @return Void * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUpdBsrShort +Void rgSCHUtlUpdBsrShort ( RgSchCellCb *cell, RgSchUeCb *ue, -U8 lcgId, -U8 bsr, +uint8_t lcgId, +uint8_t bsr, RgSchErrInfo *err ) #else -PUBLIC Void rgSCHUtlUpdBsrShort(cell, ue, lcgId, bsr, err) +Void rgSCHUtlUpdBsrShort(cell, ue, lcgId, bsr, err) RgSchCellCb *cell; RgSchUeCb *ue; -U8 lcgId; -U8 bsr; +uint8_t lcgId; +uint8_t bsr; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlUpdBsrShort); cell->sc.apis->rgSCHUpdBsrShort(cell, ue, &ue->ul.lcgArr[lcgId], bsr, err); - RETVOID; + return; } /* rgSCHUtlUpdBsrShort */ @@ -4323,34 +4228,33 @@ RgSchErrInfo *err; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 lcgId - * @param[in] U8 bsr + * @param[in] uint8_t lcgId + * @param[in] uint8_t bsr * @param[out] RgSchErrInfo *err * @return Void * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUpdBsrTrunc +Void rgSCHUtlUpdBsrTrunc ( RgSchCellCb *cell, RgSchUeCb *ue, -U8 lcgId, -U8 bsr, +uint8_t lcgId, +uint8_t bsr, RgSchErrInfo *err ) #else -PUBLIC Void rgSCHUtlUpdBsrTrunc(cell, ue, lcgId, bsr, err) +Void rgSCHUtlUpdBsrTrunc(cell, ue, lcgId, bsr, err) RgSchCellCb *cell; RgSchUeCb *ue; -U8 lcgId; -U8 bsr; +uint8_t lcgId; +uint8_t bsr; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlUpdBsrTrunc); cell->sc.apis->rgSCHUpdBsrTrunc(cell, ue, &ue->ul.lcgArr[lcgId], bsr, err); - RETVOID; + return; } /* rgSCHUtlUpdBsrTrunc */ @@ -4368,46 +4272,45 @@ RgSchErrInfo *err; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 bsr0 - * @param[in] U8 bsr1 - * @param[in] U8 bsr2 - * @param[in] U8 bsr3 + * @param[in] uint8_t bsr0 + * @param[in] uint8_t bsr1 + * @param[in] uint8_t bsr2 + * @param[in] uint8_t bsr3 * @param[out] RgSchErrInfo *err * @return Void * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUpdBsrLong +Void rgSCHUtlUpdBsrLong ( RgSchCellCb *cell, RgSchUeCb *ue, -U8 bsr0, -U8 bsr1, -U8 bsr2, -U8 bsr3, +uint8_t bsr0, +uint8_t bsr1, +uint8_t bsr2, +uint8_t bsr3, RgSchErrInfo *err ) #else -PUBLIC Void rgSCHUtlUpdBsrLong(cell, ue, bsr0, bsr1, bsr2, bsr3, err) +Void rgSCHUtlUpdBsrLong(cell, ue, bsr0, bsr1, bsr2, bsr3, err) RgSchCellCb *cell; RgSchUeCb *ue; -U8 bsr0; -U8 bsr1; -U8 bsr2; -U8 bsr3; +uint8_t bsr0; +uint8_t bsr1; +uint8_t bsr2; +uint8_t bsr3; RgSchErrInfo *err; #endif { - U8 bsArr[4]; - TRC2(rgSCHUtlUpdBsrLong); + uint8_t bsArr[4]; bsArr[0] = bsr0; bsArr[1] = bsr1; bsArr[2] = bsr2; bsArr[3] = bsr3; cell->sc.apis->rgSCHUpdBsrLong(cell, ue, bsArr, err); - RETVOID; + return; } /* rgSCHUtlUpdBsrLong */ /** @@ -4421,14 +4324,14 @@ RgSchErrInfo *err; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 phr + * @param[in] uint8_t phr * @param[out] RgSchErrInfo *err * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUpdExtPhr +S16 rgSCHUtlUpdExtPhr ( RgSchCellCb *cell, RgSchUeCb *ue, @@ -4436,15 +4339,14 @@ RgInfExtPhrCEInfo * extPhr, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlUpdExtPhr(cell, ue, extPhr, err) +S16 rgSCHUtlUpdExtPhr(cell, ue, extPhr, err) RgSchCellCb *cell; RgSchUeCb *ue; RgInfExtPhrCEInfo * extPhr; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlUpdExtPhr); - RETVALUE(cell->sc.apis->rgSCHUpdExtPhr(cell, ue, extPhr, err)); + return (cell->sc.apis->rgSCHUpdExtPhr(cell, ue, extPhr, err)); } /* rgSCHUtlUpdExtPhr */ @@ -4460,30 +4362,29 @@ RgSchErrInfo *err; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 phr + * @param[in] uint8_t phr * @param[out] RgSchErrInfo *err * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUpdPhr +S16 rgSCHUtlUpdPhr ( RgSchCellCb *cell, RgSchUeCb *ue, -U8 phr, +uint8_t phr, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlUpdPhr(cell, ue, phr, err) +S16 rgSCHUtlUpdPhr(cell, ue, phr, err) RgSchCellCb *cell; RgSchUeCb *ue; -U8 phr; +uint8_t phr; RgSchErrInfo *err; #endif { - TRC2(rgSCHUtlUpdPhr); - RETVALUE(cell->sc.apis->rgSCHUpdPhr(cell, ue, phr, err)); + return (cell->sc.apis->rgSCHUpdPhr(cell, ue, phr, err)); } /* rgSCHUtlUpdPhr */ @@ -4503,22 +4404,21 @@ RgSchErrInfo *err; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlCqiInd +Void rgSCHUtlUlCqiInd ( RgSchCellCb *cell, RgSchUeCb *ue, TfuUlCqiRpt *ulCqiInfo ) #else -PUBLIC Void rgSCHUtlUlCqiInd(cell, ue, ulCqiInfo) +Void rgSCHUtlUlCqiInd(cell, ue, ulCqiInfo) RgSchCellCb *cell; RgSchUeCb *ue; TfuUlCqiRpt *ulCqiInfo; #endif { - TRC2(rgSCHUtlUlCqiInd); cell->sc.apis->rgSCHUlCqiInd(cell, ue, ulCqiInfo); - RETVOID; + return; } /* rgSCHUtlUlCqiInd */ /** @@ -4533,26 +4433,25 @@ TfuUlCqiRpt *ulCqiInfo; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U8 delta + * @param[in] uint8_t delta * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlPucchDeltaPwrInd +Void rgSCHUtlPucchDeltaPwrInd ( RgSchCellCb *cell, RgSchUeCb *ue, S8 delta ) #else -PUBLIC Void rgSCHUtlPucchDeltaPwrInd(cell, ue, delta) +Void rgSCHUtlPucchDeltaPwrInd(cell, ue, delta) RgSchCellCb *cell; RgSchUeCb *ue; S8 delta; #endif { - TRC2(rgSCHUtlPucchDeltaPwrInd); cell->sc.apis->rgSCHPucchDeltaPwrInd(cell, ue, delta); - RETVOID; + return; } /* rgSCHUtlPucchDeltaPwrInd */ /* Start: LTEMAC_2.1_DEV_CFG */ @@ -4569,21 +4468,20 @@ S8 delta; * @return S16 **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUeReset +Void rgSCHUtlUeReset ( RgSchCellCb *cell, RgSchUeCb *ue ) #else -PUBLIC Void rgSCHUtlUeReset(cell, ue) +Void rgSCHUtlUeReset(cell, ue) RgSchCellCb *cell; RgSchUeCb *ue; #endif { - TRC2(rgSCHUtlUeReset); ue->remBoCnt = 0; cell->sc.apis->rgSCHUeReset(cell, ue); - RETVOID; + return; } /* rgSCHUtlUeReset */ /* End: LTEMAC_2.1_DEV_CFG */ @@ -4594,7 +4492,7 @@ RgSchUeCb *ue; * * Function: rgSCHUtlUlHqProcForUe * Purpose: This function returns the harq process for - * which data is expected in the current subframe. + * which data is expected in the current slot. * It does not validate if the HARQ process * has an allocation. * @@ -4607,7 +4505,7 @@ RgSchUeCb *ue; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHqProcForUe +Void rgSCHUtlUlHqProcForUe ( RgSchCellCb *cell, CmLteTimingInfo frm, @@ -4615,18 +4513,17 @@ RgSchUeCb *ue, RgSchUlHqProcCb **procRef ) #else -PUBLIC Void rgSCHUtlUlHqProcForUe(cell, frm, ue, procRef) +Void rgSCHUtlUlHqProcForUe(cell, frm, ue, procRef) RgSchCellCb *cell; CmLteTimingInfo frm; RgSchUeCb *ue; RgSchUlHqProcCb **procRef; #endif { - TRC2(rgSCHUtlUlHqProcForUe); cell->sc.apis->rgSCHUlHqProcForUe(cell, frm, ue, procRef); /* Stack Crash problems for TRACE5 changes. added the return below */ - RETVOID; + return; } @@ -4638,7 +4535,7 @@ RgSchUlHqProcCb **procRef; * * Function: rgSCHUtlFirstRcptnReq(cell) * Purpose: This function returns the first uplink allocation - * (or NULLP if there is none) in the subframe + * (or NULLP if there is none) in the slot * in which is expected to prepare and send reception * request to PHY. * @@ -4648,17 +4545,16 @@ RgSchUlHqProcCb **procRef; * @return RgSchUlAlloc* **/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlFirstRcptnReq +RgSchUlAlloc *rgSCHUtlFirstRcptnReq ( RgSchCellCb *cell ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlFirstRcptnReq(cell) +RgSchUlAlloc *rgSCHUtlFirstRcptnReq(cell) RgSchCellCb *cell; #endif { - TRC2(rgSCHUtlFirstRcptnReq); - RETVALUE(cell->sc.apis->rgSCHFirstRcptnReq(cell)); + return (cell->sc.apis->rgSCHFirstRcptnReq(cell)); } /** @@ -4669,7 +4565,7 @@ RgSchCellCb *cell; * * Function: rgSCHUtlNextRcptnReq(cell) * Purpose: This function returns the next uplink allocation - * (or NULLP if there is none) in the subframe + * (or NULLP if there is none) in the slot * in which is expected to prepare and send reception * request to PHY. * @@ -4679,19 +4575,18 @@ RgSchCellCb *cell; * @return RgSchUlAlloc* **/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlNextRcptnReq +RgSchUlAlloc *rgSCHUtlNextRcptnReq ( RgSchCellCb *cell, RgSchUlAlloc *alloc ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlNextRcptnReq(cell, alloc) +RgSchUlAlloc *rgSCHUtlNextRcptnReq(cell, alloc) RgSchCellCb *cell; RgSchUlAlloc *alloc; #endif { - TRC2(rgSCHUtlNextRcptnReq); - RETVALUE(cell->sc.apis->rgSCHNextRcptnReq(cell, alloc)); + return (cell->sc.apis->rgSCHNextRcptnReq(cell, alloc)); } /** @@ -4702,30 +4597,29 @@ RgSchUlAlloc *alloc; * * Function: rgSCHUtlFirstHqFdbkAlloc * Purpose: This function returns the first uplink allocation - * (or NULLP if there is none) in the subframe + * (or NULLP if there is none) in the slot * in which it is expected to prepare and send HARQ * feedback to PHY. * * Invoked by: TOM * * @param[in] RgSchCellCb *cell - * @param[in] U8 idx + * @param[in] uint8_t idx * @return RgSchUlAlloc* **/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlFirstHqFdbkAlloc +RgSchUlAlloc *rgSCHUtlFirstHqFdbkAlloc ( RgSchCellCb *cell, -U8 idx +uint8_t idx ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlFirstHqFdbkAlloc(cell, idx) +RgSchUlAlloc *rgSCHUtlFirstHqFdbkAlloc(cell, idx) RgSchCellCb *cell; -U8 idx; +uint8_t idx; #endif { - TRC2(rgSCHUtlFirstHqFdbkAlloc); - RETVALUE(cell->sc.apis->rgSCHFirstHqFdbkAlloc(cell, idx)); + return (cell->sc.apis->rgSCHFirstHqFdbkAlloc(cell, idx)); } @@ -4736,7 +4630,7 @@ U8 idx; * * Function: rgSCHUtlNextHqFdbkAlloc(cell) * Purpose: This function returns the next uplink allocation - * (or NULLP if there is none) in the subframe + * (or NULLP if there is none) in the slot * for which HARQ feedback needs to be sent. * * Invoked by: TOM @@ -4745,21 +4639,20 @@ U8 idx; * @return RgSchUlAlloc* **/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlNextHqFdbkAlloc +RgSchUlAlloc *rgSCHUtlNextHqFdbkAlloc ( RgSchCellCb *cell, RgSchUlAlloc *alloc, -U8 idx +uint8_t idx ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlNextHqFdbkAlloc(cell, alloc, idx) +RgSchUlAlloc *rgSCHUtlNextHqFdbkAlloc(cell, alloc, idx) RgSchCellCb *cell; RgSchUlAlloc *alloc; -U8 idx; +uint8_t idx; #endif { - TRC2(rgSCHUtlNextHqFdbkAlloc); - RETVALUE(cell->sc.apis->rgSCHNextHqFdbkAlloc(cell, alloc, idx)); + return (cell->sc.apis->rgSCHNextHqFdbkAlloc(cell, alloc, idx)); } /*********************************** @@ -4783,14 +4676,14 @@ U8 idx; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlTfuBndReq +S16 rgSCHUtlTfuBndReq ( Inst instId, SuId suId, SpId spId ) #else -PUBLIC S16 rgSCHUtlTfuBndReq(instId, suId, spId) +S16 rgSCHUtlTfuBndReq(instId, suId, spId) Inst instId; SuId suId; SpId spId; @@ -4799,17 +4692,16 @@ SpId spId; S16 ret; RgSchLowSapCb *tfuSap; Pst pst; - TRC2(rgSCHUtlTfuBndReq); /* Get the lower SAP control block from the layer control block. */ tfuSap = &(rgSchCb[instId].tfuSap[suId]); - (Void)cmMemcpy ((U8*)&pst, (U8*)&(tfuSap->sapCfg.sapPst), sizeof(Pst)); + memcpy (&pst, &(tfuSap->sapCfg.sapPst), sizeof(Pst)); if((ret = RgLiTfuSchBndReq (&pst, suId, spId)) != ROK) { RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlTfuBndReq() Call to RgLiTfuBndReq()" " failed"); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlTfuBndReq */ /** @@ -4828,14 +4720,14 @@ SpId spId; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlTfuUBndReq +S16 rgSCHUtlTfuUBndReq ( Inst inst, RgSchLowSapCfgInfo sapCfg, Reason reason ) #else -PUBLIC S16 rgSCHUtlTfuUBndReq(inst, sapCfg, reason) +S16 rgSCHUtlTfuUBndReq(inst, sapCfg, reason) Inst inst; RgSchLowSapCfgInfo sapCfg; Reason reason; @@ -4844,16 +4736,14 @@ Reason reason; S16 ret; Pst pst; - TRC2(rgSCHUtlTfuUBndReq); - /* Get the lower SAP control block from the layer control block. */ - cmMemcpy ((U8*)&pst, (U8*)&(sapCfg.sapPst), sizeof(Pst)); + memcpy (&pst, &(sapCfg.sapPst), sizeof(Pst)); if((ret = RgLiTfuSchUbndReq (&pst, sapCfg.spId, reason)) != ROK) { RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuUBndReq() Call to" " RgLiTfuUbndReq() failed"); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlTfuUBndReq */ @@ -4861,7 +4751,7 @@ Reason reason; * * Func : rgSCHUtlResetSfAlloc * - * Desc : Utility Function to Reset subframe allocation information. + * Desc : Utility Function to Reset slot allocation information. * * * Ret : ROK @@ -4872,25 +4762,24 @@ Reason reason; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlResetSfAlloc +S16 rgSCHUtlResetSfAlloc ( RgInfSfAlloc *sfAlloc, Bool resetCmnLcInfo, Bool restAlloc ) #else -PUBLIC S16 rgSCHUtlResetSfAlloc(sfAlloc,resetCmnLcInfo,restAlloc) +S16 rgSCHUtlResetSfAlloc(sfAlloc,resetCmnLcInfo,restAlloc) RgInfSfAlloc *sfAlloc; Bool resetCmnLcInfo; Bool restAlloc; #endif { - TRC2(rgSCHUtlResetSfAlloc); if(TRUE == restAlloc) { if(sfAlloc->ueInfo.numUes) { - cmMemset((U8 *)sfAlloc->ueInfo.allocInfo,0x00, + memset(sfAlloc->ueInfo.allocInfo,0x00, (sizeof(RgInfUeAlloc)*sfAlloc->ueInfo.numUes)); } sfAlloc->ueInfo.numUes = 0; @@ -4901,14 +4790,14 @@ Bool restAlloc; { sfAlloc->cmnLcInfo.bitMask = 0; } - RETVALUE(ROK); + return ROK; } /*********************************************************** * * Func : rgSCHUtlGetRlsHqAlloc * - * Desc : Utility Function to Allocate subframe allocation information. + * Desc : Utility Function to Allocate slot allocation information. * * * Ret : ROK @@ -4919,18 +4808,17 @@ Bool restAlloc; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlGetRlsHqAlloc +S16 rgSCHUtlGetRlsHqAlloc ( RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlGetRlsHqAlloc(cell) +S16 rgSCHUtlGetRlsHqAlloc(cell) RgSchCellCb *cell; #endif { - U8 idx = 0; + uint8_t idx = 0; Inst inst = cell->instIdx; - TRC2(rgSCHUtlGetRlsHqAlloc); for(idx=0; idx < RGSCH_NUM_SUB_FRAMES; idx++) { cell->rlsHqArr[idx].cellId = cell->cellId; @@ -4945,11 +4833,11 @@ RgSchCellCb *cell; { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for " "UE Alloc"); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } @@ -4957,7 +4845,7 @@ RgSchCellCb *cell; * * Func : rgSCHUtlPutRlsHqAlloc * - * Desc : Utility Function to deallocate subframe allocation information. + * Desc : Utility Function to deallocate slot allocation information. * * * Ret : ROK @@ -4968,18 +4856,17 @@ RgSchCellCb *cell; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlPutRlsHqAlloc +S16 rgSCHUtlPutRlsHqAlloc ( RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlPutRlsHqAlloc(cell) +S16 rgSCHUtlPutRlsHqAlloc(cell) RgSchCellCb *cell; #endif { - U8 idx = 0; + uint8_t idx = 0; Inst inst = cell->instIdx; - TRC2(rgSCHUtlPutRlsHqAlloc); for(idx=0; idx < RGSCH_NUM_SUB_FRAMES; idx++) { @@ -4996,7 +4883,7 @@ RgSchCellCb *cell; } } - RETVALUE(ROK); + return ROK; } @@ -5005,7 +4892,7 @@ RgSchCellCb *cell; * * Func : rgSCHUtlGetSfAlloc * - * Desc : Utility Function to Allocate subframe allocation information. + * Desc : Utility Function to Allocate slot allocation information. * * * Ret : ROK @@ -5016,20 +4903,19 @@ RgSchCellCb *cell; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlGetSfAlloc +S16 rgSCHUtlGetSfAlloc ( RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlGetSfAlloc(cell) +S16 rgSCHUtlGetSfAlloc(cell) RgSchCellCb *cell; #endif { - U8 idx; - U8 indx; + uint8_t idx; + uint8_t indx; Inst inst = cell->instIdx; RgSchCmnUlCell *cellUl = RG_SCH_CMN_GET_UL_CELL(cell); - TRC2(rgSCHUtlGetSfAlloc); #ifdef LTE_TDD for(idx=0; idx < RGSCH_SF_ALLOC_SIZE; idx++) @@ -5049,7 +4935,7 @@ RgSchCellCb *cell; { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for " "UE Alloc"); - RETVALUE(RFAILED); + return RFAILED; } /* Allocate memory for "scheduled RAR" Info */ @@ -5059,7 +4945,7 @@ RgSchCellCb *cell; { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for " "RARNTI"); - RETVALUE(RFAILED); + return RFAILED; } for(indx = 0; indx < RGSCH_MAX_RARNTI_PER_DL_SF; indx++) { @@ -5069,7 +4955,7 @@ RgSchCellCb *cell; { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Memory allocation FAILED for " "RNTI"); - RETVALUE(RFAILED); + return RFAILED; } } @@ -5079,7 +4965,7 @@ RgSchCellCb *cell; rgSCHEmtcUtlGetSfAlloc(cell); #endif - RETVALUE(ROK); + return ROK; } @@ -5087,7 +4973,7 @@ RgSchCellCb *cell; * * Func : rgSCHUtlPutSfAlloc * - * Desc : Utility Function to deallocate subframe allocation information. + * Desc : Utility Function to deallocate slot allocation information. * * * Ret : ROK @@ -5098,20 +4984,19 @@ RgSchCellCb *cell; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlPutSfAlloc +S16 rgSCHUtlPutSfAlloc ( RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlPutSfAlloc(cell) +S16 rgSCHUtlPutSfAlloc(cell) RgSchCellCb *cell; #endif { - U8 idx; - U8 indx; + uint8_t idx; + uint8_t indx; Inst inst = cell->instIdx; RgSchCmnUlCell *cellUl = RG_SCH_CMN_GET_UL_CELL(cell); - TRC2(rgSCHUtlPutSfAlloc); #ifdef LTE_TDD for(idx=0; idx < RGSCH_SF_ALLOC_SIZE; idx++) @@ -5154,7 +5039,7 @@ RgSchCellCb *cell; #ifdef EMTC_ENABLE rgSCHEmtcUtlPutSfAlloc(cell); #endif - RETVALUE(ROK); + return ROK; } @@ -5176,14 +5061,14 @@ RgSchCellCb *cell; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlAllocSBuf +S16 rgSCHUtlAllocSBuf ( Inst inst, /* Instance of the invoking scheduler */ Data **pData, /* Pointer of the data to be returned */ Size size /* size */ ) #else -PUBLIC S16 rgSCHUtlAllocSBuf(inst, pData, size) +S16 rgSCHUtlAllocSBuf(inst, pData, size) Inst inst; /* Instance of the invoking scheduler */ Data **pData; /* Pointer of the data to be returned */ Size size; /* size */ @@ -5191,8 +5076,6 @@ Size size; /* size */ { /* Moving alarm diagnostics to available scope */ - TRC2(rgSCHUtlAllocSBuf) - /* Initialize the param to NULLP */ *pData = NULLP; @@ -5200,7 +5083,7 @@ Size size; /* size */ #ifndef NO_ERRCLS if (size == 0) { - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -5220,14 +5103,14 @@ Size size; /* size */ LCM_CAUSE_MEM_ALLOC_FAIL, &dgn); RGSCHLOGERROR(inst, ERRCLS_DEBUG, ERG015, 0, "Unable to Allocate Buffer"); RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Unable to Allocate the Buffer"); - RETVALUE(RFAILED); + return RFAILED; } /* zero out the allocated memory */ - cmMemset((U8 *)*pData, 0x00, size); + memset(*pData, 0x00, size); - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlAllocSBuf */ @@ -5240,20 +5123,20 @@ Size size; /* size */ * previously allocated by rgSCHUtlAllocSBuf() and size. It * deallocates the memory. * -* Ret: RETVOID +* Ret: void * * Notes: None * File: rg_utl.c */ #ifdef ANSI -PUBLIC Void rgSCHUtlFreeSBuf +Void rgSCHUtlFreeSBuf ( Inst inst, /* Instance of the invoking scheduler */ Data **data, /* pointer to data */ Size size /* size */ ) #else -PUBLIC Void rgSCHUtlFreeSBuf(inst, data, size) +Void rgSCHUtlFreeSBuf(inst, data, size) Inst inst; /* Instance of the invoking scheduler */ Data **data; /* pointer to data */ Size size; /* size */ @@ -5262,11 +5145,9 @@ Size size; /* size */ S16 ret; - TRC2(rgSCHUtlFreeSBuf) - if ((data == NULLP) || (*data == NULLP) || (size == 0)) { - RETVOID; + return; } @@ -5282,13 +5163,13 @@ Size size; /* size */ RGSCHLOGERROR(inst, ERRCLS_DEBUG, ERG016, (ErrVal) 0, "rgSCHUtlFreeSBuf failed.\n"); RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHUtlFreeSBuf failed"); - RETVOID; + return; } /* ccpu00117052 - ADD - Assigning the pointer to NULLP */ *data = NULLP; - RETVOID; + return; } /* end of rgSCHUtlFreeSBuf */ @@ -5299,21 +5180,21 @@ Size size; /* size */ * * Desc: This is used to deallocate Warning SI Seg. * -* Ret: RETVOID +* Ret: void * * Notes: None * * File: rg_utl.c */ #ifdef ANSI -PUBLIC Void rgSCHUtlFreeWarningSiSeg +Void rgSCHUtlFreeWarningSiSeg ( Region reg, Pool pool, CmLListCp *siPduLst ) #else -PUBLIC Void rgSCHUtlFreeWarningSiSeg(reg, pool, siPduLst) +Void rgSCHUtlFreeWarningSiSeg(reg, pool, siPduLst) Region reg; Pool pool; CmLListCp *siPduLst; @@ -5322,8 +5203,6 @@ CmLListCp *siPduLst; CmLList *node; Buffer *pdu; - TRC2(rgSCHUtlFreeWarningSiSeg) - while (siPduLst->first != NULLP) { node = siPduLst->first; @@ -5334,7 +5213,7 @@ CmLListCp *siPduLst; node = NULLP; } - RETVOID; + return; } /* end of rgSCHUtlFreeWarningSiSeg */ @@ -5344,19 +5223,19 @@ CmLListCp *siPduLst; * * Desc: This is used to deallocate Warning SI PDU. * -* Ret: RETVOID +* Ret: void * * Notes: None * * File: rg_utl.c */ #ifdef ANSI -PUBLIC Void rgSCHUtlFreeWarningSiPdu +Void rgSCHUtlFreeWarningSiPdu ( RgSchCellCb *cell ) #else -PUBLIC Void rgSCHUtlFreeWarningSiPdu(cell) +Void rgSCHUtlFreeWarningSiPdu(cell) RgSchCellCb *cell; #endif { @@ -5365,15 +5244,13 @@ RgSchCellCb *cell; RgSchWarningSiInfo *warningSi; RgSchWarningSiPdu *warningSiPdu; - TRC2(rgSCHUtlFreeWarningSiPdu) - warningSi = (RgSchWarningSiInfo *) cell->siCb.\ siArray[cell->siCb.siCtx.siId-1].si; /* ccpu00136659: CMAS ETWS design changes */ CM_LLIST_FIRST_NODE(&warningSi->warningSiMsg.segLstCp, node); if (node == NULLP) { - RETVOID; + return; } warningSiPdu = (RgSchWarningSiPdu *)node->node; @@ -5391,7 +5268,7 @@ RgSchCellCb *cell; warningSi->warningSiMsg.transId, RGR_CFG_CFM_TX_COMPLETE); } - RETVOID; + return; } /* end of rgSCHUtlFreeWarningSiPdu */ @@ -5409,12 +5286,12 @@ RgSchCellCb *cell; * File: rg_utl.c */ #ifdef ANSI -PUBLIC Buffer *rgSCHUtlGetWarningSiPdu +Buffer *rgSCHUtlGetWarningSiPdu ( RgSchCellCb *cell ) #else -PUBLIC Buffer *rgSCHUtlGetWarningSiPdu(cell) +Buffer *rgSCHUtlGetWarningSiPdu(cell) RgSchCellCb *cell; #endif { @@ -5423,21 +5300,19 @@ RgSchCellCb *cell; Buffer *pdu; CmLList *node; - TRC2(rgSCHUtlGetWarningSiPdu) - - warningSi = (RgSchWarningSiInfo *) cell->siCb. - siArray[cell->siCb.siCtx.siId-1].si; + warningSi = (RgSchWarningSiInfo *) cell->siCb. + siArray[cell->siCb.siCtx.siId-1].si; /* ccpu00136659: CMAS ETWS design changes */ CM_LLIST_FIRST_NODE(&warningSi->warningSiMsg.segLstCp, node); if (node != NULLP) { warningSiPdu = (RgSchWarningSiPdu *)node->node; pdu = warningSiPdu->pdu; - RETVALUE(pdu); + return (pdu); } else { - RETVALUE(NULLP); + return (NULLP); } } /* rgSCHUtlGetWarningSiPdu */ @@ -5455,18 +5330,18 @@ RgSchCellCb *cell; * File: rg_utl.c */ #ifdef ANSI -PUBLIC S16 rgSCHUtlGetMcsAndNPrb +S16 rgSCHUtlGetMcsAndNPrb ( RgSchCellCb *cell, -U8 *nPrb, -U8 *mcs, +uint8_t *nPrb, +uint8_t *mcs, MsgLen *msgLen ) #else -PUBLIC S16 rgSCHUtlGetMcsAndNPrb(cell, nPrb, mcs, msgLen) +S16 rgSCHUtlGetMcsAndNPrb(cell, nPrb, mcs, msgLen) RgSchCellCb *cell; -U8 *nPrb; -U8 *mcs; +uint8_t *nPrb; +uint8_t *mcs; MsgLen *msgLen; #endif { @@ -5474,8 +5349,6 @@ MsgLen *msgLen; RgSchWarningSiPdu *warningSiPdu; CmLList *node; - TRC2(rgSCHUtlGetMcsAndNPrb) - if(cell->siCb.siCtx.warningSiFlag == FALSE) { *mcs = cell->siCb.crntSiInfo.siInfo[cell->siCb.siCtx.siId-1].mcs; @@ -5490,17 +5363,17 @@ MsgLen *msgLen; CM_LLIST_FIRST_NODE(&warningSi->warningSiMsg.segLstCp, node); if (node == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } warningSiPdu = (RgSchWarningSiPdu *)node->node; *mcs = warningSiPdu->mcs; *nPrb = warningSiPdu->nPrb; *msgLen = warningSiPdu->msgLen; - RETVALUE(ROK); + return ROK; } - RETVALUE(ROK); + return ROK; } /* rgSCHUtlGetMcsAndNPrb */ /* @@ -5516,32 +5389,30 @@ MsgLen *msgLen; * File: rg_utl.c */ #ifdef ANSI -PUBLIC S16 rgSCHUtlCalMcsAndNPrb +S16 rgSCHUtlCalMcsAndNPrb ( RgSchCellCb *cell, -U8 cfgType, +uint8_t cfgType, MsgLen msgLen, -U8 siId +uint8_t siId ) #else -PUBLIC S16 rgSCHUtlCalMcsAndNPrb(cell, nPrb, mcs, msgLen) +S16 rgSCHUtlCalMcsAndNPrb(cell, nPrb, mcs, msgLen) RgSchCellCb *cell; -U8 cfgType; +uint8_t cfgType; MsgLen msgLen; -U8 siId; +uint8_t siId; #endif { - U8 mcs = 0; - U8 nPrb = 0; - - TRC2(rgSCHUtlCalMcsAndNPrb) + uint8_t mcs = 0; + uint8_t nPrb = 0; /*Get the nPrb and mcs parametr values */ if (rgSCHUtlGetAllwdCchTbSz(msgLen*8, &nPrb, &mcs) != (msgLen*8)) { RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "msgLen does " "not match any valid TB Size"); - RETVALUE(RFAILED); + return RFAILED; } @@ -5587,7 +5458,7 @@ U8 siId; cell->siCb.crntSiInfo.siInfo[siId-1].msgLen = msgLen; } - RETVALUE(ROK); + return ROK; } #endif @@ -5605,26 +5476,24 @@ U8 siId; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlFillDgnParams +Void rgSCHUtlFillDgnParams ( Inst inst, RgUstaDgn *dgn, -U8 dgnType +uint8_t dgnType ) #else -PUBLIC Void rgSCHUtlFillDgnParams(inst, dgn, dgnType) +Void rgSCHUtlFillDgnParams(inst, dgn, dgnType) Inst inst; RgUstaDgn *dgn; -U8 dgnType; +uint8_t dgnType; #endif { - TRC2(rgSCHUtlFillDgnParams) - switch(dgnType) { case LRG_USTA_DGNVAL_MEM: - dgn->type = (U8) LRG_USTA_DGNVAL_MEM; + dgn->type = (uint8_t) LRG_USTA_DGNVAL_MEM; dgn->u.mem.region = rgSchCb[inst].rgSchInit.region; dgn->u.mem.pool = rgSchCb[inst].rgSchInit.pool; break; @@ -5633,7 +5502,7 @@ U8 dgnType; break; } - RETVOID; + return; } /* end of rgSCHUtlFillDgnParams */ /*********************************************************** @@ -5653,20 +5522,19 @@ U8 dgnType; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlGetPstToLyr +Void rgSCHUtlGetPstToLyr ( Pst *pst, RgSchCb *schCb, Inst macInst ) #else -PUBLIC Void rgSCHUtlGetPstToLyr (pst, schCb, macInst) +Void rgSCHUtlGetPstToLyr (pst, schCb, macInst) Pst *pst; RgSchCb *schCb; Inst macInst; #endif { - TRC2(rgSCHUtlGetPstToLyr); /* Only the needed params are filled */ pst->region = schCb->rgSchInit.region; @@ -5676,14 +5544,14 @@ Inst macInst; pst->dstProcId = schCb->rgSchInit.procId; pst->dstInst = macInst; - pst->dstEnt = ENTRG; - pst->srcEnt = ENTRG; + pst->dstEnt = ENTMAC; + pst->srcEnt = ENTMAC; pst->selector = 0; pst->prior = PRIOR0; pst->intfVer = 0; pst->route = RTESPEC; - RETVOID; + return; } /* end of rgSCHUtlGetPstToLyr */ /** @brief This function fills in the common lc information to be sent to MAC @@ -5701,7 +5569,7 @@ Inst macInst; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlFillRgInfCmnLcInfo +S16 rgSCHUtlFillRgInfCmnLcInfo ( RgSchDlSf *sf, RgInfSfAlloc *sfAlloc, @@ -5709,14 +5577,13 @@ CmLteLcId lcId, Bool sendInd ) #else -PUBLIC S16 rgSCHUtlFillRgInfCmnLcInfo(sf, sfAlloc, lcId, sendInd) +S16 rgSCHUtlFillRgInfCmnLcInfo(sf, sfAlloc, lcId, sendInd) RgSchDlSf *sf; RgInfSfAlloc *sfAlloc; CmLteLcId lcId; Bool sendInd; #endif { - TRC2(rgSCHUtlFillRgInfCmnLcInfo); if((sf->bch.tbSize)&& !(sfAlloc->cmnLcInfo.bitMask & RGINF_BCH_INFO)) @@ -5747,7 +5614,7 @@ Bool sendInd; sfAlloc->cmnLcInfo.pcchInfo.lcId = lcId; sfAlloc->cmnLcInfo.bitMask |= RGINF_PCCH_INFO; } - RETVALUE(ROK); + return ROK; } /** @brief This function fills in the RAR information to be sent to MAC @@ -5764,30 +5631,28 @@ Bool sendInd; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlFillRgInfRarInfo +S16 rgSCHUtlFillRgInfRarInfo ( RgSchDlSf *sf, RgInfSfAlloc *sfAlloc, RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlFillRgInfRarInfo(sf, sfAlloc, cell) +S16 rgSCHUtlFillRgInfRarInfo(sf, sfAlloc, cell) RgSchDlSf *sf; RgInfSfAlloc *sfAlloc; RgSchCellCb *cell; #endif { - U8 idx; + uint8_t idx; CmLListCp *lnkLst; CmLList *tmp; RgSchRaCb *raCb; RgSchUeCb *ue; RgInfRaRntiInfo *raRntiAlloc; - U8 noRaRsps; + uint8_t noRaRsps; RgSchCmnDlCell *cellDl = RG_SCH_CMN_GET_DL_CELL(cell); - TRC2(rgSCHUtlFillRgInfRarInfo); - #ifdef LTE_TDD noRaRsps = RGSCH_MAX_TDD_RA_RSP_ALLOC; #else @@ -5884,12 +5749,12 @@ RgSchCellCb *cell; TODO-Need to add a check for max tx power per symbol */ sfAlloc->rarInfo.txPwrOffset = cellDl->rarTxPwrOffset; - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlFillRgInfRarInfo */ /** @brief This function fills in the pdsch data related allocation Info * from the pdcch DCI info. - * subframe + * slot * * @details * @@ -5905,18 +5770,17 @@ RgSchCellCb *cell; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlFillPdschDciInfo +S16 rgSCHUtlFillPdschDciInfo ( TfuPdschDciInfo *pdsch, TfuDciInfo *pdcchDci ) #else -PUBLIC S16 rgSCHUtlFillPdschDciInfo(pdsch, pdcchDci) +S16 rgSCHUtlFillPdschDciInfo(pdsch, pdcchDci) TfuPdschDciInfo *pdsch; TfuDciInfo *pdcchDci; #endif { - TRC2(rgSCHUtlFillPdschDciInfo) #ifdef EMTC_ENABLE S16 ret = ROK; @@ -5961,13 +5825,13 @@ TfuDciInfo *pdcchDci; ret = rgSCHEmtcUtlFillPdschDciInfo(pdsch, pdcchDci); if(RFAILED == ret) { - RETVALUE(RFAILED); + return RFAILED; } #else - RETVALUE(RFAILED); + return RFAILED; #endif } - RETVALUE(ROK); + return ROK; } /* LTE_ADV_FLAG_REMOVED_START */ @@ -5985,13 +5849,13 @@ TfuDciInfo *pdcchDci; * **/ #ifdef ANSI -PUBLIC Void rgSchDSFRPwrCheck +Void rgSchDSFRPwrCheck ( RgSchDlSf *sf, Bool *isAllUePwrHigh ) #else -PRIVATE Void rgSchDSFRPwrCheck(sf, isAllUePwrHigh) +static Void rgSchDSFRPwrCheck(sf, isAllUePwrHigh) RgSchDlSf *sf; Bool *isAllUePwrHigh; @@ -6002,8 +5866,6 @@ PRIVATE Void rgSchDSFRPwrCheck(sf, isAllUePwrHigh) CmLListCp *l; CmLList *n; - TRC2(rgSchDSFRPwrCheck); - l = &sf->sfrTotalPoolInfo.ccPool; n = cmLListFirst(l); while(n) @@ -6032,7 +5894,7 @@ PRIVATE Void rgSchDSFRPwrCheck(sf, isAllUePwrHigh) * Desc : Utility Function to fill the allocation info of each Tb * * - * Ret : RETVOID + * Ret : void * * * Notes: This function should be called while sending a msg from @@ -6042,41 +5904,41 @@ PRIVATE Void rgSchDSFRPwrCheck(sf, isAllUePwrHigh) * **********************************************************/ #ifdef ANSI -PRIVATE Void rgSCHUtlFillRgInfTbInfo +static Void rgSCHUtlFillRgInfTbInfo ( RgSchDlHqProcCb *hqP, RgInfUeAlloc *allocInfo, RgSchCellCb *cell ) #else -PRIVATE Void rgSCHUtlFillRgInfTbInfo (hqP, allocInfo, cell) +static Void rgSCHUtlFillRgInfTbInfo (hqP, allocInfo, cell) RgSchDlHqProcCb *hqP; RgInfUeAlloc *allocInfo; RgSchCellCb *cell; #endif { RgSchDlSf *sf; - U8 idx; + uint8_t idx; RgInfUeTbInfo *tbInfo; - U8 tbCnt; + uint8_t tbCnt; /* LTE_ADV_FLAG_REMOVED_START */ #ifdef TFU_UPGRADE - PRIVATE U32 tmpCnt = 0; + static uint32_t tmpCnt = 0; Bool isAllUePwrHigh = FALSE; #endif /* LTE_ADV_FLAG_REMOVED_END */ RgSchDlLcCb *dlLcCb = NULLP; - U16 rlcHdrEstmt; - U8 lcId; + uint16_t rlcHdrEstmt; + uint8_t lcId; /* RRM_RBC_X */ #ifdef LTE_L2_MEAS - U8 prbUsed = 0; + uint8_t prbUsed = 0; #endif /* RRM_RBC_Y */ CmLteTimingInfo frm; - /* Get Downlink Subframe */ + /* Get Downlink slot */ frm = cell->crntTime; RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA); sf = rgSCHUtlSubFrmGet(cell, frm); @@ -6160,7 +6022,7 @@ RgSchCellCb *cell; #ifdef TFU_UPGRADE /*if SFR is enabled*/ - allocInfo->isEnbSFR = (U8)RG_SCH_CMN_IS_SFR_ENB(ue->cell); /* KW fix for LTE_ADV */ + allocInfo->isEnbSFR = (uint8_t)RG_SCH_CMN_IS_SFR_ENB(ue->cell); /* KW fix for LTE_ADV */ if((ue->cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE) && (ue->lteAdvUeCb.rgrLteAdvUeCfg.isUeCellEdge == FALSE)) { @@ -6168,7 +6030,7 @@ RgSchCellCb *cell; } if(isAllUePwrHigh) { - allocInfo->pa = (U8)ue->cell->lteAdvCb.sfrCfg.pwrThreshold.pHigh; /* KW fix for LTE_ADV */ + allocInfo->pa = (uint8_t)ue->cell->lteAdvCb.sfrCfg.pwrThreshold.pHigh; /* KW fix for LTE_ADV */ if(tmpCnt++ == 100000) { RLOG_ARG2(L_DEBUG,DBG_CELLID,ue->cell->cellId, @@ -6316,7 +6178,7 @@ RgSchCellCb *cell; //if(!(hqP->hqE->ue->pfsStats.lcStats[lcId-1].isLcCntSet)) if(tbCnt == 0) { - U8 idx = 0; + uint8_t idx = 0; if (hqP->hqE->ue->cell == hqP->hqE->cell) { idx = RGSCH_PCELL_INDEX; @@ -6399,7 +6261,7 @@ RgSchCellCb *cell; rgSCHLaaResetDlHqProcCb(hqP); #endif - RETVOID; + return; } /*********************************************************** * @@ -6419,7 +6281,7 @@ RgSchCellCb *cell; **********************************************************/ /* CA dev Start */ #ifdef ANSI -PUBLIC Void rgSCHUtlFillRgInfUeInfo +Void rgSCHUtlFillRgInfUeInfo ( RgSchDlSf *sf, RgSchCellCb *cell, @@ -6428,7 +6290,7 @@ CmLListCp *dlInActvLst, CmLListCp *ulInActvLst ) #else -PUBLIC Void rgSCHUtlFillRgInfUeInfo (sf,cell, dlDrxInactvTmrLst, dlInActvLst, ulInActvLst) +Void rgSCHUtlFillRgInfUeInfo (sf,cell, dlDrxInactvTmrLst, dlInActvLst, ulInActvLst) { RgSchDlSf *sf; RgSchCellCb *cell; @@ -6528,7 +6390,7 @@ CmLListCp *ulInActvLst; #endif } - RETVOID; + return; } /* end of rgSCHUtlFillRgInfUeInfo */ /* CA dev End */ @@ -6555,7 +6417,7 @@ CmLListCp *ulInActvLst; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlUpdSch +S16 rgSCHUtlUpdSch ( RgInfSfDatInd *subfrmInfo, RgSchCellCb *cellCb, @@ -6564,7 +6426,7 @@ RgInfUeDatInd *pdu, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlUpdSch (subfrmInfo, cellCb, ueCb, pdu, err) +S16 rgSCHUtlUpdSch (subfrmInfo, cellCb, ueCb, pdu, err) RgInfSfDatInd *subfrmInfo; RgSchCellCb *cellCb; RgSchUeCb *ueCb; @@ -6574,7 +6436,6 @@ RgSchErrInfo *err; { S16 ret; - TRC2(rgSCHUtlUpdSch); #ifdef LTEMAC_SPS if (RGSCH_UL_SPS_ACT_PRSENT & pdu->ceInfo.bitMask) @@ -6589,7 +6450,7 @@ RgSchErrInfo *err; /* PHR present */ RGSCHCPYTIMEINFO(subfrmInfo->timingInfo, ueCb->macCeRptTime); if ((ret = rgSCHUtlUpdPhr(cellCb, ueCb, pdu->ceInfo.ces.phr, err)) != ROK) - RETVALUE(ret); + return (ret); } /* Note: Order of indication to Sch now is * 1st Indicate the DataInd info for each LCG's @@ -6606,8 +6467,8 @@ RgSchErrInfo *err; /*ccpu00129922 - MOD - Deleted return value * checking since it returns void*/ rgSCHUtlUpdBsrTrunc (cellCb, ueCb, - (U8)(pdu->ceInfo.ces.bsr.truncBsr >> 6), - (U8)(pdu->ceInfo.ces.bsr.truncBsr & 0x3F), err); + (uint8_t)(pdu->ceInfo.ces.bsr.truncBsr >> 6), + (uint8_t)(pdu->ceInfo.ces.bsr.truncBsr & 0x3F), err); } else { @@ -6617,8 +6478,8 @@ RgSchErrInfo *err; /*ccpu00129922 - MOD - Deleted return value checking since it returns void*/ rgSCHUtlUpdBsrShort (cellCb, ueCb, - (U8)(pdu->ceInfo.ces.bsr.shortBsr >> 6), - (U8)(pdu->ceInfo.ces.bsr.shortBsr & 0x3F), err); + (uint8_t)(pdu->ceInfo.ces.bsr.shortBsr >> 6), + (uint8_t)(pdu->ceInfo.ces.bsr.shortBsr & 0x3F), err); } else { @@ -6643,7 +6504,7 @@ RgSchErrInfo *err; } #endif - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlUpdSch */ #ifdef RGR_V1 /** @@ -6661,20 +6522,19 @@ RgSchErrInfo *err; * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlAddUeToCcchSduLst +S16 rgSCHUtlAddUeToCcchSduLst ( RgSchCellCb *cell, RgSchUeCb *ueCb ) #else -PUBLIC S16 rgSCHUtlAddUeToCcchSduLst(cell, ueCb) +S16 rgSCHUtlAddUeToCcchSduLst(cell, ueCb) RgSchCellCb *cell; RgSchUeCb *ueCb; #endif { RgSchCmnDlUe *ueDl = RG_SCH_CMN_GET_DL_UE(ueCb, cell); RgSchDlHqProcCb *hqP = (RgSchDlHqProcCb *)ueDl->proc; - TRC2(rgSCHUtlAddUeToCcchSduLst); /* Temp Guard: For back to back CCCH SDU BO * twice. Hence an extra guard. If already added to scheduling @@ -6685,13 +6545,13 @@ RgSchUeCb *ueCb; { RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RNTI:%d Unexpected CCCH SDU BO", ueCb->ueId); - RETVALUE(ROK); + return ROK; } ueCb->ccchSduLnk.node = (PTR)(ueCb); cmLListAdd2Tail(&(cell->ccchSduUeLst), &(ueCb->ccchSduLnk)); - RETVALUE(ROK); + return ROK; } /** * @@ -6707,29 +6567,27 @@ RgSchUeCb *ueCb; * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUpdtBo +S16 rgSCHUtlUpdtBo ( RgSchCellCb *cell, RgInfCmnBoRpt *staRsp ) #else -PUBLIC S16 rgSCHUtlUpdtBo(cell, staRsp) +S16 rgSCHUtlUpdtBo(cell, staRsp) RgSchCellCb *cell; RgInfCmnBoRpt *staRsp; #endif { RgSchUeCb *ueCb; - TRC2(rgSCHUtlUpdtBo) - if ((ueCb = rgSCHDbmGetUeCb(cell, staRsp->u.rnti)) == NULLP) { /* Handle Ue fetch failure */ RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid UEID:%d",staRsp->u.rnti); - RETVALUE(RFAILED); + return RFAILED; } /* Update Bo in ueCb */ - ueCb->dlCcchInfo.bo = (U32)(staRsp->bo); + ueCb->dlCcchInfo.bo = (uint32_t)(staRsp->bo); #ifdef EMTC_ENABLE if(ueCb->isEmtcUe) { @@ -6741,7 +6599,7 @@ RgInfCmnBoRpt *staRsp; rgSCHUtlAddUeToCcchSduLst(cell, ueCb); } - RETVALUE(ROK); + return ROK; } /* rgSCHUtlUpdtBo */ #endif @@ -6761,13 +6619,13 @@ RgInfCmnBoRpt *staRsp; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlHndlCcchBoUpdt +S16 rgSCHUtlHndlCcchBoUpdt ( RgSchCellCb *cell, RgInfCmnBoRpt *boRpt ) #else -PUBLIC S16 rgSCHUtlHndlCcchBoUpdt(cell, boRpt) +S16 rgSCHUtlHndlCcchBoUpdt(cell, boRpt) RgSchCellCb *cell; RgInfCmnBoRpt *boRpt; #endif @@ -6775,19 +6633,17 @@ RgInfCmnBoRpt *boRpt; RgSchRaCb *raCb; RgSchUeCb *ueCb; - TRC2(rgSCHUtlHndlCcchBoUpdt); - if ((raCb = rgSCHDbmGetRaCb(cell, boRpt->u.rnti)) == NULLP) { #ifdef RGR_V1 /* CR timer implementation changes*/ /*If no raCb, schedule ueCb, ueCb is extracted in rgSCHUtlUpdtBo*/ - RETVALUE(rgSCHUtlUpdtBo(cell, boRpt)); + return (rgSCHUtlUpdtBo(cell, boRpt)); #else /* Handle RaCb fetch failure */ RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Invalid RNTI:%d to fetch raCb",boRpt->u.rnti); - RETVALUE(RFAILED); + return RFAILED; #endif } @@ -6822,17 +6678,17 @@ RgInfCmnBoRpt *boRpt; { /* Handle Ue fetch failure */ RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Invalid RNTI:%d",boRpt->u.rnti); - RETVALUE(RFAILED); + return RFAILED; } /* Update Bo in ueCb */ - ueCb->dlCcchInfo.bo = (U32)(boRpt->bo); + ueCb->dlCcchInfo.bo = (uint32_t)(boRpt->bo); } #else rgSCHRamUpdtBo(cell, raCb, boRpt); #endif - RETVALUE(ROK); + return ROK; } /* rgSCHUtlHndlCcchBoUpdt */ /** @@ -6848,32 +6704,30 @@ RgInfCmnBoRpt *boRpt; * accordingly set. * * - * @param[in] U32 bo - * @param[out] U8 *nPrb + * @param[in] uint32_t bo + * @param[out] uint8_t *nPrb * @return S32 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S32 rgSCHUtlGetAllwdCchTbSz +S32 rgSCHUtlGetAllwdCchTbSz ( -U32 bo, -U8 *nPrb, -U8 *mcs +uint32_t bo, +uint8_t *nPrb, +uint8_t *mcs ) #else -PUBLIC S32 rgSCHUtlGetAllwdCchTbSz(bo, nPrb, mcs) -U32 bo; -U8 *nPrb; -U8 *mcs; +S32 rgSCHUtlGetAllwdCchTbSz(bo, nPrb, mcs) +uint32_t bo; +uint8_t *nPrb; +uint8_t *mcs; #endif { S32 lt; S32 cn; S32 rt; - TRC2(rgSCHUtlGetAllwdCchTbSz); - for (lt = 0, rt = 43; lt <= rt;) { cn = (lt + rt)/2; @@ -6881,7 +6735,7 @@ U8 *mcs; { *nPrb = rgSchUtlBcchPcchTbSzTbl[cn].rbIndex; *mcs = rgSchUtlBcchPcchTbSzTbl[cn].mcs; - RETVALUE(rgSchUtlBcchPcchTbSzTbl[cn].tbSz); + return (rgSchUtlBcchPcchTbSzTbl[cn].tbSz); } else if (rgSchUtlBcchPcchTbSzTbl[cn].tbSz < bo) lt = cn + 1; @@ -6890,11 +6744,11 @@ U8 *mcs; } if (lt == 44) { - RETVALUE(RFAILED); + return RFAILED; } *nPrb = rgSchUtlBcchPcchTbSzTbl[lt].rbIndex; *mcs = rgSchUtlBcchPcchTbSzTbl[lt].mcs; - RETVALUE(rgSchUtlBcchPcchTbSzTbl[lt].tbSz); + return (rgSchUtlBcchPcchTbSzTbl[lt].tbSz); } /** @@ -6914,13 +6768,13 @@ U8 *mcs; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlHndlBcchPcchBoUpdt +S16 rgSCHUtlHndlBcchPcchBoUpdt ( RgSchCellCb *cell, RgInfCmnBoRpt *boUpdt ) #else -PUBLIC S16 rgSCHUtlHndlBcchPcchBoUpdt(cell, boUpdt) +S16 rgSCHUtlHndlBcchPcchBoUpdt(cell, boUpdt) RgSchCellCb *cell; RgInfCmnBoRpt *boUpdt; #endif @@ -6928,35 +6782,33 @@ RgInfCmnBoRpt *boUpdt; RgSchClcDlLcCb *dlLc; RgSchClcBoRpt *boRpt; Inst inst = cell->instIdx; - U8 nPrb=0; - U8 mcs=0; - - TRC2(rgSCHUtlHndlBcchPcchBoUpdt); + uint8_t nPrb=0; + uint8_t mcs=0; dlLc = rgSCHDbmGetBcchOnBch(cell); if (dlLc == NULLP) { RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "No Logical Channel dlLc is NULLP for RNTI:%d LCID:%d",boUpdt->u.rnti,boUpdt->lcId); - RETVALUE(RFAILED); + return RFAILED; } if (boUpdt->lcId != dlLc->lcId) { /* Added for dropping paging Message*/ /*suman*/ - if ((rgSCHChkBoUpdate(cell,boUpdt))== ROK) /* Checking if received BO falls within the window of 5120 subframes*/ + if ((rgSCHChkBoUpdate(cell,boUpdt))== ROK) /* Checking if received BO falls within the window of 5120 slots*/ { if (rgSCHUtlGetAllwdCchTbSz(boUpdt->bo*8, &nPrb, &mcs) != (boUpdt->bo*8)) { RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,"[%ld]BO: does not match any " "valid TB Size RNTI:%d LCID:%d", boUpdt->bo,boUpdt->u.rnti,boUpdt->lcId); - RETVALUE(RFAILED); + return RFAILED; } }/*end of rgSCHChkBoUpdate*/ else { - RETVALUE(ROK); + return ROK; } } if ((dlLc = rgSCHDbmGetCmnLcCb(cell, boUpdt->lcId)) == NULLP) @@ -6971,7 +6823,7 @@ RgInfCmnBoRpt *boUpdt; { RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId, "Allocation of common bo %dreport " "failed RNTI:%d LCID:%d", boUpdt->bo,boUpdt->u.rnti,boUpdt->lcId); - RETVALUE(RFAILED); + return RFAILED; } boRpt->bo = boUpdt->bo; @@ -6997,7 +6849,7 @@ RgInfCmnBoRpt *boUpdt; } rgSCHDbmInsCmnLcBoRpt(dlLc, boRpt); - RETVALUE(ROK); + return ROK; } /* rgSCHUtlHndlBcchPcchBoUpdt */ /** @@ -7012,37 +6864,34 @@ RgInfCmnBoRpt *boUpdt; * bind confirm API towards RRM. * * @param[in] SuId suId - * @param[in] U8 status + * @param[in] uint8_t status * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrBndCfm +S16 rgSCHUtlRgrBndCfm ( Inst instId, SuId suId, -U8 status +uint8_t status ) #else -PUBLIC S16 rgSCHUtlRgrBndCfm(instId, suId, status) +S16 rgSCHUtlRgrBndCfm(instId, suId, status) Inst instId; SuId suId; -U8 status; +uint8_t status; #endif { S16 ret = ROK; - TRC2(rgSCHUtlRgrBndCfm) - - ret = RgUiRgrBndCfm(&rgSchCb[instId].rgrSap[suId].sapCfg.sapPst, rgSchCb[instId].rgrSap[suId].sapCfg.suId, status); if (ret != ROK) { RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgrBndCfm: RgUiRgrBndCfm Failed "); - RETVALUE(ret); + return (ret); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlRgrBndCfm*/ /** @@ -7057,37 +6906,34 @@ U8 status; * This API fills in Pst structure and SAP Ids and invokes * * @param[in] SuId suId - * @param[in] U8 status + * @param[in] uint8_t status * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgmBndCfm +S16 rgSCHUtlRgmBndCfm ( Inst instId, SuId suId, -U8 status +uint8_t status ) #else -PUBLIC S16 rgSCHUtlRgmBndCfm(instId, suId, status) +S16 rgSCHUtlRgmBndCfm(instId, suId, status) Inst instId; SuId suId; -U8 status; +uint8_t status; #endif { S16 ret = ROK; - TRC2(rgSCHUtlRgmBndCfm) - - ret = RgUiRgmBndCfm(&rgSchCb[instId].rgmSap[suId].sapCfg.sapPst, rgSchCb[instId].rgmSap[suId].sapCfg.suId, status); if (ret != ROK) { RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgmBndCfm: RgUiRgrBndCfm Failed "); - RETVALUE(ret); + return (ret); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlRgmBndCfm*/ @@ -7104,50 +6950,49 @@ U8 status; * * @param[in] Pst pst * @param[in] RgrCfgTransId transId - * @param[in] U8 status + * @param[in] uint8_t status * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 schSendCfgCfm +S16 schSendCfgCfm ( Region reg, Pool pool, RgrCfgTransId transId, -U8 status +uint8_t status ) #else -PUBLIC S16 schSendCfgCfm(reg, pool, transId, status) +S16 schSendCfgCfm(reg, pool, transId, status) Region reg; Pool pool; RgrCfgTransId transId; -U8 status; +uint8_t status; #endif { Pst cfmPst; - Inst inst; + Inst inst = 0; - TRC2(schSendCfgCfm) - cmMemset((U8 *)(&cfmPst), 0, sizeof(Pst)); + memset((&cfmPst), 0, sizeof(Pst)); cfmPst.srcEnt = (Ent)ENTDUAPP; cfmPst.srcInst = (Inst) 0; cfmPst.srcProcId = SFndProcId(); - cfmPst.dstEnt = (Ent)ENTRG; + cfmPst.dstEnt = (Ent)ENTMAC; cfmPst.dstInst = (Inst) 0; cfmPst.dstProcId = SFndProcId(); - cfmPst.selector = RGR_SEL_LC; + cfmPst.selector = ODU_SELECTOR_LC; cfmPst.region = reg; cfmPst.pool = pool; if(RgUiRgrCfgCfm(&cfmPst,transId, status) != ROK) { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"schSendCfgCfm: RgUiRgrCfgCfm Failed "); + RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"schSendCfgCfm: RgUiRgrCfgCfm Failed"); printf("\nschSendCfgCfm: RgUiRgrCfgCfm Failed "); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /* schSendCfgCfm*/ #ifdef RGR_RRM_TICK /** @@ -7167,13 +7012,13 @@ U8 status; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrTtiInd +S16 rgSCHUtlRgrTtiInd ( RgSchCellCb *cell, RgrTtiIndInfo *rgrTti ) #else -PUBLIC S16 rgSCHUtlRgrTtiInd(cell, rgrTti) +S16 rgSCHUtlRgrTtiInd(cell, rgrTti) RgSchCellCb *cell; RgrTtiIndInfo *rgrTti; #endif @@ -7181,20 +7026,17 @@ RgrTtiIndInfo *rgrTti; S16 ret = ROK; RgSchUpSapCb *rgrSap; /*!< RGR SAP Control Block */ #ifdef L2_L3_SPLIT - extern Bool g_usettitmr; - extern Void mtTmrHdlrPublic(void); + Bool g_usettitmr; + Void mtTmrHdlrPublic(void); #endif - TRC2(rgSCHUtlRgrTtiInd) - - rgrSap = cell->rgrSap; if (rgrSap->sapSta.sapState != LRG_BND) { RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHUtlRgrTtiInd() Upper SAP not bound (%d) ", rgrSap->sapSta.sapState); - RETVALUE(RFAILED); + return RFAILED; } RgUiRgrTtiInd(&(cell->rgrSap->sapCfg.sapPst), cell->rgrSap->sapCfg.suId, rgrTti); @@ -7204,7 +7046,7 @@ RgrTtiIndInfo *rgrTti; mtTmrHdlrPublic(); } #endif - RETVALUE(ret); + return (ret); } /* rgSCHUtlRgrTtiInd*/ #endif /** @brief This function is called by rgMacSchSfRecpInd. This function invokes the @@ -7232,7 +7074,7 @@ RgrTtiIndInfo *rgrTti; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlProcMsg3 +S16 rgSCHUtlProcMsg3 ( RgInfSfDatInd *subfrmInfo, RgSchCellCb *cellCb, @@ -7242,7 +7084,7 @@ RgInfUeDatInd *pdu, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlProcMsg3 (subfrmInfo, cellCb, ueCb, rnti, pdu, err) +S16 rgSCHUtlProcMsg3 (subfrmInfo, cellCb, ueCb, rnti, pdu, err) RgInfSfDatInd *subfrmInfo; RgSchCellCb *cellCb; RgSchUeCb *ueCb; @@ -7254,16 +7096,13 @@ RgSchErrInfo *err; S16 ret; RgSchRaCb *raCb; - TRC2(rgSCHUtlProcMsg3) - - /* must have an raCb for this case */ raCb = rgSCHDbmGetRaCb (cellCb, rnti); if (raCb == NULLP) { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "RNTI:%d Received MSG3, unable to " "find raCb",rnti); - RETVALUE(RFAILED); + return RFAILED; } /* ccpu00130982: Processing CRNTI MAC CE before Short BSR, if any, such that @@ -7273,7 +7112,7 @@ RgSchErrInfo *err; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Processing failed in the RAM " "RNTI:%d ",rnti); - RETVALUE(ret); + return (ret); } /* if ueCb is present */ if (ueCb != NULLP) @@ -7281,7 +7120,7 @@ RgSchErrInfo *err; rgSCHUtlUpdSch (subfrmInfo, cellCb, ueCb, pdu, err); } - RETVALUE(ROK); + return ROK; } #ifdef LTEMAC_SPS /** @brief This function is called by RgMacSchSpsRelInd. This function invokes the @@ -7303,22 +7142,21 @@ RgSchErrInfo *err; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlSpsRelInd +S16 rgSCHUtlSpsRelInd ( RgSchCellCb *cellCb, RgSchUeCb *ueCb, Bool isExplRel ) #else -PUBLIC S16 rgSCHUtlSpsRelInd (cellCb, ueCb, isExplRel) +S16 rgSCHUtlSpsRelInd (cellCb, ueCb, isExplRel) RgSchCellCb *cellCb; RgSchUeCb *ueCb; Bool isExplRel; #endif { - TRC2(rgSCHUtlSpsRelInd); cellCb->sc.apis->rgSCHUlSpsRelInd(cellCb, ueCb, isExplRel); - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlSpsRelInd */ @@ -7334,29 +7172,28 @@ Bool isExplRel; * * @param [in] RgSchCellCb *cellCb * @param [in] RgSchUeCb *ueCb - * @param [in] U16 spsSduSize + * @param [in] uint16_t spsSduSize * @param * @return S16 * -# ROK * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlSpsActInd +S16 rgSCHUtlSpsActInd ( RgSchCellCb *cellCb, RgSchUeCb *ueCb, -U16 spsSduSize +uint16_t spsSduSize ) #else -PUBLIC S16 rgSCHUtlSpsActInd (cellCb, ueCb, spsSduSize) +S16 rgSCHUtlSpsActInd (cellCb, ueCb, spsSduSize) RgSchCellCb *cellCb; RgSchUeCb *ueCb; -U16 spsSduSize; +uint16_t spsSduSize; #endif { - TRC2(rgSCHUtlSpsActInd); cellCb->sc.apis->rgSCHUlSpsActInd(cellCb, ueCb, spsSduSize); - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlSpsActInd */ @@ -7380,14 +7217,14 @@ U16 spsSduSize; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlTfuGrpPwrCntrlReq +S16 rgSCHUtlTfuGrpPwrCntrlReq ( Inst inst, S16 sapId, TfuGrpPwrCntrlReqInfo *grpPwrCntrlReq ) #else -PUBLIC S16 rgSCHUtlTfuGrpPwrCntrlReq(inst, sapId, grpPwrCntrlReq) +S16 rgSCHUtlTfuGrpPwrCntrlReq(inst, sapId, grpPwrCntrlReq) Inst inst; S16 sapId; TfuGrpPwrCntrlReqInfo *grpPwrCntrlReq; @@ -7397,7 +7234,6 @@ TfuGrpPwrCntrlReqInfo *grpPwrCntrlReq; RgSchLowSapCb *tfuSap; Pst pst; - TRC2(rgSCHUtlTfuGrpPwrCntrlReq); /* Get the lower SAP control block from the layer control block. */ tfuSap = &(rgSchCb[inst].tfuSap[sapId]); @@ -7405,15 +7241,15 @@ TfuGrpPwrCntrlReqInfo *grpPwrCntrlReq; { RLOG_ARG1(L_ERROR,DBG_CELLID,grpPwrCntrlReq->cellId, "rgSCHUtlTfuGrpPwrCntrlReq() Lower SAP not bound (%d) ",tfuSap->sapSta.sapState); - RETVALUE(RFAILED); + return RFAILED; } - cmMemcpy ((U8*)&pst, (U8*)&(tfuSap->sapCfg.sapPst), sizeof(Pst)); + memcpy (&pst, &(tfuSap->sapCfg.sapPst), sizeof(Pst)); if((ret = RgLiTfuGrpPwrCntrlReq (&pst, tfuSap->sapCfg.spId, grpPwrCntrlReq)) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,grpPwrCntrlReq->cellId, "rgSCHUtlTfuGrpPwrCntrlReq() Call to RgLiTfuGrpPwrCntrlReq() failed"); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlTfuGrpPwrCntrlReq */ #endif @@ -7434,14 +7270,14 @@ TfuGrpPwrCntrlReqInfo *grpPwrCntrlReq; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlTfuCntrlReq +S16 rgSCHUtlTfuCntrlReq ( Inst inst, S16 sapId, TfuCntrlReqInfo *cntrlReq ) #else -PUBLIC S16 rgSCHUtlTfuCntrlReq(inst, sapId, cntrlReq) +S16 rgSCHUtlTfuCntrlReq(inst, sapId, cntrlReq) Inst inst; S16 sapId; TfuCntrlReqInfo *cntrlReq; @@ -7450,8 +7286,6 @@ TfuCntrlReqInfo *cntrlReq; S16 ret; RgSchLowSapCb *tfuSap; - TRC2(rgSCHUtlTfuCntrlReq) - /* Get the lower SAP control block from the layer control block. */ tfuSap = &(rgSchCb[inst].tfuSap[sapId]); @@ -7461,7 +7295,7 @@ TfuCntrlReqInfo *cntrlReq; RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuCntrlReq() Lower SAP not bound (%d) ", tfuSap->sapSta.sapState); RGSCH_FREE_MEM(cntrlReq); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -7471,7 +7305,7 @@ TfuCntrlReqInfo *cntrlReq; { RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuCntrlReq() Call to RgLiTfuCntrlReq() failed"); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlTfuCntrlReq*/ @@ -7495,20 +7329,19 @@ TfuCntrlReqInfo *cntrlReq; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlDlActvtUe +S16 rgSCHUtlDlActvtUe ( RgSchCellCb *cell, RgSchUeCb *ue ) #else -PUBLIC S16 rgSCHUtlDlActvtUe(cell, ue) +S16 rgSCHUtlDlActvtUe(cell, ue) RgSchCellCb *cell; RgSchUeCb *ue; #endif { - TRC2(rgSCHUtlDlActvtUe); cell->sc.apis->rgSCHActvtDlUe(cell, ue); - RETVALUE(ROK); + return ROK; } /** @@ -7529,20 +7362,19 @@ RgSchUeCb *ue; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUlActvtUe +S16 rgSCHUtlUlActvtUe ( RgSchCellCb *cell, RgSchUeCb *ue ) #else -PUBLIC S16 rgSCHUtlUlActvtUe(cell, ue) +S16 rgSCHUtlUlActvtUe(cell, ue) RgSchCellCb *cell; RgSchUeCb *ue; #endif { - TRC2(rgSCHUtlUlActvtUe); cell->sc.apis->rgSCHActvtUlUe(cell, ue); - RETVALUE(ROK); + return ROK; } /** @@ -7562,14 +7394,14 @@ RgSchUeCb *ue; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlTfuRecpReq +S16 rgSCHUtlTfuRecpReq ( Inst inst, S16 sapId, TfuRecpReqInfo *recpReq ) #else -PUBLIC S16 rgSCHUtlTfuRecpReq(inst, sapId, recpReq) +S16 rgSCHUtlTfuRecpReq(inst, sapId, recpReq) Inst inst; S16 sapId; TfuRecpReqInfo *recpReq; @@ -7578,7 +7410,6 @@ TfuRecpReqInfo *recpReq; S16 ret; RgSchLowSapCb *tfuSap; - TRC2(rgSCHUtlTfuRecpReq) /* Get the lower SAP control block from the layer control block. */ tfuSap = &(rgSchCb[inst].tfuSap[sapId]); @@ -7589,7 +7420,7 @@ TfuRecpReqInfo *recpReq; RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuRecpReq() Lower SAP not bound (%d) ", tfuSap->sapSta.sapState); RGSCH_FREE_MEM(recpReq); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -7599,7 +7430,7 @@ TfuRecpReqInfo *recpReq; { RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"rgSCHUtlTfuRecpReq() Call to RgLiTfuRecpReq() failed"); } - RETVALUE(ret); + return (ret); } /* rgSCHUtlTfuRecpReq */ /** @brief This function Validates the SAP information received along with the @@ -7614,25 +7445,23 @@ TfuRecpReqInfo *recpReq; * -# RFAILED */ #ifdef ANSI -PUBLIC S16 rgSCHUtlValidateTfuSap +S16 rgSCHUtlValidateTfuSap ( Inst inst, SuId suId ) #else -PUBLIC S16 rgSCHUtlValidateTfuSap(inst, suId) +S16 rgSCHUtlValidateTfuSap(inst, suId) Inst inst; SuId suId; #endif { RgSchLowSapCb *tfuSap; - TRC2(rgSCHUtlValidateTfuSap) - if(suId >= rgSchCb[inst].numSaps) { RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Incorrect SuId"); - RETVALUE(RFAILED); + return RFAILED; } tfuSap = &(rgSchCb[inst].tfuSap[suId]); @@ -7641,15 +7470,15 @@ SuId suId; { RLOG_ARG2(L_ERROR,DBG_INSTID,inst,"Incorrect SuId. Configured (%d) Recieved (%d)", tfuSap->sapCfg.suId, suId); - RETVALUE(RFAILED); + return RFAILED; } if (tfuSap->sapSta.sapState != LRG_BND) { RLOG_ARG1(L_ERROR,DBG_INSTID,inst,"Lower SAP not enabled SuId (%d)", tfuSap->sapCfg.suId); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlValidateTfuSap */ /* @@ -7667,23 +7496,22 @@ SuId suId; * */ #ifdef ANSI -PUBLIC S16 rgSCHUtlAllocEventMem +S16 rgSCHUtlAllocEventMem ( Inst inst, Ptr *memPtr, Size memSize ) #else -PUBLIC S16 rgSCHUtlAllocEventMem(inst, memPtr, memSize) +S16 rgSCHUtlAllocEventMem(inst, memPtr, memSize) Inst inst; Ptr *memPtr; Size memSize; #endif { Mem sMem; - VOLATILE U32 startTime=0; + volatile uint32_t startTime=0; - TRC2(rgSCHUtlAllocEventMem) sMem.region = rgSchCb[inst].rgSchInit.region; sMem.pool = rgSchCb[inst].rgSchInit.pool; @@ -7693,7 +7521,7 @@ Size memSize; { RGSCHLOGERROR(inst, ERRCLS_INT_PAR, ERG022, memSize, "rgAllocEventMem(): memSize invalid\n"); - RETVALUE (RFAILED); + return (RFAILED); } #endif /* ERRCLASS & ERRCLS_DEBUG */ /*starting Task*/ @@ -7709,11 +7537,11 @@ Size memSize; #endif /* */ { RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"cmAllocEvnt Failed."); - RETVALUE(RFAILED); + return RFAILED; } /*stoping Task*/ SStopTask(startTime, PID_SCHUTL_CMALLCEVT); - RETVALUE(ROK); + return ROK; } /* end of rgSCHUtlAllocEventMem*/ /* @@ -7731,14 +7559,14 @@ Size memSize; * */ #ifdef ANSI -PUBLIC S16 rgSCHUtlGetEventMem +S16 rgSCHUtlGetEventMem ( Ptr *ptr, Size len, Ptr memCp ) #else -PUBLIC S16 rgSCHUtlGetEventMem(ptr, len, memCp) +S16 rgSCHUtlGetEventMem(ptr, len, memCp) Ptr *ptr; Size len; Ptr memCp; @@ -7746,13 +7574,12 @@ Ptr memCp; { S16 ret; - TRC2(rgSCHUtlGetEventMem) #ifdef TFU_ALLOC_EVENT_NO_INIT ret = cmGetMemNoInit(memCp, len, (Ptr *)ptr); #else ret = cmGetMem(memCp, len, (Ptr *)ptr); #endif - RETVALUE(ret); + return (ret); } /* end of rgSCHUtlGetEventMem*/ #ifdef LTE_TDD @@ -7771,26 +7598,24 @@ Ptr memCp; * @return S16 **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlAllocUeANFdbkInfo +S16 rgSCHUtlAllocUeANFdbkInfo ( RgSchUeCb *ue, -U8 servCellIdx +uint8_t servCellIdx ) #else -PUBLIC S16 rgSCHUtlAllocUeANFdbkInfo(ue,servCellIdx) +S16 rgSCHUtlAllocUeANFdbkInfo(ue,servCellIdx) RgSchUeCb *ue; -U8 servCellIdx; +uint8_t servCellIdx; #endif { - U8 idx; - - TRC2(rgSCHUtlAllocUeANFdbkInfo); + uint8_t idx; if (rgSCHUtlAllocSBuf(ue->cell->instIdx, (Data **) &(ue->cellInfo[servCellIdx]->anInfo), sizeof(RgSchTddANInfo) * \ ue->cell->ackNackFdbkArrSize) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } for(idx=0; idx < ue->cell->ackNackFdbkArrSize; idx++) @@ -7800,7 +7625,7 @@ U8 servCellIdx; /* Set it to the first index */ ue->cellInfo[servCellIdx]->nextFreeANIdx = 0; - RETVALUE(ROK); + return ROK; } /* rgSCHUtlAllocUeANFdbkInfo */ /** @@ -7816,18 +7641,17 @@ U8 servCellIdx; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlDelUeANFdbkInfo +Void rgSCHUtlDelUeANFdbkInfo ( RgSchUeCb *ue, -U8 servCellIdx +uint8_t servCellIdx ) #else -PUBLIC Void rgSCHUtlDelUeANFdbkInfo(ue,servCellIdx) +Void rgSCHUtlDelUeANFdbkInfo(ue,servCellIdx) RgSchUeCb *ue; -U8 servCellIdx; +uint8_t servCellIdx; #endif { - TRC2(rgSCHUtlDelUeANFdbkInfo); /* ccpu00117052 - MOD - Passing double pointer for proper NULLP assignment*/ @@ -7835,7 +7659,7 @@ U8 servCellIdx; (Data **)(&( ue->cellInfo[servCellIdx]->anInfo)), sizeof(RgSchTddANInfo) * \ ue->cell->ackNackFdbkArrSize); - RETVOID; + return; } /* rgSCHUtlDelUeANFdbkInfo */ /** @@ -7851,24 +7675,23 @@ U8 servCellIdx; * @return S16 **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlInitUeANFdbkInfo +S16 rgSCHUtlInitUeANFdbkInfo ( RgSchTddANInfo *anFdInfo ) #else -PUBLIC S16 rgSCHUtlInitUeANFdbkInfo(anFdInfo) +S16 rgSCHUtlInitUeANFdbkInfo(anFdInfo) RgSchTddANInfo *anFdInfo; #endif { - TRC2(rgSCHUtlInitUeANFdbkInfo); anFdInfo->sfn = RGSCH_MAX_SFN+1; /* defensively setting invalid sfn */ - anFdInfo->subframe = 0; + anFdInfo->slot = 0; anFdInfo->ulDai = RG_SCH_INVALID_DAI_VAL; anFdInfo->dlDai = RG_SCH_INVALID_DAI_VAL; anFdInfo->latestMIdx = RG_SCH_INVALID_M_VAL; - RETVALUE(ROK); + return ROK; } /* rgSCHUtlInitUeANFdbkInfo */ /** @@ -7879,97 +7702,94 @@ RgSchTddANInfo *anFdInfo; * Function : rgSCHUtlGetUeANFdbkInfo * * It gets the UE related ACK NACK information based on - * SFN and subframe number. + * SFN and slot number. * * @param[in] RgSchUeCb *ueCb * @param[in] CmLteTimingInfo *time * @return RgSchTddANInfo* **/ #ifdef ANSI -PUBLIC RgSchTddANInfo* rgSCHUtlGetUeANFdbkInfo +RgSchTddANInfo* rgSCHUtlGetUeANFdbkInfo ( RgSchUeCb *ueCb, CmLteTimingInfo *timeInfo, -U8 servCellIdx +uint8_t servCellIdx ) #else -PUBLIC RgSchTddANInfo* rgSCHUtlGetUeANFdbkInfo(ueCb, timeInfo,servCellIdx) +RgSchTddANInfo* rgSCHUtlGetUeANFdbkInfo(ueCb, timeInfo,servCellIdx) RgSchUeCb *ueCb; CmLteTimingInfo *timeInfo; -U8 servCellIdx; +uint8_t servCellIdx; #endif { - U8 idx; - - TRC2(rgSCHUtlGetUeANFdbkInfo); + uint8_t idx; for (idx = 0; idx < ueCb->cell->ackNackFdbkArrSize; ++idx) { if( (timeInfo->sfn == ueCb->cellInfo[servCellIdx]->anInfo[idx].sfn) && - (timeInfo->subframe == ueCb->cellInfo[servCellIdx]->anInfo[idx].subframe)) + (timeInfo->slot == ueCb->cellInfo[servCellIdx]->anInfo[idx].slot)) { - RETVALUE(&ueCb->cellInfo[servCellIdx]->anInfo[idx]); + return (&ueCb->cellInfo[servCellIdx]->anInfo[idx]); } } - RETVALUE(NULLP); + return (NULLP); } /* rgSCHUtlGetUeANFdbkInfo */ /** - * @brief To get downlink subframe index + * @brief To get downlink slot index * * @details * * Function: rgSCHUtlGetDlSfIdx - * Purpose: Gets downlink subframe index based on SFN and subframe no + * Purpose: Gets downlink slot index based on SFN and slot no * * @param[in] CmLteTimingInfo *timeInfo * @param[in] RgSchCellCb *cell - * @return U8 + * @return uint8_t * **/ #ifdef ANSI -PUBLIC U8 rgSCHUtlGetDlSfIdx +uint8_t rgSCHUtlGetDlSfIdx ( RgSchCellCb *cell, CmLteTimingInfo *timeInfo ) #else -PUBLIC U8 rgSCHUtlGetDlSfIdx(cell, timeInfo) +uint8_t rgSCHUtlGetDlSfIdx(cell, timeInfo) RgSchCellCb *cell; CmLteTimingInfo *timeInfo; #endif { - U16 idx = 0; - TRC2(rgSCHUtlGetDlSfIdx); + uint16_t idx = 0; idx = RGSCH_NUM_SUB_FRAMES - \ rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1]; idx = ((idx * timeInfo->sfn) + \ - rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][timeInfo->subframe]) - 1; + rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][timeInfo->slot]) - 1; idx = idx % cell->numDlSubfrms; - RETVALUE((U8)idx); + return ((uint8_t)idx); } /** - * @brief To get the next downlink subframe + * @brief To get the next downlink slot * * @details * * Function: rgSCHUtlGetNxtDlSfInfo - * Purpose: Gets next downlink subframe based on current DL subframe + * Purpose: Gets next downlink slot based on current DL slot * * @param[in] CmLteTimingInfo curDlTime * @param[in] RgSchCellCb *cell * @param[in] RgSchDlSf *dlSf * @param[in] RgSchDlSf **nxtDlsf * @param[in] CmLteTimingInfo *nxtDlTime - * @return U8 + * @return uint8_t * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlGetNxtDlSfInfo +Void rgSCHUtlGetNxtDlSfInfo ( CmLteTimingInfo curDlTime, RgSchCellCb *cell, @@ -7978,7 +7798,7 @@ RgSchDlSf **nxtDlsf, CmLteTimingInfo *nxtDlTime ) #else -PUBLIC Void rgSCHUtlGetNxtDlSfInfo(curDlTime, cell, dlSf, nxtDlsf, nxtDlTime) +Void rgSCHUtlGetNxtDlSfInfo(curDlTime, cell, dlSf, nxtDlsf, nxtDlTime) CmLteTimingInfo curDlTime; RgSchCellCb *cell; RgSchDlSf *dlSf; @@ -7986,9 +7806,8 @@ RgSchDlSf **nxtDlsf; CmLteTimingInfo *nxtDlTime; #endif { - U16 idx = curDlTime.subframe; - U8 count = 0; - TRC2(rgSCHUtlGetNxtDlSfInfo); + uint16_t idx = curDlTime.slot; + uint8_t count = 0; while(TRUE) { @@ -7997,51 +7816,50 @@ CmLteTimingInfo *nxtDlTime; idx = (idx + 1) % RGSCH_NUM_SUB_FRAMES; count++; }while(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx] - != RG_SCH_TDD_DL_SUBFRAME); + != RG_SCH_TDD_DL_slot); RG_SCH_ADD_TO_CRNT_TIME(curDlTime, (*nxtDlTime), count); *nxtDlsf = rgSCHUtlSubFrmGet(cell, *nxtDlTime); - if(dlSf->dlFdbkInfo.subframe != (*nxtDlsf)->dlFdbkInfo.subframe) + if(dlSf->dlFdbkInfo.slot != (*nxtDlsf)->dlFdbkInfo.slot) { break; } } - RETVOID; + return; } /** - * @brief To get the previous downlink subframe + * @brief To get the previous downlink slot * * @details * * Function: rgSCHUtlGetPrevDlSfInfo - * Purpose: Gets previous downlink subframe based on current DL subframe + * Purpose: Gets previous downlink slot based on current DL slot * * @param[in] RgSchCellCb *cell * @param[in] CmLteTimingInfo curDlTime * @param[in] CmLteTimingInfo *prevDlTime - * @param[in] U8 *numSubfrm - * @return U8 + * @param[in] uint8_t *numSubfrm + * @return uint8_t * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlGetPrevDlSfInfo +Void rgSCHUtlGetPrevDlSfInfo ( RgSchCellCb *cell, CmLteTimingInfo curDlTime, CmLteTimingInfo *prevDlTime, -U8 *numSubfrm +uint8_t *numSubfrm ) #else -PUBLIC Void rgSCHUtlGetPrevDlSfInfo(cell, curDlTime, prevDlTime, numSubfrm) +Void rgSCHUtlGetPrevDlSfInfo(cell, curDlTime, prevDlTime, numSubfrm) RgSchCellCb *cell; CmLteTimingInfo curDlTime; CmLteTimingInfo *prevDlTime; -U8 *numSubfrm; +uint8_t *numSubfrm; #endif { - S16 idx = curDlTime.subframe; - U8 count = 0; - TRC2(rgSCHUtlGetPrevDlSfInfo); + S16 idx = curDlTime.slot; + uint8_t count = 0; do { @@ -8052,10 +7870,10 @@ U8 *numSubfrm; } count++; }while(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx] - != RG_SCH_TDD_DL_SUBFRAME); + != RG_SCH_TDD_DL_slot); *numSubfrm = count; RGSCHDECRFRMCRNTTIME(curDlTime, (*prevDlTime), count); - RETVOID; + return; } #endif @@ -8065,7 +7883,7 @@ U8 *numSubfrm; * * Func : rgSCHUtlUlSfInit * - * Desc : UL subframe init. + * Desc : UL slot init. * * Ret : S16 * @@ -8075,33 +7893,32 @@ U8 *numSubfrm; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUlSfInit +S16 rgSCHUtlUlSfInit ( RgSchCellCb *cell, RgSchUlSf *sf, -U8 idx, -U8 maxUePerSf +uint8_t idx, +uint8_t maxUePerSf ) #else -PUBLIC S16 rgSCHUtlUlSfInit(cell, sf, idx, maxUePerSf) +S16 rgSCHUtlUlSfInit(cell, sf, idx, maxUePerSf) RgSchCellCb *cell; RgSchUlSf *sf; -U8 idx; -U8 maxUePerSf; +uint8_t idx; +uint8_t maxUePerSf; #endif { S16 ret=ROK; - TRC2(rgSCHUtlUlSfInit); sf->idx = idx; #ifdef RG_5GTF - U8 index; + uint8_t index; #endif #ifdef LTE_TDD if(cell->ulDlCfgIdx == 0) { - /* Store the Uplink subframe number corresponding to the idx */ + /* Store the Uplink slot number corresponding to the idx */ sf->ulSfIdx = rgSchTddCfg0UlSfTbl[idx%6]; } #endif @@ -8109,7 +7926,7 @@ U8 maxUePerSf; sizeof(RgSchUlAllocDb)); if (ret != ROK) { - RETVALUE(ret); + return (ret); } ret = rgSCHUtlUlAllocDbInit(cell, sf->allocDb, maxUePerSf); if (ret != ROK) @@ -8118,7 +7935,7 @@ U8 maxUePerSf; for proper NULLP assignment*/ rgSCHUtlFreeSBuf(cell->instIdx, (Data **)(&(sf->allocDb)), sizeof(RgSchUlAllocDb)); - RETVALUE(ret); + return (ret); } ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&sf->holeDb, sizeof(RgSchUlHoleDb)); @@ -8129,10 +7946,10 @@ U8 maxUePerSf; for proper NULLP assignment*/ rgSCHUtlFreeSBuf(cell->instIdx, (Data **)(&(sf->allocDb)), sizeof(RgSchUlAllocDb)); - RETVALUE(ret); + return (ret); } /* Initialize the hole with CFI 1 Pusch Bw Info */ - ret = rgSCHUtlUlHoleDbInit(cell, sf->holeDb, (U8)(maxUePerSf + 2), \ + ret = rgSCHUtlUlHoleDbInit(cell, sf->holeDb, (uint8_t)(maxUePerSf + 2), \ 0, cell->dynCfiCb.bwInfo[1].numSb); if (ret != ROK) @@ -8144,7 +7961,7 @@ U8 maxUePerSf; sizeof(RgSchUlAllocDb)); rgSCHUtlFreeSBuf(cell->instIdx, (Data **)(&(sf->holeDb)), sizeof(RgSchUlHoleDb)); - RETVALUE(ret); + return (ret); } cmLListInit(&sf->reTxLst); @@ -8164,7 +7981,7 @@ U8 maxUePerSf; } #endif - RETVALUE(ret); + return (ret); } @@ -8172,7 +7989,7 @@ U8 maxUePerSf; * * Func : rgSCHUtlUlSfDeinit * - * Desc : Deinitialises a subframe + * Desc : Deinitialises a slot * * Ret : Void * @@ -8182,18 +7999,17 @@ U8 maxUePerSf; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlSfDeinit +Void rgSCHUtlUlSfDeinit ( RgSchCellCb *cell, RgSchUlSf *sf ) #else -PUBLIC Void rgSCHUtlUlSfDeinit(cell, sf) +Void rgSCHUtlUlSfDeinit(cell, sf) RgSchCellCb *cell; RgSchUlSf *sf; #endif { - TRC2(rgSCHUtlUlSfDeinit); if (sf->allocDb) { rgSCHUtlUlAllocDbDeinit(cell, sf->allocDb); @@ -8212,7 +8028,7 @@ RgSchUlSf *sf; rgSCHUtlFreeSBuf(cell->instIdx, (Data **)(&(sf->holeDb)), sizeof(RgSchUlHoleDb)); } - RETVOID; + return; } /*********************************************************** @@ -8229,28 +8045,27 @@ RgSchUlSf *sf; * **********************************************************/ #ifdef ANSI -PRIVATE S16 rgSCHUtlUlAllocDbInit +static S16 rgSCHUtlUlAllocDbInit ( RgSchCellCb *cell, RgSchUlAllocDb *allocDb, -U8 maxAllocs +uint8_t maxAllocs ) #else -PRIVATE S16 rgSCHUtlUlAllocDbInit(cell, allocDb, maxAllocs) +static S16 rgSCHUtlUlAllocDbInit(cell, allocDb, maxAllocs) RgSchCellCb *cell; RgSchUlAllocDb *allocDb; -U8 maxAllocs; +uint8_t maxAllocs; #endif { S16 ret = rgSCHUtlUlAllocMemInit(cell, &allocDb->mem, maxAllocs); - TRC2(rgSCHUtlUlAllocDbInit); if (ret != ROK) { - RETVALUE(ret); + return (ret); } allocDb->count = 0; allocDb->first = NULLP; - RETVALUE(ROK); + return ROK; } /*********************************************************** @@ -8268,22 +8083,21 @@ U8 maxAllocs; * **********************************************************/ #ifdef ANSI -PRIVATE Void rgSCHUtlUlAllocDbDeinit +static Void rgSCHUtlUlAllocDbDeinit ( RgSchCellCb *cell, RgSchUlAllocDb *allocDb ) #else -PRIVATE Void rgSCHUtlUlAllocDbDeinit(cell, allocDb) +static Void rgSCHUtlUlAllocDbDeinit(cell, allocDb) RgSchCellCb *cell; RgSchUlAllocDb *allocDb; #endif { - TRC2(rgSCHUtlUlAllocDbDeinit); rgSCHUtlUlAllocMemDeinit(cell, &allocDb->mem); allocDb->count = 0; allocDb->first = NULLP; - RETVOID; + return; } /*********************************************************** @@ -8300,38 +8114,37 @@ RgSchUlAllocDb *allocDb; * **********************************************************/ #ifdef ANSI -PRIVATE S16 rgSCHUtlUlHoleDbInit +static S16 rgSCHUtlUlHoleDbInit ( RgSchCellCb *cell, RgSchUlHoleDb *holeDb, -U8 maxHoles, -U8 start, -U8 num +uint8_t maxHoles, +uint8_t start, +uint8_t num ) #else -PRIVATE S16 rgSCHUtlUlHoleDbInit(cell, holeDb, maxHoles, start, num) +static S16 rgSCHUtlUlHoleDbInit(cell, holeDb, maxHoles, start, num) RgSchCellCb *cell; RgSchUlHoleDb *holeDb; -U8 maxHoles; -U8 start; -U8 num; +uint8_t maxHoles; +uint8_t start; +uint8_t num; #endif { S16 ret; RgSchUlHole *hole = NULLP; - TRC2(rgSCHUtlUlHoleDbInit); ret = rgSCHUtlUlHoleMemInit(cell, &holeDb->mem, maxHoles, &hole); if (ret != ROK) { - RETVALUE(ret); + return (ret); } holeDb->count = 1; holeDb->first = hole; hole->start = start; hole->num = num; hole->prv = hole->nxt = NULLP; - RETVALUE(ROK); + return ROK; } /*********************************************************** @@ -8348,22 +8161,21 @@ U8 num; * **********************************************************/ #ifdef ANSI -PRIVATE Void rgSCHUtlUlHoleDbDeinit +static Void rgSCHUtlUlHoleDbDeinit ( RgSchCellCb *cell, RgSchUlHoleDb *holeDb ) #else -PRIVATE Void rgSCHUtlUlHoleDbDeinit(cell, holeDb) +static Void rgSCHUtlUlHoleDbDeinit(cell, holeDb) RgSchCellCb *cell; RgSchUlHoleDb *holeDb; #endif { - TRC2(rgSCHUtlUlHoleDbDeinit); rgSCHUtlUlHoleMemDeinit(cell, &holeDb->mem); holeDb->count = 0; holeDb->first = NULLP; - RETVOID; + return; } @@ -8381,27 +8193,26 @@ RgSchUlHoleDb *holeDb; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetHole +RgSchUlAlloc *rgSCHUtlUlAllocGetHole ( RgSchUlSf *sf, -U8 numSb, +uint8_t numSb, RgSchUlHole *hole ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetHole(sf, numSb, hole) +RgSchUlAlloc *rgSCHUtlUlAllocGetHole(sf, numSb, hole) RgSchUlSf *sf; -U8 numSb; +uint8_t numSb; RgSchUlHole *hole; #endif { - TRC2(rgSCHUtlUlAllocGetHole); if (numSb < hole->num) { - RETVALUE(rgSCHUtlUlAllocGetPartHole(sf, numSb, hole)); + return (rgSCHUtlUlAllocGetPartHole(sf, numSb, hole)); } else { - RETVALUE(rgSCHUtlUlAllocGetCompHole(sf, hole)); + return (rgSCHUtlUlAllocGetCompHole(sf, hole)); } } @@ -8420,13 +8231,13 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetCompHole +RgSchUlAlloc *rgSCHUtlUlAllocGetCompHole ( RgSchUlSf *sf, RgSchUlHole *hole ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetCompHole(sf, hole) +RgSchUlAlloc *rgSCHUtlUlAllocGetCompHole(sf, hole) RgSchUlSf *sf; RgSchUlHole *hole; #endif @@ -8437,7 +8248,6 @@ RgSchUlHole *hole; * updated, causing another check for prv */ RgSchUlAlloc *prv = hole->prvAlloc; RgSchUlAlloc *nxt = hole->nxtAlloc; - TRC2(rgSCHUtlUlAllocGetCompHole); if (prv) { @@ -8469,7 +8279,7 @@ RgSchUlHole *hole; /* UL_ALLOC_CHANGES*/ alloc->allocDbRef = (void*)sf->allocDb; alloc->holeDbRef = (void*)sf->holeDb; - RETVALUE(alloc); + return (alloc); } /*********************************************************** @@ -8488,16 +8298,16 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetPartHole +RgSchUlAlloc *rgSCHUtlUlAllocGetPartHole ( RgSchUlSf *sf, -U8 numSb, +uint8_t numSb, RgSchUlHole *hole ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetPartHole(sf, numSb, hole) +RgSchUlAlloc *rgSCHUtlUlAllocGetPartHole(sf, numSb, hole) RgSchUlSf *sf; -U8 numSb; +uint8_t numSb; RgSchUlHole *hole; #endif { @@ -8506,7 +8316,6 @@ RgSchUlHole *hole; /* Calling rgSchCmnUlAllocGetAndIns is ok, but prv alloc needs to have nxtHole * updated, causing another check for prv */ RgSchUlAlloc *prv = hole->prvAlloc; - TRC2(rgSCHUtlUlAllocGetPartHole); if (prv) { @@ -8537,14 +8346,14 @@ RgSchUlHole *hole; alloc->allocDbRef = (void*)sf->allocDb; alloc->holeDbRef = (void*)sf->holeDb; - RETVALUE(alloc); + return (alloc); } /*********************************************************** * * Func : rgSCHUtlUlAllocFirst * - * Desc : Get first alloc in subframe + * Desc : Get first alloc in slot * * Ret : RgSchUlAlloc * * @@ -8554,17 +8363,16 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocFirst +RgSchUlAlloc *rgSCHUtlUlAllocFirst ( RgSchUlSf *sf ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocFirst(sf) +RgSchUlAlloc *rgSCHUtlUlAllocFirst(sf) RgSchUlSf *sf; #endif { - TRC2(rgSCHUtlUlAllocFirst); - RETVALUE(sf->allocDb->first); + return (sf->allocDb->first); } /*********************************************************** @@ -8581,20 +8389,19 @@ RgSchUlSf *sf; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocNxt +RgSchUlAlloc *rgSCHUtlUlAllocNxt ( RgSchUlSf *sf, RgSchUlAlloc *alloc ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocNxt(sf, alloc) +RgSchUlAlloc *rgSCHUtlUlAllocNxt(sf, alloc) RgSchUlSf *sf; RgSchUlAlloc *alloc; #endif { - TRC2(rgSCHUtlUlAllocNxt); UNUSED(sf); - RETVALUE(alloc->nxt); + return (alloc->nxt); } /*********************************************************** @@ -8617,25 +8424,24 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetAdjNxt +RgSchUlAlloc *rgSCHUtlUlAllocGetAdjNxt ( RgSchUlAllocDb *db, RgSchUlAlloc *prv ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetAdjNxt(db, prv) +RgSchUlAlloc *rgSCHUtlUlAllocGetAdjNxt(db, prv) RgSchUlAllocDb *db; RgSchUlAlloc *prv; #endif { RgSchUlAlloc *alloc = rgSCHUtlUlAllocMemGet(&db->mem); RgSchUlAlloc *nxt = prv->nxt; - TRC2(rgSCHUtlUlAllocGetAdjNxt); #if (ERRCLASS & ERRCLS_DEBUG) if ( alloc == NULLP ) { - RETVALUE ( NULLP ); + return ( NULLP ); } #endif alloc->prv = prv; @@ -8648,7 +8454,7 @@ RgSchUlAlloc *prv; ++db->count; - RETVALUE(alloc); + return (alloc); } /*********************************************************** @@ -8670,23 +8476,22 @@ RgSchUlAlloc *prv; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetFirst +RgSchUlAlloc *rgSCHUtlUlAllocGetFirst ( RgSchUlAllocDb *db ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocGetFirst(db) +RgSchUlAlloc *rgSCHUtlUlAllocGetFirst(db) RgSchUlAllocDb *db; #endif { RgSchUlAlloc *alloc = rgSCHUtlUlAllocMemGet(&db->mem); RgSchUlAlloc *nxt = db->first; - TRC2(rgSCHUtlUlAllocGetFirst); #if (ERRCLASS & ERRCLS_DEBUG) if ( alloc == NULLP ) { - RETVALUE ( NULLP ); + return ( NULLP ); } #endif @@ -8700,7 +8505,7 @@ RgSchUlAllocDb *db; ++db->count; - RETVALUE(alloc); + return (alloc); } /* UL_ALLOC_ENHANCEMENT */ @@ -8718,12 +8523,12 @@ RgSchUlAllocDb *db; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleAddAllocation +Void rgSCHUtlUlHoleAddAllocation ( RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlHoleAddAllocation(alloc) +Void rgSCHUtlUlHoleAddAllocation(alloc) RgSchUlAlloc *alloc; #endif { @@ -8736,7 +8541,6 @@ RgSchUlAlloc *alloc; RgSchUlHoleDb *db = alloc->holeDbRef; RgSchUlHole *prv = alloc->prvHole; RgSchUlHole *nxt = alloc->nxtHole; - TRC2(rgSCHUtlUlHoleAddAllocation); if (prv) { @@ -8756,7 +8560,7 @@ RgSchUlAlloc *alloc; else rgSCHUtlUlHoleNew(db, alloc); } - RETVOID; + return; } @@ -8774,19 +8578,18 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlAllocRelease +Void rgSCHUtlUlAllocRelease ( RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlAllocRelease(alloc) +Void rgSCHUtlUlAllocRelease(alloc) RgSchUlAlloc *alloc; #endif { RgSchUlAllocDb *allocDb = alloc->allocDbRef; RgSchUlAlloc *prv = alloc->prv; RgSchUlAlloc *nxt = alloc->nxt; - TRC2(rgSCHUtlUlAllocRelease); alloc->ue = NULLP; alloc->raCb = NULLP; @@ -8812,7 +8615,7 @@ RgSchUlAlloc *alloc; rgSCHUtlUlHoleAddAllocation(alloc); rgSCHUtlUlAllocMemRls(&allocDb->mem, alloc); - RETVOID; + return; } @@ -8830,13 +8633,13 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlAllocRls +Void rgSCHUtlUlAllocRls ( RgSchUlSf *sf, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlAllocRls(sf, alloc) +Void rgSCHUtlUlAllocRls(sf, alloc) RgSchUlSf *sf; RgSchUlAlloc *alloc; #endif @@ -8844,7 +8647,6 @@ RgSchUlAlloc *alloc; RgSchUlAllocDb *allocDb = sf->allocDb; RgSchUlAlloc *prv = alloc->prv; RgSchUlAlloc *nxt = alloc->nxt; - TRC2(rgSCHUtlUlAllocRls); alloc->ue = NULLP; alloc->raCb = NULLP; @@ -8880,7 +8682,7 @@ RgSchUlAlloc *alloc; //printf("\nallocDb->count:%u\n",allocDb->count); - RETVOID; + return; } /*********************************************************** @@ -8897,17 +8699,16 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlHole *rgSCHUtlUlHoleFirst +RgSchUlHole *rgSCHUtlUlHoleFirst ( RgSchUlSf *sf ) #else -PUBLIC RgSchUlHole *rgSCHUtlUlHoleFirst(sf) +RgSchUlHole *rgSCHUtlUlHoleFirst(sf) RgSchUlSf *sf; #endif { - TRC2(rgSCHUtlUlHoleFirst); - RETVALUE(sf->holeDb->first); + return (sf->holeDb->first); } /*********************************************************** @@ -8924,20 +8725,19 @@ RgSchUlSf *sf; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlHole *rgSCHUtlUlHoleNxt +RgSchUlHole *rgSCHUtlUlHoleNxt ( RgSchUlSf *sf, RgSchUlHole *hole ) #else -PUBLIC RgSchUlHole *rgSCHUtlUlHoleNxt(sf, hole) +RgSchUlHole *rgSCHUtlUlHoleNxt(sf, hole) RgSchUlSf *sf; RgSchUlHole *hole; #endif { - TRC2(rgSCHUtlUlHoleNxt); UNUSED(sf); - RETVALUE(hole->nxt); + return (hole->nxt); } /*********************************************************** @@ -8954,13 +8754,13 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleAddAlloc +Void rgSCHUtlUlHoleAddAlloc ( RgSchUlSf *sf, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlHoleAddAlloc(sf, alloc) +Void rgSCHUtlUlHoleAddAlloc(sf, alloc) RgSchUlSf *sf; RgSchUlAlloc *alloc; #endif @@ -8974,7 +8774,6 @@ RgSchUlAlloc *alloc; RgSchUlHoleDb *db = sf->holeDb; RgSchUlHole *prv = alloc->prvHole; RgSchUlHole *nxt = alloc->nxtHole; - TRC2(rgSCHUtlUlHoleAddAlloc); if (prv) { @@ -8998,7 +8797,7 @@ RgSchUlAlloc *alloc; /* increment the number of subbands getting freed to total available list */ sf->availSubbands += alloc->numSb; - RETVOID; + return; } /*********************************************************** @@ -9015,7 +8814,7 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleJoin +Void rgSCHUtlUlHoleJoin ( RgSchUlHoleDb *db, RgSchUlHole *prv, @@ -9023,20 +8822,19 @@ RgSchUlHole *nxt, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlHoleJoin(db, prv, nxt, alloc) +Void rgSCHUtlUlHoleJoin(db, prv, nxt, alloc) RgSchUlHoleDb *db; RgSchUlHole *prv; RgSchUlHole *nxt; RgSchUlAlloc *alloc; #endif { - TRC2(rgSCHUtlUlHoleJoin); prv->num += alloc->numSb + nxt->num; rgSCHUtlUlHoleRls(db, nxt); rgSCHUtlUlHoleIncr(db, prv); rgSCHUtlUlHoleUpdAllocLnks(prv, alloc->prv, alloc->nxt); - RETVOID; + return; } /*********************************************************** @@ -9054,24 +8852,23 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleExtndRight +Void rgSCHUtlUlHoleExtndRight ( RgSchUlHoleDb *db, RgSchUlHole *prv, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlHoleExtndRight(db, prv, alloc) +Void rgSCHUtlUlHoleExtndRight(db, prv, alloc) RgSchUlHoleDb *db; RgSchUlHole *prv; RgSchUlAlloc *alloc; #endif { - TRC2(rgSCHUtlUlHoleExtndRight); prv->num += alloc->numSb; rgSCHUtlUlHoleIncr(db, prv); rgSCHUtlUlHoleUpdAllocLnks(prv, alloc->prv, alloc->nxt); - RETVOID; + return; } /*********************************************************** @@ -9089,25 +8886,24 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleExtndLeft +Void rgSCHUtlUlHoleExtndLeft ( RgSchUlHoleDb *db, RgSchUlHole *nxt, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlHoleExtndLeft(db, nxt, alloc) +Void rgSCHUtlUlHoleExtndLeft(db, nxt, alloc) RgSchUlHoleDb *db; RgSchUlHole *nxt; RgSchUlAlloc *alloc; #endif { - TRC2(rgSCHUtlUlHoleExtndLeft); nxt->num += alloc->numSb; nxt->start = alloc->sbStart; rgSCHUtlUlHoleIncr(db, nxt); rgSCHUtlUlHoleUpdAllocLnks(nxt, alloc->prv, alloc->nxt); - RETVOID; + return; } /*********************************************************** @@ -9124,13 +8920,13 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleNew +Void rgSCHUtlUlHoleNew ( RgSchUlHoleDb *db, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlHoleNew(db, alloc) +Void rgSCHUtlUlHoleNew(db, alloc) RgSchUlHoleDb *db; RgSchUlAlloc *alloc; #endif @@ -9139,16 +8935,15 @@ RgSchUlAlloc *alloc; #if (ERRCLASS & ERRCLS_DEBUG) if ( hole == NULLP ) { - RETVOID; + return; } #endif - TRC2(rgSCHUtlUlHoleNew); hole->start = alloc->sbStart; hole->num = alloc->numSb; ++db->count; rgSCHUtlUlHoleIns(db, hole); rgSCHUtlUlHoleUpdAllocLnks(hole, alloc->prv, alloc->nxt); - RETVOID; + return; } /*********************************************************** @@ -9165,20 +8960,19 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleUpdAllocLnks +Void rgSCHUtlUlHoleUpdAllocLnks ( RgSchUlHole *hole, RgSchUlAlloc *prvAlloc, RgSchUlAlloc *nxtAlloc ) #else -PUBLIC Void rgSCHUtlUlHoleUpdAllocLnks(hole, prvAlloc, nxtAlloc) +Void rgSCHUtlUlHoleUpdAllocLnks(hole, prvAlloc, nxtAlloc) RgSchUlHole *hole; RgSchUlAlloc *prvAlloc; RgSchUlAlloc *nxtAlloc; #endif { - TRC2(rgSCHUtlUlHoleUpdAllocLnks); if (prvAlloc) { prvAlloc->nxtHole = hole; @@ -9189,7 +8983,7 @@ RgSchUlAlloc *nxtAlloc; } hole->prvAlloc = prvAlloc; hole->nxtAlloc = nxtAlloc; - RETVOID; + return; } @@ -9208,19 +9002,18 @@ RgSchUlAlloc *nxtAlloc; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleIns +Void rgSCHUtlUlHoleIns ( RgSchUlHoleDb *db, RgSchUlHole *hole ) #else -PUBLIC Void rgSCHUtlUlHoleIns(db, hole) +Void rgSCHUtlUlHoleIns(db, hole) RgSchUlHoleDb *db; RgSchUlHole *hole; #endif { RgSchUlHole *cur; - TRC2(rgSCHUtlUlHoleIns); if ((cur = db->first) != NULLP) { @@ -9232,7 +9025,7 @@ RgSchUlHole *hole; cur->prv = hole; db->first = hole; hole->prv = NULLP; - RETVOID; + return; } for (nxt = cur->nxt; nxt; cur = nxt, nxt = nxt->nxt) @@ -9244,7 +9037,7 @@ RgSchUlHole *hole; hole->prv = cur; hole->nxt = nxt; nxt->prv = hole; - RETVOID; + return; } } @@ -9252,14 +9045,14 @@ RgSchUlHole *hole; cur->nxt = hole; hole->prv = cur; hole->nxt = NULLP; - RETVOID; + return; } /* This is the first hole */ db->first = hole; hole->prv = NULLP; /* may not be needed */ hole->nxt = NULLP; - RETVOID; + return; } @@ -9278,19 +9071,18 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleIncr +Void rgSCHUtlUlHoleIncr ( RgSchUlHoleDb *db, RgSchUlHole *hole ) #else -PUBLIC Void rgSCHUtlUlHoleIncr(db, hole) +Void rgSCHUtlUlHoleIncr(db, hole) RgSchUlHoleDb *db; RgSchUlHole *hole; #endif { RgSchUlHole *cur; - TRC2(rgSCHUtlUlHoleIncr); if ((cur = hole->prv) != NULLP) { @@ -9298,7 +9090,7 @@ RgSchUlHole *hole; if (cur->num > hole->num) { - RETVOID; + return; } /* Remove hole from current position */ @@ -9317,7 +9109,7 @@ RgSchUlHole *hole; hole->prv = prv; hole->nxt = cur; cur->prv = hole; - RETVOID; + return; } } @@ -9326,9 +9118,9 @@ RgSchUlHole *hole; cur->prv = hole; db->first = hole; hole->prv = NULLP; - RETVOID; + return; } - RETVOID; + return; } /*********************************************************** @@ -9346,19 +9138,18 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleDecr +Void rgSCHUtlUlHoleDecr ( RgSchUlHoleDb *db, RgSchUlHole *hole ) #else -PUBLIC Void rgSCHUtlUlHoleDecr(db, hole) +Void rgSCHUtlUlHoleDecr(db, hole) RgSchUlHoleDb *db; RgSchUlHole *hole; #endif { RgSchUlHole *cur; - TRC2(rgSCHUtlUlHoleDecr); if ((cur = hole->nxt) != NULLP) { @@ -9366,7 +9157,7 @@ RgSchUlHole *hole; if (cur->num < hole->num) { - RETVOID; + return; } /* Remove hole from current position */ @@ -9389,7 +9180,7 @@ RgSchUlHole *hole; hole->prv = cur; hole->nxt = nxt; nxt->prv = hole; - RETVOID; + return; } } @@ -9397,9 +9188,9 @@ RgSchUlHole *hole; cur->nxt = hole; hole->prv = cur; hole->nxt = NULLP; - RETVOID; + return; } - RETVOID; + return; } /*********************************************************** @@ -9419,20 +9210,19 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleRls +Void rgSCHUtlUlHoleRls ( RgSchUlHoleDb *db, RgSchUlHole *hole ) #else -PUBLIC Void rgSCHUtlUlHoleRls(db, hole) +Void rgSCHUtlUlHoleRls(db, hole) RgSchUlHoleDb *db; RgSchUlHole *hole; #endif { RgSchUlHole *prv = hole->prv; RgSchUlHole *nxt = hole->nxt; - TRC2(rgSCHUtlUlHoleRls); --db->count; if (prv) @@ -9453,7 +9243,7 @@ RgSchUlHole *hole; } rgSCHUtlUlHoleMemRls(&db->mem, hole); - RETVOID; + return; } @@ -9471,28 +9261,27 @@ RgSchUlHole *hole; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUlAllocMemInit +S16 rgSCHUtlUlAllocMemInit ( RgSchCellCb *cell, RgSchUlAllocMem *mem, -U8 maxAllocs +uint8_t maxAllocs ) #else -PUBLIC S16 rgSCHUtlUlAllocMemInit(cell, mem, maxAllocs) +S16 rgSCHUtlUlAllocMemInit(cell, mem, maxAllocs) RgSchCellCb *cell; RgSchUlAllocMem *mem; -U8 maxAllocs; +uint8_t maxAllocs; #endif { S16 ret; RgSchUlAlloc *allocs; - TRC2(rgSCHUtlUlAllocMemInit); ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&allocs, maxAllocs * sizeof(*allocs)); if (ret != ROK) { - RETVALUE(ret); + return (ret); } mem->allocs = allocs; mem->maxAllocs = maxAllocs; @@ -9503,7 +9292,7 @@ U8 maxAllocs; } else { - U8 i; + uint8_t i; allocs[0].prv = NULLP; allocs[0].nxt = &allocs[1]; for (i = 1; i < mem->maxAllocs - 1; ++i) @@ -9515,7 +9304,7 @@ U8 maxAllocs; allocs[i].nxt = NULLP; } mem->firstFree = &allocs[0]; - RETVALUE(ROK); + return ROK; } /*********************************************************** @@ -9532,25 +9321,24 @@ U8 maxAllocs; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlAllocMemDeinit +Void rgSCHUtlUlAllocMemDeinit ( RgSchCellCb *cell, RgSchUlAllocMem *mem ) #else -PUBLIC Void rgSCHUtlUlAllocMemDeinit(cell, mem) +Void rgSCHUtlUlAllocMemDeinit(cell, mem) RgSchCellCb *cell; RgSchUlAllocMem *mem; #endif { - TRC2(rgSCHUtlUlAllocMemDeinit); /* ccpu00117052 - MOD - Passing double pointer for proper NULLP assignment*/ rgSCHUtlFreeSBuf(cell->instIdx, (Data **)(&(mem->allocs)), mem->maxAllocs * sizeof(*mem->allocs)); mem->maxAllocs = 0; mem->firstFree = NULLP; - RETVOID; + return; } /*********************************************************** @@ -9568,30 +9356,29 @@ RgSchUlAllocMem *mem; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUlHoleMemInit +S16 rgSCHUtlUlHoleMemInit ( RgSchCellCb *cell, RgSchUlHoleMem *mem, -U8 maxHoles, +uint8_t maxHoles, RgSchUlHole **holeRef ) #else -PUBLIC S16 rgSCHUtlUlHoleMemInit(cell, mem, maxHoles, holeRef) +S16 rgSCHUtlUlHoleMemInit(cell, mem, maxHoles, holeRef) RgSchCellCb *cell; RgSchUlHoleMem *mem; -U8 maxHoles; +uint8_t maxHoles; RgSchUlHole **holeRef; #endif { S16 ret; RgSchUlHole *holes; - TRC2(rgSCHUtlUlHoleMemInit); ret = rgSCHUtlAllocSBuf(cell->instIdx, (Data **)&holes, maxHoles * sizeof(*holes)); if (ret != ROK) { - RETVALUE(ret); + return (ret); } mem->holes = holes; @@ -9609,7 +9396,7 @@ RgSchUlHole **holeRef; } else { - U8 i; + uint8_t i; holes[1].prv = NULLP; holes[0].nxt = &holes[1]; for (i = 1; i < mem->maxHoles - 1; ++i) @@ -9622,7 +9409,7 @@ RgSchUlHole **holeRef; } mem->firstFree = &holes[1]; - RETVALUE(ROK); + return ROK; } /*********************************************************** @@ -9639,25 +9426,24 @@ RgSchUlHole **holeRef; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleMemDeinit +Void rgSCHUtlUlHoleMemDeinit ( RgSchCellCb *cell, RgSchUlHoleMem *mem ) #else -PUBLIC Void rgSCHUtlUlHoleMemDeinit(cell, mem) +Void rgSCHUtlUlHoleMemDeinit(cell, mem) RgSchCellCb *cell; RgSchUlHoleMem *mem; #endif { - TRC2(rgSCHUtlUlHoleMemDeinit); /* ccpu00117052 - MOD - Passing double pointer for proper NULLP assignment*/ rgSCHUtlFreeSBuf(cell->instIdx, (Data **)(&(mem->holes)), mem->maxHoles * sizeof(*mem->holes)); mem->maxHoles = 0; mem->firstFree = NULLP; - RETVOID; + return; } /*********************************************************** @@ -9674,22 +9460,21 @@ RgSchUlHoleMem *mem; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocMemGet +RgSchUlAlloc *rgSCHUtlUlAllocMemGet ( RgSchUlAllocMem *mem ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlAllocMemGet(mem) +RgSchUlAlloc *rgSCHUtlUlAllocMemGet(mem) RgSchUlAllocMem *mem; #endif { RgSchUlAlloc *alloc; - TRC2(rgSCHUtlUlAllocMemGet); #if (ERRCLASS & ERRCLS_DEBUG) if (mem->firstFree == NULLP) { - RETVALUE(NULLP); + return (NULLP); } #endif @@ -9698,7 +9483,7 @@ RgSchUlAllocMem *mem; alloc->nxt = NULLP; /* probably not needed */ /* alloc->prv might already be NULLP, in case was needed to set it to NULLP */ - RETVALUE(alloc); + return (alloc); } /*********************************************************** @@ -9715,18 +9500,17 @@ RgSchUlAllocMem *mem; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlAllocMemRls +Void rgSCHUtlUlAllocMemRls ( RgSchUlAllocMem *mem, RgSchUlAlloc *alloc ) #else -PUBLIC Void rgSCHUtlUlAllocMemRls(mem, alloc) +Void rgSCHUtlUlAllocMemRls(mem, alloc) RgSchUlAllocMem *mem; RgSchUlAlloc *alloc; #endif { - TRC2(rgSCHUtlUlAllocMemRls); alloc->prv = NULLP; alloc->nxt = mem->firstFree; @@ -9735,7 +9519,7 @@ RgSchUlAlloc *alloc; mem->firstFree->prv = alloc; } mem->firstFree = alloc; - RETVOID; + return; } /*********************************************************** @@ -9752,22 +9536,21 @@ RgSchUlAlloc *alloc; * **********************************************************/ #ifdef ANSI -PUBLIC RgSchUlHole *rgSCHUtlUlHoleMemGet +RgSchUlHole *rgSCHUtlUlHoleMemGet ( RgSchUlHoleMem *mem ) #else -PUBLIC RgSchUlHole *rgSCHUtlUlHoleMemGet(mem) +RgSchUlHole *rgSCHUtlUlHoleMemGet(mem) RgSchUlHoleMem *mem; #endif { RgSchUlHole *hole; - TRC2(rgSCHUtlUlHoleMemGet); #if (ERRCLASS & ERRCLS_DEBUG) if (mem->firstFree == NULLP) { - RETVALUE(NULLP); + return (NULLP); } #endif @@ -9777,7 +9560,7 @@ RgSchUlHoleMem *mem; hole->nxt = NULLP; /* probably not needed */ /* hole->prv is might already be NULLP, in case was needed to set it to NULLP */ - RETVALUE(hole); + return (hole); } /*********************************************************** @@ -9794,18 +9577,17 @@ RgSchUlHoleMem *mem; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlUlHoleMemRls +Void rgSCHUtlUlHoleMemRls ( RgSchUlHoleMem *mem, RgSchUlHole *hole ) #else -PUBLIC Void rgSCHUtlUlHoleMemRls(mem, hole) +Void rgSCHUtlUlHoleMemRls(mem, hole) RgSchUlHoleMem *mem; RgSchUlHole *hole; #endif { - TRC2(rgSCHUtlUlHoleMemRls); hole->prv = NULLP; hole->nxt = mem->firstFree; @@ -9814,7 +9596,7 @@ RgSchUlHole *hole; mem->firstFree->prv = hole; } mem->firstFree = hole; - RETVOID; + return; } /** @@ -9832,31 +9614,30 @@ RgSchUlHole *hole; * will always be such hole. And also for efficiency. * * @param[in] RgSchUlSf *sf - * @param[in] U8 startSb - * @param[in] U8 numSb + * @param[in] uint8_t startSb + * @param[in] uint8_t numSb * @return RgSchUlAlloc* **/ #ifdef ANSI -PUBLIC RgSchUlAlloc *rgSCHUtlUlGetSpfcAlloc +RgSchUlAlloc *rgSCHUtlUlGetSpfcAlloc ( RgSchUlSf *sf, -U8 startSb, -U8 numSb +uint8_t startSb, +uint8_t numSb ) #else -PUBLIC RgSchUlAlloc *rgSCHUtlUlGetSpfcAlloc(sf, startSb, numSb) +RgSchUlAlloc *rgSCHUtlUlGetSpfcAlloc(sf, startSb, numSb) RgSchUlSf *sf; -U8 startSb; -U8 numSb; +uint8_t startSb; +uint8_t numSb; #endif { RgSchUlHole *hole, *nxtHole; RgSchUlAlloc *alloc = NULLP; - TRC2(rgSCHUtlUlGetSpfcAlloc); if ((hole = rgSCHUtlUlHoleFirst(sf)) == NULLP) { - RETVALUE(NULLP); + return (NULLP); } do { @@ -9873,7 +9654,7 @@ U8 numSb; #if (ERRCLASS & ERRCLS_DEBUG) if ( newHole == NULLP ) { - RETVALUE( NULLP ); + return ( NULLP ); } #endif newHole->start = hole->start; @@ -9913,7 +9694,7 @@ U8 numSb; break; } } while ((hole = nxtHole) != NULLP); - RETVALUE(alloc); + return (alloc); } #ifdef LTE_L2_MEAS /** @@ -9924,45 +9705,44 @@ U8 numSb; * Function :rgSCHUtlValidateQci * * @param[in] RgSchCellCb *cellCb - * @param[in] U8 numQci - * @param[out] U8 *qci + * @param[in] uint8_t numQci + * @param[out] uint8_t *qci * @return S16 * ROK * RFAILED **/ #ifdef ANSI -PRIVATE S16 rgSCHUtlValidateQci +static S16 rgSCHUtlValidateQci ( RgSchCellCb *cellCb, -U8 numQci, -U8 *qci +uint8_t numQci, +uint8_t *qci ) #else -PRIVATE S16 rgSCHUtlValidateQci(cellCb, numQci, qci) +static S16 rgSCHUtlValidateQci(cellCb, numQci, qci) RgSchCellCb *cellCb; -U8 numQci; -U8 *qci; +uint8_t numQci; +uint8_t *qci; #endif { - U8 qciIdx; - U8 qciVal; + uint8_t qciIdx; + uint8_t qciVal; - TRC3(rgSCHUtlValidateQci) for(qciIdx = 0; qciIdx < numQci; qciIdx++) { qciVal = qci[qciIdx]; if(qciVal == 0 || qciVal > 9) { - RETVALUE(RFAILED); + return RFAILED; } if(qciVal != cellCb->qciArray[qciVal].qci) { - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; }/* rgSCHUtlValidateQci */ /** * @brief Validates the measurement request parameters. @@ -9977,23 +9757,22 @@ U8 *qci; * @return RgSchUlAlloc* **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlValidateMeasReq +S16 rgSCHUtlValidateMeasReq ( RgSchCellCb *cellCb, LrgSchMeasReqInfo *schL2MeasInfo, RgSchErrInfo *err ) #else -PUBLIC S16 rgSCHUtlValidateMeasReq(cellCb, schL2MeasInfo, err) +S16 rgSCHUtlValidateMeasReq(cellCb, schL2MeasInfo, err) RgSchCellCb *cellCb; LrgSchMeasReqInfo *schL2MeasInfo; RgSchErrInfo *err; #endif { - U16 measType; + uint16_t measType; S16 ret; - TRC3(rgSCHUtlValidateMeasReq) measType = schL2MeasInfo->measType; @@ -10002,7 +9781,7 @@ RgSchErrInfo *err; { err->errType = RGSCHERR_SCH_INVALID_MEAS_TYPE; err->errCause = RGSCHERR_SCH_L2MEAS; - RETVALUE(RFAILED); + return RFAILED; } if((schL2MeasInfo->timePrd !=0) && (measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL) && @@ -10011,7 +9790,7 @@ RgSchErrInfo *err; { err->errType = RGSCHERR_SCH_INVALID_PARAM_RANGE; err->errCause = RGSCHERR_SCH_L2MEAS; - RETVALUE(RFAILED); + return RFAILED; } if((schL2MeasInfo->timePrd !=0) && (measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL) && @@ -10019,7 +9798,7 @@ RgSchErrInfo *err; { err->errType = RGSCHERR_SCH_INVALID_PARAM_RANGE; err->errCause = RGSCHERR_SCH_L2MEAS; - RETVALUE(RFAILED); + return RFAILED; } if((measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL) && ((schL2MeasInfo->nmbActvUeQciDl.numQci > LRG_MAX_QCI_PER_REQ) || @@ -10030,7 +9809,7 @@ RgSchErrInfo *err; { err->errType = RGSCHERR_SCH_INVALID_PARAM_RANGE; err->errCause = RGSCHERR_SCH_L2MEAS; - RETVALUE(RFAILED); + return RFAILED; } if((measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL) && ((schL2MeasInfo->nmbActvUeQciUl.numQci > LRG_MAX_QCI_PER_REQ) || @@ -10041,7 +9820,7 @@ RgSchErrInfo *err; { err->errType = RGSCHERR_SCH_INVALID_PARAM_RANGE; err->errCause = RGSCHERR_SCH_L2MEAS; - RETVALUE(RFAILED); + return RFAILED; } if((schL2MeasInfo->timePrd !=0) && (measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)) @@ -10054,10 +9833,10 @@ RgSchErrInfo *err; { err->errType = RGSCHERR_SCH_INVALID_QCI_VAL; err->errCause = RGSCHERR_SCH_L2MEAS; - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; }/* rgSCHUtlValidateMeasReq */ #endif /* LTE_L2_MEAS */ /******* : END *****/ @@ -10075,32 +9854,31 @@ RgSchErrInfo *err; * config confirm API towards RRM. * * @param[in] RgrCfgTransId transId - * @param[in] U8 status + * @param[in] uint8_t status * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrSiCfgCfm +S16 rgSCHUtlRgrSiCfgCfm ( Inst instId, SpId spId, RgrCfgTransId transId, -U8 status +uint8_t status ) #else -PUBLIC S16 rgSCHUtlRgrSiCfgCfm(instId, spId, transId, status) +S16 rgSCHUtlRgrSiCfgCfm(instId, spId, transId, status) Inst instId; SpId spId; RgrCfgTransId transId; -U8 status; +uint8_t status; #endif { - U8 prntTrans[RGR_CFG_TRANSID_SIZE+1]; + uint8_t prntTrans[RGR_CFG_TRANSID_SIZE+1]; - TRC2(rgSCHUtlRgrSiCfgCfm) - cmMemcpy((U8 *)prntTrans, (U8 *)transId.trans, RGR_CFG_TRANSID_SIZE); + memcpy(prntTrans, transId.trans, RGR_CFG_TRANSID_SIZE); prntTrans[RGR_CFG_TRANSID_SIZE] = '\0'; @@ -10110,10 +9888,10 @@ U8 status; { RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgrSiCfgCfm: " "RgUiRgrSiCfgCfm Failed "); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /* rgSCHUtlRgrSiCfgCfm */ @@ -10130,34 +9908,33 @@ U8 status; * config confirm API towards RRM. * * @param[in] RgrCfgTransId transId - * @param[in] U8 status + * @param[in] uint8_t status * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrWarningSiCfgCfm +S16 rgSCHUtlRgrWarningSiCfgCfm ( Inst instId, SpId spId, -U8 siId, +uint8_t siId, RgrCfgTransId transId, -U8 status +uint8_t status ) #else -PUBLIC S16 rgSCHUtlRgrWarningSiCfgCfm(instId, spId, siId, transId, status) +S16 rgSCHUtlRgrWarningSiCfgCfm(instId, spId, siId, transId, status) Inst instId; SpId spId; -U8 siId; +uint8_t siId; RgrCfgTransId transId; -U8 status; +uint8_t status; #endif { - U8 prntTrans[RGR_CFG_TRANSID_SIZE+1]; + uint8_t prntTrans[RGR_CFG_TRANSID_SIZE+1]; - TRC2(rgSCHUtlRgrWarningSiCfgCfm) - cmMemcpy((U8 *)prntTrans, (U8 *)transId.trans, RGR_CFG_TRANSID_SIZE); + memcpy(prntTrans, transId.trans, RGR_CFG_TRANSID_SIZE); prntTrans[RGR_CFG_TRANSID_SIZE] = '\0'; @@ -10167,10 +9944,10 @@ U8 status; { RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"rgSCHUtlRgrSiCfgCfm: " "RgUiRgrSiCfgCfm Failed "); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /* rgSCHUtlRgrWarningSiCfgCfm */ /*********************************************************** @@ -10187,18 +9964,17 @@ U8 status; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHUtlPutSiInfo +Void rgSCHUtlPutSiInfo ( RgSchCellCb *cell ) #else -PUBLIC Void rgSCHUtlPutSiInfo(cell) +Void rgSCHUtlPutSiInfo(cell) RgSchCellCb *cell; #endif { - U8 idx = 0; - U32 sizeOfSiInfo = 0; - TRC2(rgSCHUtlPutSiInfo) + uint8_t idx = 0; + uint32_t sizeOfSiInfo = 0; /*Free the buffers in crntSiInfo*/ RGSCH_FREE_MSG(cell->siCb.crntSiInfo.mib) RGSCH_FREE_MSG(cell->siCb.crntSiInfo.sib1Info.sib1) @@ -10221,7 +9997,7 @@ RgSchCellCb *cell; RGSCH_FREE_MSG(cell->siCb.newSiInfo.siInfo[idx].si) } - RETVOID; + return; } #endif /*RGR_SI_SCH */ @@ -10244,7 +10020,7 @@ RgSchCellCb *cell; * **********************************************************/ #ifdef ANSI -PUBLIC S16 rgSCHUtlGetDrxSchdUesInDl +S16 rgSCHUtlGetDrxSchdUesInDl ( RgSchCellCb *cellCb, RgSchUeCb *ueCb, @@ -10255,7 +10031,7 @@ CmLListCp *dlInActvLst, CmLListCp *ulInActvLst ) #else -PUBLIC S16 rgSCHUtlGetDrxSchdUesInDl(cellCb, ueCb, dlHq, allocInfo, dlDrxInactvTmrLst, dlInActvLst, ulInActvLst) +S16 rgSCHUtlGetDrxSchdUesInDl(cellCb, ueCb, dlHq, allocInfo, dlDrxInactvTmrLst, dlInActvLst, ulInActvLst) RgSchCellCb *cellCb; RgSchUeCb *ueCb; RgSchDlHqProcCb *dlHq; @@ -10266,16 +10042,16 @@ CmLListCp *ulInActvLst; #endif { Bool isNewTx = FALSE; - U8 idx; + uint8_t idx; RgSchDrxDlHqProcCb *drxHq; RgSchDRXCellCb *drxCell = cellCb->drxCb; RgSchDrxUeCb *drxUe; #ifdef DEBUGP Inst inst = cellCb->instIdx; #endif - U8 cellIdx = ueCb->cellIdToCellIdxMap[RG_SCH_CELLINDEX(dlHq->hqE->cell)]; - U32 dlInactvMask; - U32 ulInactvMask; + uint8_t cellIdx = ueCb->cellIdToCellIdxMap[RG_SCH_CELLINDEX(dlHq->hqE->cell)]; + uint32_t dlInactvMask; + uint32_t ulInactvMask; for(idx = 0; idx < allocInfo->nmbOfTBs; idx++) { @@ -10289,9 +10065,9 @@ CmLListCp *ulInActvLst; { /*Stop the DRX retransmission timer as UE scheduled for retx. Here * we stop the timer and inactivate the UE for both UL and DL. - * This may result in loss of one subframe for UL but this trade + * This may result in loss of one slot for UL but this trade * off is taken to avoid the overhead of maintaining a list of UEs - * to be inactivated in the next subframe.*/ + * to be inactivated in the next slot.*/ drxHq = RG_SCH_DRX_GET_DL_HQ(dlHq); drxUe = RG_SCH_DRX_GET_UE(ueCb); if(drxHq->reTxIndx != DRX_INVALID) @@ -10378,7 +10154,7 @@ CmLListCp *ulInActvLst; } }/*if(isNewTx == TRUE) */ - RETVALUE(ROK); + return ROK; }/* rgSCHUtlGetSchdUes*/ /* ccpu00117452 - MOD - Changed macro name from @@ -10396,27 +10172,27 @@ CmLListCp *ulInActvLst; * @param[in] RgSchCellCb *cell pointer to Cell Control block * @param[in] RgSchUeCb *ue pointer to Ue Control block * @param[in] RgrStaIndInfo *staInfo Sta Ind struct to be filled - * @param[in] U8 numCqiRept NUmber of reports to be filled + * @param[in] uint8_t numCqiRept NUmber of reports to be filled * @return Void * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlFillSndStaInd +S16 rgSCHUtlFillSndStaInd ( RgSchCellCb *cell, RgSchUeCb *ue, RgrStaIndInfo *staInfo, -U8 numCqiRept +uint8_t numCqiRept ) #else -PUBLIC S16 rgSCHUtlFillSndStaInd(cell, ue, staInfo, numCqiRept) +S16 rgSCHUtlFillSndStaInd(cell, ue, staInfo, numCqiRept) RgSchCellCb *cell; RgSchUeCb *ue; RgrStaIndInfo *staInfo; -U8 numCqiRept; +uint8_t numCqiRept; #endif { - U8 idxStart; + uint8_t idxStart; /* Fill StaInd for sending collated Latest N CQI rpeorts */ /* Find index in the array from where Latest N @@ -10429,8 +10205,8 @@ U8 numCqiRept; idxStart = ue->schCqiInfo.cqiCount - numCqiRept; - cmMemcpy ((U8*)&(staInfo->ueCqiInfo.cqiRept), - (U8*)&(ue->schCqiInfo.cqiRept[idxStart]), + memcpy (&(staInfo->ueCqiInfo.cqiRept), + &(ue->schCqiInfo.cqiRept[idxStart]), numCqiRept * sizeof(RgrUeCqiRept)); staInfo->ueCqiInfo.numCqiRept = numCqiRept; @@ -10442,10 +10218,10 @@ U8 numCqiRept; { RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Could not send " "CQI reports for RNTI:%d",ue->ueId); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; }/* End of rgSCHUtlFillSndStaInd */ @@ -10469,13 +10245,13 @@ U8 numCqiRept; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrStaInd +S16 rgSCHUtlRgrStaInd ( RgSchCellCb *cell, RgrStaIndInfo *rgrSta ) #else -PUBLIC S16 rgSCHUtlRgrStaInd(cell, rgrSta) +S16 rgSCHUtlRgrStaInd(cell, rgrSta) RgSchCellCb *cell; RgrStaIndInfo *rgrSta; #endif @@ -10483,7 +10259,6 @@ RgrStaIndInfo *rgrSta; S16 ret = ROK; RgSchUpSapCb *rgrSap; /*!< RGR SAP Control Block */ - TRC2(rgSCHUtlRgrStaInd) rgrSap = cell->rgrSap; @@ -10492,11 +10267,11 @@ RgrStaIndInfo *rgrSta; RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHUtlRgrStaInd() Upper SAP not bound (%d) ", rgrSap->sapSta.sapState); - RETVALUE(RFAILED); + return RFAILED; } RgUiRgrStaInd(&(cell->rgrSap->sapCfg.sapPst), cell->rgrSap->sapCfg.suId, rgrSta); - RETVALUE(ret); + return (ret); } /* rgSCHUtlRgrStaInd*/ #endif /* End of RGR_CQI_REPT */ @@ -10521,7 +10296,7 @@ RgrStaIndInfo *rgrSta; * -# ROK **/ #ifdef ANSI -PUBLIC Void rgSCHUtlIndRntiRls2Mac +Void rgSCHUtlIndRntiRls2Mac ( RgSchCellCb *cell, CmLteRnti rnti, @@ -10529,7 +10304,7 @@ Bool ueIdChng, CmLteRnti newRnti ) #else -PUBLIC Void rgSCHUtlIndRntiRls2Mac(cell, rnti, ueIdChng, newRnti) +Void rgSCHUtlIndRntiRls2Mac(cell, rnti, ueIdChng, newRnti) RgSchCellCb *cell; CmLteRnti rnti; Bool ueIdChng; @@ -10540,7 +10315,6 @@ CmLteRnti newRnti; Inst inst = cell->instIdx; RgInfRlsRnti rntiInfo; - TRC2(rgSCHUtlIndRntiRls2Mac) /* Copy the info to rntiInfo */ rntiInfo.cellId = cell->cellId; @@ -10556,7 +10330,7 @@ CmLteRnti newRnti; /* Invoke MAC to release the rnti */ rgSCHUtlGetPstToLyr(&pst, &rgSchCb[inst], cell->macInst); RgSchMacRlsRnti(&pst, &rntiInfo); - RETVOID; + return; } /* LTE_ADV_FLAG_REMOVED_START */ @@ -10577,13 +10351,13 @@ CmLteRnti newRnti; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrLoadInfInd +S16 rgSCHUtlRgrLoadInfInd ( RgSchCellCb *cell, RgrLoadInfIndInfo *rgrLoadInf ) #else -PUBLIC S16 rgSCHUtlRgrLoadInfInd(cell, rgrLoadInf) +S16 rgSCHUtlRgrLoadInfInd(cell, rgrLoadInf) RgSchCellCb *cell; RgrLoadInfIndInfo *rgrLoadInf; #endif @@ -10591,20 +10365,17 @@ PUBLIC S16 rgSCHUtlRgrLoadInfInd(cell, rgrLoadInf) S16 ret = ROK; RgSchUpSapCb *rgrSap; /*!< RGR SAP Control Block */ - TRC2(rgSCHUtlRgrLoadInfInd) - - rgrSap = cell->rgrSap; if (rgrSap->sapSta.sapState != LRG_BND) { RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHUtlRgrLoadInfInd() Upper SAP not bound (%d) ", rgrSap->sapSta.sapState); - RETVALUE(RFAILED); + return RFAILED; } RgUiRgrLoadInfInd(&(cell->rgrSap->sapCfg.sapPst), cell->rgrSap->sapCfg.suId, rgrLoadInf); - RETVALUE(ret); + return (ret); } /* rgSCHUtlRgrLoadInfInd*/ /* LTE_ADV_FLAG_REMOVED_END */ @@ -10630,7 +10401,7 @@ PUBLIC S16 rgSCHUtlRgrLoadInfInd(cell, rgrLoadInf) **/ #ifdef ANSI -PUBLIC Void rgSCHUtlRlsRnti +Void rgSCHUtlRlsRnti ( RgSchCellCb *cell, RgSchRntiLnk *rntiLnk, @@ -10638,7 +10409,7 @@ Bool ueIdChngd, CmLteRnti newRnti ) #else -PUBLIC Void rgSCHUtlRlsRnti(cell, rntiLnk, ueIdChngd, newRnti) +Void rgSCHUtlRlsRnti(cell, rntiLnk, ueIdChngd, newRnti) RgSchCellCb *cell; RgSchRntiLnk *rntiLnk; Bool ueIdChngd; @@ -10646,8 +10417,7 @@ CmLteRnti newRnti; #endif { - TRC2(rgSCHUtlRlsRnti) - U8 isLegacy = 0; + uint8_t isLegacy = 0; #ifdef EMTC_ENABLE if(cell->emtcEnable) { @@ -10663,7 +10433,7 @@ CmLteRnti newRnti; /* Fix: syed Explicitly Inidcate MAC to release RNTI */ rgSCHUtlIndRntiRls2Mac(cell, rntiLnk->rnti, ueIdChngd, newRnti); - RETVOID; + return; } @@ -10678,19 +10448,19 @@ CmLteRnti newRnti; * * @param[in] RgSchCellCb *cell pointer to Cell Control block * @param[in] RgSchUeCb *ue pointer to Ue Control block - * @param[in] U8 numCqiRept NUmber of reports to be filled + * @param[in] uint8_t numCqiRept NUmber of reports to be filled * @return Void * **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlFillSndUeStaInd +S16 rgSCHUtlFillSndUeStaInd ( RgSchCellCb *cell, RgSchUeCb *ue, RgrUeStaIndInfo *ueStaInfo ) #else -PUBLIC S16 rgSCHUtlFillSndUeStaInd(cell, ue, ueStaInfo) +S16 rgSCHUtlFillSndUeStaInd(cell, ue, ueStaInfo) RgSchCellCb *cell; RgSchUeCb *ue; RgrUeStaIndInfo *ueStaInfo; @@ -10705,10 +10475,10 @@ RgrUeStaIndInfo *ueStaInfo; { RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"Could not send " "UE Sta reports CRNTI:%d",ue->ueId); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; }/* End of rgSCHUtlFillSndStaInd */ @@ -10732,13 +10502,13 @@ RgrUeStaIndInfo *ueStaInfo; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlRgrUeStaInd +S16 rgSCHUtlRgrUeStaInd ( RgSchCellCb *cell, RgrUeStaIndInfo *rgrUeSta ) #else -PUBLIC S16 rgSCHUtlRgrUeStaInd(cell, rgrUeSta) +S16 rgSCHUtlRgrUeStaInd(cell, rgrUeSta) RgSchCellCb *cell; RgrUeStaIndInfo *rgrUeSta; #endif @@ -10746,20 +10516,17 @@ RgrUeStaIndInfo *rgrUeSta; S16 ret = ROK; RgSchUpSapCb *rgrSap; /*!< RGR SAP Control Block */ - TRC2(rgSCHUtlRgrStaInd) - - rgrSap = cell->rgrSap; if (rgrSap->sapSta.sapState != LRG_BND) { RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHUtlRgrUeStaInd() Upper SAP not bound (%d) ", rgrSap->sapSta.sapState); - RETVALUE(RFAILED); + return RFAILED; } RgUiRgrUeStaInd(&(cell->rgrSap->sapCfg.sapPst), cell->rgrSap->sapCfg.suId, rgrUeSta); - RETVALUE(ret); + return (ret); } /* rgSCHUtlRgrStaInd*/ /* RRM_RBC_X */ @@ -10777,38 +10544,36 @@ RgrUeStaIndInfo *rgrUeSta; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlUpdAvgPrbUsage +S16 rgSCHUtlUpdAvgPrbUsage ( RgSchCellCb *cell ) #else -PUBLIC S16 rgSCHUtlUpdAvgPrbUsage(cell) +S16 rgSCHUtlUpdAvgPrbUsage(cell) RgSchCellCb *cell; #endif { CmLteTimingInfo frm; RgmPrbRprtInd *prbRprtInd; S16 ret = ROK; - U32 idx; + uint32_t idx; #ifdef DBG_MAC_RRM_PRB_PRINT - static U32 count = 0; - const U32 reprotForEvery20Sec = 20000/cell->prbUsage.rprtPeriod; + static uint32_t count = 0; + const uint32_t reprotForEvery20Sec = 20000/cell->prbUsage.rprtPeriod; count++; #endif - TRC2(rgSCHUtlUpdAvgPrbUsage); - frm = cell->crntTime; RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA); - U16 numDlSf; - U16 numUlSf; + uint16_t numDlSf; + uint16_t numUlSf; #ifdef LTE_TDD if(cell->prbUsage.rprtPeriod >= RGSCH_NUM_SUB_FRAMES) { - /* Get the total number of DL and UL subframes within the reporting period*/ + /* Get the total number of DL and UL slots within the reporting period*/ numDlSf = (cell->prbUsage.rprtPeriod * rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1]) / RGSCH_NUM_SUB_FRAMES; @@ -10818,9 +10583,9 @@ RgSchCellCb *cell; } else { - /* Get the total number of DL and UL subframes < 10 ms interval */ - numDlSf = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe]; - numUlSf = rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe]; + /* Get the total number of DL and UL slots < 10 ms interval */ + numDlSf = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.slot]; + numUlSf = rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][frm.slot]; } #else numDlSf = cell->prbUsage.rprtPeriod; @@ -10831,10 +10596,10 @@ RgSchCellCb *cell; cell->rgmSap->sapCfg.sapPst.pool, (Data**)&prbRprtInd, sizeof(RgmPrbRprtInd)) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } - cmMemset((U8 *) &prbRprtInd->stQciPrbRpts[0], + memset(&prbRprtInd->stQciPrbRpts[0], 0, (RGM_MAX_QCI_REPORTS * sizeof(RgmPrbRptPerQci))); @@ -10887,7 +10652,7 @@ RgSchCellCb *cell; cell->rgmSap->sapCfg.suId, prbRprtInd); - RETVALUE(ret); + return (ret); } /* RRM_RBC_Y */ @@ -10906,18 +10671,17 @@ RgSchCellCb *cell; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlReTxTa +Void rgSCHUtlReTxTa ( RgSchCellCb *cellCb, RgSchUeCb *ueCb ) #else -PUBLIC Void rgSCHUtlReTxTa(cellCb, ueCb) +Void rgSCHUtlReTxTa(cellCb, ueCb) RgSchCellCb *cellCb; RgSchUeCb *ueCb; #endif { - TRC2(rgSCHUtlReTxTa) /* If TA Timer is running. Stop it */ if (ueCb->taTmr.tmrEvnt != TMR_NONE) @@ -10937,7 +10701,7 @@ RgSchUeCb *ueCb; ueCb->dl.taCb.state = RGSCH_TA_TOBE_SCHEDULED; rgSCHUtlDlTARpt(cellCb, ueCb); - RETVOID; + return; } /* Added function for dropping Paging Message*/ @@ -10957,27 +10721,26 @@ RgSchUeCb *ueCb; * -# RFAILED **/ #ifdef ANSI -PRIVATE S16 rgSCHChkBoUpdate +static S16 rgSCHChkBoUpdate ( RgSchCellCb *cell, RgInfCmnBoRpt *boUpdt ) #else -PRIVATE S16 rgSCHChkBoUpdate (cell, boUpdt) +static S16 rgSCHChkBoUpdate (cell, boUpdt) RgSchCellCb *cell; RgInfCmnBoRpt *boUpdt; #endif { - U32 crntTimeInSubFrms = 0; - U32 boUpdTimeInSubFrms = 0; - U32 distance = 0; - TRC2(rgSCHChkBoUpdate); + uint32_t crntTimeInSubFrms = 0; + uint32_t boUpdTimeInSubFrms = 0; + uint32_t distance = 0; - crntTimeInSubFrms = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) + cell->crntTime.subframe + + crntTimeInSubFrms = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) + cell->crntTime.slot + RG_SCH_CMN_DL_DELTA + 2; /* As bo received will scheduled in next TTI so incrementing with +1 more */ - boUpdTimeInSubFrms = (boUpdt->u.timeToTx.sfn * RGSCH_NUM_SUB_FRAMES_5G)+ boUpdt->u.timeToTx.subframe; + boUpdTimeInSubFrms = (boUpdt->u.timeToTx.sfn * RGSCH_NUM_SUB_FRAMES_5G)+ boUpdt->u.timeToTx.slot; distance = boUpdTimeInSubFrms > crntTimeInSubFrms ? \ @@ -10986,9 +10749,9 @@ RgInfCmnBoRpt *boUpdt; if (distance > RGSCH_PCCHBCCH_WIN) { - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; }/*rgSCHChkBoUpdate*/ @@ -11006,31 +10769,29 @@ RgInfCmnBoRpt *boUpdt; * * @param[in] RgSchCellCb *cell * @param[in] CmLteTimingInfo phichTime - * @param[in] U8 hqFdbkIdx - * @return U8 + * @param[in] uint8_t hqFdbkIdx + * @return uint8_t **/ #ifdef ANSI -PUBLIC U8 rgSchUtlCfg0ReTxIdx +uint8_t rgSchUtlCfg0ReTxIdx ( RgSchCellCb *cell, CmLteTimingInfo phichTime, -U8 hqFdbkIdx +uint8_t hqFdbkIdx ) #else -PUBLIC U8 rgSchUtlCfg0ReTxIdx (cell, phichTime, hqFdbkIdx) +uint8_t rgSchUtlCfg0ReTxIdx (cell, phichTime, hqFdbkIdx) RgSchCellCb *cell; CmLteTimingInfo phichTime; -U8 hqFdbkIdx; +uint8_t hqFdbkIdx; #endif { - U8 reTxIdx = RGSCH_INVALID_INFO; - U8 iPhich = 0; + uint8_t reTxIdx = RGSCH_INVALID_INFO; + uint8_t iPhich = 0; RgSchCmnUlCell *cellUl = RG_SCH_CMN_GET_UL_CELL(cell); RgSchUlSf *ulSf; - U8 ulSF; /* UL SF in the TDD frame */ + uint8_t ulSF; /* UL SF in the TDD frame */ - TRC2(rgSchUtlCfg0ReTxIdx); - ulSf = &cellUl->ulSfArr[hqFdbkIdx]; ulSF = ulSf->ulSfIdx; @@ -11039,7 +10800,7 @@ U8 hqFdbkIdx; { iPhich = 1; } - if(phichTime.subframe == 0 || phichTime.subframe == 5) + if(phichTime.slot == 0 || phichTime.slot == 5) { if(iPhich == 0) { @@ -11050,18 +10811,18 @@ U8 hqFdbkIdx; { /* Retx will happen at n+7 */ RGSCHCMNADDTOCRNTTIME(phichTime, phichTime, 7); - /* Fetch the corresponding UL subframe Idx in UL sf array */ + /* Fetch the corresponding UL slot Idx in UL sf array */ reTxIdx = rgSCHCmnGetUlSfIdx(&phichTime, cell); } } - else if(phichTime.subframe == 1 || phichTime.subframe == 6) + else if(phichTime.slot == 1 || phichTime.slot == 6) { /* Retx will happen at n+7 */ RGSCHCMNADDTOCRNTTIME(phichTime, phichTime, 7); - /* Fetch the corresponding UL subframe Idx in UL sf array */ + /* Fetch the corresponding UL slot Idx in UL sf array */ reTxIdx = rgSCHCmnGetUlSfIdx(&phichTime, cell); } - RETVALUE(reTxIdx); + return (reTxIdx); } #endif @@ -11080,46 +10841,44 @@ U8 hqFdbkIdx; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U32 bo - * @param[out] U32 *prbReqrd + * @param[in] uint32_t bo + * @param[out] uint32_t *prbReqrd * @return Void **/ #ifdef ANSI -PUBLIC Void rgSchUtlDlCalc1CwPrb +Void rgSchUtlDlCalc1CwPrb ( RgSchCellCb *cell, RgSchUeCb *ue, -U32 bo, -U32 *prbReqrd +uint32_t bo, +uint32_t *prbReqrd ) #else -PUBLIC Void rgSchUtlDlCalc1CwPrb(cell, ue, bo, prbReqrd) +Void rgSchUtlDlCalc1CwPrb(cell, ue, bo, prbReqrd) RgSchCellCb *cell; RgSchUeCb *ue; -U32 bo; -U32 *prbReqrd; +uint32_t bo; +uint32_t *prbReqrd; #endif { RgSchCmnDlCell *dlCell = RG_SCH_CMN_GET_DL_CELL(cell); RgSchCmnDlUe *dlUe = RG_SCH_CMN_GET_DL_UE(ue, cell); - U32 eff; - U32 noRes; - U8 iTbs; - U8 cfi = dlCell->currCfi; - - TRC2(rgSchUtlDlCalc1CwPrb); + uint32_t eff; + uint32_t noRes; + uint8_t iTbs; + uint8_t cfi = dlCell->currCfi; iTbs = dlUe->mimoInfo.cwInfo[0].iTbs[0]; eff = (*(RgSchCmnTbSzEff *)(dlCell->cqiToEffTbl[0][cfi]))[iTbs]; /* Optimization to convert totalBo (which is in-terms of bytes) to bits * i.e, << 3 and multiply with 1024 i.e, << 10 */ - noRes = ((U64)((bo << 3) << 10)) / (eff); + noRes = ((uint64_t)((bo << 3) << 10)) / (eff); /* Get the number of RBs needed for this transmission */ /* Number of RBs = No of REs / No of REs per RB */ *prbReqrd = RGSCH_CEIL(noRes, dlCell->noResPerRb[cfi]); - RETVOID; + return; } /* rgSchUtlDlCalc1CwPrb*/ /** @@ -11138,35 +10897,33 @@ U32 *prbReqrd; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U32 bo - * @param[out] U32 *prbReqrd + * @param[in] uint32_t bo + * @param[out] uint32_t *prbReqrd * @return Void **/ #ifdef ANSI -PUBLIC Void rgSchUtlDlCalc2CwPrb +Void rgSchUtlDlCalc2CwPrb ( RgSchCellCb *cell, RgSchUeCb *ue, -U32 bo, -U32 *prbReqrd +uint32_t bo, +uint32_t *prbReqrd ) #else -PUBLIC Void rgSchUtlDlCalc2CwPrb(cell, ue, bo, prbReqrd) +Void rgSchUtlDlCalc2CwPrb(cell, ue, bo, prbReqrd) RgSchCellCb *cell; RgSchUeCb *ue; -U32 bo; -U32 *prbReqrd; +uint32_t bo; +uint32_t *prbReqrd; #endif { RgSchCmnDlCell *dlCell = RG_SCH_CMN_GET_DL_CELL(cell); RgSchCmnDlUe *dlUe = RG_SCH_CMN_GET_DL_UE(ue, cell); - U32 eff1, eff2; - U32 noRes; - U8 noLyr1, noLyr2; - U8 iTbs1, iTbs2; - U8 cfi = dlCell->currCfi; - - TRC2(rgSchUtlDlCalc2CwPrb); + uint32_t eff1, eff2; + uint32_t noRes; + uint8_t noLyr1, noLyr2; + uint8_t iTbs1, iTbs2; + uint8_t cfi = dlCell->currCfi; if ((dlUe->mimoInfo.forceTD) ||/* Transmit Diversity (TD) */ (dlUe->mimoInfo.ri < 2))/* 1 layer precoding */ @@ -11176,7 +10933,7 @@ U32 *prbReqrd; /* Optimization to convert totalBo (which is in-terms of bytes) to bits * i.e, << 3 and multiply with 1024 i.e, << 10 */ - noRes = ((U64)((bo << 3) << 10)) / (eff1); + noRes = ((uint64_t)((bo << 3) << 10)) / (eff1); /* Get the number of RBs needed for this transmission */ /* Number of RBs = No of REs / No of REs per RB */ *prbReqrd = RGSCH_CEIL(noRes, dlCell->noResPerRb[cfi]); @@ -11192,12 +10949,12 @@ U32 *prbReqrd; /* Optimization to convert totalBo (which is in-terms of bytes) to bits * i.e, << 3 and multiply with 1024 i.e, << 10 */ - noRes = ((U64)((bo << 3) << 10)) / (eff1 + eff2); + noRes = ((uint64_t)((bo << 3) << 10)) / (eff1 + eff2); /* Get the number of RBs needed for this transmission */ /* Number of RBs = No of REs / No of REs per RB */ *prbReqrd = RGSCH_CEIL(noRes, dlCell->noResPerRb[cfi]); } - RETVOID; + return; } /* rgSchUtlDlCalc2CwPrb */ /** @@ -11213,33 +10970,32 @@ U32 *prbReqrd; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U32 bo - * @param[out] U32 *prbReqrd + * @param[in] uint32_t bo + * @param[out] uint32_t *prbReqrd * @return Void **/ #ifdef ANSI -PUBLIC Void rgSchUtlCalcTotalPrbReq +Void rgSchUtlCalcTotalPrbReq ( RgSchCellCb *cell, RgSchUeCb *ue, -U32 bo, -U32 *prbReqrd +uint32_t bo, +uint32_t *prbReqrd ) #else -PUBLIC Void rgSchUtlCalcTotalPrbReq(cell, ue, bo, prbReqrd) +Void rgSchUtlCalcTotalPrbReq(cell, ue, bo, prbReqrd) RgSchCellCb *cell; RgSchUeCb *ue; -U32 bo; -U32 *prbReqrd; +uint32_t bo; +uint32_t *prbReqrd; #endif { - TRC2(rgSchUtlCalcTotalPrbReq); - /* Call TM specific Prb calculation routine */ (dlCalcPrbFunc[ue->mimoInfo.txMode - 1])(cell, ue, bo, prbReqrd); - RETVOID; + return; } /* rgSchUtlCalcTotalPrbReq */ +#ifdef UNUSE_FUN #ifdef TFU_UPGRADE /*********************************************************** * @@ -11248,7 +11004,7 @@ U32 *prbReqrd; * * Desc : Fetch the CQI/PMI bits for a UE based on the mode, periodicity. * - * Ret : U8 + * Ret : uint8_t * ROK - Success * * Notes: @@ -11257,25 +11013,24 @@ U32 *prbReqrd; * **********************************************************/ #ifdef ANSI -PRIVATE U8 rgSCHUtlFetchPcqiBitSz +static uint8_t rgSCHUtlFetchPcqiBitSz ( RgSchCellCb *cell, RgSchUeCb *ueCb, - U8 numTxAnt + uint8_t numTxAnt ) #else -PRIVATE U8 rgSCHUtlFetchPcqiBitSz (cell, ueCb, numTxAnt) +static uint8_t rgSCHUtlFetchPcqiBitSz (cell, ueCb, numTxAnt) RgSchCellCb *cell; RgSchUeCb *ueCb; -U8 numTxAnt; +uint8_t numTxAnt; #endif { - U8 confRepMode; - U8 pcqiSz; - U8 ri; + uint8_t confRepMode; + uint8_t pcqiSz; + uint8_t ri; RgSchUePCqiCb *cqiCb = RG_SCH_GET_UE_CELL_CQI_CB(ueCb,cell); - TRC3(rgSCHUtlFetchPcqiBitSz); confRepMode = cqiCb->cqiCfg.cqiSetup.prdModeEnum; if((ueCb->mimoInfo.txMode != RGR_UE_TM_3) && (ueCb->mimoInfo.txMode != RGR_UE_TM_4)) @@ -11394,9 +11149,10 @@ U8 numTxAnt; break; } - RETVALUE(pcqiSz); + return (pcqiSz); } #endif +#endif /** * @brief Utility function to returns the number of subbands based on the * requested bytes. @@ -11410,28 +11166,28 @@ U8 numTxAnt; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @param[in] U32 *numSbs - * @return U8 + * @param[in] uint32_t *numSbs + * @return uint8_t **/ #ifdef ANSI -PUBLIC U8 rgSchUtlGetNumSbs +uint8_t rgSchUtlGetNumSbs ( RgSchCellCb *cell, RgSchUeCb *ue, -U32 *numSbs +uint32_t *numSbs ) #else -PUBLIC U8 rgSchUtlGetNumSbs (cell, ue, numSbs) +uint8_t rgSchUtlGetNumSbs (cell, ue, numSbs) RgSchCellCb *cell; RgSchUeCb *ue; -U32 *numSbs; +uint32_t *numSbs; #endif { - U32 nPrb; + uint32_t nPrb; //Currently hardcoding MAX prb for each UE nPrb = ue->ue5gtfCb.maxPrb; (*numSbs) = RGSCH_CEIL(nPrb, MAX_5GTF_VRBG_SIZE); - RETVALUE(ROK); + return ROK; } /** @@ -11448,22 +11204,22 @@ U32 *numSbs; * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb *ue - * @return U8 + * @return uint8_t **/ #ifdef ANSI -PUBLIC U8 rgSchUtlSortInsUeLst +uint8_t rgSchUtlSortInsUeLst ( RgSchCellCb *cell, CmLListCp *ueLst, CmLList *node, -U8 vrbgRequired +uint8_t vrbgRequired ) #else -PUBLIC U8 rgSchUtlSortInsUeLst (cell, ueLst, node, vrbgRequired) +uint8_t rgSchUtlSortInsUeLst (cell, ueLst, node, vrbgRequired) RgSchCellCb *cell; CmLListCp *ueLst; CmLList *node; -U8 vrbgRequired; +uint8_t vrbgRequired; #endif { CmLList *ueInLst; @@ -11519,7 +11275,7 @@ U8 vrbgRequired; } } - RETVALUE(ROK); + return ROK; } /** @@ -11538,33 +11294,31 @@ U8 vrbgRequired; * * @param[in] RgSchCellCb *cell * @param[in] CmLteRnti crnti - * @param[in] U8 lcgId + * @param[in] uint8_t lcgId * @param[in] Bool isGbr * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlBuildNSendLcgReg +S16 rgSCHUtlBuildNSendLcgReg ( RgSchCellCb *cell, CmLteRnti crnti, -U8 lcgId, +uint8_t lcgId, Bool isGbr ) #else -PUBLIC S16 rgSCHUtlBuildNSendLcgReg(cell, crnti, lcgId, isGbr) +S16 rgSCHUtlBuildNSendLcgReg(cell, crnti, lcgId, isGbr) RgSchCellCb *cell; CmLteRnti crnti; -U8 lcgId; +uint8_t lcgId; Bool isGbr; #endif { Pst pst; RgInfLcgRegReq lcgRegReq; - TRC3(rgSCHUtlBuildNSendLcgReg); - - cmMemset((U8*)&pst, (U8)0, sizeof(Pst)); + memset(&pst, 0, sizeof(Pst)); lcgRegReq.isGbr = isGbr; lcgRegReq.cellId = cell->cellId; lcgRegReq.crnti = crnti; @@ -11573,7 +11327,7 @@ Bool isGbr; /* code Coverage portion of the test case */ RgSchMacLcgReg(&pst, &lcgRegReq); - RETVALUE(ROK); + return ROK; } #ifdef TFU_UPGRADE @@ -11597,20 +11351,18 @@ Bool isGbr; * -# ROK **/ #ifdef ANSI -PUBLIC TfuAckNackMode rgSchUtlGetFdbkMode +TfuAckNackMode rgSchUtlGetFdbkMode ( RgrSchFrmt1b3TypEnum fdbkType ) #else -PUBLIC TfuAckNackMode rgSchUtlGetFdbkMode(fdbkType) +TfuAckNackMode rgSchUtlGetFdbkMode(fdbkType) RgrSchFrmt1b3TypEnum fdbkType; #endif { TfuAckNackMode mode = TFU_UCI_FORMAT_1A_1B; - TRC2(rgSchUtlGetFdbkMode); - switch(fdbkType) { case RG_SCH_UCI_FORMAT_NON_CA: @@ -11630,7 +11382,7 @@ RgrSchFrmt1b3TypEnum fdbkType; } break; } - RETVALUE(mode); + return (mode); } #endif /* TFU_TDD */ #endif /* LTE_ADV */ @@ -11655,13 +11407,13 @@ RgrSchFrmt1b3TypEnum fdbkType; * -# ROK **/ #ifdef ANSI -PUBLIC Void rgSCHUtlSndUeSCellDel2Mac +Void rgSCHUtlSndUeSCellDel2Mac ( RgSchCellCb *cell, CmLteRnti rnti ) #else -PUBLIC Void rgSCHUtlSndUeSCellDel2Mac(cell, rnti) +Void rgSCHUtlSndUeSCellDel2Mac(cell, rnti) RgSchCellCb *cell; CmLteRnti rnti; #endif @@ -11670,8 +11422,6 @@ CmLteRnti rnti; Inst inst = cell->instIdx; RgInfRlsRnti rntiInfo; - TRC2(rgSCHUtlSndUeSCellDel2Mac) - RGSCHDBGINFONEW(inst,(rgSchPBuf(inst),"RNTI Release IND for UE(%d)\n", rnti)); /* Copy the info to rntiInfo */ rntiInfo.cellId = cell->cellId; @@ -11685,7 +11435,7 @@ CmLteRnti rnti; /* Invoke MAC to release the rnti */ rgSCHUtlGetPstToLyr(&pst, &rgSchCb[inst], cell->macInst); RgSchMacRlsRnti(&pst, &rntiInfo); - RETVOID; + return; } /** @@ -11699,22 +11449,20 @@ CmLteRnti rnti; * * * @param[in] RgrTxMode txMode - * @return U8 maxTbCount; + * @return uint8_t maxTbCount; * -# ROK **/ #ifdef ANSI -PUBLIC U8 rgSCHUtlGetMaxTbSupp +uint8_t rgSCHUtlGetMaxTbSupp ( RgrTxMode txMode ) #else -PUBLIC U8 rgSCHUtlGetMaxTbSupp(txMode) +uint8_t rgSCHUtlGetMaxTbSupp(txMode) RgrTxMode txMode #endif { - U8 maxTbCount; - - TRC2(rgSCHUtlGetMaxTbSupp); + uint8_t maxTbCount; /* Primary Cell */ @@ -11738,7 +11486,7 @@ RgrTxMode txMode break; } - RETVALUE(maxTbCount); + return (maxTbCount); } /** @@ -11751,26 +11499,26 @@ RgrTxMode txMode * * @param[in] RgSchCellCb *cell * @param[in] RgSchUeCb ueCb - * @param[in] U8 cqiReq, - * @param[out] U8 *triggerSet + * @param[in] uint8_t cqiReq, + * @param[out] uint8_t *triggerSet * * @return Void * -# ROK **/ #ifdef ANSI -PUBLIC Void rgSCHTomUtlGetTrigSet +Void rgSCHTomUtlGetTrigSet ( RgSchCellCb *cell, RgSchUeCb *ueCb, - U8 cqiReq, - U8 *triggerSet + uint8_t cqiReq, + uint8_t *triggerSet ) #else -PRIVATE S16 rgSCHTomUtlGetTrigSet(cell, ueCb, cqiReq, triggerSet) +static S16 rgSCHTomUtlGetTrigSet(cell, ueCb, cqiReq, triggerSet) RgSchCellCb *cell; RgSchUeCb *ueCb; - U8 cqiReq; - U8 *triggerSet; + uint8_t cqiReq; + uint8_t *triggerSet; #endif { RgSchUeCellInfo *pCellInfo = RG_SCH_CMN_GET_PCELL_INFO(ueCb); @@ -11779,7 +11527,7 @@ PRIVATE S16 rgSCHTomUtlGetTrigSet(cell, ueCb, cqiReq, triggerSet) case RG_SCH_APCQI_SERVING_CC: { /* APeriodic CQI request for Current Carrier.*/ - U8 sCellIdx = ueCb->cellIdToCellIdxMap[RG_SCH_CELLINDEX(cell)]; + uint8_t sCellIdx = ueCb->cellIdToCellIdxMap[RG_SCH_CELLINDEX(cell)]; *triggerSet = 1 << (7 - sCellIdx); break; } @@ -11799,7 +11547,7 @@ PRIVATE S16 rgSCHTomUtlGetTrigSet(cell, ueCb, cqiReq, triggerSet) break; } } - RETVOID; + return; } #endif /** @@ -11819,21 +11567,21 @@ PRIVATE S16 rgSCHTomUtlGetTrigSet(cell, ueCb, cqiReq, triggerSet) * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlUpdUeDciSize +Void rgSCHUtlUpdUeDciSize ( RgSchCellCb *cell, RgSchUeCb *ueCb, Bool isCsi2Bit ) #else -PUBLIC Void rgSCHUtlUpdUeDciSize(cell, ueCb, isCsi2Bit) +Void rgSCHUtlUpdUeDciSize(cell, ueCb, isCsi2Bit) RgSchCellCb *cell; RgSchUeCb *ueCb; Bool isCsi2Bit; #endif { - U8 dci01aCmnSize = cell->dciSize.baseSize[TFU_DCI_FORMAT_0]; - U8 dci01aDedSize = cell->dciSize.baseSize[TFU_DCI_FORMAT_0]; + uint8_t dci01aCmnSize = cell->dciSize.baseSize[TFU_DCI_FORMAT_0]; + uint8_t dci01aDedSize = cell->dciSize.baseSize[TFU_DCI_FORMAT_0]; if ((ueCb->accessStratumRls >= RGR_REL_10) && (cell->bwCfg.dlTotalBw >= cell->bwCfg.ulTotalBw)) { dci01aCmnSize += 1; /* Resource Allocation Type DCI 0 */ @@ -11936,18 +11684,18 @@ Bool isCsi2Bit; * **/ #ifdef ANSI -PUBLIC Void rgSCHUtlCalcDciSizes +Void rgSCHUtlCalcDciSizes ( RgSchCellCb *cell ) #else -PUBLIC Void rgSCHUtlCalcDciSizes(cell) +Void rgSCHUtlCalcDciSizes(cell) RgSchCellCb *cell; #endif { - U8 dciSize = 0; - U8 dci01aSize = 0; - U32 bits = 0, idx = 0; + uint8_t dciSize = 0; + uint8_t dci01aSize = 0; + uint32_t bits = 0, idx = 0; switch(TFU_DCI_FORMAT_0) /* Switch case for the purpose of readability */ { @@ -11967,7 +11715,7 @@ RgSchCellCb *cell; dciSize = 1 /* DCI 0 bit indicator */ + \ 1 /* Frequency hoping enable bit field */ + \ - (U8)bits /* For frequency Hopping */ + \ + (uint8_t)bits /* For frequency Hopping */ + \ 5 /* MCS */ + \ 1 /* NDI */ + \ 2 /* TPC */ + \ @@ -12010,7 +11758,7 @@ RgSchCellCb *cell; dciSize += 1 /* Format 1A */ + \ 1 /* Local or Distributed */ + \ - (U8)bits /* Resource block Assignment */ + \ + (uint8_t)bits /* Resource block Assignment */ + \ 5 /* MCS */ + #ifdef TFU_TDD 4 /* HARQ Proc Id */ + @@ -12056,7 +11804,7 @@ RgSchCellCb *cell; bits++; } - dciSize += (U8)bits /* Resource Allocation bits */ + \ + dciSize += (uint8_t)bits /* Resource Allocation bits */ + \ 5 /* MCS */ + #ifdef TFU_TDD 4 /* HARQ TDD */ + @@ -12103,7 +11851,7 @@ RgSchCellCb *cell; dciSize = 1; /* Resource Allocation bit */ } - dciSize += (U8)bits /* Resource Allocation bits */ + \ + dciSize += (uint8_t)bits /* Resource Allocation bits */ + \ 2 /* TPC */ + #ifdef TFU_TDD 2 /* DAI */ + \ @@ -12138,7 +11886,7 @@ RgSchCellCb *cell; dciSize = 1; /* Resource Allocation bit */ } - dciSize += (U8)bits /* Resource Allocation bits */ + \ + dciSize += (uint8_t)bits /* Resource Allocation bits */ + \ 2 /* TPC */ + #ifdef TFU_TDD 2 /* DAI */ + \ @@ -12208,18 +11956,16 @@ RgSchCellCb *cell; * @return Void **/ #ifdef ANSI -PUBLIC Void rgSCHUtlCpuOvrLdAdjItbsCap +Void rgSCHUtlCpuOvrLdAdjItbsCap ( RgSchCellCb *cell ) #else -PUBLIC Void rgSCHUtlCpuOvrLdAdjItbsCap(cell) +Void rgSCHUtlCpuOvrLdAdjItbsCap(cell) RgSchCellCb *cell #endif { - U32 tptDelta; - - TRC3(rgSCHUtlCpuOvrLdAdjItbsCap) + uint32_t tptDelta; if ((cell->cpuOvrLdCntrl.cpuOvrLdIns) & (RGR_CPU_OVRLD_DL_TPT_UP | RGR_CPU_OVRLD_DL_TPT_DOWN)) @@ -12277,7 +12023,7 @@ PUBLIC Void rgSCHUtlCpuOvrLdAdjItbsCap(cell) #endif } - RETVOID; + return; } /** * @brief Handler for the num UE per TTI based CPU OvrLd instr updating @@ -12292,31 +12038,31 @@ PUBLIC Void rgSCHUtlCpuOvrLdAdjItbsCap(cell) * - If successful, return ROK else RFAILED. * * @param[in] RgSchCellCb *cell - * @param[in] U8 cnrtCpuOvrLdIns + * @param[in] uint8_t cnrtCpuOvrLdIns * @return Void **/ #ifdef ANSI -PRIVATE Void rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr +static Void rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr ( RgSchCellCb *cell, - U8 crntCpuOvrLdIns + uint8_t crntCpuOvrLdIns ) #else -PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) +static S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) RgSchCellCb *cell; - U8 crntCpuOvrLdIns; + uint8_t crntCpuOvrLdIns; #endif { RgSchCpuOvrLdCntrlCb *cpuInstr = &(cell->cpuOvrLdCntrl); RgSchCmnCell *cellSch; - U8 maxUeNewDlTxPerTti; - U8 maxUeNewUlTxPerTti; - U8 tmpSubFrame = 0; + uint8_t maxUeNewDlTxPerTti; + uint8_t maxUeNewUlTxPerTti; + uint8_t tmpslot = 0; #ifdef CPU_OL_DBG_PRINTS - U8 idx = 0; + uint8_t idx = 0; #endif - U8 maxDlDecCnt; - U8 maxUlDecCnt; + uint8_t maxDlDecCnt; + uint8_t maxUlDecCnt; cellSch = RG_SCH_CMN_GET_CELL(cell); @@ -12333,11 +12079,11 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) /* Decrement till 90% of maxUeNewDlTxPerTti */ if ( cpuInstr->dlNxtIndxDecNumUeTti < maxDlDecCnt ) { - tmpSubFrame = (cpuInstr->dlNxtIndxDecNumUeTti) % 10; + tmpslot = (cpuInstr->dlNxtIndxDecNumUeTti) % 10; cpuInstr->dlNxtIndxDecNumUeTti++; - if ( cpuInstr->maxUeNewTxPerTti[tmpSubFrame] > 1 ) + if ( cpuInstr->maxUeNewTxPerTti[tmpslot] > 1 ) { - cpuInstr->maxUeNewTxPerTti[tmpSubFrame]--; + cpuInstr->maxUeNewTxPerTti[tmpslot]--; } else { @@ -12358,10 +12104,10 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) if ( cpuInstr->dlNxtIndxDecNumUeTti > 0) { cpuInstr->dlNxtIndxDecNumUeTti--; - tmpSubFrame = (cpuInstr->dlNxtIndxDecNumUeTti) % 10; - if ( cpuInstr->maxUeNewTxPerTti[tmpSubFrame] < maxUeNewDlTxPerTti ) + tmpslot = (cpuInstr->dlNxtIndxDecNumUeTti) % 10; + if ( cpuInstr->maxUeNewTxPerTti[tmpslot] < maxUeNewDlTxPerTti ) { - cpuInstr->maxUeNewTxPerTti[tmpSubFrame]++; + cpuInstr->maxUeNewTxPerTti[tmpslot]++; } else { @@ -12383,11 +12129,11 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) /* Decrement till 90% of maxUeNewDlTxPerTti */ if ( cpuInstr->ulNxtIndxDecNumUeTti < maxUlDecCnt ) { - tmpSubFrame = (cpuInstr->ulNxtIndxDecNumUeTti) % 10; + tmpslot = (cpuInstr->ulNxtIndxDecNumUeTti) % 10; cpuInstr->ulNxtIndxDecNumUeTti++; - if ( cpuInstr->maxUeNewRxPerTti[tmpSubFrame] > 1 ) + if ( cpuInstr->maxUeNewRxPerTti[tmpslot] > 1 ) { - cpuInstr->maxUeNewRxPerTti[tmpSubFrame]--; + cpuInstr->maxUeNewRxPerTti[tmpslot]--; } else { @@ -12408,10 +12154,10 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) if ( cpuInstr->ulNxtIndxDecNumUeTti > 0) { cpuInstr->ulNxtIndxDecNumUeTti--; - tmpSubFrame = (cpuInstr->ulNxtIndxDecNumUeTti) % 10; - if ( cpuInstr->maxUeNewRxPerTti[tmpSubFrame] < maxUeNewUlTxPerTti ) + tmpslot = (cpuInstr->ulNxtIndxDecNumUeTti) % 10; + if ( cpuInstr->maxUeNewRxPerTti[tmpslot] < maxUeNewUlTxPerTti ) { - cpuInstr->maxUeNewRxPerTti[tmpSubFrame]++; + cpuInstr->maxUeNewRxPerTti[tmpslot]++; } else { @@ -12443,7 +12189,7 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) printf("\n"); #endif - RETVOID; + return; } /* rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr */ /** @@ -12459,29 +12205,27 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns) * - If successful, return ROK else RFAILED. * * @param[in] RgSchCellCb *cell - * @param[in] U8 cnrtCpuOvrLdIns + * @param[in] uint8_t cnrtCpuOvrLdIns * @return S16 * -# ROK * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHUtlResetCpuOvrLdState +S16 rgSCHUtlResetCpuOvrLdState ( RgSchCellCb *cell, - U8 crntCpuOvrLdIns + uint8_t crntCpuOvrLdIns ) #else -PUBLIC S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) +S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) RgSchCellCb *cell; - U8 crntCpuOvrLdIns; + uint8_t crntCpuOvrLdIns; #endif { - U8 crntDlCpuOL=0; - U8 crntUlCpuOL=0; + uint8_t crntDlCpuOL=0; + uint8_t crntUlCpuOL=0; RgSchCmnCell *schCmnCell = (RgSchCmnCell *)(cell->sc.sch); - U8 idx; - - TRC3(rgSCHUtlResetCpuOvrLdState) + uint8_t idx; #ifdef CPU_OL_DBG_PRINTS printf("\n CPU OVR LD Ins Rcvd = %d\n", (int)crntCpuOvrLdIns); @@ -12510,7 +12254,7 @@ PUBLIC S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) schCmnCell->ul.maxUeNewTxPerTti; } - RETVALUE(ROK); + return ROK; } /* Check and Update numUEPer TTI based CPU overload instruction before * going for TP based CPU OL @@ -12520,7 +12264,7 @@ PUBLIC S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns); /* If need to have both TP and numUePerTti instrcution together in * one command then dont return from here */ - RETVALUE(ROK); + return ROK; } crntDlCpuOL = (crntCpuOvrLdIns & RGR_CPU_OVRLD_DL_TPT_UP) +\ @@ -12529,7 +12273,7 @@ PUBLIC S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) (crntDlCpuOL != RGR_CPU_OVRLD_DL_TPT_DOWN)) { /* Cfg validation failed. Invalid Command. Either UP/DOWN is allowed */ - RETVALUE(RFAILED); + return RFAILED; } crntUlCpuOL = (crntCpuOvrLdIns & RGR_CPU_OVRLD_UL_TPT_UP) +\ (crntCpuOvrLdIns & RGR_CPU_OVRLD_UL_TPT_DOWN); @@ -12537,12 +12281,12 @@ PUBLIC S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) (crntUlCpuOL != RGR_CPU_OVRLD_UL_TPT_DOWN)) { /* Cfg validation failed. Invalid Command. Either UP/DOWN is allowed */ - RETVALUE(RFAILED); + return RFAILED; } if ((crntDlCpuOL == 0) && (crntUlCpuOL == 0)) { /* Cfg validation failed. Invalid Command. Either UP/DOWN is allowed */ - RETVALUE(RFAILED); + return RFAILED; } cell->cpuOvrLdCntrl.cpuOvrLdIns = crntCpuOvrLdIns; @@ -12588,10 +12332,10 @@ PUBLIC S16 rgSCHUtlResetCpuOvrLdState(cell, crntCpuOvrLdIns) #endif } rgSCHUtlCpuOvrLdAdjItbsCap(cell); - RETVALUE(ROK); + return ROK; } #ifdef EMTC_ENABLE -PUBLIC S16 rgSCHUtlAddToResLst +S16 rgSCHUtlAddToResLst ( CmLListCp *cp, RgSchIotRes *iotRes @@ -12599,9 +12343,9 @@ PUBLIC S16 rgSCHUtlAddToResLst { cmLListAdd2Tail(cp, &iotRes->resLnk); iotRes->resLnk.node = (PTR)iotRes; - RETVALUE(ROK); + return ROK; } -PUBLIC S16 rgSCHUtlDelFrmResLst +S16 rgSCHUtlDelFrmResLst ( RgSchUeCb *ue, RgSchIotRes *iotRes @@ -12625,12 +12369,12 @@ RgSchIotRes *iotRes if(cp->count == 0) { RLOG0(L_INFO,"****error count*****\n"); - RETVALUE(ROK); + return ROK; } } cmLListDelFrm(cp, &iotRes->resLnk); iotRes->resLnk.node = NULLP; - RETVALUE(ROK); + return ROK; } #endif /**********************************************************************