/******************************************************************************* ################################################################################ # Copyright (c) [2017-2019] [Radisys] # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # # You may obtain a copy of the License at # # # # http://www.apache.org/licenses/LICENSE-2.0 # # # # Unless required by applicable law or agreed to in writing, software # # distributed under the License is distributed on an "AS IS" BASIS, # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ *******************************************************************************/ /********************************************************************20** Name: CTF Interface Type: C file Desc: This file contains the packing/unpacking functions for control plane primitives on CTF interface. File: ctf.c *********************************************************************21*/ /* header include files (.h) */ #include "common_def.h" #include "ctf.h" /* CTF interface defines */ /* header/extern include files (.x) */ #ifdef TENB_AS_SECURITY #include "cm_mblk.x" #endif #include "ctf.x" #ifdef TENB_AS_SECURITY #define cmPkCtfCrnti oduPackUInt16 #define cmPkCtfCellId oduPackUInt16 #define cmUnpkCtfCellId oduUnpackUInt16 #define cmUnpkCtfCrnti oduUnpackUInt16 #endif #if (defined(LCCTF) || defined(LWLCCTF)) /** * @brief Request from RRC to PHY to bind the CTF interface SAP. * * @details * * Function: cmPkCtfBndReq * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] SpId spId * @return S16 * -# ROK **/ S16 cmPkCtfBndReq ( Pst* pst, SuId suId, SpId spId ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF001, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF002, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF003, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } pst->event = (Event) EVTCTFBNDREQ; return (SPstTsk(pst,mBuf)); } /** * @brief Request from RRC to PHY to bind the CTF interface SAP. * * @details * * Function: cmUnpkCtfBndReq * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] SpId spId * @return S16 * -# ROK **/ S16 cmUnpkCtfBndReq ( CtfBndReq func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; SpId spId = 0; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF004, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF005, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, spId)); } /** * @brief Confirmation from PHY to RRC for the bind * request for the CTF interface SAP. * * @details * * Function: cmPkCtfBndCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmPkCtfBndCfm ( Pst* pst, SuId suId, uint8_t status ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF006, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (oduPackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF007, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF008, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } pst->event = (Event) EVTCTFBNDCFM; return (SPstTsk(pst,mBuf)); } /** * @brief Confirmation from PHY to RRC for the bind * request for the CTF interface SAP. * * @details * * Function: cmUnpkCtfBndCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmUnpkCtfBndCfm ( CtfBndCfm func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; uint8_t status; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF009, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (oduUnpackUInt8(&status, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF010, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, status)); } /** * @brief Request from RRC to PHY to Unbind the CTF interface SAP. * * @details * * Function: cmPkCtfUbndReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] Reason reason * @return S16 * -# ROK **/ S16 cmPkCtfUbndReq ( Pst* pst, SpId spId, Reason reason ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF011, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (SPkS16(reason, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF012, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF013, (ErrVal)0,(Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } pst->event = (Event) EVTCTFUBNDREQ; return (SPstTsk(pst,mBuf)); } /** * @brief Request from RRC to PHY to Unbind the CTF interface SAP. * * @details * * Function: cmUnpkCtfUbndReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] Reason reason * @return S16 * -# ROK **/ S16 cmUnpkCtfUbndReq ( CtfUbndReq func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; Reason reason = 0; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF014, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (SUnpkS16(&reason, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF015, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, reason)); } /*********************************************************** * * Func: cmRelCtfCfgReq * * * Desc: This fucntion will release the memory used for ctf cfg req * * Ret: S16 * * Notes: * * File: * **********************************************************/ static S16 cmRelCtfCfgReq ( Pst *pst, CtfCfgReqInfo *cfgReqInfo ) { /* ctf_c_001.main_4: Added support for vendor specific parameters */ #ifdef CTF_VER3 if(cfgReqInfo->vendorParams.paramBuffer != NULLP) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo->vendorParams.paramBuffer, cfgReqInfo->vendorParams.buffLen); } #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCfgReqInfo)); return ROK; } #ifdef TENB_AS_SECURITY /*********************************************************** * * Func: cmPkCtfNhKeyInfo * * * Desc: Pack keNB* input parameter information * @details This is one of the main structure in the KDF request primitive. * -# This structure contains the configuration information as given by * the Application to trigger key derivation at PHY layer for generation of kENB*. * -# It take Next Hop key, DL Frequency and Physical cell Id as input. * -# The result of configuration is indicated in KdfCfgCfm. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfNhKeyInfo ( CtfNhKeyInfo *param, Buffer *mBuf ) { S16 idx; for(idx=31;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->secKey[idx],mBuf); } CMCHKPK(oduPackUInt16, param->physCellId, mBuf); CMCHKPK(oduPackUInt16, param->dlCarrFreq, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfKenbStarInfo * * * Desc: Pack keNB* input parameter information * @details This is one of the main structure in the KDF request primitive. * -# This structure contains the configuration information as given by * the Application to trigger key derivation at PHY layer for generation of kENB*. * -# It take existing kENB, DL Frequency and Physical cell Id as input. * -# The result of configuration is indicated in KdfCfgCfm. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfKenbStarInfo ( CtfKenbStarInfo *param, Buffer *mBuf ) { S16 idx; for(idx=31;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->secKey[idx],mBuf); } CMCHKPK(oduPackUInt16, param->physCellId, mBuf); CMCHKPK(oduPackUInt16, param->dlCarrFreq, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfAskeyInfo * * * Desc: Pack AS key generation input parameter information. * @details This is one of the main structure in the KDF request primitive. * -# This structure contains the configuration information as given by * the Application to trigger key derivation at PHY layer for generation of AS Security keys. * -# It take existing kENB, and integrity/cipherig Algorithm as input. * -# The result of configuration is indicated in KdfCfgCfm. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfAskeyInfo ( CtfAsKeyInfo *param, Buffer *mBuf ) { S16 idx; for(idx=31;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->secKey[idx],mBuf); } CMCHKPK(oduPackUInt8, param->ciphAlgoType, mBuf); CMCHKPK(oduPackUInt8, param->intgAlgoType, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfKdfReqInfo * * * Desc: Pack one of the 3 Key Derivation types. * @details This is the encompassing structure in the KDF request primitive. * -# This structure contains the configuration information as given by * the Application to trigger key derivation at PHY layer for generation of keys. * -# It takes key derivation type as input. * -# The result of configuration is indicated in KdfCfgCfm. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfKdfReqInfo ( CtfKdfReqInfo *param, Buffer *mBuf ) { switch (param->keyDerType) { case CTF_KDF_TYPE1: CMCHKPK(cmPkCtfAskeyInfo, ¶m->u.kEnbInf, mBuf); break; case CTF_KDF_TYPE2: CMCHKPK(cmPkCtfKenbStarInfo, ¶m->u.kEnbStarInf, mBuf); break; case CTF_KDF_TYPE3: CMCHKPK(cmPkCtfNhKeyInfo , ¶m->u.nhKeyInf, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->keyDerType, mBuf); return ROK; } /** * @brief Primitive Request from Application to PHY for * security key derivation. * * @details * * Function: cmPkCtfKdfReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId transId * @param[in] CtfCfgReqInfo* cfgReqInfo * @return S16 * -# ROK **/ S16 cmPkCtfKdfReq ( Pst* pst, SpId spId, CtfCfgTransId transId, CtfKdfReqInfo* kdfReqInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfKdfReqInfo(kdfReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF021, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } pst->event = (Event) EVTCTFKDFREQ; return (SPstTsk(pst,mBuf)); } #endif /********************************************************************************************************************************/ /*START OF CNM PACK & UNPACK FUNCTIONS*/ /********************************************************************************************************************************/ S16 cmPkCtfCnmVendorSpecificInfo ( CtfCnmVendorSpecificInfo *param, Buffer *mBuf ) { S32 i; if(param->numOfVendorSpecifcParam <= CTF_CNM_MAX_VENDOR_PARAMS) { for(i= param->numOfVendorSpecifcParam-1; i >= 0; i--) { CMCHKPK(oduPackUInt32,(uint32_t)param->vendorSpecifcParam[i], mBuf); } } CMCHKPK(oduPackUInt16, param->numOfVendorSpecifcParam, mBuf); return ROK; } S16 cmPkCtfCtfCnmCellSyncReq ( CtfCnmCellSyncReq *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt16, param->nbrEarfcn, mBuf); CMCHKPK(oduPackUInt16, param->nbrPCellId, mBuf); CMCHKPK(oduPackUInt8, param->nbrTxAntCount, mBuf); CMCHKPK(oduPackUInt8, param->nbrCellCp, mBuf); CMCHKPK(oduPackUInt8, param->nbrCellNRb, mBuf); CMCHKPK(oduPackUInt8, param->nbrSpecSfCfg, mBuf); CMCHKPK(cmPkCtfCnmVendorSpecificInfo, ¶m->ctfCnmVendorSpecificInfo, mBuf); return ROK; } S16 cmPkCtfcfgReqInfo ( CtfCnmInitSyncReq *param, Buffer *mBuf ) { S32 i; CMCHKPK(oduPackUInt8, param->searchType, mBuf); CMCHKPK(oduPackUInt8, param->mibRequest, mBuf); CMCHKPK(oduPackUInt16, param->earfcn, mBuf); CMCHKPK(oduPackUInt8, param->measBandWidth, mBuf); if(param->numOfPciList <= CTF_CNM_MAX_CELL_SEARCH) { for(i= param->numOfPciList-1; i >= 0; i--) { CMCHKPK(cmPkCtfCtfCnmCellSyncReq, ¶m->pciList[i], mBuf); } } CMCHKPK(oduPackUInt16, param->numOfPciList, mBuf); return ROK; } S16 cmUnpkCtfCnmVendorSpecificInfo ( CtfCnmVendorSpecificInfo *param, Buffer *mBuf ) { S32 i; CMCHKUNPK(oduUnpackUInt16, ¶m->numOfVendorSpecifcParam, mBuf); for(i=0; (inumOfVendorSpecifcParam)&&(i < CTF_CNM_MAX_VENDOR_PARAMS); i++) { CMCHKUNPK(oduUnpackUInt32, ¶m->vendorSpecifcParam[i], mBuf); } return ROK; } S16 cmUnpkCtfCtfCnmCellSyncReq ( CtfCnmCellSyncReq *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkCtfCnmVendorSpecificInfo, ¶m->ctfCnmVendorSpecificInfo, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->nbrSpecSfCfg, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->nbrCellNRb, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->nbrCellCp, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->nbrTxAntCount, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->nbrPCellId, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->nbrEarfcn, mBuf); return ROK; } S16 cmUnpkCtfsyncReqInfo ( CtfCnmInitSyncReq *param, Buffer *mBuf ) { S32 i; CMCHKUNPK(oduUnpackUInt16, ¶m->numOfPciList, mBuf); for(i=0; (i < param->numOfPciList)&&(i < CTF_CNM_MAX_CELL_SEARCH); i++) { CMCHKUNPK(cmUnpkCtfCtfCnmCellSyncReq, ¶m->pciList[i], mBuf); } CMCHKUNPK(oduUnpackUInt8, ¶m->measBandWidth, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->earfcn, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->mibRequest, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->searchType, mBuf); return ROK; } /** * @brief Configuration Request from App to CL for * cnm Cell Sync request. * * @details * * Function: cmPkCtfCnmCellSyncReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId * transId * @param[in] CtfCnmCellSyncReq* ctfcnmCellSyncReq * @return S16 * -# ROK **/ S16 cmPkCtfCnmCellSyncReq ( Pst* pst, SpId spId, CtfCfgTransId *transId, CtfCnmCellSyncReq * cfgReqInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfCtfCnmCellSyncReq(cfgReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)cfgReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq)); SPutMsg(mBuf); return RFAILED; } } if(cmPkCtfCfgTransId(transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmCellSyncReq)); } pst->event = (Event)EVTCTFCNMSYNCREQ; return (SPstTsk(pst,mBuf)); } /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCnmCellSyncReq * * @param[in] CtfCnmCellSyncReqMsg func * @param[in] Pst* pst * @param[in] Buffer *mBuf * @return S16 * -# ROK **/ S16 cmUnpkCtfCnmCellSyncReq ( CtfCnmCellSyncReqMsg func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfCnmCellSyncReq *SyncReqMsg = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&SyncReqMsg, sizeof(CtfCnmCellSyncReq))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&SyncReqMsg, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfCtfCnmCellSyncReq(SyncReqMsg, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)SyncReqMsg, sizeof(CtfCnmCellSyncReq)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, &transId, SyncReqMsg)); } /*-----------------------------------------------------*/ /** * @brief Configuration Request from App to CL for * cnm Init Sync request. * * @details * * Function: cmPkCtfCnmInitSyncReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId * transId * @param[in] CtfCnmInitSyncReq* ctfcnmInitSyncReq * @return S16 * -# ROK **/ S16 cmPkCtfCnmInitSyncReq ( Pst* pst, SpId spId, CtfCfgTransId *transId, CtfCnmInitSyncReq * cfgReqInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfcfgReqInfo(cfgReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)cfgReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq)); SPutMsg(mBuf); return RFAILED; } } if(cmPkCtfCfgTransId(transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(CtfCnmInitSyncReq)); } pst->event = (Event)EVTCTFCNMINITSYNCREQ; return (SPstTsk(pst,mBuf)); } /*-----------------------------------------------------------------*/ /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCnmInitSyncReq * * @param[in] CtfCnmInitSyncReqMsg func * @param[in] Pst* pst * @param[in] Buffer *mBuf * @return S16 * -# ROK **/ S16 cmUnpkCtfCnmInitSyncReq ( CtfCnmInitSyncReqMsg func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfCnmInitSyncReq *syncReqInfo = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&syncReqInfo, sizeof(CtfCnmInitSyncReq))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&syncReqInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfsyncReqInfo(syncReqInfo, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)syncReqInfo, sizeof(CtfCnmInitSyncReq)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, &transId, syncReqInfo)); } /*-----------------------------------------------------------------------------*/ S16 cmPkCtfctfCnmMibInfo ( CtfCnmMibInfo *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt16, param->sfn, mBuf); CMCHKPK(oduPackUInt8, param->numTxAntennas, mBuf); CMCHKPK(oduPackUInt8, param->phichDuration, mBuf); CMCHKPK(oduPackUInt8, param->phichResource, mBuf); CMCHKPK(oduPackUInt8, param->dlSystemBandWidht, mBuf); return ROK; } S16 cmPkCtfctfCnmInitSyncInfo ( CtfCnmInitSyncInfo *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt16, param->pci, mBuf); CMCHKPK(oduPackUInt8, param->rsrp, mBuf); CMCHKPK(oduPackUInt8, param->mibValidFlag, mBuf); CMCHKPK(oduPackUInt16, param->localSfn, mBuf); CMCHKPK(cmPkCtfctfCnmMibInfo, ¶m->ctfCnmMibInfo, mBuf); CMCHKPK(cmPkCtfCnmVendorSpecificInfo, ¶m->ctfCnmVendorSpecificInfo, mBuf); return ROK; } S16 cmPkCtfcfgRspInfo ( CtfCnmInitSyncRsp *param, Buffer *mBuf ) { S32 i; CMCHKPK(oduPackUInt8, param->status, mBuf); CMCHKPK(oduPackUInt16, param->earfcn, mBuf); if(param->numOfNeighbourInfo <= CTF_CNM_MAX_CELL_SEARCH) { for(i= param->numOfNeighbourInfo-1; i >= 0; i--) { CMCHKPK(cmPkCtfctfCnmInitSyncInfo, ¶m->ctfCnmInitSyncInfo[i], mBuf); } } CMCHKPK(oduPackUInt8, param->numOfNeighbourInfo, mBuf); return ROK; } /** * @brief Configuration Request from App to CL for * cnm Init Sync responce * * @details * * Function: cmPkCtfCnmInitSyncRsp * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId * transId * @param[in] CtfCnmInitSyncRsp* ctfcnmInitSyncRsp * @return S16 * -# ROK **/ S16 cmPkCtfCnmInitSyncRsp ( Pst* pst, SpId spId, CtfCfgTransId *transId, CtfCnmInitSyncRsp * cfgRspInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfcfgRspInfo(cfgRspInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)cfgRspInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp)); SPutMsg(mBuf); return RFAILED; } } if(cmPkCtfCfgTransId(transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmInitSyncRsp)); } pst->event = (Event)EVTCTFCNMINITSYNCRSP; return (SPstTsk(pst,mBuf)); } /*-----------------------------------------------------------------------------*/ S16 cmUnpkCtfctfCnmMibInfo ( CtfCnmMibInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->dlSystemBandWidht, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->phichResource, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->phichDuration, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->numTxAntennas, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->sfn, mBuf); return ROK; } S16 cmUnpkctfCnmInitSyncInfo ( CtfCnmInitSyncInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkCtfCnmVendorSpecificInfo, ¶m->ctfCnmVendorSpecificInfo, mBuf); CMCHKUNPK(cmUnpkCtfctfCnmMibInfo, ¶m->ctfCnmMibInfo, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->localSfn, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->mibValidFlag, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->rsrp, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->pci, mBuf); return ROK; } S16 cmUnpkCtfCnmInitSyncRspMsg ( CtfCnmInitSyncRsp *param, Buffer *mBuf ) { S32 i; CMCHKUNPK(oduUnpackUInt8, ¶m->numOfNeighbourInfo, mBuf); for(i=0; (i < param->numOfNeighbourInfo)&&(i < CTF_CNM_MAX_CELL_SEARCH); i++) { CMCHKUNPK(cmUnpkctfCnmInitSyncInfo, ¶m->ctfCnmInitSyncInfo[i], mBuf); } CMCHKUNPK(oduUnpackUInt16, ¶m->earfcn, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->status, mBuf); return ROK; } /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCnmInitSyncRsp * * @param[in] CtfCnmInitSyncRspMsg func * @param[in] Pst* pst * @param[in] Buffer *mBuf * @return S16 * -# ROK **/ S16 cmUnpkCtfCnmInitSyncRsp ( CtfCnmInitSyncRspMsg func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfCnmInitSyncRsp *syncRspInfo = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&syncRspInfo, sizeof(CtfCnmInitSyncRsp))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if(oduUnpackPointer((PTR *)&syncRspInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if(cmUnpkCtfCnmInitSyncRspMsg(syncRspInfo, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)syncRspInfo, sizeof(CtfCnmInitSyncRsp)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, &transId, syncRspInfo)); } /*-----------------------------------------------------------------------*/ S16 cmPkCtfCellSyncRsp ( CtfCnmCellSyncRsp *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt8, param->status, mBuf); return ROK; } /** * @brief Configuration Request from App to CL for * cnm Init Sync responce. * * @details * * Function: cmPkCtfCnmCellSyncRsp * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId * transId * @param[in] CtfCnmCellSyncRsp* ctfcnmCellSyncRsp * @return S16 * -# ROK **/ S16 cmPkCtfCnmCellSyncRsp ( Pst* pst, SpId spId, CtfCfgTransId *transId, CtfCnmCellSyncRsp * cfgRspInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfCellSyncRsp(cfgRspInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)cfgRspInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp)); SPutMsg(mBuf); return RFAILED; } } if(cmPkCtfCfgTransId(transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgRspInfo, sizeof(CtfCnmCellSyncRsp)); } pst->event = (Event)EVTCTFCNMSYNCRSP; return (SPstTsk(pst,mBuf)); } /*------------------------------------------------------------*/ S16 cmUnpkCtfCnmSyncRspMsg ( CtfCnmCellSyncRsp *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->status, mBuf); return ROK; } /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCnmCellSyncRsp * * @param[in] CtfCnmCellSyncRspMsg func * @param[in] Pst* pst * @param[in] Buffer *mBuf * @return S16 * -# ROK **/ S16 cmUnpkCtfCnmCellSyncRsp ( CtfCnmCellSyncRspMsg func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfCnmCellSyncRsp *syncRspMsg = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&syncRspMsg, sizeof(CtfCnmCellSyncRsp))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&syncRspMsg, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfCnmSyncRspMsg(syncRspMsg, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)syncRspMsg, sizeof(CtfCnmCellSyncRsp)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, &transId, syncRspMsg)); } /*---------------------------------------------------------------*/ S16 cmPkCtfcfgIndInfo ( CtfCnmCellSyncInd *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt8, param->status, mBuf); CMCHKPK(cmPkCtfCnmVendorSpecificInfo, ¶m->ctfCnmVendorSpecificInfo, mBuf); return ROK; } /** * @brief Configuration Request from App to CL for * cnm Init Sync responce. * * @details * * Function: cmPkCtfCnmCellSyncInd * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId * transId * @param[in] CtfCnmCellSyncInd* ctfcnmCellSyncInd * @return S16 * -# ROK **/ S16 cmPkCtfCnmCellSyncInd ( Pst* pst, SpId spId, CtfCfgTransId *transId, CtfCnmCellSyncInd * cfgIndInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfcfgIndInfo(cfgIndInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)cfgIndInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd)); SPutMsg(mBuf); return RFAILED; } } if(cmPkCtfCfgTransId(transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgIndInfo, sizeof(CtfCnmCellSyncInd)); } pst->event = (Event)EVTCTFCNMSYNCIND; return (SPstTsk(pst,mBuf)); } /*---------------------------------------------------------------*/ S16 cmUnpkCtfCnmSyncIndMsg ( CtfCnmCellSyncInd *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkCtfCnmVendorSpecificInfo, ¶m->ctfCnmVendorSpecificInfo, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->status, mBuf); return ROK; } /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCnmCellSyncInd * * @param[in] CtfCnmCellSyncIndMsg func * @param[in] Pst* pst * @param[in] Buffer *mBuf * @return S16 * -# ROK **/ S16 cmUnpkCtfCnmCellSyncInd ( CtfCnmCellSyncIndMsg func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfCnmCellSyncInd *syncIndMsg = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&syncIndMsg, sizeof(CtfCnmCellSyncInd))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&syncIndMsg, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfCnmSyncIndMsg(syncIndMsg, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)syncIndMsg, sizeof(CtfCnmCellSyncInd)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, &transId, syncIndMsg)); } /********************************************************************************************************************************/ /*END OF CNM PACK & UNPACK FUNCTIONS*/ /********************************************************************************************************************************/ /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmPkCtfCfgReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId transId * @param[in] CtfCfgReqInfo* cfgReqInfo * @return S16 * -# ROK **/ S16 cmPkCtfCfgReq ( Pst* pst, SpId spId, CtfCfgTransId transId, CtfCfgReqInfo* cfgReqInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, "Packing failed"); #endif cmRelCtfCfgReq(pst, cfgReqInfo); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfCfgReqInfo(cfgReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, "Packing failed"); #endif cmRelCtfCfgReq(pst, cfgReqInfo); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)cfgReqInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif cmRelCtfCfgReq(pst, cfgReqInfo); SPutMsg(mBuf); return RFAILED; } } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif cmRelCtfCfgReq(pst, cfgReqInfo); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif cmRelCtfCfgReq(pst, cfgReqInfo); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { cmRelCtfCfgReq(pst, cfgReqInfo); } pst->event = (Event) EVTCTFCFGREQ; return (SPstTsk(pst,mBuf)); } #ifdef TENB_AS_SECURITY /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfNhKeyInfo ( CtfNhKeyInfo *param, Buffer *mBuf ) { uint8_t idx; CMCHKUNPK(oduUnpackUInt16, ¶m->dlCarrFreq, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->physCellId, mBuf); for(idx=0;idx<32;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfKenbStarInfo ( CtfKenbStarInfo *param, Buffer *mBuf ) { uint8_t idx; CMCHKUNPK(oduUnpackUInt16, ¶m->dlCarrFreq, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->physCellId, mBuf); for(idx=0;idx<32;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfAskeyInfo ( CtfAsKeyInfo *param, Buffer *mBuf ) { uint8_t idx; CMCHKUNPK(oduUnpackUInt8, ¶m->intgAlgoType, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->ciphAlgoType, mBuf); for(idx=0;idx<32;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * * **********************************************************/ S16 cmUnpkCtfKdfReqInfo ( CtfKdfReqInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->keyDerType, mBuf); switch (param->keyDerType) { case CTF_KDF_TYPE1: CMCHKUNPK(cmUnpkCtfAskeyInfo, ¶m->u.kEnbInf, mBuf); break; case CTF_KDF_TYPE2: CMCHKUNPK(cmUnpkCtfKenbStarInfo, ¶m->u.kEnbStarInf, mBuf); break; case CTF_KDF_TYPE3: CMCHKUNPK(cmUnpkCtfNhKeyInfo, ¶m->u.nhKeyInf, mBuf); break; default : return RFAILED; } return ROK; } /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCfgReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId transId * @param[in] CtfCfgReqInfo* cfgReqInfo * @return S16 * -# ROK **/ S16 cmUnpkCtfKdfReq ( CtfKdfReq func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfKdfReqInfo *kdfReqInfo = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&kdfReqInfo, sizeof(CtfKdfReqInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { /*if (oduUnpackPointer((PTR *)&cfgReqInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; }*/ } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfKdfReqInfo(kdfReqInfo, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfReqInfo, sizeof(CtfKdfReqInfo)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, transId, kdfReqInfo)); } #endif /** * @brief Configuration Request from RRC to PHY for * cell or dedicated configuration. * * @details * * Function: cmUnpkCtfCfgReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId transId * @param[in] CtfCfgReqInfo* cfgReqInfo * @return S16 * -# ROK **/ S16 cmUnpkCtfCfgReq ( CtfCfgReq func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfCfgReqInfo *cfgReqInfo = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF022, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF023, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&cfgReqInfo, sizeof(CtfCfgReqInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&cfgReqInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfCfgReqInfo(pst,cfgReqInfo, mBuf) != ROK) { cmRelCtfCfgReq(pst, cfgReqInfo); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, transId, cfgReqInfo)); } #ifdef TENB_AS_SECURITY /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfNhKeyCfmInfo ( CtfNhKeyCfmInfo *param, Buffer *mBuf ) { S16 idx; for(idx=31;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfKenbStarCfmInfo ( CtfKenbStarCfmInfo *param, Buffer *mBuf ) { S16 idx; for(idx=31;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfAskeyCfmInfo ( CtfAskeyCfmInfo *param, Buffer *mBuf ) { S16 idx; for(idx=15;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->cpCiphKey[idx],mBuf); } for(idx=15;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->upCiphKey[idx],mBuf); } for(idx=15;idx>=0;idx--) { CMCHKPK(oduPackUInt8,param->intKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * * **********************************************************/ S16 cmPkCtfKdfCfmInfo ( CtfKdfCfmInfo *param, Buffer *mBuf ) { switch (param->keyDerType) { case CTF_KDF_TYPE1: CMCHKPK(cmPkCtfAskeyCfmInfo, ¶m->u.kEnbInf, mBuf); break; case CTF_KDF_TYPE2: CMCHKPK(cmPkCtfKenbStarCfmInfo, ¶m->u.kEnbStarInf, mBuf); break; case CTF_KDF_TYPE3: CMCHKPK(cmPkCtfNhKeyCfmInfo, ¶m->u.nhKeyInf, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->keyDerType, mBuf); return ROK; } /** * @brief Configuration Confirm from PHY to RRC. * * @details * * Function: cmPkCtfCfgCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmPkCtfKdfCfm ( Pst* pst, SuId suId, CtfCfgTransId transId, CtfKdfCfmInfo *kdfCfmInfo, uint8_t status ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF026, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)); return RFAILED; } if (oduPackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF027, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)); SPutMsg(mBuf); return RFAILED; } if (cmPkCtfKdfCfmInfo(kdfCfmInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)); SPutMsg(mBuf); return RFAILED; } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF029, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)); SPutMsg(mBuf); return RFAILED; } if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)kdfCfmInfo, sizeof(CtfKdfCfmInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF021, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } pst->event = (Event) EVTCTFKDFCFM; return (SPstTsk(pst,mBuf)); } #endif /** * @brief Configuration Confirm from PHY to RRC. * * @details * * Function: cmPkCtfCfgCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmPkCtfCfgCfm ( Pst* pst, SuId suId, CtfCfgTransId transId, uint8_t status ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF026, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (oduPackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF027, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF029, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } pst->event = (Event) EVTCTFCFGCFM; return (SPstTsk(pst,mBuf)); } /** * @brief ENB STOP Indication from PHY to ENB-APP. * * @details * * Function: cmPkCtfEnbStopInd * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @return S16 * -# ROK **/ S16 cmPkCtfEnbStopInd ( Pst* pst, SuId suId, CtfCfgTransId transId ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF026, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF028, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF029, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } pst->event = (Event) EVTCTFENBSTOPIND; return (SPstTsk(pst,mBuf)); } #ifdef TENB_AS_SECURITY /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfNhKeyCfmInfo ( CtfNhKeyCfmInfo *param, Buffer *mBuf ) { uint8_t idx; for(idx=0;idx<32;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfKenbStarCfmInfo ( CtfKenbStarCfmInfo *param, Buffer *mBuf ) { uint8_t idx; for(idx=0;idx<32;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->secKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfAskeyCfmInfo ( CtfAskeyCfmInfo *param, Buffer *mBuf ) { uint8_t idx; for(idx=0;idx<16;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->intKey[idx],mBuf); } for(idx=0;idx<16;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->upCiphKey[idx],mBuf); } for(idx=0;idx<16;idx++) { CMCHKUNPK(oduUnpackUInt8,¶m->cpCiphKey[idx],mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfKenbCfgInfo * * * Desc: Key derivation funtion Input Information * @details This funtion packs the the CtfKenbCfgInfo structure * which contains the eNodeB key and Algorithm Type for * deriving AS security keys. * * * Ret : S16 * * Notes: * * File: * * **********************************************************/ S16 cmUnpkCtfKdfCfmInfo ( CtfKdfCfmInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->keyDerType, mBuf); switch (param->keyDerType) { case CTF_KDF_TYPE1: CMCHKUNPK(cmUnpkCtfAskeyCfmInfo, ¶m->u.kEnbInf, mBuf); break; case CTF_KDF_TYPE2: CMCHKUNPK(cmUnpkCtfKenbStarCfmInfo, ¶m->u.kEnbStarInf, mBuf); break; case CTF_KDF_TYPE3: CMCHKUNPK(cmUnpkCtfNhKeyCfmInfo, ¶m->u.nhKeyInf, mBuf); break; default : return RFAILED; } return ROK; } /** * @brief Configuration Confirm from PHY to RRC. * * @details * * Function: cmUnpkCtfCfgCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmUnpkCtfKdfCfm ( CtfKdfCfm func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; CtfCfgTransId transId; uint8_t status; CtfKdfCfmInfo kdfCfmInfo; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfKdfCfmInfo(&kdfCfmInfo, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (oduUnpackUInt8(&status, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF032, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, transId,&kdfCfmInfo, status)); } #endif /** * @brief Configuration Confirm from PHY to RRC. * * @details * * Function: cmUnpkCtfCfgCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmUnpkCtfCfgCfm ( CtfCfgCfm func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; CtfCfgTransId transId; uint8_t status; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (oduUnpackUInt8(&status, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF032, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, transId, status)); } /** * @brief ENB STOP Indication from PHY to ENB-APP * * @details * * Function: cmUnpkCtfEnbStopInd * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @return S16 * -# ROK **/ S16 cmUnpkCtfEnbStopInd ( CtfEnbStopInd func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; CtfCfgTransId transId; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, transId)); } /** * @brief UE ID Change Request from RRC to PHY. * * @details * * Function: cmPkCtfUeIdChgReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId transId * @param[in] CtfUeInfo * ueInfo * @param[in] CtfUeInfo * newUeInfo * @return S16 * -# ROK **/ S16 cmPkCtfUeIdChgReq ( Pst* pst, SpId spId, CtfCfgTransId transId, CtfUeInfo * ueInfo, CtfUeInfo * newUeInfo ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF033, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfUeInfo(newUeInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF034, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)newUeInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF035, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfUeInfo(ueInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF036, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)ueInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF037, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF038, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF039, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF040, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF041, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } pst->event = (Event) EVTCTFUEIDCHGREQ; return (SPstTsk(pst,mBuf)); } /** * @brief UE ID Change Request from RRC to PHY. * * @details * * Function: cmUnpkCtfUeIdChgReq * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId transId * @param[in] CtfUeInfo * ueInfo * @param[in] CtfUeInfo * newUeInfo * @return S16 * -# ROK **/ S16 cmUnpkCtfUeIdChgReq ( CtfUeIdChgReq func, Pst *pst, Buffer *mBuf ) { SpId spId = 0; CtfCfgTransId transId; CtfUeInfo *ueInfo = NULLP; CtfUeInfo *newUeInfo = NULLP; if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)& __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF042, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF043, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&ueInfo, sizeof(CtfUeInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF044, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&ueInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfUeInfo(ueInfo, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF045, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&newUeInfo, sizeof(CtfUeInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF046, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&newUeInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfUeInfo(newUeInfo, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)newUeInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF047, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, spId, transId, ueInfo, newUeInfo)); } /** * @brief UE ID Change Confirm from PHY to RRC. * * @details * * Function: cmPkCtfUeIdChgCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @param[in] CtfUeInfo * ueInfo * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmPkCtfUeIdChgCfm ( Pst* pst, SuId suId, CtfCfgTransId transId, CtfUeInfo * ueInfo, CmStatus status ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF048, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); return RFAILED; } if (cmPkCmStatus(&status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF049, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfUeInfo(ueInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF050, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)ueInfo, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF051, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } } if (cmPkCtfCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF052, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF053, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF054, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } pst->event = (Event) EVTCTFUEIDCHGCFM; return (SPstTsk(pst,mBuf)); } /** * @brief UE ID Change Confirm from PHY to RRC. * * @details * * Function: cmUnpkCtfUeIdChgCfm * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @param[in] CtfUeInfo * ueInfo * @param[in] uint8_t status * @return S16 * -# ROK **/ S16 cmUnpkCtfUeIdChgCfm ( CtfUeIdChgCfm func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; CtfCfgTransId transId; CtfUeInfo *ueInfo = NULLP; CmStatus status; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF055, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF056, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&ueInfo, sizeof(CtfUeInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF057, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&ueInfo, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfUeInfo(ueInfo, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF058, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCmStatus(&status, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ueInfo, sizeof(CtfUeInfo)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF059, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, transId, ueInfo, status)); } /*********************************************************** * * Func: cmPkCtfCfgTransId * * * Desc: Transaction ID between CTF and RRC. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCfgTransId ( CtfCfgTransId *param, Buffer *mBuf ) { S32 i; for (i=CTF_CFG_TRANSID_SIZE-1; i >= 0; i--) { CMCHKPK(oduPackUInt8, param->trans[i], mBuf); } return ROK; } /*********************************************************** * * Func: cmUnpkCtfCfgTransId * * * Desc: Transaction ID between CTF and RRC. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCfgTransId ( CtfCfgTransId *param, Buffer *mBuf ) { S32 i; for (i=0; itrans[i], mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfUeInfo * * * Desc: * UE ID information * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfUeInfo ( CtfUeInfo *param, Buffer *mBuf ) { CMCHKPK(cmPkLteRnti, param->ueId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfUeInfo * * * Desc: * UE ID information * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfUeInfo ( CtfUeInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfBwCfgInfo * * * Desc: Bandwidth Configuration * @details This structure contains the uplink and downlink bandwidth * information for configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfBwCfgInfo ( CtfBwCfgInfo *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt8, param->eUtraBand, mBuf); CMCHKPK(oduPackUInt32, param->ulBw, mBuf); CMCHKPK(oduPackUInt32, param->dlBw, mBuf); /* ctf_c_001.main_4: Removed packing of param->pres */ return ROK; } /*********************************************************** * * Func: cmUnpkCtfBwCfgInfo * * * Desc: Bandwidth Configuration * @details This structure contains the uplink and downlink bandwidth * information for configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfBwCfgInfo ( CtfBwCfgInfo *param, Buffer *mBuf ) { uint32_t tmpEnum; /* ctf_c_001.main_4: Removed UnPacking of param->pres */ CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->dlBw = (CtfBandwidth)tmpEnum; CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->ulBw = (CtfBandwidth)tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->eUtraBand, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfTxSchemeCfg * * * Desc: Transmission Scheme Configuration * @details This structure contains the transmission scheme related information. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfTxSchemeCfg ( CtfTxSchemeCfg *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt32, param->cycPfx, mBuf); CMCHKPK(oduPackUInt32, param->scSpacing, mBuf); CMCHKPK(oduPackUInt32, param->duplexMode, mBuf); /* ctf_c_001.main_4: Removed packing of param->pres */ return ROK; } /*********************************************************** * * Func: cmUnpkCtfTxSchemeCfg * * * Desc: Transmission Scheme Configuration * @details This structure contains the transmission scheme related information. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfTxSchemeCfg ( CtfTxSchemeCfg *param, Buffer *mBuf ) { uint32_t tmpEnum; /* ctf_c_001.main_4: Removed UnPacking of param->pres */ CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->duplexMode = (CtfDuplexMode)tmpEnum; CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->scSpacing = (CtfSCSpacing)tmpEnum; CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->cycPfx = (CtfCPCfg)tmpEnum; return ROK; } /*********************************************************** * * Func: cmPkCtfAntennaCfgInfo * * * Desc: Antenna Ports configuration * @details This structure contains the antenna configuration information for * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfAntennaCfgInfo ( CtfAntennaCfgInfo *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt32, param->antPortsCnt, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfAntennaCfgInfo * * * Desc: Antenna Ports configuration * @details This structure contains the antenna configuration information for * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfAntennaCfgInfo ( CtfAntennaCfgInfo *param, Buffer *mBuf ) { uint32_t tmpEnum; CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->antPortsCnt = (CtfAntennaPortsCount)tmpEnum; return ROK; } /*********************************************************** * * Func: cmPkCtfPrachCfgInfo * * * Desc: PRACH configuration * @details This structure contains the configuration information for PRACH at PHY. * -# PRACH preamble sequences are generated by PHY using Zadoff-Chu * sequences.[Ref: 36.211, 5.7.2] * -# PRACH preamble format is derived from PRACH Configuration Index. * [Ref: 36.211, Table 5.7.1-2] * -# PrachFreqOffset is the first physical resource block allocated to * the PRACH opportunity considered for preamble format 0, 1, 2, and 3. * [Ref: 36.211, 5.7.1] * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPrachCfgInfo ( CtfPrachCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->prachFreqOffset, mBuf); CMCHKPK(oduPackUInt8, param->highSpeedFlag, mBuf); CMCHKPK(oduPackUInt8, param->zeroCorrelationZoneCfg, mBuf); CMCHKPK(oduPackUInt8, param->prachCfgIndex, mBuf); CMCHKPK(oduPackUInt16, param->rootSequenceIndex, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPrachCfgInfo * * * Desc: PRACH configuration * @details This structure contains the configuration information for PRACH at PHY. * -# PRACH preamble sequences are generated by PHY using Zadoff-Chu * sequences.[Ref: 36.211, 5.7.2] * -# PRACH preamble format is derived from PRACH Configuration Index. * [Ref: 36.211, Table 5.7.1-2] * -# PrachFreqOffset is the first physical resource block allocated to * the PRACH opportunity considered for preamble format 0, 1, 2, and 3. * [Ref: 36.211, 5.7.1] * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPrachCfgInfo ( CtfPrachCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt16, ¶m->rootSequenceIndex, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->prachCfgIndex, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->zeroCorrelationZoneCfg, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->highSpeedFlag, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->prachFreqOffset, mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfPdschCfgInfo * * * Desc: PDSCH configuration * @details This structure contains the PDSCH configuration information for * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPdschCfgInfo ( CtfPdschCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->p_b, mBuf); CMCHKPK(SPkS16, param->refSigPwr, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPdschCfgInfo * * * Desc: PDSCH configuration * @details This structure contains the PDSCH configuration information for * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPdschCfgInfo ( CtfPdschCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(SUnpkS16, ¶m->refSigPwr, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->p_b, mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfPuschCfgBasic * * * Desc: Basic PUSCH configuration * @details This structure contains the basic PUSCH configuration information for * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPuschCfgBasic ( CtfPuschCfgBasic *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt8, param->enable64QAM, mBuf); CMCHKPK(oduPackUInt8, param->hoppingOffset, mBuf); CMCHKPK(oduPackUInt32, param->hoppingMode, mBuf); CMCHKPK(oduPackUInt8, param->noOfsubBands, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPuschCfgBasic * * * Desc: Basic PUSCH configuration * @details This structure contains the basic PUSCH configuration information for * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPuschCfgBasic ( CtfPuschCfgBasic *param, Buffer *mBuf ) { uint32_t tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->noOfsubBands, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->hoppingMode = (CtfPuschHoppingMode)tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->hoppingOffset, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->enable64QAM, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfPuschUlRS * * * Desc: PUSCH Uplink Reference Signals configuration * @details This structure contains the PUSCH configuration information for * uplink reference signals configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPuschUlRS ( CtfPuschUlRS *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt8, param->cycShift, mBuf); CMCHKPK(oduPackUInt8, param->grpNum, mBuf); CMCHKPK(oduPackUInt8, param->seqHopEnabled, mBuf); CMCHKPK(oduPackUInt8, param->grpHopEnabled, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPuschUlRS * * * Desc: PUSCH Uplink Reference Signals configuration * @details This structure contains the PUSCH configuration information for * uplink reference signals configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPuschUlRS ( CtfPuschUlRS *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->grpHopEnabled, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->seqHopEnabled, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->grpNum, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cycShift, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfPuschCfgInfo * * * Desc: PUSCH configuration * @details This structure contains the information for PUSCH * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPuschCfgInfo ( CtfPuschCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(cmPkCtfPuschUlRS, ¶m->puschUlRS, mBuf); CMCHKPK(cmPkCtfPuschCfgBasic, ¶m->puschBasicCfg, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPuschCfgInfo * * * Desc: PUSCH configuration * @details This structure contains the information for PUSCH * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPuschCfgInfo ( CtfPuschCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(cmUnpkCtfPuschCfgBasic, ¶m->puschBasicCfg, mBuf); CMCHKUNPK(cmUnpkCtfPuschUlRS, ¶m->puschUlRS, mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfPhichCfgInfo * * * Desc: PHICH configuration * @details This structure contains the duration and resource information for * PHICH configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPhichCfgInfo ( CtfPhichCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt32, param->resource, mBuf); CMCHKPK(oduPackUInt32, param->duration, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPhichCfgInfo * * * Desc: PHICH configuration * @details This structure contains the duration and resource information for * PHICH configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPhichCfgInfo ( CtfPhichCfgInfo *param, Buffer *mBuf ) { uint32_t tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->duration = (CtfPhichDuration)tmpEnum; CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->resource = (CtfPhichResource)tmpEnum; } return ROK; } /*********************************************************** * * Func: cmPkCtfPucchCfgInfo * * * Desc: PUCCH configuration * @details This structure contains the information for PUCCH * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPucchCfgInfo ( CtfPucchCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt32, param->deltaShift, mBuf); CMCHKPK(oduPackUInt16, param->n1PUCCH, mBuf); CMCHKPK(oduPackUInt8, param->nCS, mBuf); CMCHKPK(oduPackUInt8, param->nRB, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfPucchCfgInfo * * * Desc: PUCCH configuration * @details This structure contains the information for PUCCH * configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfPucchCfgInfo ( CtfPucchCfgInfo *param, Buffer *mBuf ) { uint32_t tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->nRB, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->nCS, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->n1PUCCH, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->deltaShift = (CtfPucchDeltaShift)tmpEnum; } return ROK; } /*********************************************************** * * Func: cmPkCtfSrsUlCfgInfo * * * Desc: SRS uplink configuration * @details This structure contains the information for setting-up/release * of uplink SRS configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfSrsUlCfgInfo ( CtfSrsUlCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->srsSetup.srsMaxUpPts, mBuf); CMCHKPK(oduPackUInt8, param->srsSetup.srsANSimultTx, mBuf); CMCHKPK(oduPackUInt8, param->srsSetup.sfCfg, mBuf); CMCHKPK(oduPackUInt8, param->srsSetup.srsBw, mBuf); CMCHKPK(oduPackUInt8, param->srsCfgType, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfSrsUlCfgInfo * * * Desc: SRS uplink configuration * @details This structure contains the information for setting-up/release * of uplink SRS configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfSrsUlCfgInfo ( CtfSrsUlCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->srsCfgType, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->srsSetup.srsBw, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->srsSetup.sfCfg, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->srsSetup.srsANSimultTx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->srsSetup.srsMaxUpPts, mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfTddSfCfgInfo * * * Desc: Subframe Configuration for TDD mode. * @details This structure contains the information for setting-up * the subframe for TDD mode at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfTddSfCfgInfo ( CtfTddSfCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->spclSfPatterns, mBuf); CMCHKPK(oduPackUInt8, param->sfAssignment, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /* ctf_c_001.main_4: Added support for vendor specific parameters */ #ifdef CTF_VER3 /*********************************************************** * * Func: cmPkCtfVendorSpecParams * * * Desc: Vendor Specific Parameter configuration * @details This structure contains the Parameters which is spaciftc to * Vendor. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfVendorSpecParams ( CtfVendorSpecific *param, Buffer *mBuf ) { if( param->buffLen != 0) { SAddPreMsgMultInOrder(param->paramBuffer,param->buffLen,mBuf); } CMCHKPK(oduPackUInt16,param->buffLen,mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfVendorSpecParams * * * Desc: Vendor Specific Parameter configuration * @details This structure contains the Parameters which is spaciftc to * Vendor. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfVendorSpecParams ( Pst *pst, CtfVendorSpecific *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt16, ¶m->buffLen, mBuf); if(param->buffLen != 0) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)¶m->paramBuffer, param->buffLen)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF060, (ErrVal)0, (Txt*)&"Unpacking failed"); #endif return RFAILED ; } SRemPreMsgMult(param->paramBuffer, param->buffLen,mBuf) ; } else { param->paramBuffer = NULLP ; } return ROK; } #endif /*********************************************************** * * Func: cmUnpkCtfTddSfCfgInfo * * * Desc: Subframe Configuration for TDD mode. * @details This structure contains the information for setting-up * the subframe for TDD mode at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfTddSfCfgInfo ( CtfTddSfCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->sfAssignment, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->spclSfPatterns, mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfUnLicnsdCellParam * * * Desc: Packing unlicensed SDL cell specific parameter * * * Ret: S16 * * Notes: * * File: * **********************************************************/ static S16 cmPkCtfUnLicnsdCellParam ( CtfUnLicnsdCfgInfo *param, Buffer *mBuf ) { uint8_t idx; CMCHKPK(SPkS32, param->txPowerLimit, mBuf); CMCHKPK(oduPackUInt8, param->coExistMethod, mBuf); CMCHKPK(oduPackUInt8, param->lteOnPeriod, mBuf); CMCHKPK(oduPackUInt8, param->ccaMethod, mBuf); CMCHKPK(oduPackUInt8, param->adaptiveTx, mBuf); CMCHKPK(oduPackUInt16, param->transPeriod, mBuf); CMCHKPK(oduPackUInt16, param->listenPrd, mBuf); CMCHKPK(SPkS16, param->energyTh, mBuf); CMCHKPK(oduPackUInt16, param->scanTimePrd, mBuf); CMCHKPK(oduPackUInt16, param->activityTh, mBuf); for(idx = 0; idx < param->numFreq; idx++) { CMCHKPK(oduPackUInt32, param->earfcn[idx], mBuf); } CMCHKPK(oduPackUInt8, param->numFreq, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfCellCfgInfo * * * Desc: Cell Configuration Information * @details This structure contains the information for setting-up * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCellCfgInfo ( CtfCellCfgInfo *param, Buffer *mBuf ) { #ifdef EMTC_ENABLE S32 i; #endif #ifdef EMTC_ENABLE for (i = CTF_MAX_CE_LEVEL-1; i >= 0; i--) { CMCHKPK(oduPackUInt8, param->ceLevelInfo[i].emtcNumRepPerPreambleAtt, mBuf); CMCHKPK(oduPackUInt8, param->ceLevelInfo[i].lastPreamble, mBuf); CMCHKPK(oduPackUInt8, param->ceLevelInfo[i].firstPreamble, mBuf); } CMCHKPK(oduPackUInt8, param->mPdcchStart, mBuf); CMCHKPK(oduPackUInt8, param->catMenabled, mBuf); #endif if(param->unLicnsdCfgPres) { DU_LOG("\nDEBUG --> pverma param->unLicnsdCfgPres cm/ctf -->%d\n",param->unLicnsdCfgPres); CMCHKPK(cmPkCtfUnLicnsdCellParam, ¶m->lteUCfg, mBuf); } CMCHKPK(oduPackUInt8, param->unLicnsdCfgPres, mBuf); /*Added for rgu dynamic delta*/ CMCHKPK(oduPackUInt8, param->numDlUePerTti, mBuf); CMCHKPK(SPkS16, param->pilotSigPwr, mBuf); CMCHKPK(oduPackUInt16, param->ulEarfcn, mBuf); CMCHKPK(oduPackUInt16, param->dlEarfcn, mBuf); CMCHKPK(SPkS16, param->priSigPwr, mBuf); CMCHKPK(SPkS16, param->secSigPwr, mBuf); /* Packing PHY configuration parameters */ CMCHKPK(oduPackUInt32, param->period, mBuf); CMCHKPK(oduPackUInt32, param->counter, mBuf); CMCHKPK(oduPackUInt16, param->opMode, mBuf); /* ctf_c_001.main_3: Added the pack for newly added fileds inside the CFG structure*/ CMCHKPK(oduPackUInt8, param->rachSrRepModePres, mBuf); CMCHKPK(oduPackUInt16, param->rachSrRepMode, mBuf); CMCHKPK(oduPackUInt8, param->dataRepModePres, mBuf); CMCHKPK(oduPackUInt16, param->dataRepMode, mBuf); CMCHKPK(oduPackUInt8, param->phySyncModePres, mBuf); CMCHKPK(oduPackUInt16, param->phySyncMode, mBuf); CMCHKPK(oduPackUInt8, param->rxAntennaPortsPres, mBuf); CMCHKPK(oduPackUInt16, param->rxAntennaPorts, mBuf); CMCHKPK(oduPackUInt8, param->txAntennaPortsPres, mBuf); CMCHKPK(oduPackUInt16, param->txAntennaPorts, mBuf); CMCHKPK(oduPackUInt8, param->pucchProbDtxAckPres, mBuf); CMCHKPK(oduPackUInt16, param->pucchProbDtxAck, mBuf); CMCHKPK(oduPackUInt8, param->puschProbDtxAckPres, mBuf); CMCHKPK(oduPackUInt16, param->puschProbDtxAck, mBuf); CMCHKPK(oduPackUInt8, param->srsDopEstFactorPres, mBuf); CMCHKPK(oduPackUInt16, param->srsDopEstFactor, mBuf); CMCHKPK(oduPackUInt8, param->prachPkRatio0Pres, mBuf); CMCHKPK(oduPackUInt16, param->prachPkRatio0, mBuf); CMCHKPK(oduPackUInt8, param->prachPkRatio4Pres, mBuf); CMCHKPK(oduPackUInt16, param->prachPkRatio4, mBuf); CMCHKPK(oduPackUInt8, param->pucchNoiseGammaPres, mBuf); CMCHKPK(oduPackUInt16, param->pucchNoiseGamma, mBuf); CMCHKPK(oduPackUInt8, param->extWinMarginPres, mBuf); CMCHKPK(oduPackUInt16, param->extWinMargin, mBuf); CMCHKPK(oduPackUInt8, param->dciPowOsPres, mBuf); CMCHKPK(oduPackUInt16, param->dciPowOs, mBuf); CMCHKPK(oduPackUInt8, param->cfiPowOsPres, mBuf); CMCHKPK(oduPackUInt16, param->cfiPowOs, mBuf); CMCHKPK(oduPackUInt8, param->syncSigPowOsPres, mBuf); CMCHKPK(oduPackUInt16, param->syncSigPowOs, mBuf); CMCHKPK(cmPkCtfTddSfCfgInfo, ¶m->tddSfCfg, mBuf); CMCHKPK(cmPkCtfSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKPK(cmPkCtfPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKPK(cmPkCtfPhichCfgInfo, ¶m->phichCfg, mBuf); CMCHKPK(cmPkCtfPuschCfgInfo, ¶m->puschCfg, mBuf); CMCHKPK(cmPkCtfPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKPK(cmPkCtfPrachCfgInfo, ¶m->prachCfg, mBuf); CMCHKPK(cmPkCtfAntennaCfgInfo, ¶m->antennaCfg, mBuf); CMCHKPK(cmPkCtfTxSchemeCfg, ¶m->txCfg, mBuf); CMCHKPK(cmPkCtfBwCfgInfo, ¶m->bwCfg, mBuf); CMCHKPK(oduPackUInt8, param->physCellId, mBuf); CMCHKPK(oduPackUInt8, param->physCellIdPres, mBuf); CMCHKPK(SPkS16, param->macSapId, mBuf); CMCHKPK(SPkS16, param->schSapId, mBuf); CMCHKPK(oduPackUInt8, param->cellIdGrpId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfUnLicnsdCellParam * * * Desc: Unpacking unLicensed SDL cell specific parameter * * * Ret: S16 * * Notes: * * File: * **********************************************************/ static S16 cmUnpkCtfUnLicnsdCellParam ( CtfUnLicnsdCfgInfo *param, Buffer *mBuf ) { uint8_t idx; CMCHKUNPK(oduUnpackUInt8, ¶m->numFreq, mBuf); for(idx = 0; idx < param->numFreq; idx++) { CMCHKUNPK(oduUnpackUInt32, ¶m->earfcn[idx], mBuf); } CMCHKUNPK(oduUnpackUInt16, ¶m->activityTh, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->scanTimePrd, mBuf); CMCHKUNPK(SUnpkS16, ¶m->energyTh, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->listenPrd, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->transPeriod, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->adaptiveTx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->ccaMethod, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->lteOnPeriod, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->coExistMethod, mBuf); CMCHKUNPK(SUnpkS32, ¶m->txPowerLimit, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCellCfgInfo * * * Desc: Cell Configuration Information * @details This structure contains the information for setting-up * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCellCfgInfo ( CtfCellCfgInfo *param, Buffer *mBuf ) { #ifdef EMTC_ENABLE S32 i; #endif /* ctf_c_001.main_3: Added the unpack for newly added fileds inside the CFG structure*/ CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cellIdGrpId, mBuf); CMCHKUNPK(SUnpkS16, ¶m->schSapId, mBuf); CMCHKUNPK(SUnpkS16, ¶m->macSapId, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->physCellIdPres, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->physCellId, mBuf); CMCHKUNPK(cmUnpkCtfBwCfgInfo, ¶m->bwCfg, mBuf); CMCHKUNPK(cmUnpkCtfTxSchemeCfg, ¶m->txCfg, mBuf); CMCHKUNPK(cmUnpkCtfAntennaCfgInfo, ¶m->antennaCfg, mBuf); CMCHKUNPK(cmUnpkCtfPrachCfgInfo, ¶m->prachCfg, mBuf); CMCHKUNPK(cmUnpkCtfPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKUNPK(cmUnpkCtfPuschCfgInfo, ¶m->puschCfg, mBuf); CMCHKUNPK(cmUnpkCtfPhichCfgInfo, ¶m->phichCfg, mBuf); CMCHKUNPK(cmUnpkCtfPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKUNPK(cmUnpkCtfSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKUNPK(cmUnpkCtfTddSfCfgInfo, ¶m->tddSfCfg, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->syncSigPowOs, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->syncSigPowOsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->cfiPowOs, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cfiPowOsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dciPowOs, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dciPowOsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->extWinMargin, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->extWinMarginPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->pucchNoiseGamma, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->pucchNoiseGammaPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->prachPkRatio4, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->prachPkRatio4Pres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->prachPkRatio0, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->prachPkRatio0Pres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->srsDopEstFactor, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->srsDopEstFactorPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->puschProbDtxAck, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->puschProbDtxAckPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->pucchProbDtxAck, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->pucchProbDtxAckPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->txAntennaPorts, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->txAntennaPortsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->rxAntennaPorts, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->rxAntennaPortsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->phySyncMode, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->phySyncModePres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dataRepMode, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dataRepModePres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->rachSrRepMode, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->rachSrRepModePres, mBuf); /* UnPacking PHY configuration parameters */ CMCHKUNPK(oduUnpackUInt16, ¶m->opMode, mBuf); CMCHKUNPK(oduUnpackUInt32, ¶m->counter, mBuf); CMCHKUNPK(oduUnpackUInt32, ¶m->period, mBuf); CMCHKUNPK(SUnpkS16, ¶m->priSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->secSigPwr, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dlEarfcn, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->ulEarfcn, mBuf); CMCHKUNPK(SUnpkS16, ¶m->pilotSigPwr, mBuf); /* Added for rgu dynamic delta change*/ CMCHKUNPK(oduUnpackUInt8, ¶m->numDlUePerTti, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->unLicnsdCfgPres, mBuf); if(param->unLicnsdCfgPres) { DU_LOG("\nDEBUG --> pverma param->unLicnsdCfgPres 2 -->%d \n",param->unLicnsdCfgPres); CMCHKUNPK(cmUnpkCtfUnLicnsdCellParam, ¶m->lteUCfg, mBuf); } #ifdef EMTC_ENABLE CMCHKUNPK(oduUnpackUInt8, ¶m->catMenabled, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->mPdcchStart, mBuf); for (i = 0; i < CTF_MAX_CE_LEVEL; i++) { CMCHKUNPK(oduUnpackUInt8, ¶m->ceLevelInfo[i].firstPreamble, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->ceLevelInfo[i].lastPreamble, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->ceLevelInfo[i].emtcNumRepPerPreambleAtt, mBuf); } #endif return ROK; } /* ctf_c_001.main_4: Modified cmPkCtfCellRecfgInfo() to Add support for * vendor specific parameters */ /*********************************************************** * * Func: cmPkCtfCellRecfgInfo * * * Desc: Cell Re-configuration Information * @details This structure contains the information for reconfiguration * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCellRecfgInfo ( CtfCellRecfgInfo *param, Buffer *mBuf ) { #ifdef ENABLE_API_LOG CMCHKPK(oduPackUInt8, param->enableAPILog, mBuf); #endif /* ENABLE_API_LOG */ /* ctf_c_001.main_3: Added the pack for newly added fileds inside the CFG structure*/ CMCHKPK(SPkS16, param->secSigPwr, mBuf); CMCHKPK(SPkS16, param->priSigPwr, mBuf); CMCHKPK(SPkS16, param->pilotSigPwr, mBuf); CMCHKPK(oduPackUInt8, param->rachSrRepModePres, mBuf); CMCHKPK(oduPackUInt16, param->rachSrRepMode, mBuf); CMCHKPK(oduPackUInt8, param->dataRepModePres, mBuf); CMCHKPK(oduPackUInt16, param->dataRepMode, mBuf); CMCHKPK(oduPackUInt8, param->phySyncModePres, mBuf); CMCHKPK(oduPackUInt16, param->phySyncMode, mBuf); CMCHKPK(oduPackUInt8, param->rxAntennaPortsPres, mBuf); CMCHKPK(oduPackUInt16, param->rxAntennaPorts, mBuf); CMCHKPK(oduPackUInt8, param->txAntennaPortsPres, mBuf); CMCHKPK(oduPackUInt16, param->txAntennaPorts, mBuf); CMCHKPK(oduPackUInt8, param->pucchProbDtxAckPres, mBuf); CMCHKPK(oduPackUInt16, param->pucchProbDtxAck, mBuf); CMCHKPK(oduPackUInt8, param->puschProbDtxAckPres, mBuf); CMCHKPK(oduPackUInt16, param->puschProbDtxAck, mBuf); CMCHKPK(oduPackUInt8, param->srsDopEstFactorPres, mBuf); CMCHKPK(oduPackUInt16, param->srsDopEstFactor, mBuf); CMCHKPK(oduPackUInt8, param->prachPkRatio0Pres, mBuf); CMCHKPK(oduPackUInt16, param->prachPkRatio0, mBuf); CMCHKPK(oduPackUInt8, param->prachPkRatio4Pres, mBuf); CMCHKPK(oduPackUInt16, param->prachPkRatio4, mBuf); CMCHKPK(oduPackUInt8, param->pucchNoiseGammaPres, mBuf); CMCHKPK(oduPackUInt16, param->pucchNoiseGamma, mBuf); CMCHKPK(oduPackUInt8, param->extWinMarginPres, mBuf); CMCHKPK(oduPackUInt16, param->extWinMargin, mBuf); CMCHKPK(oduPackUInt8, param->dciPowOsPres, mBuf); CMCHKPK(oduPackUInt16, param->dciPowOs, mBuf); CMCHKPK(oduPackUInt8, param->cfiPowOsPres, mBuf); CMCHKPK(oduPackUInt16, param->cfiPowOs, mBuf); CMCHKPK(oduPackUInt8, param->syncSigPowOsPres, mBuf); CMCHKPK(oduPackUInt16, param->syncSigPowOs, mBuf); CMCHKPK(cmPkCtfTddSfCfgInfo, ¶m->tddSfCfg, mBuf); CMCHKPK(cmPkCtfSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKPK(cmPkCtfPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKPK(cmPkCtfPhichCfgInfo, ¶m->phichCfg, mBuf); CMCHKPK(cmPkCtfPuschCfgInfo, ¶m->puschCfg, mBuf); CMCHKPK(cmPkCtfPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKPK(cmPkCtfPrachCfgInfo, ¶m->prachCfg, mBuf); CMCHKPK(cmPkLteTimingInfo, ¶m->actvnTime, mBuf); CMCHKPK(cmPkCtfAntennaCfgInfo, ¶m->antennaCfg, mBuf); CMCHKPK(cmPkCtfTxSchemeCfg, ¶m->txCfg, mBuf); CMCHKPK(cmPkCtfBwCfgInfo, ¶m->bwCfg, mBuf); CMCHKPK(oduPackUInt8, param->physCellId, mBuf); CMCHKPK(oduPackUInt8, param->physCellIdPres, mBuf); CMCHKPK(oduPackUInt8, param->cellIdGrpId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); CMCHKPK(oduPackUInt32, param->ctfReCfgType, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCellRecfgInfo * * * Desc: Cell Re-configuration Information * @details This structure contains the information for reconfiguration * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCellRecfgInfo ( CtfCellRecfgInfo *param, Buffer *mBuf ) { uint32_t tmpEnum; /* ctf_c_001.main_3: Added the unpack for newly added fileds inside the CFG structure*/ CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->ctfReCfgType = (CtfReCfgType)tmpEnum; CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cellIdGrpId, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->physCellIdPres, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->physCellId, mBuf); CMCHKUNPK(cmUnpkCtfBwCfgInfo, ¶m->bwCfg, mBuf); CMCHKUNPK(cmUnpkCtfTxSchemeCfg, ¶m->txCfg, mBuf); CMCHKUNPK(cmUnpkCtfAntennaCfgInfo, ¶m->antennaCfg, mBuf); CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->actvnTime, mBuf); CMCHKUNPK(cmUnpkCtfPrachCfgInfo, ¶m->prachCfg, mBuf); CMCHKUNPK(cmUnpkCtfPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKUNPK(cmUnpkCtfPuschCfgInfo, ¶m->puschCfg, mBuf); CMCHKUNPK(cmUnpkCtfPhichCfgInfo, ¶m->phichCfg, mBuf); CMCHKUNPK(cmUnpkCtfPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKUNPK(cmUnpkCtfSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKUNPK(cmUnpkCtfTddSfCfgInfo, ¶m->tddSfCfg, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->syncSigPowOs, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->syncSigPowOsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->cfiPowOs, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cfiPowOsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dciPowOs, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dciPowOsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->extWinMargin, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->extWinMarginPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->pucchNoiseGamma, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->pucchNoiseGammaPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->prachPkRatio4, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->prachPkRatio4Pres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->prachPkRatio0, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->prachPkRatio0Pres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->srsDopEstFactor, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->srsDopEstFactorPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->puschProbDtxAck, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->puschProbDtxAckPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->pucchProbDtxAck, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->pucchProbDtxAckPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->txAntennaPorts, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->txAntennaPortsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->rxAntennaPorts, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->rxAntennaPortsPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->phySyncMode, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->phySyncModePres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dataRepMode, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dataRepModePres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->rachSrRepMode, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->rachSrRepModePres, mBuf); CMCHKUNPK(SUnpkS16, ¶m->pilotSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->priSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->secSigPwr, mBuf); DU_LOG("\nDEBUG --> param->pilotSigPwr = %d\nparam->priSigPwr = %d\n param->secSigPwr = %d\n",param->pilotSigPwr,param->priSigPwr,param->secSigPwr); #ifdef ENABLE_API_LOG CMCHKUNPK(oduUnpackUInt8, ¶m->enableAPILog, mBuf); #endif /* ENABLE_API_LOG */ return ROK; } /*********************************************************** * * Func: cmPkCtfDedPdschCfgInfo * * * Desc: Dedicated PDSCH Configuration * @details This structure contains the information for PDSCH configuration * specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedPdschCfgInfo ( CtfDedPdschCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) CMCHKPK(oduPackUInt32, param->pA, mBuf); CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedPdschCfgInfo * * * Desc: Dedicated PDSCH Configuration * @details This structure contains the information for PDSCH configuration * specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedPdschCfgInfo ( CtfDedPdschCfgInfo *param, Buffer *mBuf ) { uint32_t tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->pA = (CtfPdschPaParam)tmpEnum; } return ROK; } /*********************************************************** * * Func: cmPkCtfDedPucchCfgInfo * * * Desc: Dedicated PUCCH Configuration * @details This structure contains the information for setting-up/release * PUCCH configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedPucchCfgInfo ( CtfDedPucchCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { #ifdef CTF_VER3 /*ctf_c_001.main_4:115549: packing tddAckNackFBMode and tddAckNackCfgPres */ if (param->tddAckNackCfgPres != FALSE) { CMCHKPK(oduPackUInt32, param->tddAckNackFBMode, mBuf); } CMCHKPK(oduPackUInt8, param->tddAckNackCfgPres, mBuf); #endif /* CTF_VER3 */ CMCHKPK(oduPackUInt16, param->pucchSetup.n1PUCCHRep, mBuf); #ifdef CTF_VER3 /*ctf_c_001.main_4:115549: packing pucchSetup.repFactPres */ if (param->pucchSetup.repFactPres) { CMCHKPK(oduPackUInt32, param->pucchSetup.repFact, mBuf); } CMCHKPK(oduPackUInt8, param->pucchSetup.repFactPres, mBuf); #else CMCHKPK(oduPackUInt32, param->pucchSetup.repFact, mBuf); #endif /* CTF_VER3 */ CMCHKPK(oduPackUInt8, param->dedPucchCfgType, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedPucchCfgInfo * * * Desc: Dedicated PUCCH Configuration * @details This structure contains the information for setting-up/release * PUCCH configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedPucchCfgInfo ( CtfDedPucchCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->dedPucchCfgType, mBuf); #ifdef CTF_VER3 /* ctf_c_001.main_4:115549: unpacking pucchSetup.repFactPres */ CMCHKUNPK(oduUnpackUInt8, ¶m->pucchSetup.repFactPres, mBuf); if (param->pucchSetup.repFactPres) { CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->pucchSetup.repFact, mBuf); } #else CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->pucchSetup.repFact, mBuf); #endif /*CTF_VER3 */ CMCHKUNPK(oduUnpackUInt16, ¶m->pucchSetup.n1PUCCHRep, mBuf); #ifdef CTF_VER3 /*ctf_c_001.main_4:115549: unpacking tddAckNackCfgPres and tddAckNackFBMode */ CMCHKUNPK(oduUnpackUInt8, ¶m->tddAckNackCfgPres, mBuf); if (param->tddAckNackCfgPres != FALSE) { CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->tddAckNackFBMode, mBuf); } #endif /* CTF_VER3 */ } return ROK; } /*********************************************************** * * Func: cmPkCtfDedPuschCfgInfo * * * Desc: Dedicated PUSCH Configuration * @details This structure contains the information for PUCCH * configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedPuschCfgInfo ( CtfDedPuschCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->betaOffsetCqiIdx, mBuf); CMCHKPK(oduPackUInt8, param->betaOffsetRiIdx, mBuf); CMCHKPK(oduPackUInt8, param->betaOffsetAckIdx, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedPuschCfgInfo * * * Desc: Dedicated PUSCH Configuration * @details This structure contains the information for PUCCH * configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedPuschCfgInfo ( CtfDedPuschCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->betaOffsetAckIdx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->betaOffsetRiIdx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->betaOffsetCqiIdx, mBuf); } return ROK; } #ifndef TFU_UPGRADE /*********************************************************** * * Func: cmPkCtfCqiRptModePeriodic * * * Desc: Periodic CQI Report Configuration * @details This structure contains the information for periodic CQI report * related configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCqiRptModePeriodic ( CtfCqiRptModePeriodic *param, Buffer *mBuf ) { /* ctf_c_001.main_2: added packning for cqiMask*/ #ifdef CTF_VER1 CMCHKPK(oduPackUInt32, (uint32_t )param->cqiSetup.cqiMask.cqiMaskSetup, mBuf); CMCHKPK(oduPackUInt8, param->cqiSetup.cqiMask.pres, mBuf); #endif /* CTF_VER1 */ CMCHKPK(oduPackUInt8, param->cqiSetup.simultaneousAckNack, mBuf); CMCHKPK(oduPackUInt16, param->cqiSetup.riCfgIndx, mBuf); CMCHKPK(oduPackUInt8, param->cqiSetup.riCfgPres, mBuf); CMCHKPK(oduPackUInt8, param->cqiSetup.subbandCqi.k, mBuf); CMCHKPK(oduPackUInt8, param->cqiSetup.formatIndicator, mBuf); CMCHKPK(oduPackUInt16, param->cqiSetup.cqiPmiCfgIndx, mBuf); CMCHKPK(oduPackUInt16, param->cqiSetup.cqiPUCCHRsrcIndx, mBuf); CMCHKPK(oduPackUInt8, param->cqiPeriodicCfgType, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCqiRptModePeriodic * * * Desc: Periodic CQI Report Configuration * @details This structure contains the information for periodic CQI report * related configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCqiRptModePeriodic ( CtfCqiRptModePeriodic *param, Buffer *mBuf ) { #ifdef CTF_VER1 uint32_t tmpEnum; #endif CMCHKUNPK(oduUnpackUInt8, ¶m->cqiPeriodicCfgType, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->cqiSetup.cqiPUCCHRsrcIndx, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->cqiSetup.cqiPmiCfgIndx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cqiSetup.formatIndicator, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cqiSetup.subbandCqi.k, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cqiSetup.riCfgPres, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->cqiSetup.riCfgIndx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->cqiSetup.simultaneousAckNack, mBuf); /* ctf_c_001.main_2: added Unpackning for cqiMask*/ #ifdef CTF_VER1 CMCHKUNPK(oduUnpackUInt8, ¶m->cqiSetup.cqiMask.pres, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->cqiSetup.cqiMask.cqiMaskSetup = tmpEnum; #endif /* CTF_VER1 */ return ROK; } /*********************************************************** * * Func: cmPkCtfCqiReportCfgInfo * * * Desc: CQI Report Configuration * @details This structure contains the information for CQI report * related configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCqiReportCfgInfo ( CtfCqiReportCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { #ifdef CTF_VER2 /* * ctf_c_001.main_2: Added provision to send Periodic and aPeriodic CQI *report configuration in the same message */ if(param->reportMode.aPeriodicRpt.pres != FALSE) { CMCHKPK(oduPackUInt32, param->reportMode.aPeriodicRpt.aPeriodicRptMode, mBuf); } CMCHKPK(oduPackUInt8, param->reportMode.aPeriodicRpt.pres, mBuf); if(param->reportMode.periodicRpt.pres != FALSE) { CMCHKPK(cmPkCtfCqiRptModePeriodic, ¶m->reportMode.periodicRpt, mBuf); } CMCHKPK(oduPackUInt8, param->reportMode.periodicRpt.pres, mBuf); #else /* CTF_VER2 */ switch(param->reportingMode) { case CTF_CQI_RPTMODE_PRDIOC: CMCHKPK(cmPkCtfCqiRptModePeriodic, ¶m->reportMode.periodicRpt, mBuf); break; case CTF_CQI_RPTMODE_APRDIOC: CMCHKPK(oduPackUInt32, param->reportMode.aPeriodicRpt, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->reportingMode, mBuf); #endif /* CTF_VER2 */ /* ctf_c_001.main_2: added packning for pmiRiRpt*/ #ifdef CTF_VER1 CMCHKPK(oduPackUInt32, param->pmiRiRpt.pmiRiRptSetup, mBuf); CMCHKPK(oduPackUInt8, param->pmiRiRpt.pres, mBuf); #endif /* CTF_VER1 */ } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCqiReportCfgInfo * * * Desc: CQI Report Configuration * @details This structure contains the information for CQI report * related configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCqiReportCfgInfo ( CtfCqiReportCfgInfo *param, Buffer *mBuf ) { #if defined (CTF_VER1) || defined (CTF_VER2) uint32_t tmpEnum; #endif CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { /* ctf_c_001.main_2: added Unpackning for cqiMask*/ #ifdef CTF_VER1 CMCHKUNPK(oduUnpackUInt8, ¶m->pmiRiRpt.pres, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->pmiRiRpt.pmiRiRptSetup = tmpEnum; #endif /* CTF_VER1 */ #ifdef CTF_VER2 /* *ctf_c_001.main_2: Added provision to send Periodic and aPeriodic CQI *report configuration in the same message */ CMCHKUNPK(oduUnpackUInt8, ¶m->reportMode.periodicRpt.pres, mBuf) if(param->reportMode.periodicRpt.pres != FALSE) { CMCHKUNPK(cmUnpkCtfCqiRptModePeriodic, ¶m->reportMode.periodicRpt, mBuf); } CMCHKUNPK(oduUnpackUInt8, ¶m->reportMode.aPeriodicRpt.pres, mBuf) if(param->reportMode.aPeriodicRpt.pres != FALSE) { CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->reportMode.aPeriodicRpt.aPeriodicRptMode = (CtfCqiRptModeAperiodic)tmpEnum; } #else /* CTF_VER2 */ CMCHKUNPK(oduUnpackUInt8, ¶m->reportingMode, mBuf); switch(param->reportingMode) { case CTF_CQI_RPTMODE_APRDIOC: CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->reportMode.aPeriodicRpt, mBuf); break; case CTF_CQI_RPTMODE_PRDIOC: CMCHKUNPK(cmUnpkCtfCqiRptModePeriodic, ¶m->reportMode.periodicRpt, mBuf); break; default : return RFAILED; } #endif /* CTF_VER2 */ } return ROK; } /*********************************************************** * * Func: cmPkCtfDedSrsUlCfgInfo * * * Desc: Dedicated Uplink SRS Configuration * @details This structure contains the information for setting-up/release * UL SRS configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedSrsUlCfgInfo ( CtfDedSrsUlCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->dedSrsSetup.cyclicShift, mBuf); CMCHKPK(oduPackUInt8, param->dedSrsSetup.txComb, mBuf); CMCHKPK(oduPackUInt16, param->dedSrsSetup.srsCfgIdx, mBuf); CMCHKPK(oduPackUInt8, param->dedSrsSetup.duration, mBuf); CMCHKPK(oduPackUInt8, param->dedSrsSetup.freqDmnPos, mBuf); CMCHKPK(oduPackUInt8, param->dedSrsSetup.srsHopngBw, mBuf); CMCHKPK(oduPackUInt8, param->dedSrsSetup.srsBw, mBuf); CMCHKPK(oduPackUInt8, param->dedSrsUlCfgType, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedSrsUlCfgInfo * * * Desc: Dedicated Uplink SRS Configuration * @details This structure contains the information for setting-up/release * UL SRS configuration specific to an UE. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedSrsUlCfgInfo ( CtfDedSrsUlCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsUlCfgType, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsSetup.srsBw, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsSetup.srsHopngBw, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsSetup.freqDmnPos, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsSetup.duration, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dedSrsSetup.srsCfgIdx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsSetup.txComb, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrsSetup.cyclicShift, mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfDedSRCfgInfo * * * Desc: Dedicated SR Configuration * @details This structure contains the information for setting-up/release * SR configuration specific to an UE at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedSRCfgInfo ( CtfDedSRCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt8, param->dedSrSetup.srCfgIdx, mBuf); CMCHKPK(oduPackUInt16, param->dedSrSetup.srPUCCHRi, mBuf); CMCHKPK(oduPackUInt8, param->dedSRCfgType, mBuf); } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedSRCfgInfo * * * Desc: Dedicated SR Configuration * @details This structure contains the information for setting-up/release * SR configuration specific to an UE at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedSRCfgInfo ( CtfDedSRCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKUNPK(oduUnpackUInt8, ¶m->dedSRCfgType, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->dedSrSetup.srPUCCHRi, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dedSrSetup.srCfgIdx, mBuf); } return ROK; } #endif /* TFU_UPGRADE */ /*********************************************************** * * Func: cmPkCtfDedAntCfgInfo * * * Desc: Dedicated Antenna Configuration * @details This structure contains the information for antenna related * configuration specific to an UE at PHY. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedAntCfgInfo ( CtfDedAntCfgInfo *param, Buffer *mBuf ) { #ifdef CTF_VER2 uint8_t idx; #endif /* CTF_VER2 */ /*ctf_c_001.main_1*/ if(param->pres != FALSE) { CMCHKPK(oduPackUInt32, param->ueTxAntSelection.txAntSelect, mBuf); CMCHKPK(oduPackUInt8, param->ueTxAntSelection.cfgType, mBuf); /* ctf_c_001.main_3 txMode is of type enum and is 32bit length */ CMCHKPK(oduPackUInt32, (uint32_t)param->txMode, mBuf); #ifdef CTF_VER2 /* *ctf_c_001.main_2: Added Packing of CodeBookSubsetRestriction parameter */ switch(param->codeBookSubsetRes.ctfCdBkRestType) { case N2TX_ANT_TM3: CMCHKPK(oduPackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm3, mBuf); break; case N4TX_ANT_TM3: CMCHKPK(oduPackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm3, mBuf); break; case N2TX_ANT_TM4: CMCHKPK(oduPackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm4, mBuf); break; case N4TX_ANT_TM4: for(idx = 0; idx < 8; idx++) CMCHKPK(oduPackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm4[idx], mBuf); break; case N2TX_ANT_TM5: CMCHKPK(oduPackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm5, mBuf); break; case N4TX_ANT_TM5: CMCHKPK(oduPackUInt16, param->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm5, mBuf); break; case N2TX_ANT_TM6: CMCHKPK(oduPackUInt8, param->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm6, mBuf); break; case N4TX_ANT_TM6: CMCHKPK(oduPackUInt16, param->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm6, mBuf); break; default : break; } CMCHKPK(oduPackUInt32, param->codeBookSubsetRes.ctfCdBkRestType, mBuf); #endif /* CTF_VER2 */ } CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedAntCfgInfo * * * Desc: Dedicated Antenna Configuration * @details This structure contains the information for antenna related * configuration specific to an UE at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedAntCfgInfo ( CtfDedAntCfgInfo *param, Buffer *mBuf ) { #ifdef CTF_VER2 S16 idx; #endif /* CTF_VER2 */ uint32_t tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) { #ifdef CTF_VER2 /* * Added Unpacking for CodeBookSubsetRestriction parameter */ CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->codeBookSubsetRes.ctfCdBkRestType = (CtfCdBkSubsetRestnType)tmpEnum; switch(param->codeBookSubsetRes.ctfCdBkRestType) { case N2TX_ANT_TM3: CMCHKUNPK(oduUnpackUInt8, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm3, mBuf); break; case N4TX_ANT_TM3: CMCHKUNPK(oduUnpackUInt8, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm3, mBuf); break; case N2TX_ANT_TM4: CMCHKUNPK(oduUnpackUInt8, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm4, mBuf); break; case N4TX_ANT_TM4: for(idx = 7; idx >= 0; idx--) { CMCHKUNPK(oduUnpackUInt8, &(param->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm4[idx]), mBuf); } break; case N2TX_ANT_TM5: CMCHKUNPK(oduUnpackUInt8, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm5, mBuf); break; case N4TX_ANT_TM5: CMCHKUNPK(oduUnpackUInt16, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm5, mBuf); break; case N2TX_ANT_TM6: CMCHKUNPK(oduUnpackUInt8, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n2TxAntTm6, mBuf); break; case N4TX_ANT_TM6: CMCHKUNPK(oduUnpackUInt16, ¶m->codeBookSubsetRes.codeBookSubsetRestn. n4TxAntTm6, mBuf); break; default : break; } #endif /* CTF_VER2 */ /* ctf_c_001.main_3 Enum is 32bit length */ CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->txMode = (CtfUeTxAntMode)tmpEnum; CMCHKUNPK(oduUnpackUInt8, ¶m->ueTxAntSelection.cfgType, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)&tmpEnum, mBuf); param->ueTxAntSelection.txAntSelect = (CtfUeTxAntSelectType)tmpEnum; } return ROK; } /*********************************************************** * * Func: cmPkCtfUeSecCellCfgInfo * * * Desc: Secondary Cell Configuration for a UE * @details This structure contains the information for * secondary cells for the UE * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfUeSecCellCfgInfo ( CtfUeSecCellCfgInfo *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt16, param->sCellId, mBuf); CMCHKPK(oduPackUInt8, param->sCellIdx, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfSecCellCfgInfo * * * Desc: Secondary Cell Configuration for a UE * @details This structure contains the information for * secondary cells for the UE * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfSecCellCfgInfo ( CtfSecCellCfgInfo *param, Buffer *mBuf ) { S8 idx; for(idx = param->numSCells - 1; idx >= 0; idx--) { CMCHKPK(cmPkCtfUeSecCellCfgInfo, ¶m->ueSCellDedCfg[(uint8_t)idx], mBuf); } CMCHKPK(oduPackUInt32, param->sCellAction, mBuf); CMCHKPK(oduPackUInt8, param->numSCells, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfUeSecCellCfgInfo * * * Desc: Secondary Cell Configuration for a UE * @details This structure contains the information for * secondary cells for the UE * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfUeSecCellCfgInfo ( CtfUeSecCellCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->sCellIdx, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->sCellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfSecCellCfgInfo * * * Desc: Secondary Cell Configuration for a UE * @details This structure contains the information for * secondary cells for the UE * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfSecCellCfgInfo ( CtfSecCellCfgInfo *param, Buffer *mBuf ) { uint8_t idx; CMCHKUNPK(oduUnpackUInt8, ¶m->numSCells, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t*)¶m->sCellAction, mBuf); for(idx = 0 ; idx < param->numSCells; idx++) { CMCHKUNPK(cmUnpkCtfUeSecCellCfgInfo, ¶m->ueSCellDedCfg[idx], mBuf); } return ROK; } /*********************************************************** * * Func: cmPkCtfUeCatCfgInfo * * * Desc: UE Category Configuration * @details This structure contains the information for configuring * the UE category at PHY. * * * Ret : S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfUeCatCfgInfo ( CtfUeCatCfgInfo *param, Buffer *mBuf ) { /*ctf_c_001.main_1*/ if(param->pres != FALSE) CMCHKPK(oduPackUInt32, param->ueCategory, mBuf); CMCHKPK(oduPackUInt8, param->pres, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfUeCatCfgInfo * * * Desc: UE Category Configuration * @details This structure contains the information for configuring * the UE category at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfUeCatCfgInfo ( CtfUeCatCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->pres, mBuf); /*ctf_c_001.main_1*/ if(param->pres != FALSE) CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->ueCategory, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfDedCfgInfo * * * Desc: Dedicated Configuration Information * @details This structure contains the information for configuration * of UE-specific physical channel resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedCfgInfo ( CtfDedCfgInfo *param, Buffer *mBuf ) { #ifdef EMTC_ENABLE CMCHKPK(oduPackUInt8, param->isEmtcUe, mBuf); #endif CMCHKPK(cmPkCtfDedAntCfgInfo, ¶m->antInfo, mBuf); #ifndef TFU_UPGRADE CMCHKPK(cmPkCtfDedSRCfgInfo, ¶m->dedSRCfg, mBuf); CMCHKPK(cmPkCtfDedSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKPK(cmPkCtfCqiReportCfgInfo, ¶m->cqiRptCfg, mBuf); #endif /* TFU_UPGRADE */ CMCHKPK(cmPkCtfDedPuschCfgInfo, ¶m->puschCfg, mBuf); CMCHKPK(cmPkCtfDedPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKPK(cmPkCtfDedPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKPK(cmPkCtfUeCatCfgInfo, ¶m->ueCatCfg, mBuf); CMCHKPK(cmPkLteRnti, param->ueId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedCfgInfo * * * Desc: Dedicated Configuration Information * @details This structure contains the information for configuration * of UE-specific physical channel resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedCfgInfo ( CtfDedCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); CMCHKUNPK(cmUnpkCtfUeCatCfgInfo, ¶m->ueCatCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedPuschCfgInfo, ¶m->puschCfg, mBuf); #ifndef TFU_UPGRADE CMCHKUNPK(cmUnpkCtfCqiReportCfgInfo, ¶m->cqiRptCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedSRCfgInfo, ¶m->dedSRCfg, mBuf); #endif /* TFU_UPGRADE */ CMCHKUNPK(cmUnpkCtfDedAntCfgInfo, ¶m->antInfo, mBuf); #ifdef EMTC_ENABLE CMCHKUNPK(oduUnpackUInt8, ¶m->isEmtcUe, mBuf); #endif return ROK; } /*********************************************************** * * Func: cmPkCtfDedRecfgInfo * * * Desc: Dedicated Re-configuration Information * @details This structure contains the information for re-configuration * of UE-specific physical channel resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedRecfgInfo ( CtfDedRecfgInfo *param, Buffer *mBuf ) { CMCHKPK(cmPkCtfSecCellCfgInfo, ¶m->sCellInfo,mBuf); /*ctf_c_001.main_1*/ CMCHKPK(cmPkCtfDedAntCfgInfo, ¶m->antInfo, mBuf); #ifndef TFU_UPGRADE CMCHKPK(cmPkCtfCqiReportCfgInfo, ¶m->cqiRptCfg, mBuf); CMCHKPK(cmPkCtfDedSRCfgInfo, ¶m->dedSRCfg, mBuf); CMCHKPK(cmPkCtfDedSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); #endif /* TFU_UPGRADE */ CMCHKPK(cmPkCtfDedPuschCfgInfo, ¶m->puschCfg, mBuf); CMCHKPK(cmPkCtfDedPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKPK(cmPkCtfDedPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKPK(cmPkCtfUeCatCfgInfo, ¶m->ueCatCfg, mBuf); /* ctf_c_001.main_4: ReEst Fix */ #ifdef CTF_VER3 CMCHKPK(cmPkLteRnti, param->newUeId, mBuf); #else CMCHKPK(cmPkLteRnti, param->newUeId, mBuf); #endif CMCHKPK(cmPkLteRnti, param->ueId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedRecfgInfo * * * Desc: Dedicated Re-configuration Information * @details This structure contains the information for re-configuration * of UE-specific physical channel resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedRecfgInfo ( CtfDedRecfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); /* ctf_c_001.main_4: ReEst Fix */ #ifdef CTF_VER3 CMCHKUNPK(cmUnpkLteRnti, ¶m->newUeId, mBuf); #else CMCHKUNPK(cmUnpkLteRnti, ¶m->newUeId, mBuf); #endif CMCHKUNPK(cmUnpkCtfUeCatCfgInfo, ¶m->ueCatCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedPdschCfgInfo, ¶m->pdschCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedPucchCfgInfo, ¶m->pucchCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedPuschCfgInfo, ¶m->puschCfg, mBuf); #ifndef TFU_UPGRADE CMCHKUNPK(cmUnpkCtfDedSrsUlCfgInfo, ¶m->srsUlCfg, mBuf); CMCHKUNPK(cmUnpkCtfDedSRCfgInfo, ¶m->dedSRCfg, mBuf); /*ctf_c_001.main_1*/ CMCHKUNPK(cmUnpkCtfCqiReportCfgInfo, ¶m->cqiRptCfg, mBuf); #endif /* TFU_UPGRADE */ CMCHKUNPK(cmUnpkCtfDedAntCfgInfo, ¶m->antInfo, mBuf); CMCHKUNPK(cmUnpkCtfSecCellCfgInfo, ¶m->sCellInfo,mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfCellReleaseInfo * * * Desc: Cell Release Information * @details This structure contains the information for release/removal * of a cell and its assocated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCellReleaseInfo ( CtfCellReleaseInfo *param, Buffer *mBuf ) { CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCellReleaseInfo * * * Desc: Cell Release Information * @details This structure contains the information for release/removal * of a cell and its assocated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCellReleaseInfo ( CtfCellReleaseInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfDedReleaseInfo * * * Desc: Dedicated Release Information * @details This structure contains the information for release/removal * of dedicated/UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfDedReleaseInfo ( CtfDedReleaseInfo *param, Buffer *mBuf ) { CMCHKPK(cmPkCtfSecCellCfgInfo, ¶m->sCellInfo,mBuf); CMCHKPK(cmPkLteRnti, param->ueId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfDedReleaseInfo * * * Desc: Dedicated Release Information * @details This structure contains the information for release/removal * of dedicated/UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfDedReleaseInfo ( CtfDedReleaseInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); CMCHKUNPK(cmUnpkCtfSecCellCfgInfo, ¶m->sCellInfo,mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfCfgInfo * * * Desc: Configuration Information * @details This structure contains the information for setting-up * cell or UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCfgInfo ( CtfCfgInfo *param, Buffer *mBuf ) { switch(param->cfgElem) { case CTF_UE_CFG: CMCHKPK(cmPkCtfDedCfgInfo, ¶m->u.dedCfg, mBuf); break; case CTF_CELL_CFG: CMCHKPK(cmPkCtfCellCfgInfo, ¶m->u.cellCfg, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->cfgElem, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCfgInfo * * * Desc: Configuration Information * @details This structure contains the information for setting-up * cell or UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCfgInfo ( CtfCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->cfgElem, mBuf); switch(param->cfgElem) { case CTF_CELL_CFG: CMCHKUNPK(cmUnpkCtfCellCfgInfo, ¶m->u.cellCfg, mBuf); break; case CTF_UE_CFG: CMCHKUNPK(cmUnpkCtfDedCfgInfo, ¶m->u.dedCfg, mBuf); break; default : return RFAILED; } return ROK; } /*********************************************************** * * Func: cmPkCtfReCfgInfo * * * Desc: Re-configuration Information * @details This structure contains the information for re-configuring * cell or UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfReCfgInfo ( CtfReCfgInfo *param, Buffer *mBuf ) { switch(param->cfgElem) { case CTF_UE_CFG: CMCHKPK(cmPkCtfDedRecfgInfo, ¶m->u.dedRecfg, mBuf); break; case CTF_CELL_CFG: CMCHKPK(cmPkCtfCellRecfgInfo, ¶m->u.cellRecfg, mBuf); break; /* Starts - Fix for CR ccpu00123185 */ case CTF_TX_PWR_CFG: CMCHKPK(cmPkCtfCellPwrcfgInfo, ¶m->u.cellRecfg, mBuf); break; /* ends - Fix for CR ccpu00123185 */ case CTF_CELL_STOP: CMCHKPK(cmPkCtfCellStop, ¶m->u.cellRecfg, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->cfgElem, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfReCfgInfo * * * Desc: Re-configuration Information * @details This structure contains the information for re-configuring * cell or UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfReCfgInfo ( CtfReCfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->cfgElem, mBuf); switch(param->cfgElem) { case CTF_CELL_CFG: CMCHKUNPK(cmUnpkCtfCellRecfgInfo, ¶m->u.cellRecfg, mBuf); break; case CTF_UE_CFG: CMCHKUNPK(cmUnpkCtfDedRecfgInfo, ¶m->u.dedRecfg, mBuf); break; /* Starts - Fix for CR ccpu00123185 */ case CTF_TX_PWR_CFG: CMCHKUNPK(cmUnpkCtfCellPwrcfgInfo, ¶m->u.cellRecfg, mBuf); break; /* ends - Fix for CR ccpu00123185 */ case CTF_CELL_STOP: CMCHKUNPK(cmUnpkCtfCellStop, ¶m->u.cellRecfg, mBuf); break; default : return RFAILED; } return ROK; } /*********************************************************** * * Func: cmPkCtfReleaseInfo * * * Desc: Release configuration Information * @details This structure contains the information for releasing * cell or UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfReleaseInfo ( CtfReleaseInfo *param, Buffer *mBuf ) { switch(param->cfgElem) { case CTF_UE_CFG: CMCHKPK(cmPkCtfDedReleaseInfo, ¶m->u.dedRel, mBuf); break; case CTF_CELL_CFG: CMCHKPK(cmPkCtfCellReleaseInfo, ¶m->u.cellRel, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->cfgElem, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfReleaseInfo * * * Desc: Release configuration Information * @details This structure contains the information for releasing * cell or UE-specific configuration at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfReleaseInfo ( CtfReleaseInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->cfgElem, mBuf); switch(param->cfgElem) { case CTF_CELL_CFG: CMCHKUNPK(cmUnpkCtfCellReleaseInfo, ¶m->u.cellRel, mBuf); break; case CTF_UE_CFG: CMCHKUNPK(cmUnpkCtfDedReleaseInfo, ¶m->u.dedRel, mBuf); break; default : return RFAILED; } return ROK; } /*********************************************************** * * Func: cmPkCtfCfgReqInfo * * * Desc: Configuration Request information * @details This is the main structure in the Configuration request primitive. * -# This structure contains the configuration information as given by * the RRC to configure PHY layer for common/dedicated resources. * -# It can contain Config/Reconfig/Release. * -# The result of configuration is indicated in TfUiCtfCfgCfm. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCfgReqInfo ( CtfCfgReqInfo *param, Buffer *mBuf ) { /* ctf_c_001.main_4: Added support for vendor specific parameters */ #ifdef CTF_VER3 CMCHKPK(cmPkCtfVendorSpecParams, ¶m->vendorParams, mBuf); #endif switch(param->cfgType) { case CTF_DELETE: CMCHKPK(cmPkCtfReleaseInfo, ¶m->u.release, mBuf); break; case CTF_RECONFIG: CMCHKPK(cmPkCtfReCfgInfo, ¶m->u.reCfg, mBuf); break; case CTF_CONFIG: CMCHKPK(cmPkCtfCfgInfo, ¶m->u.cfg, mBuf); break; default : return RFAILED; } CMCHKPK(oduPackUInt8, param->cfgType, mBuf); return ROK; } /* ctf_c_001.main_4: Modified cmUnpkCtfCfgReqInfo() to add support * for vendor specific parameters */ /*********************************************************** * * Func: cmUnpkCtfCfgReqInfo * * * Desc: Configuration Request information * @details This is the main structure in the Configuration request primitive. * -# This structure contains the configuration information as given by * the RRC to configure PHY layer for common/dedicated resources. * -# It can contain Config/Reconfig/Release. * -# The result of configuration is indicated in TfUiCtfCfgCfm. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCfgReqInfo ( Pst *pst, CtfCfgReqInfo *param, Buffer *mBuf ) { #ifdef CTF_VER3 S16 retVal; #endif CMCHKUNPK(oduUnpackUInt8, ¶m->cfgType, mBuf); switch(param->cfgType) { case CTF_CONFIG: CMCHKUNPK(cmUnpkCtfCfgInfo, ¶m->u.cfg, mBuf); break; case CTF_RECONFIG: CMCHKUNPK(cmUnpkCtfReCfgInfo, ¶m->u.reCfg, mBuf); break; case CTF_DELETE: CMCHKUNPK(cmUnpkCtfReleaseInfo, ¶m->u.release, mBuf); break; default : return RFAILED; } #ifdef CTF_VER3 if((retVal = cmUnpkCtfVendorSpecParams(pst, ¶m->vendorParams, mBuf)) != ROK) return (retVal); #endif return ROK; } /* Starts - Fix for CR ccpu00123185 */ /*********************************************************** * * Func: cmPkCtfCellPwrcfgInfo * * * Desc: Cell Re-configuration Information * @details This structure contains the information for reconfiguration of Reference Signal Power * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCellPwrcfgInfo ( CtfCellRecfgInfo *param, Buffer *mBuf ) { /* Added the pack for newly added reference signal Power*/ CMCHKPK(oduPackUInt32, (uint32_t)param->ctfCellStatus, mBuf); CMCHKPK(SPkS16, param->pilotSigPwr, mBuf); CMCHKPK(SPkS16, param->priSigPwr, mBuf); CMCHKPK(SPkS16, param->secSigPwr, mBuf); CMCHKPK(SPkS16, param->pdschCfg.refSigPwr, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCellPwrcfgInfo * * * Desc: Cell Re-configuration Information * @details This structure contains the information for reconfiguration * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCellPwrcfgInfo ( CtfCellRecfgInfo *param, Buffer *mBuf ) { /* ctf_c_001.main_3: Added the unpack for newly added fileds inside the CFG structure*/ CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(SUnpkS16, ¶m->pdschCfg.refSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->secSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->priSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->pilotSigPwr, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->ctfCellStatus, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfCellStop * * * Desc: Cell Re-configuration Information * @details This structure contains the information for reconfiguration of Reference Signal Power * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfCellStop ( CtfCellRecfgInfo *param, Buffer *mBuf ) { /* Added the pack for newly added reference signal Power*/ CMCHKPK(oduPackUInt32, (uint32_t)param->ctfCellStatus, mBuf); CMCHKPK(SPkS16, param->pilotSigPwr, mBuf); CMCHKPK(SPkS16, param->priSigPwr, mBuf); CMCHKPK(SPkS16, param->secSigPwr, mBuf); CMCHKPK(SPkS16, param->pdschCfg.refSigPwr, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); return ROK; } /*********************************************************** * * Func: cmUnpkCtfCellStop * * * Desc: Cell Re-configuration Information * @details This structure contains the information for reconfiguration * of a cell and its associated resources at PHY. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmUnpkCtfCellStop ( CtfCellRecfgInfo *param, Buffer *mBuf ) { CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(SUnpkS16, ¶m->pdschCfg.refSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->secSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->priSigPwr, mBuf); CMCHKUNPK(SUnpkS16, ¶m->pilotSigPwr, mBuf); CMCHKUNPK(oduUnpackUInt32, (uint32_t *)¶m->ctfCellStatus, mBuf); return ROK; } /* Periodic REM Scan for TPM */ /*********************************************************** * * Func: cmPkPerRemScanCellInfo * * * Desc: Periodic REM cell search response * @details This Message contains cell search results. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkPerRemScanCellInfo ( CtfPeriodicRemCellInfo *param, Buffer *mBuf ) { CMCHKPK(oduPackUInt16,param->pci, mBuf); CMCHKPK(oduPackUInt8, param->rsrp, mBuf); CMCHKPK(oduPackUInt8, param->dlBw, mBuf); CMCHKPK(oduPackUInt8, param->numTx, mBuf); return ROK; } /*********************************************************** * * Func: cmPkCtfPeriodicCellSearchRsp * * * Desc: Periodic REM cell search response * @details This Message contains Periodic REM scan results. * * * Ret: S16 * * Notes: * * File: * **********************************************************/ S16 cmPkCtfPeriodicCellSearchRsp ( CtfPeriodicRemCellSearchRsp *param, Buffer *mBuf ) { S16 idx; for(idx = param->numCells - 1; idx >=0; idx--) { CMCHKPK(cmPkPerRemScanCellInfo, ¶m->cellInfo[idx], mBuf); } CMCHKPK(oduPackUInt8, param->numCells, mBuf); return ROK; } /** * @brief Configuration Request from App to CL for * cnm Init Sync responce * * @details * * Function: cmPkCtfPeriodicRemCellSearchRsp * * @param[in] Pst* pst * @param[in] SpId spId * @param[in] CtfCfgTransId * transId * @param[in] CtfCnmInitSyncRsp* ctfcnmInitSyncRsp * @return S16 * -# ROK **/ S16 cmPkCtfPeriodicRemCellSearchRsp ( Pst* pst, SpId spId, CtfCfgTransId *transId, CtfPeriodicRemCellSearchRsp *CellCfgRsp ) { Buffer *mBuf = NULLP; if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF016, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellCfgRsp, sizeof(CtfPeriodicRemCellSearchRsp)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LC) { if (cmPkCtfPeriodicCellSearchRsp(CellCfgRsp, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF017, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellCfgRsp, sizeof(CtfPeriodicRemCellSearchRsp)); SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LWLC) { if (oduPackPointer((PTR)CellCfgRsp, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF018, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellCfgRsp, sizeof(CtfPeriodicRemCellSearchRsp)); SPutMsg(mBuf); return RFAILED; } } if(cmPkCtfCfgTransId(transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF019, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellCfgRsp, sizeof(CtfPeriodicRemCellSearchRsp)); SPutMsg(mBuf); return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF020, (ErrVal)0, "Packing failed"); #endif SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellCfgRsp, sizeof(CtfPeriodicRemCellSearchRsp)); SPutMsg(mBuf); return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellCfgRsp, sizeof(CtfPeriodicRemCellSearchRsp)); } pst->event = (Event)EVTCTFPREMCELLSRCHRSP; return (SPstTsk(pst,mBuf)); } S16 cmUnpkCtfPerRemScanCellInfo ( CtfPeriodicRemCellInfo *param, Buffer *mBuf ) { CMCHKUNPK(oduUnpackUInt8, ¶m->numTx, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->dlBw, mBuf); CMCHKUNPK(oduUnpackUInt8, ¶m->rsrp, mBuf); CMCHKUNPK(oduUnpackUInt16, ¶m->pci, mBuf); return ROK; } S16 cmUnpkCtfPerRemCellSrch ( CtfPeriodicRemCellSearchRsp *param, Buffer *mBuf ) { S16 idx; CMCHKUNPK(oduUnpackUInt8, ¶m->numCells, mBuf); for(idx = 0; idx < (param->numCells); idx++) { CMCHKUNPK(cmUnpkCtfPerRemScanCellInfo, ¶m->cellInfo[idx], mBuf); } return ROK; } /** * @brief ENB STOP Indication from PHY to ENB-APP * * @details * * Function: cmUnpkPerRemCellSrchRsp * * @param[in] Pst* pst * @param[in] SuId suId * @param[in] CtfCfgTransId transId * @return S16 * -# ROK **/ S16 cmUnpkPerRemCellSrchRsp ( CtfPerRemCellSrchRsp func, Pst *pst, Buffer *mBuf ) { SuId suId = 0; CtfCfgTransId transId; CtfPeriodicRemCellSearchRsp *CellSrchRsp = NULLP; if (SUnpkS16(&suId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF030, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (cmUnpkCtfCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF031, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } if (pst->selector != ODU_SELECTOR_LWLC) { if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&CellSrchRsp, sizeof(CtfPeriodicRemCellSearchRsp))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF024, (ErrVal)0, (Txt*)&"Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } } if (pst->selector == ODU_SELECTOR_LWLC) { if (oduUnpackPointer((PTR *)&CellSrchRsp, mBuf) != ROK) { SPutMsg(mBuf); return RFAILED; } } else if (pst->selector == ODU_SELECTOR_LC) if (cmUnpkCtfPerRemCellSrch(CellSrchRsp, mBuf) != ROK) { SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)CellSrchRsp, sizeof(CtfPeriodicRemCellSearchRsp)); SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) /* ctf_c_001.main_3 Compilation warning fix with g++ */ SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, (Txt*)&__FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ECTF025, (ErrVal)0, (Txt*)&"Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); return ((*func)(pst, suId, &transId, CellSrchRsp)); } /* Periodic REM Scan for TPM End */ /* ends - Fix for CR ccpu00123185 */ #endif /********************************************************************** End of file **********************************************************************/