X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Frgr.c;h=070d06b01447a945d6377bf6c67cb63d60134442;hb=dfe84998d9dba8389ee232aa184bc3b5ae383db3;hp=b176d641b8ad1da78b1f716d7289cd8370ecb000;hpb=87c35884595a3166121854c3ae6e6e856f004ff4;p=o-du%2Fl2.git diff --git a/src/cm/rgr.c b/src/cm/rgr.c index b176d641b..070d06b01 100755 --- a/src/cm/rgr.c +++ b/src/cm/rgr.c @@ -44,10 +44,11 @@ /*********************************************************** * -* Func : cmPkRgrBndReq +* Func : cmUnpkRgrCfgReq * * -* Desc : Request from RRM to MAC to bind the interface saps +* Desc : Configuration Request from RRM to MAC for + * configuring Cell/Ue/Lc * * * Ret : S16 @@ -57,52 +58,70 @@ * File : * **********************************************************/ -S16 cmPkRgrBndReq +S16 cmUnpkRgrCfgReq ( -Pst* pst, -SuId suId, -SpId spId +RgrCfgReq func, +Pst *pst, +Buffer *mBuf ) { - Buffer *mBuf = NULLP; - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { + RgrCfgTransId transId; + RgrCfgReqInfo *cfgReqInfo; + +#if 0 + if (SUnpkS16(&spId, mBuf) != ROK) { + SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR001, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR021, (ErrVal)0, "Packing failed"); #endif return RFAILED; } - if (SPkS16(spId, mBuf) != ROK) { +#endif + + if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { + SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR002, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR022, (ErrVal)0, "Packing failed"); #endif - SPutMsg(mBuf); return RFAILED; } - if (SPkS16(suId, mBuf) != ROK) { + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&cfgReqInfo,sizeof(RgrCfgReqInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR003, (ErrVal)0, "Packing failed"); + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGR023, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } - pst->event = (Event) EVTRGRBNDREQ; - return (SPstTsk(pst,mBuf)); + memset(cfgReqInfo, 0, sizeof(RgrCfgReqInfo)); + if (pst->selector == ODU_SELECTOR_LC) + if (cmUnpkRgrCfgReqInfo(cfgReqInfo, mBuf) != ROK) { + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo)); + SPutMsg(mBuf); +#if (ERRCLASS & ERRCLS_ADD_RES) + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGR024, (ErrVal)0, "Packing failed"); +#endif + return RFAILED; + } + SPutMsg(mBuf); + return ((*func)(pst, transId, cfgReqInfo)); } +/* rgr_c_001.main_3: Added TTI indication from MAC to RGR user */ /*********************************************************** * -* Func : cmUnpkRgrBndReq +* Func : cmPkRgrTtiIndInfo * * -* Desc : Request from RRM to MAC to bind the interface saps +* Desc : Packs the TTI indication information. * * * Ret : S16 @@ -112,47 +131,50 @@ SpId spId * File : * **********************************************************/ -S16 cmUnpkRgrBndReq +S16 cmPkRgrTtiIndInfo ( -RgrBndReq func, -Pst *pst, +RgrTtiIndInfo *param, +Buffer *mBuf +) +{ + CMCHKPK(oduUnpackUInt16, param->sfn, mBuf); + CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + return ROK; +} + +/*********************************************************** +* +* Func : cmUnpkRgrTtiIndInfo +* +* +* Desc : Unpacking for RgrTtiIndInfo +* +* Ret : S16 +* +* Notes: +* +* File : +* +**********************************************************/ +S16 cmUnpkRgrTtiIndInfo +( +RgrTtiIndInfo *param, Buffer *mBuf ) { - SuId suId; - SpId spId; - - if (SUnpkS16(&suId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR004, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR005, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - return ((*func)(pst, suId, spId)); + CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); + CMCHKUNPK(oduPackUInt16, ¶m->sfn, mBuf); + return ROK; } /*********************************************************** * -* Func : cmPkRgrBndCfm +* Func : cmPkRgrTtiInd * * -* Desc : Confirmation from MAC to RRM for the bind/Unbind - * request for the interface saps +* Desc : TTI indication from MAC to RRM * * * Ret : S16 @@ -162,11 +184,11 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrBndCfm +S16 cmPkRgrTtiInd ( Pst* pst, SuId suId, -uint8_t status +RgrTtiIndInfo *ttiInd ) { Buffer *mBuf = NULLP; @@ -175,16 +197,17 @@ uint8_t status #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR006, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR025, (ErrVal)0, "Packing failed"); #endif return RFAILED; } - if (oduUnpackUInt8(status, mBuf) != ROK) { + if (cmPkRgrTtiIndInfo(ttiInd, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR007, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR026, (ErrVal)0, "Packing failed"); #endif + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, sizeof(RgrTtiIndInfo)); SPutMsg(mBuf); return RFAILED; } @@ -192,23 +215,24 @@ uint8_t status #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR008, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR027, (ErrVal)0, "Packing failed"); #endif + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, sizeof(RgrTtiIndInfo)); SPutMsg(mBuf); return RFAILED; } - pst->event = (Event) EVTRGRBNDCFM; + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, sizeof(RgrTtiIndInfo)); + pst->event = (Event) EVTRGRTTIIND; return (SPstTsk(pst,mBuf)); } /*********************************************************** * -* Func : cmUnpkRgrBndCfm +* Func : cmUnpkRgrTtiInd * * -* Desc : Confirmation from MAC to RRM for the bind/Unbind - * request for the interface saps +* Desc : TTI indication from MAC to RRM * * * Ret : S16 @@ -218,15 +242,15 @@ uint8_t status * File : * **********************************************************/ -S16 cmUnpkRgrBndCfm +S16 cmUnpkRgrTtiInd ( -RgrBndCfm func, +RgrTtiInd func, Pst *pst, Buffer *mBuf ) { SuId suId; - uint8_t status; + RgrTtiIndInfo *ttiInd; if (SUnpkS16(&suId, mBuf) != ROK) { @@ -234,30 +258,45 @@ Buffer *mBuf #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR009, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR028, (ErrVal)0, "Packing failed"); #endif return RFAILED; } - if (oduPackUInt8(&status, mBuf) != ROK) { + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&ttiInd, sizeof(RgrTtiIndInfo))) != ROK) + { +#if (ERRCLASS & ERRCLS_ADD_RES) + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGR029, (ErrVal)0, "UnPacking failed"); +#endif + SPutMsg(mBuf); + return RFAILED; + } + + if (cmUnpkRgrTtiIndInfo(ttiInd, mBuf) != ROK) { + /*ccpu00114888- Memory Leak issue- Start*/ + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, + sizeof(RgrTtiIndInfo)); + /*ccpu00114888- Memory Leak issue- End*/ SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR010, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR030, (ErrVal)0, "Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); - return ((*func)(pst, suId, status)); + return ((*func)(pst, suId, ttiInd)); } /*********************************************************** * -* Func : cmPkRgrUbndReq +* Func : cmPkRgrCfgCfm * * -* Desc : Request from RRM to MAC to Unbind the interface saps +* Desc : Configuration Confirm from MAC to RRM * * * Ret : S16 @@ -267,11 +306,11 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrUbndReq +S16 cmPkRgrCfgCfm ( Pst* pst, -SpId spId, -Reason reason +RgrCfgTransId transId, +uint8_t status ) { Buffer *mBuf = NULLP; @@ -280,39 +319,39 @@ Reason reason #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR011, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR031, (ErrVal)0, "Packing failed"); #endif return RFAILED; } - if (SPkS16(reason, mBuf) != ROK) { + if (oduUnpackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR012, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR032, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } - if (SPkS16(spId, mBuf) != ROK) { + if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR013, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR033, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); return RFAILED; } - pst->event = (Event) EVTRGRUBNDREQ; + pst->event = (Event) EVTMACSCHCFGCFM; return (SPstTsk(pst,mBuf)); } /*********************************************************** * -* Func : cmUnpkRgrUbndReq +* Func : cmUnpkRgrCfgCfm * * -* Desc : Request from RRM to MAC to Unbind the interface saps +* Desc : Configuration Confirm from MAC to RRM * * * Ret : S16 @@ -322,47 +361,46 @@ Reason reason * File : * **********************************************************/ -S16 cmUnpkRgrUbndReq +S16 cmUnpkRgrCfgCfm ( -RgrUbndReq func, +RgrCfgCfm func, Pst *pst, Buffer *mBuf ) { - SpId spId; - Reason reason; + RgrCfgTransId transId; + uint8_t status; - if (SUnpkS16(&spId, mBuf) != ROK) { + if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR014, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR036, (ErrVal)0, "Packing failed"); #endif return RFAILED; } - if (SUnpkS16(&reason, mBuf) != ROK) { + if (oduPackUInt8(&status, mBuf) != ROK) { SPutMsg(mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR015, (ErrVal)0, "Packing failed"); + (ErrVal)ERGR037, (ErrVal)0, "Packing failed"); #endif return RFAILED; } SPutMsg(mBuf); - return ((*func)(pst, spId, reason)); + return ((*func)(pst, transId, status)); } /*********************************************************** * -* Func : cmUnpkRgrCfgReq +* Func : cmPkRgrCfgTransId * * -* Desc : Configuration Request from RRM to MAC for - * configuring Cell/Ue/Lc +* Desc : Transaction ID between MAC and RRM * * * Ret : S16 @@ -372,70 +410,29 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrCfgReq +S16 cmPkRgrCfgTransId ( -RgrCfgReq func, -Pst *pst, +RgrCfgTransId *param, Buffer *mBuf ) { - RgrCfgTransId transId; - RgrCfgReqInfo *cfgReqInfo; - -#if 0 - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR021, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } -#endif - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR022, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&cfgReqInfo,sizeof(RgrCfgReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR023, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; + S32 i; + + for (i=RGR_CFG_TRANSID_SIZE-1; i >= 0; i--) { + CMCHKPK(oduUnpackUInt8, param->trans[i], mBuf); } - memset(cfgReqInfo, 0, sizeof(RgrCfgReqInfo)); - if (pst->selector == ODU_SELECTOR_LC) - if (cmUnpkRgrCfgReqInfo(cfgReqInfo, mBuf) != ROK) { - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo)); - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR024, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - return ((*func)(pst, transId, cfgReqInfo)); + return ROK; } -/* rgr_c_001.main_3: Added TTI indication from MAC to RGR user */ + /*********************************************************** * -* Func : cmPkRgrTtiIndInfo +* Func : cmUnpkRgrCfgTransId * * -* Desc : Packs the TTI indication information. +* Desc : Transaction ID between MAC and RRM * * * Ret : S16 @@ -445,23 +442,30 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrTtiIndInfo +S16 cmUnpkRgrCfgTransId ( -RgrTtiIndInfo *param, -Buffer *mBuf +RgrCfgTransId *param, +Buffer *mBuf ) { - CMCHKPK(oduUnpackUInt16, param->sfn, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + + S32 i; + + for (i=0; itrans[i], mBuf); + } return ROK; } + + /*********************************************************** * -* Func : cmUnpkRgrTtiIndInfo +* Func : cmPkRgrDlHqCfg * * -* Desc : Unpacking for RgrTtiIndInfo +* Desc : Downlink HARQ configuration per Cell +* * * Ret : S16 * @@ -470,25 +474,27 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrTtiIndInfo +S16 cmPkRgrDlHqCfg ( -RgrTtiIndInfo *param, +RgrDlHqCfg *param, Buffer *mBuf ) { - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->sfn, mBuf); - return ROK; -} + + CMCHKPK(oduUnpackUInt8, param->maxMsg4HqTx, mBuf); + CMCHKPK(oduUnpackUInt8, param->maxDlHqTx, mBuf); + return ROK; +} + /*********************************************************** * -* Func : cmPkRgrTtiInd +* Func : cmUnpkRgrDlHqCfg * * -* Desc : TTI indication from MAC to RRM +* Desc : Downlink HARQ configuration per Cell * * * Ret : S16 @@ -498,55 +504,27 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrTtiInd +S16 cmUnpkRgrDlHqCfg ( -Pst* pst, -SuId suId, -RgrTtiIndInfo *ttiInd +RgrDlHqCfg *param, +Buffer *mBuf ) { - 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)ERGR025, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (cmPkRgrTtiIndInfo(ttiInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR026, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, sizeof(RgrTtiIndInfo)); - SPutMsg(mBuf); - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR027, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, sizeof(RgrTtiIndInfo)); - SPutMsg(mBuf); - return RFAILED; - } - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, sizeof(RgrTtiIndInfo)); - pst->event = (Event) EVTRGRTTIIND; - return (SPstTsk(pst,mBuf)); + + CMCHKUNPK(oduPackUInt8, ¶m->maxDlHqTx, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->maxMsg4HqTx, mBuf); + return ROK; } + /*********************************************************** * -* Func : cmUnpkRgrTtiInd +* Func : cmPkRgrRntiCfg * * -* Desc : TTI indication from MAC to RRM +* Desc : Range of RNTIs managed by MAC * * * Ret : S16 @@ -556,61 +534,26 @@ RgrTtiIndInfo *ttiInd * File : * **********************************************************/ -S16 cmUnpkRgrTtiInd +S16 cmPkRgrRntiCfg ( -RgrTtiInd func, -Pst *pst, +RgrRntiCfg *param, Buffer *mBuf ) { - SuId suId; - RgrTtiIndInfo *ttiInd; - - if (SUnpkS16(&suId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR028, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&ttiInd, sizeof(RgrTtiIndInfo))) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR029, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - if (cmUnpkRgrTtiIndInfo(ttiInd, mBuf) != ROK) { - /*ccpu00114888- Memory Leak issue- Start*/ - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)ttiInd, - sizeof(RgrTtiIndInfo)); - /*ccpu00114888- Memory Leak issue- End*/ - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR030, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - return ((*func)(pst, suId, ttiInd)); + CMCHKPK(oduUnpackUInt16, param->size, mBuf); + CMCHKPK(cmPkLteRnti, param->startRnti, mBuf); + return ROK; } + /*********************************************************** * -* Func : cmPkRgrCfgCfm +* Func : cmUnpkRgrRntiCfg * * -* Desc : Configuration Confirm from MAC to RRM +* Desc : Range of RNTIs managed by MAC * * * Ret : S16 @@ -620,52 +563,26 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrCfgCfm +S16 cmUnpkRgrRntiCfg ( -Pst* pst, -RgrCfgTransId transId, -uint8_t status +RgrRntiCfg *param, +Buffer *mBuf ) { - 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)ERGR031, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduUnpackUInt8(status, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR032, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR033, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - pst->event = (Event) EVTMACSCHCFGCFM; - return (SPstTsk(pst,mBuf)); + + CMCHKUNPK(cmUnpkLteRnti, ¶m->startRnti, mBuf); + CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); + return ROK; } - +#ifdef EMTC_ENABLE /*********************************************************** * -* Func : cmUnpkRgrCfgCfm +* Func : cmPkRgrEmtcRntiCfg * * -* Desc : Configuration Confirm from MAC to RRM +* Desc : Range of Emtc RNTIs managed by MAC * * * Ret : S16 @@ -675,47 +592,30 @@ uint8_t status * File : * **********************************************************/ -S16 cmUnpkRgrCfgCfm +S16 cmPkRgrEmtcRntiCfg ( -RgrCfgCfm func, -Pst *pst, +RgrEmtcRntiCfg *param, Buffer *mBuf ) { - RgrCfgTransId transId; - uint8_t status; - - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR036, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduPackUInt8(&status, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR037, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - return ((*func)(pst, transId, status)); + + CMCHKPK(oduUnpackUInt16, param->size, mBuf); + CMCHKPK(cmPkLteRnti, param->rntiCeModeBRange, mBuf); + CMCHKPK(cmPkLteRnti, param->rntiCeModeBStart, mBuf); + CMCHKPK(cmPkLteRnti, param->rntiCeModeARange, mBuf); + CMCHKPK(cmPkLteRnti, param->rntiCeModeAStart, mBuf); + return ROK; } -/* rgr_c_001.main_4: ADD-Added for SI Enhancement. */ -#ifdef RGR_SI_SCH + + /*********************************************************** * -* Func : cmPkRgrSiCfgCfm +* Func : cmUnpkRgrEmtcRntiCfg * * -* Desc : SI Configuration Confirm from MAC to RRM +* Desc : Range of Emtc RNTIs managed by MAC * * * Ret : S16 @@ -725,64 +625,31 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrSiCfgCfm +S16 cmUnpkRgrEmtcRntiCfg ( -Pst* pst, -SuId suId, -RgrCfgTransId transId, -uint8_t status +RgrEmtcRntiCfg *param, +Buffer *mBuf ) { - 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)ERGR038, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduUnpackUInt8(status, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR039, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR040, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR041, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } + CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeAStart, mBuf); + CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeARange, mBuf); + CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeBStart, mBuf); + CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeBRange, mBuf); + CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); - pst->event = (Event) EVTRGRSICFGCFM; - return (SPstTsk(pst,mBuf)); + return ROK; } +#endif /*********************************************************** * -* Func : cmUnpkRgrSiCfgCfm +* Func : cmPkRgrDlCmnCodeRateCfg * * -* Desc : Configuration Confirm from MAC to RRM +* Desc : Downlink common channel code rate configuration per cell * * * Ret : S16 @@ -792,78 +659,16 @@ uint8_t status * File : * **********************************************************/ -S16 cmUnpkRgrSiCfgCfm +S16 cmPkRgrDlCmnCodeRateCfg ( -RgrSiCfgCfm func, -Pst *pst, +RgrDlCmnCodeRateCfg *param, Buffer *mBuf ) { - SuId suId; - RgrCfgTransId transId; - uint8_t status; - - if (SUnpkS16(&suId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR042, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR043, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (oduPackUInt8(&status, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR044, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - return ((*func)(pst, suId, transId, status)); -} -#endif/*RGR_SI_SCH*/ - - -/*********************************************************** -* -* Func : cmPkRgrCfgTransId -* -* -* Desc : Transaction ID between MAC and RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrCfgTransId -( -RgrCfgTransId *param, -Buffer *mBuf -) -{ - - S32 i; - - for (i=RGR_CFG_TRANSID_SIZE-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->trans[i], mBuf); - } + CMCHKPK(oduUnpackUInt8, param->ccchCqi, mBuf); + CMCHKPK(oduUnpackUInt16, param->pdcchCodeRate, mBuf); + CMCHKPK(oduUnpackUInt16, param->bcchPchRaCodeRate, mBuf); return ROK; } @@ -871,10 +676,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmUnpkRgrCfgTransId +* Func : cmUnpkRgrDlCmnCodeRateCfg * * -* Desc : Transaction ID between MAC and RRM +* Desc : Downlink common channel code rate configuration per cell * * * Ret : S16 @@ -884,18 +689,16 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrCfgTransId +S16 cmUnpkRgrDlCmnCodeRateCfg ( -RgrCfgTransId *param, +RgrDlCmnCodeRateCfg *param, Buffer *mBuf ) { - S32 i; - - for (i=0; itrans[i], mBuf); - } + CMCHKUNPK(oduPackUInt16, ¶m->bcchPchRaCodeRate, mBuf); + CMCHKUNPK(oduPackUInt16, ¶m->pdcchCodeRate, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->ccchCqi, mBuf); return ROK; } @@ -903,10 +706,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmPkRgrDlHqCfg +* Func : cmPkRgrCfiCfg * * -* Desc : Downlink HARQ configuration per Cell +* Desc : Control Format Indicator (CFI) configuration per cell * * * Ret : S16 @@ -916,16 +719,13 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrDlHqCfg +S16 cmPkRgrCfiCfg ( -RgrDlHqCfg *param, +RgrCfiCfg *param, Buffer *mBuf ) { - - - CMCHKPK(oduUnpackUInt8, param->maxMsg4HqTx, mBuf); - CMCHKPK(oduUnpackUInt8, param->maxDlHqTx, mBuf); + CMCHKPK(oduUnpackUInt8, param->cfi, mBuf); return ROK; } @@ -933,10 +733,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmUnpkRgrDlHqCfg +* Func : cmUnpkRgrCfiCfg * * -* Desc : Downlink HARQ configuration per Cell +* Desc : Control Format Indicator (CFI) configuration per cell * * * Ret : S16 @@ -946,16 +746,14 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrDlHqCfg +S16 cmUnpkRgrCfiCfg ( -RgrDlHqCfg *param, +RgrCfiCfg *param, Buffer *mBuf ) { - - CMCHKUNPK(oduPackUInt8, ¶m->maxDlHqTx, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->maxMsg4HqTx, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->cfi, mBuf); return ROK; } @@ -963,10 +761,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmPkRgrRntiCfg +* Func : cmPkRgrPuschSubBandCfg * * -* Desc : Range of RNTIs managed by MAC +* Desc : PUSCH sub-band configuration per cell * * * Ret : S16 @@ -976,15 +774,21 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrRntiCfg +S16 cmPkRgrPuschSubBandCfg ( -RgrRntiCfg *param, +RgrPuschSubBandCfg *param, Buffer *mBuf ) { - CMCHKPK(oduUnpackUInt16, param->size, mBuf); - CMCHKPK(cmPkLteRnti, param->startRnti, mBuf); + S32 i; + + for (i=param->numSubbands-1; i >= 0; i--) { + CMCHKPK(oduUnpackUInt8, param->dmrs[i], mBuf); + } + CMCHKPK(oduUnpackUInt8, param->size, mBuf); + CMCHKPK(oduUnpackUInt8, param->numSubbands, mBuf); + CMCHKPK(oduUnpackUInt8, param->subbandStart, mBuf); return ROK; } @@ -992,39 +796,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmUnpkRgrRntiCfg -* -* -* Desc : Range of RNTIs managed by MAC -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrRntiCfg -( -RgrRntiCfg *param, -Buffer *mBuf -) -{ - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->startRnti, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); - return ROK; -} - -#ifdef EMTC_ENABLE -/*********************************************************** -* -* Func : cmPkRgrEmtcRntiCfg +* Func : cmUnpkRgrPuschSubBandCfg * * -* Desc : Range of Emtc RNTIs managed by MAC +* Desc : PUSCH sub-band configuration per cell * * * Ret : S16 @@ -1034,19 +809,20 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrEmtcRntiCfg +S16 cmUnpkRgrPuschSubBandCfg ( -RgrEmtcRntiCfg *param, +RgrPuschSubBandCfg *param, Buffer *mBuf ) { - - CMCHKPK(oduUnpackUInt16, param->size, mBuf); - CMCHKPK(cmPkLteRnti, param->rntiCeModeBRange, mBuf); - CMCHKPK(cmPkLteRnti, param->rntiCeModeBStart, mBuf); - CMCHKPK(cmPkLteRnti, param->rntiCeModeARange, mBuf); - CMCHKPK(cmPkLteRnti, param->rntiCeModeAStart, mBuf); + S32 i; + CMCHKUNPK(oduPackUInt8, ¶m->subbandStart, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->numSubbands, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->size, mBuf); + for (i=0; inumSubbands; i++) { + CMCHKUNPK(oduPackUInt8, ¶m->dmrs[i], mBuf); + } return ROK; } @@ -1054,10 +830,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmUnpkRgrEmtcRntiCfg +* Func : cmPkRgrUlCmnCodeRateCfg * * -* Desc : Range of Emtc RNTIs managed by MAC +* Desc : Uplink common channel code rate configuration per cell * * * Ret : S16 @@ -1067,31 +843,24 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrEmtcRntiCfg +S16 cmPkRgrUlCmnCodeRateCfg ( -RgrEmtcRntiCfg *param, +RgrUlCmnCodeRateCfg *param, Buffer *mBuf ) { - - - CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeAStart, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeARange, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeBStart, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rntiCeModeBRange, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf); - + CMCHKPK(oduUnpackUInt8, param->ccchCqi, mBuf); return ROK; } -#endif + /*********************************************************** * -* Func : cmPkRgrDlCmnCodeRateCfg +* Func : cmUnpkRgrUlCmnCodeRateCfg * * -* Desc : Downlink common channel code rate configuration per cell +* Desc : Uplink common channel code rate configuration per cell * * * Ret : S16 @@ -1101,16 +870,14 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrDlCmnCodeRateCfg +S16 cmUnpkRgrUlCmnCodeRateCfg ( -RgrDlCmnCodeRateCfg *param, +RgrUlCmnCodeRateCfg *param, Buffer *mBuf ) { - CMCHKPK(oduUnpackUInt8, param->ccchCqi, mBuf); - CMCHKPK(oduUnpackUInt16, param->pdcchCodeRate, mBuf); - CMCHKPK(oduUnpackUInt16, param->bcchPchRaCodeRate, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->ccchCqi, mBuf); return ROK; } @@ -1118,10 +885,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmUnpkRgrDlCmnCodeRateCfg +* Func : cmPkRgrUlTrgCqiCfg * * -* Desc : Downlink common channel code rate configuration per cell +* Desc : Target Uplink CQI to achieve through group power control configured per cell * * * Ret : S16 @@ -1131,16 +898,13 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrDlCmnCodeRateCfg +S16 cmPkRgrUlTrgCqiCfg ( -RgrDlCmnCodeRateCfg *param, +RgrUlTrgCqiCfg *param, Buffer *mBuf ) { - - CMCHKUNPK(oduPackUInt16, ¶m->bcchPchRaCodeRate, mBuf); - CMCHKUNPK(oduPackUInt16, ¶m->pdcchCodeRate, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->ccchCqi, mBuf); + CMCHKPK(oduUnpackUInt8, param->trgCqi, mBuf); return ROK; } @@ -1148,10 +912,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmPkRgrCfiCfg +* Func : cmUnpkRgrUlTrgCqiCfg * * -* Desc : Control Format Indicator (CFI) configuration per cell +* Desc : Target Uplink CQI to achieve through group power control configured per cell * * * Ret : S16 @@ -1161,13 +925,14 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmPkRgrCfiCfg +S16 cmUnpkRgrUlTrgCqiCfg ( -RgrCfiCfg *param, +RgrUlTrgCqiCfg *param, Buffer *mBuf ) { - CMCHKPK(oduUnpackUInt8, param->cfi, mBuf); + + CMCHKUNPK(oduPackUInt8, ¶m->trgCqi, mBuf); return ROK; } @@ -1175,10 +940,10 @@ Buffer *mBuf /*********************************************************** * -* Func : cmUnpkRgrCfiCfg +* Func : cmPkRgrBwCfg * * -* Desc : Control Format Indicator (CFI) configuration per cell +* Desc : Bandwidth configuration per cell * * * Ret : S16 @@ -1188,232 +953,25 @@ Buffer *mBuf * File : * **********************************************************/ -S16 cmUnpkRgrCfiCfg +S16 cmPkRgrBwCfg ( -RgrCfiCfg *param, +RgrBwCfg *param, Buffer *mBuf ) { - CMCHKUNPK(oduPackUInt8, ¶m->cfi, mBuf); + CMCHKPK(oduUnpackUInt8, param->ulTotalBw, mBuf); + CMCHKPK(oduUnpackUInt8, param->dlTotalBw, mBuf); return ROK; } - -/*********************************************************** -* -* Func : cmPkRgrPuschSubBandCfg -* -* -* Desc : PUSCH sub-band configuration per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrPuschSubBandCfg +#ifdef EMTC_ENABLE +/* EMTC related pack changes start*/ + +S16 cmPkRgrEmtcSiCfg ( -RgrPuschSubBandCfg *param, -Buffer *mBuf -) -{ - - S32 i; - - for (i=param->numSubbands-1; i >= 0; i--) { - CMCHKPK(oduUnpackUInt8, param->dmrs[i], mBuf); - } - CMCHKPK(oduUnpackUInt8, param->size, mBuf); - CMCHKPK(oduUnpackUInt8, param->numSubbands, mBuf); - CMCHKPK(oduUnpackUInt8, param->subbandStart, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkRgrPuschSubBandCfg -* -* -* Desc : PUSCH sub-band configuration per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrPuschSubBandCfg -( -RgrPuschSubBandCfg *param, -Buffer *mBuf -) -{ - - S32 i; - CMCHKUNPK(oduPackUInt8, ¶m->subbandStart, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->numSubbands, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->size, mBuf); - for (i=0; inumSubbands; i++) { - CMCHKUNPK(oduPackUInt8, ¶m->dmrs[i], mBuf); - } - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkRgrUlCmnCodeRateCfg -* -* -* Desc : Uplink common channel code rate configuration per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrUlCmnCodeRateCfg -( -RgrUlCmnCodeRateCfg *param, -Buffer *mBuf -) -{ - CMCHKPK(oduUnpackUInt8, param->ccchCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkRgrUlCmnCodeRateCfg -* -* -* Desc : Uplink common channel code rate configuration per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrUlCmnCodeRateCfg -( -RgrUlCmnCodeRateCfg *param, -Buffer *mBuf -) -{ - - CMCHKUNPK(oduPackUInt8, ¶m->ccchCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkRgrUlTrgCqiCfg -* -* -* Desc : Target Uplink CQI to achieve through group power control configured per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrUlTrgCqiCfg -( -RgrUlTrgCqiCfg *param, -Buffer *mBuf -) -{ - CMCHKPK(oduUnpackUInt8, param->trgCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmUnpkRgrUlTrgCqiCfg -* -* -* Desc : Target Uplink CQI to achieve through group power control configured per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrUlTrgCqiCfg -( -RgrUlTrgCqiCfg *param, -Buffer *mBuf -) -{ - - CMCHKUNPK(oduPackUInt8, ¶m->trgCqi, mBuf); - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkRgrBwCfg -* -* -* Desc : Bandwidth configuration per cell -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrBwCfg -( -RgrBwCfg *param, -Buffer *mBuf -) -{ - - CMCHKPK(oduUnpackUInt8, param->ulTotalBw, mBuf); - CMCHKPK(oduUnpackUInt8, param->dlTotalBw, mBuf); - return ROK; -} - - -#ifdef EMTC_ENABLE -/* EMTC related pack changes start*/ - -S16 cmPkRgrEmtcSiCfg -( -RgrEmtcSiCfg *param, +RgrEmtcSiCfg *param, Buffer *mBuf ) { @@ -7729,1083 +7287,6 @@ Buffer *mBuf return ROK; } #endif /* RGR_V1 */ -/* rgr_c_001.main_4-ADD-Added for SI Enhancement. */ -#ifdef RGR_SI_SCH -/*********************************************************** -* -* Func : cmPkRgrSiCfgReq -* -* -* Desc : SI Configuration Request from RRM to MAC for -* configuring SI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrSiCfgReq -( -Pst* pst, -SpId spId, -RgrCfgTransId transId, -RgrSiCfgReqInfo * cfgReqInfo -) -{ - 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)ERGR045, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, - sizeof(RgrSiCfgReqInfo)); - return RFAILED; - } - if (cmPkRgrSiCfgReqInfo(cfgReqInfo, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR046, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, - sizeof(RgrSiCfgReqInfo)); - SPutMsg(mBuf); - return RFAILED; - } - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR047, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, - sizeof(RgrSiCfgReqInfo)); - 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)ERGR048, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, - sizeof(RgrSiCfgReqInfo)); - SPutMsg(mBuf); - return RFAILED; - } - if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, - sizeof(RgrSiCfgReqInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR049, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event) EVTRGRSICFGREQ; - return (SPstTsk(pst,mBuf)); -} - -/*********************************************************** -* -* Func : cmUnpkRgrSiCfgReq -* -* -* Desc : SI Configuration Request from RRM to MAC for -* configuring SI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrSiCfgReq -( -RgrSiCfgReq func, -Pst *pst, -Buffer *mBuf -) -{ - SpId spId; - RgrCfgTransId transId; - RgrSiCfgReqInfo *cfgReqInfo; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR050, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR051, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&cfgReqInfo, - sizeof(RgrSiCfgReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR052, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - memset(cfgReqInfo, 0, sizeof(RgrSiCfgReqInfo)); - if (pst->selector == ODU_SELECTOR_LC) - if (cmUnpkRgrSiCfgReqInfo(cfgReqInfo, mBuf) != ROK) { - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo, - sizeof(RgrSiCfgReqInfo)); - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR053, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - - return ((*func)(pst, spId, transId, cfgReqInfo)); -} - -/*********************************************************** -* -* Func : cmPkRgrSiCfgReqInfo -* -* -* Desc : Basic SI configuration/reconfiguration info at RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrSiCfgReqInfo -( -RgrSiCfgReqInfo *param, -Buffer *mBuf -) -{ - /* ccpu00111328: S16 is renamed as MsgLen */ - MsgLen msgLen; - - - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - CMCHKPK(SPkS32, param->cfgType, mBuf); - CMCHKPK(oduUnpackUInt8, param->siId, mBuf); - - if(NULLP != param->pdu) - { - if (SFndLenMsg(param->pdu, &msgLen) != ROK) - return RFAILED; - if (SCatMsg(mBuf, param->pdu, M1M2) != ROK) - return RFAILED; - SPutMsg(param->pdu); - CMCHKPK(cmPkMsgLen, msgLen, mBuf); - } - /*ccpu00140789*/ - else - { - CMCHKPK(cmPkMsgLen, 0, mBuf); - } - - return ROK; -} - -/*********************************************************** -* -* Func : cmUnpkRgrSiCfgReqInfo -* -* -* Desc : Basic SI configuration/reconfiguration info at RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrSiCfgReqInfo -( -RgrSiCfgReqInfo *param, -Buffer *mBuf -) -{ - MsgLen msgLen, totalMsgLen; - /*Merge from Mohit Changes*/ - S32 cfgType; - - - SFndLenMsg(mBuf, &msgLen); - if(msgLen > 0) - { - CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); - /*ccpu00140789*/ - if(msgLen > 0) - { - if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - return RFAILED; - if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK) - return RFAILED; - } - else - { - param->pdu = NULLP; - } - } - - CMCHKUNPK(oduPackUInt8, ¶m->siId, mBuf); - /*CMCHKUNPK(SUnpkS32, (S32 *)¶m->cfgType, mBuf);*/ - /*Merge from Mohit Changes*/ - CMCHKUNPK(SUnpkS32,(S32 *)&cfgType, mBuf); - param->cfgType = (RgrSiCfgType) cfgType; - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - - return ROK; -} - - - -/*********************************************************** -* -* Func : cmPkRgrWarningSiCfgReq -* -* -* Desc : SI Configuration Request from RRM to MAC for -* configuring warning SI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrWarningSiCfgReq -( -Pst* pst, -SpId spId, -RgrCfgTransId transId, -RgrWarningSiCfgReqInfo * warningSiCfgReqInfo -) -{ - 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)ERGR061, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo)); - return RFAILED; - } - - if (cmPkRgrWarningSiCfgReqInfo(pst, warningSiCfgReqInfo, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR062, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo)); - SPutMsg(mBuf); - return RFAILED; - } - - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR063, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo)); - 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)ERGR064, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo)); - SPutMsg(mBuf); - return RFAILED; - } - - /* if the application wants to retain this structure, the below - * code should be removed */ - if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo)) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR065, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event) EVTRGRWARNINGSICFGREQ; - return (SPstTsk(pst,mBuf)); -}/*cmPkRgrWarningSiCfgReq*/ - - -/*********************************************************** -* -* Func : cmUnpkRgrWarningSiCfgReq -* -* -* Desc : SI Configuration Request from RRM to MAC for -* configuring warning SI -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrWarningSiCfgReq -( -RgrWarningSiCfgReq func, -Pst *pst, -Buffer *mBuf -) -{ - SpId spId; - RgrCfgTransId transId; - RgrWarningSiCfgReqInfo *warningSiCfgReqInfo; - - - if (SUnpkS16(&spId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR066, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR067, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo))) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR068, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - - if (pst->selector == ODU_SELECTOR_LC) - { - if (cmUnpkRgrWarningSiCfgReqInfo(pst, warningSiCfgReqInfo, mBuf) != ROK) - { - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo, - sizeof(RgrWarningSiCfgReqInfo)); - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR069, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - } - SPutMsg(mBuf); - - return ((*func)(pst, spId, transId, warningSiCfgReqInfo)); -} /* cmUnpkRgrWarningSiCfgReq */ - - -/*********************************************************** -* -* Func : cmPkRgrWarningSiCfgReqInfo -* -* -* Desc : Basic warning SI configuration/reconfiguration -* info at RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrWarningSiCfgReqInfo -( -Pst *pst, -RgrWarningSiCfgReqInfo *param, -Buffer *mBuf -) -{ - MsgLen msgLen; - uint32_t count; - CmLList *node, *prevNode; - RgrSegmentInfo *pdu; - - - CMCHKPK(oduUnpackUInt8, param->emtcEnable, mBuf); - - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - CMCHKPK(oduUnpackUInt8, param->siId, mBuf); - - count = param->siPduLst.count; - node = param->siPduLst.last; - while (node) - { - pdu = (RgrSegmentInfo *)node->node; - prevNode= node->prev; - if(NULLP != pdu) - { - if (SFndLenMsg(pdu->pdu, &msgLen) != ROK) - return RFAILED; - if (SCatMsg(mBuf, pdu->pdu, M1M2) != ROK) - return RFAILED; - /* The PDU is not Released. This has to be done by - * the caller of the packing function */ - CMCHKPK(cmPkMsgLen, msgLen, mBuf); - SPutMsg(pdu->pdu); - } - cmLListDelFrm(¶m->siPduLst, node); - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)node, sizeof(RgrSegmentInfo)); - node= prevNode; - } - CMCHKPK(oduUnpackUInt32, count, mBuf); - return ROK; -} - - -/*********************************************************** -* -* Func : cmUnpkRgrWarningSiCfgReqInfo -* -* -* Desc : Unpack warning SI configuration info at SCH -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrWarningSiCfgReqInfo -( -Pst *pst, -RgrWarningSiCfgReqInfo *param, -Buffer *mBuf -) -{ - MsgLen msgLen, totalMsgLen; - uint32_t count, loopCnt; - Buffer *pdu; - CmLList *node; - - - cmLListInit(¶m->siPduLst); - CMCHKUNPK(oduPackUInt32, &count, mBuf); - for (loopCnt=0; loopCnt 0) - { - CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); - if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - { - return RFAILED; - } - if (SSegMsg(mBuf, totalMsgLen-msgLen, &pdu) != ROK) - { - return RFAILED; - } - } - else - { - return RFAILED; - } - if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&node, - sizeof(CmLList))) != ROK) - return RFAILED; - node->node = (PTR)pdu; - cmLListAdd2Tail(¶m->siPduLst, node); - } - - CMCHKUNPK(oduPackUInt8, ¶m->siId, mBuf); - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKPK(oduPackUInt8, ¶m->emtcEnable, mBuf); - - return ROK; -} - - -/*********************************************************** -* -* Func : cmPkRgrWarningSiStopReq -* -* Desc : To stop the broadcast for SIB10, SIB11 and SIB12. -* -* Ret : S16 -* -* Notes: -* -* File : -**********************************************************/ -S16 cmPkRgrWarningSiStopReq -( -Pst *pst, -SpId spId, -RgrCfgTransId transId, -uint8_t siId -) -{ - 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)ERGR070, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - CMCHKPK(oduUnpackUInt8, siId, mBuf); - - - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR082, (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)ERGR071, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event) EVTRGRWARNINGSISTOPREQ; - return (SPstTsk(pst,mBuf)); -}/*cmPkRgrWarningSiStopReq */ - - -/*********************************************************** -* -* Func : cmUnpkRgrWarningSiStopReq -* -* Desc : To stop the broadcast for SIB10, SIB11 and SIB12. -* -* Ret : S16 -* -* Notes: -* -* File : -**********************************************************/ -S16 cmUnpkRgrWarningSiStopReq -( -RgrWarningSiStopReq func, -Pst *pst, -Buffer *mBuf -) -{ - SpId spId; - uint8_t siId; - RgrCfgTransId transId; - - - if (SUnpkS16(&spId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR072, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR083, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - CMCHKUNPK(oduPackUInt8, &siId, mBuf); - - SPutMsg(mBuf); - - return ((*func)(pst, spId, transId, siId)); -} /*cmUnpkRgrWarningSiStopReq */ - - -/*********************************************************** -* -* Func : cmPkRgrWarningSiCfgCfm -* -* -* Desc : Warning SI Configuration Confirm from MAC to RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrWarningSiCfgCfm -( -Pst* pst, -SuId suId, -RgrCfgTransId transId, -uint8_t siId, -uint8_t status -) -{ - 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)ERGR073, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (oduUnpackUInt8(status, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR074, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - if (oduUnpackUInt8(siId, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR075, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR076, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - if (SPkS16(suId, mBuf) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR077, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event) EVTRGRWARNINGSICFGCFM; - return (SPstTsk(pst,mBuf)); -} /* cmPkRgrWarningSiCfgCfm */ - - -/*********************************************************** -* -* Func : cmUnpkRgrwarningSiCfgCfm -* -* -* Desc : Warning SI Configuration Confirm from MAC to RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrWarningSiCfgCfm -( -RgrWarningSiCfgCfm func, -Pst *pst, -Buffer *mBuf -) -{ - SuId suId; - uint8_t siId; - RgrCfgTransId transId; - uint8_t status; - - - if (SUnpkS16(&suId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR078, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR079, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (oduPackUInt8(&siId, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR080, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (oduPackUInt8(&status, mBuf) != ROK) - { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR081, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - return ((*func)(pst, suId, transId, siId, status)); -}/* cmUnpkRgrwarningSiCfgCfm */ -#endif/*RGR_SI_SCH*/ - -/* LTE_ADV_FLAG_REMOVED_START */ -/*********************************************************** -* -* Func : cmPkRgrLoadInfReq -* -* -* Desc : LOAD INF Configuration Request from RRM to MAC for -* configuring RNTP, ABS etc -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrLoadInfReq -( -Pst* pst, -SpId spId, -RgrCfgTransId transId, -RgrLoadInfReqInfo * loadInfReq -) -{ - 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)ERGR045, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq, - sizeof(RgrLoadInfReqInfo)); - return RFAILED; - } - if (cmPkRgrLoadInfReqInfo(loadInfReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR046, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq, - sizeof(RgrLoadInfReqInfo)); - SPutMsg(mBuf); - return RFAILED; - } - if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR047, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq, - sizeof(RgrLoadInfReqInfo)); - 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)ERGR048, (ErrVal)0, "Packing failed"); -#endif - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq, - sizeof(RgrLoadInfReqInfo)); - SPutMsg(mBuf); - return RFAILED; - } - if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq, - sizeof(RgrLoadInfReqInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR049, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - pst->event = (Event) EVTRGRLOADINFREQ; - return (SPstTsk(pst,mBuf)); -} - -/*********************************************************** -* -* Func : cmUnpkRgrLoadInfReq -* -* -* Desc : LOAD INF Configuration Request from RRM to MAC for -* configuring RNTP, ABS etc -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrLoadInfReq -( -RgrLoadInfReq func, -Pst *pst, -Buffer *mBuf -) -{ - SpId spId; - RgrCfgTransId transId; - RgrLoadInfReqInfo *loadInfReq; - - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR050, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) { - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR051, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - - if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&loadInfReq, - sizeof(RgrLoadInfReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR052, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - return RFAILED; - } - - memset(loadInfReq, 0, sizeof(RgrLoadInfReqInfo)); - - if (pst->selector == ODU_SELECTOR_LC) - if (cmUnpkRgrLoadInfReqInfo(loadInfReq, mBuf) != ROK) { - SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq, - sizeof(RgrLoadInfReqInfo)); - SPutMsg(mBuf); -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGR053, (ErrVal)0, "Packing failed"); -#endif - return RFAILED; - } - SPutMsg(mBuf); - - return ((*func)(pst, spId, transId, loadInfReq)); -} - -/*********************************************************** -* -* Func : cmPkRgrLoadInfReqInfo -* -* -* Desc : Basic LOAD INF configuration/reconfiguration info at RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmPkRgrLoadInfReqInfo -( -RgrLoadInfReqInfo *param, -Buffer *mBuf -) -{ - - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - CMCHKPK(oduUnpackUInt8, param->rgrCcPHighStartRb, mBuf); - CMCHKPK(oduUnpackUInt8, param->rgrCcPHighEndRb, mBuf); - - return ROK; -} - -/*********************************************************** -* -* Func : cmUnpkRgrLoadInfReqInfo -* -* -* Desc : Basic LOAD INF configuration/reconfiguration info at RRM -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -S16 cmUnpkRgrLoadInfReqInfo -( -RgrLoadInfReqInfo *param, -Buffer *mBuf -) -{ - - CMCHKUNPK(oduPackUInt8, ¶m->rgrCcPHighEndRb, mBuf); - CMCHKUNPK(oduPackUInt8, ¶m->rgrCcPHighStartRb, mBuf); - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - - return ROK; -} -/* LTE_ADV_FLAG_REMOVED_END */ /*rgr_c_001.main_9 ccpu00117452 - MOD - Changed macro name from RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */