X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_l2m.c;h=644a5eb35272aa1af01b1d59c2c9a103fb65ca1d;hb=de6a435729e3cad9d4a66329080b8206a64f452c;hp=71794cb85a726aedce3edd561484c3af96d3cd64;hpb=65443172dd60a6ea312bd3a15959dbf54ad7f045;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_l2m.c b/src/5gnrmac/rg_l2m.c index 71794cb85..644a5eb35 100755 --- a/src/5gnrmac/rg_l2m.c +++ b/src/5gnrmac/rg_l2m.c @@ -55,11 +55,6 @@ #include "du_app_mac_inf.h" #include "rg.x" /* MAC types */ -#ifdef LTE_L2_MEAS -static const char* RLOG_MODULE_NAME="MAC"; -static int RLOG_FILE_ID=183; -static int RLOG_MODULE_ID=4096; -#endif /* local defines */ #ifdef LTE_L2_MEAS @@ -93,7 +88,6 @@ static RgL2MeasCb * rgL2mAllocMeasCb ARGS(( * -# RFAILED * */ -#ifdef ANSI S16 rgL2mCreateMeasCb ( RgCellCb *cell, @@ -101,13 +95,6 @@ RgInfL2MeasReq *measInfo, uint8_t measType, RgErrInfo *err ) -#else -S16 rgL2mCreateMeasCb(cell, measInfo, measType, err) -RgCellCb *cell; -RgInfL2MeasReq *measInfo; -uint8_t measType; -RgErrInfo *err; -#endif { // Inst inst = cell->macInst - RG_INST_START; uint32_t idx; @@ -119,7 +106,7 @@ RgErrInfo *err; if ((measCb = rgL2mAllocMeasCb(cell, measInfo, err)) == NULLP) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"Allocation of RgL2MeasCb failed"); + DU_LOG("\nERROR --> MAC : Allocation of RgL2MeasCb failed"); return RFAILED; } //Memcpy is already done in rgL2mAllocMeasCb @@ -164,19 +151,12 @@ RgErrInfo *err; * @return S16 * -# ROK **/ -#ifdef ANSI S16 rgL2mMeasReq ( RgCellCb *cell, RgInfL2MeasReq *measInfo, RgErrInfo *err ) -#else -S16 rgL2mMeasReq(cell, measInfo, err) -RgCellCb *cell; -RgInfL2MeasReq *measInfo; -RgErrInfo *err; -#endif { S16 ret=RFAILED; @@ -199,17 +179,7 @@ RgErrInfo *err; * @param [in] RgCellCb *cell * @param [in] RgInfL2MeasCfm *measCfm */ -#ifdef ANSI -static Void rgSndL2MeasCfm -( -RgCellCb *cell, -RgInfL2MeasCfm *measCfm -) -#else -static Void rgSndL2MeasCfm (cell, measCfm) -RgCellCb *cell; -RgInfL2MeasCfm *measCfm; -#endif +static Void rgSndL2MeasCfm(RgCellCb *cell, RgInfL2MeasCfm *measCfm) { Pst pst; Inst macInst = cell->macInst - RG_INST_START; @@ -231,17 +201,7 @@ RgInfL2MeasCfm *measCfm; * @param [in] RgCellCb *cell * @param [in] RgInfL2MeasCfm *measCfm */ -#ifdef ANSI -static Void rgSndL2MeasStopCfm -( -RgCellCb *cell, -RgInfL2MeasCfm *measCfm -) -#else -static Void rgSndL2MeasStopCfm (cell, measCfm) -RgCellCb *cell; -RgInfL2MeasCfm *measCfm; -#endif +static Void rgSndL2MeasStopCfm(RgCellCb *cell,RgInfL2MeasCfm *measCfm) { Pst pst; Inst macInst = cell->macInst - RG_INST_START; @@ -267,17 +227,11 @@ RgInfL2MeasCfm *measCfm; * -# ROK * -# RFAILED **/ -#ifdef ANSI S16 RgSchMacL2MeasReq ( Pst *pst, /* post structure */ RgInfL2MeasReq *measInfo /* Meas Req Info */ ) -#else -S16 RgSchMacL2MeasReq(pst, measInfo) -Pst *pst; /* post structure */ -RgInfL2MeasReq *measInfo; /* Meas Req Info */ -#endif { Inst inst; RgCellCb *cellCb = NULLP; @@ -292,7 +246,7 @@ RgInfL2MeasReq *measInfo; /* Meas Req Info */ if ((cellCb == NULLP) || (cellCb->cellId != measInfo->cellId)) { - RLOG_ARG0(L_ERROR,DBG_CELLID,measInfo->cellId,"unable to get the cellCb"); + DU_LOG("\nERROR --> MAC : unable to get the cellCb"); return RFAILED; } /* Call L2M Function to store Meas req */ @@ -306,8 +260,7 @@ RgInfL2MeasReq *measInfo; /* Meas Req Info */ measCfm.cfm.reason = LCM_REASON_INVALID_PAR_VAL; measCfm.cfm.status = LCM_PRIM_NOK; rgSndL2MeasCfm(cellCb, &measCfm); - RLOG_ARG2(L_ERROR,DBG_CELLID,measInfo->cellId, - "Meas req Failed errType(%d) errCause(%d)", + DU_LOG("\nERROR --> MAC : Meas req Failed errType(%d) errCause(%d)", err.errType, err.errCause); return RFAILED; } @@ -328,17 +281,11 @@ RgInfL2MeasReq *measInfo; /* Meas Req Info */ * -# ROK * -# RFAILED **/ -#ifdef ANSI S16 RgSchMacL2MeasStopReq ( Pst *pst, /* post structure */ RgInfL2MeasStopReq *measInfo /* Meas Req Info */ ) -#else -S16 RgSchMacL2MeasStopReq(pst, measInfo) -Pst *pst; /* post structure */ -RgInfL2MeasStopReq *measInfo; /* Meas Req Info */ -#endif { S16 ret = ROK; CmLList *node = NULLP; @@ -357,8 +304,7 @@ RgInfL2MeasStopReq *measInfo; /* Meas Req Info */ (cellCb->cellId != measInfo->cellId)) { - RLOG_ARG0(L_ERROR,DBG_CELLID,measInfo->cellId, - "Unable to get the cellCb"); + DU_LOG("\nERROR --> MAC : Unable to get the cellCb"); return RFAILED; } node = cellCb->l2mList.first; @@ -398,17 +344,11 @@ RgInfL2MeasStopReq *measInfo; /* Meas Req Info */ * -# ROK * -# RFAILED **/ -#ifdef ANSI S16 RgSchMacL2MeasSendReq ( Pst *pst, /* post structure */ RgInfL2MeasSndReq *measInfo /* Meas Req Info */ ) -#else -S16 RgSchMacL2MeasSendReq(pst, measInfo) -Pst *pst; /* post structure */ -RgInfL2MeasSndReq *measInfo; /* Meas Req Info */ -#endif { Inst inst; RgCellCb *cellCb = NULLP; @@ -422,8 +362,7 @@ RgInfL2MeasSndReq *measInfo; /* Meas Req Info */ (cellCb->cellId != measInfo->cellId)) { - RLOG_ARG0(L_ERROR,DBG_CELLID,measInfo->cellId, - "Unable to get the cellCb"); + DU_LOG("\nERROR --> MAC : Unable to get the cellCb"); return RFAILED; } /*set sndL2Meas as applicatoin sent l2 meas info request*/ @@ -445,19 +384,12 @@ RgInfL2MeasSndReq *measInfo; /* Meas Req Info */ * -# ROK * -# RFAILED */ -#ifdef ANSI static S16 rgL2mInsertMeasCb ( RgCellCb *cell, RgL2MeasCb *measCb, RgInfL2MeasReq *measInfo ) -#else -static S16 rgL2mInsertMeasCb(cell, measCb, measInfo) -RgCellCb *cell; -RgL2MeasCb *measCb; -RgInfL2MeasReq *measInfo; -#endif { CmLList *lnk, *node; RgL2MeasCb *oldMeasCb; @@ -510,19 +442,12 @@ RgInfL2MeasReq *measInfo; * @param [out] RgErrInfo *err * @return RgSchL2MeasCb * */ -#ifdef ANSI static RgL2MeasCb * rgL2mAllocMeasCb ( RgCellCb *cell, RgInfL2MeasReq *measInfo, RgErrInfo *err ) -#else -static RgL2MeasCb * rgL2mAllocMeasCb(cell, measInfo, err) -RgCellCb *cell; -RgInfL2MeasReq *measInfo; -RgErrInfo *err; -#endif { RgL2MeasCb *measCb = NULLP; Inst inst = cell->macInst - RG_INST_START; @@ -531,8 +456,7 @@ RgErrInfo *err; if((rgAllocSBuf(inst,(Data **)&(measCb), sizeof(RgL2MeasCb))) == RFAILED) { - RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, - "Allocation of RgL2MeasCb failed"); + DU_LOG("\nERROR --> MAC : Allocation of RgL2MeasCb failed"); err->errType = RGERR_L2M_MEASREQ; err->errCause = RGERR_RAM_MEM_EXHAUST; return (NULLP); @@ -558,15 +482,7 @@ RgErrInfo *err; * -# ROK * -# RFAILED **/ -#ifdef ANSI -S16 rgL2Meas -( -RgCellCb *cell -) -#else -S16 rgL2Meas(cell) -RgCellCb *cell; -#endif +S16 rgL2Meas(RgCellCb *cell) { CmLList *node = NULLP; RgL2MeasCb *measCb = NULLP;