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 */
1842 * @brief Packing function for RguLchMapInfo
1846 * Function : cmPkRguLchMapInfo
1847 * @param[in] RguLchMapInfo *param
1848 * @param[out] Buffer *mBuf
1852 PRIVATE S16 cmPkRguLchMapInfo
1854 RguLchMapInfo *param,
1858 PRIVATE S16 cmPkRguLchMapInfo(param, mBuf)
1859 RguLchMapInfo *param;
1865 TRC3(cmPkRguLchMapInfo);
1867 for(idx = 0; idx < RGU_MAX_LC; idx++)
1869 CMCHKPK(SPkU16, param->snList[idx], mBuf);
1871 CMCHKPK(cmPkLteLcId, param->lChId, mBuf);
1877 * @brief Unpacking function for RguLchMapInfo
1881 * Function : cmUnpkRguLchMapInfo
1883 * @param[out] RguLchMapInfo *param
1884 * @param[in] Buffer *mBuf
1888 PRIVATE S16 cmUnpkRguLchMapInfo
1890 RguLchMapInfo *param,
1894 PRIVATE S16 cmUnpkRguLchMapInfo(param, mBuf)
1895 RguLchMapInfo *param;
1901 TRC3(cmUnpkRguLchMapInfo)
1903 CMCHKUNPK(cmUnpkLteLcId, ¶m->lChId, mBuf);
1904 for(idx = RGU_MAX_LC; idx > 0; idx--)
1906 CMCHKUNPK(SUnpkU16, ¶m->snList[idx - 1], mBuf);
1914 * @brief Harq Status Indication from MAC to RLC
1918 * Function : cmPkRguHqStaInd
1920 * @param[in] Pst* pst
1921 * @param[in] SuId suId
1922 * @param[in] RguHarqStatusInd *harqStatusInd
1927 PUBLIC S16 cmPkRguHqStaInd
1931 RguHarqStatusInd *harqStatusInd
1934 PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
1937 RguHarqStatusInd *harqStatusInd;
1943 RguHarqStatusInd *harqStaInd = NULL;
1945 TRC3(cmPkRguHqStaInd)
1946 #ifdef XEON_SPECIFIC_CHANGES
1947 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
1949 if ((SGetStaticBuffer(pst->region, pst->pool,
1950 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1953 #if (ERRCLASS & ERRCLS_ADD_RES)
1954 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1955 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1956 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1961 cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
1963 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1964 #if (ERRCLASS & ERRCLS_ADD_RES)
1965 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1966 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1967 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1969 #ifdef XEON_SPECIFIC_CHANGES
1970 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
1972 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1977 if (pst->selector == RGU_SEL_LWLC)
1979 CMCHKPK(cmPkPtr,(PTR) harqStaInd, mBuf);
1983 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1985 CMCHKPK(SPkU16, harqStaInd->status[idx], mBuf);
1987 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1989 CMCHKPK(SPkU32, harqStaInd->tbId[idx], mBuf);
1991 CMCHKPK(SPkU8, harqStaInd->numTbs, mBuf);
1992 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
1993 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
1995 if (SPkS16(suId, mBuf) != ROK) {
1996 #if (ERRCLASS & ERRCLS_ADD_RES)
1997 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1998 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1999 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
2001 #ifdef XEON_SPECIFIC_CHANGES
2002 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
2003 sizeof(RguHarqStatusInd));
2005 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
2010 #ifdef XEON_SPECIFIC_CHANGES
2011 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
2012 sizeof(RguHarqStatusInd)) != ROK) {
2014 if (pst->selector != RGU_SEL_LWLC)
2016 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
2017 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)ERGU072, (ErrVal)0, "Packing failed");
2028 #ifndef XEON_SPECIFIC_CHANGES
2032 pst->event = (Event) EVTRGUHQSTAIND;
2033 RETVALUE(SPstTsk(pst,mBuf));
2039 * @brief Unpacking function for RguSnMapInfo
2043 * Function : cmUnpkRguSnMapInfo
2045 * @param[out] RguSnMapInfo *param
2046 * @param[in] Buffer *mBuf
2050 PRIVATE S16 cmUnpkRguSnMapInfo
2052 RguSnMapInfo *param,
2056 PRIVATE S16 cmUnpkRguSnMapInfo(param, mBuf)
2057 RguSnMapInfo *param;
2063 TRC3(cmUnpkRguSnMapInfo)
2065 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
2066 CMCHKUNPK(SUnpkU8, ¶m->numLch, mBuf);
2067 for(idx = param->numLch; idx > 0; idx--)
2069 CMCHKUNPK(cmUnpkRguLchMapInfo, ¶m->lchMap[idx - 1], mBuf);
2076 * @brief Harq Status Indication from MAC to RLC
2080 * Function : cmUnpkRguHqStaInd
2082 * @param[in] RguHqStaInd func
2083 * @param[in] Pst *pst
2084 * @param[in] Buffer *mBuf
2089 PUBLIC S16 cmUnpkRguHqStaInd
2096 PUBLIC S16 cmUnpkRguHqStaInd(func, pst, mBuf)
2102 RguHarqStatusInd *hqStaInd;
2106 TRC3(cmUnpkRguHqStaInd)
2108 if (SUnpkS16(&suId, mBuf) != ROK) {
2109 #if (ERRCLASS & ERRCLS_ADD_RES)
2110 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2111 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2112 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
2117 #ifdef XEON_SPECIFIC_CHANGES
2118 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
2119 sizeof(RguHarqStatusInd))) != ROK) {
2121 if (pst->selector == RGU_SEL_LWLC)
2123 CMCHKUNPK(cmUnpkPtr,(PTR *) &hqStaInd, mBuf);
2127 if ((SGetStaticBuffer(pst->region, pst->pool,
2128 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
2131 #if (ERRCLASS & ERRCLS_ADD_RES)
2132 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2133 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2134 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
2139 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
2140 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
2141 CMCHKUNPK(SUnpkU8, &hqStaInd->numTbs, mBuf);
2142 for(idx = hqStaInd->numTbs; idx > 0; idx--)
2144 CMCHKUNPK(SUnpkU32, &hqStaInd->tbId[idx - 1], mBuf);
2146 for(idx = hqStaInd->numTbs; idx > 0; idx--)
2148 CMCHKUNPK(SUnpkU16, &hqStaInd->status[idx - 1], mBuf);
2150 #ifndef XEON_SPECIFIC_CHANGES
2154 (*func)(pst, suId, hqStaInd);
2155 #ifdef XEON_SPECIFIC_CHANGES
2156 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
2158 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
2162 #endif /* LTE_L2_MEAS */
2166 * @brief Status Indication from MAC to RLC
2167 * as a response to the staRsp primitive from RLC.
2168 * Informs RLC of the totalBufferSize and Timing Info
2169 * for the transmission on dedicated channels.
2173 * Function : cmPkRguDStaInd
2175 * @param[in] Pst* pst
2176 * @param[in] SuId suId
2177 * @param[in] RguDStaIndInfo * staInd
2182 PUBLIC S16 cmPkRguDStaInd
2186 RguDStaIndInfo * staInd
2189 PUBLIC S16 cmPkRguDStaInd(pst, suId, staInd)
2192 RguDStaIndInfo * staInd;
2195 Buffer *mBuf = NULLP;
2196 TRC3(cmPkRguDStaInd)
2198 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2199 #if (ERRCLASS & ERRCLS_ADD_RES)
2200 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2201 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2202 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
2204 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo));
2207 if (pst->selector == RGU_SEL_LWLC)
2209 CMCHKPK(cmPkPtr,(PTR) staInd, mBuf);
2213 if (cmPkRguDStaIndInfo(staInd, mBuf) != ROK) {
2214 #if (ERRCLASS & ERRCLS_ADD_RES)
2215 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2216 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2217 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
2219 SPutSBuf(pst->region, pst->pool, (Data *)staInd,
2220 sizeof(RguDStaIndInfo));
2224 if (SPutSBuf(pst->region, pst->pool, (Data *)staInd,
2225 sizeof(RguDStaIndInfo)) != ROK) {
2226 #if (ERRCLASS & ERRCLS_ADD_RES)
2227 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2228 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2229 (ErrVal)ERGU079, (ErrVal)0, "Packing failed");
2236 if (SPkS16(suId, mBuf) != ROK) {
2237 #if (ERRCLASS & ERRCLS_ADD_RES)
2238 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2239 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2240 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
2242 if (staInd != NULLP)
2244 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo));
2250 pst->event = (Event) EVTRGUDSTAIND;
2251 RETVALUE(SPstTsk(pst,mBuf));
2256 * @brief Status Indication from MAC to RLC
2257 * as a response to the staRsp primitive from RLC.
2258 * Informs RLC of the totalBufferSize and Timing Info
2259 * for the transmission on dedicated channels.
2263 * Function : cmUnpkRguDStaInd
2265 * @param[in] Pst* pst
2266 * @param[in] SuId suId
2267 * @param[in] RguDStaIndInfo * staInd
2272 PUBLIC S16 cmUnpkRguDStaInd
2279 PUBLIC S16 cmUnpkRguDStaInd(func, pst, mBuf)
2286 RguDStaIndInfo *staInd;
2288 TRC3(cmUnpkRguDStaInd)
2290 if (SUnpkS16(&suId, mBuf) != ROK) {
2291 #if (ERRCLASS & ERRCLS_ADD_RES)
2292 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2293 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2294 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
2299 if (pst->selector == RGU_SEL_LWLC)
2301 CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf);
2305 if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguDStaIndInfo))) != ROK) {
2306 #if (ERRCLASS & ERRCLS_ADD_RES)
2307 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2308 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2309 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
2314 if (cmUnpkRguDStaIndInfo(staInd, mBuf) != ROK) {
2315 #if (ERRCLASS & ERRCLS_ADD_RES)
2316 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2317 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2318 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
2321 SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo));
2326 RETVALUE((*func)(pst, suId, staInd));
2330 PUBLIC S16 cmPkRguLcFlowCntrlInfo
2332 RguLcFlowCntrlInfo *param,
2336 PUBLIC S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
2337 RguLcFlowCntrlInfo *param;
2341 TRC3(cmPkRguLcFlowCntrlInfo);
2342 CMCHKPK(SPkU32, param->maxBo4FlowCtrl, mBuf);
2343 CMCHKPK(SPkU32, param->pktAdmitCnt, mBuf);
2344 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2350 PUBLIC S16 cmPkRguUeFlowCntrlInfo
2352 RguUeFlowCntrlInfo *param,
2356 PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
2357 RguUeFlowCntrlInfo *param;
2363 TRC3(cmPkRguUeFlowCntrlInfo);
2365 for(idx=(param->numLcs - 1); idx >= 0; idx--)
2367 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
2369 CMCHKPK(SPkU32, param->numLcs, mBuf);
2370 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
2375 PUBLIC S16 cmPkRguFlowCntrlInfo
2377 RguFlowCntrlInd *param,
2381 PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
2382 RguFlowCntrlInd *param;
2388 TRC3(cmPkRguFlowCntrlInfo);
2390 for (idx=(param->numUes - 1); idx >= 0; idx--)
2392 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
2394 CMCHKPK(SPkU32, param->numUes, mBuf);
2395 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2400 * @brief Flow Cntrl Indication from MAC to RLC
2401 * Informs RLC of the LCs on which flow control
2406 * Function : cmPkRguFlowCntrlInd
2408 * @param[in] Pst* pst
2409 * @param[in] SuId suId
2410 * @param[in] RguFlowCntrlInd *staInd
2415 PUBLIC S16 cmPkRguFlowCntrlInd
2419 RguFlowCntrlInd *flowCntrlInd
2422 PUBLIC S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
2425 RguFlowCntrlInd *flowCntrlInd;
2428 Buffer *mBuf = NULLP;
2430 TRC3(cmPkRguFlowCntrlInd);
2431 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2432 #if (ERRCLASS & ERRCLS_ADD_RES)
2433 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2434 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2435 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
2439 if (pst->selector == RGU_SEL_LWLC)
2441 CMCHKPK(cmPkPtr,(PTR) flowCntrlInd, mBuf);
2445 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
2446 #if (ERRCLASS & ERRCLS_ADD_RES)
2447 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2448 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2449 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
2455 if (SPkS16(suId, mBuf) != ROK) {
2456 #if (ERRCLASS & ERRCLS_ADD_RES)
2457 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2458 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2459 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
2465 pst->event = (Event) EVTRGUFLOWCNTRLIND;
2466 RETVALUE(SPstTsk(pst,mBuf));
2470 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo
2472 RguLcFlowCntrlInfo *param,
2476 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
2477 RguLcFlowCntrlInfo *param;
2481 TRC3(cmUnpkRguLcFlowCntrlInfo);
2483 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2484 CMCHKUNPK(SUnpkU32, ¶m->pktAdmitCnt, mBuf);
2485 CMCHKUNPK(SUnpkU32, ¶m->maxBo4FlowCtrl, mBuf);
2490 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo
2492 RguUeFlowCntrlInfo *param,
2496 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
2497 RguUeFlowCntrlInfo *param;
2502 TRC3(cmUnpkRguUeFlowCntrlInfo);
2503 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
2504 CMCHKUNPK(SUnpkU32, ¶m->numLcs, mBuf);
2505 for(idx=0; idx < param->numLcs; idx++)
2507 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
2513 PUBLIC S16 cmUnpkRguFlowCntrlInfo
2515 RguFlowCntrlInd *param,
2519 PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
2520 RguFlowCntrlInd *param;
2526 TRC3(cmUnpkRguFlowCntrlInfo);
2528 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2529 CMCHKUNPK(SUnpkU32, ¶m->numUes, mBuf);
2530 for (idx=0; idx < param->numUes; idx++)
2532 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
2538 * @brief Flow control indication from MAC to RLC
2539 * Informs RLC of the LCs on which flow control to
2544 * Function : cmUnpkRguFlowCntrlInd
2546 * @param[in] RguFlowCntrlInd func
2547 * @param[in] Pst *pst
2548 * @param[in] Buffer *mBuf
2553 PUBLIC S16 cmUnpkRguFlowCntrlInd
2555 RguFlowCntrlIndInfo func,
2560 PUBLIC S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
2561 RguFlowCntrlIndInfo func;
2567 RguFlowCntrlInd *flowCntrlInd;
2569 TRC3(cmUnpkRguFlowCntrlInd)
2571 if (SUnpkS16(&suId, mBuf) != ROK) {
2572 #if (ERRCLASS & ERRCLS_ADD_RES)
2573 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2574 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2575 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
2580 if (pst->selector == RGU_SEL_LWLC)
2582 CMCHKUNPK(cmUnpkPtr,(PTR *) &flowCntrlInd, mBuf);
2586 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
2587 #if (ERRCLASS & ERRCLS_ADD_RES)
2588 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2589 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2590 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
2595 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
2596 #if (ERRCLASS & ERRCLS_ADD_RES)
2597 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2598 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2599 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
2602 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
2607 RETVALUE((*func)(pst, suId, flowCntrlInd));
2610 /***********************************************************
2612 * Func : cmPkRguPduInfo
2616 * PDU information given on a logical channel
2625 **********************************************************/
2627 PUBLIC S16 cmPkRguPduInfo
2633 PUBLIC S16 cmPkRguPduInfo(param, mBuf)
2640 TRC3(cmPkRguPduInfo);
2642 for (i=param->numPdu-1; i >= 0; i--) {
2643 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
2645 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
2647 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
2649 SPutMsg(param->mBuf[i]);
2650 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2652 CMCHKPK(SPkU8, param->numPdu, mBuf);
2658 /***********************************************************
2660 * Func : cmUnpkRguPduInfo
2664 * PDU information given on a logical channel
2673 **********************************************************/
2675 PUBLIC S16 cmUnpkRguPduInfo
2681 PUBLIC S16 cmUnpkRguPduInfo(param, mBuf)
2688 TRC3(cmUnpkRguPduInfo);
2690 CMCHKUNPK(SUnpkU8, ¶m->numPdu, mBuf);
2691 for (i=0; i<param->numPdu; i++) {
2692 MsgLen msgLen, totalMsgLen;
2693 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2694 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2696 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
2704 /***********************************************************
2706 * Func : cmPkRguDBoReport
2709 * Desc : RguDBoReport
2710 * Buffer Occupancy Report for dedicated logical channel
2719 **********************************************************/
2721 PUBLIC S16 cmPkRguDBoReport
2723 RguDBoReport *param,
2727 PUBLIC S16 cmPkRguDBoReport(param, mBuf)
2728 RguDBoReport *param;
2733 TRC3(cmPkRguDBoReport);
2735 CMCHKPK(SPkU32, param->oldestSduArrTime, mBuf);
2736 CMCHKPK(SPkU32, param->staPduBo, mBuf);
2738 CMCHKPK(SPkU8, param->staPduPrsnt, mBuf);
2739 CMCHKPK(SPkU16, param->estRlcHdrSz, mBuf);
2741 CMCHKPK(SPkS32, param->bo, mBuf);
2747 /***********************************************************
2749 * Func : cmUnpkRguDBoReport
2752 * Desc : RguDBoReport
2753 * Buffer Occupancy Report for dedicated logical channel
2762 **********************************************************/
2764 PUBLIC S16 cmUnpkRguDBoReport
2766 RguDBoReport *param,
2770 PUBLIC S16 cmUnpkRguDBoReport(param, mBuf)
2771 RguDBoReport *param;
2776 TRC3(cmUnpkRguDBoReport);
2778 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2780 CMCHKUNPK(SUnpkU16, ¶m->estRlcHdrSz, mBuf);
2781 CMCHKUNPK(SUnpkU8, ¶m->staPduPrsnt, mBuf);
2784 CMCHKUNPK(SUnpkU32, ¶m->staPduBo, mBuf);
2785 CMCHKUNPK(SUnpkU32, ¶m->oldestSduArrTime, mBuf);
2790 /***********************************************************
2792 * Func : cmPkRguCDatReqInfo
2795 * Desc : RguCDatReqInfo
2796 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2805 **********************************************************/
2807 PUBLIC S16 cmPkRguCDatReqInfo
2809 RguCDatReqInfo *param,
2813 PUBLIC S16 cmPkRguCDatReqInfo(param, mBuf)
2814 RguCDatReqInfo *param;
2820 TRC3(cmPkRguCDatReqInfo);
2822 if (param->pdu != NULLP)
2824 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2826 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2828 SPutMsg(param->pdu);
2829 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2831 switch(param->lcType) {
2832 case CM_LTE_LCH_CCCH:
2833 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2835 case CM_LTE_LCH_BCCH:
2836 case CM_LTE_LCH_PCCH:
2837 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2839 CMCHKPK(SPkU8,param->pnb,mBuf);
2845 CMCHKPK(SPkU32, param->transId, mBuf);
2846 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2847 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2848 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2854 /***********************************************************
2856 * Func : cmUnpkRguCDatReqInfo
2859 * Desc : RguCDatReqInfo
2860 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2869 **********************************************************/
2871 PUBLIC S16 cmUnpkRguCDatReqInfo
2873 RguCDatReqInfo *param,
2877 PUBLIC S16 cmUnpkRguCDatReqInfo(param, mBuf)
2878 RguCDatReqInfo *param;
2882 MsgLen msgLen, totalMsgLen;
2884 TRC3(cmUnpkRguCDatReqInfo);
2886 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2887 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2888 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2889 CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf);
2890 switch(param->lcType) {
2891 case CM_LTE_LCH_BCCH:
2892 case CM_LTE_LCH_PCCH:
2894 CMCHKUNPK(SUnpkU8,¶m->pnb, mBuf);
2896 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2898 case CM_LTE_LCH_CCCH:
2899 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2904 SFndLenMsg(mBuf, &msgLen);
2907 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2908 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2910 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2918 /***********************************************************
2920 * Func : cmPkRguLchDatReq
2923 * Desc : RguLchDatReq
2924 * DatReq Information of a logical channel
2933 **********************************************************/
2935 PUBLIC S16 cmPkRguLchDatReq
2937 RguLchDatReq *param,
2941 PUBLIC S16 cmPkRguLchDatReq(param, mBuf)
2942 RguLchDatReq *param;
2947 TRC3(cmPkRguLchDatReq);
2950 CMCHKPK(SPkU8, param->freeBuff, mBuf);
2952 CMCHKPK(SPkU8, param->setMaxUlPrio, mBuf);
2953 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2954 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
2955 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2961 /***********************************************************
2963 * Func : cmUnpkRguLchDatReq
2966 * Desc : RguLchDatReq
2967 * DatReq Information of a logical channel
2976 **********************************************************/
2978 PUBLIC S16 cmUnpkRguLchDatReq
2980 RguLchDatReq *param,
2984 PUBLIC S16 cmUnpkRguLchDatReq(param, mBuf)
2985 RguLchDatReq *param;
2990 TRC3(cmUnpkRguLchDatReq);
2992 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2993 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
2994 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2995 CMCHKUNPK(SUnpkU8, ¶m->setMaxUlPrio, mBuf);
2997 CMCHKUNPK(SUnpkU8, ¶m->freeBuff, mBuf);
3003 /***********************************************************
3005 * Func : cmPkRguDatReqTb
3008 * Desc : RguDatReqTb
3009 * DatReq from RLC to MAC for dedicated channels of a UE
3018 **********************************************************/
3020 PUBLIC S16 cmPkRguDatReqTb
3026 PUBLIC S16 cmPkRguDatReqTb(param, mBuf)
3033 TRC3(cmPkRguDatReqTb);
3034 /*rgu_c_001.main_5 - ADD - L2M Support */
3036 CMCHKPK(SPkU32, param->tbId, mBuf);
3038 for (i=param->nmbLch-1; i >= 0; i--) {
3039 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
3041 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3047 /***********************************************************
3049 * Func : cmUnpkRguDatReqTb
3052 * Desc : RguDatReqTb
3053 * DatReq from RLC to MAC for dedicated channels of a UE
3062 **********************************************************/
3065 PUBLIC S16 cmUnpkRguDatReqTb
3072 PUBLIC S16 cmUnpkRguDatReqTb(pst, param, mBuf)
3079 PUBLIC S16 cmUnpkRguDatReqTb
3085 PUBLIC S16 cmUnpkRguDatReqTb(param, mBuf)
3093 TRC3(cmUnpkRguDatReqTb);
3095 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3096 for (i=0; i<param->nmbLch; i++) {
3097 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
3099 /*rgu_c_001.main_5 - ADD - L2M Support */
3101 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
3107 /***********************************************************
3109 * Func : cmPkRguDDatReqInfo
3112 * Desc : RguDDatReqInfo
3113 * DatReq from RLC to MAC for dedicated channels of a UE
3122 **********************************************************/
3123 /*rgu_c_001.main_5 - ADD - L2M Support */
3126 PUBLIC S16 cmPkRguDDatReqInfo
3129 RguDDatReqInfo *param,
3133 PUBLIC S16 cmPkRguDDatReqInfo(pst, param, mBuf)
3135 RguDDatReqInfo *param;
3140 PUBLIC S16 cmPkRguDDatReqInfo
3142 RguDDatReqInfo *param,
3146 PUBLIC S16 cmPkRguDDatReqInfo(param, mBuf)
3147 RguDDatReqInfo *param;
3155 TRC3(cmPkRguDDatReqInfo);
3157 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
3159 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
3160 for (i=RGU_MAX_TB-1; i >= 0; i--)
3162 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
3164 CMCHKPK(SPkU8, datReq->nmbOfTbs, mBuf);
3165 CMCHKPK(SPkU32, datReq->transId, mBuf);
3166 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
3168 CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf);
3169 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3175 /***********************************************************
3177 * Func : cmUnpkRguDDatReqInfo
3180 * Desc : RguDDatReqInfo
3181 * DatReq from RLC to MAC for dedicated channels of a UE
3190 **********************************************************/
3193 PUBLIC S16 cmUnpkRguDDatReqInfo
3196 RguDDatReqInfo *param,
3200 PUBLIC S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
3202 RguDDatReqInfo *param;
3207 PUBLIC S16 cmUnpkRguDDatReqInfo
3209 RguDDatReqInfo *param,
3213 PUBLIC S16 cmUnpkRguDDatReqInfo(param, mBuf)
3214 RguDDatReqInfo *param;
3220 /* After Merging from 2.1 to 2.2 */
3221 /*rgu_c_001.main_5 - ADD - L2M Support */
3227 TRC3(cmUnpkRguDDatReqInfo);
3229 /* After Merging from 2.1 to 2.2 */
3230 /*rgu_c_001.main_5 - ADD - L2M Support */
3234 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3235 CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf);
3236 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
3238 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
3239 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
3240 CMCHKUNPK(SUnpkU32, &datReq->transId, mBuf);
3241 CMCHKUNPK(SUnpkU8, &datReq->nmbOfTbs, mBuf);
3242 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
3243 for (i=0; i<RGU_MAX_TB; i++)
3245 /*rgu_c_001.main_5 - ADD - L2M Support */
3247 /* After Merging from 2.1 to 2.2 */
3248 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
3254 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
3263 /***********************************************************
3265 * Func : cmPkRguCDatIndInfo
3268 * Desc : RguCDatIndInfo
3269 * DatInd from MAC to RLC on CCCH
3278 **********************************************************/
3280 PUBLIC S16 cmPkRguCDatIndInfo
3282 RguCDatIndInfo *param,
3286 PUBLIC S16 cmPkRguCDatIndInfo(param, mBuf)
3287 RguCDatIndInfo *param;
3293 TRC3(cmPkRguCDatIndInfo);
3295 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
3297 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
3299 SPutMsg(param->pdu);
3300 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
3301 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3302 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3303 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3309 /***********************************************************
3311 * Func : cmUnpkRguCDatIndInfo
3314 * Desc : RguCDatIndInfo
3315 * DatInd from MAC to RLC on CCCH
3324 **********************************************************/
3326 PUBLIC S16 cmUnpkRguCDatIndInfo
3328 RguCDatIndInfo *param,
3332 PUBLIC S16 cmUnpkRguCDatIndInfo(param, mBuf)
3333 RguCDatIndInfo *param;
3337 MsgLen msgLen, totalMsgLen;
3339 TRC3(cmUnpkRguCDatIndInfo);
3341 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3342 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3343 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3344 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
3345 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
3347 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
3354 /***********************************************************
3356 * Func : cmPkRguLchDatInd
3359 * Desc : RguLchDatInd
3360 * DatInd Information for a logical channel
3369 **********************************************************/
3371 PUBLIC S16 cmPkRguLchDatInd
3373 RguLchDatInd *param,
3377 PUBLIC S16 cmPkRguLchDatInd(param, mBuf)
3378 RguLchDatInd *param;
3382 TRC3(cmPkRguLchDatInd);
3384 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
3385 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3391 /***********************************************************
3393 * Func : cmUnpkRguLchDatInd
3396 * Desc : RguLchDatInd
3397 * DatInd Information for a logical channel
3406 **********************************************************/
3408 PUBLIC S16 cmUnpkRguLchDatInd
3410 RguLchDatInd *param,
3414 PUBLIC S16 cmUnpkRguLchDatInd(param, mBuf)
3415 RguLchDatInd *param;
3419 TRC3(cmUnpkRguLchDatInd);
3421 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3422 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
3428 /***********************************************************
3430 * Func : cmPkRguDDatIndInfo
3433 * Desc : RguDDatIndInfo
3434 * Data Indication from MAC to RLC for dedicated channels of a UE
3443 **********************************************************/
3445 PUBLIC S16 cmPkRguDDatIndInfo
3447 RguDDatIndInfo *param,
3451 PUBLIC S16 cmPkRguDDatIndInfo(param, mBuf)
3452 RguDDatIndInfo *param;
3458 TRC3(cmPkRguDDatIndInfo);
3461 CMCHKPK(SPkU8, param->burstInd, mBuf);
3462 CMCHKPK(SPkU32, param->ttiCnt, mBuf);
3464 for (i=param->numLch-1; i >= 0; i--) {
3465 CMCHKPK(cmPkRguLchDatInd, ¶m->lchData[i], mBuf);
3467 CMCHKPK(SPkU8, param->numLch, mBuf);
3468 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3469 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3475 /***********************************************************
3477 * Func : cmUnpkRguDDatIndInfo
3480 * Desc : RguDDatIndInfo
3481 * Data Indication from MAC to RLC for dedicated channels of a UE
3490 **********************************************************/
3492 PUBLIC S16 cmUnpkRguDDatIndInfo
3494 RguDDatIndInfo *param,
3498 PUBLIC S16 cmUnpkRguDDatIndInfo(param, mBuf)
3499 RguDDatIndInfo *param;
3505 TRC3(cmUnpkRguDDatIndInfo);
3507 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3508 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3509 CMCHKUNPK(SUnpkU8, ¶m->numLch, mBuf);
3510 for (i=0; i<param->numLch; i++) {
3511 CMCHKUNPK(cmUnpkRguLchDatInd, ¶m->lchData[i], mBuf);
3514 CMCHKUNPK(SUnpkU32, ¶m->ttiCnt, mBuf);
3515 CMCHKUNPK(SUnpkU8, ¶m->burstInd, mBuf);
3521 /***********************************************************
3523 * Func : cmPkRguCStaRspInfo
3526 * Desc : RguCStaRspInfo
3527 * Status Response from RLC to MAC for common logical channel
3536 **********************************************************/
3538 PUBLIC S16 cmPkRguCStaRspInfo
3540 RguCStaRspInfo *param,
3544 PUBLIC S16 cmPkRguCStaRspInfo(param, mBuf)
3545 RguCStaRspInfo *param;
3550 TRC3(cmPkRguCStaRspInfo);
3552 switch(param->lcType) {
3553 case CM_LTE_LCH_CCCH:
3554 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
3556 case CM_LTE_LCH_BCCH:
3557 case CM_LTE_LCH_PCCH:
3558 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
3560 CMCHKPK(SPkU8,param->pnb,mBuf);
3561 CMCHKPK(SPkU8,param->emtcDiReason,mBuf);
3567 CMCHKPK(SPkS32, param->bo, mBuf);
3568 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
3569 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3570 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3576 /***********************************************************
3578 * Func : cmUnpkRguCStaRspInfo
3581 * Desc : RguCStaRspInfo
3582 * Status Response from RLC to MAC for common logical channel
3591 **********************************************************/
3593 PUBLIC S16 cmUnpkRguCStaRspInfo
3595 RguCStaRspInfo *param,
3599 PUBLIC S16 cmUnpkRguCStaRspInfo(param, mBuf)
3600 RguCStaRspInfo *param;
3605 TRC3(cmUnpkRguCStaRspInfo);
3607 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3608 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3609 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
3610 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
3611 switch(param->lcType) {
3612 case CM_LTE_LCH_BCCH:
3613 case CM_LTE_LCH_PCCH:
3615 CMCHKUNPK(SUnpkU8,¶m->emtcDiReason , mBuf);
3616 CMCHKUNPK(SUnpkU8,¶m->pnb , mBuf);
3618 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
3620 case CM_LTE_LCH_CCCH:
3621 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
3631 /***********************************************************
3633 * Func : cmPkRguDStaRspInfo
3636 * Desc : RguDStaRspInfo
3637 * Status Response from RLC to MAC for dedicated logical channel
3646 **********************************************************/
3648 PUBLIC S16 cmPkRguDStaRspInfo
3650 RguDStaRspInfo *param,
3654 PUBLIC S16 cmPkRguDStaRspInfo(param, mBuf)
3655 RguDStaRspInfo *param;
3660 TRC3(cmPkRguDStaRspInfo);
3662 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
3663 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3664 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3665 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3671 /***********************************************************
3673 * Func : cmUnpkRguDStaRspInfo
3676 * Desc : RguDStaRspInfo
3677 * Status Response from RLC to MAC for dedicated logical channel
3686 **********************************************************/
3688 PUBLIC S16 cmUnpkRguDStaRspInfo
3690 RguDStaRspInfo *param,
3694 PUBLIC S16 cmUnpkRguDStaRspInfo(param, mBuf)
3695 RguDStaRspInfo *param;
3700 TRC3(cmUnpkRguDStaRspInfo);
3702 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3703 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3704 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3705 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
3711 /***********************************************************
3713 * Func : cmPkRguCStaIndInfo
3716 * Desc : RguCStaIndInfo
3717 * Status Indication from MAC to RLC for common logical channel
3726 **********************************************************/
3728 PUBLIC S16 cmPkRguCStaIndInfo
3730 RguCStaIndInfo *param,
3734 PUBLIC S16 cmPkRguCStaIndInfo(param, mBuf)
3735 RguCStaIndInfo *param;
3740 TRC3(cmPkRguCStaIndInfo);
3742 CMCHKPK(cmPkLteTimingInfo, ¶m->pagingTimingInfo, mBuf);
3743 CMCHKPK(SPkU8, param->isEmtcPaging, mBuf);
3745 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3746 CMCHKPK(SPkU32, param->transId, mBuf);
3747 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3748 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3754 /***********************************************************
3756 * Func : cmUnpkRguCStaIndInfo
3759 * Desc : RguCStaIndInfo
3760 * Status Indication from MAC to RLC for common logical channel
3769 **********************************************************/
3771 PUBLIC S16 cmUnpkRguCStaIndInfo
3773 RguCStaIndInfo *param,
3777 PUBLIC S16 cmUnpkRguCStaIndInfo(param, mBuf)
3778 RguCStaIndInfo *param;
3783 TRC3(cmUnpkRguCStaIndInfo);
3785 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3786 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3787 CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf);
3788 /*TODO:Mukesh: Need to check why rnti unpacking is missing*/
3790 CMCHKUNPK(SUnpkU8, ¶m->isEmtcPaging, mBuf);
3791 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->pagingTimingInfo, mBuf);
3798 /***********************************************************
3800 * Func : cmPkRguLchStaInd
3803 * Desc : RguLchStaInd
3804 * StaInd info for each logical channel of a UE
3813 **********************************************************/
3815 PUBLIC S16 cmPkRguLchStaInd
3817 RguLchStaInd *param,
3821 PUBLIC S16 cmPkRguLchStaInd(param, mBuf)
3822 RguLchStaInd *param;
3827 TRC3(cmPkRguLchStaInd);
3829 CMCHKPK(SPkS16, param->totBufSize, mBuf);
3830 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
3836 /***********************************************************
3838 * Func : cmUnpkRguLchStaInd
3841 * Desc : RguLchStaInd
3842 * StaInd info for each logical channel of a UE
3851 **********************************************************/
3853 PUBLIC S16 cmUnpkRguLchStaInd
3855 RguLchStaInd *param,
3859 PUBLIC S16 cmUnpkRguLchStaInd(param, mBuf)
3860 RguLchStaInd *param;
3865 TRC3(cmUnpkRguLchStaInd);
3867 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
3868 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
3873 /***********************************************************
3875 * Func : cmPkRguStaIndTb
3878 * Desc : RguStaIndTb
3879 * StaInd from RLC to MAC for dedicated channels of a UE
3888 **********************************************************/
3890 PUBLIC S16 cmPkRguStaIndTb
3896 PUBLIC S16 cmPkRguStaIndTb(param, mBuf)
3903 TRC3(cmPkRguStaIndTb);
3906 CMCHKPK(SPkU16, param->status, mBuf);
3907 CMCHKPK(SPkU32, param->tbId, mBuf);
3909 for (i=param->nmbLch-1; i >= 0; i--) {
3910 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3912 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3918 /***********************************************************
3920 * Func : cmUnpkRguStaIndTb
3923 * Desc : RguStaIndTb
3924 * StaInd from RLC to MAC for dedicated channels of a UE
3933 **********************************************************/
3935 PUBLIC S16 cmUnpkRguStaIndTb
3941 PUBLIC S16 cmUnpkRguStaIndTb(param, mBuf)
3948 TRC3(cmUnpkRguStaIndTb);
3950 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3951 for (i=0; i<param->nmbLch; i++) {
3952 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3955 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
3956 CMCHKUNPK(SUnpkU16, ¶m->status, mBuf);
3962 /***********************************************************
3964 * Func : cmPkRguDStaIndInfo
3967 * Desc : RguDStaIndInfo
3968 * StaInd from MAC to RLC for dedicated logical channels of a UE
3977 **********************************************************/
3979 PUBLIC S16 cmPkRguDStaIndInfo
3981 RguDStaIndInfo *param,
3985 PUBLIC S16 cmPkRguDStaIndInfo(param, mBuf)
3986 RguDStaIndInfo *param;
3993 TRC3(cmPkRguDStaIndInfo);
3995 for(idx = (param->nmbOfUeGrantPerTti - 1); idx >= 0 ; idx--)
3997 RguDStaIndPerUe *staInd = ¶m->staInd[idx];
3998 CMCHKPK(SPkU8, staInd->fillCtrlPdu, mBuf);
3999 for (i=staInd->nmbOfTbs-1; i >= 0; i--) {
4000 CMCHKPK(cmPkRguStaIndTb, &staInd->staIndTb[i], mBuf);
4002 CMCHKPK(SPkU8, staInd->nmbOfTbs, mBuf);
4003 CMCHKPK(SPkU32,staInd->transId, mBuf);
4004 CMCHKPK(cmPkLteRnti, staInd->rnti, mBuf);
4006 CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf);
4007 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
4013 /***********************************************************
4015 * Func : cmUnpkRguDStaIndInfo
4018 * Desc : RguDStaIndInfo
4019 * StaInd from MAC to RLC for dedicated logical channels of a UE
4028 **********************************************************/
4030 PUBLIC S16 cmUnpkRguDStaIndInfo
4032 RguDStaIndInfo *param,
4036 PUBLIC S16 cmUnpkRguDStaIndInfo(param, mBuf)
4037 RguDStaIndInfo *param;
4044 TRC3(cmUnpkRguDStaIndInfo);
4046 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
4047 CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf);
4048 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
4050 RguDStaIndPerUe *staInd = ¶m->staInd[idx];
4051 CMCHKUNPK(cmUnpkLteRnti, &staInd->rnti, mBuf);
4052 CMCHKUNPK(SUnpkU32, &staInd->transId, mBuf);
4053 CMCHKUNPK(SUnpkU8, &staInd->nmbOfTbs, mBuf);
4054 for (i=0; i<staInd->nmbOfTbs; i++)
4056 CMCHKUNPK(cmUnpkRguStaIndTb, &staInd->staIndTb[i], mBuf);
4058 CMCHKUNPK(SUnpkU8, &staInd->fillCtrlPdu, mBuf);
4065 /**********************************************************************
4067 **********************************************************************/