X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_tom.c;h=0bd91d4d55ab0a293e679d7c81ed1fbddb47e740;hb=def50dc175cebc67238db5f1acd5ff322a2279bd;hp=316d2162fa27cc26325f8223df73c49c1c5cbd0f;hpb=6f769128e3fa5a83ee92e668ef9ac152c96b3200;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_tom.c b/src/5gnrmac/rg_tom.c index 316d2162f..0bd91d4d5 100755 --- a/src/5gnrmac/rg_tom.c +++ b/src/5gnrmac/rg_tom.c @@ -36,18 +36,7 @@ static int RLOG_MODULE_ID=4096; invoked by PHY towards MAC */ /* header include files -- defines (.h) */ -#include -#include "envopt.h" /* environment options */ -#include "envdep.h" /* environment dependent */ -#include "envind.h" /* environment independent */ -#include "gen.h" /* general layer */ -#include "ssi.h" /* system services */ -#include "cm5.h" /* common timers defines */ -#include "cm_hash.h" /* common hash list defines */ -#include "cm_llist.h" /* common linked list defines */ -#include "cm_mblk.h" /* memory management */ -#include "cm_tkns.h" /* common tokens */ -#include "cm_lte.h" /* common tokens */ +#include "common_def.h" #include "rgu.h" /* RGU defines */ #include "tfu.h" /* RGU defines */ #include "lrg.h" /* layer management defines for LTE-MAC */ @@ -56,30 +45,17 @@ invoked by PHY towards MAC #include "rg.h" /* defines and macros for MAC */ #include "rg_env.h" /* defines and macros for MAC */ #include "rg_err.h" /* defines and macros for MAC */ - +#include "rgm.h" /* layer management typedefs for MAC */ /* 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 "crg.x" /* CRG interface typedefs */ #include "rgu.x" /* RGU types */ #include "tfu.x" /* RGU types */ #include "lrg.x" /* layer management typedefs for MAC */ -#include "crg.x" /* CRG interface typedefs */ #include "rg_sch_inf.x" /* SCH interface typedefs */ #include "rg_prg.x" /* PRG interface typedefs */ #include "rgm.x" /* layer management typedefs for MAC */ -#include "rgm.h" /* layer management typedefs for MAC */ -#include "du_app_mac_inf.h" -#include "mac.h" #include "rg.x" /* typedefs for MAC */ -#include "lwr_mac_fsm.h" #ifdef MAC_RLC_UL_RBUF #include "ss_rbuf.h" #include "ss_rbuf.x" @@ -90,7 +66,7 @@ invoked by PHY towards MAC PRIVATE S16 rgTOMUtlProcDlSf ARGS(( RgDlSf *dlSf, RgCellCb *cellCb, RgErrInfo *err)); #else -PUBLIC S16 rgTOMUtlProcDlSf ARGS((RgDlSf *dlSf, RgCellCb *cellCb, +S16 rgTOMUtlProcDlSf ARGS((RgDlSf *dlSf, RgCellCb *cellCb, RgErrInfo *err)); #endif PRIVATE S16 rgTOMProcCrntiCEInDatInd ARGS(( @@ -99,7 +75,7 @@ RgUeCb *prevUeCb, RgCellCb *cellCb, TfuDatInfo *datInfo, RgInfCeInfo *ceInfo, -U16 slot +uint16_t slot )); PRIVATE S16 rgTOMProcCCCHSduInDatInd ARGS(( @@ -108,10 +84,10 @@ RgUeCb *prevUeCb, RgCellCb *cellCb, TfuDatInfo *datInfo, RgInfCeInfo *ceInfo, -U16 slot +uint16_t slot )); -PUBLIC S16 rgHndlFlowCntrl +S16 rgHndlFlowCntrl ( RgCellCb *cell, RgInfSfAlloc *sfInfo @@ -150,7 +126,7 @@ PRIVATE S16 rgTomUtlPrepareL2MUlThrpInfo ARGS TB, which is not guaranteed if higher Range values are used */ /* Note: taking value 10 for BSR index 1 */ #ifndef MAC_5GTF_UPDATE -PRIVATE U32 rgLwrBsrTbl[64] = { +PRIVATE uint32_t rgLwrBsrTbl[64] = { 0, 10, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91, 107, 125, 146, 171, 200, 234, 274, 321, @@ -162,7 +138,7 @@ PRIVATE U32 rgLwrBsrTbl[64] = { }; #else -PRIVATE U32 rgLwrBsrTbl[64] = { +PRIVATE uint32_t rgLwrBsrTbl[64] = { 0,10,13,16,19,23,29,35,43,53,65,80,98,120,147,181,223,274,337,414, 509,625,769,945,1162,1429,1757,2161,2657,3267,4017,4940,6074,7469, 9185,11294,13888,17077,20999,25822,31752,39045,48012,59039,72598, @@ -180,9 +156,9 @@ PRIVATE U32 rgLwrBsrTbl[64] = { } /* global variables */ -PUBLIC U32 rgUlrate_tfu; +uint32_t rgUlrate_tfu; #ifdef EMTC_ENABLE -EXTERN U32 grgUlrate_tfu; +EXTERN uint32_t grgUlrate_tfu; #endif /** @brief This function fills the PDSCH data of a downlink subframe @@ -225,10 +201,9 @@ PRIVATE S16 rgTOMUtlFillDatReqPdus(datInfo, dlSf, cellCb, err) TfuDatReqPduInfo *datReq=NULLP; /* Moving node declaration to limited scope for optimization */ RgDlHqProcCb *hqCb; - U8 idx; + uint8_t idx; Inst inst = cellCb->macInst - RG_INST_START; - TRC2(rgTOMUtlFillDatReqPdus) /* first lets send the BCCH data down to PHY */ if (dlSf->bcch.tb != NULLP) @@ -238,7 +213,7 @@ PRIVATE S16 rgTOMUtlFillDatReqPdus(datInfo, dlSf, cellCb, err) { err->errCause = RGERR_TOM_MEM_EXHAUST; RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,"Memory Exhaustion "); - RETVALUE(ret); + return (ret); } #ifdef TFU_ALLOC_EVENT_NO_INIT #ifndef L2_OPTMZ @@ -284,7 +259,7 @@ PRIVATE S16 rgTOMUtlFillDatReqPdus(datInfo, dlSf, cellCb, err) { err->errCause = RGERR_TOM_MEM_EXHAUST; RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Memory Exhaustion CRNTI:%d",datReq->rnti); - RETVALUE(ret); + return (ret); } #ifdef TFU_ALLOC_EVENT_NO_INIT #ifndef L2_OPTMZ @@ -324,7 +299,7 @@ PRIVATE S16 rgTOMUtlFillDatReqPdus(datInfo, dlSf, cellCb, err) err->errCause = RGERR_TOM_MEM_EXHAUST; RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"Memory Exhaustion CRNTI:%d", datReq->rnti); - RETVALUE(ret); + return (ret); } #ifdef TFU_ALLOC_EVENT_NO_INIT #ifndef L2_OPTMZ @@ -375,7 +350,7 @@ PRIVATE S16 rgTOMUtlFillDatReqPdus(datInfo, dlSf, cellCb, err) } /* end of while */ } - RETVALUE(ROK); + return ROK; } /* end of rgTOMUtlFillDatReqPdus*/ /** @brief This function does all the processing related to a single downlink @@ -411,14 +386,14 @@ PRIVATE S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) #endif #else #ifdef ANSI -PUBLIC S16 rgTOMUtlProcDlSf +S16 rgTOMUtlProcDlSf ( RgDlSf *dlSf, RgCellCb *cellCb, RgErrInfo *err ) #else -PUBLIC S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) +S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) RgDlSf *dlSf; RgCellCb *cellCb; RgErrInfo *err; @@ -429,14 +404,13 @@ PUBLIC S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) TfuDatReqInfo *datInfo; Inst inst = cellCb->macInst - RG_INST_START; - TRC2(rgTOMUtlProcDlSf); /* Fill Data Request Info from scheduler to PHY */ if ((ret = rgAllocEventMem(inst,(Ptr *)&datInfo, sizeof(TfuDatReqInfo))) != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to Allocate TfuDatReqInfo"); - RETVALUE(ret); + return (ret); } else { @@ -467,7 +441,7 @@ PUBLIC S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) if ((ret = rgTOMEmtcUtlFillDatReqPdus(datInfo, dlSf, cellCb, err)) != ROK) { RG_FREE_MEM(datInfo); - RETVALUE(ret); + return (ret); } #endif /* Fill the DLSCH PDUs of BCCH, PCCH and Dedicated Channels */ @@ -475,7 +449,7 @@ PUBLIC S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) { RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to send data for cell"); RG_FREE_MEM(datInfo); - RETVALUE(ret); + return (ret); } if((datInfo->pdus.count) || (datInfo->bchDat.pres == TRUE)) { @@ -491,225 +465,10 @@ PUBLIC S16 rgTOMUtlProcDlSf (dlSf, cellCb, err) RG_FREE_MEM(datInfo); } } - RETVALUE(ROK); + return ROK; } /* end of */ -U32 rgMacGT; - -/** - * @brief Handler for processing TTI indication recieved from - * PHY for a cell. - * - * @details - * - * Function: macProcessSlotInd - * - * Handler for processing slot indication recieved from PHY - * for a cell. - * - * Invoked by: macProcessSlotInd - * - * Processing Steps: - * - Get cell and update the cell's current time with the timing value given - * by PHY - * - Invoke the cmPrcTmr to process the timing queue. - * - Append the PHICH information to the downlink subframe that needs to go - * out to PHY in this subframe. - * - Invoke DHM to release the downlink subframe that occured earlier - * rgDHMRlsDlsfHqProc. - * - Invoke the TTI handler of scheduler. - * - Invoke the TTI handler of RAM module. - * - Get the downlink subframe that has to go out to PHY in this subframe - * rgSCHSubFrmGet. - * - Invoke rgTOMUtlProcTA to perform and timing advance processing. - * - Invoke rgTOMUtlProcDlSf to do further processing on the downlink - * subframe. - * - Get the downlink subframe that would occur after RG_DL_DELTA and - * invoke rgTOMUtlProcDlSfStaInd to send status indications to the higher - * layer. - * - Invoke GOM's TTI handler rgGOMTtiHndlr - * - Invoke COM's TTI handler rgCOMTtiHndlr - * - * @param[in] Inst inst - * @param[in] SlotIndInfo slotInd - * @return S16 - * -# ROK - * -# RFAILED - **/ -#if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF)) -pthread_t gMacTId = 0; -#endif -PUBLIC S16 macProcessSlotInd -( -Inst inst, -SlotIndInfo slotInd -) -{ - RgCellCb *cellCb; - RgErrInfo err; - RgDlSf *dlSf; -/* ADD Changes for Downlink UE Timing Optimization */ -#ifdef LTEMAC_DLUE_TMGOPTMZ - RgDlSf *prevDlSf; - CmLteTimingInfo prevTmInfo; -#endif - //SlotIndInfo *slotInd = &ttiInfo->cells[0]; - - TRC2(macProcessSlotInd); - -#ifdef MAC_FREE_RING_BUF - gMacTId = pthread_self(); -#endif - - cellCb = rgCb[inst].cell; - if (cellCb == NULLP) - { - err.errType = RGERR_TOM_TTIIND; - err.errCause = RGERR_TOM_INV_CELL_ID; - RETVALUE(RFAILED); - } - - RGCPYTIMEINFO(slotInd, cellCb->crntTime); - - rgMacGT = (slotInd.sfn * RG_NUM_SUB_FRAMES_5G) + slotInd.slot; -#ifdef LTE_L2_MEAS - rgL2Meas(cellCb); - /*Included to track the number of 10240 cycles completed */ - - if((cellCb->crntTime.sfn == 0) && (cellCb->crntTime.slot==0)) - { - cellCb->ttiCycle += 1; - } - -#endif - - /*Check if we have transmitted the previous DL SF, it could be the - case that we haven't received all the DATA from RLC as yet - and thus we would not have transmitted previous DL SF yet.*/ -/* ADD Changes for Downlink UE Timing Optimization */ -#ifdef LTEMAC_DLUE_TMGOPTMZ - RGSUBFRMCRNTTIME(slotInd, prevTmInfo, 1); - prevDlSf = &cellCb->subFrms[(prevTmInfo.slot % RG_NUM_SUB_FRAMES)]; - if(FALSE == prevDlSf->txDone) - { - if (ROK != rgTOMUtlProcDlSf (prevDlSf, cellCb, &err)) - { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,"Unable to process " - "previous downlink subframe for cell"); - err.errType = RGERR_TOM_TTIIND; - } - - /* Mark this frame as sent */ - prevDlSf->txDone = TRUE; - - if(prevDlSf->remDatReqCnt) - { - /*We have not received 1 or more data requests from RLC, this is - error scenario. MAC & SCH need to discard the allocations for - which data request hasn't been received as yet. And MAC - needs to inform SCH about the list of UEs for which - allocation need to be discarded. */ - prevDlSf->remDatReqCnt = 0; - } - } -#endif - - - /* Trigger for DL TTI REQ */ - handleDlTtiReq(slotInd); - - /* Trigger for UL TTI REQ */ - handleUlTtiReq(slotInd); - - dlSf = &cellCb->subFrms[(slotInd.slot % RG_NUM_SUB_FRAMES)]; - - if((dlSf->txDone == TRUE) || - (!RG_TIMEINFO_SAME(slotInd,dlSf->schdTime))) - { - /* MS_WORKAROUND */ -#ifndef LTEMAC_DLUE_TMGOPTMZ - TfuDatReqInfo *datInfo; - CmLteTimingInfo timingInfo; -#ifdef TFU_DL_DELTA_CHANGE - RGADDTOCRNTTIME(cellCb->crntTime, timingInfo, TFU_DLDATA_DLDELTA); -#else - RGADDTOCRNTTIME(cellCb->crntTime, timingInfo, TFU_DELTA); -#endif - /* Fill Data Request from MAC for BCH */ - if ((timingInfo.sfn % 4 == 0) && (timingInfo.slot == 0)) - { - if (ROK != rgAllocEventMem(inst,(Ptr *)&datInfo, - sizeof(TfuDatReqInfo))) - { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId, - "rgTOMUtlProcDlSf() Unable to Allocate TfuDatReqInfo for cell"); - RETVALUE(RFAILED); - } - else - { - cmLListInit(&datInfo->pdus); - datInfo->cellId = cellCb->cellId; - datInfo->bchDat.pres = NOTPRSNT; - datInfo->timingInfo = timingInfo; - - - /* sending the dummy data req to Phy */ - if (rgLIMTfuDatReq(inst,datInfo) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId, - "rgTOMUtlProcDlSf() Unable to send data info for cell"); - } - - } - } -#endif - /* Freeing as the part of CL Non RT Indication */ - /* TDOD : Generalize for all SOCs */ -#if !(defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)) - rgDHMFreeTbBufs(inst); -#endif - RETVALUE(ROK); - } - - /*Return if there is still some data to be received - from RLC for this DL SF. */ -/* ADD Changes for Downlink UE Timing Optimization */ -#ifdef LTEMAC_DLUE_TMGOPTMZ - if(0 != dlSf->remDatReqCnt) - { - /* Freeing as the part of CL Non RT Indication */ - /* TODO : Generalize for all SOCs and remove this flag */ -#if !(defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)) - rgDHMFreeTbBufs(inst); -#endif - RETVALUE(ROK); - } -#endif - -#ifdef XEON_SPECIFIC_CHANGES - CM_MEAS_TIME((slotInd.slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_DL_BR_PRC); -#endif - - if (ROK != rgTOMUtlProcDlSf (dlSf, cellCb, &err)) - { - //RLOG_ARG0(L_ERROR,DBG_CELLID,slotInd->cellId, - // "Unable to process downlink subframe for cell"); - err.errType = RGERR_TOM_TTIIND; - } -#ifdef XEON_SPECIFIC_CHANGES - CM_MEAS_TIME((slotInd->slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_DL_AFTER_PRC); -#endif - - /* Mark this frame as sent */ - dlSf->txDone = TRUE; - - /* Freeing as the part of CL Non RT Indication */ - /* TODO : Generalize for all SOCs and remove this flag */ -#if !(defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)) - rgDHMFreeTbBufs(inst); -#endif - RETVALUE(ROK); -} /* macProcessSlotInd */ +uint32_t rgMacGT; /** @brief This function allocates the RgMacPdu that will be populated by DEMUX * with the SubHeaders list and the values of the Control elements. @@ -741,9 +500,8 @@ Inst inst; Mem evntMem; RgUstaDgn dgn; /* Alarm diagnostics structure */ - VOLATILE U32 startTime=0; + VOLATILE uint32_t startTime=0; - TRC2(rgTOMUtlAllocPduEvnt); evntMem.region = rgCb[inst].rgInit.region; evntMem.pool = rgCb[inst].rgInit.pool; @@ -761,13 +519,13 @@ Inst inst; rgLMMStaInd(inst,LCM_CATEGORY_RESOURCE, LCM_EVENT_DMEM_ALLOC_FAIL, LCM_CAUSE_MEM_ALLOC_FAIL, &dgn); RLOG0(L_ERROR,"Allocation of DUX event failed"); - RETVALUE(RFAILED); + return RFAILED; } /*stoping Task*/ SStopTask(startTime, PID_TOMUTL_CMALLCEVT); - RETVALUE(ROK); + return ROK; } /* end of */ /** @brief This function frees up the RgMacPdu structure that has been @@ -801,7 +559,6 @@ PRIVATE Void rgTOMUtlFreePduEvnt (pdu, error) RgMacSdu *sdu; CmLList *node; - TRC2(rgTOMUtlFreePduEvnt); /* Steps of freeing up the PDU. * 1. loop through the subHdrLst and free up all the buffers. * 2. free up the whole event @@ -817,7 +574,7 @@ PRIVATE Void rgTOMUtlFreePduEvnt (pdu, error) } } RG_FREE_MEM(pdu); - RETVOID; + return; } /* end of rgTOMUtlFreePduEvnt */ /** @brief This function allocates the RgMacPdu that will be populated by DEMUX @@ -850,9 +607,8 @@ RgInfSfDatInd **sfInfo; Mem evntMem; RgUstaDgn dgn; /* Alarm diagnostics structure */ - VOLATILE U32 startTime=0; + VOLATILE uint32_t startTime=0; - TRC2(rgTOMInfAllocPduEvnt); evntMem.region = rgCb[inst].rgInit.region; evntMem.pool = rgCb[inst].rgInit.pool; @@ -869,13 +625,13 @@ RgInfSfDatInd **sfInfo; rgLMMStaInd(inst,LCM_CATEGORY_RESOURCE, LCM_EVENT_DMEM_ALLOC_FAIL, LCM_CAUSE_MEM_ALLOC_FAIL, &dgn); RLOG0(L_ERROR,"Allocation failed"); - RETVALUE(RFAILED); + return RFAILED; } /*stoping Task*/ SStopTask(startTime, PID_TOMINF_CMALLCEVT); - RETVALUE(ROK); + return ROK; } /* end of */ /** @brief This function frees up the RgMacPdu structure that has been @@ -902,10 +658,9 @@ PRIVATE Void rgTOMInfFreePduEvnt (sfInfo) RgInfSfDatInd *sfInfo; #endif { - TRC2(rgTOMInfFreePduEvnt); RG_FREE_MEM(sfInfo); - RETVOID; + return; } /* end of rgTOMUtlFreePduEvnt */ #ifdef LTE_L2_MEAS @@ -940,10 +695,9 @@ PRIVATE S16 rgTomUtlPrepareL2MUlThrpInfo(cellCb,ueCb,dDatInd) RgRguDedDatInd *dDatInd; #endif { - U8 lcId; - U8 lcgId; - U8 loop; - TRC2(rgTomUtlPrepareL2MUlThrpInfo); + uint8_t lcId; + uint8_t lcgId; + uint8_t loop; dDatInd->burstInd = RGU_L2M_UL_BURST_END; for(loop=0;loopnumLch;loop++) @@ -960,7 +714,7 @@ PRIVATE S16 rgTomUtlPrepareL2MUlThrpInfo(cellCb,ueCb,dDatInd) } } - RETVALUE(ROK); + return ROK; } #endif @@ -986,7 +740,7 @@ PRIVATE S16 rgTomUtlPrepareL2MUlThrpInfo(cellCb,ueCb,dDatInd) * @param [in] RgUeCb *ueCb * @param [in] CmLteRnti rnti * @param [in] RgMacPdu *pdu - * @param [out] U32 *lcgBytes + * @param [out] uint32_t *lcgBytes * * @return S16 * -# ROK @@ -1004,9 +758,9 @@ PRIVATE S16 rgTOMUtlProcMsg RgMacPdu *pdu, Bool isSpsRnti, Bool *spsToBeActvtd, - U16 *sduSize, - U16 slot, - U32 *lcgBytes + uint16_t *sduSize, + uint16_t slot, + uint32_t *lcgBytes ) #else PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,spsToBeActvtd,sduSize, slot, lcgBytes) @@ -1015,9 +769,9 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,spsToBeActvtd,sduSize, RgMacPdu *pdu; Bool isSpsRnti; Bool *spsToBeActvtd; - U16 *sduSize; - U16 slot; - U32 *lcgBytes; + uint16_t *sduSize; + uint16_t slot; + uint32_t *lcgBytes; #endif #else /* LTEMAC_SPS */ #ifdef ANSI @@ -1026,16 +780,16 @@ PRIVATE S16 rgTOMUtlProcMsg RgCellCb *cellCb, RgUeCb *ueCb, RgMacPdu *pdu, - U16 slot, - U32 *lcgBytes + uint16_t slot, + uint32_t *lcgBytes ) #else PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) RgCellCb *cellCb; RgUeCb *ueCb; RgMacPdu *pdu; - U16 slot; - U32 *lcgByes; + uint16_t slot; + uint32_t *lcgByes; #endif #endif { @@ -1053,17 +807,17 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) #endif #ifdef LTE_L2_MEAS - U8 idx1; - U8 idx2; - RgUlSf *ulSf; - U16 totalBytesRcvd = 0; - U16 sduLen[RGU_MAX_LC] = {0}; - U8 qciVal[RGU_MAX_LC] = {0}; - U8 numPrb = 0; + uint8_t idx1; + uint8_t idx2; + RgUlSf *ulSf; + uint16_t totalBytesRcvd = 0; + uint16_t sduLen[RGU_MAX_LC] = {0}; + uint8_t qciVal[RGU_MAX_LC] = {0}; + uint8_t numPrb = 0; #endif - U8 lcgId; - MsgLen bufSz; + uint8_t lcgId; + MsgLen bufSz; /* Moved outside of LTE_L2_MEAS * scope as this pointer will now be used to @@ -1084,7 +838,6 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) ulLcCb = NULLP; - TRC2(rgTOMUtlProcMsg) #ifndef LTE_L2_MEAS UNUSED(slot); @@ -1099,7 +852,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) /* code for common channel dat indications */ if ((ret = rgAllocShrablSBuf (inst,(Data**)&cDatInd, sizeof(RgRguCmnDatInd))) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } cDatInd->cellId = cellCb->cellId; cDatInd->rnti = ueCb->ueId; @@ -1121,22 +874,22 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) #endif sdu->mBuf = NULLP; rgUIMSndCmnDatInd(inst,cellCb->rguUlSap,cDatInd); - RETVALUE(ROK); + return ROK; } /* end of common channel processing */ #ifndef SS_RBUF if ((ret = rgAllocShrablSBuf (inst,(Data**)&dDatInd, sizeof(RgRguDedDatInd))) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } #else glblueCb5 = ueCb; elem = SRngGetWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC); if (NULLP == elem) { - RETVALUE(RFAILED); + return RFAILED; } dDatInd = (RgRguDedDatInd *)elem; - cmMemset((U8 *)dDatInd, 0x00, sizeof(RgRguDedDatInd)); + memset(dDatInd, 0x00, sizeof(RgRguDedDatInd)); #endif dDatInd->cellId = cellCb->cellId; dDatInd->rnti = ueCb->ueId; @@ -1175,10 +928,10 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) } #ifdef RLC_STA_PROC_IN_MAC/* RLC Status PDU Processing */ { - extern S16 kwProcDlStatusPdu(Pst *udxPst,SuId suId, + extern S16 rlcProcDlStatusPdu(Pst *udxPst,SuId suId, CmLteCellId cellId,CmLteRnti rnti,CmLteLcId lcId,Buffer *rlcSdu); - if(ROK == kwProcDlStatusPdu(&(cellCb->rguDlSap->sapCfg.sapPst), + if(ROK == rlcProcDlStatusPdu(&(cellCb->rguDlSap->sapCfg.sapPst), cellCb->rguDlSap->sapCfg.suId, cellCb->cellId,ueCb->ueId,sdu->lcId,sdu->mBuf)) { @@ -1199,21 +952,21 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "Failed to send datIndication to RGU CRNTI:%d",ueCb->ueId); - RETVALUE(ret); + return (ret); } #ifndef SS_RBUF if ((ret = rgAllocShrablSBuf (inst,(Data**)&dDatInd, sizeof(RgRguDedDatInd))) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } #else elem = SRngGetWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC); if (NULLP == elem) { - RETVALUE(RFAILED); + return RFAILED; } dDatInd = (RgRguDedDatInd *)elem; - cmMemset((U8 *)dDatInd, 0x00, sizeof(RgRguDedDatInd)); + memset(dDatInd, 0x00, sizeof(RgRguDedDatInd)); #endif dDatInd->cellId = cellCb->cellId; dDatInd->rnti = ueCb->ueId; @@ -1306,7 +1059,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) { ueCb->ul.explRelCntr = 0; /* Indicate scheduler for explicit release */ - cmMemset((U8*)&schPst1, (U8)0, sizeof(Pst)); + memset(&schPst1, 0, sizeof(Pst)); rgGetPstToInst(&schPst1,inst, cellCb->schInstMap.schInst); //TODO: commented for compilation without SCH #if 0 @@ -1344,7 +1097,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "Failed to send datIndication to RGU CRNTI:%d",ueCb->ueId); - RETVALUE(ret); + return (ret); } } #ifndef SS_RBUF @@ -1355,7 +1108,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes) rgFreeSharableSBuf(inst,(Data **)&dDatInd,sizeof(RgRguDedDatInd)); } #endif - RETVALUE(ROK); + return ROK; } /* end of */ /** @brief This function frees up the RgMacPdu structure that has been @@ -1378,21 +1131,21 @@ PRIVATE S16 rgTOMUtlInsSchInfo ( RgMacPdu *pdu, RgInfSfDatInd *sfInfo, -RgInfCeInfo *ceInfo, -CmLteRnti rnti, -Bool spsToBeActvtd, -U16 sduSize, -U32 *lcgBytes +RgInfCeInfo *ceInfo, +CmLteRnti rnti, +Bool spsToBeActvtd, +uint16_t sduSize, +uint32_t *lcgBytes ) #else PRIVATE S16 rgTOMUtlInsSchInfo (pdu, sfInfo, ceInfo, rnti,spsToBeActvtd,sduSize, lcgBytes) RgMacPdu *pdu; -RgInfSfDatInd *sfInfo; -RgInfCeInfo *ceInfo; -CmLteRnti rnti; -Bool spsToBeActvtd; -U16 sduSize; -U32 *lcgBytes; +RgInfSfDatInd *sfInfo; +RgInfCeInfo *ceInfo; +CmLteRnti rnti; +Bool spsToBeActvtd; +uint16_t sduSize; +uint32_t *lcgBytes; #endif #else @@ -1403,7 +1156,7 @@ RgMacPdu *pdu, RgInfSfDatInd *sfInfo, RgInfCeInfo *ceInfo, CmLteRnti rnti, -U32 *lcgBytes +uint32_t *lcgBytes ) #else PRIVATE S16 rgTOMUtlInsSchInfo (pdu, sfInfo, ceInfo, rnti, lcgBytes) @@ -1411,22 +1164,21 @@ RgMacPdu *pdu; RgInfSfDatInd *sfInfo; RgInfCeInfo *ceInfo; CmLteRnti rnti; -U32 *lcgBytes; +uint32_t *lcgBytes; #endif #endif { S16 ret; RgInfUeDatInd *ueInfo; - U32 lcgId = 0; - U32 idx = 0; + uint32_t lcgId = 0; + uint32_t idx = 0; - TRC2(rgTOMUtlInsSchInfo); RG_TOM_INF_ALLOC(sfInfo, sizeof(RgInfUeDatInd), ueInfo, ret); if(ROK != ret) { - RETVALUE(RFAILED); + return RFAILED; } ueInfo->rnti = rnti; @@ -1444,7 +1196,7 @@ U32 *lcgBytes; } } cmLListAdd2Tail(&sfInfo->ueLst, &ueInfo->ueLstEnt); - RETVALUE(ROK); + return ROK; } /* end of rgTOMUtlInsSchInfo */ #include @@ -1487,13 +1239,13 @@ U32 *lcgBytes; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgTOMDatInd +S16 rgTOMDatInd ( Inst inst, TfuDatIndInfo *datInd ) #else -PUBLIC S16 rgTOMDatInd(inst,datInd) +S16 rgTOMDatInd(inst,datInd) Inst inst; TfuDatIndInfo *datInd; #endif @@ -1510,18 +1262,17 @@ Inst inst; CmLList *node; TfuDatInfo *datInfo; RgLowSapCb *tfuSap; - U16 slot; + uint16_t slot; #ifdef LTEMAC_SPS Bool isSpsRnti=FALSE; Pst schPst1; // RgInfSpsRelInfo relInfo; - Bool spsToBeActvtd = FALSE; - U16 sduSize = 0; + Bool spsToBeActvtd = FALSE; + uint16_t sduSize = 0; #endif - U32 lcgBytes[RGINF_MAX_LCG_PER_UE]; + uint32_t lcgBytes[RGINF_MAX_LCG_PER_UE]; - TRC2(rgTOMDatInd); #ifdef STUB_TTI_HANDLING_5GTF node = datInd->datIndLst.first; for (;node; node=node->next) @@ -1541,7 +1292,7 @@ Inst inst; return(RFAILED); #endif - cmMemset((U8 *)&lcgBytes, 0, sizeof(lcgBytes)); + memset(&lcgBytes, 0, sizeof(lcgBytes)); tfuSap = &(rgCb[inst].tfuSap); ueCb = NULLP; @@ -1551,7 +1302,7 @@ Inst inst; { RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"Unable to get the cellCb for cell"); - RETVALUE(RFAILED); + return RFAILED; } /* Avoiding memset as all the fields are getting initialized further */ @@ -1560,7 +1311,7 @@ Inst inst; err.errType = RGERR_TOM_DATIND; RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"Unable to Allocate PDU for DUX cell"); node = datInd->datIndLst.first; - RETVALUE(RFAILED); + return RFAILED; } cmLListInit(&sfInfo->ueLst); sfInfo->cellId = datInd->cellId; @@ -1572,7 +1323,7 @@ Inst inst; { datInfo = (TfuDatInfo*)node->node; { - //extern U32 ulrate_tfu; + //extern uint32_t ulrate_tfu; MsgLen len; SFndLenMsg(datInfo->mBuf, &len); #ifdef STUB_TTI_HANDLING_5GTF @@ -1598,7 +1349,7 @@ Inst inst; err.errType = RGERR_TOM_DATIND; RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"Unable to Allocate PDU for DUX cell"); rgTOMInfFreePduEvnt (sfInfo); - RETVALUE(RFAILED); + return RFAILED; } if ((ret = rgDUXDemuxData (inst,pdu, &ceInfo, @@ -1662,7 +1413,7 @@ Inst inst; if (ueCb->ul.implRelCntr == ueCb->ul.implRelCnt) { /* Indicate scheduler for implicit release */ - cmMemset((U8*)&schPst1, (U8)0, sizeof(Pst)); + memset(&schPst1, 0, sizeof(Pst)); rgGetPstToInst(&schPst1,inst, cellCb->schInstMap.schInst); ueCb->ul.implRelCntr = 0; @@ -1698,9 +1449,9 @@ Inst inst; rgTOML2MCompileActiveLCs (cellCb, ueCb, pdu, &ceInfo); #endif #ifdef LTEMAC_SPS - if ((ret = rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,&spsToBeActvtd,&sduSize, slot, (U32 *)&lcgBytes)) != ROK) + if ((ret = rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,&spsToBeActvtd,&sduSize, slot, (uint32_t *)&lcgBytes)) != ROK) #else - if ((ret = rgTOMUtlProcMsg (cellCb, ueCb, pdu, slot, (U32 *)&lcgBytes)) != ROK) + if ((ret = rgTOMUtlProcMsg (cellCb, ueCb, pdu, slot, (uint32_t *)&lcgBytes)) != ROK) #endif /* LTEMAC_SPS */ { rgTOMUtlFreePduEvnt (pdu, TRUE); @@ -1714,15 +1465,15 @@ Inst inst; #ifdef LTEMAC_SPS - if(rgTOMUtlInsSchInfo(pdu, sfInfo, &ceInfo, datInfo->rnti,spsToBeActvtd,sduSize, (U32 *)&lcgBytes) != ROK) + if(rgTOMUtlInsSchInfo(pdu, sfInfo, &ceInfo, datInfo->rnti,spsToBeActvtd,sduSize, (uint32_t *)&lcgBytes) != ROK) #else - if(rgTOMUtlInsSchInfo(pdu, sfInfo, &ceInfo, datInfo->rnti, (U32 *)&lcgBytes) != ROK) + if(rgTOMUtlInsSchInfo(pdu, sfInfo, &ceInfo, datInfo->rnti, (uint32_t *)&lcgBytes) != ROK) #endif { rgTOMInfFreePduEvnt (sfInfo); rgTOMUtlFreePduEvnt (pdu, FALSE); - RETVALUE(RFAILED); + return RFAILED; } /* free up the PDU memory */ rgTOMUtlFreePduEvnt (pdu, FALSE); @@ -1739,19 +1490,19 @@ Inst inst; #endif /* RRM_RBC_X */ /* Update PRB used for all GBR QCIs to scheduler */ - cmMemcpy((U8*) &sfInfo->qcisUlPrbCnt[0], - (U8*) &cellCb->qcisUlPrbCnt[0], - (RGM_MAX_QCI_REPORTS * sizeof(U32))); + memcpy( &sfInfo->qcisUlPrbCnt[0], + &cellCb->qcisUlPrbCnt[0], + (RGM_MAX_QCI_REPORTS * sizeof(uint32_t))); /* clear the cellCb ul prb value */ - cmMemset((U8*)&cellCb->qcisUlPrbCnt[0], 0, - (RGM_MAX_QCI_REPORTS * sizeof(U32))); + memset(&cellCb->qcisUlPrbCnt[0], 0, + (RGM_MAX_QCI_REPORTS * sizeof(uint32_t))); /* RRM_RBC_Y */ rgGetPstToInst(&schPst, inst,cellCb->schInstMap.schInst); sfInfo->cellSapId = cellCb->schInstMap.cellSapId; //TODO: commented for compilation without SCH RgMacSchSfRecp(&schPst, sfInfo); - RETVALUE(ROK); + return ROK; } /* rgTOMDatInd */ /** @@ -1810,7 +1561,6 @@ RgErrInfo *err; RgDlSf *dlSf; Inst inst = cell->macInst - RG_INST_START; - TRC2(rgHndlCmnChnl) dlSf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)]; @@ -1820,18 +1570,18 @@ RgErrInfo *err; #if (ERRCLASS & ERRCLS_DEBUG) if(NULLP == (bch = rgDBMGetBcchOnBch(cell))) { - RETVALUE(RFAILED); + return RFAILED; } if(cmnLcInfo->bchInfo.lcId != bch->lcId) { - RETVALUE(RFAILED); + return RFAILED; } #endif if (rgAllocShrablSBuf (inst,(Data**)&staInd, sizeof(RguCStaIndInfo)) != ROK) { err->errCause = RGERR_TOM_MEM_EXHAUST; - RETVALUE(RFAILED); + return RFAILED; } staInd->cellId = cell->cellId; staInd->rnti = RG_INVALID_RNTI; @@ -1843,7 +1593,7 @@ RgErrInfo *err; #endif if (rgUIMSndCmnStaInd (inst,cell->rguDlSap,staInd) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } #else /*Store the received BCH Data in the scheduled subframe*/ @@ -1856,11 +1606,11 @@ RgErrInfo *err; #if (ERRCLASS & ERRCLS_DEBUG) if(NULLP == (pcch = rgDBMGetPcch(cell))) { - RETVALUE(RFAILED); + return RFAILED; } if(cmnLcInfo->pcchInfo.lcId != pcch->lcId) { - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -1875,7 +1625,7 @@ RgErrInfo *err; if (rgAllocShrablSBuf (inst,(Data**)&staInd, sizeof(RguCStaIndInfo)) != ROK) { err->errCause = RGERR_TOM_MEM_EXHAUST; - RETVALUE(RFAILED); + return RFAILED; } staInd->cellId = cell->cellId; staInd->rnti = RG_INVALID_RNTI; @@ -1890,7 +1640,7 @@ RgErrInfo *err; */ if (rgUIMSndCmnStaInd (inst,cell->rguDlSap,staInd) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } } @@ -1908,7 +1658,7 @@ RgErrInfo *err; if(NULLP == (bcch=rgDBMGetBcchOnDlsch(cell,cmnLcInfo->bcchInfo.lcId))) { - RETVALUE(RFAILED); + return RFAILED; } if(TRUE == cmnLcInfo->bcchInfo.sndStatInd) { @@ -1917,7 +1667,7 @@ RgErrInfo *err; sizeof(RguCStaIndInfo)) != ROK) { err->errCause = RGERR_TOM_MEM_EXHAUST; - RETVALUE(RFAILED); + return RFAILED; } staInd->cellId = cell->cellId; staInd->rnti = RG_INVALID_RNTI; @@ -1929,7 +1679,7 @@ RgErrInfo *err; #endif if (rgUIMSndCmnStaInd (inst,cell->rguDlSap,staInd) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } } else @@ -1943,7 +1693,7 @@ RgErrInfo *err; #endif/*RGR_SI_SCH*/ } - RETVALUE(ROK); + return ROK; } /* end of rgHndlCmnChnl */ /** @@ -1990,16 +1740,15 @@ RgErrInfo *err; #endif { - TRC2(rgHndlSchdUe); if(NULLP == ueInfo->allocInfo) { - RETVALUE(RFAILED); + return RFAILED; } rgDHMSndConsolidatedStaInd(cell, ueInfo, timingInfo, err); - RETVALUE(ROK); + return ROK; } /* end of rgHndlSchdUe */ #ifdef LTE_L2_MEAS @@ -2033,11 +1782,10 @@ RgInfUlUeInfo *ueInfo; #endif { Inst inst = cell->macInst - RG_INST_START; - U8 idx; + uint8_t idx; RgUlSf *ulSf; S16 ret; - TRC2(rgHndlUlUeInfo) ulSf = &cell->ulSf[(timingInfo.slot % RGSCH_NUM_SUB_FRAMES)]; @@ -2061,7 +1809,7 @@ RgInfUlUeInfo *ueInfo; if((ret = rgAllocSBuf(inst,(Data**)&(cell->ulSf[(timingInfo.slot % RGSCH_NUM_SUB_FRAMES)]. ueUlAllocInfo), ueInfo->numUes * sizeof(RgUeUlAlloc))) != ROK) { - RETVALUE(ret); + return (ret); } } #ifdef XEON_SPECIFIC_CHANGES @@ -2077,7 +1825,7 @@ RgInfUlUeInfo *ueInfo; } } RGCPYTIMEINFO(timingInfo, ulSf->schdTime); - RETVALUE(ROK); + return ROK; } /* end of rgHndlUlUeInfo */ #endif /** @@ -2101,20 +1849,19 @@ RgInfUlUeInfo *ueInfo; * -# ROK **/ #ifdef ANSI -PUBLIC Void rgTOMRlsSf +Void rgTOMRlsSf ( Inst inst, RgDlSf *dlSf ) #else -PUBLIC Void rgTOMRlsSf(dlSf) +Void rgTOMRlsSf(dlSf) Inst inst; RgDlSf *dlSf; #endif { - U8 idx; + uint8_t idx; - TRC2(rgTOMRlsSf) if(dlSf->txDone == FALSE) { @@ -2147,18 +1894,18 @@ RgDlSf *dlSf; RLC-MAC */ dlSf->statIndDone = FALSE; #endif - if (dlSf->tbs.count) - { - U8 i; + if (dlSf->tbs.count) + { + uint8_t i; CmLList *node; RgDlHqProcCb *hqP; - RGDBGERRNEW(inst, (rgPBuf(inst), + RGDBGERRNEW(inst, (rgPBuf(inst), "Error Stale TBs in Subframes TBS list\n")); node = dlSf->tbs.first; - while(node) - { - hqP = (RgDlHqProcCb*)node->node; - node = node->next; + while(node) + { + hqP = (RgDlHqProcCb*)node->node; + node = node->next; if (hqP) { for(i=0;i< RG_MAX_TB_PER_UE;i++) @@ -2178,7 +1925,7 @@ RgDlSf *dlSf; cmLListInit(&dlSf->tbs); dlSf->txDone = FALSE; dlSf->numRaRsp = 0; - RETVOID; + return; } /** @@ -2199,22 +1946,21 @@ RgDlSf *dlSf; * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgHndlFlowCntrl +S16 rgHndlFlowCntrl ( RgCellCb *cell, RgInfSfAlloc *sfInfo ) #else -PUBLIC S16 rgHndlFlowCntrl(cell, sfInfo) +S16 rgHndlFlowCntrl(cell, sfInfo) RgCellCb *cell; RgInfSfAlloc *sfInfo; #endif { RguFlowCntrlInd *flowCntrlInd; Pst *pst; - U32 ueIdx; - U32 lcIdx; - TRC3(rgHndlFlowCntrl); + uint32_t ueIdx; + uint32_t lcIdx; pst = &cell->rguDlSap->sapCfg.sapPst; /* flowCntrlInd is alloced in cell init time and will be re-used throughout */ @@ -2239,7 +1985,7 @@ RgInfSfAlloc *sfInfo; } } RgUiRguFlowCntrlInd(pst, cell->rguDlSap->sapCfg.spId,flowCntrlInd); /* TODO: Rishi confirm if the suId and pst pointer is correct */ - RETVALUE(ROK); + return ROK; } /** * @brief Function is called by the scheduler once it has completed the @@ -2268,13 +2014,13 @@ RgInfSfAlloc *sfInfo; * -# ROK **/ #ifdef ANSI -PUBLIC S16 RgSchMacSfAllocReq +S16 RgSchMacSfAllocReq ( Pst *pst, RgInfSfAlloc *sfInfo ) #else -PUBLIC S16 RgSchMacSfAllocReq(pst, sfInfo) +S16 RgSchMacSfAllocReq(pst, sfInfo) Pst *pst; RgInfSfAlloc *sfInfo; #endif @@ -2282,10 +2028,9 @@ RgInfSfAlloc *sfInfo; RgCellCb *cell; RgDlSf *dlSf; RgErrInfo err; - VOLATILE U32 startTime=0; + VOLATILE uint32_t startTime=0; Inst inst; - TRC2(RgSchMacSfAllocReq) RG_IS_INST_VALID(pst->dstInst); inst = pst->dstInst - RG_INST_START; @@ -2294,13 +2039,13 @@ RgInfSfAlloc *sfInfo; if(NULLP == sfInfo) { - RETVALUE(RFAILED); + return RFAILED; } if((cell = rgCb[inst].cell) == NULLP) { RLOG_ARG0(L_ERROR,DBG_CELLID,sfInfo->cellId, "No cellCb found with cell"); - RETVALUE(RFAILED); + return RFAILED; } dlSf = &cell->subFrms[(sfInfo->timingInfo.slot % RG_NUM_SUB_FRAMES)]; @@ -2342,7 +2087,7 @@ RgInfSfAlloc *sfInfo; if(rgHndlUlUeInfo(cell, sfInfo->ulUeInfo.timingInfo, &sfInfo->ulUeInfo) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } #endif #ifdef XEON_SPECIFIC_CHANGES @@ -2383,7 +2128,7 @@ RgInfSfAlloc *sfInfo; } /*stoping Task*/ SStopTask(startTime, PID_MAC_SF_ALLOC_REQ); - RETVALUE(ROK); + return ROK; } /* end of RgSchMacSfAllocReq */ /** * @brief Handler for processing data indication recieved from PHY for UEs. @@ -2422,7 +2167,7 @@ RgUeCb *prevUeCb, RgCellCb *cellCb, TfuDatInfo *datInfo, RgInfCeInfo *ceInfo, -U16 slot +uint16_t slot ) #else PRIVATE S16 rgTOMProcCrntiCEInDatInd( pdu, prevUeCb, cellCb, datInfo, ceInfo, slot) @@ -2431,7 +2176,7 @@ RgUeCb *prevUeCb; RgCellCb *cellCb; TfuDatInfo *datInfo; RgInfCeInfo *ceInfo; -U16 slot; +uint16_t slot; #endif { RgUeCb *ueCb = NULLP; @@ -2440,10 +2185,9 @@ U16 slot; #ifdef LTEMAC_SPS Bool spsToBeActvtd; - U16 sduSize; + uint16_t sduSize; #endif - TRC2(rgTOMProcCrntiCEInDatInd) #ifndef LTE_L2_MEAS UNUSED(slot); @@ -2455,7 +2199,7 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "RNTI:%d Received MSG3 with CRNTI,unable to find ueCb", ceInfo->ces.cRnti); - RETVALUE(RFAILED); + return RFAILED; } prevUeCb = rgDBMGetUeCb (cellCb, ceInfo->ces.cRnti); @@ -2463,7 +2207,7 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "RNTI:%d Received MSG3 with CRNTI,unable to find ueCb", ceInfo->ces.cRnti); - RETVALUE(RFAILED); + return RFAILED; } RLOG_ARG2(L_DEBUG,DBG_CELLID,cellCb->cellId, "CRNTI CE(%d) received through tmpCrnti(%d)", @@ -2479,9 +2223,9 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "RNTI:%d Processing for MSG3 failed",datInfo->rnti); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /** * @brief Handler for processing data indication recieved from PHY for UEs. @@ -2524,7 +2268,7 @@ RgUeCb *prevUeCb, RgCellCb *cellCb, TfuDatInfo *datInfo, RgInfCeInfo *ceInfo, -U16 slot +uint16_t slot ) #else PRIVATE S16 rgTOMProcCCCHSduInDatInd( pdu, prevUeCb, cellCb, datInfo, ceInfo, slot) @@ -2533,7 +2277,7 @@ RgUeCb *prevUeCb; RgCellCb *cellCb; TfuDatInfo *datInfo; RgInfCeInfo *ceInfo; -U16 slot; +uint16_t slot; #endif { RgUeCb *ueCb = NULLP; @@ -2541,11 +2285,10 @@ U16 slot; #ifdef LTEMAC_SPS Bool spsToBeActvtd; - U16 sduSize; + uint16_t sduSize; #endif - TRC2(rgTOMProcCCCHSduInDatInd) #ifndef LTE_L2_MEAS UNUSED(slot); @@ -2555,7 +2298,7 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "CRNTI:%d Received MSG3 with CCCH",ceInfo->ces.cRnti); - RETVALUE(RFAILED); + return RFAILED; } ueCb = rgDBMGetUeCbFromRachLst (cellCb, datInfo->rnti); @@ -2564,7 +2307,7 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId, "RNTI:%d Processing for MSG3 failed", datInfo->rnti); - RETVALUE(RFAILED); + return RFAILED; } /* Fix: syed Drop any duplicate Msg3(CCCH Sdu) */ if (ueCb->dl.hqEnt.numHqProcs) @@ -2572,7 +2315,7 @@ U16 slot; /* HqE is already initialized by a previuos Msg3 */ RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"RNTI:%d Processing for MSG3 failed. Duplicate " "MSG3 received. Dropping", datInfo->rnti); - RETVALUE(RFAILED); + return RFAILED; } if(rgDHMHqEntInit(inst,&ueCb->dl.hqEnt, @@ -2580,7 +2323,7 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"RNTI:%d Harq Initialization failed ", datInfo->rnti); - RETVALUE(RFAILED); + return RFAILED; } RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId, "CCCH SDU received through tmpCrnti(%d)",datInfo->rnti); @@ -2592,9 +2335,9 @@ U16 slot; { RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"RNTI:%d Processing for MSG3 failed", datInfo->rnti); - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } #ifdef LTE_L2_MEAS @@ -2627,9 +2370,8 @@ PRIVATE S16 rgTOMUtlL2MStoreBufSz (ueCb, ceInfo) RgInfCeInfo *ceInfo; #endif { - U8 lcgId; - U8 bsr; - TRC2(rgTOMUtlL2MStoreBufSz); + uint8_t lcgId; + uint8_t bsr; if(ceInfo->bitMask & RG_TRUNC_BSR_CE_PRSNT) { @@ -2651,7 +2393,7 @@ PRIVATE S16 rgTOMUtlL2MStoreBufSz (ueCb, ceInfo) ueCb->ul.lcgArr[2].lcgBsInfo.outStndngBs = rgLwrBsrTbl[ceInfo->ces.bsr.longBsr.bs3]; ueCb->ul.lcgArr[3].lcgBsInfo.outStndngBs = rgLwrBsrTbl[ceInfo->ces.bsr.longBsr.bs4]; } - RETVALUE(ROK); + return ROK; } /* end of rgTOMUtlL2MStoreBufSz*/ /** @brief : Compiles list of LCs received in UL data for DTCH RBs @@ -2687,7 +2429,6 @@ PRIVATE Void rgTOML2MCompileActiveLCs(cellCb, ueCb, pdu, ceInfo) RgMacSdu *sdu; RgUlLcCb *ulLcCb; - TRC2(rgTOML2MCompileActiveLCs) node = pdu->sduLst.first; while (node)