X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Frgu.c;h=5a2653bf0494211effccf69c4aa6b213bce30c3d;hb=a9e15890b397c8fe514ccd82cf1c8541099fe573;hp=df5714d50da7177ffcd8b508461dc17f8c11231c;hpb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;p=o-du%2Fl2.git diff --git a/src/cm/rgu.c b/src/cm/rgu.c index df5714d50..5a2653bf0 100755 --- a/src/cm/rgu.c +++ b/src/cm/rgu.c @@ -62,22 +62,14 @@ * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmPkRguBndReq ( Pst* pst, SuId suId, SpId spId ) -#else -S16 cmPkRguBndReq(pst, suId, spId) -Pst* pst; -SuId suId; -SpId spId; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguBndReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -123,24 +115,15 @@ SpId spId; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmUnpkRguBndReq ( RguBndReq func, Pst *pst, Buffer *mBuf ) -#else -S16 cmUnpkRguBndReq(func, pst, mBuf) -RguBndReq func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; SpId spId; - - TRC3(cmUnpkRguBndReq) if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -178,22 +161,14 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmPkRguUbndReq ( Pst* pst, SpId spId, Reason reason ) -#else -S16 cmPkRguUbndReq(pst, spId, reason) -Pst* pst; -SpId spId; -Reason reason; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguUbndReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -239,24 +214,16 @@ Reason reason; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmUnpkRguUbndReq ( RguUbndReq func, Pst *pst, Buffer *mBuf ) -#else -S16 cmUnpkRguUbndReq(func, pst, mBuf) -RguUbndReq func; -Pst *pst; -Buffer *mBuf; -#endif { SpId spId; Reason reason; - TRC3(cmUnpkRguUbndReq) if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -291,26 +258,18 @@ Buffer *mBuf; * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmPkRguBndCfm ( Pst* pst, SuId suId, -U8 status +uint8_t status ) -#else -S16 cmPkRguBndCfm(pst, suId, status) -Pst* pst; -SuId suId; -U8 status; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguBndCfm) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -353,28 +312,19 @@ U8 status; * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmUnpkRguBndCfm ( RguBndCfm func, Pst *pst, Buffer *mBuf ) -#else -S16 cmUnpkRguBndCfm(func, pst, mBuf) -RguBndCfm func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; - U8 status; - - TRC3(cmUnpkRguBndCfm) + uint8_t status; if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -398,286 +348,6 @@ Buffer *mBuf; return ((*func)(pst, suId, status)); } - -/** -* @brief Request from RLC to MAC for forwarding SDUs on - * dedicated channel for transmission -* -* @details -* -* Function : packDlData -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -uint16_t packDlData -( -Pst* pst, -SpId spId, -RlcMacData *dlData -) -{ - Buffer *mBuf = NULLP; - TRC3(packDlData) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU022, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData)); - return RFAILED; - } - - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKPK(oduPackPointer,(PTR) dlData, mBuf); - } - else - { - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK) -#else - if (packRlcMacDataInfo(dlData, mBuf) != ROK) -#endif - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU023, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)dlData, - sizeof(RlcMacData)); - SPutMsg(mBuf); - return RFAILED; - } - - if (SPutSBuf(pst->region, pst->pool, - (Data *)dlData, sizeof(RlcMacData)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU025, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - dlData = NULLP; - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU024, (ErrVal)0, "Packing failed"); -#endif - if (dlData != NULLP) - { - SPutSBuf(pst->region, pst->pool, - (Data *)dlData, sizeof(RlcMacData)); - } - SPutMsg(mBuf); - return RFAILED; - } - pst->event = (Event) EVTRLCDLDAT; - return (SPstTsk(pst,mBuf)); -} - - -/** -* @brief Request from RLC to MAC for forwarding SDUs on - * dedicated channel for transmission -* -* @details -* -* Function : unpackDlData -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -S16 unpackDlData -( -RlcMacDlData func, -Pst *pst, -Buffer *mBuf -) -{ - SpId spId; - RlcMacData *dlData; - - TRC3(unpackDlData) - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); - return RFAILED; - } - - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKUNPK(oduUnpackPointer,(PTR *) &dlData, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, - (Data **)&dlData, sizeof(RlcMacData))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData)); - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK) -#else - if (unpackRlcMacDataInfo(dlData, mBuf) != ROK) -#endif - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)dlData, - sizeof(RlcMacData)); - return RFAILED; - } - } - SPutMsg(mBuf); - - /* TODO : change function call to send RlcMacData as below: */ - return ((*func)(pst, spId, dlData)); - - //return ((*func)(pst, spId, datReq)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for dedicated channels -* -* @details -* -* Function : packRcvdUlData -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RlcMacData *ulData -* @return S16 -* -# ROK -**/ -uint8_t packRlcUlData(Pst* pst, RlcMacData *ulData) -{ - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU035, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); - return RFAILED; - } - - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKPK(oduPackPointer,(PTR)ulData, mBuf); - } - else - { - if (packRlcMacDataInfo(ulData, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU036, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); - SPutMsg(mBuf); - return RFAILED; - } - - if (SPutStaticBuffer(pst->region, pst->pool, - (Data *)ulData, sizeof(RlcMacData),0) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU038, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - ulData = NULLP; - } - pst->event = (Event) EVTRLCULDAT; - return (SPstTsk(pst,mBuf)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for dedicated channels -* -* @details -* -* Function : unpackRcvdUlData -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RlcMacData *ulData -* @return S16 -* -# ROK -**/ -uint8_t unpackRcvdUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf) -{ - RlcMacData *ulData; - - TRC3(unpackRcvdUlData) - - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKUNPK(oduUnpackPointer,(PTR *) &ulData, mBuf); - } - else - { - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutStaticBuffer(pst->region, pst->pool, - (Data *)ulData, sizeof(RlcMacData),0); - return RFAILED; - } - } - SPutMsg(mBuf); - return ((*func)(pst, ulData)); -} - - /*rgu_c_001.main_5 - ADD - L2M & R9 Support */ #ifdef LTE_L2_MEAS @@ -697,20 +367,13 @@ uint8_t unpackRcvdUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf) * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguL2MUlThrpMeasReqInfo ( RguL2MUlThrpMeasReqInfo* param, Buffer *mBuf ) -#else -S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf) -RguL2MUlThrpMeasReqInfo* param; -Buffer *mBuf; -#endif { S32 loop; - TRC3(cmPkRguL2MUlThrpMeasReqInfo); CMCHKPK(oduUnpackUInt8, param->enbMeas, mBuf); for (loop=param->numLcId-1; loop >= 0; loop--) @@ -741,20 +404,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguL2MUlThrpMeasReqInfo ( RguL2MUlThrpMeasReqInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf) -RguL2MUlThrpMeasReqInfo *param; -Buffer *mBuf; -#endif { - U8 loop; - TRC3(cmUnpkRguL2MUlThrpMeasReqInfo); + uint8_t loop; CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); @@ -782,22 +438,14 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmPkRguL2MUlThrpMeasReq ( Pst* pst, SpId spId, RguL2MUlThrpMeasReqInfo* measReq ) -#else -S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq) -Pst* pst; -SpId spId; -RguL2MUlThrpMeasReqInfo* measReq; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguL2MUlThrpMeasReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -805,7 +453,7 @@ RguL2MUlThrpMeasReqInfo* measReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU049, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); return RFAILED; } if (pst->selector == ODU_SELECTOR_LWLC) @@ -820,12 +468,12 @@ RguL2MUlThrpMeasReqInfo* measReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU050, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)measReq, + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); SPutMsg(mBuf); return RFAILED; } - if (SPutSBuf(pst->region, pst->pool, (Data *)measReq, + if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, @@ -846,7 +494,7 @@ RguL2MUlThrpMeasReqInfo* measReq; #endif if (measReq != NULLP) { - SPutSBuf(pst->region, pst->pool, (Data *)measReq, + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); } SPutMsg(mBuf); @@ -873,24 +521,16 @@ RguL2MUlThrpMeasReqInfo* measReq; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmUnpkRguL2MUlThrpMeasReq ( RguL2MUlThrpMeasReq func, Pst *pst, Buffer *mBuf ) -#else -S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf) -RguL2MUlThrpMeasReq func; -Pst *pst; -Buffer *mBuf; -#endif { SpId spId; RguL2MUlThrpMeasReqInfo* measReq; - TRC3(cmUnpkRguL2MUlThrpMeasReq) if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -907,7 +547,7 @@ Buffer *mBuf; } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq, + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&measReq, sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, @@ -924,7 +564,7 @@ Buffer *mBuf; (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)measReq, + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); return RFAILED; } @@ -936,165 +576,6 @@ Buffer *mBuf; #endif - - -/** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for dedicated channels -* -* @details -* -* Function : packBOStatus, -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RlcMacBOStatus * staRsp -* @return S16 -* -# ROK -**/ -uint16_t packBOStatus -( -Pst* pst, -SpId spId, -RlcMacBOStatus *boStatus -) -{ - RlcMacBOStatus *boStaInfo = NULL; - Buffer *mBuf = NULLP; - - if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } -#ifdef ERRCLS_KW - /* boStaInfo cant be NULL here */ - if (boStaInfo == NULLP) - { - return RFAILED; - } -#endif - cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus)); - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus)); - - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKPK(oduPackPointer,(PTR) boStaInfo, mBuf); - } - else - { - if (packBOStatusInfo(boStatus, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU057, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - } - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU058, (ErrVal)0, "Packing failed"); -#endif - if (boStaInfo != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus)); - } - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event)EVTRLCBOSTA; - return (SPstTsk(pst,mBuf)); - SPutMsg(mBuf); -} - - -/** -* @brief Primitive invoked from RLC to MAC to -* inform the BO report for dedicated channels -* -* @details -* -* Function : unpackBOStatus -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RlcMacBOStatus * staRsp -* @return S16 -* -# ROK -**/ -uint16_t unpackBOStatus -( -RlcMacBoStatus func, -Pst *pst, -Buffer *mBuf -) -{ - SpId spId; - RlcMacBOStatus *boSta; - - TRC3(unpackBOStatus) - - if (SUnpkS16(&spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKUNPK(oduUnpackPointer,(PTR *) &boSta, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta, - sizeof(RlcMacBOStatus))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (unpackBOStatusInfo(boSta, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus)); - return RFAILED; - } - } - SPutMsg(mBuf); - // (*func)(pst, spId, boSta); - SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus)); - return ROK; -} - - /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS @@ -1111,30 +592,22 @@ Buffer *mBuf * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmPkRguHqStaInd ( Pst* pst, SuId suId, RguHarqStatusInd *harqStatusInd ) -#else -S16 cmPkRguHqStaInd(pst, suId, harqStatusInd) -Pst* pst; -SuId suId; -RguHarqStatusInd *harqStatusInd; -#endif { Buffer *mBuf; - U8 idx; + uint8_t idx; RguHarqStatusInd *harqStaInd = NULL; - TRC3(cmPkRguHqStaInd) #ifdef XEON_SPECIFIC_CHANGES - if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK) + if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK) #else - if ((SGetStaticBuffer(pst->region, pst->pool, + if ((SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK) #endif { @@ -1146,7 +619,7 @@ RguHarqStatusInd *harqStatusInd; return RFAILED; } - cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd)); + memcpy(harqStaInd, harqStatusInd, sizeof(RguHarqStatusInd)); if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -1155,9 +628,9 @@ RguHarqStatusInd *harqStatusInd; (ErrVal)ERGU070, (ErrVal)0, "Packing failed"); #endif #ifdef XEON_SPECIFIC_CHANGES - SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd)); #else - SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); + SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); #endif return RFAILED; } @@ -1187,21 +660,21 @@ RguHarqStatusInd *harqStatusInd; (ErrVal)ERGU071, (ErrVal)0, "Packing failed"); #endif #ifdef XEON_SPECIFIC_CHANGES - SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd)); #else - SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); + SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); #endif SPutMsg(mBuf); return RFAILED; } #ifdef XEON_SPECIFIC_CHANGES - if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, + if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd)) != ROK) { #else if (pst->selector != ODU_SELECTOR_LWLC) { - if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, + if(SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0) != ROK) { #endif @@ -1235,25 +708,16 @@ RguHarqStatusInd *harqStatusInd; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmUnpkRguHqStaInd ( RguHqStaInd func, Pst *pst, Buffer *mBuf ) -#else -S16 cmUnpkRguHqStaInd(func, pst, mBuf) -RguHqStaInd func; -Pst *pst; -Buffer *mBuf; -#endif { RguHarqStatusInd *hqStaInd; - SuId suId; - U8 idx; - - TRC3(cmUnpkRguHqStaInd) + SuId suId; + uint8_t idx; if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -1265,7 +729,7 @@ Buffer *mBuf; return RFAILED; } #ifdef XEON_SPECIFIC_CHANGES - if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd, + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&hqStaInd, sizeof(RguHarqStatusInd))) != ROK) { #else if (pst->selector == ODU_SELECTOR_LWLC) @@ -1274,7 +738,7 @@ Buffer *mBuf; } else { - if ((SGetStaticBuffer(pst->region, pst->pool, + if ((SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK) { #endif @@ -1303,178 +767,20 @@ Buffer *mBuf; SPutMsg(mBuf); (*func)(pst, suId, hqStaInd); #ifdef XEON_SPECIFIC_CHANGES - SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd)); #else - SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0); + SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0); #endif return ROK; } #endif /* LTE_L2_MEAS */ - -/** -* @brief Status Indication from MAC to RLC - * as a response to the staRsp primitive from RLC. - * Informs RLC of the totalBufferSize and Timing Info - * for the transmission on dedicated channels. -* -* @details -* -* Function : packSchedRep -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RlcMacSchedRep* schRep -* @return S16 -* -# ROK -**/ -S16 packSchedRep -( -Pst* pst, -SuId suId, -RlcMacSchedRepInfo * schRep -) -{ - Buffer *mBuf = NULLP; - TRC3(packSchedRep) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU076, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo)); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKPK(oduPackPointer,(PTR) schRep, mBuf); - } - else - { - if (packSchedRepInfo(schRep, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU077, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)schRep, - sizeof(RlcMacSchedRepInfo)); - SPutMsg(mBuf); - return RFAILED; - } - if (SPutSBuf(pst->region, pst->pool, (Data *)schRep, - sizeof(RlcMacSchedRepInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU079, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - schRep= NULLP; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU078, (ErrVal)0, "Packing failed"); -#endif - if (schRep != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo)); - } - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event) EVTSCHREP; - return (SPstTsk(pst,mBuf)); -} - - -/** -* @brief Status Indication from MAC to RLC - * as a response to the staRsp primitive from RLC. - * Informs RLC of the totalBufferSize and Timing Info - * for the transmission on dedicated channels. -* -* @details -* -* Function : unpackSchedRep -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -S16 unpackSchedRep -( -RlcMacSchedRep func, -Pst *pst, -Buffer *mBuf -) -{ - SuId suId; - RlcMacSchedRepInfo *schRep; - - TRC3(unpackSchedRep) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (pst->selector == ODU_SELECTOR_LWLC) - { - CMCHKUNPK(oduUnpackPointer,(PTR *) &schRep, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (unpackSchedRepInfo(schRep, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo)); - return RFAILED; - } - } - SPutMsg(mBuf); - return ((*func)(pst, suId, schRep)); -} - -#ifdef ANSI S16 cmPkRguLcFlowCntrlInfo ( RguLcFlowCntrlInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguLcFlowCntrlInfo (param,mBuf) -RguLcFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLcFlowCntrlInfo); CMCHKPK(oduUnpackUInt32, param->maxBo4FlowCtrl, mBuf); CMCHKPK(oduUnpackUInt32, param->pktAdmitCnt, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); @@ -1482,21 +788,14 @@ Buffer *mBuf; return ROK; } -#ifdef ANSI S16 cmPkRguUeFlowCntrlInfo ( RguUeFlowCntrlInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguUeFlowCntrlInfo (param,mBuf) -RguUeFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - U32 idx; + uint32_t idx; - TRC3(cmPkRguUeFlowCntrlInfo); for(idx=(param->numLcs - 1); idx >= 0; idx--) { @@ -1507,21 +806,13 @@ Buffer *mBuf; return ROK; } -#ifdef ANSI S16 cmPkRguFlowCntrlInfo ( RguFlowCntrlInd *param, Buffer *mBuf ) -#else -S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) -RguFlowCntrlInd *param; -Buffer *mBuf; -#endif { - U32 idx; - - TRC3(cmPkRguFlowCntrlInfo); + uint32_t idx; for (idx=(param->numUes - 1); idx >= 0; idx--) { @@ -1547,23 +838,15 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmPkRguFlowCntrlInd ( Pst* pst, SuId suId, RguFlowCntrlInd *flowCntrlInd ) -#else -S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd) -Pst* pst; -SuId suId; -RguFlowCntrlInd *flowCntrlInd; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguFlowCntrlInd); if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, @@ -1602,19 +885,12 @@ RguFlowCntrlInd *flowCntrlInd; return (SPstTsk(pst,mBuf)); } -#ifdef ANSI S16 cmUnpkRguLcFlowCntrlInfo ( RguLcFlowCntrlInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf) -RguLcFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguLcFlowCntrlInfo); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); CMCHKUNPK(oduPackUInt32, ¶m->pktAdmitCnt, mBuf); @@ -1622,20 +898,13 @@ Buffer *mBuf; return ROK; } -#ifdef ANSI S16 cmUnpkRguUeFlowCntrlInfo ( RguUeFlowCntrlInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf) -RguUeFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - U32 idx; - TRC3(cmUnpkRguUeFlowCntrlInfo); + uint32_t idx; CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); CMCHKUNPK(oduPackUInt32, ¶m->numLcs, mBuf); for(idx=0; idx < param->numLcs; idx++) @@ -1645,21 +914,14 @@ Buffer *mBuf; return ROK; } -#ifdef ANSI S16 cmUnpkRguFlowCntrlInfo ( RguFlowCntrlInd *param, Buffer *mBuf ) -#else -S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf) -RguFlowCntrlInd *param; -Buffer *mBuf; -#endif { - U32 idx; + uint32_t idx; - TRC3(cmUnpkRguFlowCntrlInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(oduPackUInt32, ¶m->numUes, mBuf); @@ -1685,24 +947,15 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI S16 cmUnpkRguFlowCntrlInd ( RguFlowCntrlIndInfo func, Pst *pst, Buffer *mBuf ) -#else -S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf) -RguFlowCntrlIndInfo func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; RguFlowCntrlInd *flowCntrlInd; - - TRC3(cmUnpkRguFlowCntrlInd) if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -1719,7 +972,7 @@ Buffer *mBuf; } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) { + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -1735,7 +988,7 @@ Buffer *mBuf; (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd)); return RFAILED; } } @@ -1759,22 +1012,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguPduInfo ( RguPduInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguPduInfo(param, mBuf) -RguPduInfo *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmPkRguPduInfo); - for (i=param->numPdu-1; i >= 0; i--) { /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */ MsgLen msgLen = 0; @@ -1807,21 +1052,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguPduInfo ( RguPduInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguPduInfo(param, mBuf) -RguPduInfo *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmUnpkRguPduInfo); CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf); for (i=0; inumPdu; i++) { @@ -1853,21 +1091,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguDBoReport ( RguDBoReport *param, Buffer *mBuf ) -#else -S16 cmPkRguDBoReport(param, mBuf) -RguDBoReport *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguDBoReport); - CMCHKPK(oduUnpackUInt32, param->oldestSduArrTime, mBuf); CMCHKPK(oduUnpackUInt32, param->staPduBo, mBuf); #ifdef CCPU_OPT @@ -1896,20 +1126,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguDBoReport ( RguDBoReport *param, Buffer *mBuf ) -#else -S16 cmUnpkRguDBoReport(param, mBuf) -RguDBoReport *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguDBoReport); CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); #ifdef CCPU_OPT @@ -1939,22 +1162,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguCDatReqInfo ( RguCDatReqInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguCDatReqInfo(param, mBuf) -RguCDatReqInfo *param; -Buffer *mBuf; -#endif { MsgLen msgLen; - TRC3(cmPkRguCDatReqInfo); - if (param->pdu != NULLP) { if (SFndLenMsg(param->pdu, &msgLen) != ROK) @@ -2003,21 +1218,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguCDatReqInfo ( RguCDatReqInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguCDatReqInfo(param, mBuf) -RguCDatReqInfo *param; -Buffer *mBuf; -#endif { MsgLen msgLen, totalMsgLen; - TRC3(cmUnpkRguCDatReqInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); @@ -2067,21 +1275,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguLchDatReq ( RguLchDatReq *param, Buffer *mBuf ) -#else -S16 cmPkRguLchDatReq(param, mBuf) -RguLchDatReq *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLchDatReq); - #ifdef L2_OPTMZ CMCHKPK(oduUnpackUInt8, param->freeBuff, mBuf); #endif @@ -2110,21 +1310,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguLchDatReq ( RguLchDatReq *param, Buffer *mBuf ) -#else -S16 cmUnpkRguLchDatReq(param, mBuf) -RguLchDatReq *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguLchDatReq); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf); CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf); @@ -2152,21 +1344,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguDatReqTb ( RguDatReqTb *param, Buffer *mBuf ) -#else -S16 cmPkRguDatReqTb(param, mBuf) -RguDatReqTb *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmPkRguDatReqTb); /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS CMCHKPK(oduUnpackUInt32, param->tbId, mBuf); @@ -2197,7 +1382,6 @@ Buffer *mBuf; * **********************************************************/ #ifdef LTE_L2_MEAS -#ifdef ANSI S16 cmUnpkRguDatReqTb ( Pst *pst, @@ -2205,28 +1389,15 @@ RguDatReqTb *param, Buffer *mBuf ) #else -S16 cmUnpkRguDatReqTb(pst, param, mBuf) -Pst *pst; -RguDatReqTb *param; -Buffer *mBuf; -#endif -#else -#ifdef ANSI S16 cmUnpkRguDatReqTb ( RguDatReqTb *param, Buffer *mBuf ) -#else -S16 cmUnpkRguDatReqTb(param, mBuf) -RguDatReqTb *param; -Buffer *mBuf; -#endif #endif { S32 i; - TRC3(cmUnpkRguDatReqTb); CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf); for (i=0; inmbLch; i++) { @@ -2258,7 +1429,6 @@ Buffer *mBuf; **********************************************************/ /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS -#ifdef ANSI S16 cmPkRguDDatReqInfo ( Pst *pst, @@ -2266,29 +1436,16 @@ RguDDatReqInfo *param, Buffer *mBuf ) #else -S16 cmPkRguDDatReqInfo(pst, param, mBuf) -Pst *pst; -RguDDatReqInfo *param; -Buffer *mBuf; -#endif -#else -#ifdef ANSI S16 cmPkRguDDatReqInfo ( RguDDatReqInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguDDatReqInfo(param, mBuf) -RguDDatReqInfo *param; -Buffer *mBuf; -#endif #endif { S32 i; S32 idx; - TRC3(cmPkRguDDatReqInfo); for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--) { @@ -2325,7 +1482,6 @@ Buffer *mBuf; * **********************************************************/ #ifdef LTE_L2_MEAS -#ifdef ANSI S16 cmUnpkRguDDatReqInfo ( Pst *pst, @@ -2333,23 +1489,11 @@ RguDDatReqInfo *param, Buffer *mBuf ) #else -S16 cmUnpkRguDDatReqInfo(pst, param, mBuf) -Pst *pst; -RguDDatReqInfo *param; -Buffer *mBuf; -#endif -#else -#ifdef ANSI S16 cmUnpkRguDDatReqInfo ( RguDDatReqInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguDDatReqInfo(param, mBuf) -RguDDatReqInfo *param; -Buffer *mBuf; -#endif #endif { S32 i; @@ -2360,7 +1504,6 @@ Buffer *mBuf; #endif S32 idx; - TRC3(cmUnpkRguDDatReqInfo); /* After Merging from 2.1 to 2.2 */ /*rgu_c_001.main_5 - ADD - L2M Support */ @@ -2412,22 +1555,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguCDatIndInfo ( RguCDatIndInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguCDatIndInfo(param, mBuf) -RguCDatIndInfo *param; -Buffer *mBuf; -#endif { MsgLen msgLen; - TRC3(cmPkRguCDatIndInfo); - if (SFndLenMsg(param->pdu, &msgLen) != ROK) return RFAILED; if (SCatMsg(mBuf, param->pdu, M1M2) != ROK) @@ -2458,21 +1593,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguCDatIndInfo ( RguCDatIndInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguCDatIndInfo(param, mBuf) -RguCDatIndInfo *param; -Buffer *mBuf; -#endif { MsgLen msgLen, totalMsgLen; - TRC3(cmUnpkRguCDatIndInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); @@ -2503,21 +1631,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguLchDatInd ( RguLchDatInd *param, Buffer *mBuf ) -#else -S16 cmPkRguLchDatInd(param, mBuf) -RguLchDatInd *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLchDatInd); - CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf); + CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); return ROK; } @@ -2540,131 +1661,18 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguLchDatInd ( RguLchDatInd *param, Buffer *mBuf ) -#else -S16 cmUnpkRguLchDatInd(param, mBuf) -RguLchDatInd *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguLchDatInd); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf); return ROK; } - - -/*********************************************************** -* -* Func : packRlcMacDataInfo -* -* -* Desc : RlcMacData - * Data Indication from MAC to RLC for dedicated channels of a UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 packRlcMacDataInfo -( -RlcMacData *param, -Buffer *mBuf -) -#else -S16 packRlcMacDataInfo(param, mBuf) -RlcMacData *param; -Buffer *mBuf; -#endif -{ - S32 i; - MsgLen msgLen; - - TRC3(packRlcMacDataInfo); - - for (i=param->numPdu-1; i >= 0; i--) - { - msgLen = 0; - //if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK) - // return RFAILED; - //if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK) - // return RFAILED; - CMCHKPK(cmPkMsgLen, msgLen, mBuf); - CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf); - CMCHKPK(oduPackBool, param->pduInfo[i].commCh, mBuf); - } - CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - //CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : unpackRlcMacDataInfo -* -* -* Desc : RlcMacData - * Data Indication from MAC to RLC for dedicated channels of a UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 unpackRlcMacDataInfo -( -RlcMacData *param, -Buffer *mBuf -) -#else -S16 unpackRlcMacDataInfo(param, mBuf) -RlcMacData *param; -Buffer *mBuf; -#endif -{ - S32 i; - - TRC3(unpackRlcMacDataInfo); - - //CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf); - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf); - for (i=0; inumPdu; i++) - { - MsgLen totalMsgLen; - - CMCHKUNPK(oduUnpackBool, ¶m->pduInfo[i].commCh, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->pduInfo[i].lcId, mBuf); - CMCHKUNPK(cmUnpkMsgLen, ¶m->pduInfo[i].pduLen, mBuf); - if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - return RFAILED; - //if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, ¶m->pduInfo[i].pduBuf) != ROK) - // return RFAILED; - } - return ROK; -} - /*********************************************************** * @@ -2682,20 +1690,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguCStaRspInfo ( RguCStaRspInfo *param, Buffer *mBuf ) -#else -S16 cmPkRguCStaRspInfo(param, mBuf) -RguCStaRspInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguCStaRspInfo); switch(param->lcType) { case CM_LTE_LCH_CCCH: @@ -2737,20 +1738,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguCStaRspInfo ( RguCStaRspInfo *param, Buffer *mBuf ) -#else -S16 cmUnpkRguCStaRspInfo(param, mBuf) -RguCStaRspInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguCStaRspInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); @@ -2774,88 +1768,6 @@ Buffer *mBuf; return ROK; } - - -/*********************************************************** -* -* Func : packBOStatusInfo -* -* -* Desc : RlcMacBOStatus - * Status Response from RLC to MAC for dedicated logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 packBOStatusInfo -( -RlcMacBOStatus *param, -Buffer *mBuf -) -#else -S16 packBOStatusInfo(param, mBuf) -RlcMacBOStatus *param; -Buffer *mBuf; -#endif -{ - - TRC3(packBOStatusInfo); - - CMCHKPK(SPkS32, param->bo, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(oduPackBool, param->commCh, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - return ROK; -} /* End of packBOStatusInfo */ - - - -/*********************************************************** -* -* Func : unpackBOStatusInfo -* -* -* Desc : RlcMacBOStatus - * Status Response from RLC to MAC for dedicated logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -S16 unpackBOStatusInfo -( -RlcMacBOStatus *param, -Buffer *mBuf -) -#else -S16 unpackBOStatusInfo(param, mBuf) -RlcMacBOStatus *param; -Buffer *mBuf; -#endif -{ - - TRC3(unpackBOStatusInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduUnpackBool, ¶m->commCh, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); - return ROK; -} /* End of unpackBOStatusInfo */ - /*********************************************************** * @@ -2873,20 +1785,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguLchStaInd ( RguLchStaInd *param, Buffer *mBuf ) -#else -S16 cmPkRguLchStaInd(param, mBuf) -RguLchStaInd *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLchStaInd); CMCHKPK(SPkS16, param->totBufSize, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); @@ -2911,21 +1816,13 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguLchStaInd ( RguLchStaInd *param, Buffer *mBuf ) -#else -S16 cmUnpkRguLchStaInd(param, mBuf) -RguLchStaInd *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguLchStaInd); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf); return ROK; @@ -2948,21 +1845,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmPkRguStaIndTb ( RguStaIndTb *param, Buffer *mBuf ) -#else -S16 cmPkRguStaIndTb(param, mBuf) -RguStaIndTb *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmPkRguStaIndTb); #ifdef LTE_L2_MEAS CMCHKPK(oduUnpackUInt16, param->status, mBuf); @@ -2993,22 +1883,14 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI S16 cmUnpkRguStaIndTb ( RguStaIndTb *param, Buffer *mBuf ) -#else -S16 cmUnpkRguStaIndTb(param, mBuf) -RguStaIndTb *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmUnpkRguStaIndTb); - CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf); for (i=0; inmbLch; i++) { CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf); @@ -3020,87 +1902,6 @@ Buffer *mBuf; return ROK; } - -/*********************************************************** -* -* Func : packSchedRepInfo -* -* -* Desc : RlcMacSchedRep - * StaInd from MAC to RLC for dedicated logical channels of a UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 packSchedRepInfo -( -RlcMacSchedRepInfo *param, -Buffer *mBuf -) -{ - S32 idx; - - TRC3(packSchedRepInfo); - - for(idx = (param->nmbLch-1); idx >= 0; idx--) - { - CMCHKPK(cmPkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf); - CMCHKPK(oduPackBool, param->lchSta[idx].commCh, mBuf); - } - CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf); - - return ROK; -} /* End of packSchedRepInfo */ - - - -/*********************************************************** -* -* Func : unpackSchedRepInfo -* -* -* Desc : RlcMacSchedRep - * StaInd from MAC to RLC for dedicated logical channels of a UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 unpackSchedRepInfo -( -RlcMacSchedRepInfo *param, -Buffer *mBuf -) -{ - S32 idx; - - TRC3(unpackSchedRepInfo); - - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf); - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf); - for(idx = 0; idx < param->nmbLch; idx++) - { - CMCHKUNPK(oduUnpackBool, ¶m->lchSta[idx].commCh, mBuf); - CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf); - } - - return ROK; -} /* End of unpackSchedRepInfo */ - #endif /**********************************************************************