X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=src%2F5gnrrlc%2Fkw_ptui.c;h=874b02edceb257c0bf23d055617b2d2728763a74;hb=2b5e7ba18453db526316b51476673c1ea69c1a94;hp=99e00b0437001b634057a1ddd81de0e5040e9279;hpb=5625a52ad68f6ad93684e68bbbdbaef0d462cf9a;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/kw_ptui.c b/src/5gnrrlc/kw_ptui.c index 99e00b043..874b02edc 100755 --- a/src/5gnrrlc/kw_ptui.c +++ b/src/5gnrrlc/kw_ptui.c @@ -37,18 +37,7 @@ static int RLOG_FILE_ID=199; /* header (.h) include files */ -#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 "cm5.h" /* common timer defines */ -#include "cm_tkns.h" /* common tokens defines */ -#include "cm_mblk.h" /* common memory allocation library defines */ -#include "cm_llist.h" /* common link list defines */ -#include "cm_hash.h" /* common hash list defines */ -#include "cm_lte.h" /* common LTE defines */ +#include "common_def.h" #include "lkw.h" /* LKW defines */ #include "ckw.h" /* CKW defines */ #include "kwu.h" /* KWU defines */ @@ -59,16 +48,6 @@ static int RLOG_FILE_ID=199; #include "kw.h" /* RLC defines */ /* extern (.x) include files */ -#include "gen.x" /* general */ -#include "ssi.x" /* system services */ - -#include "cm5.x" /* common timer library */ -#include "cm_tkns.x" /* common tokens */ -#include "cm_mblk.x" /* common memory allocation */ -#include "cm_llist.x" /* common link list */ -#include "cm_hash.x" /* common hash list */ -#include "cm_lte.x" /* common LTE includes */ -#include "cm_lib.x" /* common memory allocation library */ #include "lkw.x" /* LKW */ #include "ckw.x" /* CKW */ #include "kwu.x" /* KWU */ @@ -83,27 +62,8 @@ static int RLOG_FILE_ID=199; #include "mt_plat_t33.x" #endif -#ifndef LCKWUIKWU -#define PTKWKWU -#endif - -#ifndef LCKWUICKW -#define PTKWCKW -#endif - -#ifndef NH -#define PTKWKWU -#define PTKWCKW -#endif - -#ifndef PJ -#define PTKWKWU -#define PTKWCKW -#endif - - #ifdef __cplusplus -EXTERN "C" { +extern "C" { #endif /* __cplusplus */ @@ -111,99 +71,17 @@ EXTERN "C" { * Forward Declartion for KWU Porting Functions ********************************************************************/ #if defined(PDCP_RLC_DL_RBUF) || defined(SS_RBUF) -PUBLIC S16 kwDlBatchProc ARGS ((Void)); -PUBLIC S16 kwUtlDlFreeRlcRBuf ARGS((Void)); -EXTERN void kwUtlDlBatchProcHqStaInd ARGS ((Void)); -EXTERN Void kwUtlFreeDlMem ARGS((Void)); -EXTERN SsRngBufCnt rngCb; -EXTERN S16 kwUtlDlBatchProcPkts ARGS((Void)); +S16 rlcDlBatchProc ARGS ((Void)); +S16 rlcUtlDlFreeRlcRBuf ARGS((Void)); +void rlcUtlDlBatchProcHqStaInd ARGS ((Void)); +Void rlcUtlFreeDlMem ARGS((Void)); +SsRngBufCnt rngCb; +S16 rlcUtlDlBatchProcPkts ARGS((Void)); #endif #if (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF)) -PUBLIC S16 kwDlBatchProcSplit ARGS((Void)); -#endif - -#ifdef PTKWKWU -PRIVATE S16 PtUiKwuBndCfm ARGS (( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -)); - -#endif /* PTKWKWU */ - -PUBLIC S16 PtUiKwuDatCfm ARGS (( -Pst *pst, -SuId suId, -KwuDatCfmInfo *datCfm -)); - -PUBLIC S16 PtUiKwuStaInd ARGS (( -Pst *pst, -SuId suId, -KwuStaIndInfo *staInd -)); - -PUBLIC S16 PtUiKwuReEstCmpInd ARGS (( -Pst *pst, -SuId suId, -CmLteRlcId rlcId -)); -/* kw005.201 added support for L2 Measurement */ -PUBLIC S16 PtUiKwuDiscSduCfm ARGS(( -Pst *pst, -SuId suId, -KwuDiscSduInfo *discCfm -)); -PUBLIC S16 PtUiKwuFlowCntrlInd ARGS(( -Pst *pst, -SuId suId, -KwuFlowCntrlIndInfo *flowCntrlIndInfo -)); -#ifdef LTE_L2_MEAS -PUBLIC S16 PtUiKwuDatAckInd ARGS(( -Pst *pst, -SuId suId, -KwuDatAckInfo *datAckInd -)); +S16 rlcDlBatchProcSplit ARGS((Void)); #endif -#if (defined(PTKWKWU) || defined(KW_PDCP)) -PUBLIC S16 PtUiKwuDatInd ARGS (( -Pst *pst, -SuId suId, -KwuDatIndInfo *datInd, -Buffer *mBuf -)); -#endif /* PTKWKWU || KW_PDCP */ - - - -/********************************************************************* - * Forward Declartion for CKW Porting Functions - ********************************************************************/ -#ifdef PTKWCKW -PRIVATE S16 PtUiCkwBndCfm ARGS (( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -)); - -PUBLIC S16 PtUiCkwCfgCfm ARGS (( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -CkwCfgCfmInfo *cfmInfo /* Configuration Confirm */ -)); - -PUBLIC S16 PtUiCkwUeIdChgCfm ARGS(( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U32 transId, -CkwUeInfo *ueInfo, -CmStatus status -)); - -#endif /* PTKWCKW */ - /********************************************************************* @@ -212,194 +90,137 @@ CmStatus status /* KWU Bind Confirm primitive */ -PUBLIC KwuBndCfm kwUiKwuBndCfmMt[] = +KwuBndCfm kwUiKwuBndCfmMt[] = { #ifdef LCKWUIKWU cmPkKwuBndCfm, /* 0 - loosely coupled */ -#else - PtUiKwuBndCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ #ifdef NH NhLiKwuBndCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiKwuBndCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ #ifndef KW_PDCP #ifdef PJ PjLiKwuBndCfm, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuBndCfm, /* 2 - tightly coupled, portable */ #endif /* NH */ #endif /* KW_PDCP */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuBndCfm, /* 3 - light weight loosely coupled */ -#else - PtUiKwuBndCfm, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; /* KWU Data Indication primitive */ -PUBLIC KwuDatInd kwUiKwuDatIndMt[] = +KwuDatInd kwUiKwuDatIndMt[] = { #ifdef LCKWUIKWU cmPkKwuDatInd, /* 0 - loosely coupled */ -#else - PtUiKwuDatInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ #ifdef NH NhLiKwuDatInd, /* 1 - tightly coupled, RRC */ -#else - PtUiKwuDatInd, /* 1 - tightly coupled, portable */ #endif /* NH */ #ifdef KW_PDCP #else #ifdef PJ PjLiKwuDatInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDatInd, /* 2 - tightly coupled, portable */ #endif /* NH */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDatInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuDatInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ #endif /* KW_PDCP */ }; #ifndef KW_PDCP -PUBLIC KwuDatCfm kwUiKwuDatCfmMt[] = +KwuDatCfm kwUiKwuDatCfmMt[] = { #ifdef LCKWUIKWU cmPkKwuDatCfm, /* 0 - loosely coupled */ -#else - PtUiKwuDatCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuDatCfm, /* 1 - tightly coupled, portable */ #ifdef PJ PjLiKwuDatCfm, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDatCfm, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDatCfm, /* 3 - light weight loosely coupled */ -#else - PtUiKwuDatCfm, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; /* KWU AM Status Indication primitive */ -PUBLIC KwuStaInd kwUiKwuStaIndMt[] = +KwuStaInd kwUiKwuStaIndMt[] = { #ifdef LCKWUIKWU cmPkKwuStaInd, /* 0 - loosely coupled */ -#else - PtUiKwuStaInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuStaInd, /* 2 - tightly coupled, portable */ #ifdef PJ PjLiKwuStaInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuStaInd, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuStaInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuStaInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; -PUBLIC KwuReEstCmpInd kwUiKwuReEstCmpIndMt[] = +KwuReEstCmpInd kwUiKwuReEstCmpIndMt[] = { #ifdef LCKWUIKWU cmPkKwuReEstCmpInd, /* 0 - loosely coupled */ -#else - PtUiKwuReEstCmpInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuReEstCmpInd, /* 1 - loosely coupled, portable */ #ifdef PJ PjLiKwuReEstCmpInd, /* 2 - tightly coupled, PDCP */ #else - PtUiKwuReEstCmpInd, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuReEstCmpInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuReEstCmpInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; /* kw005.201 added support for L2 measurement */ -PUBLIC KwuDiscSduCfm kwUiKwuDiscSduCfmMt[] = +KwuDiscSduCfm kwUiKwuDiscSduCfmMt[] = { #ifdef LCKWUIKWU cmPkKwuDiscSduCfm, /* 0 - loosely coupled */ -#else - PtUiKwuDiscSduCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuDiscSduCfm, /* 1 - loosely coupled portable */ #ifdef PJ PjLiKwuDiscSduCfm, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDiscSduCfm, /* 2 - tightly coupled, PDCP */ #endif #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDiscSduCfm, /* 3 - light weight loosely coupled */ -#else - PtUiKwuDiscSduCfm, /* 3 - light weight loosely coupled, portable */ #endif /* PJ */ #endif /*TENB_ACC*/ }; -PUBLIC KwuFlowCntrlInd kwUiKwuFlowCntrlIndMt[] = +KwuFlowCntrlInd kwUiKwuFlowCntrlIndMt[] = { #ifdef LCKWUIKWU cmPkKwuFlowCntrlInd, /* 0 - loosely coupled */ -#else - PtUiKwuFlowCntrlInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuFlowCntrlInd, /* 1 - loosely coupled portable */ #ifdef PJ PjLiKwuFlowCntrlInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuFlowCntrlInd, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifdef LCKWUIKWU cmPkKwuFlowCntrlInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuFlowCntrlInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ }; #ifdef LTE_L2_MEAS -PUBLIC KwuDatAckInd kwUiKwuDatAckIndMt[] = +KwuDatAckInd kwUiKwuDatAckIndMt[] = { #ifdef LCKWUIKWU cmPkKwuDatAckInd, /* 0 - loosely coupled */ -#else - PtUiKwuDatAckInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuDatAckInd, /* 1 - loosely coupled, portable */ #ifdef PJ PjLiKwuDatAckInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDatAckInd, /* 1 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDatAckInd, /* 3 - light weight loosely coupled, portable */ -#else - PtUiKwuDatAckInd, /* 3 - light weight loosely coupled */ #endif /* PJ */ #endif /*TENB_ACC*/ }; @@ -432,28 +253,20 @@ PUBLIC KwuDatAckInd kwUiKwuDatAckIndMt[] = * -# ROK * */ -#ifdef ANSI -PUBLIC S16 KwUiKwuBndCfm +S16 RlcUiKwuBndCfm ( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* Status */ +Pst *pst, /* post structure */ +SuId suId, /* Service User Id */ +uint8_t status /* Status */ ) -#else -PUBLIC S16 KwUiKwuBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* Status */ -#endif { - TRC3(KwUiKwuBndCfm) /* jump to specific primitive depending on configured selector */ (*kwUiKwuBndCfmMt[pst->selector])(pst, suId, status); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuBndCfm */ +} /* end of RlcUiKwuBndCfm */ /** @@ -476,32 +289,22 @@ U8 status; /* Status */ * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuDatInd +S16 rlcSendUlDataToDu ( Pst *pst, -SuId suId, KwuDatIndInfo *datInd, Buffer *mBuf ) -#else -PUBLIC S16 KwUiKwuDatInd(pst, suId, datInd, mBuf) -Pst *pst; -SuId suId; -KwuDatIndInfo *datInd; -Buffer *mBuf; -#endif { - TRC3(KwUiKwuDatInd) /* jump to specific primitive depending on configured selector */ - (*kwUiKwuDatIndMt[pst->selector])(pst, suId, datInd, mBuf); + (*kwUiKwuDatIndMt[pst->selector])(pst, datInd, mBuf); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuDatInd */ +} /* end of rlcSendUlDataToDu */ - PUBLIC int rlcDatCfmsSent = 0; + int rlcDatCfmsSent = 0; #ifndef KW_PDCP /** @@ -523,29 +326,21 @@ Buffer *mBuf; * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuDatCfm +S16 RlcUiKwuDatCfm ( -Pst *pst, -SuId suId, -KwuDatCfmInfo *datCfm +Pst *pst, +SuId suId, +KwuDatCfmInfo *datCfm ) -#else -PUBLIC S16 KwUiKwuDatCfm(pst, suId, datCfm) -Pst *pst; -SuId suId; -KwuDatCfmInfo *datCfm; -#endif { rlcDatCfmsSent++; - TRC3(KwUiKwuDatCfm) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDatCfmMt[pst->selector])(pst, suId, datCfm); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuDatCfm */ +} /* end of RlcUiKwuDatCfm */ /** @@ -568,28 +363,20 @@ KwuDatCfmInfo *datCfm; * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuStaInd +S16 RlcUiKwuStaInd ( Pst *pst, SuId suId, KwuStaIndInfo *staInd ) -#else -PUBLIC S16 KwUiKwuStaInd(pst, suId, staInd) -Pst *pst; -SuId suId; -KwuStaIndInfo *staInd; -#endif { - TRC3(KwUiKwuStaInd) /* jump to specific primitive depending on configured selector */ (*kwUiKwuStaIndMt[pst->selector])(pst, suId, staInd); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuStaInd */ +} /* end of RlcUiKwuStaInd */ /** @@ -612,29 +399,21 @@ KwuStaIndInfo *staInd; * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuReEstCmpInd +S16 RlcUiKwuReEstCmpInd ( Pst *pst, SuId suId, CmLteRlcId rlcId ) -#else -PUBLIC S16 KwUiKwuReEstCmpInd(pst, suId, rlcId) -Pst *pst; -SuId suId; -CmLteRlcId rlcId; -#endif { - TRC3(KwUiKwuReEstCmpInd) - RLOG0(L_DEBUG, "In KwUiKwuReEstCmpInd"); + RLOG0(L_DEBUG, "In RlcUiKwuReEstCmpInd"); /* jump to specific primitive depending on configured selector */ (*kwUiKwuReEstCmpIndMt[pst->selector])(pst, suId, rlcId); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuReEstCmpInd */ +} /* end of RlcUiKwuReEstCmpInd */ /* kw005.201 added support for L2 Measurement */ /** @@ -655,28 +434,20 @@ CmLteRlcId rlcId; * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuDiscSduCfm +S16 RlcUiKwuDiscSduCfm ( Pst *pst, SuId suId, KwuDiscSduInfo *discCfm ) -#else -PUBLIC S16 KwUiKwuDiscSduCfm(pst, suId, discCfm) -Pst *pst; -SuId suId; -KwuDiscSduInfo *discCfm; -#endif { - TRC3(KwUiKwuDiscSduCfm) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDiscSduCfmMt[pst->selector])(pst, suId, discCfm); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuDiscSduCfm */ +} /* end of RlcUiKwuDiscSduCfm */ /** * @@ -697,28 +468,15 @@ KwuDiscSduInfo *discCfm; * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuFlowCntrlInd -( -Pst *pst, -SuId suId, -KwuFlowCntrlIndInfo *flowCntrlIndInfo -) -#else -PUBLIC S16 KwUiKwuFlowCntrlInd(pst, suId, flowCntrlIndInfo) -Pst *pst; -SuId suId; -KwuFlowCntrlIndInfo *flowCntrlIndInfo; -#endif +S16 RlcUiKwuFlowCntrlInd(Pst *pst,SuId suId,KwuFlowCntrlIndInfo *flowCntrlIndInfo) { - TRC3(KwUiKwuFlowCntrlInd) /* jump to specific primitive depending on configured selector */ (*kwUiKwuFlowCntrlIndMt[pst->selector])(pst, suId, flowCntrlIndInfo); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuFlowCntrlInd */ +} /* end of RlcUiKwuFlowCntrlInd */ #ifdef LTE_L2_MEAS /** @@ -739,439 +497,18 @@ KwuFlowCntrlIndInfo *flowCntrlIndInfo; * -# ROK * -# RFAILED */ -#ifdef ANSI -PUBLIC S16 KwUiKwuDatAckInd -( -Pst *pst, -SuId suId, -KwuDatAckInfo *datAckInd -) -#else -PUBLIC S16 KwUiKwuDatAckInd(pst, suId, datAckInd) -Pst *pst; -SuId suId; -KwuDatAckInfo *datAckInd; -#endif +S16 RlcUiKwuDatAckInd(Pst *pst,SuId suId,KwuDatAckInfo *datAckInd) { - TRC3(KwUiKwuDatAckInd) /* jump to specific primitive depending on configured selector */ (*kwUiKwuDatAckIndMt[pst->selector])(pst, suId, datAckInd); - RETVALUE(ROK); + return ROK; -} /* end of KwUiKwuDatAckInd */ +} /* end of RlcUiKwuDatAckInd */ #endif /* LTE_L2_MEAS */ #endif /* KW_PDCP */ - -#ifdef PTKWKWU -/************************************************************************* - * KWU Porting Functions - ************************************************************************/ -/** - * - * @brief - * - * PtUiKwuBndCfm - Portable SAP bind confirm - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] status - Status - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PRIVATE S16 PtUiKwuBndCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -) -#else -PRIVATE S16 PtUiKwuBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* status */ -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuBndCfm); - - UNUSED(suId); - UNUSED(status); -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); -} /* end of PtUiKwuBndCfm */ -#endif /* PTKWKWU */ - - -/** - * - * @brief - * - * PtUiKwuDatCfm - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] datCfm - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDatCfm -( -Pst *pst, -SuId suId, -KwuDatCfmInfo *datCfm -) -#else -PUBLIC S16 PtUiKwuDatCfm(pst, suId, datCfm) -Pst *pst; -SuId suId; -KwuDatCfmInfo *datCfm; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDatCfm) - - UNUSED(pst); - UNUSED(suId); - UNUSED(datCfm); -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuDatCfm */ - - -/** - * - * @brief - * - * PtUiKwuStaInd - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] staInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuStaInd -( -Pst *pst, -SuId suId, -KwuStaIndInfo *staInd -) -#else -PUBLIC S16 PtUiKwuStaInd(pst, suId, staInd) -Pst *pst; -SuId suId; -KwuStaIndInfo *staInd; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuStaInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(staInd); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuStaInd */ - - -/** - * - * @brief - * - * PtUiKwuReEstCmpInd - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] staInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuReEstCmpInd -( -Pst *pst, -SuId suId, -CmLteRlcId rlcId -) -#else -PUBLIC S16 PtUiKwuReEstCmpInd(pst, suId, rlcId) -Pst *pst; -SuId suId; -CmLteRlcId rlcId; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuReEstCmpInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(rlcId); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuReEstCmpInd */ - -/* kw005.201 added support for L2 Measurement */ -/* - * @brief - * - * PtUiKwuDiscSduCfm - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] staInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDiscSduCfm -( -Pst *pst, -SuId suId, -KwuDiscSduInfo *discCfm -) -#else -PUBLIC S16 PtUiKwuDiscSduCfm(pst, suId, discCfm) -Pst *pst; -SuId suId; -KwuDiscSduInfo *discCfm; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDiscSduCfm) - - UNUSED(pst); - UNUSED(suId); - UNUSED(discCfm); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuDiscSduCfm */ - -/* - * @brief - * - * PtUiKwuFlowCntrlInd - Portable Flow control idication - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] flowCntrlInd - Flow control information - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuFlowCntrlInd -( -Pst *pst, -SuId suId, -KwuFlowCntrlIndInfo *flowCntrlIndInfo -) -#else -PUBLIC S16 PtUiKwuFlowCntrlInd(pst, suId, flowCntrlIndInfo) -Pst *pst; -SuId suId; -KwuFlowCntrlIndInfo *flowCntrlIndInfo; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuFlowCntrlInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(flowCntrlIndInfo); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuFlowCntrlInd */ -#ifdef LTE_L2_MEAS - -/** - * - * @brief - * - * Handler for sending the Data ack indication to the upper layer. - * - * @b Description: - * - * This function confirms the succesfull transmission of SDU - * - * @param[in] pst Post structure - * @param[in] suId Service User SAP ID - * @param[in] datAckInd DatAckInd - * - * @return S16 - * -# ROK - * -# RFAILED - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDatAckInd -( -Pst *pst, -SuId suId, -KwuDatAckInfo *datAckInd -) -#else -PUBLIC S16 PtUiKwuDatAckInd(pst, suId, datAckInd) -Pst *pst; -SuId suId; -KwuDatAckInfo *datAckInd; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDatAckInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(datAckInd); -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - RETVALUE(ROK); -}/* end of PtUiKwuDatAckInd */ -#endif /* LTE_L2_MEAS */ -#if (defined(PTKWKWU) || defined(KW_PDCP)) - -/** - * - * @brief - * - * PtUiKwuDatInd - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] datInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDatInd -( -Pst *pst, -SuId suId, -KwuDatIndInfo *datInd, -Buffer *mBuf -) -#else -PUBLIC S16 PtUiKwuDatInd(pst, suId, datInd, mBuf) -Pst *pst; -SuId suId; -KwuDatIndInfo *datInd; -Buffer *mBuf; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDatInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(datInd); - UNUSED(mBuf); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuDatInd */ -#endif /* PTKWKWU || KW_PDCP */ - /********************************************************************* @@ -1180,47 +517,35 @@ Buffer *mBuf; /* CKW Bind Confirm primitive */ -PUBLIC CkwBndCfm kwUiCkwBndCfmMt[] = +CkwBndCfm kwUiCkwBndCfmMt[] = { #ifdef LCKWUICKW cmPkCkwBndCfm, /* 0 - loosely coupled */ -#else - PtUiCkwBndCfm, /* 0 - loosely coupled, portable */ #endif /* LCCKUICKW */ #ifdef NH NhLiCkwBndCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiCkwBndCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ }; /* CKW Configuration confirm primitive */ -PUBLIC CkwCfgCfm kwUiCkwCfgCfmMt[] = +RlcCfgCfm kwUiRlcCfgCfmMt[] = { #ifdef LCKWUICKW - cmPkCkwCfgCfm, /* 0 - loosely coupled */ -#else - PtUiCkwCfgCfm, /* 0 - loosely coupled, portable */ + cmPkRlcCfgCfm, /* 0 - loosely coupled */ #endif /* LCKWUICKW */ #ifdef NH - NhLiCkwCfgCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiCkwCfgCfm, /* 1 - tightly coupled, portable */ + NhLiRlcCfgCfm, /* 1 - tightly coupled, RRC */ #endif /* NH */ }; -PUBLIC CkwUeIdChgCfm kwUiCkwUeIdChgCfmMt[] = +CkwUeIdChgCfm kwUiCkwUeIdChgCfmMt[] = { #ifdef LCKWUICKW cmPkCkwUeIdChgCfm, /* 0 - loosely coupled */ -#else - PtUiCkwUeIdChgCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUICKW */ #ifdef NH NhLiCkwUeIdChgCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiCkwUeIdChgCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ }; @@ -1248,28 +573,20 @@ PUBLIC CkwUeIdChgCfm kwUiCkwUeIdChgCfmMt[] = * @return S16 * -# ROK */ -#ifdef ANSI -PUBLIC S16 KwUiCkwBndCfm +S16 RlcUiCkwBndCfm ( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* Status */ +Pst *pst, /* post structure */ +SuId suId, /* Service User Id */ +uint8_t status /* Status */ ) -#else -PUBLIC S16 KwUiCkwBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* Status */ -#endif { - TRC3(KwUiCkwBndCfm) /* jump to specific primitive depending on configured selector */ (*kwUiCkwBndCfmMt[pst->selector])(pst, suId, status); - RETVALUE(ROK); + return ROK; -} /* end of KwUiCkwBndCfm */ +} /* end of RlcUiCkwBndCfm */ /** @@ -1292,28 +609,20 @@ U8 status; /* Status */ * -# ROK * */ -#ifdef ANSI -PUBLIC S16 KwUiCkwCfgCfm +S16 RlcUiRlcCfgCfm ( Pst *pst, /* post structure */ SuId suId, /* Service User Id */ -CkwCfgCfmInfo *cfmInfo /* Configuration Confirm */ +RlcCfgCfmInfo *cfmInfo /* Configuration Confirm */ ) -#else -PUBLIC S16 KwUiCkwCfgCfm(pst, suId, cfmInfo) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -CkwCfgCfmInfo *cfmInfo; /* Configuration Confirm */ -#endif { - TRC3(KwUiCkwCfgCfm) /* jump to specific primitive depending on configured selector */ - (*kwUiCkwCfgCfmMt[pst->selector])(pst, suId, cfmInfo); + (*kwUiRlcCfgCfmMt[pst->selector])(pst, suId, cfmInfo); - RETVALUE(ROK); + return ROK; -} /* end of KwUiCkwCfgCfm */ +} /* end of RlcUiRlcCfgCfm */ /** @@ -1336,209 +645,46 @@ CkwCfgCfmInfo *cfmInfo; /* Configuration Confirm */ * -# ROK * */ -#ifdef ANSI -PUBLIC S16 KwUiCkwUeIdChgCfm +S16 RlcUiCkwUeIdChgCfm ( Pst *pst, /* post structure */ SuId suId, /* Service User Id */ -U32 transId, +uint32_t transId, CkwUeInfo *ueInfo, CmStatus status ) -#else -PUBLIC S16 KwUiCkwUeIdChgCfm(pst, suId, transId,ueInfo,status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U32 transId; -CkwUeInfo *ueInfo; -CmStatus status; -#endif { - TRC3(KwUiCkwUeIdChgCfm) /* jump to specific primitive depending on configured selector */ (*kwUiCkwUeIdChgCfmMt[pst->selector])(pst, suId, transId, ueInfo, status); - RETVALUE(ROK); - -} /* end of KwUiCkwCfgCfm */ - - -#ifdef PTKWCKW -/************************************************************************* - * CKW Porting Functions - ************************************************************************/ -/** - * - * @brief - * - * KwUiCkwBndCfm - CKW SAP bind confirm - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] status - Status - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PRIVATE S16 PtUiCkwBndCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -) -#else -PRIVATE S16 PtUiCkwBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* status */ -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiCkwBndCfm); - - UNUSED(pst); - UNUSED(suId); - UNUSED(status); + return ROK; -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ +} /* end of RlcUiRlcCfgCfm */ - RETVALUE(ROK); -} /* end of PtUiCkwBndCfm */ - - -/** - * - * @brief - * - * PtUiCkwCfgCfm - KWU SAP bind confirm - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] cfmInfo - Configuration confirm - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiCkwCfgCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -CkwCfgCfmInfo *cfmInfo /* Configuration Confirm */ -) -#else -PUBLIC S16 PtUiCkwCfgCfm(pst, suId, cfmInfo) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -CkwCfgCfmInfo *cfmInfo; /* Configuration Confirm */ -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiCkwCfgCfm); - - UNUSED(pst); - UNUSED(suId); - UNUSED(cfmInfo); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiCkwCfgCfm */ - -#ifdef ANSI -PUBLIC S16 PtUiCkwUeIdChgCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U32 transId, -CkwUeInfo *ueInfo, -CmStatus status -) -#else -PUBLIC S16 PtUiCkwUeIdChgCfm(pst, suId,transId,ueInfo,status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U32 transId; -CkwUeInfo *ueInfo; -CmStatus status; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiCkwUeIdChgCfm); - - UNUSED(pst); - UNUSED(suId); - UNUSED(transId); - UNUSED(ueInfo); - UNUSED(status); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiCkwUeIdChgCfm */ -#endif /* PTKWCKW */ #if (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF)) /** * * @brief * - * kwDlBatchProcSplit- process rbug messages + * rlcDlBatchProcSplit- process rbug messages * * @return S16 * -# ROK */ -#ifdef ANSI -PUBLIC S16 kwDlBatchProcSplit -( -Void -) -#else -PUBLIC S16 kwDlBatchProcSplit() -Void; -#endif +S16 rlcDlBatchProcSplit(Void) { /* Read from Ring Buffer and process PDCP packets */ Void *elmIndx = NULLP; RxmBufReq *datReq = NULLP; #ifdef LTE_ADV - U32 dlPktCount = 0; + uint32_t dlPktCount = 0; #endif - U8 rngBufDeqIndx = 0; - U32 rngBufDeqMaxCnt; - U32 rngBufCurrCnt; + uint8_t rngBufDeqIndx = 0; + uint32_t rngBufDeqMaxCnt; + uint32_t rngBufCurrCnt; rngBufDeqMaxCnt = SS_RNG_MAX_DLPDCP_TO_DLRLC_DQ_CNT; #ifdef TENB_T2K3K_SPECIFIC_CHANGES @@ -1562,13 +708,13 @@ Void; datReq = (RxmBufReq *)elmIndx; if(datReq->mBuf != NULLP) { - cmUnpkKwuDatReq(KwUiKwuDatReq, &datReq->pst, datReq->mBuf); + cmUnpkKwuDatReq(rlcProcDlData, &datReq->pst, datReq->mBuf); } else { RLOG0(L_ERROR, "mBuf is NULL"); if(datReq->mBuf) - cmUnpkKwuDatReq(KwUiKwuDatReq, &datReq->pst, datReq->mBuf); + cmUnpkKwuDatReq(rlcProcDlData, &datReq->pst, datReq->mBuf); } SsRngInfoTbl[SS_RNG_BUF_RX_TO_DLRLC].nPktProc++;//Number of pkt processed in tti @@ -1594,34 +740,26 @@ Void; } } - RETVALUE(ROK); + return ROK; } #endif #if defined(PDCP_RLC_DL_RBUF) || defined(SS_RBUF) -#ifdef ANSI -PUBLIC S16 kwDlBatchProc -( -Void -) -#else -PUBLIC S16 kwDlBatchProc() -Void; -#endif +S16 rlcDlBatchProc(Void) { /* Read from Ring Buffer and process PDCP packets */ - U8 rngBufDeqIndx = 0; - U32 rngBufDeqMaxCnt; + uint8_t rngBufDeqIndx = 0; + uint32_t rngBufDeqMaxCnt; #ifdef TENB_T2K3K_SPECIFIC_CHANGES - U32 rngBufCurrCnt; + uint32_t rngBufCurrCnt; #endif /* Memory regions different for BRCM and Intel */ /*dstProcId,srcProcId,dstEnt,dstInst,srcEnt,srcInst,prior,route,event,region,pool,selector*/ #ifdef SS_RBUF - PRIVATE Pst rlcDlRbfuPst ={1,1,ENTKW,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,1,1,0,0}; + static Pst rlcDlRbfuPst ={1,1,ENTRLC,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,1,1,0,0}; #else - PRIVATE Pst rlcDlRbfuPst ={1,1,ENTKW,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,2,1,0,0}; + static Pst rlcDlRbfuPst ={1,1,ENTRLC,1,ENTPJ,1,PRIOR0,RTESPEC,KWU_EVT_DAT_REQ,2,1,0,0}; #endif Void *elmIndx = NULLP; KwuDatReqDetl *kwuDatReqDetl = NULLP; @@ -1650,10 +788,10 @@ Void; datReq.rlcId = kwuDatReqDetl->rlcId; datReq.sduId = kwuDatReqDetl->sduId; datReq.lcType = kwuDatReqDetl->lcType; - SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].nPktProc++;;//Number of pkt processed in tti + SsRngInfoTbl[SS_RNG_BUF_DLPDCP_TO_DLRLC].nPktProc++;//Number of pkt processed in tti if(kwuDatReqDetl->mBuf != NULLP) { - KwUiKwuDatReq(&rlcDlRbfuPst, kwuDatReqDetl->spId, &datReq, kwuDatReqDetl->mBuf); + rlcProcDlData(&rlcDlRbfuPst, kwuDatReqDetl->spId, &datReq, kwuDatReqDetl->mBuf); } SRngIncrRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC); rngBufDeqIndx++; @@ -1665,40 +803,24 @@ Void; elmIndx = (Void *)SRngGetRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC); } - RETVALUE(ROK); + return ROK; } -#ifdef ANSI -PUBLIC S16 kwUtlDlBatchProcPkts -( -Void -) -#else -PUBLIC S16 kwUtlDlBatchProcPkts -Void; -#endif +S16 rlcUtlDlBatchProcPkts(Void) { - kwDlBatchProc(); + rlcDlBatchProc(); #ifdef SS_RBUF #ifdef LTE_L2_MEAS - kwUtlDlBatchProcHqStaInd(); + rlcUtlDlBatchProcHqStaInd(); #endif - kwUtlFreeDlMem(); + rlcUtlFreeDlMem(); #endif - RETVALUE(ROK); + return ROK; } -#ifdef ANSI -PUBLIC S16 kwUtlDlFreeRlcRBuf -( -Void -) -#else -PUBLIC S16 kwUtlDlFreeRlcRBuf -Void; -#endif +S16 rlcUtlDlFreeRlcRBuf(Void) { /* Read from Ring Buffer and process PDCP packets */ Void *elmIndx = NULLP; @@ -1716,7 +838,7 @@ Void; if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLPDCP_TO_DLRLC)) == NULLP) break; } - RETVALUE(ROK); + return ROK; }