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 "envopt.h" /* environment options */
39 #include "envdep.h" /* environment dependent */
40 #include "envind.h" /* environment independent */
41 #include "gen.h" /* general */
42 #include "ssi.h" /* system services */
43 #include "cm_tkns.h" /* Common Token Defines */
44 #include "cm_llist.h" /* Common Link List Defines */
45 #include "cm_hash.h" /* Common Hash List Defines */
46 #include "cm_lte.h" /* Common LTE Defines */
47 #include "rgu.h" /* RGU Interface defines */
49 /* header/extern include files (.x) */
50 #include "gen.x" /* general */
51 #include "ssi.x" /* system services */
52 #include "cm_tkns.x" /* Common Token Definitions */
53 #include "cm_llist.x" /* Common Link List Definitions */
54 #include "cm_lib.x" /* Common Library Definitions */
55 #include "cm_hash.x" /* Common Hash List Definitions */
56 #include "cm_lte.x" /* Common LTE Defines */
57 #include "rgu.x" /* RGU Interface includes */
68 * @brief Request from RLC to MAC to bind the interface saps
72 * Function : cmPkRguBndReq
75 * @param[in] SuId suId
76 * @param[in] SpId spId
81 PUBLIC S16 cmPkRguBndReq
88 PUBLIC S16 cmPkRguBndReq(pst, suId, spId)
97 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
98 #if (ERRCLASS & ERRCLS_ADD_RES)
99 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
100 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
101 (ErrVal)ERGU001, (ErrVal)0, "Packing failed");
105 if (SPkS16(spId, mBuf) != ROK) {
106 #if (ERRCLASS & ERRCLS_ADD_RES)
107 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
108 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
109 (ErrVal)ERGU002, (ErrVal)0, "Packing failed");
114 if (SPkS16(suId, mBuf) != ROK) {
115 #if (ERRCLASS & ERRCLS_ADD_RES)
116 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
117 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
118 (ErrVal)ERGU003, (ErrVal)0, "Packing failed");
123 pst->event = (Event) EVTRGUBNDREQ;
124 RETVALUE(SPstTsk(pst,mBuf));
129 * @brief Request from RLC to MAC to bind the interface saps
133 * Function : cmUnpkRguBndReq
135 * @param[in] Pst* pst
136 * @param[in] SuId suId
137 * @param[in] SpId spId
142 PUBLIC S16 cmUnpkRguBndReq
149 PUBLIC S16 cmUnpkRguBndReq(func, pst, mBuf)
158 TRC3(cmUnpkRguBndReq)
160 if (SUnpkS16(&suId, mBuf) != ROK) {
161 #if (ERRCLASS & ERRCLS_ADD_RES)
162 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
163 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
164 (ErrVal)ERGU004, (ErrVal)0, "UnPacking failed");
169 if (SUnpkS16(&spId, mBuf) != ROK) {
170 #if (ERRCLASS & ERRCLS_ADD_RES)
171 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
172 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
173 (ErrVal)ERGU005, (ErrVal)0, "UnPacking failed");
179 RETVALUE((*func)(pst, suId, spId));
184 * @brief Request from RLC to MAC to Unbind the interface saps
188 * Function : cmPkRguUbndReq
190 * @param[in] Pst* pst
191 * @param[in] SpId spId
192 * @param[in] Reason reason
197 PUBLIC S16 cmPkRguUbndReq
204 PUBLIC S16 cmPkRguUbndReq(pst, spId, reason)
210 Buffer *mBuf = NULLP;
213 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
214 #if (ERRCLASS & ERRCLS_ADD_RES)
215 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
216 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
217 (ErrVal)ERGU006, (ErrVal)0, "Packing failed");
221 if (SPkS16(reason, mBuf) != ROK) {
222 #if (ERRCLASS & ERRCLS_ADD_RES)
223 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
224 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
225 (ErrVal)ERGU007, (ErrVal)0, "Packing failed");
230 if (SPkS16(spId, mBuf) != ROK) {
231 #if (ERRCLASS & ERRCLS_ADD_RES)
232 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
233 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
234 (ErrVal)ERGU008, (ErrVal)0, "Packing failed");
239 pst->event = (Event) EVTRGUUBNDREQ;
240 RETVALUE(SPstTsk(pst,mBuf));
245 * @brief Request from RLC to MAC to Unbind the interface saps
249 * Function : cmUnpkRguUbndReq
251 * @param[in] Pst* pst
252 * @param[in] SpId spId
253 * @param[in] Reason reason
258 PUBLIC S16 cmUnpkRguUbndReq
265 PUBLIC S16 cmUnpkRguUbndReq(func, pst, mBuf)
274 TRC3(cmUnpkRguUbndReq)
276 if (SUnpkS16(&spId, mBuf) != ROK) {
277 #if (ERRCLASS & ERRCLS_ADD_RES)
278 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
279 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
280 (ErrVal)ERGU009, (ErrVal)0, "UnPacking failed");
285 if (SUnpkS16(&reason, mBuf) != ROK) {
286 #if (ERRCLASS & ERRCLS_ADD_RES)
287 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
288 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
289 (ErrVal)ERGU010, (ErrVal)0, "UnPacking failed");
295 RETVALUE((*func)(pst, spId, reason));
300 * @brief Confirmation from MAC to RLC for the bind/Unbind
301 * request for the interface saps
305 * Function : cmPkRguBndCfm
307 * @param[in] Pst* pst
308 * @param[in] SuId suId
309 * @param[in] U8 status
314 PUBLIC S16 cmPkRguBndCfm
321 PUBLIC S16 cmPkRguBndCfm(pst, suId, status)
327 Buffer *mBuf = NULLP;
330 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
331 #if (ERRCLASS & ERRCLS_ADD_RES)
332 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
333 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
334 (ErrVal)ERGU011, (ErrVal)0, "Packing failed");
338 if (SPkU8(status, mBuf) != ROK) {
339 #if (ERRCLASS & ERRCLS_ADD_RES)
340 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
341 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
342 (ErrVal)ERGU012, (ErrVal)0, "Packing failed");
347 if (SPkS16(suId, mBuf) != ROK) {
348 #if (ERRCLASS & ERRCLS_ADD_RES)
349 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
350 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
351 (ErrVal)ERGU013, (ErrVal)0, "Packing failed");
356 pst->event = (Event) EVTRGUBNDCFM;
357 RETVALUE(SPstTsk(pst,mBuf));
362 * @brief Confirmation from MAC to RLC for the bind/Unbind
363 * request for the interface saps
367 * Function : cmUnpkRguBndCfm
369 * @param[in] Pst* pst
370 * @param[in] SuId suId
371 * @param[in] U8 status
376 PUBLIC S16 cmUnpkRguBndCfm
383 PUBLIC S16 cmUnpkRguBndCfm(func, pst, mBuf)
392 TRC3(cmUnpkRguBndCfm)
394 if (SUnpkS16(&suId, mBuf) != ROK) {
395 #if (ERRCLASS & ERRCLS_ADD_RES)
396 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
397 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
398 (ErrVal)ERGU014, (ErrVal)0, "UnPacking failed");
403 if (SUnpkU8(&status, mBuf) != ROK) {
404 #if (ERRCLASS & ERRCLS_ADD_RES)
405 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
406 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
407 (ErrVal)ERGU015, (ErrVal)0, "UnPacking failed");
413 RETVALUE((*func)(pst, suId, status));
418 * @brief Request from RLC to MAC for forwarding SDUs on common
419 * channel for transmission
423 * Function : cmPkRguCDatReq
425 * @param[in] Pst* pst
426 * @param[in] SpId spId
427 * @param[in] RguCDatReqInfo * datReq
432 PUBLIC S16 cmPkRguCDatReq
436 RguCDatReqInfo * datReq
439 PUBLIC S16 cmPkRguCDatReq(pst, spId, datReq)
442 RguCDatReqInfo * datReq;
445 Buffer *mBuf = NULLP;
448 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
449 #if (ERRCLASS & ERRCLS_ADD_RES)
450 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
451 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
452 (ErrVal)ERGU016, (ErrVal)0, "Packing failed");
454 SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguCDatReqInfo));
457 if (pst->selector == RGU_SEL_LWLC)
459 CMCHKPK(cmPkPtr,(PTR) datReq, mBuf);
463 if (cmPkRguCDatReqInfo(datReq, mBuf) != ROK) {
464 #if (ERRCLASS & ERRCLS_ADD_RES)
465 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
466 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
467 (ErrVal)ERGU017, (ErrVal)0, "Packing failed");
469 SPutSBuf(pst->region, pst->pool,
470 (Data *)datReq, sizeof(RguCDatReqInfo));
474 if (SPutSBuf(pst->region, pst->pool,
475 (Data *)datReq, sizeof(RguCDatReqInfo)) != ROK) {
476 #if (ERRCLASS & ERRCLS_ADD_RES)
477 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
478 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
479 (ErrVal)ERGU019, (ErrVal)0, "Packing failed");
487 if (SPkS16(spId, mBuf) != ROK) {
488 #if (ERRCLASS & ERRCLS_ADD_RES)
489 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
490 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
491 (ErrVal)ERGU018, (ErrVal)0, "Packing failed");
496 SPutSBuf(pst->region, pst->pool,
497 (Data *)datReq, sizeof(RguCDatReqInfo));
504 pst->event = (Event) EVTRGUCDATREQ;
505 RETVALUE(SPstTsk(pst,mBuf));
510 * @brief Request from RLC to MAC for forwarding SDUs on common
511 * channel for transmission
515 * Function : cmUnpkRguCDatReq
517 * @param[in] Pst* pst
518 * @param[in] SpId spId
519 * @param[in] RguCDatReqInfo * datReq
524 PUBLIC S16 cmUnpkRguCDatReq
531 PUBLIC S16 cmUnpkRguCDatReq(func, pst, mBuf)
538 RguCDatReqInfo *datReq;
540 TRC3(cmUnpkRguCDatReq)
542 if (SUnpkS16(&spId, mBuf) != ROK) {
546 if (pst->selector == RGU_SEL_LWLC)
548 CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf);
552 if ((SGetSBuf(pst->region, pst->pool,
553 (Data **)&datReq, sizeof(RguCDatReqInfo))) != ROK) {
554 #if (ERRCLASS & ERRCLS_ADD_RES)
555 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
556 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
557 (ErrVal)ERGU020, (ErrVal)0, "UnPacking failed");
562 cmMemset((U8*)datReq, (U8)0, sizeof(RguCDatReqInfo));
563 if (cmUnpkRguCDatReqInfo(datReq, mBuf) != ROK) {
564 #if (ERRCLASS & ERRCLS_ADD_RES)
565 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
566 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
567 (ErrVal)ERGU021, (ErrVal)0, "UnPacking failed");
570 SPutSBuf(pst->region, pst->pool,
571 (Data *)datReq, sizeof(RguCDatReqInfo));
576 RETVALUE((*func)(pst, spId, datReq));
581 * @brief Request from RLC to MAC for forwarding SDUs on
582 * dedicated channel for transmission
586 * Function : cmPkRguDDatReq
588 * @param[in] Pst* pst
589 * @param[in] SpId spId
590 * @param[in] RguDDatReqInfo * datReq
595 PUBLIC S16 cmPkRguDDatReq
599 RguDDatReqInfo * datReq
602 PUBLIC S16 cmPkRguDDatReq(pst, spId, datReq)
605 RguDDatReqInfo * datReq;
608 Buffer *mBuf = NULLP;
611 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
612 #if (ERRCLASS & ERRCLS_ADD_RES)
613 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
614 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
615 (ErrVal)ERGU022, (ErrVal)0, "Packing failed");
617 SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguDDatReqInfo));
621 if (pst->selector == RGU_SEL_LWLC)
623 CMCHKPK(cmPkPtr,(PTR) datReq, mBuf);
627 /*rgu_c_001.main_5 - ADD - L2M Support */
629 if (cmPkRguDDatReqInfo(pst, datReq, mBuf) != ROK)
631 if (cmPkRguDDatReqInfo(datReq, mBuf) != ROK)
634 #if (ERRCLASS & ERRCLS_ADD_RES)
635 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
636 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
637 (ErrVal)ERGU023, (ErrVal)0, "Packing failed");
639 SPutSBuf(pst->region, pst->pool, (Data *)datReq,
640 sizeof(RguDDatReqInfo));
645 if (SPutSBuf(pst->region, pst->pool,
646 (Data *)datReq, sizeof(RguDDatReqInfo)) != ROK) {
647 #if (ERRCLASS & ERRCLS_ADD_RES)
648 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
649 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
650 (ErrVal)ERGU025, (ErrVal)0, "Packing failed");
657 if (SPkS16(spId, mBuf) != ROK) {
658 #if (ERRCLASS & ERRCLS_ADD_RES)
659 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
660 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
661 (ErrVal)ERGU024, (ErrVal)0, "Packing failed");
663 if (datReq != NULLP);
665 SPutSBuf(pst->region, pst->pool,
666 (Data *)datReq, sizeof(RguDDatReqInfo));
671 pst->event = (Event) EVTRGUDDATREQ;
672 RETVALUE(SPstTsk(pst,mBuf));
677 * @brief Request from RLC to MAC for forwarding SDUs on
678 * dedicated channel for transmission
682 * Function : cmUnpkRguDDatReq
684 * @param[in] Pst* pst
685 * @param[in] SpId spId
686 * @param[in] RguDDatReqInfo * datReq
691 PUBLIC S16 cmUnpkRguDDatReq
698 PUBLIC S16 cmUnpkRguDDatReq(func, pst, mBuf)
705 RguDDatReqInfo *datReq;
707 TRC3(cmUnpkRguDDatReq)
709 if (SUnpkS16(&spId, mBuf) != ROK) {
714 if (pst->selector == RGU_SEL_LWLC)
716 CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf);
720 if ((SGetSBuf(pst->region, pst->pool,
721 (Data **)&datReq, sizeof(RguDDatReqInfo))) != ROK) {
722 #if (ERRCLASS & ERRCLS_ADD_RES)
723 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
724 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
725 (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed");
730 cmMemset((U8*)datReq, (U8)0, sizeof(RguDDatReqInfo));
731 /*rgu_c_001.main_5 - ADD - L2M Support */
733 if (cmUnpkRguDDatReqInfo(pst,datReq, mBuf) != ROK)
735 if (cmUnpkRguDDatReqInfo(datReq, mBuf) != ROK)
738 #if (ERRCLASS & ERRCLS_ADD_RES)
739 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
740 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
741 (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed");
744 SPutSBuf(pst->region, pst->pool, (Data *)datReq,
745 sizeof(RguDDatReqInfo));
750 RETVALUE((*func)(pst, spId, datReq));
755 * @brief Data Indication from MAC to RLC to
756 * forward the data received for common channels
760 * Function : cmPkRguCDatInd
762 * @param[in] Pst* pst
763 * @param[in] SuId suId
764 * @param[in] RguCDatIndInfo * datInd
769 PUBLIC S16 cmPkRguCDatInd
773 RguCDatIndInfo * datInd
776 PUBLIC S16 cmPkRguCDatInd(pst, suId, datInd)
779 RguCDatIndInfo * datInd;
782 Buffer *mBuf = NULLP;
785 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
786 #if (ERRCLASS & ERRCLS_ADD_RES)
787 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
788 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
789 (ErrVal)ERGU028, (ErrVal)0, "Packing failed");
791 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguCDatIndInfo),0);
794 if (pst->selector == RGU_SEL_LWLC)
796 CMCHKPK(cmPkPtr,(PTR) datInd, mBuf);
800 if (cmPkRguCDatIndInfo(datInd, mBuf) != ROK) {
801 #if (ERRCLASS & ERRCLS_ADD_RES)
802 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
803 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
804 (ErrVal)ERGU029, (ErrVal)0, "Packing failed");
806 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd,
807 sizeof(RguCDatIndInfo),0);
811 if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd,
812 sizeof(RguCDatIndInfo),0) != ROK) {
813 #if (ERRCLASS & ERRCLS_ADD_RES)
814 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
815 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
816 (ErrVal)ERGU031, (ErrVal)0, "Packing failed");
823 if (SPkS16(suId, mBuf) != ROK) {
824 #if (ERRCLASS & ERRCLS_ADD_RES)
825 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
826 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
827 (ErrVal)ERGU030, (ErrVal)0, "Packing failed");
829 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguCDatIndInfo),0);
834 pst->event = (Event) EVTRGUCDATIND;
835 RETVALUE(SPstTsk(pst,mBuf));
840 * @brief Data Indication from MAC to RLC to
841 * forward the data received for common channels
845 * Function : cmUnpkRguCDatInd
847 * @param[in] Pst* pst
848 * @param[in] SuId suId
849 * @param[in] RguCDatIndInfo * datInd
854 PUBLIC S16 cmUnpkRguCDatInd
861 PUBLIC S16 cmUnpkRguCDatInd(func, pst, mBuf)
868 RguCDatIndInfo *datInd;
870 TRC3(cmUnpkRguCDatInd)
872 if (SUnpkS16(&suId, mBuf) != ROK) {
873 #if (ERRCLASS & ERRCLS_ADD_RES)
874 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
875 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
876 (ErrVal)ERGU032, (ErrVal)0, "UnPacking failed");
882 if (pst->selector == RGU_SEL_LWLC)
884 CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf);
888 if ((SGetStaticBuffer(pst->region, pst->pool,
889 (Data **)&datInd, sizeof(RguCDatIndInfo),0)) != ROK) {
890 #if (ERRCLASS & ERRCLS_ADD_RES)
891 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
892 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
893 (ErrVal)ERGU033, (ErrVal)0, "UnPacking failed");
898 if (cmUnpkRguCDatIndInfo(datInd, mBuf) != ROK) {
899 #if (ERRCLASS & ERRCLS_ADD_RES)
900 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
901 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
902 (ErrVal)ERGU034, (ErrVal)0, "UnPacking failed");
905 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd,
906 sizeof(RguCDatIndInfo),0);
911 RETVALUE((*func)(pst, suId, datInd));
916 * @brief Data Indication from MAC to RLC to
917 * forward the data received for dedicated channels
921 * Function : cmPkRguDDatInd
923 * @param[in] Pst* pst
924 * @param[in] SuId suId
925 * @param[in] RguDDatIndInfo * datInd
930 PUBLIC S16 cmPkRguDDatInd
934 RguDDatIndInfo * datInd
937 PUBLIC S16 cmPkRguDDatInd(pst, suId, datInd)
940 RguDDatIndInfo * datInd;
943 Buffer *mBuf = NULLP;
946 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
947 #if (ERRCLASS & ERRCLS_ADD_RES)
948 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
949 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
950 (ErrVal)ERGU035, (ErrVal)0, "Packing failed");
952 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0);
956 if (pst->selector == RGU_SEL_LWLC)
958 CMCHKPK(cmPkPtr,(PTR) datInd, mBuf);
962 if (cmPkRguDDatIndInfo(datInd, mBuf) != ROK) {
963 #if (ERRCLASS & ERRCLS_ADD_RES)
964 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
965 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
966 (ErrVal)ERGU036, (ErrVal)0, "Packing failed");
968 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0);
973 if (SPutStaticBuffer(pst->region, pst->pool,
974 (Data *)datInd, sizeof(RguDDatIndInfo),0) != ROK) {
975 #if (ERRCLASS & ERRCLS_ADD_RES)
976 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
977 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
978 (ErrVal)ERGU038, (ErrVal)0, "Packing failed");
985 if (SPkS16(suId, mBuf) != ROK) {
986 #if (ERRCLASS & ERRCLS_ADD_RES)
987 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
988 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
989 (ErrVal)ERGU037, (ErrVal)0, "Packing failed");
991 SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0);
996 pst->event = (Event) EVTRGUDDATIND;
997 RETVALUE(SPstTsk(pst,mBuf));
1002 * @brief Data Indication from MAC to RLC to
1003 * forward the data received for dedicated channels
1007 * Function : cmUnpkRguDDatInd
1009 * @param[in] Pst* pst
1010 * @param[in] SuId suId
1011 * @param[in] RguDDatIndInfo * datInd
1016 PUBLIC S16 cmUnpkRguDDatInd
1023 PUBLIC S16 cmUnpkRguDDatInd(func, pst, mBuf)
1030 RguDDatIndInfo *datInd;
1032 TRC3(cmUnpkRguDDatInd)
1034 if (SUnpkS16(&suId, mBuf) != ROK) {
1035 #if (ERRCLASS & ERRCLS_ADD_RES)
1036 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1037 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1038 (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed");
1044 if (pst->selector == RGU_SEL_LWLC)
1046 CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf);
1050 if ((SGetStaticBuffer(pst->region, pst->pool,
1051 (Data **)&datInd, sizeof(RguDDatIndInfo),0)) != ROK) {
1052 #if (ERRCLASS & ERRCLS_ADD_RES)
1053 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1054 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1055 (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed");
1060 if (cmUnpkRguDDatIndInfo(datInd, mBuf) != ROK) {
1061 #if (ERRCLASS & ERRCLS_ADD_RES)
1062 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1063 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1064 (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed");
1067 SPutStaticBuffer(pst->region, pst->pool,
1068 (Data *)datInd, sizeof(RguDDatIndInfo),0);
1073 RETVALUE((*func)(pst, suId, datInd));
1078 * @brief Primitive invoked from RLC to MAC to
1079 * inform the BO report for common channels
1083 * Function : cmPkRguCStaRsp
1085 * @param[in] Pst* pst
1086 * @param[in] SpId spId
1087 * @param[in] RguCStaRspInfo * staRsp
1092 PUBLIC S16 cmPkRguCStaRsp
1096 RguCStaRspInfo * staRsp
1099 PUBLIC S16 cmPkRguCStaRsp(pst, spId, staRsp)
1102 RguCStaRspInfo * staRsp;
1105 Buffer *mBuf = NULLP;
1106 TRC3(cmPkRguCStaRsp)
1108 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1109 #if (ERRCLASS & ERRCLS_ADD_RES)
1110 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1111 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1112 (ErrVal)ERGU042, (ErrVal)0, "Packing failed");
1114 SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguCStaRspInfo));
1117 if (pst->selector == RGU_SEL_LWLC)
1119 CMCHKPK(cmPkPtr,(PTR) staRsp, mBuf);
1123 if (cmPkRguCStaRspInfo(staRsp, mBuf) != ROK) {
1124 #if (ERRCLASS & ERRCLS_ADD_RES)
1125 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1126 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1127 (ErrVal)ERGU043, (ErrVal)0, "Packing failed");
1129 SPutSBuf(pst->region, pst->pool, (Data *)staRsp,
1130 sizeof(RguCStaRspInfo));
1135 if (SPutSBuf(pst->region, pst->pool, (Data *)staRsp,
1136 sizeof(RguCStaRspInfo)) != ROK) {
1137 #if (ERRCLASS & ERRCLS_ADD_RES)
1138 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1139 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1140 (ErrVal)ERGU045, (ErrVal)0, "Packing failed");
1147 if (SPkS16(spId, mBuf) != ROK) {
1148 #if (ERRCLASS & ERRCLS_ADD_RES)
1149 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1150 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1151 (ErrVal)ERGU044, (ErrVal)0, "Packing failed");
1153 if (staRsp != NULLP)
1155 SPutSBuf(pst->region, pst->pool,
1156 (Data *)staRsp, sizeof(RguCStaRspInfo));
1162 pst->event = (Event) EVTRGUCSTARSP;
1163 RETVALUE(SPstTsk(pst,mBuf));
1168 * @brief Primitive invoked from RLC to MAC to
1169 * inform the BO report for common channels
1173 * Function : cmUnpkRguCStaRsp
1175 * @param[in] Pst* pst
1176 * @param[in] SpId spId
1177 * @param[in] RguCStaRspInfo * staRsp
1182 PUBLIC S16 cmUnpkRguCStaRsp
1189 PUBLIC S16 cmUnpkRguCStaRsp(func, pst, mBuf)
1196 RguCStaRspInfo *staRsp;
1198 TRC3(cmUnpkRguCStaRsp)
1200 if (SUnpkS16(&spId, mBuf) != ROK) {
1201 #if (ERRCLASS & ERRCLS_ADD_RES)
1202 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1203 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1204 (ErrVal)ERGU046, (ErrVal)0, "UnPacking failed");
1209 if (pst->selector == RGU_SEL_LWLC)
1211 CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf);
1215 if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp,
1216 sizeof(RguCStaRspInfo))) != ROK) {
1217 #if (ERRCLASS & ERRCLS_ADD_RES)
1218 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1219 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1220 (ErrVal)ERGU047, (ErrVal)0, "UnPacking failed");
1225 if (cmUnpkRguCStaRspInfo(staRsp, mBuf) != ROK) {
1226 #if (ERRCLASS & ERRCLS_ADD_RES)
1227 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1228 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1229 (ErrVal)ERGU048, (ErrVal)0, "UnPacking failed");
1232 SPutSBuf(pst->region, pst->pool, (Data *)staRsp,
1233 sizeof(RguCStaRspInfo));
1238 RETVALUE((*func)(pst, spId, staRsp));
1241 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
1244 /***********************************************************
1246 * Func :cmPkRguL2MUlThrpMeasReqInfo
1249 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
1250 * Scheduled throughput measurement
1259 **********************************************************/
1261 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo
1263 RguL2MUlThrpMeasReqInfo* param,
1267 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
1268 RguL2MUlThrpMeasReqInfo* param;
1273 TRC3(cmPkRguL2MUlThrpMeasReqInfo);
1275 CMCHKPK(SPkU8, param->enbMeas, mBuf);
1276 for (loop=param->numLcId-1; loop >= 0; loop--)
1278 CMCHKPK(SPkU8, param->lcId[loop], mBuf);
1280 CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
1281 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
1282 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1288 /***********************************************************
1290 * Func :cmUnpkRguL2MUlThrpMeasReqInfo
1293 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
1294 * Scheduled throughput measurement
1303 **********************************************************/
1305 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo
1307 RguL2MUlThrpMeasReqInfo *param,
1311 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
1312 RguL2MUlThrpMeasReqInfo *param;
1317 TRC3(cmUnpkRguL2MUlThrpMeasReqInfo);
1319 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1320 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
1321 CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
1322 for (loop=0; loop<param->numLcId; loop++)
1324 CMCHKUNPK(SUnpkU8, ¶m->lcId[loop], mBuf);
1326 CMCHKUNPK(SUnpkU8, ¶m->enbMeas, mBuf);
1331 * @brief Primitive invoked from RLC to MAC to
1332 * inform the On/Off status for Scheduled UL throughput
1333 * measurment for dedicated channels
1337 * Function :cmPkRguL2MUlThrpMeasReq
1339 * @param[in] Pst* pst
1340 * @param[in] SpId spId
1341 * @param[in] RguL2MUlThrpMeasReqInfo* measReq
1346 PUBLIC S16 cmPkRguL2MUlThrpMeasReq
1350 RguL2MUlThrpMeasReqInfo* measReq
1353 PUBLIC S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq)
1356 RguL2MUlThrpMeasReqInfo* measReq;
1359 Buffer *mBuf = NULLP;
1360 TRC3(cmPkRguL2MUlThrpMeasReq)
1362 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1363 #if (ERRCLASS & ERRCLS_ADD_RES)
1364 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1365 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1366 (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
1368 SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
1371 if (pst->selector == RGU_SEL_LWLC)
1373 CMCHKPK(cmPkPtr,(PTR) measReq, mBuf);
1377 if (cmPkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
1378 #if (ERRCLASS & ERRCLS_ADD_RES)
1379 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1380 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1381 (ErrVal)ERGU050, (ErrVal)0, "Packing failed");
1383 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
1384 sizeof(RguL2MUlThrpMeasReqInfo));
1388 if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
1389 sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
1390 #if (ERRCLASS & ERRCLS_ADD_RES)
1391 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1392 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1393 (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
1401 if (SPkS16(spId, mBuf) != ROK) {
1402 #if (ERRCLASS & ERRCLS_ADD_RES)
1403 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1404 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1405 (ErrVal)ERGU051, (ErrVal)0, "Packing failed");
1407 if (measReq != NULLP)
1409 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
1410 sizeof(RguL2MUlThrpMeasReqInfo));
1416 pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
1417 RETVALUE(SPstTsk(pst,mBuf));
1422 * @brief Primitive invoked from RLC to MAC to
1423 * inform the On/Off status for Scheduled UL throughput
1424 * measurment for dedicated channels
1428 * Function :cmUnpkRguL2MUlThrpMeasReq
1430 * @param[in] Pst* pst
1431 * @param[in] SpId spId
1432 * @param[in] RguL2MUlThrpMeasReqInfo * measReq
1437 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq
1439 RguL2MUlThrpMeasReq func,
1444 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf)
1445 RguL2MUlThrpMeasReq func;
1451 RguL2MUlThrpMeasReqInfo* measReq;
1453 TRC3(cmUnpkRguL2MUlThrpMeasReq)
1455 if (SUnpkS16(&spId, mBuf) != ROK) {
1456 #if (ERRCLASS & ERRCLS_ADD_RES)
1457 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1458 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1459 (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
1464 if (pst->selector == RGU_SEL_LWLC)
1466 CMCHKUNPK(cmUnpkPtr,(PTR *) &measReq, mBuf);
1470 if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
1471 sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
1472 #if (ERRCLASS & ERRCLS_ADD_RES)
1473 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1474 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1475 (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
1480 if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
1481 #if (ERRCLASS & ERRCLS_ADD_RES)
1482 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1483 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1484 (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
1487 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
1488 sizeof(RguL2MUlThrpMeasReqInfo));
1493 RETVALUE((*func)(pst, spId, measReq));
1502 * @brief Primitive invoked from RLC to MAC to
1503 * inform the BO report for dedicated channels
1507 * Function : cmPkRguDStaRsp
1509 * @param[in] Pst* pst
1510 * @param[in] SpId spId
1511 * @param[in] RguDStaRspInfo * staRsp
1516 PUBLIC S16 cmPkRguDStaRsp
1520 RguDStaRspInfo *staRsp
1523 PUBLIC S16 cmPkRguDStaRsp(pst, spId, staRsp)
1526 RguDStaRspInfo *staRsp;
1530 RguDStaRspInfo *staRspInfo = NULL;
1531 Buffer *mBuf = NULLP;
1533 if(SGetSBuf(pst->region, pst->pool, (Data **)&staRspInfo, sizeof(RguDStaRspInfo)) != ROK)
1535 #if (ERRCLASS & ERRCLS_ADD_RES)
1536 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1537 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1538 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
1543 /* staRspInfo cant be NULL here */
1544 if (staRspInfo == NULLP)
1549 cmMemcpy((U8 *)staRspInfo, (U8 *)staRsp, sizeof(RguDStaRspInfo));
1550 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1551 #if (ERRCLASS & ERRCLS_ADD_RES)
1552 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1553 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1554 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
1556 SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo));
1560 if (pst->selector == RGU_SEL_LWLC)
1562 CMCHKPK(cmPkPtr,(PTR) staRspInfo, mBuf);
1566 if (cmPkRguDStaRspInfo(staRsp, mBuf) != ROK) {
1567 #if (ERRCLASS & ERRCLS_ADD_RES)
1568 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1569 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1570 (ErrVal)ERGU057, (ErrVal)0, "Packing failed");
1576 if (SPkS16(spId, mBuf) != ROK) {
1577 #if (ERRCLASS & ERRCLS_ADD_RES)
1578 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1579 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1580 (ErrVal)ERGU058, (ErrVal)0, "Packing failed");
1582 if (staRspInfo != NULLP)
1584 SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo));
1590 pst->event = (Event) EVTRGUDSTARSP;
1591 RETVALUE(SPstTsk(pst,mBuf));
1597 * @brief Primitive invoked from RLC to MAC to
1598 * inform the BO report for dedicated channels
1602 * Function : cmUnpkRguDStaRsp
1604 * @param[in] Pst* pst
1605 * @param[in] SpId spId
1606 * @param[in] RguDStaRspInfo * staRsp
1611 PUBLIC S16 cmUnpkRguDStaRsp
1618 PUBLIC S16 cmUnpkRguDStaRsp(func, pst, mBuf)
1625 RguDStaRspInfo *staRsp;
1627 TRC3(cmUnpkRguDStaRsp)
1629 if (SUnpkS16(&spId, mBuf) != ROK) {
1630 #if (ERRCLASS & ERRCLS_ADD_RES)
1631 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1632 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1633 (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed");
1639 if (pst->selector == RGU_SEL_LWLC)
1641 CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf);
1645 if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp,
1646 sizeof(RguDStaRspInfo))) != ROK) {
1647 #if (ERRCLASS & ERRCLS_ADD_RES)
1648 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1649 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1650 (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed");
1655 if (cmUnpkRguDStaRspInfo(staRsp, mBuf) != ROK) {
1656 #if (ERRCLASS & ERRCLS_ADD_RES)
1657 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1658 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1659 (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed");
1662 SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo));
1667 (*func)(pst, spId, staRsp);
1668 SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo));
1674 * @brief Status Indication from MAC to RLC
1675 * as a response to the staRsp primitive from RLC.
1676 * Informs RLC of the totalBufferSize and Timing Info
1677 * for the transmission on common channels.
1681 * Function : cmPkRguCStaInd
1683 * @param[in] Pst* pst
1684 * @param[in] SuId suId
1685 * @param[in] RguCStaIndInfo * staInd
1690 PUBLIC S16 cmPkRguCStaInd
1694 RguCStaIndInfo * staInd
1697 PUBLIC S16 cmPkRguCStaInd(pst, suId, staInd)
1700 RguCStaIndInfo * staInd;
1703 Buffer *mBuf = NULLP;
1704 TRC3(cmPkRguCStaInd)
1706 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1707 #if (ERRCLASS & ERRCLS_ADD_RES)
1708 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1709 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1710 (ErrVal)ERGU063, (ErrVal)0, "Packing failed");
1712 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo));
1715 if (pst->selector == RGU_SEL_LWLC)
1717 CMCHKPK(cmPkPtr,(PTR) staInd, mBuf);
1721 if (cmPkRguCStaIndInfo(staInd, mBuf) != ROK) {
1722 #if (ERRCLASS & ERRCLS_ADD_RES)
1723 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1724 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1725 (ErrVal)ERGU064, (ErrVal)0, "Packing failed");
1727 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo));
1731 if (SPutSBuf(pst->region, pst->pool,
1732 (Data *)staInd, sizeof(RguCStaIndInfo)) != ROK) {
1733 #if (ERRCLASS & ERRCLS_ADD_RES)
1734 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1735 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1736 (ErrVal)ERGU066, (ErrVal)0, "Packing failed");
1743 if (SPkS16(suId,mBuf) != ROK) {
1744 #if (ERRCLASS & ERRCLS_ADD_RES)
1745 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1746 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1747 (ErrVal)ERGU065, (ErrVal)0, "Packing failed");
1749 if (staInd != NULLP)
1751 SPutSBuf(pst->region, pst->pool, (Data *)staInd,
1752 sizeof(RguCStaIndInfo));
1757 pst->event = (Event) EVTRGUCSTAIND;
1758 RETVALUE(SPstTsk(pst,mBuf));
1763 * @brief Status Indication from MAC to RLC
1764 * as a response to the staRsp primitive from RLC.
1765 * Informs RLC of the totalBufferSize and Timing Info
1766 * for the transmission on common channels.
1770 * Function : cmUnpkRguCStaInd
1772 * @param[in] Pst* pst
1773 * @param[in] SuId suId
1774 * @param[in] RguCStaIndInfo * staInd
1779 PUBLIC S16 cmUnpkRguCStaInd
1786 PUBLIC S16 cmUnpkRguCStaInd(func, pst, mBuf)
1793 RguCStaIndInfo *staInd;
1795 TRC3(cmUnpkRguCStaInd)
1797 if (SUnpkS16(&suId, mBuf) != ROK) {
1798 #if (ERRCLASS & ERRCLS_ADD_RES)
1799 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1800 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1801 (ErrVal)ERGU067, (ErrVal)0, "UnPacking failed");
1807 if (pst->selector == RGU_SEL_LWLC)
1809 CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf);
1813 if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguCStaIndInfo))) != ROK) {
1814 #if (ERRCLASS & ERRCLS_ADD_RES)
1815 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1816 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1817 (ErrVal)ERGU068, (ErrVal)0, "UnPacking failed");
1822 if (cmUnpkRguCStaIndInfo(staInd, mBuf) != ROK) {
1823 #if (ERRCLASS & ERRCLS_ADD_RES)
1824 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1825 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1826 (ErrVal)ERGU069, (ErrVal)0, "UnPacking failed");
1829 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo));
1834 RETVALUE((*func)(pst, suId, staInd));
1837 /*rgu_c_001.main_5 - ADD - L2M Support */
1841 * @brief Harq Status Indication from MAC to RLC
1845 * Function : cmPkRguHqStaInd
1847 * @param[in] Pst* pst
1848 * @param[in] SuId suId
1849 * @param[in] RguHarqStatusInd *harqStatusInd
1854 PUBLIC S16 cmPkRguHqStaInd
1858 RguHarqStatusInd *harqStatusInd
1861 PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
1864 RguHarqStatusInd *harqStatusInd;
1870 RguHarqStatusInd *harqStaInd = NULL;
1872 TRC3(cmPkRguHqStaInd)
1873 #ifdef XEON_SPECIFIC_CHANGES
1874 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
1876 if ((SGetStaticBuffer(pst->region, pst->pool,
1877 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1880 #if (ERRCLASS & ERRCLS_ADD_RES)
1881 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1882 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1883 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1888 cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
1890 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1891 #if (ERRCLASS & ERRCLS_ADD_RES)
1892 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1893 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1894 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1896 #ifdef XEON_SPECIFIC_CHANGES
1897 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
1899 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1904 if (pst->selector == RGU_SEL_LWLC)
1906 CMCHKPK(cmPkPtr,(PTR) harqStaInd, mBuf);
1910 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1912 CMCHKPK(SPkU16, harqStaInd->status[idx], mBuf);
1914 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1916 CMCHKPK(SPkU32, harqStaInd->tbId[idx], mBuf);
1918 CMCHKPK(SPkU8, harqStaInd->numTbs, mBuf);
1919 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
1920 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
1922 if (SPkS16(suId, mBuf) != ROK) {
1923 #if (ERRCLASS & ERRCLS_ADD_RES)
1924 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1925 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1926 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
1928 #ifdef XEON_SPECIFIC_CHANGES
1929 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1930 sizeof(RguHarqStatusInd));
1932 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1937 #ifdef XEON_SPECIFIC_CHANGES
1938 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1939 sizeof(RguHarqStatusInd)) != ROK) {
1941 if (pst->selector != RGU_SEL_LWLC)
1943 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
1944 sizeof(RguHarqStatusInd), 0) != ROK)
1947 #if (ERRCLASS & ERRCLS_ADD_RES)
1948 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1949 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1950 (ErrVal)ERGU072, (ErrVal)0, "Packing failed");
1955 #ifndef XEON_SPECIFIC_CHANGES
1959 pst->event = (Event) EVTRGUHQSTAIND;
1960 RETVALUE(SPstTsk(pst,mBuf));
1965 * @brief Harq Status Indication from MAC to RLC
1969 * Function : cmUnpkRguHqStaInd
1971 * @param[in] RguHqStaInd func
1972 * @param[in] Pst *pst
1973 * @param[in] Buffer *mBuf
1978 PUBLIC S16 cmUnpkRguHqStaInd
1985 PUBLIC S16 cmUnpkRguHqStaInd(func, pst, mBuf)
1991 RguHarqStatusInd *hqStaInd;
1995 TRC3(cmUnpkRguHqStaInd)
1997 if (SUnpkS16(&suId, mBuf) != ROK) {
1998 #if (ERRCLASS & ERRCLS_ADD_RES)
1999 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2000 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2001 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
2006 #ifdef XEON_SPECIFIC_CHANGES
2007 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
2008 sizeof(RguHarqStatusInd))) != ROK) {
2010 if (pst->selector == RGU_SEL_LWLC)
2012 CMCHKUNPK(cmUnpkPtr,(PTR *) &hqStaInd, mBuf);
2016 if ((SGetStaticBuffer(pst->region, pst->pool,
2017 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
2020 #if (ERRCLASS & ERRCLS_ADD_RES)
2021 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2022 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2023 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
2028 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
2029 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
2030 CMCHKUNPK(SUnpkU8, &hqStaInd->numTbs, mBuf);
2031 for(idx = hqStaInd->numTbs; idx > 0; idx--)
2033 CMCHKUNPK(SUnpkU32, &hqStaInd->tbId[idx - 1], mBuf);
2035 for(idx = hqStaInd->numTbs; idx > 0; idx--)
2037 CMCHKUNPK(SUnpkU16, &hqStaInd->status[idx - 1], mBuf);
2039 #ifndef XEON_SPECIFIC_CHANGES
2043 (*func)(pst, suId, hqStaInd);
2044 #ifdef XEON_SPECIFIC_CHANGES
2045 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
2047 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
2051 #endif /* LTE_L2_MEAS */
2055 * @brief Status Indication from MAC to RLC
2056 * as a response to the staRsp primitive from RLC.
2057 * Informs RLC of the totalBufferSize and Timing Info
2058 * for the transmission on dedicated channels.
2062 * Function : cmPkRguDStaInd
2064 * @param[in] Pst* pst
2065 * @param[in] SuId suId
2066 * @param[in] RguDStaIndInfo * staInd
2071 PUBLIC S16 cmPkRguDStaInd
2075 RguDStaIndInfo * staInd
2078 PUBLIC S16 cmPkRguDStaInd(pst, suId, staInd)
2081 RguDStaIndInfo * staInd;
2084 Buffer *mBuf = NULLP;
2085 TRC3(cmPkRguDStaInd)
2087 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2088 #if (ERRCLASS & ERRCLS_ADD_RES)
2089 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2090 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2091 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
2093 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo));
2096 if (pst->selector == RGU_SEL_LWLC)
2098 CMCHKPK(cmPkPtr,(PTR) staInd, mBuf);
2102 if (cmPkRguDStaIndInfo(staInd, mBuf) != ROK) {
2103 #if (ERRCLASS & ERRCLS_ADD_RES)
2104 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2105 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2106 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
2108 SPutSBuf(pst->region, pst->pool, (Data *)staInd,
2109 sizeof(RguDStaIndInfo));
2113 if (SPutSBuf(pst->region, pst->pool, (Data *)staInd,
2114 sizeof(RguDStaIndInfo)) != ROK) {
2115 #if (ERRCLASS & ERRCLS_ADD_RES)
2116 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2117 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2118 (ErrVal)ERGU079, (ErrVal)0, "Packing failed");
2125 if (SPkS16(suId, mBuf) != ROK) {
2126 #if (ERRCLASS & ERRCLS_ADD_RES)
2127 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2128 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2129 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
2131 if (staInd != NULLP)
2133 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo));
2139 pst->event = (Event) EVTRGUDSTAIND;
2140 RETVALUE(SPstTsk(pst,mBuf));
2145 * @brief Status Indication from MAC to RLC
2146 * as a response to the staRsp primitive from RLC.
2147 * Informs RLC of the totalBufferSize and Timing Info
2148 * for the transmission on dedicated channels.
2152 * Function : cmUnpkRguDStaInd
2154 * @param[in] Pst* pst
2155 * @param[in] SuId suId
2156 * @param[in] RguDStaIndInfo * staInd
2161 PUBLIC S16 cmUnpkRguDStaInd
2168 PUBLIC S16 cmUnpkRguDStaInd(func, pst, mBuf)
2175 RguDStaIndInfo *staInd;
2177 TRC3(cmUnpkRguDStaInd)
2179 if (SUnpkS16(&suId, mBuf) != ROK) {
2180 #if (ERRCLASS & ERRCLS_ADD_RES)
2181 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2182 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2183 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
2188 if (pst->selector == RGU_SEL_LWLC)
2190 CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf);
2194 if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguDStaIndInfo))) != ROK) {
2195 #if (ERRCLASS & ERRCLS_ADD_RES)
2196 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2197 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2198 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
2203 if (cmUnpkRguDStaIndInfo(staInd, mBuf) != ROK) {
2204 #if (ERRCLASS & ERRCLS_ADD_RES)
2205 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2206 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2207 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
2210 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo));
2215 RETVALUE((*func)(pst, suId, staInd));
2219 PUBLIC S16 cmPkRguLcFlowCntrlInfo
2221 RguLcFlowCntrlInfo *param,
2225 PUBLIC S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
2226 RguLcFlowCntrlInfo *param;
2230 TRC3(cmPkRguLcFlowCntrlInfo);
2231 CMCHKPK(SPkU32, param->maxBo4FlowCtrl, mBuf);
2232 CMCHKPK(SPkU32, param->pktAdmitCnt, mBuf);
2233 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2239 PUBLIC S16 cmPkRguUeFlowCntrlInfo
2241 RguUeFlowCntrlInfo *param,
2245 PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
2246 RguUeFlowCntrlInfo *param;
2252 TRC3(cmPkRguUeFlowCntrlInfo);
2254 for(idx=(param->numLcs - 1); idx >= 0; idx--)
2256 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
2258 CMCHKPK(SPkU32, param->numLcs, mBuf);
2259 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
2264 PUBLIC S16 cmPkRguFlowCntrlInfo
2266 RguFlowCntrlInd *param,
2270 PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
2271 RguFlowCntrlInd *param;
2277 TRC3(cmPkRguFlowCntrlInfo);
2279 for (idx=(param->numUes - 1); idx >= 0; idx--)
2281 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
2283 CMCHKPK(SPkU32, param->numUes, mBuf);
2284 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2289 * @brief Flow Cntrl Indication from MAC to RLC
2290 * Informs RLC of the LCs on which flow control
2295 * Function : cmPkRguFlowCntrlInd
2297 * @param[in] Pst* pst
2298 * @param[in] SuId suId
2299 * @param[in] RguFlowCntrlInd *staInd
2304 PUBLIC S16 cmPkRguFlowCntrlInd
2308 RguFlowCntrlInd *flowCntrlInd
2311 PUBLIC S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
2314 RguFlowCntrlInd *flowCntrlInd;
2317 Buffer *mBuf = NULLP;
2319 TRC3(cmPkRguFlowCntrlInd);
2320 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2321 #if (ERRCLASS & ERRCLS_ADD_RES)
2322 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2323 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2324 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
2328 if (pst->selector == RGU_SEL_LWLC)
2330 CMCHKPK(cmPkPtr,(PTR) flowCntrlInd, mBuf);
2334 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
2335 #if (ERRCLASS & ERRCLS_ADD_RES)
2336 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2337 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2338 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
2344 if (SPkS16(suId, mBuf) != ROK) {
2345 #if (ERRCLASS & ERRCLS_ADD_RES)
2346 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2347 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2348 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
2354 pst->event = (Event) EVTRGUFLOWCNTRLIND;
2355 RETVALUE(SPstTsk(pst,mBuf));
2359 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo
2361 RguLcFlowCntrlInfo *param,
2365 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
2366 RguLcFlowCntrlInfo *param;
2370 TRC3(cmUnpkRguLcFlowCntrlInfo);
2372 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2373 CMCHKUNPK(SUnpkU32, ¶m->pktAdmitCnt, mBuf);
2374 CMCHKUNPK(SUnpkU32, ¶m->maxBo4FlowCtrl, mBuf);
2379 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo
2381 RguUeFlowCntrlInfo *param,
2385 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
2386 RguUeFlowCntrlInfo *param;
2391 TRC3(cmUnpkRguUeFlowCntrlInfo);
2392 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
2393 CMCHKUNPK(SUnpkU32, ¶m->numLcs, mBuf);
2394 for(idx=0; idx < param->numLcs; idx++)
2396 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
2402 PUBLIC S16 cmUnpkRguFlowCntrlInfo
2404 RguFlowCntrlInd *param,
2408 PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
2409 RguFlowCntrlInd *param;
2415 TRC3(cmUnpkRguFlowCntrlInfo);
2417 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2418 CMCHKUNPK(SUnpkU32, ¶m->numUes, mBuf);
2419 for (idx=0; idx < param->numUes; idx++)
2421 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
2427 * @brief Flow control indication from MAC to RLC
2428 * Informs RLC of the LCs on which flow control to
2433 * Function : cmUnpkRguFlowCntrlInd
2435 * @param[in] RguFlowCntrlInd func
2436 * @param[in] Pst *pst
2437 * @param[in] Buffer *mBuf
2442 PUBLIC S16 cmUnpkRguFlowCntrlInd
2444 RguFlowCntrlIndInfo func,
2449 PUBLIC S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
2450 RguFlowCntrlIndInfo func;
2456 RguFlowCntrlInd *flowCntrlInd;
2458 TRC3(cmUnpkRguFlowCntrlInd)
2460 if (SUnpkS16(&suId, mBuf) != ROK) {
2461 #if (ERRCLASS & ERRCLS_ADD_RES)
2462 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2463 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2464 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
2469 if (pst->selector == RGU_SEL_LWLC)
2471 CMCHKUNPK(cmUnpkPtr,(PTR *) &flowCntrlInd, mBuf);
2475 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
2476 #if (ERRCLASS & ERRCLS_ADD_RES)
2477 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2478 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2479 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
2484 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
2485 #if (ERRCLASS & ERRCLS_ADD_RES)
2486 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2487 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2488 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
2491 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
2496 RETVALUE((*func)(pst, suId, flowCntrlInd));
2499 /***********************************************************
2501 * Func : cmPkRguPduInfo
2505 * PDU information given on a logical channel
2514 **********************************************************/
2516 PUBLIC S16 cmPkRguPduInfo
2522 PUBLIC S16 cmPkRguPduInfo(param, mBuf)
2529 TRC3(cmPkRguPduInfo);
2531 for (i=param->numPdu-1; i >= 0; i--) {
2532 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
2534 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
2536 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
2538 SPutMsg(param->mBuf[i]);
2539 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2541 CMCHKPK(SPkU8, param->numPdu, mBuf);
2547 /***********************************************************
2549 * Func : cmUnpkRguPduInfo
2553 * PDU information given on a logical channel
2562 **********************************************************/
2564 PUBLIC S16 cmUnpkRguPduInfo
2570 PUBLIC S16 cmUnpkRguPduInfo(param, mBuf)
2577 TRC3(cmUnpkRguPduInfo);
2579 CMCHKUNPK(SUnpkU8, ¶m->numPdu, mBuf);
2580 for (i=0; i<param->numPdu; i++) {
2581 MsgLen msgLen, totalMsgLen;
2582 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2583 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2585 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
2593 /***********************************************************
2595 * Func : cmPkRguDBoReport
2598 * Desc : RguDBoReport
2599 * Buffer Occupancy Report for dedicated logical channel
2608 **********************************************************/
2610 PUBLIC S16 cmPkRguDBoReport
2612 RguDBoReport *param,
2616 PUBLIC S16 cmPkRguDBoReport(param, mBuf)
2617 RguDBoReport *param;
2622 TRC3(cmPkRguDBoReport);
2624 CMCHKPK(SPkU32, param->oldestSduArrTime, mBuf);
2625 CMCHKPK(SPkU32, param->staPduBo, mBuf);
2627 CMCHKPK(SPkU8, param->staPduPrsnt, mBuf);
2628 CMCHKPK(SPkU16, param->estRlcHdrSz, mBuf);
2630 CMCHKPK(SPkS32, param->bo, mBuf);
2636 /***********************************************************
2638 * Func : cmUnpkRguDBoReport
2641 * Desc : RguDBoReport
2642 * Buffer Occupancy Report for dedicated logical channel
2651 **********************************************************/
2653 PUBLIC S16 cmUnpkRguDBoReport
2655 RguDBoReport *param,
2659 PUBLIC S16 cmUnpkRguDBoReport(param, mBuf)
2660 RguDBoReport *param;
2665 TRC3(cmUnpkRguDBoReport);
2667 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2669 CMCHKUNPK(SUnpkU16, ¶m->estRlcHdrSz, mBuf);
2670 CMCHKUNPK(SUnpkU8, ¶m->staPduPrsnt, mBuf);
2673 CMCHKUNPK(SUnpkU32, ¶m->staPduBo, mBuf);
2674 CMCHKUNPK(SUnpkU32, ¶m->oldestSduArrTime, mBuf);
2679 /***********************************************************
2681 * Func : cmPkRguCDatReqInfo
2684 * Desc : RguCDatReqInfo
2685 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2694 **********************************************************/
2696 PUBLIC S16 cmPkRguCDatReqInfo
2698 RguCDatReqInfo *param,
2702 PUBLIC S16 cmPkRguCDatReqInfo(param, mBuf)
2703 RguCDatReqInfo *param;
2709 TRC3(cmPkRguCDatReqInfo);
2711 if (param->pdu != NULLP)
2713 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2715 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2717 SPutMsg(param->pdu);
2718 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2720 switch(param->lcType) {
2721 case CM_LTE_LCH_CCCH:
2722 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2724 case CM_LTE_LCH_BCCH:
2725 case CM_LTE_LCH_PCCH:
2726 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2728 CMCHKPK(SPkU8,param->pnb,mBuf);
2734 CMCHKPK(SPkU32, param->transId, mBuf);
2735 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2736 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2737 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2743 /***********************************************************
2745 * Func : cmUnpkRguCDatReqInfo
2748 * Desc : RguCDatReqInfo
2749 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2758 **********************************************************/
2760 PUBLIC S16 cmUnpkRguCDatReqInfo
2762 RguCDatReqInfo *param,
2766 PUBLIC S16 cmUnpkRguCDatReqInfo(param, mBuf)
2767 RguCDatReqInfo *param;
2771 MsgLen msgLen, totalMsgLen;
2773 TRC3(cmUnpkRguCDatReqInfo);
2775 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2776 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2777 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2778 CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf);
2779 switch(param->lcType) {
2780 case CM_LTE_LCH_BCCH:
2781 case CM_LTE_LCH_PCCH:
2783 CMCHKUNPK(SUnpkU8,¶m->pnb, mBuf);
2785 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2787 case CM_LTE_LCH_CCCH:
2788 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2793 SFndLenMsg(mBuf, &msgLen);
2796 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2797 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2799 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2807 /***********************************************************
2809 * Func : cmPkRguLchDatReq
2812 * Desc : RguLchDatReq
2813 * DatReq Information of a logical channel
2822 **********************************************************/
2824 PUBLIC S16 cmPkRguLchDatReq
2826 RguLchDatReq *param,
2830 PUBLIC S16 cmPkRguLchDatReq(param, mBuf)
2831 RguLchDatReq *param;
2836 TRC3(cmPkRguLchDatReq);
2839 CMCHKPK(SPkU8, param->freeBuff, mBuf);
2841 CMCHKPK(SPkU8, param->setMaxUlPrio, mBuf);
2842 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2843 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
2844 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2850 /***********************************************************
2852 * Func : cmUnpkRguLchDatReq
2855 * Desc : RguLchDatReq
2856 * DatReq Information of a logical channel
2865 **********************************************************/
2867 PUBLIC S16 cmUnpkRguLchDatReq
2869 RguLchDatReq *param,
2873 PUBLIC S16 cmUnpkRguLchDatReq(param, mBuf)
2874 RguLchDatReq *param;
2879 TRC3(cmUnpkRguLchDatReq);
2881 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2882 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
2883 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2884 CMCHKUNPK(SUnpkU8, ¶m->setMaxUlPrio, mBuf);
2886 CMCHKUNPK(SUnpkU8, ¶m->freeBuff, mBuf);
2892 /***********************************************************
2894 * Func : cmPkRguDatReqTb
2897 * Desc : RguDatReqTb
2898 * DatReq from RLC to MAC for dedicated channels of a UE
2907 **********************************************************/
2909 PUBLIC S16 cmPkRguDatReqTb
2915 PUBLIC S16 cmPkRguDatReqTb(param, mBuf)
2922 TRC3(cmPkRguDatReqTb);
2923 /*rgu_c_001.main_5 - ADD - L2M Support */
2925 CMCHKPK(SPkU32, param->tbId, mBuf);
2927 for (i=param->nmbLch-1; i >= 0; i--) {
2928 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
2930 CMCHKPK(SPkU8, param->nmbLch, mBuf);
2936 /***********************************************************
2938 * Func : cmUnpkRguDatReqTb
2941 * Desc : RguDatReqTb
2942 * DatReq from RLC to MAC for dedicated channels of a UE
2951 **********************************************************/
2954 PUBLIC S16 cmUnpkRguDatReqTb
2961 PUBLIC S16 cmUnpkRguDatReqTb(pst, param, mBuf)
2968 PUBLIC S16 cmUnpkRguDatReqTb
2974 PUBLIC S16 cmUnpkRguDatReqTb(param, mBuf)
2982 TRC3(cmUnpkRguDatReqTb);
2984 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
2985 for (i=0; i<param->nmbLch; i++) {
2986 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
2988 /*rgu_c_001.main_5 - ADD - L2M Support */
2990 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
2996 /***********************************************************
2998 * Func : cmPkRguDDatReqInfo
3001 * Desc : RguDDatReqInfo
3002 * DatReq from RLC to MAC for dedicated channels of a UE
3011 **********************************************************/
3012 /*rgu_c_001.main_5 - ADD - L2M Support */
3015 PUBLIC S16 cmPkRguDDatReqInfo
3018 RguDDatReqInfo *param,
3022 PUBLIC S16 cmPkRguDDatReqInfo(pst, param, mBuf)
3024 RguDDatReqInfo *param;
3029 PUBLIC S16 cmPkRguDDatReqInfo
3031 RguDDatReqInfo *param,
3035 PUBLIC S16 cmPkRguDDatReqInfo(param, mBuf)
3036 RguDDatReqInfo *param;
3044 TRC3(cmPkRguDDatReqInfo);
3046 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
3048 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
3049 for (i=RGU_MAX_TB-1; i >= 0; i--)
3051 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
3053 CMCHKPK(SPkU8, datReq->nmbOfTbs, mBuf);
3054 CMCHKPK(SPkU32, datReq->transId, mBuf);
3055 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
3057 CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf);
3058 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3064 /***********************************************************
3066 * Func : cmUnpkRguDDatReqInfo
3069 * Desc : RguDDatReqInfo
3070 * DatReq from RLC to MAC for dedicated channels of a UE
3079 **********************************************************/
3082 PUBLIC S16 cmUnpkRguDDatReqInfo
3085 RguDDatReqInfo *param,
3089 PUBLIC S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
3091 RguDDatReqInfo *param;
3096 PUBLIC S16 cmUnpkRguDDatReqInfo
3098 RguDDatReqInfo *param,
3102 PUBLIC S16 cmUnpkRguDDatReqInfo(param, mBuf)
3103 RguDDatReqInfo *param;
3109 /* After Merging from 2.1 to 2.2 */
3110 /*rgu_c_001.main_5 - ADD - L2M Support */
3116 TRC3(cmUnpkRguDDatReqInfo);
3118 /* After Merging from 2.1 to 2.2 */
3119 /*rgu_c_001.main_5 - ADD - L2M Support */
3123 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3124 CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf);
3125 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
3127 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
3128 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
3129 CMCHKUNPK(SUnpkU32, &datReq->transId, mBuf);
3130 CMCHKUNPK(SUnpkU8, &datReq->nmbOfTbs, mBuf);
3131 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
3132 for (i=0; i<RGU_MAX_TB; i++)
3134 /*rgu_c_001.main_5 - ADD - L2M Support */
3136 /* After Merging from 2.1 to 2.2 */
3137 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
3143 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
3152 /***********************************************************
3154 * Func : cmPkRguCDatIndInfo
3157 * Desc : RguCDatIndInfo
3158 * DatInd from MAC to RLC on CCCH
3167 **********************************************************/
3169 PUBLIC S16 cmPkRguCDatIndInfo
3171 RguCDatIndInfo *param,
3175 PUBLIC S16 cmPkRguCDatIndInfo(param, mBuf)
3176 RguCDatIndInfo *param;
3182 TRC3(cmPkRguCDatIndInfo);
3184 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
3186 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
3188 SPutMsg(param->pdu);
3189 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
3190 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3191 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3192 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3198 /***********************************************************
3200 * Func : cmUnpkRguCDatIndInfo
3203 * Desc : RguCDatIndInfo
3204 * DatInd from MAC to RLC on CCCH
3213 **********************************************************/
3215 PUBLIC S16 cmUnpkRguCDatIndInfo
3217 RguCDatIndInfo *param,
3221 PUBLIC S16 cmUnpkRguCDatIndInfo(param, mBuf)
3222 RguCDatIndInfo *param;
3226 MsgLen msgLen, totalMsgLen;
3228 TRC3(cmUnpkRguCDatIndInfo);
3230 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3231 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3232 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3233 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
3234 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
3236 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
3243 /***********************************************************
3245 * Func : cmPkRguLchDatInd
3248 * Desc : RguLchDatInd
3249 * DatInd Information for a logical channel
3258 **********************************************************/
3260 PUBLIC S16 cmPkRguLchDatInd
3262 RguLchDatInd *param,
3266 PUBLIC S16 cmPkRguLchDatInd(param, mBuf)
3267 RguLchDatInd *param;
3271 TRC3(cmPkRguLchDatInd);
3273 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
3274 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3280 /***********************************************************
3282 * Func : cmUnpkRguLchDatInd
3285 * Desc : RguLchDatInd
3286 * DatInd Information for a logical channel
3295 **********************************************************/
3297 PUBLIC S16 cmUnpkRguLchDatInd
3299 RguLchDatInd *param,
3303 PUBLIC S16 cmUnpkRguLchDatInd(param, mBuf)
3304 RguLchDatInd *param;
3308 TRC3(cmUnpkRguLchDatInd);
3310 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3311 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
3317 /***********************************************************
3319 * Func : cmPkRguDDatIndInfo
3322 * Desc : RguDDatIndInfo
3323 * Data Indication from MAC to RLC for dedicated channels of a UE
3332 **********************************************************/
3334 PUBLIC S16 cmPkRguDDatIndInfo
3336 RguDDatIndInfo *param,
3340 PUBLIC S16 cmPkRguDDatIndInfo(param, mBuf)
3341 RguDDatIndInfo *param;
3347 TRC3(cmPkRguDDatIndInfo);
3350 CMCHKPK(SPkU8, param->burstInd, mBuf);
3351 CMCHKPK(SPkU32, param->ttiCnt, mBuf);
3353 for (i=param->numLch-1; i >= 0; i--) {
3354 CMCHKPK(cmPkRguLchDatInd, ¶m->lchData[i], mBuf);
3356 CMCHKPK(SPkU8, param->numLch, mBuf);
3357 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3358 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3364 /***********************************************************
3366 * Func : cmUnpkRguDDatIndInfo
3369 * Desc : RguDDatIndInfo
3370 * Data Indication from MAC to RLC for dedicated channels of a UE
3379 **********************************************************/
3381 PUBLIC S16 cmUnpkRguDDatIndInfo
3383 RguDDatIndInfo *param,
3387 PUBLIC S16 cmUnpkRguDDatIndInfo(param, mBuf)
3388 RguDDatIndInfo *param;
3394 TRC3(cmUnpkRguDDatIndInfo);
3396 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3397 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3398 CMCHKUNPK(SUnpkU8, ¶m->numLch, mBuf);
3399 for (i=0; i<param->numLch; i++) {
3400 CMCHKUNPK(cmUnpkRguLchDatInd, ¶m->lchData[i], mBuf);
3403 CMCHKUNPK(SUnpkU32, ¶m->ttiCnt, mBuf);
3404 CMCHKUNPK(SUnpkU8, ¶m->burstInd, mBuf);
3410 /***********************************************************
3412 * Func : cmPkRguCStaRspInfo
3415 * Desc : RguCStaRspInfo
3416 * Status Response from RLC to MAC for common logical channel
3425 **********************************************************/
3427 PUBLIC S16 cmPkRguCStaRspInfo
3429 RguCStaRspInfo *param,
3433 PUBLIC S16 cmPkRguCStaRspInfo(param, mBuf)
3434 RguCStaRspInfo *param;
3439 TRC3(cmPkRguCStaRspInfo);
3441 switch(param->lcType) {
3442 case CM_LTE_LCH_CCCH:
3443 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
3445 case CM_LTE_LCH_BCCH:
3446 case CM_LTE_LCH_PCCH:
3447 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
3449 CMCHKPK(SPkU8,param->pnb,mBuf);
3450 CMCHKPK(SPkU8,param->emtcDiReason,mBuf);
3456 CMCHKPK(SPkS32, param->bo, mBuf);
3457 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
3458 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3459 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3465 /***********************************************************
3467 * Func : cmUnpkRguCStaRspInfo
3470 * Desc : RguCStaRspInfo
3471 * Status Response from RLC to MAC for common logical channel
3480 **********************************************************/
3482 PUBLIC S16 cmUnpkRguCStaRspInfo
3484 RguCStaRspInfo *param,
3488 PUBLIC S16 cmUnpkRguCStaRspInfo(param, mBuf)
3489 RguCStaRspInfo *param;
3494 TRC3(cmUnpkRguCStaRspInfo);
3496 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3497 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3498 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
3499 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
3500 switch(param->lcType) {
3501 case CM_LTE_LCH_BCCH:
3502 case CM_LTE_LCH_PCCH:
3504 CMCHKUNPK(SUnpkU8,¶m->emtcDiReason , mBuf);
3505 CMCHKUNPK(SUnpkU8,¶m->pnb , mBuf);
3507 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
3509 case CM_LTE_LCH_CCCH:
3510 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
3520 /***********************************************************
3522 * Func : cmPkRguDStaRspInfo
3525 * Desc : RguDStaRspInfo
3526 * Status Response from RLC to MAC for dedicated logical channel
3535 **********************************************************/
3537 PUBLIC S16 cmPkRguDStaRspInfo
3539 RguDStaRspInfo *param,
3543 PUBLIC S16 cmPkRguDStaRspInfo(param, mBuf)
3544 RguDStaRspInfo *param;
3549 TRC3(cmPkRguDStaRspInfo);
3551 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
3552 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3553 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3554 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3560 /***********************************************************
3562 * Func : cmUnpkRguDStaRspInfo
3565 * Desc : RguDStaRspInfo
3566 * Status Response from RLC to MAC for dedicated logical channel
3575 **********************************************************/
3577 PUBLIC S16 cmUnpkRguDStaRspInfo
3579 RguDStaRspInfo *param,
3583 PUBLIC S16 cmUnpkRguDStaRspInfo(param, mBuf)
3584 RguDStaRspInfo *param;
3589 TRC3(cmUnpkRguDStaRspInfo);
3591 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3592 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3593 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3594 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
3600 /***********************************************************
3602 * Func : cmPkRguCStaIndInfo
3605 * Desc : RguCStaIndInfo
3606 * Status Indication from MAC to RLC for common logical channel
3615 **********************************************************/
3617 PUBLIC S16 cmPkRguCStaIndInfo
3619 RguCStaIndInfo *param,
3623 PUBLIC S16 cmPkRguCStaIndInfo(param, mBuf)
3624 RguCStaIndInfo *param;
3629 TRC3(cmPkRguCStaIndInfo);
3631 CMCHKPK(cmPkLteTimingInfo, ¶m->pagingTimingInfo, mBuf);
3632 CMCHKPK(SPkU8, param->isEmtcPaging, mBuf);
3634 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3635 CMCHKPK(SPkU32, param->transId, mBuf);
3636 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3637 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3643 /***********************************************************
3645 * Func : cmUnpkRguCStaIndInfo
3648 * Desc : RguCStaIndInfo
3649 * Status Indication from MAC to RLC for common logical channel
3658 **********************************************************/
3660 PUBLIC S16 cmUnpkRguCStaIndInfo
3662 RguCStaIndInfo *param,
3666 PUBLIC S16 cmUnpkRguCStaIndInfo(param, mBuf)
3667 RguCStaIndInfo *param;
3672 TRC3(cmUnpkRguCStaIndInfo);
3674 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3675 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3676 CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf);
3677 /*TODO:Mukesh: Need to check why rnti unpacking is missing*/
3679 CMCHKUNPK(SUnpkU8, ¶m->isEmtcPaging, mBuf);
3680 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->pagingTimingInfo, mBuf);
3687 /***********************************************************
3689 * Func : cmPkRguLchStaInd
3692 * Desc : RguLchStaInd
3693 * StaInd info for each logical channel of a UE
3702 **********************************************************/
3704 PUBLIC S16 cmPkRguLchStaInd
3706 RguLchStaInd *param,
3710 PUBLIC S16 cmPkRguLchStaInd(param, mBuf)
3711 RguLchStaInd *param;
3716 TRC3(cmPkRguLchStaInd);
3718 CMCHKPK(SPkS16, param->totBufSize, mBuf);
3719 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3725 /***********************************************************
3727 * Func : cmUnpkRguLchStaInd
3730 * Desc : RguLchStaInd
3731 * StaInd info for each logical channel of a UE
3740 **********************************************************/
3742 PUBLIC S16 cmUnpkRguLchStaInd
3744 RguLchStaInd *param,
3748 PUBLIC S16 cmUnpkRguLchStaInd(param, mBuf)
3749 RguLchStaInd *param;
3754 TRC3(cmUnpkRguLchStaInd);
3756 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3757 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
3762 /***********************************************************
3764 * Func : cmPkRguStaIndTb
3767 * Desc : RguStaIndTb
3768 * StaInd from RLC to MAC for dedicated channels of a UE
3777 **********************************************************/
3779 PUBLIC S16 cmPkRguStaIndTb
3785 PUBLIC S16 cmPkRguStaIndTb(param, mBuf)
3792 TRC3(cmPkRguStaIndTb);
3795 CMCHKPK(SPkU16, param->status, mBuf);
3796 CMCHKPK(SPkU32, param->tbId, mBuf);
3798 for (i=param->nmbLch-1; i >= 0; i--) {
3799 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3801 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3807 /***********************************************************
3809 * Func : cmUnpkRguStaIndTb
3812 * Desc : RguStaIndTb
3813 * StaInd from RLC to MAC for dedicated channels of a UE
3822 **********************************************************/
3824 PUBLIC S16 cmUnpkRguStaIndTb
3830 PUBLIC S16 cmUnpkRguStaIndTb(param, mBuf)
3837 TRC3(cmUnpkRguStaIndTb);
3839 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3840 for (i=0; i<param->nmbLch; i++) {
3841 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3844 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
3845 CMCHKUNPK(SUnpkU16, ¶m->status, mBuf);
3851 /***********************************************************
3853 * Func : cmPkRguDStaIndInfo
3856 * Desc : RguDStaIndInfo
3857 * StaInd from MAC to RLC for dedicated logical channels of a UE
3866 **********************************************************/
3868 PUBLIC S16 cmPkRguDStaIndInfo
3870 RguDStaIndInfo *param,
3874 PUBLIC S16 cmPkRguDStaIndInfo(param, mBuf)
3875 RguDStaIndInfo *param;
3882 TRC3(cmPkRguDStaIndInfo);
3884 for(idx = (param->nmbOfUeGrantPerTti - 1); idx >= 0 ; idx--)
3886 RguDStaIndPerUe *staInd = ¶m->staInd[idx];
3887 CMCHKPK(SPkU8, staInd->fillCtrlPdu, mBuf);
3888 for (i=staInd->nmbOfTbs-1; i >= 0; i--) {
3889 CMCHKPK(cmPkRguStaIndTb, &staInd->staIndTb[i], mBuf);
3891 CMCHKPK(SPkU8, staInd->nmbOfTbs, mBuf);
3892 CMCHKPK(SPkU32,staInd->transId, mBuf);
3893 CMCHKPK(cmPkLteRnti, staInd->rnti, mBuf);
3895 CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf);
3896 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3902 /***********************************************************
3904 * Func : cmUnpkRguDStaIndInfo
3907 * Desc : RguDStaIndInfo
3908 * StaInd from MAC to RLC for dedicated logical channels of a UE
3917 **********************************************************/
3919 PUBLIC S16 cmUnpkRguDStaIndInfo
3921 RguDStaIndInfo *param,
3925 PUBLIC S16 cmUnpkRguDStaIndInfo(param, mBuf)
3926 RguDStaIndInfo *param;
3933 TRC3(cmUnpkRguDStaIndInfo);
3935 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3936 CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf);
3937 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
3939 RguDStaIndPerUe *staInd = ¶m->staInd[idx];
3940 CMCHKUNPK(cmUnpkLteRnti, &staInd->rnti, mBuf);
3941 CMCHKUNPK(SUnpkU32, &staInd->transId, mBuf);
3942 CMCHKUNPK(SUnpkU8, &staInd->nmbOfTbs, mBuf);
3943 for (i=0; i<staInd->nmbOfTbs; i++)
3945 CMCHKUNPK(cmUnpkRguStaIndTb, &staInd->staIndTb[i], mBuf);
3947 CMCHKUNPK(SUnpkU8, &staInd->fillCtrlPdu, mBuf);
3954 /**********************************************************************
3956 **********************************************************************/