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
419 * dedicated channel for transmission
423 * Function : packDlData
425 * @param[in] Pst* pst
426 * @param[in] SpId spId
427 * @param[in] RguDDatReqInfo * datReq
431 PUBLIC uint16_t packDlData
438 Buffer *mBuf = NULLP;
441 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
442 #if (ERRCLASS & ERRCLS_ADD_RES)
443 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
444 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
445 (ErrVal)ERGU022, (ErrVal)0, "Packing failed");
447 SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData));
451 if (pst->selector == RGU_SEL_LWLC)
453 CMCHKPK(cmPkPtr,(PTR) dlData, mBuf);
457 /*rgu_c_001.main_5 - ADD - L2M Support */
459 if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK)
461 if (packRlcMacDataInfo(dlData, 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)ERGU023, (ErrVal)0, "Packing failed");
469 SPutSBuf(pst->region, pst->pool, (Data *)dlData,
475 if (SPutSBuf(pst->region, pst->pool,
476 (Data *)dlData, sizeof(RlcMacData)) != ROK) {
477 #if (ERRCLASS & ERRCLS_ADD_RES)
478 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
479 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
480 (ErrVal)ERGU025, (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)ERGU024, (ErrVal)0, "Packing failed");
493 if (dlData != NULLP);
495 SPutSBuf(pst->region, pst->pool,
496 (Data *)dlData, sizeof(RlcMacData));
501 pst->event = (Event) EVTRLCDLDAT;
502 RETVALUE(SPstTsk(pst,mBuf));
507 * @brief Request from RLC to MAC for forwarding SDUs on
508 * dedicated channel for transmission
512 * Function : unpackDlData
514 * @param[in] Pst* pst
515 * @param[in] SpId spId
516 * @param[in] RguDDatReqInfo * datReq
520 PUBLIC S16 unpackDlData
532 if (SUnpkS16(&spId, mBuf) != ROK) {
537 if (pst->selector == RGU_SEL_LWLC)
539 CMCHKUNPK(cmUnpkPtr,(PTR *) &dlData, mBuf);
543 if ((SGetSBuf(pst->region, pst->pool,
544 (Data **)&dlData, sizeof(RlcMacData))) != ROK) {
545 #if (ERRCLASS & ERRCLS_ADD_RES)
546 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
547 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
548 (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed");
553 cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData));
554 /*rgu_c_001.main_5 - ADD - L2M Support */
556 if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK)
558 if (unpackRlcMacDataInfo(dlData, mBuf) != ROK)
561 #if (ERRCLASS & ERRCLS_ADD_RES)
562 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
563 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
564 (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed");
567 SPutSBuf(pst->region, pst->pool, (Data *)dlData,
574 /* TODO : change function call to send RlcMacData as below: */
575 RETVALUE((*func)(pst, spId, dlData));
577 //RETVALUE((*func)(pst, spId, datReq));
582 * @brief Data Indication from MAC to RLC to
583 * forward the data received for dedicated channels
587 * Function : packRcvdUlData
589 * @param[in] Pst* pst
590 * @param[in] SuId suId
591 * @param[in] RlcMacData *ulData
596 PUBLIC S16 packRcvdUlData
603 PUBLIC S16 packRcvdUlData(pst, suId, ulData)
609 Buffer *mBuf = NULLP;
612 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
613 #if (ERRCLASS & ERRCLS_ADD_RES)
614 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
615 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
616 (ErrVal)ERGU035, (ErrVal)0, "Packing failed");
618 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
622 if (pst->selector == RGU_SEL_LWLC)
624 CMCHKPK(cmPkPtr,(PTR)ulData, mBuf);
628 if (packRlcMacDataInfo(ulData, mBuf) != ROK) {
629 #if (ERRCLASS & ERRCLS_ADD_RES)
630 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
631 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
632 (ErrVal)ERGU036, (ErrVal)0, "Packing failed");
634 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
639 if (SPutStaticBuffer(pst->region, pst->pool,
640 (Data *)ulData, sizeof(RlcMacData),0) != ROK) {
641 #if (ERRCLASS & ERRCLS_ADD_RES)
642 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
643 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
644 (ErrVal)ERGU038, (ErrVal)0, "Packing failed");
651 if (SPkS16(suId, mBuf) != ROK) {
652 #if (ERRCLASS & ERRCLS_ADD_RES)
653 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
654 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
655 (ErrVal)ERGU037, (ErrVal)0, "Packing failed");
657 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
662 pst->event = (Event) EVTRLCULDAT;
663 RETVALUE(SPstTsk(pst,mBuf));
668 * @brief Data Indication from MAC to RLC to
669 * forward the data received for dedicated channels
673 * Function : unpackRcvdUlData
675 * @param[in] Pst* pst
676 * @param[in] SuId suId
677 * @param[in] RlcMacData *ulData
681 PUBLIC S16 unpackRcvdUlData
691 TRC3(unpackRcvdUlData)
693 if (SUnpkS16(&suId, mBuf) != ROK) {
694 #if (ERRCLASS & ERRCLS_ADD_RES)
695 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
696 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
697 (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed");
703 if (pst->selector == RGU_SEL_LWLC)
705 CMCHKUNPK(cmUnpkPtr,(PTR *) &ulData, mBuf);
709 if ((SGetStaticBuffer(pst->region, pst->pool,
710 (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) {
711 #if (ERRCLASS & ERRCLS_ADD_RES)
712 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
713 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
714 (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed");
719 if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) {
720 #if (ERRCLASS & ERRCLS_ADD_RES)
721 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
722 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
723 (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed");
726 SPutStaticBuffer(pst->region, pst->pool,
727 (Data *)ulData, sizeof(RlcMacData),0);
732 RETVALUE((*func)(pst, suId, ulData));
736 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
739 /***********************************************************
741 * Func :cmPkRguL2MUlThrpMeasReqInfo
744 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
745 * Scheduled throughput measurement
754 **********************************************************/
756 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo
758 RguL2MUlThrpMeasReqInfo* param,
762 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
763 RguL2MUlThrpMeasReqInfo* param;
768 TRC3(cmPkRguL2MUlThrpMeasReqInfo);
770 CMCHKPK(SPkU8, param->enbMeas, mBuf);
771 for (loop=param->numLcId-1; loop >= 0; loop--)
773 CMCHKPK(SPkU8, param->lcId[loop], mBuf);
775 CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
776 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
777 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
783 /***********************************************************
785 * Func :cmUnpkRguL2MUlThrpMeasReqInfo
788 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
789 * Scheduled throughput measurement
798 **********************************************************/
800 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo
802 RguL2MUlThrpMeasReqInfo *param,
806 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
807 RguL2MUlThrpMeasReqInfo *param;
812 TRC3(cmUnpkRguL2MUlThrpMeasReqInfo);
814 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
815 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
816 CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
817 for (loop=0; loop<param->numLcId; loop++)
819 CMCHKUNPK(SUnpkU8, ¶m->lcId[loop], mBuf);
821 CMCHKUNPK(SUnpkU8, ¶m->enbMeas, mBuf);
826 * @brief Primitive invoked from RLC to MAC to
827 * inform the On/Off status for Scheduled UL throughput
828 * measurment for dedicated channels
832 * Function :cmPkRguL2MUlThrpMeasReq
834 * @param[in] Pst* pst
835 * @param[in] SpId spId
836 * @param[in] RguL2MUlThrpMeasReqInfo* measReq
841 PUBLIC S16 cmPkRguL2MUlThrpMeasReq
845 RguL2MUlThrpMeasReqInfo* measReq
848 PUBLIC S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq)
851 RguL2MUlThrpMeasReqInfo* measReq;
854 Buffer *mBuf = NULLP;
855 TRC3(cmPkRguL2MUlThrpMeasReq)
857 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
858 #if (ERRCLASS & ERRCLS_ADD_RES)
859 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
860 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
861 (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
863 SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
866 if (pst->selector == RGU_SEL_LWLC)
868 CMCHKPK(cmPkPtr,(PTR) measReq, mBuf);
872 if (cmPkRguL2MUlThrpMeasReqInfo(measReq, 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)ERGU050, (ErrVal)0, "Packing failed");
878 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
879 sizeof(RguL2MUlThrpMeasReqInfo));
883 if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
884 sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
885 #if (ERRCLASS & ERRCLS_ADD_RES)
886 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
887 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
888 (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
896 if (SPkS16(spId, mBuf) != ROK) {
897 #if (ERRCLASS & ERRCLS_ADD_RES)
898 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
899 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
900 (ErrVal)ERGU051, (ErrVal)0, "Packing failed");
902 if (measReq != NULLP)
904 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
905 sizeof(RguL2MUlThrpMeasReqInfo));
911 pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
912 RETVALUE(SPstTsk(pst,mBuf));
917 * @brief Primitive invoked from RLC to MAC to
918 * inform the On/Off status for Scheduled UL throughput
919 * measurment for dedicated channels
923 * Function :cmUnpkRguL2MUlThrpMeasReq
925 * @param[in] Pst* pst
926 * @param[in] SpId spId
927 * @param[in] RguL2MUlThrpMeasReqInfo * measReq
932 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq
934 RguL2MUlThrpMeasReq func,
939 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf)
940 RguL2MUlThrpMeasReq func;
946 RguL2MUlThrpMeasReqInfo* measReq;
948 TRC3(cmUnpkRguL2MUlThrpMeasReq)
950 if (SUnpkS16(&spId, mBuf) != ROK) {
951 #if (ERRCLASS & ERRCLS_ADD_RES)
952 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
953 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
954 (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
959 if (pst->selector == RGU_SEL_LWLC)
961 CMCHKUNPK(cmUnpkPtr,(PTR *) &measReq, mBuf);
965 if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
966 sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
967 #if (ERRCLASS & ERRCLS_ADD_RES)
968 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
969 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
970 (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
975 if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
976 #if (ERRCLASS & ERRCLS_ADD_RES)
977 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
978 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
979 (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
982 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
983 sizeof(RguL2MUlThrpMeasReqInfo));
988 RETVALUE((*func)(pst, spId, measReq));
997 * @brief Primitive invoked from RLC to MAC to
998 * inform the BO report for dedicated channels
1002 * Function : packBOStatus,
1004 * @param[in] Pst* pst
1005 * @param[in] SpId spId
1006 * @param[in] RlcMacBOStatus * staRsp
1010 PUBLIC uint16_t packBOStatus
1014 RlcMacBOStatus *boStatus
1017 RlcMacBOStatus *boStaInfo = NULL;
1018 Buffer *mBuf = NULLP;
1020 if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK)
1022 #if (ERRCLASS & ERRCLS_ADD_RES)
1023 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1024 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1025 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
1030 /* boStaInfo cant be NULL here */
1031 if (boStaInfo == NULLP)
1036 cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus));
1037 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1038 #if (ERRCLASS & ERRCLS_ADD_RES)
1039 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1040 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1041 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
1043 SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
1047 if (pst->selector == RGU_SEL_LWLC)
1049 CMCHKPK(cmPkPtr,(PTR) boStaInfo, mBuf);
1053 if (packBOStatusInfo(boStatus, mBuf) != ROK) {
1054 #if (ERRCLASS & ERRCLS_ADD_RES)
1055 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1056 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1057 (ErrVal)ERGU057, (ErrVal)0, "Packing failed");
1063 if (SPkS16(spId, mBuf) != ROK) {
1064 #if (ERRCLASS & ERRCLS_ADD_RES)
1065 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1066 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1067 (ErrVal)ERGU058, (ErrVal)0, "Packing failed");
1069 if (boStaInfo != NULLP)
1071 SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
1077 pst->event = (Event)EVTRLCBOSTA;
1078 RETVALUE(SPstTsk(pst,mBuf));
1084 * @brief Primitive invoked from RLC to MAC to
1085 * inform the BO report for dedicated channels
1089 * Function : unpackBOStatus
1091 * @param[in] Pst* pst
1092 * @param[in] SpId spId
1093 * @param[in] RlcMacBOStatus * staRsp
1097 PUBLIC uint16_t unpackBOStatus
1099 RlcMacBoStatus func,
1105 RlcMacBOStatus *boSta;
1107 TRC3(unpackBOStatus)
1109 if (SUnpkS16(&spId, mBuf) != ROK) {
1110 #if (ERRCLASS & ERRCLS_ADD_RES)
1111 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1112 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1113 (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed");
1119 if (pst->selector == RGU_SEL_LWLC)
1121 CMCHKUNPK(cmUnpkPtr,(PTR *) &boSta, mBuf);
1125 if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta,
1126 sizeof(RlcMacBOStatus))) != ROK) {
1127 #if (ERRCLASS & ERRCLS_ADD_RES)
1128 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1129 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1130 (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed");
1135 if (unpackBOStatusInfo(boSta, mBuf) != ROK) {
1136 #if (ERRCLASS & ERRCLS_ADD_RES)
1137 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1138 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1139 (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed");
1142 SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
1147 // (*func)(pst, spId, boSta);
1148 SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
1153 /*rgu_c_001.main_5 - ADD - L2M Support */
1157 * @brief Harq Status Indication from MAC to RLC
1161 * Function : cmPkRguHqStaInd
1163 * @param[in] Pst* pst
1164 * @param[in] SuId suId
1165 * @param[in] RguHarqStatusInd *harqStatusInd
1170 PUBLIC S16 cmPkRguHqStaInd
1174 RguHarqStatusInd *harqStatusInd
1177 PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
1180 RguHarqStatusInd *harqStatusInd;
1186 RguHarqStatusInd *harqStaInd = NULL;
1188 TRC3(cmPkRguHqStaInd)
1189 #ifdef XEON_SPECIFIC_CHANGES
1190 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
1192 if ((SGetStaticBuffer(pst->region, pst->pool,
1193 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1196 #if (ERRCLASS & ERRCLS_ADD_RES)
1197 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1198 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1199 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1204 cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
1206 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1207 #if (ERRCLASS & ERRCLS_ADD_RES)
1208 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1209 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1210 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1212 #ifdef XEON_SPECIFIC_CHANGES
1213 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
1215 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1220 if (pst->selector == RGU_SEL_LWLC)
1222 CMCHKPK(cmPkPtr,(PTR) harqStaInd, mBuf);
1226 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1228 CMCHKPK(SPkU16, harqStaInd->status[idx], mBuf);
1230 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1232 CMCHKPK(SPkU32, harqStaInd->tbId[idx], mBuf);
1234 CMCHKPK(SPkU8, harqStaInd->numTbs, mBuf);
1235 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
1236 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
1238 if (SPkS16(suId, mBuf) != ROK) {
1239 #if (ERRCLASS & ERRCLS_ADD_RES)
1240 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1241 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1242 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
1244 #ifdef XEON_SPECIFIC_CHANGES
1245 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1246 sizeof(RguHarqStatusInd));
1248 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1253 #ifdef XEON_SPECIFIC_CHANGES
1254 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1255 sizeof(RguHarqStatusInd)) != ROK) {
1257 if (pst->selector != RGU_SEL_LWLC)
1259 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
1260 sizeof(RguHarqStatusInd), 0) != ROK)
1263 #if (ERRCLASS & ERRCLS_ADD_RES)
1264 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1265 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1266 (ErrVal)ERGU072, (ErrVal)0, "Packing failed");
1271 #ifndef XEON_SPECIFIC_CHANGES
1275 pst->event = (Event) EVTRGUHQSTAIND;
1276 RETVALUE(SPstTsk(pst,mBuf));
1281 * @brief Harq Status Indication from MAC to RLC
1285 * Function : cmUnpkRguHqStaInd
1287 * @param[in] RguHqStaInd func
1288 * @param[in] Pst *pst
1289 * @param[in] Buffer *mBuf
1294 PUBLIC S16 cmUnpkRguHqStaInd
1301 PUBLIC S16 cmUnpkRguHqStaInd(func, pst, mBuf)
1307 RguHarqStatusInd *hqStaInd;
1311 TRC3(cmUnpkRguHqStaInd)
1313 if (SUnpkS16(&suId, mBuf) != ROK) {
1314 #if (ERRCLASS & ERRCLS_ADD_RES)
1315 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1316 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1317 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
1322 #ifdef XEON_SPECIFIC_CHANGES
1323 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
1324 sizeof(RguHarqStatusInd))) != ROK) {
1326 if (pst->selector == RGU_SEL_LWLC)
1328 CMCHKUNPK(cmUnpkPtr,(PTR *) &hqStaInd, mBuf);
1332 if ((SGetStaticBuffer(pst->region, pst->pool,
1333 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1336 #if (ERRCLASS & ERRCLS_ADD_RES)
1337 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1338 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1339 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
1344 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
1345 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
1346 CMCHKUNPK(SUnpkU8, &hqStaInd->numTbs, mBuf);
1347 for(idx = hqStaInd->numTbs; idx > 0; idx--)
1349 CMCHKUNPK(SUnpkU32, &hqStaInd->tbId[idx - 1], mBuf);
1351 for(idx = hqStaInd->numTbs; idx > 0; idx--)
1353 CMCHKUNPK(SUnpkU16, &hqStaInd->status[idx - 1], mBuf);
1355 #ifndef XEON_SPECIFIC_CHANGES
1359 (*func)(pst, suId, hqStaInd);
1360 #ifdef XEON_SPECIFIC_CHANGES
1361 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
1363 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
1367 #endif /* LTE_L2_MEAS */
1371 * @brief Status Indication from MAC to RLC
1372 * as a response to the staRsp primitive from RLC.
1373 * Informs RLC of the totalBufferSize and Timing Info
1374 * for the transmission on dedicated channels.
1378 * Function : packSchedRep
1380 * @param[in] Pst* pst
1381 * @param[in] SuId suId
1382 * @param[in] RlcMacSchedRep* schRep
1386 PUBLIC S16 packSchedRep
1390 RlcMacSchedRepInfo * schRep
1393 Buffer *mBuf = NULLP;
1396 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1397 #if (ERRCLASS & ERRCLS_ADD_RES)
1398 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1399 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1400 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
1402 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1405 if (pst->selector == RGU_SEL_LWLC)
1407 CMCHKPK(cmPkPtr,(PTR) schRep, mBuf);
1411 if (packSchedRepInfo(schRep, mBuf) != ROK) {
1412 #if (ERRCLASS & ERRCLS_ADD_RES)
1413 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1414 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1415 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
1417 SPutSBuf(pst->region, pst->pool, (Data *)schRep,
1418 sizeof(RlcMacSchedRepInfo));
1422 if (SPutSBuf(pst->region, pst->pool, (Data *)schRep,
1423 sizeof(RlcMacSchedRepInfo)) != ROK) {
1424 #if (ERRCLASS & ERRCLS_ADD_RES)
1425 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1426 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1427 (ErrVal)ERGU079, (ErrVal)0, "Packing failed");
1434 if (SPkS16(suId, mBuf) != ROK) {
1435 #if (ERRCLASS & ERRCLS_ADD_RES)
1436 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1437 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1438 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1440 if (schRep != NULLP)
1442 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1448 pst->event = (Event) EVTSCHREP;
1449 RETVALUE(SPstTsk(pst,mBuf));
1454 * @brief Status Indication from MAC to RLC
1455 * as a response to the staRsp primitive from RLC.
1456 * Informs RLC of the totalBufferSize and Timing Info
1457 * for the transmission on dedicated channels.
1461 * Function : unpackSchedRep
1463 * @param[in] Pst* pst
1464 * @param[in] SuId suId
1465 * @param[in] RguDStaIndInfo * staInd
1469 PUBLIC S16 unpackSchedRep
1471 RlcMacSchedRep func,
1477 RlcMacSchedRepInfo *schRep;
1479 TRC3(unpackSchedRep)
1481 if (SUnpkS16(&suId, mBuf) != ROK) {
1482 #if (ERRCLASS & ERRCLS_ADD_RES)
1483 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1484 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1485 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1490 if (pst->selector == RGU_SEL_LWLC)
1492 CMCHKUNPK(cmUnpkPtr,(PTR *) &schRep, mBuf);
1496 if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) {
1497 #if (ERRCLASS & ERRCLS_ADD_RES)
1498 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1499 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1500 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1505 if (unpackSchedRepInfo(schRep, mBuf) != ROK) {
1506 #if (ERRCLASS & ERRCLS_ADD_RES)
1507 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1508 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1509 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1512 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1517 RETVALUE((*func)(pst, suId, schRep));
1521 PUBLIC S16 cmPkRguLcFlowCntrlInfo
1523 RguLcFlowCntrlInfo *param,
1527 PUBLIC S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
1528 RguLcFlowCntrlInfo *param;
1532 TRC3(cmPkRguLcFlowCntrlInfo);
1533 CMCHKPK(SPkU32, param->maxBo4FlowCtrl, mBuf);
1534 CMCHKPK(SPkU32, param->pktAdmitCnt, mBuf);
1535 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1541 PUBLIC S16 cmPkRguUeFlowCntrlInfo
1543 RguUeFlowCntrlInfo *param,
1547 PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
1548 RguUeFlowCntrlInfo *param;
1554 TRC3(cmPkRguUeFlowCntrlInfo);
1556 for(idx=(param->numLcs - 1); idx >= 0; idx--)
1558 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1560 CMCHKPK(SPkU32, param->numLcs, mBuf);
1561 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
1566 PUBLIC S16 cmPkRguFlowCntrlInfo
1568 RguFlowCntrlInd *param,
1572 PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
1573 RguFlowCntrlInd *param;
1579 TRC3(cmPkRguFlowCntrlInfo);
1581 for (idx=(param->numUes - 1); idx >= 0; idx--)
1583 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1585 CMCHKPK(SPkU32, param->numUes, mBuf);
1586 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1591 * @brief Flow Cntrl Indication from MAC to RLC
1592 * Informs RLC of the LCs on which flow control
1597 * Function : cmPkRguFlowCntrlInd
1599 * @param[in] Pst* pst
1600 * @param[in] SuId suId
1601 * @param[in] RguFlowCntrlInd *staInd
1606 PUBLIC S16 cmPkRguFlowCntrlInd
1610 RguFlowCntrlInd *flowCntrlInd
1613 PUBLIC S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
1616 RguFlowCntrlInd *flowCntrlInd;
1619 Buffer *mBuf = NULLP;
1621 TRC3(cmPkRguFlowCntrlInd);
1622 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1623 #if (ERRCLASS & ERRCLS_ADD_RES)
1624 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1625 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1626 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
1630 if (pst->selector == RGU_SEL_LWLC)
1632 CMCHKPK(cmPkPtr,(PTR) flowCntrlInd, mBuf);
1636 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1637 #if (ERRCLASS & ERRCLS_ADD_RES)
1638 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1639 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1640 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
1646 if (SPkS16(suId, mBuf) != ROK) {
1647 #if (ERRCLASS & ERRCLS_ADD_RES)
1648 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1649 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1650 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1656 pst->event = (Event) EVTRGUFLOWCNTRLIND;
1657 RETVALUE(SPstTsk(pst,mBuf));
1661 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo
1663 RguLcFlowCntrlInfo *param,
1667 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
1668 RguLcFlowCntrlInfo *param;
1672 TRC3(cmUnpkRguLcFlowCntrlInfo);
1674 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1675 CMCHKUNPK(SUnpkU32, ¶m->pktAdmitCnt, mBuf);
1676 CMCHKUNPK(SUnpkU32, ¶m->maxBo4FlowCtrl, mBuf);
1681 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo
1683 RguUeFlowCntrlInfo *param,
1687 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
1688 RguUeFlowCntrlInfo *param;
1693 TRC3(cmUnpkRguUeFlowCntrlInfo);
1694 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
1695 CMCHKUNPK(SUnpkU32, ¶m->numLcs, mBuf);
1696 for(idx=0; idx < param->numLcs; idx++)
1698 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1704 PUBLIC S16 cmUnpkRguFlowCntrlInfo
1706 RguFlowCntrlInd *param,
1710 PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
1711 RguFlowCntrlInd *param;
1717 TRC3(cmUnpkRguFlowCntrlInfo);
1719 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1720 CMCHKUNPK(SUnpkU32, ¶m->numUes, mBuf);
1721 for (idx=0; idx < param->numUes; idx++)
1723 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1729 * @brief Flow control indication from MAC to RLC
1730 * Informs RLC of the LCs on which flow control to
1735 * Function : cmUnpkRguFlowCntrlInd
1737 * @param[in] RguFlowCntrlInd func
1738 * @param[in] Pst *pst
1739 * @param[in] Buffer *mBuf
1744 PUBLIC S16 cmUnpkRguFlowCntrlInd
1746 RguFlowCntrlIndInfo func,
1751 PUBLIC S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
1752 RguFlowCntrlIndInfo func;
1758 RguFlowCntrlInd *flowCntrlInd;
1760 TRC3(cmUnpkRguFlowCntrlInd)
1762 if (SUnpkS16(&suId, mBuf) != ROK) {
1763 #if (ERRCLASS & ERRCLS_ADD_RES)
1764 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1765 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1766 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1771 if (pst->selector == RGU_SEL_LWLC)
1773 CMCHKUNPK(cmUnpkPtr,(PTR *) &flowCntrlInd, mBuf);
1777 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
1778 #if (ERRCLASS & ERRCLS_ADD_RES)
1779 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1780 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1781 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1786 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1787 #if (ERRCLASS & ERRCLS_ADD_RES)
1788 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1789 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1790 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1793 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
1798 RETVALUE((*func)(pst, suId, flowCntrlInd));
1801 /***********************************************************
1803 * Func : cmPkRguPduInfo
1807 * PDU information given on a logical channel
1816 **********************************************************/
1818 PUBLIC S16 cmPkRguPduInfo
1824 PUBLIC S16 cmPkRguPduInfo(param, mBuf)
1831 TRC3(cmPkRguPduInfo);
1833 for (i=param->numPdu-1; i >= 0; i--) {
1834 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
1836 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
1838 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
1840 SPutMsg(param->mBuf[i]);
1841 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1843 CMCHKPK(SPkU8, param->numPdu, mBuf);
1849 /***********************************************************
1851 * Func : cmUnpkRguPduInfo
1855 * PDU information given on a logical channel
1864 **********************************************************/
1866 PUBLIC S16 cmUnpkRguPduInfo
1872 PUBLIC S16 cmUnpkRguPduInfo(param, mBuf)
1879 TRC3(cmUnpkRguPduInfo);
1881 CMCHKUNPK(SUnpkU8, ¶m->numPdu, mBuf);
1882 for (i=0; i<param->numPdu; i++) {
1883 MsgLen msgLen, totalMsgLen;
1884 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1885 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1887 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
1895 /***********************************************************
1897 * Func : cmPkRguDBoReport
1900 * Desc : RguDBoReport
1901 * Buffer Occupancy Report for dedicated logical channel
1910 **********************************************************/
1912 PUBLIC S16 cmPkRguDBoReport
1914 RguDBoReport *param,
1918 PUBLIC S16 cmPkRguDBoReport(param, mBuf)
1919 RguDBoReport *param;
1924 TRC3(cmPkRguDBoReport);
1926 CMCHKPK(SPkU32, param->oldestSduArrTime, mBuf);
1927 CMCHKPK(SPkU32, param->staPduBo, mBuf);
1929 CMCHKPK(SPkU8, param->staPduPrsnt, mBuf);
1930 CMCHKPK(SPkU16, param->estRlcHdrSz, mBuf);
1932 CMCHKPK(SPkS32, param->bo, mBuf);
1938 /***********************************************************
1940 * Func : cmUnpkRguDBoReport
1943 * Desc : RguDBoReport
1944 * Buffer Occupancy Report for dedicated logical channel
1953 **********************************************************/
1955 PUBLIC S16 cmUnpkRguDBoReport
1957 RguDBoReport *param,
1961 PUBLIC S16 cmUnpkRguDBoReport(param, mBuf)
1962 RguDBoReport *param;
1967 TRC3(cmUnpkRguDBoReport);
1969 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
1971 CMCHKUNPK(SUnpkU16, ¶m->estRlcHdrSz, mBuf);
1972 CMCHKUNPK(SUnpkU8, ¶m->staPduPrsnt, mBuf);
1975 CMCHKUNPK(SUnpkU32, ¶m->staPduBo, mBuf);
1976 CMCHKUNPK(SUnpkU32, ¶m->oldestSduArrTime, mBuf);
1981 /***********************************************************
1983 * Func : cmPkRguCDatReqInfo
1986 * Desc : RguCDatReqInfo
1987 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1996 **********************************************************/
1998 PUBLIC S16 cmPkRguCDatReqInfo
2000 RguCDatReqInfo *param,
2004 PUBLIC S16 cmPkRguCDatReqInfo(param, mBuf)
2005 RguCDatReqInfo *param;
2011 TRC3(cmPkRguCDatReqInfo);
2013 if (param->pdu != NULLP)
2015 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2017 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2019 SPutMsg(param->pdu);
2020 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2022 switch(param->lcType) {
2023 case CM_LTE_LCH_CCCH:
2024 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2026 case CM_LTE_LCH_BCCH:
2027 case CM_LTE_LCH_PCCH:
2028 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2030 CMCHKPK(SPkU8,param->pnb,mBuf);
2036 CMCHKPK(SPkU32, param->transId, mBuf);
2037 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2038 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2039 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2045 /***********************************************************
2047 * Func : cmUnpkRguCDatReqInfo
2050 * Desc : RguCDatReqInfo
2051 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2060 **********************************************************/
2062 PUBLIC S16 cmUnpkRguCDatReqInfo
2064 RguCDatReqInfo *param,
2068 PUBLIC S16 cmUnpkRguCDatReqInfo(param, mBuf)
2069 RguCDatReqInfo *param;
2073 MsgLen msgLen, totalMsgLen;
2075 TRC3(cmUnpkRguCDatReqInfo);
2077 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2078 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2079 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2080 CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf);
2081 switch(param->lcType) {
2082 case CM_LTE_LCH_BCCH:
2083 case CM_LTE_LCH_PCCH:
2085 CMCHKUNPK(SUnpkU8,¶m->pnb, mBuf);
2087 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2089 case CM_LTE_LCH_CCCH:
2090 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2095 SFndLenMsg(mBuf, &msgLen);
2098 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2099 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2101 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2109 /***********************************************************
2111 * Func : cmPkRguLchDatReq
2114 * Desc : RguLchDatReq
2115 * DatReq Information of a logical channel
2124 **********************************************************/
2126 PUBLIC S16 cmPkRguLchDatReq
2128 RguLchDatReq *param,
2132 PUBLIC S16 cmPkRguLchDatReq(param, mBuf)
2133 RguLchDatReq *param;
2138 TRC3(cmPkRguLchDatReq);
2141 CMCHKPK(SPkU8, param->freeBuff, mBuf);
2143 CMCHKPK(SPkU8, param->setMaxUlPrio, mBuf);
2144 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2145 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
2146 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2152 /***********************************************************
2154 * Func : cmUnpkRguLchDatReq
2157 * Desc : RguLchDatReq
2158 * DatReq Information of a logical channel
2167 **********************************************************/
2169 PUBLIC S16 cmUnpkRguLchDatReq
2171 RguLchDatReq *param,
2175 PUBLIC S16 cmUnpkRguLchDatReq(param, mBuf)
2176 RguLchDatReq *param;
2181 TRC3(cmUnpkRguLchDatReq);
2183 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2184 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
2185 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2186 CMCHKUNPK(SUnpkU8, ¶m->setMaxUlPrio, mBuf);
2188 CMCHKUNPK(SUnpkU8, ¶m->freeBuff, mBuf);
2194 /***********************************************************
2196 * Func : cmPkRguDatReqTb
2199 * Desc : RguDatReqTb
2200 * DatReq from RLC to MAC for dedicated channels of a UE
2209 **********************************************************/
2211 PUBLIC S16 cmPkRguDatReqTb
2217 PUBLIC S16 cmPkRguDatReqTb(param, mBuf)
2224 TRC3(cmPkRguDatReqTb);
2225 /*rgu_c_001.main_5 - ADD - L2M Support */
2227 CMCHKPK(SPkU32, param->tbId, mBuf);
2229 for (i=param->nmbLch-1; i >= 0; i--) {
2230 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
2232 CMCHKPK(SPkU8, param->nmbLch, mBuf);
2238 /***********************************************************
2240 * Func : cmUnpkRguDatReqTb
2243 * Desc : RguDatReqTb
2244 * DatReq from RLC to MAC for dedicated channels of a UE
2253 **********************************************************/
2256 PUBLIC S16 cmUnpkRguDatReqTb
2263 PUBLIC S16 cmUnpkRguDatReqTb(pst, param, mBuf)
2270 PUBLIC S16 cmUnpkRguDatReqTb
2276 PUBLIC S16 cmUnpkRguDatReqTb(param, mBuf)
2284 TRC3(cmUnpkRguDatReqTb);
2286 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
2287 for (i=0; i<param->nmbLch; i++) {
2288 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
2290 /*rgu_c_001.main_5 - ADD - L2M Support */
2292 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
2298 /***********************************************************
2300 * Func : cmPkRguDDatReqInfo
2303 * Desc : RguDDatReqInfo
2304 * DatReq from RLC to MAC for dedicated channels of a UE
2313 **********************************************************/
2314 /*rgu_c_001.main_5 - ADD - L2M Support */
2317 PUBLIC S16 cmPkRguDDatReqInfo
2320 RguDDatReqInfo *param,
2324 PUBLIC S16 cmPkRguDDatReqInfo(pst, param, mBuf)
2326 RguDDatReqInfo *param;
2331 PUBLIC S16 cmPkRguDDatReqInfo
2333 RguDDatReqInfo *param,
2337 PUBLIC S16 cmPkRguDDatReqInfo(param, mBuf)
2338 RguDDatReqInfo *param;
2346 TRC3(cmPkRguDDatReqInfo);
2348 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
2350 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
2351 for (i=RGU_MAX_TB-1; i >= 0; i--)
2353 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
2355 CMCHKPK(SPkU8, datReq->nmbOfTbs, mBuf);
2356 CMCHKPK(SPkU32, datReq->transId, mBuf);
2357 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
2359 CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf);
2360 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2366 /***********************************************************
2368 * Func : cmUnpkRguDDatReqInfo
2371 * Desc : RguDDatReqInfo
2372 * DatReq from RLC to MAC for dedicated channels of a UE
2381 **********************************************************/
2384 PUBLIC S16 cmUnpkRguDDatReqInfo
2387 RguDDatReqInfo *param,
2391 PUBLIC S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
2393 RguDDatReqInfo *param;
2398 PUBLIC S16 cmUnpkRguDDatReqInfo
2400 RguDDatReqInfo *param,
2404 PUBLIC S16 cmUnpkRguDDatReqInfo(param, mBuf)
2405 RguDDatReqInfo *param;
2411 /* After Merging from 2.1 to 2.2 */
2412 /*rgu_c_001.main_5 - ADD - L2M Support */
2418 TRC3(cmUnpkRguDDatReqInfo);
2420 /* After Merging from 2.1 to 2.2 */
2421 /*rgu_c_001.main_5 - ADD - L2M Support */
2425 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2426 CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf);
2427 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
2429 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
2430 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
2431 CMCHKUNPK(SUnpkU32, &datReq->transId, mBuf);
2432 CMCHKUNPK(SUnpkU8, &datReq->nmbOfTbs, mBuf);
2433 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
2434 for (i=0; i<RGU_MAX_TB; i++)
2436 /*rgu_c_001.main_5 - ADD - L2M Support */
2438 /* After Merging from 2.1 to 2.2 */
2439 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
2445 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
2454 /***********************************************************
2456 * Func : cmPkRguCDatIndInfo
2459 * Desc : RguCDatIndInfo
2460 * DatInd from MAC to RLC on CCCH
2469 **********************************************************/
2471 PUBLIC S16 cmPkRguCDatIndInfo
2473 RguCDatIndInfo *param,
2477 PUBLIC S16 cmPkRguCDatIndInfo(param, mBuf)
2478 RguCDatIndInfo *param;
2484 TRC3(cmPkRguCDatIndInfo);
2486 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2488 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2490 SPutMsg(param->pdu);
2491 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2492 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2493 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2494 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2500 /***********************************************************
2502 * Func : cmUnpkRguCDatIndInfo
2505 * Desc : RguCDatIndInfo
2506 * DatInd from MAC to RLC on CCCH
2515 **********************************************************/
2517 PUBLIC S16 cmUnpkRguCDatIndInfo
2519 RguCDatIndInfo *param,
2523 PUBLIC S16 cmUnpkRguCDatIndInfo(param, mBuf)
2524 RguCDatIndInfo *param;
2528 MsgLen msgLen, totalMsgLen;
2530 TRC3(cmUnpkRguCDatIndInfo);
2532 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2533 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2534 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2535 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2536 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2538 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2545 /***********************************************************
2547 * Func : cmPkRguLchDatInd
2550 * Desc : RguLchDatInd
2551 * DatInd Information for a logical channel
2560 **********************************************************/
2562 PUBLIC S16 cmPkRguLchDatInd
2564 RguLchDatInd *param,
2568 PUBLIC S16 cmPkRguLchDatInd(param, mBuf)
2569 RguLchDatInd *param;
2573 TRC3(cmPkRguLchDatInd);
2575 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2576 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2582 /***********************************************************
2584 * Func : cmUnpkRguLchDatInd
2587 * Desc : RguLchDatInd
2588 * DatInd Information for a logical channel
2597 **********************************************************/
2599 PUBLIC S16 cmUnpkRguLchDatInd
2601 RguLchDatInd *param,
2605 PUBLIC S16 cmUnpkRguLchDatInd(param, mBuf)
2606 RguLchDatInd *param;
2610 TRC3(cmUnpkRguLchDatInd);
2612 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2613 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2619 /***********************************************************
2621 * Func : packRlcMacDataInfo
2625 * Data Indication from MAC to RLC for dedicated channels of a UE
2634 **********************************************************/
2636 PUBLIC S16 packRlcMacDataInfo
2642 PUBLIC S16 packRlcMacDataInfo(param, mBuf)
2650 TRC3(packRlcMacDataInfo);
2652 for (i=param->nmbPdu-1; i >= 0; i--)
2655 if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK)
2657 if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK)
2659 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2660 CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf);
2661 CMCHKPK(cmPkBool, param->pduInfo[i].commCh, mBuf);
2663 CMCHKPK(SPkU8, param->nmbPdu, mBuf);
2664 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2665 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2666 CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf);
2672 /***********************************************************
2674 * Func : unpackRlcMacDataInfo
2678 * Data Indication from MAC to RLC for dedicated channels of a UE
2687 **********************************************************/
2689 PUBLIC S16 unpackRlcMacDataInfo
2695 PUBLIC S16 unpackRlcMacDataInfo(param, mBuf)
2702 TRC3(unpackRlcMacDataInfo);
2704 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf);
2705 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2706 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2707 CMCHKUNPK(SUnpkU8, ¶m->nmbPdu, mBuf);
2708 for (i=0; i<param->nmbPdu; i++)
2712 CMCHKUNPK(cmUnpkBool, ¶m->pduInfo[i].commCh, mBuf);
2713 CMCHKUNPK(cmUnpkLteLcId, ¶m->pduInfo[i].lcId, mBuf);
2714 CMCHKUNPK(cmUnpkMsgLen, ¶m->pduInfo[i].pduLen, mBuf);
2715 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2717 if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, ¶m->pduInfo[i].pduBuf) != ROK)
2724 /***********************************************************
2726 * Func : cmPkRguCStaRspInfo
2729 * Desc : RguCStaRspInfo
2730 * Status Response from RLC to MAC for common logical channel
2739 **********************************************************/
2741 PUBLIC S16 cmPkRguCStaRspInfo
2743 RguCStaRspInfo *param,
2747 PUBLIC S16 cmPkRguCStaRspInfo(param, mBuf)
2748 RguCStaRspInfo *param;
2753 TRC3(cmPkRguCStaRspInfo);
2755 switch(param->lcType) {
2756 case CM_LTE_LCH_CCCH:
2757 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2759 case CM_LTE_LCH_BCCH:
2760 case CM_LTE_LCH_PCCH:
2761 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2763 CMCHKPK(SPkU8,param->pnb,mBuf);
2764 CMCHKPK(SPkU8,param->emtcDiReason,mBuf);
2770 CMCHKPK(SPkS32, param->bo, mBuf);
2771 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2772 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2773 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2779 /***********************************************************
2781 * Func : cmUnpkRguCStaRspInfo
2784 * Desc : RguCStaRspInfo
2785 * Status Response from RLC to MAC for common logical channel
2794 **********************************************************/
2796 PUBLIC S16 cmUnpkRguCStaRspInfo
2798 RguCStaRspInfo *param,
2802 PUBLIC S16 cmUnpkRguCStaRspInfo(param, mBuf)
2803 RguCStaRspInfo *param;
2808 TRC3(cmUnpkRguCStaRspInfo);
2810 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2811 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2812 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2813 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2814 switch(param->lcType) {
2815 case CM_LTE_LCH_BCCH:
2816 case CM_LTE_LCH_PCCH:
2818 CMCHKUNPK(SUnpkU8,¶m->emtcDiReason , mBuf);
2819 CMCHKUNPK(SUnpkU8,¶m->pnb , mBuf);
2821 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2823 case CM_LTE_LCH_CCCH:
2824 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2834 /***********************************************************
2836 * Func : packBOStatusInfo
2839 * Desc : RlcMacBOStatus
2840 * Status Response from RLC to MAC for dedicated logical channel
2849 **********************************************************/
2851 PUBLIC S16 packBOStatusInfo
2853 RlcMacBOStatus *param,
2857 PUBLIC S16 packBOStatusInfo(param, mBuf)
2858 RlcMacBOStatus *param;
2863 TRC3(packBOStatusInfo);
2865 CMCHKPK(SPkS32, param->bo, mBuf);
2866 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2867 CMCHKPK(cmPkBool, param->commCh, mBuf);
2868 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2869 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2871 } /* End of packBOStatusInfo */
2875 /***********************************************************
2877 * Func : unpackBOStatusInfo
2880 * Desc : RlcMacBOStatus
2881 * Status Response from RLC to MAC for dedicated logical channel
2890 **********************************************************/
2892 PUBLIC S16 unpackBOStatusInfo
2894 RlcMacBOStatus *param,
2898 PUBLIC S16 unpackBOStatusInfo(param, mBuf)
2899 RlcMacBOStatus *param;
2904 TRC3(unpackBOStatusInfo);
2906 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2907 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2908 CMCHKUNPK(cmUnpkBool, ¶m->commCh, mBuf);
2909 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2910 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2912 } /* End of unpackBOStatusInfo */
2915 /***********************************************************
2917 * Func : cmPkRguLchStaInd
2920 * Desc : RguLchStaInd
2921 * StaInd info for each logical channel of a UE
2930 **********************************************************/
2932 PUBLIC S16 cmPkRguLchStaInd
2934 RguLchStaInd *param,
2938 PUBLIC S16 cmPkRguLchStaInd(param, mBuf)
2939 RguLchStaInd *param;
2944 TRC3(cmPkRguLchStaInd);
2946 CMCHKPK(SPkS16, param->totBufSize, mBuf);
2947 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2953 /***********************************************************
2955 * Func : cmUnpkRguLchStaInd
2958 * Desc : RguLchStaInd
2959 * StaInd info for each logical channel of a UE
2968 **********************************************************/
2970 PUBLIC S16 cmUnpkRguLchStaInd
2972 RguLchStaInd *param,
2976 PUBLIC S16 cmUnpkRguLchStaInd(param, mBuf)
2977 RguLchStaInd *param;
2982 TRC3(cmUnpkRguLchStaInd);
2984 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2985 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
2990 /***********************************************************
2992 * Func : cmPkRguStaIndTb
2995 * Desc : RguStaIndTb
2996 * StaInd from RLC to MAC for dedicated channels of a UE
3005 **********************************************************/
3007 PUBLIC S16 cmPkRguStaIndTb
3013 PUBLIC S16 cmPkRguStaIndTb(param, mBuf)
3020 TRC3(cmPkRguStaIndTb);
3023 CMCHKPK(SPkU16, param->status, mBuf);
3024 CMCHKPK(SPkU32, param->tbId, mBuf);
3026 for (i=param->nmbLch-1; i >= 0; i--) {
3027 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3029 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3035 /***********************************************************
3037 * Func : cmUnpkRguStaIndTb
3040 * Desc : RguStaIndTb
3041 * StaInd from RLC to MAC for dedicated channels of a UE
3050 **********************************************************/
3052 PUBLIC S16 cmUnpkRguStaIndTb
3058 PUBLIC S16 cmUnpkRguStaIndTb(param, mBuf)
3065 TRC3(cmUnpkRguStaIndTb);
3067 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3068 for (i=0; i<param->nmbLch; i++) {
3069 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3072 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
3073 CMCHKUNPK(SUnpkU16, ¶m->status, mBuf);
3079 /***********************************************************
3081 * Func : packSchedRepInfo
3084 * Desc : RlcMacSchedRep
3085 * StaInd from MAC to RLC for dedicated logical channels of a UE
3094 **********************************************************/
3095 PUBLIC S16 packSchedRepInfo
3097 RlcMacSchedRepInfo *param,
3103 TRC3(packSchedRepInfo);
3105 for(idx = (param->nmbLch-1); idx >= 0; idx--)
3107 CMCHKPK(cmPkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf);
3108 CMCHKPK(cmPkBool, param->lchSta[idx].commCh, mBuf);
3110 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3111 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3112 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3113 CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf);
3116 } /* End of packSchedRepInfo */
3120 /***********************************************************
3122 * Func : unpackSchedRepInfo
3125 * Desc : RlcMacSchedRep
3126 * StaInd from MAC to RLC for dedicated logical channels of a UE
3135 **********************************************************/
3136 PUBLIC S16 unpackSchedRepInfo
3138 RlcMacSchedRepInfo *param,
3144 TRC3(unpackSchedRepInfo);
3146 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf);
3147 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3148 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3149 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3150 for(idx = 0; idx < param->nmbLch; idx++)
3152 CMCHKUNPK(cmUnpkBool, ¶m->lchSta[idx].commCh, mBuf);
3153 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf);
3157 } /* End of unpackSchedRepInfo */
3161 /**********************************************************************
3163 **********************************************************************/