X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fcrg.c;h=0d7ffbe92ae5a92e63eb243ce155e63091e48a12;hb=f0f43ed6f745eec0ceb4e204c62f4dc36f1e8d7f;hp=9d2dc3a1963d417321eb145537cf59ca74392010;hpb=829bbd114f1c3dc00c1da47bca0a8207c049df3f;p=o-du%2Fl2.git diff --git a/src/cm/crg.c b/src/cm/crg.c index 9d2dc3a19..0d7ffbe92 100755 --- a/src/cm/crg.c +++ b/src/cm/crg.c @@ -34,28 +34,12 @@ primitives. */ /* 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_lte.h" /* Common LTE Defines */ +#include "common_def.h" #include "crg.h" /* CRG Interface defines */ /* header/extern include files (.x) */ -#include "gen.x" /* general */ -#include "ssi.x" /* system services */ -#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_lte.x" /* Common LTE Defines */ #include "crg.x" /* CRG Interface includes */ - #ifdef LCCRG /** @@ -71,22 +55,14 @@ * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkCrgBndReq +S16 cmPkCrgBndReq ( Pst* pst, SuId suId, SpId spId ) -#else -PUBLIC S16 cmPkCrgBndReq(pst, suId, spId) -Pst* pst; -SuId suId; -SpId spId; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkCrgBndReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -94,7 +70,7 @@ SpId spId; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG001, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -103,7 +79,7 @@ SpId spId; (ErrVal)ECRG002, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -112,10 +88,10 @@ SpId spId; (ErrVal)ECRG003, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTCRGBNDREQ; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -132,24 +108,16 @@ SpId spId; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgBndReq +S16 cmUnpkCrgBndReq ( CrgBndReq func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgBndReq(func, pst, mBuf) -CrgBndReq func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; SpId spId; - TRC3(cmUnpkCrgBndReq) if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); @@ -158,7 +126,7 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG004, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); @@ -167,10 +135,10 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG005, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, spId)); + return ((*func)(pst, suId, spId)); } @@ -184,26 +152,18 @@ Buffer *mBuf; * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkCrgBndCfm +S16 cmPkCrgBndCfm ( Pst* pst, SuId suId, -U8 status +uint8_t status ) -#else -PUBLIC S16 cmPkCrgBndCfm(pst, suId, status) -Pst* pst; -SuId suId; -U8 status; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkCrgBndCfm) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -211,16 +171,16 @@ U8 status; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG006, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } - if (SPkU8(status, mBuf) != ROK) { + if (oduUnpackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG007, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -229,10 +189,10 @@ U8 status; (ErrVal)ECRG008, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTCRGBNDCFM; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -246,28 +206,20 @@ U8 status; * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgBndCfm +S16 cmUnpkCrgBndCfm ( CrgBndCfm func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgBndCfm(func, pst, mBuf) -CrgBndCfm func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; - U8 status; + uint8_t status; - TRC3(cmUnpkCrgBndCfm) if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); @@ -276,19 +228,19 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG009, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } - if (SUnpkU8(&status, mBuf) != ROK) { + if (oduPackUInt8(&status, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG010, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, status)); + return ((*func)(pst, suId, status)); } @@ -305,22 +257,14 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkCrgUbndReq +S16 cmPkCrgUbndReq ( Pst* pst, SpId spId, Reason reason ) -#else -PUBLIC S16 cmPkCrgUbndReq(pst, spId, reason) -Pst* pst; -SpId spId; -Reason reason; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkCrgUbndReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -328,7 +272,7 @@ Reason reason; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG011, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(reason, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -337,7 +281,7 @@ Reason reason; (ErrVal)ECRG012, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -346,10 +290,10 @@ Reason reason; (ErrVal)ECRG013, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTCRGUBNDREQ; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -366,24 +310,16 @@ Reason reason; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgUbndReq +S16 cmUnpkCrgUbndReq ( CrgUbndReq func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgUbndReq(func, pst, mBuf) -CrgUbndReq func; -Pst *pst; -Buffer *mBuf; -#endif { SpId spId; Reason reason; - TRC3(cmUnpkCrgUbndReq) if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); @@ -392,7 +328,7 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG014, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (SUnpkS16(&reason, mBuf) != ROK) { SPutMsg(mBuf); @@ -401,176 +337,10 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG015, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, reason)); -} - - -/** -* @brief Configuration Request from RRC to MAC for - * configuring Cell/Ue/Lc -* -* @details -* -* Function : cmPkCrgCfgReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] CrgCfgTransId transId -* @param[in] CrgCfgReqInfo * cfgReqInfo -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCfgReq -( -Pst* pst, -SpId spId, -CrgCfgTransId transId, -CrgCfgReqInfo * cfgReqInfo -) -#else -PUBLIC S16 cmPkCrgCfgReq(pst, spId, transId, cfgReqInfo) -Pst* pst; -SpId spId; -CrgCfgTransId transId; -CrgCfgReqInfo * cfgReqInfo; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkCrgCfgReq) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG016, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CrgCfgReqInfo)); - RETVALUE(RFAILED); - } - if (cmPkCrgCfgReqInfo(cfgReqInfo, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG017, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CrgCfgReqInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } -/* crg_c_001.main_5: MOD - Updating ERR code */ - if (cmPkCrgCfgTransId(&transId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG018, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CrgCfgReqInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG019, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CrgCfgReqInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CrgCfgReqInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG020, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - pst->event = (Event) EVTCRGCFGREQ; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Configuration Request from RRC to MAC for - * configuring Cell/Ue/Lc -* -* @details -* -* Function : cmUnpkCrgCfgReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] CrgCfgTransId transId -* @param[in] CrgCfgReqInfo * cfgReqInfo -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCfgReq -( -CrgCfgReq func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgCfgReq(func, pst, mBuf) -CrgCfgReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - CrgCfgTransId transId; - CrgCfgReqInfo *cfgReqInfo; - - TRC3(cmUnpkCrgCfgReq) - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG021, (ErrVal)0, "Packing failed"); -#endif - RETVALUE(RFAILED); - } - if (cmUnpkCrgCfgTransId(&transId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG022, (ErrVal)0, "Packing failed"); -#endif - RETVALUE(RFAILED); - } - if ((SGetSBuf(pst->region, pst->pool, (Data **)&cfgReqInfo, sizeof(CrgCfgReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG023, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (cmUnpkCrgCfgReqInfo(cfgReqInfo, mBuf) != ROK) { - SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CrgCfgReqInfo)); - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ECRG024, (ErrVal)0, "Packing failed"); -#endif - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, transId, cfgReqInfo)); + return ((*func)(pst, spId, reason)); } @@ -584,28 +354,19 @@ Buffer *mBuf; * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CrgCfgTransId transId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCfgCfm +S16 cmPkCrgCfgCfm ( Pst* pst, SuId suId, CrgCfgTransId transId, -U8 status +uint8_t status ) -#else -PUBLIC S16 cmPkCrgCfgCfm(pst, suId, transId, status) -Pst* pst; -SuId suId; -CrgCfgTransId transId; -U8 status; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkCrgCfgCfm) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -613,17 +374,17 @@ U8 status; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG025, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } /* crg_c_001.main_5 - ADD - Added the packing for status. */ - if (SPkU8(status, mBuf) != ROK) { + if (oduUnpackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG026, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (cmPkCrgCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -632,7 +393,7 @@ U8 status; (ErrVal)ECRG027, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -641,10 +402,10 @@ U8 status; (ErrVal)ECRG028, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTCRGCFGCFM; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -658,29 +419,21 @@ U8 status; * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CrgCfgTransId transId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCfgCfm +S16 cmUnpkCrgCfgCfm ( CrgCfgCfm func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgCfgCfm(func, pst, mBuf) -CrgCfgCfm func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; CrgCfgTransId transId; - U8 status; + uint8_t status; - TRC3(cmUnpkCrgCfgCfm) if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); @@ -689,7 +442,7 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG029, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (cmUnpkCrgCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); @@ -698,19 +451,19 @@ Buffer *mBuf; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG030, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } - if (SUnpkU8(&status, mBuf) != ROK) { + if (oduPackUInt8(&status, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECRG031, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, transId, status)); + return ((*func)(pst, suId, transId, status)); } @@ -729,26 +482,19 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCfgTransId +S16 cmPkCrgCfgTransId ( CrgCfgTransId *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkCrgCfgTransId(param, mBuf) -CrgCfgTransId *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmPkCrgCfgTransId) for (i=CRG_CFG_TRANSID_SIZE-1; i >= 0; i--) { - CMCHKPK(SPkU8, param->trans[i], mBuf); + CMCHKPK(oduUnpackUInt8, param->trans[i], mBuf); } - RETVALUE(ROK); + return ROK; } @@ -768,36 +514,29 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCfgTransId +S16 cmUnpkCrgCfgTransId ( CrgCfgTransId *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgCfgTransId(param, mBuf) -CrgCfgTransId *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmUnpkCrgCfgTransId) for (i=0; itrans[i], mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->trans[i], mBuf); } - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmPkCrgBwCfg +* Func : cmPkCrgUeUlHqCfg * * -* Desc : Bandwidth configuration per cell +* Desc : Uplink HARQ configuration per UE * * * Ret : S16 @@ -807,34 +546,25 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgBwCfg +S16 cmPkCrgUeUlHqCfg ( -CrgBwCfg *param, +CrgUeUlHqCfg *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkCrgBwCfg(param, mBuf) -CrgBwCfg *param; -Buffer *mBuf; -#endif { - TRC3(cmPkCrgBwCfg) - CMCHKPK(SPkU8, param->ulTotalBw, mBuf); - CMCHKPK(SPkU8, param->dlTotalBw, mBuf); - RETVALUE(ROK); + CMCHKPK(oduUnpackUInt8, param->maxUlHqTx, mBuf); + return ROK; } - - +#ifdef LTE_ADV /*********************************************************** * -* Func : cmUnpkCrgBwCfg +* Func : cmPkCrgUeSCellCfg * * -* Desc : Bandwidth configuration per cell +* Desc : Secondary Cell information of the UE * * * Ret : S16 @@ -844,34 +574,25 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgBwCfg +static S16 cmPkCrgUeSCellCfg ( -CrgBwCfg *param, +CrgUeSCellInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgBwCfg(param, mBuf) -CrgBwCfg *param; -Buffer *mBuf; -#endif { + CMCHKPK(SPkS16, param->rguDlSapId, mBuf); + CMCHKPK(SPkS16, param->rguUlSapId, mBuf); + CMCHKPK(oduUnpackUInt8, param->macInst, mBuf); + CMCHKPK(oduUnpackUInt16, param->sCellId, mBuf); - TRC3(cmUnpkCrgBwCfg) - - CMCHKUNPK(SUnpkU8, ¶m->dlTotalBw, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->ulTotalBw, mBuf); - RETVALUE(ROK); + return ROK; } - - - /*********************************************************** * -* Func : cmPkCrgRachCfg +* Func : cmUnpkCrgUeSCellCfg * * -* Desc : RACH configuration per cell +* Desc : Secondary Cell information of the UE * * * Ret : S16 @@ -881,33 +602,24 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgRachCfg +static S16 cmUnpkCrgUeSCellCfg ( -CrgRachCfg *param, +CrgUeSCellInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkCrgRachCfg(param, mBuf) -CrgRachCfg *param; -Buffer *mBuf; -#endif { - - TRC3(cmPkCrgRachCfg) - - CMCHKPK(SPkU8, param->maxMsg3Tx, mBuf); - RETVALUE(ROK); + CMCHKUNPK(oduPackUInt16, ¶m->sCellId, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->macInst, mBuf); + CMCHKUNPK(SUnpkS16, ¶m->rguUlSapId, mBuf); + CMCHKUNPK(SUnpkS16, ¶m->rguDlSapId, mBuf); + return ROK; } - - - /*********************************************************** * -* Func : cmUnpkCrgRachCfg +* Func : cmPkCrgUeSecCellInfo * * -* Desc : RACH configuration per cell +* Desc : Secondary Cell information of the UE * * * Ret : S16 @@ -917,33 +629,30 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgRachCfg +S16 cmPkCrgUeSecCellInfo ( -CrgRachCfg *param, +CrgUeSecCellInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkCrgRachCfg(param, mBuf) -CrgRachCfg *param; -Buffer *mBuf; -#endif { + S8 idx; + for(idx = param->numSCells - 1; idx >= 0; idx--) + { + CMCHKPK(cmPkCrgUeSCellCfg, ¶m->ueSCellCfg[(uint8_t)idx], mBuf); + } - TRC3(cmUnpkCrgRachCfg) + CMCHKPK(oduUnpackUInt8, param->numSCells, mBuf); + CMCHKPK(oduUnpackUInt8, param->isSCellCfgPres, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->maxMsg3Tx, mBuf); - RETVALUE(ROK); + return ROK; } - - /*********************************************************** * -* Func : cmPkCrgCellCfg +* Func : cmUnpkCrgUeSecCellInfo * * -* Desc : Cell configuration +* Desc : Secondary Cell information of the UE * * * Ret : S16 @@ -953,1355 +662,31 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCellCfg +S16 cmUnpkCrgUeSecCellInfo ( -CrgCellCfg *param, +CrgUeSecCellInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkCrgCellCfg(param, mBuf) -CrgCellCfg *param; -Buffer *mBuf; -#endif { + uint8_t idx; - TRC3(cmPkCrgCellCfg) - -#ifdef EMTC_ENABLE - CMCHKPK(SPkU8, param->emtcEnable, mBuf); -#endif -#ifdef TENB_MULT_CELL_SUPPRT - CMCHKPK(SPkS16, param->rguDlSapId, mBuf); - CMCHKPK(SPkS16, param->rguUlSapId, mBuf); -#endif - CMCHKPK(cmPkCrgBwCfg, ¶m->bwCfg, mBuf); - CMCHKPK(cmPkCrgRachCfg, ¶m->rachCfg, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgCellCfg -* -* -* Desc : Cell configuration -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCellCfg -( -CrgCellCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgCellCfg(param, mBuf) -CrgCellCfg *param; -Buffer *mBuf; -#endif -{ + CMCHKUNPK(oduPackUInt8, ¶m->isSCellCfgPres, mBuf); + if(TRUE == param->isSCellCfgPres) + { + CMCHKUNPK(oduPackUInt8, ¶m->numSCells, mBuf); - TRC3(cmUnpkCrgCellCfg) + for(idx = 0; idx < param->numSCells; idx++) + { + CMCHKUNPK(cmUnpkCrgUeSCellCfg, ¶m->ueSCellCfg[idx],mBuf); + } + } - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkCrgRachCfg, ¶m->rachCfg, mBuf); - CMCHKUNPK(cmUnpkCrgBwCfg, ¶m->bwCfg, mBuf); -#ifdef TENB_MULT_CELL_SUPPRT - CMCHKUNPK(SUnpkS16, ¶m->rguUlSapId, mBuf); - CMCHKUNPK(SUnpkS16, ¶m->rguDlSapId, mBuf); -#endif -#ifdef EMTC_ENABLE - CMCHKUNPK(SUnpkU8, ¶m->emtcEnable, mBuf); -#endif - RETVALUE(ROK); + return ROK; } +#endif /* LTE_ADV */ - -/*********************************************************** -* -* Func : cmPkCrgUeUlHqCfg -* -* -* Desc : Uplink HARQ configuration per UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgUeUlHqCfg -( -CrgUeUlHqCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgUeUlHqCfg(param, mBuf) -CrgUeUlHqCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgUeUlHqCfg) - - CMCHKPK(SPkU8, param->maxUlHqTx, mBuf); - RETVALUE(ROK); -} - -#ifdef LTE_ADV -/*********************************************************** -* -* Func : cmPkCrgUeSCellCfg -* -* -* Desc : Secondary Cell information of the UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PRIVATE S16 cmPkCrgUeSCellCfg -( -CrgUeSCellInfo *param, -Buffer *mBuf -) -#else -PRIVATE S16 cmPkCrgUeSCellCfg(param, mBuf) -CrgUeSCellInfo *param; -Buffer *mBuf; #endif -{ - CMCHKPK(SPkS16, param->rguDlSapId, mBuf); - CMCHKPK(SPkS16, param->rguUlSapId, mBuf); - CMCHKPK(SPkU8, param->macInst, mBuf); - CMCHKPK(SPkU16, param->sCellId, mBuf); - - RETVALUE(ROK); -} -/*********************************************************** -* -* Func : cmUnpkCrgUeSCellCfg -* -* -* Desc : Secondary Cell information of the UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PRIVATE S16 cmUnpkCrgUeSCellCfg -( -CrgUeSCellInfo *param, -Buffer *mBuf -) -#else -PRIVATE S16 cmUnpkCrgUeSCellCfg(param, mBuf) -CrgUeSCellInfo *param; -Buffer *mBuf; -#endif -{ - CMCHKUNPK(SUnpkU16, ¶m->sCellId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->macInst, mBuf); - CMCHKUNPK(SUnpkS16, ¶m->rguUlSapId, mBuf); - CMCHKUNPK(SUnpkS16, ¶m->rguDlSapId, mBuf); - RETVALUE(ROK); -} -/*********************************************************** -* -* Func : cmPkCrgUeSecCellInfo -* -* -* Desc : Secondary Cell information of the UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgUeSecCellInfo -( -CrgUeSecCellInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgUeSecCellInfo(param, mBuf) -CrgUeSecCellInfo *param; -Buffer *mBuf; -#endif -{ - S8 idx; - for(idx = param->numSCells - 1; idx >= 0; idx--) - { - CMCHKPK(cmPkCrgUeSCellCfg, ¶m->ueSCellCfg[(U8)idx], mBuf); - } - - CMCHKPK(SPkU8, param->numSCells, mBuf); - CMCHKPK(SPkU8, param->isSCellCfgPres, mBuf); - - RETVALUE(ROK); -} - -/*********************************************************** -* -* Func : cmUnpkCrgUeSecCellInfo -* -* -* Desc : Secondary Cell information of the UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgUeSecCellInfo -( -CrgUeSecCellInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgUeSecCellInfo(param, mBuf) -CrgUeSecCellInfo *param; -Buffer *mBuf; -#endif -{ - U8 idx; - - CMCHKUNPK(SUnpkU8, ¶m->isSCellCfgPres, mBuf); - if(TRUE == param->isSCellCfgPres) - { - CMCHKUNPK(SUnpkU8, ¶m->numSCells, mBuf); - - for(idx = 0; idx < param->numSCells; idx++) - { - CMCHKUNPK(cmUnpkCrgUeSCellCfg, ¶m->ueSCellCfg[idx],mBuf); - } - } - - RETVALUE(ROK); -} - -#endif /* LTE_ADV */ - - -/*********************************************************** -* -* Func : cmUnpkCrgUeUlHqCfg -* -* -* Desc : Uplink HARQ configuration per UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgUeUlHqCfg -( -CrgUeUlHqCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgUeUlHqCfg(param, mBuf) -CrgUeUlHqCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgUeUlHqCfg) - - CMCHKUNPK(SUnpkU8, ¶m->maxUlHqTx, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgUeCfg -* -* -* Desc : UE configuration -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgUeCfg -( -CrgUeCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgUeCfg(param, mBuf) -CrgUeCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgUeCfg) -#ifdef TENB_MULT_CELL_SUPPRT - CMCHKPK(SPkS16, param->rguDlSapId, mBuf); - CMCHKPK(SPkS16, param->rguUlSapId, mBuf); -#endif - CMCHKPK(SPkU32, param->txMode.tm, mBuf); - CMCHKPK(SPkU8, param->txMode.pres, mBuf); - CMCHKPK(cmPkCrgUeUlHqCfg, ¶m->ueUlHqCfg, mBuf); - CMCHKPK(cmPkLteRnti, param->crnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgUeCfg -* -* -* Desc : UE configuration -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgUeCfg -( -CrgUeCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgUeCfg(param, mBuf) -CrgUeCfg *param; -Buffer *mBuf; -#endif -{ - U32 tmpEnum; - - TRC3(cmUnpkCrgUeCfg) - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf); - CMCHKUNPK(cmUnpkCrgUeUlHqCfg, ¶m->ueUlHqCfg, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->txMode.pres, mBuf); - CMCHKUNPK(SUnpkU32, (U32 *)&tmpEnum, mBuf); - param->txMode.tm = (CrgTxMode) tmpEnum; -#ifdef TENB_MULT_CELL_SUPPRT - CMCHKUNPK(SUnpkS16, ¶m->rguUlSapId, mBuf); - CMCHKUNPK(SUnpkS16, ¶m->rguDlSapId, mBuf); -#endif - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgDlLchCfg -* -* -* Desc : Logical channel configuration info for downlink logical channels -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgDlLchCfg -( -CrgDlLchCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgDlLchCfg(param, mBuf) -CrgDlLchCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgDlLchCfg) - - CMCHKPK(SPkU8, param->dlTrchType, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgDlLchCfg -* -* -* Desc : Logical channel configuration info for downlink logical channels -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgDlLchCfg -( -CrgDlLchCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgDlLchCfg(param, mBuf) -CrgDlLchCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgDlLchCfg) - - CMCHKUNPK(SUnpkU8, ¶m->dlTrchType, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgUlLchCfg -* -* -* Desc : Logical channel configuration info for uplink logical channels -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgUlLchCfg -( -CrgUlLchCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgUlLchCfg(param, mBuf) -CrgUlLchCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgUlLchCfg) - - CMCHKPK(SPkU8, param->lcgId, mBuf); - CMCHKPK(SPkU8, param->ulTrchType, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgUlLchCfg -* -* -* Desc : Logical channel configuration info for uplink logical channels -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgUlLchCfg -( -CrgUlLchCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgUlLchCfg(param, mBuf) -CrgUlLchCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgUlLchCfg) - - CMCHKUNPK(SUnpkU8, ¶m->ulTrchType, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->lcgId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgLchCfg -* -* -* Desc : Logical channel configuration info for common and dedicated channels -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgLchCfg -( -CrgLchCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgLchCfg(param, mBuf) -CrgLchCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgLchCfg) -/* crg_c_001.main_5 - ADD - Added the packing for LTE_L2_MEAS. */ -#ifdef LTE_L2_MEAS - CMCHKPK(SPkU8, param->qci, mBuf); -#endif - CMCHKPK(cmPkCrgUlLchCfg, ¶m->ulInfo, mBuf); - CMCHKPK(cmPkCrgDlLchCfg, ¶m->dlInfo, mBuf); - CMCHKPK(SPkU8, param->dir, mBuf); - CMCHKPK(cmPkLteLcType, param->lcType, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteRnti, param->crnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgLchCfg -* -* -* Desc : Logical channel configuration info for common and dedicated channels -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgLchCfg -( -CrgLchCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgLchCfg(param, mBuf) -CrgLchCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgLchCfg) - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->dir, mBuf); - CMCHKUNPK(cmUnpkCrgDlLchCfg, ¶m->dlInfo, mBuf); - CMCHKUNPK(cmUnpkCrgUlLchCfg, ¶m->ulInfo, mBuf); -/* crg_c_001.main_5 - ADD - Added the unpacking for LTE_L2_MEAS. */ -#ifdef LTE_L2_MEAS - CMCHKUNPK(SUnpkU8, ¶m->qci, mBuf); -#endif - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgCfg -* -* -* Desc : Basic configuration info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCfg -( -CrgCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgCfg(param, mBuf) -CrgCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgCfg) - - switch(param->cfgType) { - case CRG_LCH_CFG: - CMCHKPK(cmPkCrgLchCfg, ¶m->u.lchCfg, mBuf); - break; - case CRG_UE_CFG: - CMCHKPK(cmPkCrgUeCfg, ¶m->u.ueCfg, mBuf); - break; - case CRG_CELL_CFG: - CMCHKPK(cmPkCrgCellCfg, ¶m->u.cellCfg, mBuf); - break; - default : - RETVALUE(RFAILED); - } - CMCHKPK(SPkU8, param->cfgType, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgCfg -* -* -* Desc : Basic configuration info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCfg -( -CrgCfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgCfg(param, mBuf) -CrgCfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgCfg) - - CMCHKUNPK(SUnpkU8, ¶m->cfgType, mBuf); - switch(param->cfgType) { - case CRG_CELL_CFG: - CMCHKUNPK(cmUnpkCrgCellCfg, ¶m->u.cellCfg, mBuf); - break; - case CRG_UE_CFG: - CMCHKUNPK(cmUnpkCrgUeCfg, ¶m->u.ueCfg, mBuf); - break; - case CRG_LCH_CFG: - CMCHKUNPK(cmUnpkCrgLchCfg, ¶m->u.lchCfg, mBuf); - break; - default : - RETVALUE(RFAILED); - } - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgCellRecfg -* -* -* Desc : Cell reconfiguration info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCellRecfg -( -CrgCellRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgCellRecfg(param, mBuf) -CrgCellRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgCellRecfg) - - CMCHKPK(cmPkCrgRachCfg, ¶m->rachRecfg, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgCellRecfg -* -* -* Desc : Cell reconfiguration info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCellRecfg -( -CrgCellRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgCellRecfg(param, mBuf) -CrgCellRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgCellRecfg) - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkCrgRachCfg, ¶m->rachRecfg, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgUeRecfg -* -* -* Desc : UE reconfiguration info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgUeRecfg -( -CrgUeRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgUeRecfg(param, mBuf) -CrgUeRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgUeRecfg) -#ifdef LTE_ADV - if(TRUE == param->crgSCellCfg.isSCellCfgPres) - { - CMCHKPK(cmPkCrgUeSecCellInfo, ¶m->crgSCellCfg, mBuf); - } - else - { - CMCHKPK(SPkU8, param->crgSCellCfg.isSCellCfgPres, mBuf); - } -#endif /* LTE_ADV */ - CMCHKPK(SPkU32, param->txMode.tm, mBuf); - CMCHKPK(SPkU8, param->txMode.pres, mBuf); - CMCHKPK(cmPkCrgUeUlHqCfg, ¶m->ueUlHqRecfg, mBuf); - CMCHKPK(cmPkLteRnti, param->newCrnti, mBuf); - CMCHKPK(cmPkLteRnti, param->oldCrnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgUeRecfg -* -* -* Desc : UE reconfiguration info -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgUeRecfg -( -CrgUeRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgUeRecfg(param, mBuf) -CrgUeRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgUeRecfg) - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->oldCrnti, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->newCrnti, mBuf); - CMCHKUNPK(cmUnpkCrgUeUlHqCfg, ¶m->ueUlHqRecfg, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->txMode.pres, mBuf); - CMCHKUNPK(SUnpkU32, (U32 *)¶m->txMode.tm, mBuf); -#ifdef LTE_ADV - CMCHKUNPK(cmUnpkCrgUeSecCellInfo, ¶m->crgSCellCfg, mBuf); -#endif /* LTE_ADV */ - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgLchRecfg -* -* -* Desc : Logical channel reconfiguration info for dedicated channels only -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgLchRecfg -( -CrgLchRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgLchRecfg(param, mBuf) -CrgLchRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgLchRecfg) - - CMCHKPK(SPkU8, param->ulRecfg.lcgId, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteRnti, param->crnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgLchRecfg -* -* -* Desc : Logical channel reconfiguration info for dedicated channels only -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgLchRecfg -( -CrgLchRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgLchRecfg(param, mBuf) -CrgLchRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgLchRecfg) - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->ulRecfg.lcgId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgRecfg -* -* -* Desc : Basic reconfiguration info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgRecfg -( -CrgRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgRecfg(param, mBuf) -CrgRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgRecfg) - - switch(param->recfgType) { - case CRG_LCH_CFG: - CMCHKPK(cmPkCrgLchRecfg, ¶m->u.lchRecfg, mBuf); - break; - case CRG_UE_CFG: - CMCHKPK(cmPkCrgUeRecfg, ¶m->u.ueRecfg, mBuf); - break; - case CRG_CELL_CFG: - CMCHKPK(cmPkCrgCellRecfg, ¶m->u.cellRecfg, mBuf); - break; - default : - RETVALUE(RFAILED); - } - CMCHKPK(SPkU8, param->recfgType, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgRecfg -* -* -* Desc : Basic reconfiguration info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgRecfg -( -CrgRecfg *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgRecfg(param, mBuf) -CrgRecfg *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgRecfg) - - CMCHKUNPK(SUnpkU8, ¶m->recfgType, mBuf); - switch(param->recfgType) { - case CRG_CELL_CFG: - CMCHKUNPK(cmUnpkCrgCellRecfg, ¶m->u.cellRecfg, mBuf); - break; - case CRG_UE_CFG: - CMCHKUNPK(cmUnpkCrgUeRecfg, ¶m->u.ueRecfg, mBuf); - break; - case CRG_LCH_CFG: - CMCHKUNPK(cmUnpkCrgLchRecfg, ¶m->u.lchRecfg, mBuf); - break; - default : - RETVALUE(RFAILED); - } - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgDel -* -* -* Desc : Basic Delete info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgDel -( -CrgDel *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgDel(param, mBuf) -CrgDel *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgDel) - - switch(param->delType) { - case CRG_LCH_CFG: - CMCHKPK(SPkU8, param->u.lchDel.dir, mBuf); - CMCHKPK(cmPkLteLcId, param->u.lchDel.lcId, mBuf); - CMCHKPK(cmPkLteRnti, param->u.lchDel.crnti, mBuf); - CMCHKPK(cmPkLteCellId, param->u.lchDel.cellId, mBuf); - break; - case CRG_UE_CFG: - CMCHKPK(cmPkLteRnti, param->u.ueDel.crnti, mBuf); - CMCHKPK(cmPkLteCellId, param->u.ueDel.cellId, mBuf); - break; - case CRG_CELL_CFG: - CMCHKPK(cmPkLteCellId, param->u.cellDel.cellId, mBuf); - break; - default : - RETVALUE(RFAILED); - } - CMCHKPK(SPkU8, param->delType, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgDel -* -* -* Desc : Basic Delete info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgDel -( -CrgDel *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgDel(param, mBuf) -CrgDel *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgDel) - - CMCHKUNPK(SUnpkU8, ¶m->delType, mBuf); - switch(param->delType) { - case CRG_CELL_CFG: - CMCHKUNPK(cmUnpkLteCellId, ¶m->u.cellDel.cellId, mBuf); - break; - case CRG_UE_CFG: - CMCHKUNPK(cmUnpkLteCellId, ¶m->u.ueDel.cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->u.ueDel.crnti, mBuf); - break; - case CRG_LCH_CFG: - CMCHKUNPK(cmUnpkLteCellId, ¶m->u.lchDel.cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->u.lchDel.crnti, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->u.lchDel.lcId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->u.lchDel.dir, mBuf); - break; - default : - RETVALUE(RFAILED); - } - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgRst -* -* -* Desc : UE RESET info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgRst -( -CrgRst *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgRst(param, mBuf) -CrgRst *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgRst) - - CMCHKPK(cmPkLteRnti, param->crnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgRst -* -* -* Desc : UE RESET info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgRst -( -CrgRst *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgRst(param, mBuf) -CrgRst *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgRst) - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkCrgCfgReqInfo -* -* -* Desc : Config/Reconfig/Delete info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkCrgCfgReqInfo -( -CrgCfgReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkCrgCfgReqInfo(param, mBuf) -CrgCfgReqInfo *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkCrgCfgReqInfo) - - switch(param->action) { - case CRG_RESET: - CMCHKPK(cmPkCrgRst, ¶m->u.rstInfo, mBuf); - break; - case CRG_DELETE: - CMCHKPK(cmPkCrgDel, ¶m->u.delInfo, mBuf); - break; - case CRG_RECONFIG: - CMCHKPK(cmPkCrgRecfg, ¶m->u.recfgInfo, mBuf); - break; - case CRG_CONFIG: - CMCHKPK(cmPkCrgCfg, ¶m->u.cfgInfo, mBuf); - break; - default : - RETVALUE(RFAILED); - } - CMCHKPK(SPkU8, param->action, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkCrgCfgReqInfo -* -* -* Desc : Config/Reconfig/Delete info for MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkCrgCfgReqInfo -( -CrgCfgReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkCrgCfgReqInfo(param, mBuf) -CrgCfgReqInfo *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkCrgCfgReqInfo) - - CMCHKUNPK(SUnpkU8, ¶m->action, mBuf); - switch(param->action) { - case CRG_CONFIG: - CMCHKUNPK(cmUnpkCrgCfg, ¶m->u.cfgInfo, mBuf); - break; - case CRG_RECONFIG: - CMCHKUNPK(cmUnpkCrgRecfg, ¶m->u.recfgInfo, mBuf); - break; - case CRG_DELETE: - CMCHKUNPK(cmUnpkCrgDel, ¶m->u.delInfo, mBuf); - break; - case CRG_RESET: - CMCHKUNPK(cmUnpkCrgRst, ¶m->u.rstInfo, mBuf); - break; - default : - RETVALUE(RFAILED); - } - RETVALUE(ROK); -} -#endif - /********************************************************************** End of file **********************************************************************/