X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_com.c;h=6b55a6ad0682c87b62a27ae5ea7a35b522eb2e68;hb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;hp=4e15d764db71323f9f6f4c031432d1f4f7d47285;hpb=451e626d5ac7c7e7586bab23358161230449af46;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_com.c b/src/5gnrmac/rg_com.c index 4e15d764d..6b55a6ad0 100755 --- a/src/5gnrmac/rg_com.c +++ b/src/5gnrmac/rg_com.c @@ -36,44 +36,26 @@ invoked by RRC towards MAC. static const char* RLOG_MODULE_NAME="MAC"; static int RLOG_FILE_ID=181; static int RLOG_MODULE_ID=4096; + /* header include files -- defines (.h) */ -#include "envopt.h" /* environment options */ -#include "envdep.h" /* environment dependent */ -#include "envind.h" /* environment independent */ -#include "gen.h" /* general layer */ -#include "ssi.h" /* system service interface */ -#include "cm_hash.h" /* common hash list */ -#include "cm_mblk.h" /* common memory link list library */ -#include "cm_llist.h" /* common linked list library */ -#include "cm_err.h" /* common error */ -#include "cm_lte.h" /* common LTE */ +#include "common_def.h" +#include "tfu.h" +#include "du_app_mac_inf.h" #include "lrg.h" #include "crg.h" #include "rgu.h" -#include "tfu.h" #include "rg_sch_inf.h" -#include "rg_prg.h" /* PRG interface includes*/ #include "rg_env.h" #include "rg.h" #include "rg_err.h" /* header/extern include files (.x) */ -#include "gen.x" /* general layer */ -#include "ssi.x" /* system service interface */ -#include "cm5.x" /* common timers */ -#include "cm_lib.x" /* common library */ -#include "cm_hash.x" /* common hash list */ -#include "cm_mblk.x" /* common memory link list library */ -#include "cm_llist.x" /* common linked list library */ -#include "cm_tkns.x" /* common tokens */ -#include "cm_lte.x" /* common LTE */ +#include "tfu.x" #include "lrg.x" #include "crg.x" #include "rgu.x" -#include "tfu.x" #include "rg_sch_inf.x" #include "rg_prg.x" /* PRG interface typedefs*/ -#include "du_app_mac_inf.h" #include "rg.x" #ifdef LTE_ADV #include "rg_pom_scell.x" @@ -116,14 +98,14 @@ PRIVATE S16 rgCOMHndlResetReq ARGS((Inst inst,CrgRst *reset,RgErrInfo *errInfo)) * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgCOMCfgReq +S16 rgCOMCfgReq ( Inst inst, CrgCfgTransId transId, CrgCfgReqInfo *crgCfgReq ) #else -PUBLIC S16 rgCOMCfgReq(inst,transId, crgCfgReq) +S16 rgCOMCfgReq(inst,transId, crgCfgReq) Inst inst; CrgCfgTransId transId; CrgCfgReqInfo *crgCfgReq; @@ -188,7 +170,7 @@ if(TRUE == isCfmRqrd) } #endif RGDBGINFO(inst,(rgPBuf(inst), "CRG Configuration request processed\n")); - RETVALUE(ret); + return (ret); } /* rgCOMCfgReq */ /** * @brief Handler for processing Cell/Ue/Logical channel configuration request @@ -250,7 +232,7 @@ CrgCfgTransId transId; if (ret != ROK) { RLOG_ARG0(L_ERROR,DBG_CELLID,cfg->u.cellCfg.cellId, "Cell configuration validation FAILED\n"); - RETVALUE(RFAILED); + return RFAILED; } ret = rgCFGCrgCellCfg(inst,&cfg->u.cellCfg, errInfo); break; @@ -262,7 +244,7 @@ CrgCfgTransId transId; if (ret != ROK) { RLOG_ARG0(L_ERROR,DBG_CRNTI,cfg->u.ueCfg.crnti, "Ue configuration validation FAILED\n"); - RETVALUE(RFAILED); + return RFAILED; } ret = rgCFGCrgUeCfg(inst,cell, &cfg->u.ueCfg, errInfo); } @@ -277,7 +259,7 @@ CrgCfgTransId transId; RLOG_ARG1(L_ERROR,DBG_CELLID,cfg->u.cellCfg.cellId, "LC configuration validation FAILED: LC %d\n", cfg->u.lchCfg.lcId); - RETVALUE(RFAILED); + return RFAILED; } ret = rgCFGCrgLcCfg(inst,cell, ue, &cfg->u.lchCfg, errInfo,isCfmRqrd,transId); break; @@ -285,11 +267,11 @@ CrgCfgTransId transId; default: { RLOG1(L_ERROR, "Should never come here: cfgType %d",cfg->cfgType); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ret); + return (ret); } /* rgCOMHndlCfgReq */ @@ -355,7 +337,7 @@ Bool *isCfmRqrd; { RLOG_ARG0(L_ERROR,DBG_CELLID,recfg->u.cellRecfg.cellId, "Cell Recfg Validation FAILED"); - RETVALUE(RFAILED); + return RFAILED; } ret = rgCFGCrgCellRecfg(inst,cell, &recfg->u.cellRecfg, errInfo); break; @@ -380,7 +362,7 @@ Bool *isCfmRqrd; { RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Ue SCell configuration FAILED for inst [%d]\n", recfg->u.ueRecfg.oldCrnti, inst)); - RETVALUE(RFAILED); + return RFAILED; } } @@ -393,7 +375,7 @@ Bool *isCfmRqrd; RLOG_ARG1(L_ERROR,DBG_CELLID,recfg->u.ueRecfg.cellId, "Ue Re-configuration validation FAILED OLD CRNTI:%d", recfg->u.ueRecfg.oldCrnti); - RETVALUE(RFAILED); + return RFAILED; } ret = rgCFGCrgUeRecfg(inst,cell, ue, &recfg->u.ueRecfg, errInfo); } @@ -411,7 +393,7 @@ Bool *isCfmRqrd; RLOG_ARG2(L_ERROR,DBG_CELLID,recfg->u.lchRecfg.cellId, "LC Re-configuration validation FAILED LCID:%d CRNTI:%d", recfg->u.lchRecfg.lcId,recfg->u.lchRecfg.crnti); - RETVALUE(RFAILED); + return RFAILED; } #ifdef LTE_ADV @@ -428,11 +410,11 @@ Bool *isCfmRqrd; { RLOG1(L_ERROR, "Should never come here: recfgType %d", recfg->recfgType); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ret); + return (ret); } /* rgCOMHndlRecfgReq */ /*Start: LTEMAC_2.1_DEV_CFG */ @@ -477,7 +459,7 @@ RgErrInfo *errInfo; errInfo->errCause = RGERR_NONE; RGDBGINFO(inst,(rgPBuf(inst), "CRG UE Reset processed \n")); - RETVALUE(ROK); + return ROK; } /* rgCOMHndlResetReq */ /*End: LTEMAC_2.1_DEV_CFG */ @@ -560,11 +542,11 @@ CrgCfgTransId transId; { RLOG1(L_ERROR, "Should never come here: delType %d", del->delType); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ret); + return (ret); } /* rgCOMHndlDelReq */ #ifdef LTE_ADV @@ -589,13 +571,13 @@ CrgCfgTransId transId; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 RgPrgPMacSMacUeSCellCfgReq +S16 RgPrgPMacSMacUeSCellCfgReq ( Pst *pst, RgPrgUeSCellCfgInfo *ueSCellCb ) #else -PUBLIC S16 RgPrgPMacSMacUeSCellCfgReq(pst, ueSCellCb) +S16 RgPrgPMacSMacUeSCellCfgReq(pst, ueSCellCb) Pst *pst; RgPrgUeSCellCfgInfo *ueSCellCb; #endif @@ -643,7 +625,7 @@ RgPrgUeSCellCfgInfo *ueSCellCb; /* Send positive confirmation to primary cell*/ RgPrgSMacPMacCfg(&cfmPst, &cfgCfm); - RETVALUE(ROK); + return ROK; } /* RgPrgPMacSMacUeSCellCfgReq */ /** @@ -671,13 +653,13 @@ RgPrgUeSCellCfgInfo *ueSCellCb; * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 RgPrgSMacPMacCfgCfm +S16 RgPrgSMacPMacCfgCfm ( Pst *pst, RgPrgCfgCfmInfo *cfgCfm ) #else -PUBLIC S16 RgPrgSMacPMacCfgCfm(pst, cfgCfm) +S16 RgPrgSMacPMacCfgCfm(pst, cfgCfm) Pst *pst; RgPrgCfgCfmInfo *cfgCfm; #endif @@ -700,7 +682,7 @@ RgPrgCfgCfmInfo *cfgCfm; { RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]Ue does not exist\n", cfgCfm->ueId)); - RETVALUE(RFAILED); + return RFAILED; } switch(cfgCfm->event) { @@ -748,11 +730,11 @@ RgPrgCfgCfmInfo *cfgCfm; RGDBGERRNEW(inst,(rgPBuf(inst), "Invalid configuration confirm event %d\n", cfgCfm->event)); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } /* RgPrgSMacPMacCfgCfm */ /** @@ -771,13 +753,13 @@ RgPrgCfgCfmInfo *cfgCfm; * @return ROK is SUCCESS **/ #ifdef ANSI -PUBLIC S16 RgPrgPMacSMacUeSCellDelReq +S16 RgPrgPMacSMacUeSCellDelReq ( Pst *pst, RgPrgUeSCellDelInfo *ueSCellDelInfo ) #else -PUBLIC S16 RgPrgPMacSMacUeSCellDelReq(pst, ueSCellDelInfo) +S16 RgPrgPMacSMacUeSCellDelReq(pst, ueSCellDelInfo) Pst *pst; RgPrgUeSCellDelInfo *ueSCellDelInfo; #endif @@ -792,14 +774,14 @@ RgPrgUeSCellDelInfo *ueSCellDelInfo; * cell is already deleted for this cell*/ if(sCell == NULLP) { - RETVALUE(ROK); + return ROK; } /* Retrive the UeCb from sec cell*/ if ((sCellUe = rgDBMGetUeCb(sCell, ueSCellDelInfo->ueId)) == NULLP) { RGDBGERRNEW(inst, (rgPBuf(inst), "[%d]UE:does not exist in sCell(%d)\n", ueSCellDelInfo->ueId, sCell->cellId)); - RETVALUE(RFAILED); + return RFAILED; } /*PMAC_Reest: ueId and newRnti is different that means its a UeId change @@ -812,7 +794,7 @@ RgPrgUeSCellDelInfo *ueSCellDelInfo; { RGDBGERRNEW(inst, (rgPBuf(inst), "[%d]UE:UE context already exist in\ sCell(%d)",ueSCellDelInfo->newRnti, sCell->cellId)); - RETVALUE(RFAILED); + return RFAILED; } rgDBMDelUeCb(sCell, sCellUe); @@ -830,7 +812,7 @@ RgPrgUeSCellDelInfo *ueSCellDelInfo; rgCFGFreeUeCb(sCell, sCellUe); } - RETVALUE(ROK); + return ROK; } /* RgPrgPMacSMacUeSCellDelReq */ #endif /*LTE_ADV */ /**********************************************************************