1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code for packing/unpacking of RGU interface
30 **********************************************************************/
33 @brief This file contains the packing/unpacking code for the RGU interface
37 /* header include files (.h) */
38 #include "common_def.h"
39 #include "rgu.h" /* RGU Interface defines */
41 /* header/extern include files (.x) */
42 #include "rgu.x" /* RGU Interface includes */
53 * @brief Request from RLC to MAC to bind the interface saps
57 * Function : cmPkRguBndReq
60 * @param[in] SuId suId
61 * @param[in] SpId spId
73 S16 cmPkRguBndReq(pst, suId, spId)
82 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
83 #if (ERRCLASS & ERRCLS_ADD_RES)
84 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
85 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
86 (ErrVal)ERGU001, (ErrVal)0, "Packing failed");
90 if (SPkS16(spId, mBuf) != ROK) {
91 #if (ERRCLASS & ERRCLS_ADD_RES)
92 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
93 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
94 (ErrVal)ERGU002, (ErrVal)0, "Packing failed");
99 if (SPkS16(suId, mBuf) != ROK) {
100 #if (ERRCLASS & ERRCLS_ADD_RES)
101 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
102 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
103 (ErrVal)ERGU003, (ErrVal)0, "Packing failed");
108 pst->event = (Event) EVTRGUBNDREQ;
109 return (SPstTsk(pst,mBuf));
114 * @brief Request from RLC to MAC to bind the interface saps
118 * Function : cmUnpkRguBndReq
120 * @param[in] Pst* pst
121 * @param[in] SuId suId
122 * @param[in] SpId spId
134 S16 cmUnpkRguBndReq(func, pst, mBuf)
143 TRC3(cmUnpkRguBndReq)
145 if (SUnpkS16(&suId, mBuf) != ROK) {
146 #if (ERRCLASS & ERRCLS_ADD_RES)
147 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
148 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
149 (ErrVal)ERGU004, (ErrVal)0, "UnPacking failed");
154 if (SUnpkS16(&spId, mBuf) != ROK) {
155 #if (ERRCLASS & ERRCLS_ADD_RES)
156 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
157 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
158 (ErrVal)ERGU005, (ErrVal)0, "UnPacking failed");
164 return ((*func)(pst, suId, spId));
169 * @brief Request from RLC to MAC to Unbind the interface saps
173 * Function : cmPkRguUbndReq
175 * @param[in] Pst* pst
176 * @param[in] SpId spId
177 * @param[in] Reason reason
189 S16 cmPkRguUbndReq(pst, spId, reason)
195 Buffer *mBuf = NULLP;
198 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
199 #if (ERRCLASS & ERRCLS_ADD_RES)
200 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
201 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
202 (ErrVal)ERGU006, (ErrVal)0, "Packing failed");
206 if (SPkS16(reason, mBuf) != ROK) {
207 #if (ERRCLASS & ERRCLS_ADD_RES)
208 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
209 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
210 (ErrVal)ERGU007, (ErrVal)0, "Packing failed");
215 if (SPkS16(spId, mBuf) != ROK) {
216 #if (ERRCLASS & ERRCLS_ADD_RES)
217 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
218 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
219 (ErrVal)ERGU008, (ErrVal)0, "Packing failed");
224 pst->event = (Event) EVTRGUUBNDREQ;
225 return (SPstTsk(pst,mBuf));
230 * @brief Request from RLC to MAC to Unbind the interface saps
234 * Function : cmUnpkRguUbndReq
236 * @param[in] Pst* pst
237 * @param[in] SpId spId
238 * @param[in] Reason reason
250 S16 cmUnpkRguUbndReq(func, pst, mBuf)
259 TRC3(cmUnpkRguUbndReq)
261 if (SUnpkS16(&spId, mBuf) != ROK) {
262 #if (ERRCLASS & ERRCLS_ADD_RES)
263 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
264 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
265 (ErrVal)ERGU009, (ErrVal)0, "UnPacking failed");
270 if (SUnpkS16(&reason, mBuf) != ROK) {
271 #if (ERRCLASS & ERRCLS_ADD_RES)
272 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
273 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
274 (ErrVal)ERGU010, (ErrVal)0, "UnPacking failed");
280 return ((*func)(pst, spId, reason));
285 * @brief Confirmation from MAC to RLC for the bind/Unbind
286 * request for the interface saps
290 * Function : cmPkRguBndCfm
292 * @param[in] Pst* pst
293 * @param[in] SuId suId
294 * @param[in] U8 status
306 S16 cmPkRguBndCfm(pst, suId, status)
312 Buffer *mBuf = NULLP;
315 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
316 #if (ERRCLASS & ERRCLS_ADD_RES)
317 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
318 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
319 (ErrVal)ERGU011, (ErrVal)0, "Packing failed");
323 if (oduUnpackUInt8(status, mBuf) != ROK) {
324 #if (ERRCLASS & ERRCLS_ADD_RES)
325 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
326 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
327 (ErrVal)ERGU012, (ErrVal)0, "Packing failed");
332 if (SPkS16(suId, mBuf) != ROK) {
333 #if (ERRCLASS & ERRCLS_ADD_RES)
334 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
335 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
336 (ErrVal)ERGU013, (ErrVal)0, "Packing failed");
341 pst->event = (Event) EVTRGUBNDCFM;
342 return (SPstTsk(pst,mBuf));
347 * @brief Confirmation from MAC to RLC for the bind/Unbind
348 * request for the interface saps
352 * Function : cmUnpkRguBndCfm
354 * @param[in] Pst* pst
355 * @param[in] SuId suId
356 * @param[in] U8 status
368 S16 cmUnpkRguBndCfm(func, pst, mBuf)
377 TRC3(cmUnpkRguBndCfm)
379 if (SUnpkS16(&suId, mBuf) != ROK) {
380 #if (ERRCLASS & ERRCLS_ADD_RES)
381 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
382 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
383 (ErrVal)ERGU014, (ErrVal)0, "UnPacking failed");
388 if (oduPackUInt8(&status, mBuf) != ROK) {
389 #if (ERRCLASS & ERRCLS_ADD_RES)
390 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
391 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
392 (ErrVal)ERGU015, (ErrVal)0, "UnPacking failed");
398 return ((*func)(pst, suId, status));
401 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
404 /***********************************************************
406 * Func :cmPkRguL2MUlThrpMeasReqInfo
409 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
410 * Scheduled throughput measurement
419 **********************************************************/
421 S16 cmPkRguL2MUlThrpMeasReqInfo
423 RguL2MUlThrpMeasReqInfo* param,
427 S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
428 RguL2MUlThrpMeasReqInfo* param;
433 TRC3(cmPkRguL2MUlThrpMeasReqInfo);
435 CMCHKPK(oduUnpackUInt8, param->enbMeas, mBuf);
436 for (loop=param->numLcId-1; loop >= 0; loop--)
438 CMCHKPK(oduUnpackUInt8, param->lcId[loop], mBuf);
440 CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
441 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
442 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
448 /***********************************************************
450 * Func :cmUnpkRguL2MUlThrpMeasReqInfo
453 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
454 * Scheduled throughput measurement
463 **********************************************************/
465 S16 cmUnpkRguL2MUlThrpMeasReqInfo
467 RguL2MUlThrpMeasReqInfo *param,
471 S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
472 RguL2MUlThrpMeasReqInfo *param;
477 TRC3(cmUnpkRguL2MUlThrpMeasReqInfo);
479 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
480 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
481 CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
482 for (loop=0; loop<param->numLcId; loop++)
484 CMCHKUNPK(oduPackUInt8, ¶m->lcId[loop], mBuf);
486 CMCHKUNPK(oduPackUInt8, ¶m->enbMeas, mBuf);
491 * @brief Primitive invoked from RLC to MAC to
492 * inform the On/Off status for Scheduled UL throughput
493 * measurment for dedicated channels
497 * Function :cmPkRguL2MUlThrpMeasReq
499 * @param[in] Pst* pst
500 * @param[in] SpId spId
501 * @param[in] RguL2MUlThrpMeasReqInfo* measReq
506 S16 cmPkRguL2MUlThrpMeasReq
510 RguL2MUlThrpMeasReqInfo* measReq
513 S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq)
516 RguL2MUlThrpMeasReqInfo* measReq;
519 Buffer *mBuf = NULLP;
520 TRC3(cmPkRguL2MUlThrpMeasReq)
522 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
523 #if (ERRCLASS & ERRCLS_ADD_RES)
524 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
525 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
526 (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
528 SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
531 if (pst->selector == ODU_SELECTOR_LWLC)
533 CMCHKPK(oduPackPointer,(PTR) measReq, mBuf);
537 if (cmPkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
538 #if (ERRCLASS & ERRCLS_ADD_RES)
539 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
540 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
541 (ErrVal)ERGU050, (ErrVal)0, "Packing failed");
543 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
544 sizeof(RguL2MUlThrpMeasReqInfo));
548 if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
549 sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
550 #if (ERRCLASS & ERRCLS_ADD_RES)
551 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
552 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
553 (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
561 if (SPkS16(spId, mBuf) != ROK) {
562 #if (ERRCLASS & ERRCLS_ADD_RES)
563 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
564 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
565 (ErrVal)ERGU051, (ErrVal)0, "Packing failed");
567 if (measReq != NULLP)
569 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
570 sizeof(RguL2MUlThrpMeasReqInfo));
576 pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
577 return (SPstTsk(pst,mBuf));
582 * @brief Primitive invoked from RLC to MAC to
583 * inform the On/Off status for Scheduled UL throughput
584 * measurment for dedicated channels
588 * Function :cmUnpkRguL2MUlThrpMeasReq
590 * @param[in] Pst* pst
591 * @param[in] SpId spId
592 * @param[in] RguL2MUlThrpMeasReqInfo * measReq
597 S16 cmUnpkRguL2MUlThrpMeasReq
599 RguL2MUlThrpMeasReq func,
604 S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf)
605 RguL2MUlThrpMeasReq func;
611 RguL2MUlThrpMeasReqInfo* measReq;
613 TRC3(cmUnpkRguL2MUlThrpMeasReq)
615 if (SUnpkS16(&spId, mBuf) != ROK) {
616 #if (ERRCLASS & ERRCLS_ADD_RES)
617 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
618 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
619 (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
624 if (pst->selector == ODU_SELECTOR_LWLC)
626 CMCHKUNPK(oduUnpackPointer,(PTR *) &measReq, mBuf);
630 if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
631 sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
632 #if (ERRCLASS & ERRCLS_ADD_RES)
633 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
634 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
635 (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
640 if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
641 #if (ERRCLASS & ERRCLS_ADD_RES)
642 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
643 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
644 (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
647 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
648 sizeof(RguL2MUlThrpMeasReqInfo));
653 return ((*func)(pst, spId, measReq));
659 /*rgu_c_001.main_5 - ADD - L2M Support */
663 * @brief Harq Status Indication from MAC to RLC
667 * Function : cmPkRguHqStaInd
669 * @param[in] Pst* pst
670 * @param[in] SuId suId
671 * @param[in] RguHarqStatusInd *harqStatusInd
680 RguHarqStatusInd *harqStatusInd
683 S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
686 RguHarqStatusInd *harqStatusInd;
692 RguHarqStatusInd *harqStaInd = NULL;
694 TRC3(cmPkRguHqStaInd)
695 #ifdef XEON_SPECIFIC_CHANGES
696 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
698 if ((SGetStaticBuffer(pst->region, pst->pool,
699 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
702 #if (ERRCLASS & ERRCLS_ADD_RES)
703 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
704 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
705 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
710 cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
712 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
713 #if (ERRCLASS & ERRCLS_ADD_RES)
714 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
715 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
716 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
718 #ifdef XEON_SPECIFIC_CHANGES
719 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
721 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
726 if (pst->selector == ODU_SELECTOR_LWLC)
728 CMCHKPK(oduPackPointer,(PTR) harqStaInd, mBuf);
732 for(idx = 0; idx < harqStaInd->numTbs; idx++)
734 CMCHKPK(oduUnpackUInt16, harqStaInd->status[idx], mBuf);
736 for(idx = 0; idx < harqStaInd->numTbs; idx++)
738 CMCHKPK(oduUnpackUInt32, harqStaInd->tbId[idx], mBuf);
740 CMCHKPK(oduUnpackUInt8, harqStaInd->numTbs, mBuf);
741 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
742 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
744 if (SPkS16(suId, mBuf) != ROK) {
745 #if (ERRCLASS & ERRCLS_ADD_RES)
746 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
747 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
748 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
750 #ifdef XEON_SPECIFIC_CHANGES
751 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
752 sizeof(RguHarqStatusInd));
754 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
759 #ifdef XEON_SPECIFIC_CHANGES
760 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
761 sizeof(RguHarqStatusInd)) != ROK) {
763 if (pst->selector != ODU_SELECTOR_LWLC)
765 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
766 sizeof(RguHarqStatusInd), 0) != ROK)
769 #if (ERRCLASS & ERRCLS_ADD_RES)
770 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
771 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
772 (ErrVal)ERGU072, (ErrVal)0, "Packing failed");
777 #ifndef XEON_SPECIFIC_CHANGES
781 pst->event = (Event) EVTRGUHQSTAIND;
782 return (SPstTsk(pst,mBuf));
787 * @brief Harq Status Indication from MAC to RLC
791 * Function : cmUnpkRguHqStaInd
793 * @param[in] RguHqStaInd func
794 * @param[in] Pst *pst
795 * @param[in] Buffer *mBuf
800 S16 cmUnpkRguHqStaInd
807 S16 cmUnpkRguHqStaInd(func, pst, mBuf)
813 RguHarqStatusInd *hqStaInd;
817 TRC3(cmUnpkRguHqStaInd)
819 if (SUnpkS16(&suId, mBuf) != ROK) {
820 #if (ERRCLASS & ERRCLS_ADD_RES)
821 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
822 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
823 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
828 #ifdef XEON_SPECIFIC_CHANGES
829 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
830 sizeof(RguHarqStatusInd))) != ROK) {
832 if (pst->selector == ODU_SELECTOR_LWLC)
834 CMCHKUNPK(oduUnpackPointer,(PTR *) &hqStaInd, mBuf);
838 if ((SGetStaticBuffer(pst->region, pst->pool,
839 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
842 #if (ERRCLASS & ERRCLS_ADD_RES)
843 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
844 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
845 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
850 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
851 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
852 CMCHKUNPK(oduPackUInt8, &hqStaInd->numTbs, mBuf);
853 for(idx = hqStaInd->numTbs; idx > 0; idx--)
855 CMCHKUNPK(oduPackUInt32, &hqStaInd->tbId[idx - 1], mBuf);
857 for(idx = hqStaInd->numTbs; idx > 0; idx--)
859 CMCHKUNPK(oduPackUInt16, &hqStaInd->status[idx - 1], mBuf);
861 #ifndef XEON_SPECIFIC_CHANGES
865 (*func)(pst, suId, hqStaInd);
866 #ifdef XEON_SPECIFIC_CHANGES
867 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
869 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
873 #endif /* LTE_L2_MEAS */
876 S16 cmPkRguLcFlowCntrlInfo
878 RguLcFlowCntrlInfo *param,
882 S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
883 RguLcFlowCntrlInfo *param;
887 TRC3(cmPkRguLcFlowCntrlInfo);
888 CMCHKPK(oduUnpackUInt32, param->maxBo4FlowCtrl, mBuf);
889 CMCHKPK(oduUnpackUInt32, param->pktAdmitCnt, mBuf);
890 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
896 S16 cmPkRguUeFlowCntrlInfo
898 RguUeFlowCntrlInfo *param,
902 S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
903 RguUeFlowCntrlInfo *param;
909 TRC3(cmPkRguUeFlowCntrlInfo);
911 for(idx=(param->numLcs - 1); idx >= 0; idx--)
913 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
915 CMCHKPK(oduUnpackUInt32, param->numLcs, mBuf);
916 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
921 S16 cmPkRguFlowCntrlInfo
923 RguFlowCntrlInd *param,
927 S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
928 RguFlowCntrlInd *param;
934 TRC3(cmPkRguFlowCntrlInfo);
936 for (idx=(param->numUes - 1); idx >= 0; idx--)
938 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
940 CMCHKPK(oduUnpackUInt32, param->numUes, mBuf);
941 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
946 * @brief Flow Cntrl Indication from MAC to RLC
947 * Informs RLC of the LCs on which flow control
952 * Function : cmPkRguFlowCntrlInd
954 * @param[in] Pst* pst
955 * @param[in] SuId suId
956 * @param[in] RguFlowCntrlInd *staInd
961 S16 cmPkRguFlowCntrlInd
965 RguFlowCntrlInd *flowCntrlInd
968 S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
971 RguFlowCntrlInd *flowCntrlInd;
974 Buffer *mBuf = NULLP;
976 TRC3(cmPkRguFlowCntrlInd);
977 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
978 #if (ERRCLASS & ERRCLS_ADD_RES)
979 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
980 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
981 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
985 if (pst->selector == ODU_SELECTOR_LWLC)
987 CMCHKPK(oduPackPointer,(PTR) flowCntrlInd, mBuf);
991 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
992 #if (ERRCLASS & ERRCLS_ADD_RES)
993 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
994 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
995 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
1001 if (SPkS16(suId, mBuf) != ROK) {
1002 #if (ERRCLASS & ERRCLS_ADD_RES)
1003 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1004 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1005 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1011 pst->event = (Event) EVTRGUFLOWCNTRLIND;
1012 return (SPstTsk(pst,mBuf));
1016 S16 cmUnpkRguLcFlowCntrlInfo
1018 RguLcFlowCntrlInfo *param,
1022 S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
1023 RguLcFlowCntrlInfo *param;
1027 TRC3(cmUnpkRguLcFlowCntrlInfo);
1029 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1030 CMCHKUNPK(oduPackUInt32, ¶m->pktAdmitCnt, mBuf);
1031 CMCHKUNPK(oduPackUInt32, ¶m->maxBo4FlowCtrl, mBuf);
1036 S16 cmUnpkRguUeFlowCntrlInfo
1038 RguUeFlowCntrlInfo *param,
1042 S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
1043 RguUeFlowCntrlInfo *param;
1048 TRC3(cmUnpkRguUeFlowCntrlInfo);
1049 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
1050 CMCHKUNPK(oduPackUInt32, ¶m->numLcs, mBuf);
1051 for(idx=0; idx < param->numLcs; idx++)
1053 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1059 S16 cmUnpkRguFlowCntrlInfo
1061 RguFlowCntrlInd *param,
1065 S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
1066 RguFlowCntrlInd *param;
1072 TRC3(cmUnpkRguFlowCntrlInfo);
1074 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1075 CMCHKUNPK(oduPackUInt32, ¶m->numUes, mBuf);
1076 for (idx=0; idx < param->numUes; idx++)
1078 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1084 * @brief Flow control indication from MAC to RLC
1085 * Informs RLC of the LCs on which flow control to
1090 * Function : cmUnpkRguFlowCntrlInd
1092 * @param[in] RguFlowCntrlInd func
1093 * @param[in] Pst *pst
1094 * @param[in] Buffer *mBuf
1099 S16 cmUnpkRguFlowCntrlInd
1101 RguFlowCntrlIndInfo func,
1106 S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
1107 RguFlowCntrlIndInfo func;
1113 RguFlowCntrlInd *flowCntrlInd;
1115 TRC3(cmUnpkRguFlowCntrlInd)
1117 if (SUnpkS16(&suId, mBuf) != ROK) {
1118 #if (ERRCLASS & ERRCLS_ADD_RES)
1119 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1120 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1121 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1126 if (pst->selector == ODU_SELECTOR_LWLC)
1128 CMCHKUNPK(oduUnpackPointer,(PTR *) &flowCntrlInd, mBuf);
1132 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
1133 #if (ERRCLASS & ERRCLS_ADD_RES)
1134 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1135 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1136 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1141 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1142 #if (ERRCLASS & ERRCLS_ADD_RES)
1143 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1144 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1145 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1148 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
1153 return ((*func)(pst, suId, flowCntrlInd));
1156 /***********************************************************
1158 * Func : cmPkRguPduInfo
1162 * PDU information given on a logical channel
1171 **********************************************************/
1179 S16 cmPkRguPduInfo(param, mBuf)
1186 TRC3(cmPkRguPduInfo);
1188 for (i=param->numPdu-1; i >= 0; i--) {
1189 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
1191 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
1193 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
1195 SPutMsg(param->mBuf[i]);
1196 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1198 CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf);
1204 /***********************************************************
1206 * Func : cmUnpkRguPduInfo
1210 * PDU information given on a logical channel
1219 **********************************************************/
1221 S16 cmUnpkRguPduInfo
1227 S16 cmUnpkRguPduInfo(param, mBuf)
1234 TRC3(cmUnpkRguPduInfo);
1236 CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf);
1237 for (i=0; i<param->numPdu; i++) {
1238 MsgLen msgLen, totalMsgLen;
1239 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1240 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1242 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
1250 /***********************************************************
1252 * Func : cmPkRguDBoReport
1255 * Desc : RguDBoReport
1256 * Buffer Occupancy Report for dedicated logical channel
1265 **********************************************************/
1267 S16 cmPkRguDBoReport
1269 RguDBoReport *param,
1273 S16 cmPkRguDBoReport(param, mBuf)
1274 RguDBoReport *param;
1279 TRC3(cmPkRguDBoReport);
1281 CMCHKPK(oduUnpackUInt32, param->oldestSduArrTime, mBuf);
1282 CMCHKPK(oduUnpackUInt32, param->staPduBo, mBuf);
1284 CMCHKPK(oduUnpackUInt8, param->staPduPrsnt, mBuf);
1285 CMCHKPK(oduUnpackUInt16, param->estRlcHdrSz, mBuf);
1287 CMCHKPK(SPkS32, param->bo, mBuf);
1293 /***********************************************************
1295 * Func : cmUnpkRguDBoReport
1298 * Desc : RguDBoReport
1299 * Buffer Occupancy Report for dedicated logical channel
1308 **********************************************************/
1310 S16 cmUnpkRguDBoReport
1312 RguDBoReport *param,
1316 S16 cmUnpkRguDBoReport(param, mBuf)
1317 RguDBoReport *param;
1322 TRC3(cmUnpkRguDBoReport);
1324 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
1326 CMCHKUNPK(oduPackUInt16, ¶m->estRlcHdrSz, mBuf);
1327 CMCHKUNPK(oduPackUInt8, ¶m->staPduPrsnt, mBuf);
1330 CMCHKUNPK(oduPackUInt32, ¶m->staPduBo, mBuf);
1331 CMCHKUNPK(oduPackUInt32, ¶m->oldestSduArrTime, mBuf);
1336 /***********************************************************
1338 * Func : cmPkRguCDatReqInfo
1341 * Desc : RguCDatReqInfo
1342 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1351 **********************************************************/
1353 S16 cmPkRguCDatReqInfo
1355 RguCDatReqInfo *param,
1359 S16 cmPkRguCDatReqInfo(param, mBuf)
1360 RguCDatReqInfo *param;
1366 TRC3(cmPkRguCDatReqInfo);
1368 if (param->pdu != NULLP)
1370 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
1372 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
1374 SPutMsg(param->pdu);
1375 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1377 switch(param->lcType) {
1378 case CM_LTE_LCH_CCCH:
1379 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
1381 case CM_LTE_LCH_BCCH:
1382 case CM_LTE_LCH_PCCH:
1383 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
1385 CMCHKPK(oduUnpackUInt8,param->pnb,mBuf);
1391 CMCHKPK(oduUnpackUInt32, param->transId, mBuf);
1392 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
1393 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1394 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1400 /***********************************************************
1402 * Func : cmUnpkRguCDatReqInfo
1405 * Desc : RguCDatReqInfo
1406 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1415 **********************************************************/
1417 S16 cmUnpkRguCDatReqInfo
1419 RguCDatReqInfo *param,
1423 S16 cmUnpkRguCDatReqInfo(param, mBuf)
1424 RguCDatReqInfo *param;
1428 MsgLen msgLen, totalMsgLen;
1430 TRC3(cmUnpkRguCDatReqInfo);
1432 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1433 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1434 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
1435 CMCHKUNPK(oduPackUInt32, ¶m->transId, mBuf);
1436 switch(param->lcType) {
1437 case CM_LTE_LCH_BCCH:
1438 case CM_LTE_LCH_PCCH:
1440 CMCHKUNPK(oduPackUInt8,¶m->pnb, mBuf);
1442 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
1444 case CM_LTE_LCH_CCCH:
1445 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
1450 SFndLenMsg(mBuf, &msgLen);
1453 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1454 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1456 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
1464 /***********************************************************
1466 * Func : cmPkRguLchDatReq
1469 * Desc : RguLchDatReq
1470 * DatReq Information of a logical channel
1479 **********************************************************/
1481 S16 cmPkRguLchDatReq
1483 RguLchDatReq *param,
1487 S16 cmPkRguLchDatReq(param, mBuf)
1488 RguLchDatReq *param;
1493 TRC3(cmPkRguLchDatReq);
1496 CMCHKPK(oduUnpackUInt8, param->freeBuff, mBuf);
1498 CMCHKPK(oduUnpackUInt8, param->setMaxUlPrio, mBuf);
1499 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
1500 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
1501 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1507 /***********************************************************
1509 * Func : cmUnpkRguLchDatReq
1512 * Desc : RguLchDatReq
1513 * DatReq Information of a logical channel
1522 **********************************************************/
1524 S16 cmUnpkRguLchDatReq
1526 RguLchDatReq *param,
1530 S16 cmUnpkRguLchDatReq(param, mBuf)
1531 RguLchDatReq *param;
1536 TRC3(cmUnpkRguLchDatReq);
1538 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1539 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
1540 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
1541 CMCHKUNPK(oduPackUInt8, ¶m->setMaxUlPrio, mBuf);
1543 CMCHKUNPK(oduPackUInt8, ¶m->freeBuff, mBuf);
1549 /***********************************************************
1551 * Func : cmPkRguDatReqTb
1554 * Desc : RguDatReqTb
1555 * DatReq from RLC to MAC for dedicated channels of a UE
1564 **********************************************************/
1572 S16 cmPkRguDatReqTb(param, mBuf)
1579 TRC3(cmPkRguDatReqTb);
1580 /*rgu_c_001.main_5 - ADD - L2M Support */
1582 CMCHKPK(oduUnpackUInt32, param->tbId, mBuf);
1584 for (i=param->nmbLch-1; i >= 0; i--) {
1585 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
1587 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
1593 /***********************************************************
1595 * Func : cmUnpkRguDatReqTb
1598 * Desc : RguDatReqTb
1599 * DatReq from RLC to MAC for dedicated channels of a UE
1608 **********************************************************/
1611 S16 cmUnpkRguDatReqTb
1618 S16 cmUnpkRguDatReqTb(pst, param, mBuf)
1625 S16 cmUnpkRguDatReqTb
1631 S16 cmUnpkRguDatReqTb(param, mBuf)
1639 TRC3(cmUnpkRguDatReqTb);
1641 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
1642 for (i=0; i<param->nmbLch; i++) {
1643 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
1645 /*rgu_c_001.main_5 - ADD - L2M Support */
1647 CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf);
1653 /***********************************************************
1655 * Func : cmPkRguDDatReqInfo
1658 * Desc : RguDDatReqInfo
1659 * DatReq from RLC to MAC for dedicated channels of a UE
1668 **********************************************************/
1669 /*rgu_c_001.main_5 - ADD - L2M Support */
1672 S16 cmPkRguDDatReqInfo
1675 RguDDatReqInfo *param,
1679 S16 cmPkRguDDatReqInfo(pst, param, mBuf)
1681 RguDDatReqInfo *param;
1686 S16 cmPkRguDDatReqInfo
1688 RguDDatReqInfo *param,
1692 S16 cmPkRguDDatReqInfo(param, mBuf)
1693 RguDDatReqInfo *param;
1701 TRC3(cmPkRguDDatReqInfo);
1703 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
1705 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
1706 for (i=RGU_MAX_TB-1; i >= 0; i--)
1708 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
1710 CMCHKPK(oduUnpackUInt8, datReq->nmbOfTbs, mBuf);
1711 CMCHKPK(oduUnpackUInt32, datReq->transId, mBuf);
1712 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
1714 CMCHKPK(oduUnpackUInt8, param->nmbOfUeGrantPerTti, mBuf);
1715 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1721 /***********************************************************
1723 * Func : cmUnpkRguDDatReqInfo
1726 * Desc : RguDDatReqInfo
1727 * DatReq from RLC to MAC for dedicated channels of a UE
1736 **********************************************************/
1739 S16 cmUnpkRguDDatReqInfo
1742 RguDDatReqInfo *param,
1746 S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
1748 RguDDatReqInfo *param;
1753 S16 cmUnpkRguDDatReqInfo
1755 RguDDatReqInfo *param,
1759 S16 cmUnpkRguDDatReqInfo(param, mBuf)
1760 RguDDatReqInfo *param;
1766 /* After Merging from 2.1 to 2.2 */
1767 /*rgu_c_001.main_5 - ADD - L2M Support */
1773 TRC3(cmUnpkRguDDatReqInfo);
1775 /* After Merging from 2.1 to 2.2 */
1776 /*rgu_c_001.main_5 - ADD - L2M Support */
1780 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1781 CMCHKUNPK(oduPackUInt8, ¶m->nmbOfUeGrantPerTti, mBuf);
1782 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
1784 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
1785 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
1786 CMCHKUNPK(oduPackUInt32, &datReq->transId, mBuf);
1787 CMCHKUNPK(oduPackUInt8, &datReq->nmbOfTbs, mBuf);
1788 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
1789 for (i=0; i<RGU_MAX_TB; i++)
1791 /*rgu_c_001.main_5 - ADD - L2M Support */
1793 /* After Merging from 2.1 to 2.2 */
1794 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
1800 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
1809 /***********************************************************
1811 * Func : cmPkRguCDatIndInfo
1814 * Desc : RguCDatIndInfo
1815 * DatInd from MAC to RLC on CCCH
1824 **********************************************************/
1826 S16 cmPkRguCDatIndInfo
1828 RguCDatIndInfo *param,
1832 S16 cmPkRguCDatIndInfo(param, mBuf)
1833 RguCDatIndInfo *param;
1839 TRC3(cmPkRguCDatIndInfo);
1841 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
1843 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
1845 SPutMsg(param->pdu);
1846 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1847 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1848 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
1849 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1855 /***********************************************************
1857 * Func : cmUnpkRguCDatIndInfo
1860 * Desc : RguCDatIndInfo
1861 * DatInd from MAC to RLC on CCCH
1870 **********************************************************/
1872 S16 cmUnpkRguCDatIndInfo
1874 RguCDatIndInfo *param,
1878 S16 cmUnpkRguCDatIndInfo(param, mBuf)
1879 RguCDatIndInfo *param;
1883 MsgLen msgLen, totalMsgLen;
1885 TRC3(cmUnpkRguCDatIndInfo);
1887 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1888 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
1889 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1890 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1891 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1893 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
1900 /***********************************************************
1902 * Func : cmPkRguLchDatInd
1905 * Desc : RguLchDatInd
1906 * DatInd Information for a logical channel
1915 **********************************************************/
1917 S16 cmPkRguLchDatInd
1919 RguLchDatInd *param,
1923 S16 cmPkRguLchDatInd(param, mBuf)
1924 RguLchDatInd *param;
1928 TRC3(cmPkRguLchDatInd);
1930 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
1931 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1937 /***********************************************************
1939 * Func : cmUnpkRguLchDatInd
1942 * Desc : RguLchDatInd
1943 * DatInd Information for a logical channel
1952 **********************************************************/
1954 S16 cmUnpkRguLchDatInd
1956 RguLchDatInd *param,
1960 S16 cmUnpkRguLchDatInd(param, mBuf)
1961 RguLchDatInd *param;
1965 TRC3(cmUnpkRguLchDatInd);
1967 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1968 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
1973 /***********************************************************
1975 * Func : cmPkRguCStaRspInfo
1978 * Desc : RguCStaRspInfo
1979 * Status Response from RLC to MAC for common logical channel
1988 **********************************************************/
1990 S16 cmPkRguCStaRspInfo
1992 RguCStaRspInfo *param,
1996 S16 cmPkRguCStaRspInfo(param, mBuf)
1997 RguCStaRspInfo *param;
2002 TRC3(cmPkRguCStaRspInfo);
2004 switch(param->lcType) {
2005 case CM_LTE_LCH_CCCH:
2006 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2008 case CM_LTE_LCH_BCCH:
2009 case CM_LTE_LCH_PCCH:
2010 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2012 CMCHKPK(oduUnpackUInt8,param->pnb,mBuf);
2013 CMCHKPK(oduUnpackUInt8,param->emtcDiReason,mBuf);
2019 CMCHKPK(SPkS32, param->bo, mBuf);
2020 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2021 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2022 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2028 /***********************************************************
2030 * Func : cmUnpkRguCStaRspInfo
2033 * Desc : RguCStaRspInfo
2034 * Status Response from RLC to MAC for common logical channel
2043 **********************************************************/
2045 S16 cmUnpkRguCStaRspInfo
2047 RguCStaRspInfo *param,
2051 S16 cmUnpkRguCStaRspInfo(param, mBuf)
2052 RguCStaRspInfo *param;
2057 TRC3(cmUnpkRguCStaRspInfo);
2059 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2060 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2061 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2062 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2063 switch(param->lcType) {
2064 case CM_LTE_LCH_BCCH:
2065 case CM_LTE_LCH_PCCH:
2067 CMCHKUNPK(oduPackUInt8,¶m->emtcDiReason , mBuf);
2068 CMCHKUNPK(oduPackUInt8,¶m->pnb , mBuf);
2070 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2072 case CM_LTE_LCH_CCCH:
2073 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2082 /***********************************************************
2084 * Func : cmPkRguLchStaInd
2087 * Desc : RguLchStaInd
2088 * StaInd info for each logical channel of a UE
2097 **********************************************************/
2099 S16 cmPkRguLchStaInd
2101 RguLchStaInd *param,
2105 S16 cmPkRguLchStaInd(param, mBuf)
2106 RguLchStaInd *param;
2111 TRC3(cmPkRguLchStaInd);
2113 CMCHKPK(SPkS16, param->totBufSize, mBuf);
2114 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2120 /***********************************************************
2122 * Func : cmUnpkRguLchStaInd
2125 * Desc : RguLchStaInd
2126 * StaInd info for each logical channel of a UE
2135 **********************************************************/
2137 S16 cmUnpkRguLchStaInd
2139 RguLchStaInd *param,
2143 S16 cmUnpkRguLchStaInd(param, mBuf)
2144 RguLchStaInd *param;
2149 TRC3(cmUnpkRguLchStaInd);
2151 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2152 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
2157 /***********************************************************
2159 * Func : cmPkRguStaIndTb
2162 * Desc : RguStaIndTb
2163 * StaInd from RLC to MAC for dedicated channels of a UE
2172 **********************************************************/
2180 S16 cmPkRguStaIndTb(param, mBuf)
2187 TRC3(cmPkRguStaIndTb);
2190 CMCHKPK(oduUnpackUInt16, param->status, mBuf);
2191 CMCHKPK(oduUnpackUInt32, param->tbId, mBuf);
2193 for (i=param->nmbLch-1; i >= 0; i--) {
2194 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
2196 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
2202 /***********************************************************
2204 * Func : cmUnpkRguStaIndTb
2207 * Desc : RguStaIndTb
2208 * StaInd from RLC to MAC for dedicated channels of a UE
2217 **********************************************************/
2219 S16 cmUnpkRguStaIndTb
2225 S16 cmUnpkRguStaIndTb(param, mBuf)
2232 TRC3(cmUnpkRguStaIndTb);
2234 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
2235 for (i=0; i<param->nmbLch; i++) {
2236 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
2239 CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf);
2240 CMCHKUNPK(oduPackUInt16, ¶m->status, mBuf);
2247 /**********************************************************************
2249 **********************************************************************/