1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code for packing/unpacking of RGU interface
30 **********************************************************************/
33 @brief This file contains the packing/unpacking code for the RGU interface
37 /* header include files (.h) */
38 #include "common_def.h"
39 #include "rgu.h" /* RGU Interface defines */
41 /* header/extern include files (.x) */
42 #include "rgu.x" /* RGU Interface includes */
53 * @brief Request from RLC to MAC to bind the interface saps
57 * Function : cmPkRguBndReq
60 * @param[in] SuId suId
61 * @param[in] SpId spId
66 PUBLIC S16 cmPkRguBndReq
73 PUBLIC S16 cmPkRguBndReq(pst, suId, spId)
82 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
83 #if (ERRCLASS & ERRCLS_ADD_RES)
84 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
85 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
86 (ErrVal)ERGU001, (ErrVal)0, "Packing failed");
90 if (SPkS16(spId, mBuf) != ROK) {
91 #if (ERRCLASS & ERRCLS_ADD_RES)
92 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
93 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
94 (ErrVal)ERGU002, (ErrVal)0, "Packing failed");
99 if (SPkS16(suId, mBuf) != ROK) {
100 #if (ERRCLASS & ERRCLS_ADD_RES)
101 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
102 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
103 (ErrVal)ERGU003, (ErrVal)0, "Packing failed");
108 pst->event = (Event) EVTRGUBNDREQ;
109 RETVALUE(SPstTsk(pst,mBuf));
114 * @brief Request from RLC to MAC to bind the interface saps
118 * Function : cmUnpkRguBndReq
120 * @param[in] Pst* pst
121 * @param[in] SuId suId
122 * @param[in] SpId spId
127 PUBLIC S16 cmUnpkRguBndReq
134 PUBLIC S16 cmUnpkRguBndReq(func, pst, mBuf)
143 TRC3(cmUnpkRguBndReq)
145 if (SUnpkS16(&suId, mBuf) != ROK) {
146 #if (ERRCLASS & ERRCLS_ADD_RES)
147 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
148 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
149 (ErrVal)ERGU004, (ErrVal)0, "UnPacking failed");
154 if (SUnpkS16(&spId, mBuf) != ROK) {
155 #if (ERRCLASS & ERRCLS_ADD_RES)
156 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
157 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
158 (ErrVal)ERGU005, (ErrVal)0, "UnPacking failed");
164 RETVALUE((*func)(pst, suId, spId));
169 * @brief Request from RLC to MAC to Unbind the interface saps
173 * Function : cmPkRguUbndReq
175 * @param[in] Pst* pst
176 * @param[in] SpId spId
177 * @param[in] Reason reason
182 PUBLIC S16 cmPkRguUbndReq
189 PUBLIC S16 cmPkRguUbndReq(pst, spId, reason)
195 Buffer *mBuf = NULLP;
198 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
199 #if (ERRCLASS & ERRCLS_ADD_RES)
200 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
201 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
202 (ErrVal)ERGU006, (ErrVal)0, "Packing failed");
206 if (SPkS16(reason, mBuf) != ROK) {
207 #if (ERRCLASS & ERRCLS_ADD_RES)
208 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
209 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
210 (ErrVal)ERGU007, (ErrVal)0, "Packing failed");
215 if (SPkS16(spId, mBuf) != ROK) {
216 #if (ERRCLASS & ERRCLS_ADD_RES)
217 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
218 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
219 (ErrVal)ERGU008, (ErrVal)0, "Packing failed");
224 pst->event = (Event) EVTRGUUBNDREQ;
225 RETVALUE(SPstTsk(pst,mBuf));
230 * @brief Request from RLC to MAC to Unbind the interface saps
234 * Function : cmUnpkRguUbndReq
236 * @param[in] Pst* pst
237 * @param[in] SpId spId
238 * @param[in] Reason reason
243 PUBLIC S16 cmUnpkRguUbndReq
250 PUBLIC S16 cmUnpkRguUbndReq(func, pst, mBuf)
259 TRC3(cmUnpkRguUbndReq)
261 if (SUnpkS16(&spId, mBuf) != ROK) {
262 #if (ERRCLASS & ERRCLS_ADD_RES)
263 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
264 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
265 (ErrVal)ERGU009, (ErrVal)0, "UnPacking failed");
270 if (SUnpkS16(&reason, mBuf) != ROK) {
271 #if (ERRCLASS & ERRCLS_ADD_RES)
272 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
273 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
274 (ErrVal)ERGU010, (ErrVal)0, "UnPacking failed");
280 RETVALUE((*func)(pst, spId, reason));
285 * @brief Confirmation from MAC to RLC for the bind/Unbind
286 * request for the interface saps
290 * Function : cmPkRguBndCfm
292 * @param[in] Pst* pst
293 * @param[in] SuId suId
294 * @param[in] U8 status
299 PUBLIC S16 cmPkRguBndCfm
306 PUBLIC S16 cmPkRguBndCfm(pst, suId, status)
312 Buffer *mBuf = NULLP;
315 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
316 #if (ERRCLASS & ERRCLS_ADD_RES)
317 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
318 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
319 (ErrVal)ERGU011, (ErrVal)0, "Packing failed");
323 if (SPkU8(status, mBuf) != ROK) {
324 #if (ERRCLASS & ERRCLS_ADD_RES)
325 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
326 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
327 (ErrVal)ERGU012, (ErrVal)0, "Packing failed");
332 if (SPkS16(suId, mBuf) != ROK) {
333 #if (ERRCLASS & ERRCLS_ADD_RES)
334 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
335 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
336 (ErrVal)ERGU013, (ErrVal)0, "Packing failed");
341 pst->event = (Event) EVTRGUBNDCFM;
342 RETVALUE(SPstTsk(pst,mBuf));
347 * @brief Confirmation from MAC to RLC for the bind/Unbind
348 * request for the interface saps
352 * Function : cmUnpkRguBndCfm
354 * @param[in] Pst* pst
355 * @param[in] SuId suId
356 * @param[in] U8 status
361 PUBLIC S16 cmUnpkRguBndCfm
368 PUBLIC S16 cmUnpkRguBndCfm(func, pst, mBuf)
377 TRC3(cmUnpkRguBndCfm)
379 if (SUnpkS16(&suId, mBuf) != ROK) {
380 #if (ERRCLASS & ERRCLS_ADD_RES)
381 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
382 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
383 (ErrVal)ERGU014, (ErrVal)0, "UnPacking failed");
388 if (SUnpkU8(&status, mBuf) != ROK) {
389 #if (ERRCLASS & ERRCLS_ADD_RES)
390 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
391 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
392 (ErrVal)ERGU015, (ErrVal)0, "UnPacking failed");
398 RETVALUE((*func)(pst, suId, status));
403 * @brief Request from RLC to MAC for forwarding SDUs on
404 * dedicated channel for transmission
408 * Function : packDlData
410 * @param[in] Pst* pst
411 * @param[in] SpId spId
412 * @param[in] RguDDatReqInfo * datReq
416 PUBLIC uint16_t packDlData
423 Buffer *mBuf = NULLP;
426 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
427 #if (ERRCLASS & ERRCLS_ADD_RES)
428 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
429 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
430 (ErrVal)ERGU022, (ErrVal)0, "Packing failed");
432 SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData));
436 if (pst->selector == ODU_SELECTOR_LWLC)
438 CMCHKPK(cmPkPtr,(PTR) dlData, mBuf);
442 /*rgu_c_001.main_5 - ADD - L2M Support */
444 if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK)
446 if (packRlcMacDataInfo(dlData, 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)ERGU023, (ErrVal)0, "Packing failed");
454 SPutSBuf(pst->region, pst->pool, (Data *)dlData,
460 if (SPutSBuf(pst->region, pst->pool,
461 (Data *)dlData, sizeof(RlcMacData)) != ROK) {
462 #if (ERRCLASS & ERRCLS_ADD_RES)
463 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
464 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
465 (ErrVal)ERGU025, (ErrVal)0, "Packing failed");
472 if (SPkS16(spId, mBuf) != ROK) {
473 #if (ERRCLASS & ERRCLS_ADD_RES)
474 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
475 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
476 (ErrVal)ERGU024, (ErrVal)0, "Packing failed");
480 SPutSBuf(pst->region, pst->pool,
481 (Data *)dlData, sizeof(RlcMacData));
486 pst->event = (Event) EVTRLCDLDAT;
487 RETVALUE(SPstTsk(pst,mBuf));
492 * @brief Request from RLC to MAC for forwarding SDUs on
493 * dedicated channel for transmission
497 * Function : unpackDlData
499 * @param[in] Pst* pst
500 * @param[in] SpId spId
501 * @param[in] RguDDatReqInfo * datReq
505 PUBLIC S16 unpackDlData
517 if (SUnpkS16(&spId, mBuf) != ROK) {
522 if (pst->selector == ODU_SELECTOR_LWLC)
524 CMCHKUNPK(cmUnpkPtr,(PTR *) &dlData, mBuf);
528 if ((SGetSBuf(pst->region, pst->pool,
529 (Data **)&dlData, sizeof(RlcMacData))) != ROK) {
530 #if (ERRCLASS & ERRCLS_ADD_RES)
531 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
532 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
533 (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed");
538 cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData));
539 /*rgu_c_001.main_5 - ADD - L2M Support */
541 if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK)
543 if (unpackRlcMacDataInfo(dlData, mBuf) != ROK)
546 #if (ERRCLASS & ERRCLS_ADD_RES)
547 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
548 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
549 (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed");
552 SPutSBuf(pst->region, pst->pool, (Data *)dlData,
559 /* TODO : change function call to send RlcMacData as below: */
560 RETVALUE((*func)(pst, spId, dlData));
562 //RETVALUE((*func)(pst, spId, datReq));
567 * @brief Data Indication from MAC to RLC to
568 * forward the data received for dedicated channels
572 * Function : packRcvdUlData
574 * @param[in] Pst* pst
575 * @param[in] SuId suId
576 * @param[in] RlcMacData *ulData
581 PUBLIC S16 packRcvdUlData
588 PUBLIC S16 packRcvdUlData(pst, suId, ulData)
594 Buffer *mBuf = NULLP;
597 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
598 #if (ERRCLASS & ERRCLS_ADD_RES)
599 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
600 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
601 (ErrVal)ERGU035, (ErrVal)0, "Packing failed");
603 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
607 if (pst->selector == ODU_SELECTOR_LWLC)
609 CMCHKPK(cmPkPtr,(PTR)ulData, mBuf);
613 if (packRlcMacDataInfo(ulData, mBuf) != ROK) {
614 #if (ERRCLASS & ERRCLS_ADD_RES)
615 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
616 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
617 (ErrVal)ERGU036, (ErrVal)0, "Packing failed");
619 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
624 if (SPutStaticBuffer(pst->region, pst->pool,
625 (Data *)ulData, sizeof(RlcMacData),0) != ROK) {
626 #if (ERRCLASS & ERRCLS_ADD_RES)
627 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
628 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
629 (ErrVal)ERGU038, (ErrVal)0, "Packing failed");
636 if (SPkS16(suId, mBuf) != ROK) {
637 #if (ERRCLASS & ERRCLS_ADD_RES)
638 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
639 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
640 (ErrVal)ERGU037, (ErrVal)0, "Packing failed");
642 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
647 pst->event = (Event) EVTRLCULDAT;
648 RETVALUE(SPstTsk(pst,mBuf));
653 * @brief Data Indication from MAC to RLC to
654 * forward the data received for dedicated channels
658 * Function : unpackRcvdUlData
660 * @param[in] Pst* pst
661 * @param[in] SuId suId
662 * @param[in] RlcMacData *ulData
666 PUBLIC S16 unpackRcvdUlData
676 TRC3(unpackRcvdUlData)
678 if (SUnpkS16(&suId, mBuf) != ROK) {
679 #if (ERRCLASS & ERRCLS_ADD_RES)
680 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
681 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
682 (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed");
688 if (pst->selector == ODU_SELECTOR_LWLC)
690 CMCHKUNPK(cmUnpkPtr,(PTR *) &ulData, mBuf);
694 if ((SGetStaticBuffer(pst->region, pst->pool,
695 (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) {
696 #if (ERRCLASS & ERRCLS_ADD_RES)
697 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
698 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
699 (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed");
704 if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) {
705 #if (ERRCLASS & ERRCLS_ADD_RES)
706 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
707 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
708 (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed");
711 SPutStaticBuffer(pst->region, pst->pool,
712 (Data *)ulData, sizeof(RlcMacData),0);
717 RETVALUE((*func)(pst, suId, ulData));
721 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
724 /***********************************************************
726 * Func :cmPkRguL2MUlThrpMeasReqInfo
729 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
730 * Scheduled throughput measurement
739 **********************************************************/
741 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo
743 RguL2MUlThrpMeasReqInfo* param,
747 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
748 RguL2MUlThrpMeasReqInfo* param;
753 TRC3(cmPkRguL2MUlThrpMeasReqInfo);
755 CMCHKPK(SPkU8, param->enbMeas, mBuf);
756 for (loop=param->numLcId-1; loop >= 0; loop--)
758 CMCHKPK(SPkU8, param->lcId[loop], mBuf);
760 CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
761 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
762 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
768 /***********************************************************
770 * Func :cmUnpkRguL2MUlThrpMeasReqInfo
773 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
774 * Scheduled throughput measurement
783 **********************************************************/
785 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo
787 RguL2MUlThrpMeasReqInfo *param,
791 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
792 RguL2MUlThrpMeasReqInfo *param;
797 TRC3(cmUnpkRguL2MUlThrpMeasReqInfo);
799 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
800 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
801 CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
802 for (loop=0; loop<param->numLcId; loop++)
804 CMCHKUNPK(SUnpkU8, ¶m->lcId[loop], mBuf);
806 CMCHKUNPK(SUnpkU8, ¶m->enbMeas, mBuf);
811 * @brief Primitive invoked from RLC to MAC to
812 * inform the On/Off status for Scheduled UL throughput
813 * measurment for dedicated channels
817 * Function :cmPkRguL2MUlThrpMeasReq
819 * @param[in] Pst* pst
820 * @param[in] SpId spId
821 * @param[in] RguL2MUlThrpMeasReqInfo* measReq
826 PUBLIC S16 cmPkRguL2MUlThrpMeasReq
830 RguL2MUlThrpMeasReqInfo* measReq
833 PUBLIC S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq)
836 RguL2MUlThrpMeasReqInfo* measReq;
839 Buffer *mBuf = NULLP;
840 TRC3(cmPkRguL2MUlThrpMeasReq)
842 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
843 #if (ERRCLASS & ERRCLS_ADD_RES)
844 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
845 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
846 (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
848 SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
851 if (pst->selector == ODU_SELECTOR_LWLC)
853 CMCHKPK(cmPkPtr,(PTR) measReq, mBuf);
857 if (cmPkRguL2MUlThrpMeasReqInfo(measReq, 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)ERGU050, (ErrVal)0, "Packing failed");
863 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
864 sizeof(RguL2MUlThrpMeasReqInfo));
868 if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
869 sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
870 #if (ERRCLASS & ERRCLS_ADD_RES)
871 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
872 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
873 (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
881 if (SPkS16(spId, mBuf) != ROK) {
882 #if (ERRCLASS & ERRCLS_ADD_RES)
883 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
884 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
885 (ErrVal)ERGU051, (ErrVal)0, "Packing failed");
887 if (measReq != NULLP)
889 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
890 sizeof(RguL2MUlThrpMeasReqInfo));
896 pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
897 RETVALUE(SPstTsk(pst,mBuf));
902 * @brief Primitive invoked from RLC to MAC to
903 * inform the On/Off status for Scheduled UL throughput
904 * measurment for dedicated channels
908 * Function :cmUnpkRguL2MUlThrpMeasReq
910 * @param[in] Pst* pst
911 * @param[in] SpId spId
912 * @param[in] RguL2MUlThrpMeasReqInfo * measReq
917 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq
919 RguL2MUlThrpMeasReq func,
924 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf)
925 RguL2MUlThrpMeasReq func;
931 RguL2MUlThrpMeasReqInfo* measReq;
933 TRC3(cmUnpkRguL2MUlThrpMeasReq)
935 if (SUnpkS16(&spId, mBuf) != ROK) {
936 #if (ERRCLASS & ERRCLS_ADD_RES)
937 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
938 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
939 (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
944 if (pst->selector == ODU_SELECTOR_LWLC)
946 CMCHKUNPK(cmUnpkPtr,(PTR *) &measReq, mBuf);
950 if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
951 sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
952 #if (ERRCLASS & ERRCLS_ADD_RES)
953 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
954 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
955 (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
960 if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
961 #if (ERRCLASS & ERRCLS_ADD_RES)
962 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
963 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
964 (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
967 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
968 sizeof(RguL2MUlThrpMeasReqInfo));
973 RETVALUE((*func)(pst, spId, measReq));
982 * @brief Primitive invoked from RLC to MAC to
983 * inform the BO report for dedicated channels
987 * Function : packBOStatus,
989 * @param[in] Pst* pst
990 * @param[in] SpId spId
991 * @param[in] RlcMacBOStatus * staRsp
995 PUBLIC uint16_t packBOStatus
999 RlcMacBOStatus *boStatus
1002 RlcMacBOStatus *boStaInfo = NULL;
1003 Buffer *mBuf = NULLP;
1005 if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK)
1007 #if (ERRCLASS & ERRCLS_ADD_RES)
1008 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1009 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1010 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
1015 /* boStaInfo cant be NULL here */
1016 if (boStaInfo == NULLP)
1021 cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus));
1022 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1023 #if (ERRCLASS & ERRCLS_ADD_RES)
1024 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1025 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1026 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
1028 SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
1032 if (pst->selector == ODU_SELECTOR_LWLC)
1034 CMCHKPK(cmPkPtr,(PTR) boStaInfo, mBuf);
1038 if (packBOStatusInfo(boStatus, mBuf) != ROK) {
1039 #if (ERRCLASS & ERRCLS_ADD_RES)
1040 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1041 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1042 (ErrVal)ERGU057, (ErrVal)0, "Packing failed");
1048 if (SPkS16(spId, mBuf) != ROK) {
1049 #if (ERRCLASS & ERRCLS_ADD_RES)
1050 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1051 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1052 (ErrVal)ERGU058, (ErrVal)0, "Packing failed");
1054 if (boStaInfo != NULLP)
1056 SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
1062 pst->event = (Event)EVTRLCBOSTA;
1063 RETVALUE(SPstTsk(pst,mBuf));
1069 * @brief Primitive invoked from RLC to MAC to
1070 * inform the BO report for dedicated channels
1074 * Function : unpackBOStatus
1076 * @param[in] Pst* pst
1077 * @param[in] SpId spId
1078 * @param[in] RlcMacBOStatus * staRsp
1082 PUBLIC uint16_t unpackBOStatus
1084 RlcMacBoStatus func,
1090 RlcMacBOStatus *boSta;
1092 TRC3(unpackBOStatus)
1094 if (SUnpkS16(&spId, mBuf) != ROK) {
1095 #if (ERRCLASS & ERRCLS_ADD_RES)
1096 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1097 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1098 (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed");
1104 if (pst->selector == ODU_SELECTOR_LWLC)
1106 CMCHKUNPK(cmUnpkPtr,(PTR *) &boSta, mBuf);
1110 if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta,
1111 sizeof(RlcMacBOStatus))) != ROK) {
1112 #if (ERRCLASS & ERRCLS_ADD_RES)
1113 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1114 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1115 (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed");
1120 if (unpackBOStatusInfo(boSta, mBuf) != ROK) {
1121 #if (ERRCLASS & ERRCLS_ADD_RES)
1122 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1123 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1124 (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed");
1127 SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
1132 // (*func)(pst, spId, boSta);
1133 SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
1138 /*rgu_c_001.main_5 - ADD - L2M Support */
1142 * @brief Harq Status Indication from MAC to RLC
1146 * Function : cmPkRguHqStaInd
1148 * @param[in] Pst* pst
1149 * @param[in] SuId suId
1150 * @param[in] RguHarqStatusInd *harqStatusInd
1155 PUBLIC S16 cmPkRguHqStaInd
1159 RguHarqStatusInd *harqStatusInd
1162 PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
1165 RguHarqStatusInd *harqStatusInd;
1171 RguHarqStatusInd *harqStaInd = NULL;
1173 TRC3(cmPkRguHqStaInd)
1174 #ifdef XEON_SPECIFIC_CHANGES
1175 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
1177 if ((SGetStaticBuffer(pst->region, pst->pool,
1178 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1181 #if (ERRCLASS & ERRCLS_ADD_RES)
1182 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1183 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1184 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1189 cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
1191 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1192 #if (ERRCLASS & ERRCLS_ADD_RES)
1193 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1194 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1195 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1197 #ifdef XEON_SPECIFIC_CHANGES
1198 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
1200 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1205 if (pst->selector == ODU_SELECTOR_LWLC)
1207 CMCHKPK(cmPkPtr,(PTR) harqStaInd, mBuf);
1211 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1213 CMCHKPK(SPkU16, harqStaInd->status[idx], mBuf);
1215 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1217 CMCHKPK(SPkU32, harqStaInd->tbId[idx], mBuf);
1219 CMCHKPK(SPkU8, harqStaInd->numTbs, mBuf);
1220 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
1221 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
1223 if (SPkS16(suId, mBuf) != ROK) {
1224 #if (ERRCLASS & ERRCLS_ADD_RES)
1225 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1226 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1227 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
1229 #ifdef XEON_SPECIFIC_CHANGES
1230 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1231 sizeof(RguHarqStatusInd));
1233 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1238 #ifdef XEON_SPECIFIC_CHANGES
1239 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1240 sizeof(RguHarqStatusInd)) != ROK) {
1242 if (pst->selector != ODU_SELECTOR_LWLC)
1244 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
1245 sizeof(RguHarqStatusInd), 0) != ROK)
1248 #if (ERRCLASS & ERRCLS_ADD_RES)
1249 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1250 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1251 (ErrVal)ERGU072, (ErrVal)0, "Packing failed");
1256 #ifndef XEON_SPECIFIC_CHANGES
1260 pst->event = (Event) EVTRGUHQSTAIND;
1261 RETVALUE(SPstTsk(pst,mBuf));
1266 * @brief Harq Status Indication from MAC to RLC
1270 * Function : cmUnpkRguHqStaInd
1272 * @param[in] RguHqStaInd func
1273 * @param[in] Pst *pst
1274 * @param[in] Buffer *mBuf
1279 PUBLIC S16 cmUnpkRguHqStaInd
1286 PUBLIC S16 cmUnpkRguHqStaInd(func, pst, mBuf)
1292 RguHarqStatusInd *hqStaInd;
1296 TRC3(cmUnpkRguHqStaInd)
1298 if (SUnpkS16(&suId, mBuf) != ROK) {
1299 #if (ERRCLASS & ERRCLS_ADD_RES)
1300 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1301 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1302 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
1307 #ifdef XEON_SPECIFIC_CHANGES
1308 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
1309 sizeof(RguHarqStatusInd))) != ROK) {
1311 if (pst->selector == ODU_SELECTOR_LWLC)
1313 CMCHKUNPK(cmUnpkPtr,(PTR *) &hqStaInd, mBuf);
1317 if ((SGetStaticBuffer(pst->region, pst->pool,
1318 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1321 #if (ERRCLASS & ERRCLS_ADD_RES)
1322 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1323 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1324 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
1329 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
1330 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
1331 CMCHKUNPK(SUnpkU8, &hqStaInd->numTbs, mBuf);
1332 for(idx = hqStaInd->numTbs; idx > 0; idx--)
1334 CMCHKUNPK(SUnpkU32, &hqStaInd->tbId[idx - 1], mBuf);
1336 for(idx = hqStaInd->numTbs; idx > 0; idx--)
1338 CMCHKUNPK(SUnpkU16, &hqStaInd->status[idx - 1], mBuf);
1340 #ifndef XEON_SPECIFIC_CHANGES
1344 (*func)(pst, suId, hqStaInd);
1345 #ifdef XEON_SPECIFIC_CHANGES
1346 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
1348 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
1352 #endif /* LTE_L2_MEAS */
1356 * @brief Status Indication from MAC to RLC
1357 * as a response to the staRsp primitive from RLC.
1358 * Informs RLC of the totalBufferSize and Timing Info
1359 * for the transmission on dedicated channels.
1363 * Function : packSchedRep
1365 * @param[in] Pst* pst
1366 * @param[in] SuId suId
1367 * @param[in] RlcMacSchedRep* schRep
1371 PUBLIC S16 packSchedRep
1375 RlcMacSchedRepInfo * schRep
1378 Buffer *mBuf = NULLP;
1381 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1382 #if (ERRCLASS & ERRCLS_ADD_RES)
1383 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1384 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1385 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
1387 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1390 if (pst->selector == ODU_SELECTOR_LWLC)
1392 CMCHKPK(cmPkPtr,(PTR) schRep, mBuf);
1396 if (packSchedRepInfo(schRep, 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)ERGU077, (ErrVal)0, "Packing failed");
1402 SPutSBuf(pst->region, pst->pool, (Data *)schRep,
1403 sizeof(RlcMacSchedRepInfo));
1407 if (SPutSBuf(pst->region, pst->pool, (Data *)schRep,
1408 sizeof(RlcMacSchedRepInfo)) != ROK) {
1409 #if (ERRCLASS & ERRCLS_ADD_RES)
1410 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1411 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1412 (ErrVal)ERGU079, (ErrVal)0, "Packing failed");
1419 if (SPkS16(suId, mBuf) != ROK) {
1420 #if (ERRCLASS & ERRCLS_ADD_RES)
1421 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1422 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1423 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1425 if (schRep != NULLP)
1427 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1433 pst->event = (Event) EVTSCHREP;
1434 RETVALUE(SPstTsk(pst,mBuf));
1439 * @brief Status Indication from MAC to RLC
1440 * as a response to the staRsp primitive from RLC.
1441 * Informs RLC of the totalBufferSize and Timing Info
1442 * for the transmission on dedicated channels.
1446 * Function : unpackSchedRep
1448 * @param[in] Pst* pst
1449 * @param[in] SuId suId
1450 * @param[in] RguDStaIndInfo * staInd
1454 PUBLIC S16 unpackSchedRep
1456 RlcMacSchedRep func,
1462 RlcMacSchedRepInfo *schRep;
1464 TRC3(unpackSchedRep)
1466 if (SUnpkS16(&suId, mBuf) != ROK) {
1467 #if (ERRCLASS & ERRCLS_ADD_RES)
1468 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1469 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1470 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1475 if (pst->selector == ODU_SELECTOR_LWLC)
1477 CMCHKUNPK(cmUnpkPtr,(PTR *) &schRep, mBuf);
1481 if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) {
1482 #if (ERRCLASS & ERRCLS_ADD_RES)
1483 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1484 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1485 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1490 if (unpackSchedRepInfo(schRep, mBuf) != ROK) {
1491 #if (ERRCLASS & ERRCLS_ADD_RES)
1492 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1493 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1494 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1497 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1502 RETVALUE((*func)(pst, suId, schRep));
1506 PUBLIC S16 cmPkRguLcFlowCntrlInfo
1508 RguLcFlowCntrlInfo *param,
1512 PUBLIC S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
1513 RguLcFlowCntrlInfo *param;
1517 TRC3(cmPkRguLcFlowCntrlInfo);
1518 CMCHKPK(SPkU32, param->maxBo4FlowCtrl, mBuf);
1519 CMCHKPK(SPkU32, param->pktAdmitCnt, mBuf);
1520 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1526 PUBLIC S16 cmPkRguUeFlowCntrlInfo
1528 RguUeFlowCntrlInfo *param,
1532 PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
1533 RguUeFlowCntrlInfo *param;
1539 TRC3(cmPkRguUeFlowCntrlInfo);
1541 for(idx=(param->numLcs - 1); idx >= 0; idx--)
1543 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1545 CMCHKPK(SPkU32, param->numLcs, mBuf);
1546 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
1551 PUBLIC S16 cmPkRguFlowCntrlInfo
1553 RguFlowCntrlInd *param,
1557 PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
1558 RguFlowCntrlInd *param;
1564 TRC3(cmPkRguFlowCntrlInfo);
1566 for (idx=(param->numUes - 1); idx >= 0; idx--)
1568 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1570 CMCHKPK(SPkU32, param->numUes, mBuf);
1571 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1576 * @brief Flow Cntrl Indication from MAC to RLC
1577 * Informs RLC of the LCs on which flow control
1582 * Function : cmPkRguFlowCntrlInd
1584 * @param[in] Pst* pst
1585 * @param[in] SuId suId
1586 * @param[in] RguFlowCntrlInd *staInd
1591 PUBLIC S16 cmPkRguFlowCntrlInd
1595 RguFlowCntrlInd *flowCntrlInd
1598 PUBLIC S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
1601 RguFlowCntrlInd *flowCntrlInd;
1604 Buffer *mBuf = NULLP;
1606 TRC3(cmPkRguFlowCntrlInd);
1607 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1608 #if (ERRCLASS & ERRCLS_ADD_RES)
1609 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1610 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1611 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
1615 if (pst->selector == ODU_SELECTOR_LWLC)
1617 CMCHKPK(cmPkPtr,(PTR) flowCntrlInd, mBuf);
1621 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1622 #if (ERRCLASS & ERRCLS_ADD_RES)
1623 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1624 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1625 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
1631 if (SPkS16(suId, mBuf) != ROK) {
1632 #if (ERRCLASS & ERRCLS_ADD_RES)
1633 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1634 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1635 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1641 pst->event = (Event) EVTRGUFLOWCNTRLIND;
1642 RETVALUE(SPstTsk(pst,mBuf));
1646 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo
1648 RguLcFlowCntrlInfo *param,
1652 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
1653 RguLcFlowCntrlInfo *param;
1657 TRC3(cmUnpkRguLcFlowCntrlInfo);
1659 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1660 CMCHKUNPK(SUnpkU32, ¶m->pktAdmitCnt, mBuf);
1661 CMCHKUNPK(SUnpkU32, ¶m->maxBo4FlowCtrl, mBuf);
1666 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo
1668 RguUeFlowCntrlInfo *param,
1672 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
1673 RguUeFlowCntrlInfo *param;
1678 TRC3(cmUnpkRguUeFlowCntrlInfo);
1679 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
1680 CMCHKUNPK(SUnpkU32, ¶m->numLcs, mBuf);
1681 for(idx=0; idx < param->numLcs; idx++)
1683 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1689 PUBLIC S16 cmUnpkRguFlowCntrlInfo
1691 RguFlowCntrlInd *param,
1695 PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
1696 RguFlowCntrlInd *param;
1702 TRC3(cmUnpkRguFlowCntrlInfo);
1704 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1705 CMCHKUNPK(SUnpkU32, ¶m->numUes, mBuf);
1706 for (idx=0; idx < param->numUes; idx++)
1708 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1714 * @brief Flow control indication from MAC to RLC
1715 * Informs RLC of the LCs on which flow control to
1720 * Function : cmUnpkRguFlowCntrlInd
1722 * @param[in] RguFlowCntrlInd func
1723 * @param[in] Pst *pst
1724 * @param[in] Buffer *mBuf
1729 PUBLIC S16 cmUnpkRguFlowCntrlInd
1731 RguFlowCntrlIndInfo func,
1736 PUBLIC S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
1737 RguFlowCntrlIndInfo func;
1743 RguFlowCntrlInd *flowCntrlInd;
1745 TRC3(cmUnpkRguFlowCntrlInd)
1747 if (SUnpkS16(&suId, mBuf) != ROK) {
1748 #if (ERRCLASS & ERRCLS_ADD_RES)
1749 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1750 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1751 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1756 if (pst->selector == ODU_SELECTOR_LWLC)
1758 CMCHKUNPK(cmUnpkPtr,(PTR *) &flowCntrlInd, mBuf);
1762 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
1763 #if (ERRCLASS & ERRCLS_ADD_RES)
1764 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1765 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1766 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1771 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1772 #if (ERRCLASS & ERRCLS_ADD_RES)
1773 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1774 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1775 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1778 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
1783 RETVALUE((*func)(pst, suId, flowCntrlInd));
1786 /***********************************************************
1788 * Func : cmPkRguPduInfo
1792 * PDU information given on a logical channel
1801 **********************************************************/
1803 PUBLIC S16 cmPkRguPduInfo
1809 PUBLIC S16 cmPkRguPduInfo(param, mBuf)
1816 TRC3(cmPkRguPduInfo);
1818 for (i=param->numPdu-1; i >= 0; i--) {
1819 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
1821 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
1823 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
1825 SPutMsg(param->mBuf[i]);
1826 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1828 CMCHKPK(SPkU8, param->numPdu, mBuf);
1834 /***********************************************************
1836 * Func : cmUnpkRguPduInfo
1840 * PDU information given on a logical channel
1849 **********************************************************/
1851 PUBLIC S16 cmUnpkRguPduInfo
1857 PUBLIC S16 cmUnpkRguPduInfo(param, mBuf)
1864 TRC3(cmUnpkRguPduInfo);
1866 CMCHKUNPK(SUnpkU8, ¶m->numPdu, mBuf);
1867 for (i=0; i<param->numPdu; i++) {
1868 MsgLen msgLen, totalMsgLen;
1869 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1870 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1872 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
1880 /***********************************************************
1882 * Func : cmPkRguDBoReport
1885 * Desc : RguDBoReport
1886 * Buffer Occupancy Report for dedicated logical channel
1895 **********************************************************/
1897 PUBLIC S16 cmPkRguDBoReport
1899 RguDBoReport *param,
1903 PUBLIC S16 cmPkRguDBoReport(param, mBuf)
1904 RguDBoReport *param;
1909 TRC3(cmPkRguDBoReport);
1911 CMCHKPK(SPkU32, param->oldestSduArrTime, mBuf);
1912 CMCHKPK(SPkU32, param->staPduBo, mBuf);
1914 CMCHKPK(SPkU8, param->staPduPrsnt, mBuf);
1915 CMCHKPK(SPkU16, param->estRlcHdrSz, mBuf);
1917 CMCHKPK(SPkS32, param->bo, mBuf);
1923 /***********************************************************
1925 * Func : cmUnpkRguDBoReport
1928 * Desc : RguDBoReport
1929 * Buffer Occupancy Report for dedicated logical channel
1938 **********************************************************/
1940 PUBLIC S16 cmUnpkRguDBoReport
1942 RguDBoReport *param,
1946 PUBLIC S16 cmUnpkRguDBoReport(param, mBuf)
1947 RguDBoReport *param;
1952 TRC3(cmUnpkRguDBoReport);
1954 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
1956 CMCHKUNPK(SUnpkU16, ¶m->estRlcHdrSz, mBuf);
1957 CMCHKUNPK(SUnpkU8, ¶m->staPduPrsnt, mBuf);
1960 CMCHKUNPK(SUnpkU32, ¶m->staPduBo, mBuf);
1961 CMCHKUNPK(SUnpkU32, ¶m->oldestSduArrTime, mBuf);
1966 /***********************************************************
1968 * Func : cmPkRguCDatReqInfo
1971 * Desc : RguCDatReqInfo
1972 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1981 **********************************************************/
1983 PUBLIC S16 cmPkRguCDatReqInfo
1985 RguCDatReqInfo *param,
1989 PUBLIC S16 cmPkRguCDatReqInfo(param, mBuf)
1990 RguCDatReqInfo *param;
1996 TRC3(cmPkRguCDatReqInfo);
1998 if (param->pdu != NULLP)
2000 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2002 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2004 SPutMsg(param->pdu);
2005 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2007 switch(param->lcType) {
2008 case CM_LTE_LCH_CCCH:
2009 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2011 case CM_LTE_LCH_BCCH:
2012 case CM_LTE_LCH_PCCH:
2013 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2015 CMCHKPK(SPkU8,param->pnb,mBuf);
2021 CMCHKPK(SPkU32, param->transId, mBuf);
2022 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2023 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2024 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2030 /***********************************************************
2032 * Func : cmUnpkRguCDatReqInfo
2035 * Desc : RguCDatReqInfo
2036 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2045 **********************************************************/
2047 PUBLIC S16 cmUnpkRguCDatReqInfo
2049 RguCDatReqInfo *param,
2053 PUBLIC S16 cmUnpkRguCDatReqInfo(param, mBuf)
2054 RguCDatReqInfo *param;
2058 MsgLen msgLen, totalMsgLen;
2060 TRC3(cmUnpkRguCDatReqInfo);
2062 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2063 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2064 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2065 CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf);
2066 switch(param->lcType) {
2067 case CM_LTE_LCH_BCCH:
2068 case CM_LTE_LCH_PCCH:
2070 CMCHKUNPK(SUnpkU8,¶m->pnb, mBuf);
2072 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2074 case CM_LTE_LCH_CCCH:
2075 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2080 SFndLenMsg(mBuf, &msgLen);
2083 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2084 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2086 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2094 /***********************************************************
2096 * Func : cmPkRguLchDatReq
2099 * Desc : RguLchDatReq
2100 * DatReq Information of a logical channel
2109 **********************************************************/
2111 PUBLIC S16 cmPkRguLchDatReq
2113 RguLchDatReq *param,
2117 PUBLIC S16 cmPkRguLchDatReq(param, mBuf)
2118 RguLchDatReq *param;
2123 TRC3(cmPkRguLchDatReq);
2126 CMCHKPK(SPkU8, param->freeBuff, mBuf);
2128 CMCHKPK(SPkU8, param->setMaxUlPrio, mBuf);
2129 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2130 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
2131 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2137 /***********************************************************
2139 * Func : cmUnpkRguLchDatReq
2142 * Desc : RguLchDatReq
2143 * DatReq Information of a logical channel
2152 **********************************************************/
2154 PUBLIC S16 cmUnpkRguLchDatReq
2156 RguLchDatReq *param,
2160 PUBLIC S16 cmUnpkRguLchDatReq(param, mBuf)
2161 RguLchDatReq *param;
2166 TRC3(cmUnpkRguLchDatReq);
2168 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2169 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
2170 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2171 CMCHKUNPK(SUnpkU8, ¶m->setMaxUlPrio, mBuf);
2173 CMCHKUNPK(SUnpkU8, ¶m->freeBuff, mBuf);
2179 /***********************************************************
2181 * Func : cmPkRguDatReqTb
2184 * Desc : RguDatReqTb
2185 * DatReq from RLC to MAC for dedicated channels of a UE
2194 **********************************************************/
2196 PUBLIC S16 cmPkRguDatReqTb
2202 PUBLIC S16 cmPkRguDatReqTb(param, mBuf)
2209 TRC3(cmPkRguDatReqTb);
2210 /*rgu_c_001.main_5 - ADD - L2M Support */
2212 CMCHKPK(SPkU32, param->tbId, mBuf);
2214 for (i=param->nmbLch-1; i >= 0; i--) {
2215 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
2217 CMCHKPK(SPkU8, param->nmbLch, mBuf);
2223 /***********************************************************
2225 * Func : cmUnpkRguDatReqTb
2228 * Desc : RguDatReqTb
2229 * DatReq from RLC to MAC for dedicated channels of a UE
2238 **********************************************************/
2241 PUBLIC S16 cmUnpkRguDatReqTb
2248 PUBLIC S16 cmUnpkRguDatReqTb(pst, param, mBuf)
2255 PUBLIC S16 cmUnpkRguDatReqTb
2261 PUBLIC S16 cmUnpkRguDatReqTb(param, mBuf)
2269 TRC3(cmUnpkRguDatReqTb);
2271 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
2272 for (i=0; i<param->nmbLch; i++) {
2273 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
2275 /*rgu_c_001.main_5 - ADD - L2M Support */
2277 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
2283 /***********************************************************
2285 * Func : cmPkRguDDatReqInfo
2288 * Desc : RguDDatReqInfo
2289 * DatReq from RLC to MAC for dedicated channels of a UE
2298 **********************************************************/
2299 /*rgu_c_001.main_5 - ADD - L2M Support */
2302 PUBLIC S16 cmPkRguDDatReqInfo
2305 RguDDatReqInfo *param,
2309 PUBLIC S16 cmPkRguDDatReqInfo(pst, param, mBuf)
2311 RguDDatReqInfo *param;
2316 PUBLIC S16 cmPkRguDDatReqInfo
2318 RguDDatReqInfo *param,
2322 PUBLIC S16 cmPkRguDDatReqInfo(param, mBuf)
2323 RguDDatReqInfo *param;
2331 TRC3(cmPkRguDDatReqInfo);
2333 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
2335 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
2336 for (i=RGU_MAX_TB-1; i >= 0; i--)
2338 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
2340 CMCHKPK(SPkU8, datReq->nmbOfTbs, mBuf);
2341 CMCHKPK(SPkU32, datReq->transId, mBuf);
2342 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
2344 CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf);
2345 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2351 /***********************************************************
2353 * Func : cmUnpkRguDDatReqInfo
2356 * Desc : RguDDatReqInfo
2357 * DatReq from RLC to MAC for dedicated channels of a UE
2366 **********************************************************/
2369 PUBLIC S16 cmUnpkRguDDatReqInfo
2372 RguDDatReqInfo *param,
2376 PUBLIC S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
2378 RguDDatReqInfo *param;
2383 PUBLIC S16 cmUnpkRguDDatReqInfo
2385 RguDDatReqInfo *param,
2389 PUBLIC S16 cmUnpkRguDDatReqInfo(param, mBuf)
2390 RguDDatReqInfo *param;
2396 /* After Merging from 2.1 to 2.2 */
2397 /*rgu_c_001.main_5 - ADD - L2M Support */
2403 TRC3(cmUnpkRguDDatReqInfo);
2405 /* After Merging from 2.1 to 2.2 */
2406 /*rgu_c_001.main_5 - ADD - L2M Support */
2410 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2411 CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf);
2412 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
2414 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
2415 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
2416 CMCHKUNPK(SUnpkU32, &datReq->transId, mBuf);
2417 CMCHKUNPK(SUnpkU8, &datReq->nmbOfTbs, mBuf);
2418 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
2419 for (i=0; i<RGU_MAX_TB; i++)
2421 /*rgu_c_001.main_5 - ADD - L2M Support */
2423 /* After Merging from 2.1 to 2.2 */
2424 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
2430 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
2439 /***********************************************************
2441 * Func : cmPkRguCDatIndInfo
2444 * Desc : RguCDatIndInfo
2445 * DatInd from MAC to RLC on CCCH
2454 **********************************************************/
2456 PUBLIC S16 cmPkRguCDatIndInfo
2458 RguCDatIndInfo *param,
2462 PUBLIC S16 cmPkRguCDatIndInfo(param, mBuf)
2463 RguCDatIndInfo *param;
2469 TRC3(cmPkRguCDatIndInfo);
2471 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2473 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2475 SPutMsg(param->pdu);
2476 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2477 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2478 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2479 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2485 /***********************************************************
2487 * Func : cmUnpkRguCDatIndInfo
2490 * Desc : RguCDatIndInfo
2491 * DatInd from MAC to RLC on CCCH
2500 **********************************************************/
2502 PUBLIC S16 cmUnpkRguCDatIndInfo
2504 RguCDatIndInfo *param,
2508 PUBLIC S16 cmUnpkRguCDatIndInfo(param, mBuf)
2509 RguCDatIndInfo *param;
2513 MsgLen msgLen, totalMsgLen;
2515 TRC3(cmUnpkRguCDatIndInfo);
2517 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2518 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2519 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2520 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2521 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2523 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2530 /***********************************************************
2532 * Func : cmPkRguLchDatInd
2535 * Desc : RguLchDatInd
2536 * DatInd Information for a logical channel
2545 **********************************************************/
2547 PUBLIC S16 cmPkRguLchDatInd
2549 RguLchDatInd *param,
2553 PUBLIC S16 cmPkRguLchDatInd(param, mBuf)
2554 RguLchDatInd *param;
2558 TRC3(cmPkRguLchDatInd);
2560 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2561 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2567 /***********************************************************
2569 * Func : cmUnpkRguLchDatInd
2572 * Desc : RguLchDatInd
2573 * DatInd Information for a logical channel
2582 **********************************************************/
2584 PUBLIC S16 cmUnpkRguLchDatInd
2586 RguLchDatInd *param,
2590 PUBLIC S16 cmUnpkRguLchDatInd(param, mBuf)
2591 RguLchDatInd *param;
2595 TRC3(cmUnpkRguLchDatInd);
2597 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2598 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2604 /***********************************************************
2606 * Func : packRlcMacDataInfo
2610 * Data Indication from MAC to RLC for dedicated channels of a UE
2619 **********************************************************/
2621 PUBLIC S16 packRlcMacDataInfo
2627 PUBLIC S16 packRlcMacDataInfo(param, mBuf)
2635 TRC3(packRlcMacDataInfo);
2637 for (i=param->nmbPdu-1; i >= 0; i--)
2640 if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK)
2642 if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK)
2644 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2645 CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf);
2646 CMCHKPK(cmPkBool, param->pduInfo[i].commCh, mBuf);
2648 CMCHKPK(SPkU8, param->nmbPdu, mBuf);
2649 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2650 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2651 CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf);
2657 /***********************************************************
2659 * Func : unpackRlcMacDataInfo
2663 * Data Indication from MAC to RLC for dedicated channels of a UE
2672 **********************************************************/
2674 PUBLIC S16 unpackRlcMacDataInfo
2680 PUBLIC S16 unpackRlcMacDataInfo(param, mBuf)
2687 TRC3(unpackRlcMacDataInfo);
2689 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf);
2690 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2691 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2692 CMCHKUNPK(SUnpkU8, ¶m->nmbPdu, mBuf);
2693 for (i=0; i<param->nmbPdu; i++)
2697 CMCHKUNPK(cmUnpkBool, ¶m->pduInfo[i].commCh, mBuf);
2698 CMCHKUNPK(cmUnpkLteLcId, ¶m->pduInfo[i].lcId, mBuf);
2699 CMCHKUNPK(cmUnpkMsgLen, ¶m->pduInfo[i].pduLen, mBuf);
2700 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2702 if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, ¶m->pduInfo[i].pduBuf) != ROK)
2709 /***********************************************************
2711 * Func : cmPkRguCStaRspInfo
2714 * Desc : RguCStaRspInfo
2715 * Status Response from RLC to MAC for common logical channel
2724 **********************************************************/
2726 PUBLIC S16 cmPkRguCStaRspInfo
2728 RguCStaRspInfo *param,
2732 PUBLIC S16 cmPkRguCStaRspInfo(param, mBuf)
2733 RguCStaRspInfo *param;
2738 TRC3(cmPkRguCStaRspInfo);
2740 switch(param->lcType) {
2741 case CM_LTE_LCH_CCCH:
2742 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2744 case CM_LTE_LCH_BCCH:
2745 case CM_LTE_LCH_PCCH:
2746 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2748 CMCHKPK(SPkU8,param->pnb,mBuf);
2749 CMCHKPK(SPkU8,param->emtcDiReason,mBuf);
2755 CMCHKPK(SPkS32, param->bo, mBuf);
2756 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2757 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2758 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2764 /***********************************************************
2766 * Func : cmUnpkRguCStaRspInfo
2769 * Desc : RguCStaRspInfo
2770 * Status Response from RLC to MAC for common logical channel
2779 **********************************************************/
2781 PUBLIC S16 cmUnpkRguCStaRspInfo
2783 RguCStaRspInfo *param,
2787 PUBLIC S16 cmUnpkRguCStaRspInfo(param, mBuf)
2788 RguCStaRspInfo *param;
2793 TRC3(cmUnpkRguCStaRspInfo);
2795 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2796 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2797 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2798 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2799 switch(param->lcType) {
2800 case CM_LTE_LCH_BCCH:
2801 case CM_LTE_LCH_PCCH:
2803 CMCHKUNPK(SUnpkU8,¶m->emtcDiReason , mBuf);
2804 CMCHKUNPK(SUnpkU8,¶m->pnb , mBuf);
2806 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2808 case CM_LTE_LCH_CCCH:
2809 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2819 /***********************************************************
2821 * Func : packBOStatusInfo
2824 * Desc : RlcMacBOStatus
2825 * Status Response from RLC to MAC for dedicated logical channel
2834 **********************************************************/
2836 PUBLIC S16 packBOStatusInfo
2838 RlcMacBOStatus *param,
2842 PUBLIC S16 packBOStatusInfo(param, mBuf)
2843 RlcMacBOStatus *param;
2848 TRC3(packBOStatusInfo);
2850 CMCHKPK(SPkS32, param->bo, mBuf);
2851 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2852 CMCHKPK(cmPkBool, param->commCh, mBuf);
2853 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2854 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2856 } /* End of packBOStatusInfo */
2860 /***********************************************************
2862 * Func : unpackBOStatusInfo
2865 * Desc : RlcMacBOStatus
2866 * Status Response from RLC to MAC for dedicated logical channel
2875 **********************************************************/
2877 PUBLIC S16 unpackBOStatusInfo
2879 RlcMacBOStatus *param,
2883 PUBLIC S16 unpackBOStatusInfo(param, mBuf)
2884 RlcMacBOStatus *param;
2889 TRC3(unpackBOStatusInfo);
2891 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2892 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2893 CMCHKUNPK(cmUnpkBool, ¶m->commCh, mBuf);
2894 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2895 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2897 } /* End of unpackBOStatusInfo */
2900 /***********************************************************
2902 * Func : cmPkRguLchStaInd
2905 * Desc : RguLchStaInd
2906 * StaInd info for each logical channel of a UE
2915 **********************************************************/
2917 PUBLIC S16 cmPkRguLchStaInd
2919 RguLchStaInd *param,
2923 PUBLIC S16 cmPkRguLchStaInd(param, mBuf)
2924 RguLchStaInd *param;
2929 TRC3(cmPkRguLchStaInd);
2931 CMCHKPK(SPkS16, param->totBufSize, mBuf);
2932 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2938 /***********************************************************
2940 * Func : cmUnpkRguLchStaInd
2943 * Desc : RguLchStaInd
2944 * StaInd info for each logical channel of a UE
2953 **********************************************************/
2955 PUBLIC S16 cmUnpkRguLchStaInd
2957 RguLchStaInd *param,
2961 PUBLIC S16 cmUnpkRguLchStaInd(param, mBuf)
2962 RguLchStaInd *param;
2967 TRC3(cmUnpkRguLchStaInd);
2969 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2970 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
2975 /***********************************************************
2977 * Func : cmPkRguStaIndTb
2980 * Desc : RguStaIndTb
2981 * StaInd from RLC to MAC for dedicated channels of a UE
2990 **********************************************************/
2992 PUBLIC S16 cmPkRguStaIndTb
2998 PUBLIC S16 cmPkRguStaIndTb(param, mBuf)
3005 TRC3(cmPkRguStaIndTb);
3008 CMCHKPK(SPkU16, param->status, mBuf);
3009 CMCHKPK(SPkU32, param->tbId, mBuf);
3011 for (i=param->nmbLch-1; i >= 0; i--) {
3012 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3014 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3020 /***********************************************************
3022 * Func : cmUnpkRguStaIndTb
3025 * Desc : RguStaIndTb
3026 * StaInd from RLC to MAC for dedicated channels of a UE
3035 **********************************************************/
3037 PUBLIC S16 cmUnpkRguStaIndTb
3043 PUBLIC S16 cmUnpkRguStaIndTb(param, mBuf)
3050 TRC3(cmUnpkRguStaIndTb);
3052 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3053 for (i=0; i<param->nmbLch; i++) {
3054 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3057 CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf);
3058 CMCHKUNPK(SUnpkU16, ¶m->status, mBuf);
3064 /***********************************************************
3066 * Func : packSchedRepInfo
3069 * Desc : RlcMacSchedRep
3070 * StaInd from MAC to RLC for dedicated logical channels of a UE
3079 **********************************************************/
3080 PUBLIC S16 packSchedRepInfo
3082 RlcMacSchedRepInfo *param,
3088 TRC3(packSchedRepInfo);
3090 for(idx = (param->nmbLch-1); idx >= 0; idx--)
3092 CMCHKPK(cmPkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf);
3093 CMCHKPK(cmPkBool, param->lchSta[idx].commCh, mBuf);
3095 CMCHKPK(SPkU8, param->nmbLch, mBuf);
3096 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3097 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3098 CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf);
3101 } /* End of packSchedRepInfo */
3105 /***********************************************************
3107 * Func : unpackSchedRepInfo
3110 * Desc : RlcMacSchedRep
3111 * StaInd from MAC to RLC for dedicated logical channels of a UE
3120 **********************************************************/
3121 PUBLIC S16 unpackSchedRepInfo
3123 RlcMacSchedRepInfo *param,
3129 TRC3(unpackSchedRepInfo);
3131 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf);
3132 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3133 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3134 CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf);
3135 for(idx = 0; idx < param->nmbLch; idx++)
3137 CMCHKUNPK(cmUnpkBool, ¶m->lchSta[idx].commCh, mBuf);
3138 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf);
3142 } /* End of unpackSchedRepInfo */
3146 /**********************************************************************
3148 **********************************************************************/