#include "ss_msg.x" /* MAC includes */
/* local defines */
#ifndef T2K_MEM_LEAK_DBG
-EXTERN S16 ssGetDBufOfSize(Region region,Size size,Buffer **dBuf);
+ S16 ssGetDBufOfSize(Region region,Size size,Buffer **dBuf);
#else
char* file = __FILE__;
-U32 line = __LINE__;
+uint32_t line = __LINE__;
#endif
/* local typedefs */
/* global variables */
-U32 rgDlrate_rgu;
+uint32_t rgDlrate_rgu;
/* local externs */
-PRIVATE Void rgMUXGet20bitRarGrnt ARGS((U8 ulBw,
+static Void rgMUXGet20bitRarGrnt ARGS((uint8_t ulBw,
RgInfRarUlGrnt *msg3Grnt,
- U8 *grnt));
-EXTERN U16 rgMUXCalcRiv ARGS((U8 bw,
- U8 rbStart,
- U8 numRb));
+ uint8_t *grnt));
+uint16_t rgMUXCalcRiv ARGS((uint8_t bw,
+ uint8_t rbStart,
+ uint8_t numRb));
#ifndef MS_MBUF_CORRUPTION
#define MS_BUF_ADD_ALLOC_CALLER()
#define RG_PACK_CE(_ce, _len, _ceBuf, _ret) {\
MS_BUF_ADD_ALLOC_CALLER(); \
- _ret = SAddPstMsgMult((U8 *)(&(_ce)), _len, _ceBuf);\
+ _ret = SAddPstMsgMult((uint8_t *)(&(_ce)), _len, _ceBuf);\
}
#define RG_MUX_CALC_LEN(_len,_lenBytes,_elmTotLen) {\
- U8 _hdrLen;\
+ uint8_t _hdrLen;\
_lenBytes = (_len <= 255) ? 1 : 2;\
_hdrLen = _lenBytes + RG_SDU_SHDR_LEN;\
_elmTotLen = _hdrLen + _len;\
* -# RFAILED
**/
#ifdef ANSI
-PRIVATE S16 rgMUXAddCes
+static S16 rgMUXAddCes
(
Inst inst,
RgBldPduInfo *pdu,
RgErrInfo *err
)
#else
-PRIVATE S16 rgMUXAddCes(inst,pdu, ceShdrBuf, ceBuf, err)
+static S16 rgMUXAddCes(inst,pdu, ceShdrBuf, ceBuf, err)
Inst inst;
RgBldPduInfo *pdu;
Buffer *ceBuf;
S16 ret;
RgMUXSubHdr subHdr;
- TRC2(rgMUXAddCes)
-
if (NULLP != pdu->contResId)
{
if(pdu->schdTbSz >= RG_CRES_ELM_LEN)
{
if(pdu->schdTbSz >= RG_TA_ELM_LEN)
{
- U8 taVal; /* Moving from outer scope to available scope */
+ uint8_t taVal; /* Moving from outer scope to available scope */
RG_PACK_SHDR_FIXD_SZ(subHdr, RG_TA_LCID_IDX, ceBuf, ret);
if(ret != ROK)
*
* @param[in] Inst inst
* @param[in] MsgLen *schdTbSz
- * @param[in] U8 lcId
+ * @param[in] uint8_t lcId
* @param[in] Buffer *sdu
* @param[out] Buffer *sduBuf
* @param[out] RgErrInfo *err
* -# RFAILED
**/
#ifdef ANSI
-PRIVATE S16 rgMUXInsSdu
+static S16 rgMUXInsSdu
(
Inst inst,
MsgLen *schdTbSz,
-U8 lcId,
+uint8_t lcId,
Buffer *sdu,
Buffer *sduBuf,
RgErrInfo *err
)
#else
-PRIVATE S16 rgMUXInsSdu(inst,schdTbSz, lcId, sdu, sduBuf, err)
+static S16 rgMUXInsSdu(inst,schdTbSz, lcId, sdu, sduBuf, err)
Inst inst;
MsgLen *schdTbSz;
-U8 lcId;
+uint8_t lcId;
Buffer *sdu;
Buffer *sduBuf;
RgErrInfo *err;
{
S16 ret;
MsgLen msgLen = 0;
- U8 lenBytes;
+ uint8_t lenBytes;
MsgLen elmTotLen;
- TRC2(rgMUXInsSdu)
SFndLenMsg(sdu, &msgLen);
RG_MUX_CALC_LEN(msgLen,lenBytes,elmTotLen);
* -# RFAILED
**/
#ifdef L2_OPTMZ
-U32 padSize = 0;
+uint32_t padSize = 0;
#endif
#ifdef ANSI
-PUBLIC S16 rgMUXAddPadd
+S16 rgMUXAddPadd
(
Inst inst,
MsgLen *schdTbSz,
RgErrInfo *err
)
#else
-PUBLIC S16 rgMUXAddPadd(inst,schdTbSz, sduBuf, isRar, err)
+S16 rgMUXAddPadd(inst,schdTbSz, sduBuf, isRar, err)
Inst inst;
MsgLen *schdTbSz;
Buffer *sduBuf;
S16 ret = ROK;
Buffer *padBuf = NULLP;
RgMUXSubHdr subHdr;
- TRC2(rgMUXAddPadd)
#ifdef L2_OPTMZ
padSize = 0;
* -# RFAILED
**/
#ifdef ANSI
-PRIVATE S16 rgMUXAddSdus
+static S16 rgMUXAddSdus
(
Inst inst,
RgBldPduInfo *pdu,
RgErrInfo *err
)
#else
-PRIVATE S16 rgMUXAddSdus(inst,pdu, sduBuf, err)
+static S16 rgMUXAddSdus(inst,pdu, sduBuf, err)
Inst inst;
RgBldPduInfo *pdu;
Buffer *sduBuf;
RgRguDDatReqPerUe *dDatReq;
RgRguCmnDatReq *cDatReq;
- TRC2(rgMUXAddSdus)
-
switch(pdu->reqType)
{
case EVTRGUCDATREQ:
{
if(pdu->tbIndex == 1)
{
- U16 idx1, idx2;
+ uint16_t idx1, idx2;
/* Adding this temporary variable for optimization */
RguDatReqTb *datReqTb = &dDatReq->datReqTb[0];
}
else if(pdu->tbIndex == 2)
{
- U16 idx1, idx2;
+ uint16_t idx1, idx2;
RguDatReqTb *datReqTb = &dDatReq->datReqTb[1];
for (idx1=0; (idx1 < datReqTb->nmbLch); idx1++)
{
* -# RFAILED
**/
#ifdef ANSI
-PUBLIC S16 rgMUXBldPdu
+S16 rgMUXBldPdu
(
Inst inst,
RgBldPduInfo *pdu,
RgErrInfo *err
)
#else
-PUBLIC S16 rgMUXBldPdu(inst, pdu, txPdu, err)
+S16 rgMUXBldPdu(inst, pdu, txPdu, err)
Inst inst;
RgBldPduInfo *pdu;
Buffer **txPdu;
{
Buffer *mBuf = NULLP;
- TRC2(rgMUXBldPdu)
-
-
if (rgGetMsg(inst, &mBuf) != ROK)
{
/* Buffer couldnt get allocated. Return a failure */
* -# RFAILED
**/
#ifdef ANSI
-PRIVATE S16 rgMUXAddSdus
+static S16 rgMUXAddSdus
(
Inst inst,
RgBldPduInfo *pdu,
RgErrInfo *err
)
#else
-PRIVATE S16 rgMUXAddSdus(pdu, sHdrBuf, tb, err)
+static S16 rgMUXAddSdus(pdu, sHdrBuf, tb, err)
Inst inst;
RgBldPduInfo *pdu;
Buffer *sHdrBuf;
{
RgRguDDatReqPerUe *dDatReq;
RgRguCmnDatReq *cDatReq;
- U32 lchIdx, pduIdx;
-
- TRC2(rgMUXAddSdus)
+ uint32_t lchIdx, pduIdx;
switch(pdu->reqType)
{
= cDatReq->pdu;
tb->lchInfo[tb->numLch].numPdu++;
tb->numLch++;
- RLOG3(L_INFO,"MSG4 is muxed numLch=%ld numPdu=%ld tbaddr =%p", tb->numLch,tb->lchInfo[tb->numLch-1].numPdu, (U32)tb);
+ RLOG3(L_INFO,"MSG4 is muxed numLch=%ld numPdu=%ld tbaddr =%p", tb->numLch,tb->lchInfo[tb->numLch-1].numPdu, (uint32_t)tb);
}
break;
{
if(pdu->tbIndex == 1)
{
- U16 idx1, idx2;
+ uint16_t idx1, idx2;
/* Adding this temporary variable for optimization */
RguDatReqTb *datReqTb = &dDatReq->datReqTb[0];
}
else if(pdu->tbIndex == 2)
{
- U16 idx1, idx2;
+ uint16_t idx1, idx2;
RguDatReqTb *datReqTb = &dDatReq->datReqTb[1];
tb->numLch = lchIdx = 0;
// prc_trace_format_string(0x40,3,": AddSdus: numOfLch=%d numOfPdu=%d, schdSz=%d", datReqTb->nmbLch, datReqTb->lchData[0].pdu.numPdu, pdu->schdTbSz);
* -# RFAILED
**/
#ifdef ANSI
-PUBLIC S16 rgMUXBldPdu
+S16 rgMUXBldPdu
(
Inst inst,
RgBldPduInfo *pdu,
RgErrInfo *err
)
#else
-PUBLIC S16 rgMUXBldPdu(inst, pdu, tb, err)
+S16 rgMUXBldPdu(inst, pdu, tb, err)
Inst inst;
RgBldPduInfo *pdu;
RgTfuDatReqTbInfo *tb;
{
Buffer *mBuf1; /* MAC hearder */
Buffer *mBuf2; /* MAC CEs */
- //U32 lchIdx, pduIdx;
+ //uint32_t lchIdx, pduIdx;
- TRC2(rgMUXBldPdu)
-
/* Reseting macHdr and macCes pointers */
if(tb->macHdr)
SResetMBuf(tb->macHdr);
* -# RFAILED
**/
#ifdef ANSI
-PUBLIC S16 rgMUXBldRarPdu
+S16 rgMUXBldRarPdu
(
RgCellCb *cell,
RgInfRaRntiInfo *alloc,
RgErrInfo *err
)
#else
-PUBLIC S16 rgMUXBldRarPdu(cell, alloc, txPdu, err)
+S16 rgMUXBldRarPdu(cell, alloc, txPdu, err)
RgCellCb *cell;
RgInfRaRntiInfo *alloc;
Buffer **txPdu;
{
Buffer *datBuf = NULLP;
S16 ret;
- U8 data[RG_RAR_ELEM_LEN];
- U8 hdrByte;
+ uint8_t data[RG_RAR_ELEM_LEN];
+ uint8_t hdrByte;
MsgLen schdTbSz;
- U8 idx;
+ uint8_t idx;
Inst inst = cell->macInst - RG_INST_START;
- TRC2(rgMUXBldRarPdu)
-
schdTbSz = alloc->schdTbSz;
/* RAR PDU Requirements */
/*
{
rgMUXGet20bitRarGrnt(cell->bwCfg.ulTotalBw, &(alloc->crntiInfo[idx].grnt), &data[1]);
}
- data[1] |= ((U8)((alloc->crntiInfo[idx].ta.val) << 4));
+ data[1] |= ((uint8_t)((alloc->crntiInfo[idx].ta.val) << 4));
data[4] = (alloc->crntiInfo[idx].tmpCrnti) >> 8;
- data[5] = (U8) (alloc->crntiInfo[idx].tmpCrnti);
+ data[5] = (uint8_t) (alloc->crntiInfo[idx].tmpCrnti);
RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
"Rar,Rapid=%d, Temp CRNTI:%d",
*
**********************************************************/
#ifdef ANSI
-PRIVATE Void rgMUXGet20bitRarGrnt
+static Void rgMUXGet20bitRarGrnt
(
-U8 ulBw,
+uint8_t ulBw,
RgInfRarUlGrnt *msg3Grnt,
-U8 *grnt
+uint8_t *grnt
)
#else
-PRIVATE Void rgMUXGet20bitRarGrnt(ulBw, msg3Grnt, grnt)
-U8 ulBw;
+static Void rgMUXGet20bitRarGrnt(ulBw, msg3Grnt, grnt)
+uint8_t ulBw;
RgInfRarUlGrnt *msg3Grnt;
-U8 *grnt;
+uint8_t *grnt;
#endif
{
- U16 riv = rgMUXCalcRiv(ulBw, msg3Grnt->rbStart, msg3Grnt->numRb);
-
- TRC2(rgMUXGet20bitRarGrnt);
+ uint16_t riv = rgMUXCalcRiv(ulBw, msg3Grnt->rbStart, msg3Grnt->numRb);
grnt[2] = msg3Grnt->cqiBit; /* cqi bit is 0, output from sched */
grnt[2] |= (msg3Grnt->delayBit << 1);
grnt[1] = (msg3Grnt->iMcsCrnt >> 3);
/* Forcing right shift to insert 0 as the LSB:
* since this is assumed in the computation */
- grnt[1] |= (U8)((riv << 1) & 0xFE);
+ grnt[1] |= (uint8_t)((riv << 1) & 0xFE);
- grnt[0] = (U8)((riv >> 7) & 0x07);
+ grnt[0] = (uint8_t)((riv >> 7) & 0x07);
grnt[0] |= ((msg3Grnt->hop & 0x01) << 3);
- RETVOID;
+ return;
} /* rgMUXGet20bitRarGrnt */
/***********************************************************
*
**********************************************************/
#ifdef ANSI
-PUBLIC U16 rgMUXCalcRiv
+uint16_t rgMUXCalcRiv
(
-U8 bw,
-U8 rbStart,
-U8 numRb
+uint8_t bw,
+uint8_t rbStart,
+uint8_t numRb
)
#else
-PUBLIC U16 rgMUXCalcRiv(bw, rbStart, numRb)
-U8 bw;
-U8 rbStart;
-U8 numRb;
+uint16_t rgMUXCalcRiv(bw, rbStart, numRb)
+uint8_t bw;
+uint8_t rbStart;
+uint8_t numRb;
#endif
{
- U8 numRbMinus1 = numRb - 1;
- U16 riv;
-
- TRC2(rgMUXCalcRiv);
+ uint8_t numRbMinus1 = numRb - 1;
+ uint16_t riv;
if (numRbMinus1 <= bw/2)
{