#define RG_PACK_CE(_ce, _len, _ceBuf, _ret) {\
MS_BUF_ADD_ALLOC_CALLER(); \
#define RG_PACK_CE(_ce, _len, _ceBuf, _ret) {\
MS_BUF_ADD_ALLOC_CALLER(); \
_lenBytes = (_len <= 255) ? 1 : 2;\
_hdrLen = _lenBytes + RG_SDU_SHDR_LEN;\
_elmTotLen = _hdrLen + _len;\
_lenBytes = (_len <= 255) ? 1 : 2;\
_hdrLen = _lenBytes + RG_SDU_SHDR_LEN;\
_elmTotLen = _hdrLen + _len;\
}
RG_PACK_CE(pdu->contResId->resId[0], RG_CRES_LEN, ceBuf, ret);
}
RG_PACK_CE(pdu->contResId->resId[0], RG_CRES_LEN, ceBuf, ret);
RG_PACK_SHDR_FIXD_SZ(subHdr, RG_TA_LCID_IDX, ceBuf, ret);
if(ret != ROK)
{
err->errCause = RGERR_MUX_BLD_CEHDR_FAIL;
RG_PACK_SHDR_FIXD_SZ(subHdr, RG_TA_LCID_IDX, ceBuf, ret);
if(ret != ROK)
{
err->errCause = RGERR_MUX_BLD_CEHDR_FAIL;
SFndLenMsg(sdu, &msgLen);
RG_MUX_CALC_LEN(msgLen,lenBytes,elmTotLen);
SFndLenMsg(sdu, &msgLen);
RG_MUX_CALC_LEN(msgLen,lenBytes,elmTotLen);
- RLOG4(L_ERROR, "Failed lcId %u, elmTotLen %d lenBytes %d LCID:%d",
+ DU_LOG("\nERROR --> MAC : Failed lcId %u, elmTotLen %d lenBytes %d LCID:%d",
lcId, ((S16)elmTotLen), lenBytes,lcId);
lcId, ((S16)elmTotLen), lenBytes,lcId);
if(rgMUXInsSdu(inst,&pdu->schdTbSz,
RG_CCCH_LCID, cDatReq->pdu, sduBuf, err) != ROK)
{
if(rgMUXInsSdu(inst,&pdu->schdTbSz,
RG_CCCH_LCID, cDatReq->pdu, sduBuf, err) != ROK)
{
} /* End of switch(reqType) */
if(rgMUXAddPadd(inst,&pdu->schdTbSz, sduBuf, FALSE, err) != ROK)
{
} /* End of switch(reqType) */
if(rgMUXAddPadd(inst,&pdu->schdTbSz, sduBuf, FALSE, err) != ROK)
{
if (rgGetMsg(inst, &mBuf) != ROK)
{
/* Buffer couldnt get allocated. Return a failure */
err->errCause = RGERR_MUX_MEM_ALLOC_FAIL;
err->errType = RGERR_MUX_BLD_PDU;
if (rgGetMsg(inst, &mBuf) != ROK)
{
/* Buffer couldnt get allocated. Return a failure */
err->errCause = RGERR_MUX_MEM_ALLOC_FAIL;
err->errType = RGERR_MUX_BLD_PDU;
}
if(rgMUXAddCes(inst, pdu, mBuf, err) != ROK)
{
RG_FREE_MSG(mBuf);
err->errType = RGERR_MUX_BLD_PDU;
}
if(rgMUXAddCes(inst, pdu, mBuf, err) != ROK)
{
RG_FREE_MSG(mBuf);
err->errType = RGERR_MUX_BLD_PDU;
}
if(rgMUXAddSdus(inst, pdu, mBuf, err) != ROK)
{
RG_FREE_MSG(mBuf);
err->errType = RGERR_MUX_BLD_PDU;
}
if(rgMUXAddSdus(inst, pdu, mBuf, err) != ROK)
{
RG_FREE_MSG(mBuf);
err->errType = RGERR_MUX_BLD_PDU;
RG_CCCH_LCID, cDatReq->pdu,
sHdrBuf, NULLP, err) != ROK)
{
RG_CCCH_LCID, cDatReq->pdu,
sHdrBuf, NULLP, err) != ROK)
{
}
/* L2 Optimization for mUe/Tti: RLC pdu mbuf pointer will be passed
* to CL it is stored in DlHqProc->TbInfo and it will be used in
}
/* L2 Optimization for mUe/Tti: RLC pdu mbuf pointer will be passed
* to CL it is stored in DlHqProc->TbInfo and it will be used in
- RLOG3(L_INFO,"MSG4 is muxed numLch=%ld numPdu=%ld tbaddr =%p", tb->numLch,tb->lchInfo[tb->numLch-1].numPdu, (U32)tb);
+ DU_LOG("\nINFO --> MAC : MSG4 is muxed numLch=%ld numPdu=%ld tbaddr =%p",\
+ tb->numLch,tb->lchInfo[tb->numLch-1].numPdu, (uint32_t)tb);
datReqTb->lchData[idx1].pdu.mBuf[idx2],
sHdrBuf, NULLP, err) != ROK)
{
datReqTb->lchData[idx1].pdu.mBuf[idx2],
sHdrBuf, NULLP, err) != ROK)
{
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);
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);
datReqTb->lchData[idx1].pdu.mBuf[idx2],
sHdrBuf, NULLP, err) != ROK)
{
datReqTb->lchData[idx1].pdu.mBuf[idx2],
sHdrBuf, NULLP, err) != ROK)
{
- RGDBGERRNEW(inst,(rgPBuf(inst), "FAILED TB Size %d\n",
- ((S16)pdu->schdTbSz)));
- RETVALUE(RFAILED);
+ DU_LOG("\nERROR --> MAC : FAILED TB Size %d\n",
+ ((S16)pdu->schdTbSz));
+ return RFAILED;
}
/* L2 Optimization for mUe/Tti:Increment numPdu by 1
* Store pdu buffer in tb to send it to CL/PHY. Increment
}
/* L2 Optimization for mUe/Tti:Increment numPdu by 1
* Store pdu buffer in tb to send it to CL/PHY. Increment
if(rgMUXAddPadd(inst, &pdu->schdTbSz, sduBuf, NULLP, FALSE, err) != ROK)
{
//RGDBGERRNEW((rgPBuf, "FAILED"));
if(rgMUXAddPadd(inst, &pdu->schdTbSz, sduBuf, NULLP, FALSE, err) != ROK)
{
//RGDBGERRNEW((rgPBuf, "FAILED"));
if(rgMUXAddCes(inst, pdu, mBuf1, mBuf2, err) != ROK)
{
/* Reset rPtr and wPtr to the base of data buffer(db_base)*/
if(rgMUXAddCes(inst, pdu, mBuf1, mBuf2, err) != ROK)
{
/* Reset rPtr and wPtr to the base of data buffer(db_base)*/
RG_FREE_TB(tb);
err->errType = RGERR_MUX_BLD_PDU;
//RGDBGERRNEW((rgPBuf, "FAILED"));
RG_FREE_TB(tb);
err->errType = RGERR_MUX_BLD_PDU;
//RGDBGERRNEW((rgPBuf, "FAILED"));
}
if(rgMUXAddSdus(inst, pdu, mBuf1, tb, err) != ROK)
{
/*TODO:MP Reset rPtr and wPtr to the base of data buffer(db_base)
* Reset numLch and numPdu to zero and set MAC SDU buf to NULLP */
}
if(rgMUXAddSdus(inst, pdu, mBuf1, tb, err) != ROK)
{
/*TODO:MP Reset rPtr and wPtr to the base of data buffer(db_base)
* Reset numLch and numPdu to zero and set MAC SDU buf to NULLP */
RG_FREE_TB(tb);
err->errType = RGERR_MUX_BLD_PDU;
//RGDBGERRNEW((rgPBuf, "FAILED"));
RG_FREE_TB(tb);
err->errType = RGERR_MUX_BLD_PDU;
//RGDBGERRNEW((rgPBuf, "FAILED"));
}
// UDAY
// SPrntMsg(tb->macHdr, 0, 0);
// prc_trace_format_string(0x40,3,": padSize=%ld", tb->padSize);
tb->tbPres = TRUE;
}
// UDAY
// SPrntMsg(tb->macHdr, 0, 0);
// prc_trace_format_string(0x40,3,": padSize=%ld", tb->padSize);
tb->tbPres = TRUE;
- RLOG_ARG2(L_DEBUG,DBG_CELLID,cell->cellId,
- "Rar,Rapid=%d, Temp CRNTI:%d",
+ DU_LOG("\nDEBUG --> MAC : Rar,Rapid=%d, Temp CRNTI:%d",
alloc->crntiInfo[idx].rapId,
alloc->crntiInfo[idx].tmpCrnti);
MS_BUF_ADD_ALLOC_CALLER();
if(SAddPstMsgMult(&data[0], RG_RAR_ELEM_LEN, datBuf) != ROK)
{
err->errCause = RGERR_MUX_BLD_RAPID_FAIL;
alloc->crntiInfo[idx].rapId,
alloc->crntiInfo[idx].tmpCrnti);
MS_BUF_ADD_ALLOC_CALLER();
if(SAddPstMsgMult(&data[0], RG_RAR_ELEM_LEN, datBuf) != ROK)
{
err->errCause = RGERR_MUX_BLD_RAPID_FAIL;
if(rgMUXAddPadd(inst,&schdTbSz, datBuf, TRUE, err) != ROK)
{
RG_FREE_MSG(datBuf);
if(rgMUXAddPadd(inst,&schdTbSz, datBuf, TRUE, err) != ROK)
{
RG_FREE_MSG(datBuf);
- 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[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] = (msg3Grnt->iMcsCrnt >> 3);
/* Forcing right shift to insert 0 as the LSB:
* since this is assumed in the computation */