X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Fkw_ul_ex_ms.c;h=72b6301bd8c1f456d501117c559359aaa016890a;hb=aee73991f728cc127d1ed76d5a52571d916235a4;hp=0dbffd4346062ccf2d39d7e32a0fcde1dfb8e8f0;hpb=105199ef642ffe9736ea24a01d4546578fa25e60;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ul_ex_ms.c b/src/5gnrrlc/kw_ul_ex_ms.c index 0dbffd434..72b6301bd 100755 --- a/src/5gnrrlc/kw_ul_ex_ms.c +++ b/src/5gnrrlc/kw_ul_ex_ms.c @@ -57,11 +57,14 @@ static int RLOG_FILE_ID=206; #include "kw.x" #include "kw_ul.x" #include "kw_udx.x" + +#include "du_app_rlc_inf.h" + #ifdef TENB_STATS #include "l2_tenb_stats.x" #endif -PUBLIC S16 kwUlInitExt ARGS (( Void )); +PUBLIC S16 rlcUlInitExt ARGS (( Void )); /** * @@ -78,16 +81,16 @@ PUBLIC S16 kwUlInitExt ARGS (( Void )); */ #ifdef ANSI -PUBLIC S16 kwUlInitExt +PUBLIC S16 rlcUlInitExt ( ) #else -PUBLIC S16 kwUlInitExt() +PUBLIC S16 rlcUlInitExt() #endif { - TRC2(kwUlInitExt); + TRC2(rlcUlInitExt); - RETVALUE(ROK); + return ROK; } /* kwInitExt */ @@ -120,7 +123,7 @@ PUBLIC S16 kwUlInitExt() * */ #ifdef ANSI -PUBLIC S16 kwUlActvInit +PUBLIC S16 rlcUlActvInit ( Ent ent, /* entity */ Inst inst, /* instance */ @@ -128,60 +131,60 @@ Region region, /* region */ Reason reason /* reason */ ) #else -PUBLIC S16 kwUlActvInit(ent, inst, region, reason) +PUBLIC S16 rlcUlActvInit(ent, inst, region, reason) Ent ent; /* entity */ Inst inst; /* instance */ Region region; /* region */ Reason reason; /* reason */ #endif { - KwCb *tKwCb; - TRC3(kwDlActvInit) + RlcCb *tRlcCb; + TRC3(rlcUlActvInit) - if (inst >= KW_MAX_RLC_INSTANCES) + if (inst >= MAX_RLC_INSTANCES) { /* intance greater than MAX instances */ - RETVALUE(RFAILED); + return RFAILED; } - if (kwCb[inst] != NULLP) + if (rlcCb[inst] != NULLP) { - RETVALUE (RFAILED); + return (RFAILED); } - if (SGetSBuf(region, 0, (Data **)&tKwCb, - (Size)sizeof (KwCb)) != ROK) + if (SGetSBuf(region, 0, (Data **)&tRlcCb, + (Size)sizeof (RlcCb)) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } - /* Initialize kwCb */ - KW_MEM_SET(tKwCb, 0, sizeof(KwCb)); + /* Initialize rlcCb */ + RLC_MEM_SET(tRlcCb, 0, sizeof(RlcCb)); /* Initialize task configuration parameters */ - tKwCb->init.ent = ent; /* entity */ - tKwCb->init.inst = inst; /* instance */ - tKwCb->init.region = region; /* static region */ - tKwCb->init.pool = 0; /* static pool */ - tKwCb->init.reason = reason; /* reason */ - tKwCb->init.cfgDone = FALSE; /* configuration done */ - tKwCb->init.acnt = TRUE; /* enable accounting */ - tKwCb->init.usta = TRUE; /* enable unsolicited status */ - tKwCb->init.trc = FALSE; /* enable trace */ - tKwCb->init.procId = SFndProcId(); - - kwCb[inst] = tKwCb; + tRlcCb->init.ent = ent; /* entity */ + tRlcCb->init.inst = inst; /* instance */ + tRlcCb->init.region = region; /* static region */ + tRlcCb->init.pool = 0; /* static pool */ + tRlcCb->init.reason = reason; /* reason */ + tRlcCb->init.cfgDone = FALSE; /* configuration done */ + tRlcCb->init.acnt = TRUE; /* enable accounting */ + tRlcCb->init.usta = TRUE; /* enable unsolicited status */ + tRlcCb->init.trc = FALSE; /* enable trace */ + tRlcCb->init.procId = SFndProcId(); + + rlcCb[inst] = tRlcCb; /* call external function for intialization */ /* kwInitExt(); */ #ifdef TENB_STATS - TSL2AllocStatsMem(tKwCb->init.region, tKwCb->init.pool); + TSL2AllocStatsMem(tRlcCb->init.region, tRlcCb->init.pool); #endif - RETVALUE(ROK); -} /* kwActvInit */ + return ROK; +} /* rlcUlActvInit */ /** @@ -202,13 +205,13 @@ Reason reason; /* reason */ * */ #ifdef ANSI -PUBLIC S16 kwUlActvTsk +PUBLIC S16 rlcUlActvTsk ( Pst *pst, /* pst structure */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 kwUlActvTsk(pst, mBuf) +PUBLIC S16 rlcUlActvTsk(pst, mBuf) Pst *pst; /* pst structure */ Buffer *mBuf; /* message buffer */ #endif @@ -226,7 +229,7 @@ Buffer *mBuf; /* message buffer */ #ifdef LCLKW case LKW_EVT_CFG_REQ: { - ret = cmUnpkLkwCfgReq(KwMiLkwCfgReq, pst, mBuf); + ret = unpackRlcConfigReq(KwMiRlcConfigReq, pst, mBuf); break; } @@ -236,9 +239,9 @@ Buffer *mBuf; /* message buffer */ break; } - case RLC_EVT_UE_CREATE_REQ: /* UE Create Request */ + case EVENT_RLC_UL_UE_CREATE_REQ: /* UE Create Request */ { - ret = unpackUeCreateReq(RlcDuappProcUeCreateReq, pst, mBuf); + ret = unpackRlcUlUeCreateReq(RlcUlProcUeCreateReq, pst, mBuf); break; } @@ -275,8 +278,8 @@ Buffer *mBuf; /* message buffer */ #endif #endif /* LCLKW */ default: - SPutMsg(mBuf); - if (pst->dstInst < KW_MAX_RLC_INSTANCES) + ODU_PUT_MSG(mBuf); + if (pst->dstInst < MAX_RLC_INSTANCES) { RLOG1(L_FATAL,"Received Invalid Event[%d] from SM", pst->event); @@ -295,33 +298,33 @@ Buffer *mBuf; /* message buffer */ #ifdef LCUDX case UDX_EVT_BND_CFM: /* Bind request */ { - ret = cmUnpkUdxBndCfm(KwUlUdxBndCfm, pst, mBuf ); + ret = cmUnpkUdxBndCfm(rlcUlUdxBndCfm, pst, mBuf ); break; } case UDX_EVT_CFG_CFM: /* Unbind request */ { - ret = cmUnpkUdxCfgCfm(KwUlUdxCfgCfm, pst, mBuf ); + ret = cmUnpkUdxCfgCfm(rlcUlUdxCfgCfm, pst, mBuf ); break; } case UDX_EVT_UEIDCHG_CFM: /* Configuration request */ { - ret = cmUnpkUdxUeIdChgCfm(KwUlUdxUeIdChgCfm, pst, mBuf); + ret = cmUnpkUdxUeIdChgCfm(rlcUlUdxUeIdChgCfm, pst, mBuf); break; } case UDX_EVT_STA_PHBT_TMR_START: /* Status Prohibit Timer Start */ { - ret = cmUnpkUdxStaProhTmrStart(KwUlUdxStaProhTmrStart, pst, mBuf); + ret = cmUnpkUdxStaProhTmrStart(rlcUlUdxStaProhTmrStart, pst, mBuf); break; } #endif /* LCCKW */ default: - SPutMsg(mBuf); - if (pst->dstInst < KW_MAX_RLC_INSTANCES) + ODU_PUT_MSG(mBuf); + if (pst->dstInst < MAX_RLC_INSTANCES) { RLOG1(L_ERROR,"Received Invalid Event[%d] from RLC UL", pst->event); @@ -372,8 +375,8 @@ Buffer *mBuf; /* message buffer */ } #endif /* LCKWU */ default: - SPutMsg(mBuf); - if (pst->dstInst < KW_MAX_RLC_INSTANCES) + ODU_PUT_MSG(mBuf); + if (pst->dstInst < MAX_RLC_INSTANCES) { RLOG1(L_ERROR,"Received Invalid Event[%d] from RRC", pst->event); @@ -403,8 +406,8 @@ Buffer *mBuf; /* message buffer */ } default: - SPutMsg(mBuf); - if (pst->dstInst < KW_MAX_RLC_INSTANCES) + ODU_PUT_MSG(mBuf); + if (pst->dstInst < MAX_RLC_INSTANCES) { RLOG1(L_ERROR,"Received Invalid Event[%d] from PDCP", pst->event); @@ -429,15 +432,15 @@ Buffer *mBuf; /* message buffer */ case EVTRLCULDAT: /* Dedicated Channel Data request */ { - ret = unpackRcvdUlData(RlcMacProcUlData, pst, mBuf); + ret = unpackRcvdUlData(RlcProcUlData, pst, mBuf); break; } #endif /* LCRGU */ default: - SPutMsg(mBuf); - if (pst->dstInst < KW_MAX_RLC_INSTANCES) + ODU_PUT_MSG(mBuf); + if (pst->dstInst < MAX_RLC_INSTANCES) { RLOG1(L_ERROR,"Received Invalid Event[%d] from MAC", pst->event); @@ -454,8 +457,8 @@ Buffer *mBuf; /* message buffer */ { case KWU_EVT_TTI_IND: { - kwUlBatchProc(); - SPutMsg(mBuf); + rlcUlBatchProc(); + ODU_PUT_MSG(mBuf); break; } } @@ -471,18 +474,18 @@ Buffer *mBuf; /* message buffer */ case TENBSTATSINIT: { - KwCb *tKwCb; - tKwCb = KW_GET_KWCB(pst->dstInst); + RlcCb *tRlcCb; + tRlcCb = RLC_GET_RLCCB(pst->dstInst); - TSL2SendStatsToApp(&(tKwCb->genCfg.lmPst), 0); - SPutMsg(mBuf); + TSL2SendStatsToApp(&(tRlcCb->genCfg.lmPst), 0); + ODU_PUT_MSG(mBuf); break; } default: { printf("\n ERROR Invalid Event[%d] from CL to PDCPUL\n", pst->event); - SPutMsg(mBuf); + ODU_PUT_MSG(mBuf); break; } } @@ -492,18 +495,18 @@ Buffer *mBuf; /* message buffer */ #endif default: { - if (pst->dstInst < KW_MAX_RLC_INSTANCES) + if (pst->dstInst < MAX_RLC_INSTANCES) { RLOG1(L_ERROR, "Received Invalid Source Entity[%d]",pst->event); } - SPutMsg(mBuf); + ODU_PUT_MSG(mBuf); ret = RFAILED; break; } } - SExitTsk(); + ODU_EXIT_TASK(); - RETVALUE(ret); + return (ret); } /* kwActvTsk */