@brief This file has APIs to handle the random access procedure functionality.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_FILE_ID=132;
-static int RLOG_MODULE_ID=4096;
-
/* header include files (.h) */
-#include "envopt.h" /* environment options */
-#include "envdep.h" /* environment dependent */
-#include "envind.h" /* environment independent */
-
-#include "gen.h" /* general */
-#include "ssi.h" /* system services */
-
-#include "cm_tkns.h" /* Common Token Defines */
-#include "cm_llist.h" /* Common Link List Defines */
-#include "cm_hash.h" /* Common Hash List Defines */
-#include "cm_mblk.h" /* common memory link list library */
-#include "cm_lte.h" /* Common LTE */
-
+#include "common_def.h"
#include "rg_env.h" /* MAC Environment Defines */
#include "crg.h" /* CRG Interface defines */
#include "rgu.h" /* RGU Interface defines */
#include "rg_err.h" /* MAC error defines */
/* header/extern include files (.x) */
-#include "gen.x" /* general */
-#include "ssi.x" /* system services */
-#include "cm5.x" /* Timer */
-#include "cm_tkns.x" /* Common Token Definitions */
-#include "cm_llist.x" /* Common Link List Definitions */
-#include "cm_lib.x" /* Common Library Definitions */
-#include "cm_hash.x" /* Common Hash List Definitions */
-#include "cm_mblk.x" /* common memory link list library */
-#include "cm_lte.x" /* Common LTE */
#include "crg.x" /* CRG Interface includes */
#include "rgu.x" /* RGU Interface includes */
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC Void rgRAMFreeUeCb
-(
-Inst inst,
-RgUeCb *ue
-)
-#else
-PUBLIC Void rgRAMFreeUeCb(inst,ue)
-Inst inst;
-RgUeCb *ue;
-#endif
+Void rgRAMFreeUeCb(Inst inst,RgUeCb *ue)
{
- TRC2(rgRAMFreeUeCb);
-
rgDHMFreeUe(inst,&ue->dl.hqEnt);
/*ccpu00117052 - MOD - Passing double pointer for proper NULLP
rgFreeSBuf(inst,(Data **)&ue, sizeof(*ue));
/* Stack Crash problem for TRACE5 changes. Added the return below */
- RETVOID;
+ return;
} /* rgRAMFreeUeCb */
* @param[out] RgErrInfo *err
* @return RgUeCb*
**/
-#ifdef ANSI
-PUBLIC RgUeCb* rgRAMCreateUeCb
-(
-RgCellCb *cell,
-CmLteRnti tmpCrnti,
-Bool insert,
-RgErrInfo *err
-)
-#else
-PUBLIC RgUeCb* rgRAMCreateUeCb(cell, tmpCrnti, insert, err)
-RgCellCb *cell;
-CmLteRnti tmpCrnti;
-Bool insert;
-RgErrInfo *err;
-#endif
+RgUeCb* rgRAMCreateUeCb(RgCellCb *cell,CmLteRnti tmpCrnti,Bool insert,RgErrInfo *err)
{
Inst inst = cell->macInst - RG_INST_START;
RgUeCb *ueCb = NULLP;
- TRC2(rgRAMCreateUeCb)
-
- RLOG_ARG1(L_INFO,DBG_CELLID,cell->cellId,"CREATE UECB FOR CRNTI:%d",
+ DU_LOG("\nINFO --> MAC : CREATE UECB FOR CRNTI:%d",
tmpCrnti);
/* Allocate the Ue control block */
if (rgAllocSBuf(inst,(Data **)&ueCb, sizeof(*ueCb)) != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED for CRNTI:%d",tmpCrnti);
+ DU_LOG("\nERROR --> MAC : Memory allocation FAILED for CRNTI:%d",tmpCrnti);
err->errCause = RGERR_RAM_MEM_EXHAUST;
- RETVALUE(NULLP);
+ return (NULLP);
}
/* Inititialize Ue control block */
rgDBMInsUeCbInRachLst(cell, ueCb);
}
- RETVALUE(ueCb);
+ return (ueCb);
} /* rgRAMCreateUeCb */
/**
* @return S16
* -# ROK
**/
-#ifdef ANSI
-PUBLIC S16 rgRAMFreeCell
-(
-RgCellCb *cell
-)
-#else
-PUBLIC S16 rgRAMFreeCell(cell)
-RgCellCb *cell;
-#endif
+S16 rgRAMFreeCell(RgCellCb *cell)
{
Inst inst = cell->macInst - RG_INST_START;
RgUeCb *ueCb;
- TRC2(rgRAMFreeCell);
-
/* Free CURRENT CRG cfg list */
while ((ueCb = rgDBMGetNextUeCbFromRachLst(cell, NULLP)) != NULLP)
{
rgRAMFreeUeCb(inst,ueCb);
}
- RETVALUE(ROK);
+ return ROK;
} /* rgRAMFreeCell */
/**
* @brief Function for handling RA response scheduled for a subframe.
* @return S16
* -# ROK
**/
-#ifdef ANSI
-PUBLIC S16 rgHndlRaResp
-(
-RgCellCb *cell,
-CmLteTimingInfo timingInfo,
-RgInfRarInfo *rarInfo,
-RgErrInfo *err
-)
-#else
-PUBLIC S16 rgHndlRaResp(cell, timingInfo, rarInfo, err)
-RgCellCb *cell;
-CmLteTimingInfo timingInfo;
-RgInfRarInfo *rarInfo;
-RgErrInfo *err;
-#endif
+S16 rgHndlRaResp(RgCellCb *cell,CmLteTimingInfo timingInfo,RgInfRarInfo *rarInfo,RgErrInfo *err)
{
- U8 idx1,idx2;
+ uint8_t idx1,idx2;
Buffer *rarPdu;
RgDlSf *dlSf;
- U8 idx;
-
- TRC2(rgHndlRaResp)
+ uint8_t idx;
if(NULLP == rarInfo->raRntiInfo)
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
idx = (timingInfo.slot % RG_NUM_SUB_FRAMES);
rarInfo->raRntiInfo[idx1].crntiInfo[idx2].tmpCrnti,
TRUE, err) == NULLP)
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
}
}
}
else
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,"RARNTI:%d Creation of RAR"
+ DU_LOG("\nERROR --> MAC : RARNTI:%d Creation of RAR"
"PDU for failed", rarInfo->raRntiInfo[idx1].raRnti);
continue;
}
} /* end of raRntis loop */
- RETVALUE(ROK);
+ return ROK;
} /* end of rgHndlRaResp */
/**********************************************************************