- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUCDATIND;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Data Indication from MAC to RLC to
- * forward the data received for common channels
-*
-* @details
-*
-* Function : cmUnpkRguCDatInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguCDatIndInfo * datInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguCDatInd
-(
-RguCDatInd func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguCDatInd(func, pst, mBuf)
-RguCDatInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SuId suId;
- RguCDatIndInfo *datInd;
-
- TRC3(cmUnpkRguCDatInd)
-
- if (SUnpkS16(&suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU032, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf);
- }
- else
- {
- if ((SGetStaticBuffer(pst->region, pst->pool,
- (Data **)&datInd, sizeof(RguCDatIndInfo),0)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU033, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (cmUnpkRguCDatIndInfo(datInd, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU034, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd,
- sizeof(RguCDatIndInfo),0);
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, suId, datInd));
-}
-
-\f
-/**
-* @brief Data Indication from MAC to RLC to
- * forward the data received for dedicated channels
-*
-* @details
-*
-* Function : cmPkRguDDatInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguDDatIndInfo * datInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguDDatInd
-(
-Pst* pst,
-SuId suId,
-RguDDatIndInfo * datInd
-)
-#else
-PUBLIC S16 cmPkRguDDatInd(pst, suId, datInd)
-Pst* pst;
-SuId suId;
-RguDDatIndInfo * datInd;
-#endif
-{
- Buffer *mBuf = NULLP;
- TRC3(cmPkRguDDatInd)
-
- 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 *)datInd, sizeof(RguDDatIndInfo),0);
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) datInd, mBuf);
- }
- else
- {
- if (cmPkRguDDatIndInfo(datInd, 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 *)datInd, sizeof(RguDDatIndInfo),0);
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- if (SPutStaticBuffer(pst->region, pst->pool,
- (Data *)datInd, sizeof(RguDDatIndInfo),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);
- RETVALUE(RFAILED);
- }
- datInd = 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)ERGU037, (ErrVal)0, "Packing failed");
-#endif
- SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0);
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUDDATIND;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Data Indication from MAC to RLC to
- * forward the data received for dedicated channels
-*
-* @details
-*
-* Function : cmUnpkRguDDatInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguDDatIndInfo * datInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguDDatInd
-(
-RguDDatInd func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguDDatInd(func, pst, mBuf)
-RguDDatInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SuId suId;
- RguDDatIndInfo *datInd;
-
- TRC3(cmUnpkRguDDatInd)
-
- if (SUnpkS16(&suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf);
- }
- else
- {
- if ((SGetStaticBuffer(pst->region, pst->pool,
- (Data **)&datInd, sizeof(RguDDatIndInfo),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);
- RETVALUE(RFAILED);
- }
- if (cmUnpkRguDDatIndInfo(datInd, 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 *)datInd, sizeof(RguDDatIndInfo),0);
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, suId, datInd));
-}
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to
- * inform the BO report for common channels
-*
-* @details
-*
-* Function : cmPkRguCStaRsp
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguCStaRspInfo * staRsp
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguCStaRsp
-(
-Pst* pst,
-SpId spId,
-RguCStaRspInfo * staRsp
-)
-#else
-PUBLIC S16 cmPkRguCStaRsp(pst, spId, staRsp)
-Pst* pst;
-SpId spId;
-RguCStaRspInfo * staRsp;
-#endif
-{
- Buffer *mBuf = NULLP;
- TRC3(cmPkRguCStaRsp)
-
- 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)ERGU042, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguCStaRspInfo));
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) staRsp, mBuf);
- }
- else
- {
- if (cmPkRguCStaRspInfo(staRsp, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU043, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)staRsp,
- sizeof(RguCStaRspInfo));
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- if (SPutSBuf(pst->region, pst->pool, (Data *)staRsp,
- sizeof(RguCStaRspInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU045, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- staRsp = 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)ERGU044, (ErrVal)0, "Packing failed");
-#endif
- if (staRsp != NULLP)
- {
- SPutSBuf(pst->region, pst->pool,
- (Data *)staRsp, sizeof(RguCStaRspInfo));
- }
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUCSTARSP;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to
- * inform the BO report for common channels
-*
-* @details
-*
-* Function : cmUnpkRguCStaRsp
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguCStaRspInfo * staRsp
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguCStaRsp
-(
-RguCStaRsp func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguCStaRsp(func, pst, mBuf)
-RguCStaRsp func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SpId spId;
- RguCStaRspInfo *staRsp;
-
- TRC3(cmUnpkRguCStaRsp)
-
- if (SUnpkS16(&spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU046, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp,
- sizeof(RguCStaRspInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU047, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (cmUnpkRguCStaRspInfo(staRsp, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU048, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool, (Data *)staRsp,
- sizeof(RguCStaRspInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, spId, staRsp));
-}
-
-/*rgu_c_001.main_5 - ADD - L2M & R9 Support */
-#ifdef LTE_L2_MEAS
-
-/***********************************************************
-*
-* Func :cmPkRguL2MUlThrpMeasReqInfo
-*
-*
-* Status Response from RLC to MAC on UL dedicated logical channel for Uplink
-* Scheduled throughput measurement
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo
-(
-RguL2MUlThrpMeasReqInfo* param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
-RguL2MUlThrpMeasReqInfo* param;
-Buffer *mBuf;
-#endif
-{
- S32 loop;
- TRC3(cmPkRguL2MUlThrpMeasReqInfo);
-
- CMCHKPK(SPkU8, param->enbMeas, mBuf);
- for (loop=param->numLcId-1; loop >= 0; loop--)
- {
- CMCHKPK(SPkU8, param->lcId[loop], mBuf);
- }
- CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
- CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
- CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
- RETVALUE(ROK);
-}
-
-
-\f
-/***********************************************************
-*
-* Func :cmUnpkRguL2MUlThrpMeasReqInfo
-*
-*
-* Status Response from RLC to MAC on UL dedicated logical channel for Uplink
-* Scheduled throughput measurement
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo
-(
-RguL2MUlThrpMeasReqInfo *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
-RguL2MUlThrpMeasReqInfo *param;
-Buffer *mBuf;
-#endif
-{
- U8 loop;
- TRC3(cmUnpkRguL2MUlThrpMeasReqInfo);
-
- CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
- CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
- CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
- for (loop=0; loop<param->numLcId; loop++)
- {
- CMCHKUNPK(SUnpkU8, ¶m->lcId[loop], mBuf);
- }
- CMCHKUNPK(SUnpkU8, ¶m->enbMeas, mBuf);
- RETVALUE(ROK);
-}
-
-/**
-* @brief Primitive invoked from RLC to MAC to
-* inform the On/Off status for Scheduled UL throughput
-* measurment for dedicated channels
-*
-* @details
-*
-* Function :cmPkRguL2MUlThrpMeasReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguL2MUlThrpMeasReqInfo* measReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguL2MUlThrpMeasReq
-(
-Pst* pst,
-SpId spId,
-RguL2MUlThrpMeasReqInfo* measReq
-)
-#else
-PUBLIC 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)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) measReq, mBuf);
- }
- else
- {
- if (cmPkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU050, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)measReq,
- sizeof(RguL2MUlThrpMeasReqInfo));
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
- sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- measReq = 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)ERGU051, (ErrVal)0, "Packing failed");
-#endif
- if (measReq != NULLP)
- {
- SPutSBuf(pst->region, pst->pool, (Data *)measReq,
- sizeof(RguL2MUlThrpMeasReqInfo));
- }
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to
-* inform the On/Off status for Scheduled UL throughput
-* measurment for dedicated channels
-*
-* @details
-*
-* Function :cmUnpkRguL2MUlThrpMeasReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguL2MUlThrpMeasReqInfo * measReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq
-(
-RguL2MUlThrpMeasReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC 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)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &measReq, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
- sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool, (Data *)measReq,
- sizeof(RguL2MUlThrpMeasReqInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, spId, measReq));
-}
-
-#endif
-
-
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to
- * inform the BO report for dedicated channels
-*
-* @details
-*
-* Function : cmPkRguDStaRsp
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguDStaRspInfo * staRsp
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguDStaRsp
-(
-Pst* pst,
-SpId spId,
-RguDStaRspInfo *staRsp
-)
-#else
-PUBLIC S16 cmPkRguDStaRsp(pst, spId, staRsp)
-Pst* pst;
-SpId spId;
-RguDStaRspInfo *staRsp;
-#endif
-{
-
- RguDStaRspInfo *staRspInfo = NULL;
- Buffer *mBuf = NULLP;
-
- if(SGetSBuf(pst->region, pst->pool, (Data **)&staRspInfo, sizeof(RguDStaRspInfo)) != 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
- RETVALUE(RFAILED);
- }
-#ifdef ERRCLS_KW
- /* staRspInfo cant be NULL here */
- if (staRspInfo == NULLP)
- {
- RETVALUE(RFAILED);
- }
-#endif
- cmMemcpy((U8 *)staRspInfo, (U8 *)staRsp, sizeof(RguDStaRspInfo));
- 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 *)staRspInfo, sizeof(RguDStaRspInfo));
-
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) staRspInfo, mBuf);
- }
- else
- {
- if (cmPkRguDStaRspInfo(staRsp, 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);
- RETVALUE(RFAILED);
- }
- }
- if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU058, (ErrVal)0, "Packing failed");
-#endif
- if (staRspInfo != NULLP)
- {
- SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo));
- }
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUDSTARSP;
- RETVALUE(SPstTsk(pst,mBuf));
- SPutMsg(mBuf);
-}
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to
- * inform the BO report for dedicated channels
-*
-* @details
-*
-* Function : cmUnpkRguDStaRsp
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguDStaRspInfo * staRsp
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguDStaRsp
-(
-RguDStaRsp func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguDStaRsp(func, pst, mBuf)
-RguDStaRsp func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SpId spId;
- RguDStaRspInfo *staRsp;
-
- TRC3(cmUnpkRguDStaRsp)
-
- 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);
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp,
- sizeof(RguDStaRspInfo))) != 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);
- RETVALUE(RFAILED);
- }
- if (cmUnpkRguDStaRspInfo(staRsp, 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 *)staRsp, sizeof(RguDStaRspInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- (*func)(pst, spId, staRsp);
- SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo));
- RETVALUE(ROK);
-}
-
-\f
-/**
-* @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 common channels.
-*
-* @details
-*
-* Function : cmPkRguCStaInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguCStaIndInfo * staInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguCStaInd
-(
-Pst* pst,
-SuId suId,
-RguCStaIndInfo * staInd
-)
-#else
-PUBLIC S16 cmPkRguCStaInd(pst, suId, staInd)
-Pst* pst;
-SuId suId;
-RguCStaIndInfo * staInd;
-#endif
-{
- Buffer *mBuf = NULLP;
- TRC3(cmPkRguCStaInd)
-
- 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)ERGU063, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo));
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) staInd, mBuf);
- }
- else
- {
- if (cmPkRguCStaIndInfo(staInd, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU064, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo));
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (SPutSBuf(pst->region, pst->pool,
- (Data *)staInd, sizeof(RguCStaIndInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU066, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- staInd = 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)ERGU065, (ErrVal)0, "Packing failed");
-#endif
- if (staInd != NULLP)
- {
- SPutSBuf(pst->region, pst->pool, (Data *)staInd,
- sizeof(RguCStaIndInfo));
- }
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- pst->event = (Event) EVTRGUCSTAIND;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @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 common channels.
-*
-* @details
-*
-* Function : cmUnpkRguCStaInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguCStaIndInfo * staInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguCStaInd
-(
-RguCStaInd func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguCStaInd(func, pst, mBuf)
-RguCStaInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SuId suId;
- RguCStaIndInfo *staInd;
-
- TRC3(cmUnpkRguCStaInd)
-
- if (SUnpkS16(&suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU067, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguCStaIndInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU068, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (cmUnpkRguCStaIndInfo(staInd, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU069, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, suId, staInd));
-}
-
- /*rgu_c_001.main_5 - ADD - L2M Support */
-#ifdef LTE_L2_MEAS
-\f
-/**
-* @brief Harq Status Indication from MAC to RLC
-*
-* @details
-*
-* Function : cmPkRguHqStaInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguHarqStatusInd *harqStatusInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguHqStaInd
-(
-Pst* pst,
-SuId suId,
-RguHarqStatusInd *harqStatusInd
-)
-#else
-PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
-Pst* pst;
-SuId suId;
-RguHarqStatusInd *harqStatusInd;
-#endif
-{
-
- Buffer *mBuf;
- U8 idx;
- RguHarqStatusInd *harqStaInd = NULL;
-
- TRC3(cmPkRguHqStaInd)
-#ifdef XEON_SPECIFIC_CHANGES
- if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
-#else
- if ((SGetStaticBuffer(pst->region, pst->pool,
- (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
-#endif
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
-#endif
- RETVALUE(RFAILED);
- }
-
- cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
-
- 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)ERGU070, (ErrVal)0, "Packing failed");
-#endif
-#ifdef XEON_SPECIFIC_CHANGES
- SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
-#else
- SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
-#endif
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) harqStaInd, mBuf);
- }
- else
- {
- for(idx = 0; idx < harqStaInd->numTbs; idx++)
- {
- CMCHKPK(SPkU16, harqStaInd->status[idx], mBuf);
- }
- for(idx = 0; idx < harqStaInd->numTbs; idx++)
- {
- CMCHKPK(SPkU32, harqStaInd->tbId[idx], mBuf);
- }
- CMCHKPK(SPkU8, harqStaInd->numTbs, mBuf);
- CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
- CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
- }
- if (SPkS16(suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
-#endif
-#ifdef XEON_SPECIFIC_CHANGES
- SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
- sizeof(RguHarqStatusInd));
-#else
- SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);