*******************************************************************************/
#ifdef EGTP_TEST
-
+#include "common_def.h"
#include "mac_stub.h"
uint8_t rlcDatSn = 0;
uint64_t ulDatNum = 0;
-PUBLIC S16 macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta)
+uint8_t macStubBOStatus(Pst *pst, SpId spId, RlcMacBOStatus *boSta)
{
Pst rspPst;
- RlcMacSchedRep *schRep;
+ RlcMacSchedRepInfo *schRep;
- DU_LOG("\nMAC_STUB : Received BO status from RLC");
+ DU_LOG("\nMAC : Received BO status from RLC");
// SGetSBuf(pst->region, pst->pool, (Data **)&rspPst, sizeof(Pst));
- rspPst.selector = RGU_SEL_TC;
+ rspPst.selector = ODU_SELECTOR_TC;
rspPst.srcEnt = pst->dstEnt;
rspPst.dstEnt = pst->srcEnt;
rspPst.dstInst = pst->srcInst;
rspPst.pool = pst->pool;
/* Filling Scheduling Report */
- KW_SHRABL_STATIC_BUF_ALLOC(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRep));
+ RLC_SHRABL_STATIC_BUF_ALLOC(pst->region, pst->pool, schRep, sizeof(RlcMacSchedRepInfo));
schRep->cellId = boSta->cellId;
schRep->rnti = boSta->rnti;
schRep->lchSta[0].lchStaInd.lcId = boSta->lcId;
schRep->lchSta[0].lchStaInd.totBufSize = boSta->bo + 5; /* Extra buffer space including RLC and MAC Header size */
- DU_LOG("\nMAC_STUB : Sending scheduling report to RLC");
+ DU_LOG("\nMAC : Sending scheduling report to RLC");
RlcMacProcSchedRep(&rspPst, 1, schRep);
}
-PUBLIC S16 macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData)
+uint8_t macStubSendDlData(Pst *pst, SpId spId, RlcMacData *dlData)
{
U32 availmem;
DU_LOG("\nMAC_STUB : Received DL data from RLC to be sent to PHY");
- SPutMsg(dlData->pduInfo[0].pduBuf);
+ ODU_PUT_MSG(dlData->pduInfo[0].pduBuf);
dlData->pduInfo[0].pduBuf = NULL;
#if 0
- KW_FREE_SHRABL_BUF(pst->region, pst->pool,
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool,
dlData, sizeof(RlcMacData));
{
- KW_ALLOC_SHRABL_BUF(pst->region, pst->pool,
+ RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool,
ulData, sizeof(RlcMacData));
SRegInfoShow(2, &availmem);
#endif
ulData = dlData;
- SGetMsg(pst->region, pst->pool, &mBuf);
+ ODU_GET_MSG(pst->region, pst->pool, &mBuf);
macStubBuildUlData(mBuf);
ulData->pduInfo[0].pduBuf = mBuf;
/* Fill response post */
- rspPst.selector = RGU_SEL_TC;
+ rspPst.selector = ODU_SELECTOR_TC;
rspPst.srcEnt = pst->dstEnt;
rspPst.dstEnt = pst->srcEnt;
rspPst.dstInst = pst->srcInst;
ulDatNum++;
DU_LOG("\nMAC_STUB : UL data number %d", ulDatNum);
- RlcMacProcUlData(&rspPst, 1, ulData);
+ RlcProcUlData(&rspPst, 1, ulData);
return ROK;
}
int datSize = 30;
U32 availmem;
- SAddPstMsgMult((Data *)data, datSize, mBuf);
+ ODU_ADD_POST_MSG_MULT((Data *)data, datSize, mBuf);
/* filling IPv4 header */
CmIpv4Hdr ipv4Hdr;
revPkArray[idx] = pkArray[CM_IPV4_HDRLEN - idx -1];
/* this function automatically reverses revPkArray */
- ret = SAddPreMsgMult(revPkArray, (MsgLen)cnt, mBuf);
+ ret = ODU_ADD_PRE_MSG_MULT(revPkArray, (MsgLen)cnt, mBuf);
- SAddPreMsgMult((Data *)&rlcDatSn, sizeof(uint8_t), mBuf);
+ ODU_ADD_PRE_MSG_MULT((Data *)&rlcDatSn, sizeof(uint8_t), mBuf);
#if 0
SRegInfoShow(0, &availmem);
SRegInfoShow(1, &availmem);