X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_ram.c;h=da2b5787a398cfda2ae0068a07ef9e19643c9e64;hb=5d74fef7c9fe6b65a965ceac6bfe812872dab323;hp=fbfd01f796301381a7d026687cb8d593bd3426bb;hpb=d1ead035ab3b543810f1838b2519904bf84477ec;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_ram.c b/src/5gnrmac/rg_ram.c index fbfd01f79..da2b5787a 100755 --- a/src/5gnrmac/rg_ram.c +++ b/src/5gnrmac/rg_ram.c @@ -37,19 +37,7 @@ 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 */ @@ -61,15 +49,6 @@ static int RLOG_MODULE_ID=4096; #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 */ @@ -78,7 +57,7 @@ static int RLOG_MODULE_ID=4096; #include "rg_prg.x" /* PRG Interface includes */ #include "lrg.x" /* LRG Interface includes */ -#include "mac_interface.h" +#include "du_app_mac_inf.h" #include "rg.x" /* MAC includes */ /* local defines */ @@ -104,19 +83,17 @@ static int RLOG_MODULE_ID=4096; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgRAMFreeUeCb +Void rgRAMFreeUeCb ( Inst inst, RgUeCb *ue ) #else -PUBLIC Void rgRAMFreeUeCb(inst,ue) +Void rgRAMFreeUeCb(inst,ue) Inst inst; RgUeCb *ue; #endif { - TRC2(rgRAMFreeUeCb); - rgDHMFreeUe(inst,&ue->dl.hqEnt); /*ccpu00117052 - MOD - Passing double pointer for proper NULLP @@ -144,7 +121,7 @@ RgUeCb *ue; * @return RgUeCb* **/ #ifdef ANSI -PUBLIC RgUeCb* rgRAMCreateUeCb +RgUeCb* rgRAMCreateUeCb ( RgCellCb *cell, CmLteRnti tmpCrnti, @@ -152,7 +129,7 @@ Bool insert, RgErrInfo *err ) #else -PUBLIC RgUeCb* rgRAMCreateUeCb(cell, tmpCrnti, insert, err) +RgUeCb* rgRAMCreateUeCb(cell, tmpCrnti, insert, err) RgCellCb *cell; CmLteRnti tmpCrnti; Bool insert; @@ -162,8 +139,6 @@ 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", tmpCrnti); /* Allocate the Ue control block */ @@ -172,7 +147,7 @@ RgErrInfo *err; RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId, "Memory allocation FAILED for CRNTI:%d",tmpCrnti); err->errCause = RGERR_RAM_MEM_EXHAUST; - RETVALUE(NULLP); + return (NULLP); } /* Inititialize Ue control block */ @@ -199,7 +174,7 @@ RgErrInfo *err; rgDBMInsUeCbInRachLst(cell, ueCb); } - RETVALUE(ueCb); + return (ueCb); } /* rgRAMCreateUeCb */ /** @@ -218,20 +193,18 @@ RgErrInfo *err; * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgRAMFreeCell +S16 rgRAMFreeCell ( RgCellCb *cell ) #else -PUBLIC S16 rgRAMFreeCell(cell) +S16 rgRAMFreeCell(cell) RgCellCb *cell; #endif { Inst inst = cell->macInst - RG_INST_START; RgUeCb *ueCb; - TRC2(rgRAMFreeCell); - /* Free CURRENT CRG cfg list */ while ((ueCb = rgDBMGetNextUeCbFromRachLst(cell, NULLP)) != NULLP) { @@ -239,7 +212,7 @@ RgCellCb *cell; rgRAMFreeUeCb(inst,ueCb); } - RETVALUE(ROK); + return ROK; } /* rgRAMFreeCell */ /** * @brief Function for handling RA response scheduled for a subframe. @@ -265,7 +238,7 @@ RgCellCb *cell; * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgHndlRaResp +S16 rgHndlRaResp ( RgCellCb *cell, CmLteTimingInfo timingInfo, @@ -273,7 +246,7 @@ RgInfRarInfo *rarInfo, RgErrInfo *err ) #else -PUBLIC S16 rgHndlRaResp(cell, timingInfo, rarInfo, err) +S16 rgHndlRaResp(cell, timingInfo, rarInfo, err) RgCellCb *cell; CmLteTimingInfo timingInfo; RgInfRarInfo *rarInfo; @@ -285,14 +258,12 @@ RgErrInfo *err; RgDlSf *dlSf; U8 idx; - TRC2(rgHndlRaResp) - if(NULLP == rarInfo->raRntiInfo) { - RETVALUE(RFAILED); + return RFAILED; } - idx = (timingInfo.subframe % RG_NUM_SUB_FRAMES); + idx = (timingInfo.slot % RG_NUM_SUB_FRAMES); dlSf = &cell->subFrms[idx]; /* Create RAR PDUs for all the allocated RA-RNTIs */ @@ -310,7 +281,7 @@ RgErrInfo *err; rarInfo->raRntiInfo[idx1].crntiInfo[idx2].tmpCrnti, TRUE, err) == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } } } @@ -335,7 +306,7 @@ RgErrInfo *err; continue; } } /* end of raRntis loop */ - RETVALUE(ROK); + return ROK; } /* end of rgHndlRaResp */ /**********************************************************************