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 *******************************************************************************/
20 /************************************************************************
26 Desc: C source code for pack/unpack of TFU interface primitives.
30 **********************************************************************/
33 @brief This file contains the packing/unpacking code for the TFU 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 "cm_mblk.h" /* Common LTE Defines */
48 #include "tfu.h" /* RGU Interface defines */
50 /* header/extern include files (.x) */
51 #include "gen.x" /* general */
52 #include "ssi.x" /* system services */
53 #include "cm_tkns.x" /* Common Token Definitions */
54 #include "cm_llist.x" /* Common Link List Definitions */
55 #include "cm_lib.x" /* Common Library Definitions */
56 #include "cm_hash.x" /* Common Hash List Definitions */
57 #include "cm_lte.x" /* Common LTE Defines */
58 #include "cm_mblk.x" /* Common LTE Defines */
59 #include "tfu.x" /* RGU Interface includes */
61 #include "du_app_mac_inf.h"
62 //#include "mac_sch_interface.h"
67 /***********************************************************
69 * Func : cmPkTfuBndReq
72 * Desc : This API is used to send a Bind Request from MAC to PHY.
73 * @param pst Pointer to the post structure.
74 * @param suId SAP ID of the service user.
75 * @param spId SAP ID of the service provider.
85 **********************************************************/
87 PUBLIC S16 cmPkTfuBndReq
94 PUBLIC S16 cmPkTfuBndReq(pst, suId, spId)
100 Buffer *mBuf = NULLP;
103 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
104 #if (ERRCLASS & ERRCLS_ADD_RES)
105 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
106 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
107 (ErrVal)ETFU001, (ErrVal)0, "Packing failed");
111 if (SPkS16(spId, mBuf) != ROK) {
112 #if (ERRCLASS & ERRCLS_ADD_RES)
113 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
114 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
115 (ErrVal)ETFU002, (ErrVal)0, "Packing failed");
120 if (SPkS16(suId, mBuf) != ROK) {
121 #if (ERRCLASS & ERRCLS_ADD_RES)
122 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
123 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
124 (ErrVal)ETFU003, (ErrVal)0, "Packing failed");
129 pst->event = (Event) EVTTFUBNDREQ;
130 RETVALUE(SPstTsk(pst,mBuf));
134 /***********************************************************
136 * Func : cmUnpkTfuBndReq
139 * Desc : This API is used to send a Bind Request from MAC to PHY.
140 * @param pst Pointer to the post structure.
141 * @param suId SAP ID of the service user.
142 * @param spId SAP ID of the service provider.
143 * @return ROK/RFAILED
152 **********************************************************/
154 PUBLIC S16 cmUnpkTfuBndReq
161 PUBLIC S16 cmUnpkTfuBndReq(func, pst, mBuf)
170 TRC3(cmUnpkTfuBndReq)
172 if (SUnpkS16(&suId, mBuf) != ROK) {
174 #if (ERRCLASS & ERRCLS_ADD_RES)
175 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
176 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
177 (ErrVal)ETFU004, (ErrVal)0, "Packing failed");
181 if (SUnpkS16(&spId, mBuf) != ROK) {
183 #if (ERRCLASS & ERRCLS_ADD_RES)
184 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
185 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
186 (ErrVal)ETFU005, (ErrVal)0, "Packing failed");
191 RETVALUE((*func)(pst, suId, spId));
195 /***********************************************************
197 * Func : cmPkTfuBndCfm
200 * Desc : This API is used to receive a Bind Confirm from PHY to MAC.
201 * @param pst Pointer to the post structure.
202 * @param suId SAP ID of the service user.
203 * @param status Status of the bind request.
204 * @return ROK/RFAILED
213 **********************************************************/
215 PUBLIC S16 cmPkTfuBndCfm
222 PUBLIC S16 cmPkTfuBndCfm(pst, suId, status)
228 Buffer *mBuf = NULLP;
231 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
232 #if (ERRCLASS & ERRCLS_ADD_RES)
233 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
234 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
235 (ErrVal)ETFU006, (ErrVal)0, "Packing failed");
239 if (SPkU8(status, mBuf) != ROK) {
240 #if (ERRCLASS & ERRCLS_ADD_RES)
241 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
242 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
243 (ErrVal)ETFU007, (ErrVal)0, "Packing failed");
248 if (SPkS16(suId, mBuf) != ROK) {
249 #if (ERRCLASS & ERRCLS_ADD_RES)
250 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
251 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
252 (ErrVal)ETFU008, (ErrVal)0, "Packing failed");
257 pst->event = (Event) EVTTFUBNDCFM;
258 RETVALUE(SPstTsk(pst,mBuf));
262 /***********************************************************
264 * Func : cmUnpkTfuBndCfm
267 * Desc : This API is used to receive a Bind Confirm from PHY to MAC.
268 * @param pst Pointer to the post structure.
269 * @param suId SAP ID of the service user.
270 * @param status Status of the bind request.
271 * @return ROK/RFAILED
280 **********************************************************/
282 PUBLIC S16 cmUnpkTfuBndCfm
289 PUBLIC S16 cmUnpkTfuBndCfm(func, pst, mBuf)
298 TRC3(cmUnpkTfuBndCfm)
300 if (SUnpkS16(&suId, mBuf) != ROK) {
302 #if (ERRCLASS & ERRCLS_ADD_RES)
303 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
304 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
305 (ErrVal)ETFU009, (ErrVal)0, "Packing failed");
309 if (SUnpkU8(&status, mBuf) != ROK) {
311 #if (ERRCLASS & ERRCLS_ADD_RES)
312 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
313 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
314 (ErrVal)ETFU010, (ErrVal)0, "Packing failed");
319 RETVALUE((*func)(pst, suId, status));
323 /***********************************************************
325 * Func : cmPkTfuUbndReq
328 * Desc : This API is used to send an Unbind Request from MAC to PHY.
329 * @param pst Pointer to the post structure.
330 * @param suId SAP ID of the service provider.
331 * @param reason Reason for Unbind request.
332 * @return ROK/RFAILED
341 **********************************************************/
343 PUBLIC S16 cmPkTfuUbndReq
350 PUBLIC S16 cmPkTfuUbndReq(pst, spId, reason)
356 Buffer *mBuf = NULLP;
359 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
360 #if (ERRCLASS & ERRCLS_ADD_RES)
361 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
362 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
363 (ErrVal)ETFU011, (ErrVal)0, "Packing failed");
367 if (SPkS16(reason, mBuf) != ROK) {
368 #if (ERRCLASS & ERRCLS_ADD_RES)
369 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
370 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
371 (ErrVal)ETFU012, (ErrVal)0, "Packing failed");
376 if (SPkS16(spId, mBuf) != ROK) {
377 #if (ERRCLASS & ERRCLS_ADD_RES)
378 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
379 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
380 (ErrVal)ETFU013, (ErrVal)0, "Packing failed");
385 pst->event = (Event) EVTTFUUBNDREQ;
386 RETVALUE(SPstTsk(pst,mBuf));
390 /***********************************************************
392 * Func : cmUnpkTfuUbndReq
395 * Desc : This API is used to send an Unbind Request from MAC to PHY.
396 * @param pst Pointer to the post structure.
397 * @param suId SAP ID of the service provider.
398 * @param reason Reason for Unbind request.
399 * @return ROK/RFAILED
408 **********************************************************/
410 PUBLIC S16 cmUnpkTfuUbndReq
417 PUBLIC S16 cmUnpkTfuUbndReq(func, pst, mBuf)
426 TRC3(cmUnpkTfuUbndReq)
428 if (SUnpkS16(&spId, mBuf) != ROK) {
430 #if (ERRCLASS & ERRCLS_ADD_RES)
431 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
432 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
433 (ErrVal)ETFU014, (ErrVal)0, "Packing failed");
437 if (SUnpkS16(&reason, mBuf) != ROK) {
439 #if (ERRCLASS & ERRCLS_ADD_RES)
440 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
441 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
442 (ErrVal)ETFU015, (ErrVal)0, "Packing failed");
447 RETVALUE((*func)(pst, spId, reason));
451 /***********************************************************
453 * Func : cmPkTfuSchBndReq
456 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
457 * @param pst Pointer to the post structure.
458 * @param suId SAP ID of the service user.
459 * @param spId SAP ID of the service provider.
460 * @return ROK/RFAILED
469 **********************************************************/
471 PUBLIC S16 cmPkTfuSchBndReq
478 PUBLIC S16 cmPkTfuSchBndReq(pst, suId, spId)
484 Buffer *mBuf = NULLP;
485 TRC3(cmPkTfuSchBndReq)
487 if (SGetMsg(pst->region, pst->pool, &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)ETFU016, (ErrVal)0, "Packing failed");
495 if (SPkS16(spId, mBuf) != ROK) {
496 #if (ERRCLASS & ERRCLS_ADD_RES)
497 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
498 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
499 (ErrVal)ETFU017, (ErrVal)0, "Packing failed");
504 if (SPkS16(suId, mBuf) != ROK) {
505 #if (ERRCLASS & ERRCLS_ADD_RES)
506 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
507 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
508 (ErrVal)ETFU018, (ErrVal)0, "Packing failed");
513 pst->event = (Event) EVTTFUSCHBNDREQ;
514 RETVALUE(SPstTsk(pst,mBuf));
518 /***********************************************************
520 * Func : cmUnpkTfuSchBndReq
523 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
524 * @param pst Pointer to the post structure.
525 * @param suId SAP ID of the service user.
526 * @param spId SAP ID of the service provider.
527 * @return ROK/RFAILED
536 **********************************************************/
538 PUBLIC S16 cmUnpkTfuSchBndReq
545 PUBLIC S16 cmUnpkTfuSchBndReq(func, pst, mBuf)
554 TRC3(cmUnpkTfuSchBndReq)
556 if (SUnpkS16(&suId, mBuf) != ROK) {
558 #if (ERRCLASS & ERRCLS_ADD_RES)
559 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
560 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
561 (ErrVal)ETFU019, (ErrVal)0, "Packing failed");
565 if (SUnpkS16(&spId, mBuf) != ROK) {
567 #if (ERRCLASS & ERRCLS_ADD_RES)
568 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
569 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
570 (ErrVal)ETFU020, (ErrVal)0, "Packing failed");
575 RETVALUE((*func)(pst, suId, spId));
579 /***********************************************************
581 * Func : cmPkTfuSchBndCfm
584 * Desc : This API is used to receive a Bind Confirm from PHY to Scheduler.
585 * @param pst Pointer to the post structure.
586 * @param suId SAP ID of the service user.
587 * @param status Status of the bind request.
588 * @return ROK/RFAILED
597 **********************************************************/
599 PUBLIC S16 cmPkTfuSchBndCfm
606 PUBLIC S16 cmPkTfuSchBndCfm(pst, suId, status)
612 Buffer *mBuf = NULLP;
613 TRC3(cmPkTfuSchBndCfm)
615 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
616 #if (ERRCLASS & ERRCLS_ADD_RES)
617 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
618 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
619 (ErrVal)ETFU021, (ErrVal)0, "Packing failed");
623 if (SPkU8(status, mBuf) != ROK) {
624 #if (ERRCLASS & ERRCLS_ADD_RES)
625 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
626 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
627 (ErrVal)ETFU022, (ErrVal)0, "Packing failed");
632 if (SPkS16(suId, mBuf) != ROK) {
633 #if (ERRCLASS & ERRCLS_ADD_RES)
634 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
635 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
636 (ErrVal)ETFU023, (ErrVal)0, "Packing failed");
641 pst->event = (Event) EVTTFUSCHBNDCFM;
642 RETVALUE(SPstTsk(pst,mBuf));
646 /***********************************************************
648 * Func : cmUnpkTfuSchBndCfm
651 * Desc : This API is used to receive a Bind Confirm from PHY to Scheduler.
652 * @param pst Pointer to the post structure.
653 * @param suId SAP ID of the service user.
654 * @param status Status of the bind request.
655 * @return ROK/RFAILED
664 **********************************************************/
666 PUBLIC S16 cmUnpkTfuSchBndCfm
673 PUBLIC S16 cmUnpkTfuSchBndCfm(func, pst, mBuf)
682 TRC3(cmUnpkTfuSchBndCfm)
684 if (SUnpkS16(&suId, mBuf) != ROK) {
686 #if (ERRCLASS & ERRCLS_ADD_RES)
687 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
688 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
689 (ErrVal)ETFU024, (ErrVal)0, "Packing failed");
693 if (SUnpkU8(&status, mBuf) != ROK) {
695 #if (ERRCLASS & ERRCLS_ADD_RES)
696 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
697 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
698 (ErrVal)ETFU025, (ErrVal)0, "Packing failed");
703 RETVALUE((*func)(pst, suId, status));
707 /***********************************************************
709 * Func : cmPkTfuSchUbndReq
712 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
713 * @param pst Pointer to the post structure.
714 * @param suId SAP ID of the service provider.
715 * @param reason Reason for Unbind request.
716 * @return ROK/RFAILED
725 **********************************************************/
727 PUBLIC S16 cmPkTfuSchUbndReq
734 PUBLIC S16 cmPkTfuSchUbndReq(pst, spId, reason)
740 Buffer *mBuf = NULLP;
741 TRC3(cmPkTfuSchUbndReq)
743 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
744 #if (ERRCLASS & ERRCLS_ADD_RES)
745 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
746 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
747 (ErrVal)ETFU026, (ErrVal)0, "Packing failed");
751 if (SPkS16(reason, mBuf) != ROK) {
752 #if (ERRCLASS & ERRCLS_ADD_RES)
753 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
754 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
755 (ErrVal)ETFU027, (ErrVal)0, "Packing failed");
760 if (SPkS16(spId, mBuf) != ROK) {
761 #if (ERRCLASS & ERRCLS_ADD_RES)
762 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
763 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
764 (ErrVal)ETFU028, (ErrVal)0, "Packing failed");
769 pst->event = (Event) EVTTFUSCHUBNDREQ;
770 RETVALUE(SPstTsk(pst,mBuf));
774 /***********************************************************
776 * Func : cmUnpkTfuSchUbndReq
779 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
780 * @param pst Pointer to the post structure.
781 * @param suId SAP ID of the service provider.
782 * @param reason Reason for Unbind request.
783 * @return ROK/RFAILED
792 **********************************************************/
794 PUBLIC S16 cmUnpkTfuSchUbndReq
801 PUBLIC S16 cmUnpkTfuSchUbndReq(func, pst, mBuf)
810 TRC3(cmUnpkTfuSchUbndReq)
812 if (SUnpkS16(&spId, mBuf) != ROK) {
814 #if (ERRCLASS & ERRCLS_ADD_RES)
815 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
816 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
817 (ErrVal)ETFU029, (ErrVal)0, "Packing failed");
821 if (SUnpkS16(&reason, mBuf) != ROK) {
823 #if (ERRCLASS & ERRCLS_ADD_RES)
824 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
825 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
826 (ErrVal)ETFU030, (ErrVal)0, "Packing failed");
831 RETVALUE((*func)(pst, spId, reason));
835 /***********************************************************
837 * Func : cmPkTfuRaReqInd
840 * Desc : This API is used to indication Random Access Request reception from
842 * @details This primitive is used by physical layer to indicate the reception
843 * of a Random Access Request from a set of UEs. The information passed consists
844 * of the RA-RNTI and the list of preambles received.
845 * @param pst Pointer to the post structure.
846 * @param suId SAP ID of the service user.
847 * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
848 * @return ROK/RFAILED
857 **********************************************************/
859 PUBLIC S16 cmPkTfuRaReqInd
863 TfuRaReqIndInfo * raReqInd
866 PUBLIC S16 cmPkTfuRaReqInd(pst, suId, raReqInd)
869 TfuRaReqIndInfo * raReqInd;
872 Buffer *mBuf = NULLP;
873 TRC3(cmPkTfuRaReqInd)
875 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
876 #if (ERRCLASS & ERRCLS_ADD_RES)
877 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
878 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
879 (ErrVal)ETFU031, (ErrVal)0, "Packing failed");
881 TFU_FREE_MEM(raReqInd);
884 if (pst->selector == TFU_SEL_LC) {
885 if (cmPkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) {
886 #if (ERRCLASS & ERRCLS_ADD_RES)
887 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
888 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
889 (ErrVal)ETFU032, (ErrVal)0, "Packing failed");
891 TFU_FREE_MEM(raReqInd);
896 else if(pst->selector == TFU_SEL_LWLC)
898 if (cmPkPtr((PTR)raReqInd, mBuf) != ROK)
900 #if (ERRCLASS & ERRCLS_ADD_RES)
901 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
902 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
903 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
905 TFU_FREE_MEM(raReqInd);
911 if (SPkS16(suId, mBuf) != ROK) {
912 #if (ERRCLASS & ERRCLS_ADD_RES)
913 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
914 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
915 (ErrVal)ETFU033, (ErrVal)0, "Packing failed");
917 TFU_FREE_MEM(raReqInd);
921 if (pst->selector != TFU_SEL_LWLC) {
922 TFU_FREE_MEM(raReqInd);
925 pst->event = (Event) EVTTFURAREQIND;
926 RETVALUE(SPstTsk(pst,mBuf));
930 /***********************************************************
932 * Func : cmUnpkTfuRaReqInd
935 * Desc : This API is used to indication Random Access Request reception from
937 * @details This primitive is used by physical layer to indicate the reception
938 * of a Random Access Request from a set of UEs. The information passed consists
939 * of the RA-RNTI and the list of preambles received.
940 * @param pst Pointer to the post structure.
941 * @param suId SAP ID of the service user.
942 * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
943 * @return ROK/RFAILED
952 **********************************************************/
954 PUBLIC S16 cmUnpkTfuRaReqInd
961 PUBLIC S16 cmUnpkTfuRaReqInd(func, pst, mBuf)
968 TfuRaReqIndInfo *raReqInd;
970 TRC3(cmUnpkTfuRaReqInd)
972 if (SUnpkS16(&suId, mBuf) != ROK) {
974 #if (ERRCLASS & ERRCLS_ADD_RES)
975 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
976 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
977 (ErrVal)ETFU034, (ErrVal)0, "Packing failed");
981 if (pst->selector != TFU_SEL_LWLC) {
983 sMem.region = pst->region;
984 sMem.pool = pst->pool;
985 if ((cmAllocEvnt(sizeof(TfuRaReqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&raReqInd)) != ROK) {
986 #if (ERRCLASS & ERRCLS_ADD_RES)
987 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
988 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
989 (ErrVal)ETFU035, (ErrVal)0, "Packing failed");
997 if (pst->selector == TFU_SEL_LC)
999 if (cmUnpkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) {
1000 TFU_FREE_MEM(raReqInd);
1002 #if (ERRCLASS & ERRCLS_ADD_RES)
1003 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1004 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1005 (ErrVal)ETFU036, (ErrVal)0, "Packing failed");
1010 else if(pst->selector == TFU_SEL_LWLC)
1012 if (cmUnpkPtr((PTR *)&raReqInd, mBuf) != ROK)
1014 #if (ERRCLASS & ERRCLS_ADD_RES)
1015 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1016 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1017 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1019 TFU_FREE_MEM(raReqInd);
1025 RETVALUE((*func)(pst, suId, raReqInd));
1029 /***********************************************************
1031 * Func : cmPkTfuRecpReq
1034 * Desc : This primitive is sent from Scheduler to PHY.
1035 * @details This primitive provides PHY with all the information required by
1036 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
1037 * -# On PUCCH UE can transmit the following
1043 * -# On PUSCH UE can transmit the following
1046 * -# Data + HARQ Feedback
1047 * This primitive carries all the information for the expected subframe for all
1048 * the UEs that have been scheduled to transmit.
1049 * @param pst Pointer to the post structure.
1050 * @param spId SAP ID of the service provider.
1051 * @param recpReq Pointer to the TfuRecpReqInfo structure.
1052 * @return ROK/RFAILED
1061 **********************************************************/
1063 PUBLIC S16 cmPkTfuRecpReq
1067 TfuRecpReqInfo * recpReq
1070 PUBLIC S16 cmPkTfuRecpReq(pst, spId, recpReq)
1073 TfuRecpReqInfo * recpReq;
1076 Buffer *mBuf = NULLP;
1077 TRC3(cmPkTfuRecpReq)
1079 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1080 #if (ERRCLASS & ERRCLS_ADD_RES)
1081 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1082 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1083 (ErrVal)ETFU037, (ErrVal)0, "Packing failed");
1085 TFU_FREE_MEM(recpReq);
1088 if (pst->selector == TFU_SEL_LC) {
1089 if (cmPkTfuRecpReqInfo(recpReq, mBuf) != ROK) {
1090 #if (ERRCLASS & ERRCLS_ADD_RES)
1091 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1092 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1093 (ErrVal)ETFU038, (ErrVal)0, "Packing failed");
1095 TFU_FREE_MEM(recpReq);
1100 else if(pst->selector == TFU_SEL_LWLC)
1102 if (cmPkPtr((PTR)recpReq, mBuf) != ROK)
1104 #if (ERRCLASS & ERRCLS_ADD_RES)
1105 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1106 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1107 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1109 TFU_FREE_MEM(recpReq);
1116 if (SPkS16(spId, mBuf) != ROK) {
1117 #if (ERRCLASS & ERRCLS_ADD_RES)
1118 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1119 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1120 (ErrVal)ETFU039, (ErrVal)0, "Packing failed");
1122 TFU_FREE_MEM(recpReq);
1126 if (pst->selector != TFU_SEL_LWLC) {
1127 TFU_FREE_MEM(recpReq);
1130 pst->event = (Event) EVTTFURECPREQ;
1131 RETVALUE(SPstTsk(pst,mBuf));
1135 /***********************************************************
1137 * Func : cmUnpkTfuRecpReq
1140 * Desc : This primitive is sent from Scheduler to PHY.
1141 * @details This primitive provides PHY with all the information required by
1142 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
1143 * -# On PUCCH UE can transmit the following
1149 * -# On PUSCH UE can transmit the following
1152 * -# Data + HARQ Feedback
1153 * This primitive carries all the information for the expected subframe for all
1154 * the UEs that have been scheduled to transmit.
1155 * @param pst Pointer to the post structure.
1156 * @param spId SAP ID of the service provider.
1157 * @param recpReq Pointer to the TfuRecpReqInfo structure.
1158 * @return ROK/RFAILED
1167 **********************************************************/
1169 PUBLIC S16 cmUnpkTfuRecpReq
1176 PUBLIC S16 cmUnpkTfuRecpReq(func, pst, mBuf)
1183 TfuRecpReqInfo *recpReq;
1185 TRC3(cmUnpkTfuRecpReq)
1187 if (SUnpkS16(&spId, mBuf) != ROK) {
1189 #if (ERRCLASS & ERRCLS_ADD_RES)
1190 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1191 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1192 (ErrVal)ETFU040, (ErrVal)0, "Packing failed");
1196 if (pst->selector != TFU_SEL_LWLC) {
1198 sMem.region = pst->region;
1199 sMem.pool = pst->pool;
1200 if ((cmAllocEvnt(sizeof(TfuRecpReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&recpReq)) != ROK) {
1201 #if (ERRCLASS & ERRCLS_ADD_RES)
1202 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1203 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1204 (ErrVal)ETFU041, (ErrVal)0, "Packing failed");
1210 else if(pst->selector == TFU_SEL_LWLC)
1212 if (cmUnpkPtr((PTR *)&recpReq, mBuf) != ROK)
1214 #if (ERRCLASS & ERRCLS_ADD_RES)
1215 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1216 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1217 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1219 TFU_FREE_MEM(recpReq);
1225 if (pst->selector == TFU_SEL_LC)
1227 if (cmUnpkTfuRecpReqInfo(recpReq, (Ptr)&recpReq->memCp, mBuf) != ROK) {
1228 TFU_FREE_MEM(recpReq);
1230 #if (ERRCLASS & ERRCLS_ADD_RES)
1231 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1232 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1233 (ErrVal)ETFU042, (ErrVal)0, "Packing failed");
1238 else if(pst->selector == TFU_SEL_LWLC)
1240 if (cmUnpkPtr((PTR*)&recpReq, mBuf) != ROK)
1242 #if (ERRCLASS & ERRCLS_ADD_RES)
1243 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1244 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1245 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1247 TFU_FREE_MEM(recpReq);
1254 RETVALUE((*func)(pst, spId, recpReq));
1258 /***********************************************************
1260 * Func : cmPkTfuUlCqiInd
1263 * Desc : This API is used to indicate CQI reporting from PHY to Scheduler
1264 * @details This primitive carries an estimate of the uplink Channel quality
1265 * index (CQI) for a list of UEs. This is an extimate of the uplink channel
1266 * quality i.e. the transmission from UE as calculated at the Physical layer at
1268 * It carries a list of subband CQIs for each UE.
1269 * @param pst Pointer to the post structure.
1270 * @param suId SAP ID of the service user.
1271 * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
1272 * @return ROK/RFAILED
1281 **********************************************************/
1283 PUBLIC S16 cmPkTfuUlCqiInd
1287 TfuUlCqiIndInfo * ulCqiInd
1290 PUBLIC S16 cmPkTfuUlCqiInd(pst, suId, ulCqiInd)
1293 TfuUlCqiIndInfo * ulCqiInd;
1296 Buffer *mBuf = NULLP;
1297 TRC3(cmPkTfuUlCqiInd)
1299 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1300 #if (ERRCLASS & ERRCLS_ADD_RES)
1301 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1302 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1303 (ErrVal)ETFU043, (ErrVal)0, "Packing failed");
1305 TFU_FREE_MEM(ulCqiInd);
1308 if (pst->selector == TFU_SEL_LC) {
1309 if (cmPkTfuUlCqiIndInfo(ulCqiInd, mBuf) != ROK) {
1310 #if (ERRCLASS & ERRCLS_ADD_RES)
1311 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1312 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1313 (ErrVal)ETFU044, (ErrVal)0, "Packing failed");
1315 TFU_FREE_MEM(ulCqiInd);
1320 else if(pst->selector == TFU_SEL_LWLC)
1322 if (cmPkPtr((PTR)ulCqiInd, mBuf) != ROK)
1324 #if (ERRCLASS & ERRCLS_ADD_RES)
1325 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1326 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1327 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1329 TFU_FREE_MEM(ulCqiInd);
1335 if (SPkS16(suId, mBuf) != ROK) {
1336 #if (ERRCLASS & ERRCLS_ADD_RES)
1337 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1338 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1339 (ErrVal)ETFU045, (ErrVal)0, "Packing failed");
1341 TFU_FREE_MEM(ulCqiInd);
1345 if (pst->selector != TFU_SEL_LWLC) {
1346 TFU_FREE_MEM(ulCqiInd);
1349 pst->event = (Event) EVTTFUULCQIIND;
1350 RETVALUE(SPstTsk(pst,mBuf));
1354 /***********************************************************
1356 * Func : cmUnpkTfuUlCqiInd
1359 * Desc : This API is used to indicate CQI reporting from PHY to Scheduler
1360 * @details This primitive carries an estimate of the uplink Channel quality
1361 * index (CQI) for a list of UEs. This is an extimate of the uplink channel
1362 * quality i.e. the transmission from UE as calculated at the Physical layer at
1364 * It carries a list of subband CQIs for each UE.
1365 * @param pst Pointer to the post structure.
1366 * @param suId SAP ID of the service user.
1367 * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
1368 * @return ROK/RFAILED
1377 **********************************************************/
1379 PUBLIC S16 cmUnpkTfuUlCqiInd
1386 PUBLIC S16 cmUnpkTfuUlCqiInd(func, pst, mBuf)
1393 TfuUlCqiIndInfo *ulCqiInd;
1395 TRC3(cmUnpkTfuUlCqiInd)
1397 if (SUnpkS16(&suId, mBuf) != ROK) {
1399 #if (ERRCLASS & ERRCLS_ADD_RES)
1400 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1401 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1402 (ErrVal)ETFU046, (ErrVal)0, "Packing failed");
1406 if (pst->selector != TFU_SEL_LWLC) {
1408 sMem.region = pst->region;
1409 sMem.pool = pst->pool;
1410 if ((cmAllocEvnt(sizeof(TfuUlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&ulCqiInd)) != ROK) {
1411 #if (ERRCLASS & ERRCLS_ADD_RES)
1412 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1413 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1414 (ErrVal)ETFU047, (ErrVal)0, "Packing failed");
1422 if (pst->selector == TFU_SEL_LC)
1424 if (cmUnpkTfuUlCqiIndInfo(ulCqiInd, (Ptr)&ulCqiInd->memCp, mBuf) != ROK) {
1425 TFU_FREE_MEM(ulCqiInd);
1427 #if (ERRCLASS & ERRCLS_ADD_RES)
1428 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1429 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1430 (ErrVal)ETFU048, (ErrVal)0, "Packing failed");
1435 else if(pst->selector == TFU_SEL_LWLC)
1437 if (cmUnpkPtr((PTR *)&ulCqiInd, mBuf) != ROK)
1439 #if (ERRCLASS & ERRCLS_ADD_RES)
1440 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1441 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1442 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1444 TFU_FREE_MEM(ulCqiInd);
1450 RETVALUE((*func)(pst, suId, ulCqiInd));
1454 /***********************************************************
1456 * Func : cmPkTfuHqInd
1459 * Desc : This Primitive carries the HARQ Feedback from PHY to scheduler
1460 * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
1461 * could successfully recieve the data transmitted by the eNodeB, else a NACK is
1462 * sent. This feedback is utilized by MAC for further scheduling, for instance
1463 * it could schedule an adaptive retransmission of the same data.
1466 * @param tfuHqInd pointer to TfuHqIndInfo
1476 **********************************************************/
1478 PUBLIC S16 cmPkTfuHqInd
1482 TfuHqIndInfo * hqInd
1485 PUBLIC S16 cmPkTfuHqInd(pst, spId, hqInd)
1488 TfuHqIndInfo * hqInd;
1491 Buffer *mBuf = NULLP;
1494 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1495 #if (ERRCLASS & ERRCLS_ADD_RES)
1496 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1497 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1498 (ErrVal)ETFU049, (ErrVal)0, "Packing failed");
1500 TFU_FREE_MEM(hqInd);
1503 if (pst->selector == TFU_SEL_LC) {
1504 if (cmPkTfuHqIndInfo(hqInd, mBuf) != ROK) {
1505 #if (ERRCLASS & ERRCLS_ADD_RES)
1506 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1507 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1508 (ErrVal)ETFU050, (ErrVal)0, "Packing failed");
1510 TFU_FREE_MEM(hqInd);
1515 else if(pst->selector == TFU_SEL_LWLC)
1517 if (cmPkPtr((PTR)hqInd, mBuf) != ROK)
1519 #if (ERRCLASS & ERRCLS_ADD_RES)
1520 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1521 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1522 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1524 TFU_FREE_MEM(hqInd);
1530 if (SPkS16(spId, mBuf) != ROK) {
1531 #if (ERRCLASS & ERRCLS_ADD_RES)
1532 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1533 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1534 (ErrVal)ETFU051, (ErrVal)0, "Packing failed");
1536 TFU_FREE_MEM(hqInd);
1540 if (pst->selector != TFU_SEL_LWLC) {
1541 TFU_FREE_MEM(hqInd);
1544 pst->event = (Event) EVTTFUHQIND;
1545 RETVALUE(SPstTsk(pst,mBuf));
1549 /***********************************************************
1551 * Func : cmUnpkTfuHqInd
1554 * Desc : This Primitive carries the HARQ Feedback from PHY to scheduler
1555 * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
1556 * could successfully recieve the data transmitted by the eNodeB, else a NACK is
1557 * sent. This feedback is utilized by MAC for further scheduling, for instance
1558 * it could schedule an adaptive retransmission of the same data.
1561 * @param tfuHqInd pointer to TfuHqIndInfo
1571 **********************************************************/
1573 PUBLIC S16 cmUnpkTfuHqInd
1580 PUBLIC S16 cmUnpkTfuHqInd(func, pst, mBuf)
1587 TfuHqIndInfo *hqInd;
1589 TRC3(cmUnpkTfuHqInd)
1591 if (SUnpkS16(&spId, mBuf) != ROK) {
1593 #if (ERRCLASS & ERRCLS_ADD_RES)
1594 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1595 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1596 (ErrVal)ETFU052, (ErrVal)0, "Packing failed");
1600 if (pst->selector != TFU_SEL_LWLC) {
1602 sMem.region = pst->region;
1603 sMem.pool = pst->pool;
1604 if ((cmAllocEvnt(sizeof(TfuHqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&hqInd)) != ROK) {
1605 #if (ERRCLASS & ERRCLS_ADD_RES)
1606 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1607 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1608 (ErrVal)ETFU053, (ErrVal)0, "Packing failed");
1616 if (pst->selector == TFU_SEL_LC)
1618 if (cmUnpkTfuHqIndInfo(hqInd, (Ptr)&hqInd->memCp, mBuf) != ROK) {
1619 TFU_FREE_MEM(hqInd);
1621 #if (ERRCLASS & ERRCLS_ADD_RES)
1622 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1623 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1624 (ErrVal)ETFU054, (ErrVal)0, "Packing failed");
1629 else if(pst->selector == TFU_SEL_LWLC)
1631 if (cmUnpkPtr((PTR *)&hqInd, mBuf) != ROK)
1633 #if (ERRCLASS & ERRCLS_ADD_RES)
1634 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1635 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1636 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1638 TFU_FREE_MEM(hqInd);
1644 RETVALUE((*func)(pst, spId, hqInd));
1648 /***********************************************************
1650 * Func : cmPkTfuSrInd
1653 * Desc : This Primitive carries the SR Indication from PHY to scheduler.
1654 * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
1655 * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
1656 * UEs received in the indicated subframe.
1659 * @param tfqSrInd pointer to TfuSrIndInfo
1669 **********************************************************/
1671 PUBLIC S16 cmPkTfuSrInd
1675 TfuSrIndInfo * srInd
1678 PUBLIC S16 cmPkTfuSrInd(pst, spId, srInd)
1681 TfuSrIndInfo * srInd;
1684 Buffer *mBuf = NULLP;
1687 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1688 #if (ERRCLASS & ERRCLS_ADD_RES)
1689 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1690 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1691 (ErrVal)ETFU055, (ErrVal)0, "Packing failed");
1693 TFU_FREE_MEM(srInd);
1696 if (pst->selector == TFU_SEL_LC) {
1697 if (cmPkTfuSrIndInfo(srInd, mBuf) != ROK) {
1698 #if (ERRCLASS & ERRCLS_ADD_RES)
1699 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1700 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1701 (ErrVal)ETFU056, (ErrVal)0, "Packing failed");
1703 TFU_FREE_MEM(srInd);
1708 else if(pst->selector == TFU_SEL_LWLC)
1710 if (cmPkPtr((PTR)srInd, mBuf) != ROK)
1712 #if (ERRCLASS & ERRCLS_ADD_RES)
1713 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1714 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1715 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1717 TFU_FREE_MEM(srInd);
1723 if (SPkS16(spId, mBuf) != ROK) {
1724 #if (ERRCLASS & ERRCLS_ADD_RES)
1725 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1726 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1727 (ErrVal)ETFU057, (ErrVal)0, "Packing failed");
1729 TFU_FREE_MEM(srInd);
1733 if (pst->selector != TFU_SEL_LWLC) {
1734 TFU_FREE_MEM(srInd);
1737 pst->event = (Event) EVTTFUSRIND;
1738 RETVALUE(SPstTsk(pst,mBuf));
1742 /***********************************************************
1744 * Func : cmUnpkTfuSrInd
1747 * Desc : This Primitive carries the SR Indication from PHY to scheduler.
1748 * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
1749 * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
1750 * UEs received in the indicated subframe.
1753 * @param tfqSrInd pointer to TfuSrIndInfo
1763 **********************************************************/
1765 PUBLIC S16 cmUnpkTfuSrInd
1772 PUBLIC S16 cmUnpkTfuSrInd(func, pst, mBuf)
1779 TfuSrIndInfo *srInd;
1781 TRC3(cmUnpkTfuSrInd)
1783 if (SUnpkS16(&spId, mBuf) != ROK) {
1785 #if (ERRCLASS & ERRCLS_ADD_RES)
1786 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1787 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1788 (ErrVal)ETFU058, (ErrVal)0, "Packing failed");
1792 if (pst->selector != TFU_SEL_LWLC) {
1794 sMem.region = pst->region;
1795 sMem.pool = pst->pool;
1796 if ((cmAllocEvnt(sizeof(TfuSrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srInd)) != ROK) {
1797 #if (ERRCLASS & ERRCLS_ADD_RES)
1798 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1799 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1800 (ErrVal)ETFU059, (ErrVal)0, "Packing failed");
1808 if (pst->selector == TFU_SEL_LC)
1810 if (cmUnpkTfuSrIndInfo(srInd, (Ptr)&srInd->memCp, mBuf) != ROK) {
1811 TFU_FREE_MEM(srInd);
1813 #if (ERRCLASS & ERRCLS_ADD_RES)
1814 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1815 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1816 (ErrVal)ETFU060, (ErrVal)0, "Packing failed");
1821 else if(pst->selector == TFU_SEL_LWLC)
1823 if (cmUnpkPtr((PTR *)&srInd, mBuf) != ROK)
1825 #if (ERRCLASS & ERRCLS_ADD_RES)
1826 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1827 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1828 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1830 TFU_FREE_MEM(srInd);
1836 RETVALUE((*func)(pst, spId, srInd));
1840 /***********************************************************
1842 * Func : cmPkTfuDlCqiInd
1845 * Desc : This API is used to indicate the reception of CQI report from PHY to
1846 * Scheduler, also carries the RI.
1847 * @param pst Pointer to the post structure.
1848 * @param suId SAP ID of the service user.
1849 * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
1850 * @return ROK/RFAILED
1859 **********************************************************/
1861 PUBLIC S16 cmPkTfuDlCqiInd
1865 TfuDlCqiIndInfo * dlCqiInd
1868 PUBLIC S16 cmPkTfuDlCqiInd(pst, suId, dlCqiInd)
1871 TfuDlCqiIndInfo * dlCqiInd;
1874 Buffer *mBuf = NULLP;
1875 TRC3(cmPkTfuDlCqiInd)
1877 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1878 #if (ERRCLASS & ERRCLS_ADD_RES)
1879 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1880 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1881 (ErrVal)ETFU061, (ErrVal)0, "Packing failed");
1883 TFU_FREE_MEM(dlCqiInd);
1886 if (pst->selector == TFU_SEL_LC) {
1887 if (cmPkTfuDlCqiIndInfo(dlCqiInd, mBuf) != ROK) {
1888 #if (ERRCLASS & ERRCLS_ADD_RES)
1889 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1890 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1891 (ErrVal)ETFU062, (ErrVal)0, "Packing failed");
1893 TFU_FREE_MEM(dlCqiInd);
1898 else if(pst->selector == TFU_SEL_LWLC)
1900 if (cmPkPtr((PTR)dlCqiInd, mBuf) != ROK)
1902 #if (ERRCLASS & ERRCLS_ADD_RES)
1903 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1904 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1905 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1907 TFU_FREE_MEM(dlCqiInd);
1913 if (SPkS16(suId, mBuf) != ROK) {
1914 #if (ERRCLASS & ERRCLS_ADD_RES)
1915 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1916 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1917 (ErrVal)ETFU063, (ErrVal)0, "Packing failed");
1919 TFU_FREE_MEM(dlCqiInd);
1923 if (pst->selector != TFU_SEL_LWLC) {
1924 TFU_FREE_MEM(dlCqiInd);
1926 pst->event = (Event) EVTTFUDLCQIIND;
1927 RETVALUE(SPstTsk(pst,mBuf));
1931 /***********************************************************
1933 * Func : cmUnpkTfuDlCqiInd
1936 * Desc : This API is used to indicate the reception of CQI report from PHY to
1937 * Scheduler, also carries the RI.
1938 * @param pst Pointer to the post structure.
1939 * @param suId SAP ID of the service user.
1940 * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
1941 * @return ROK/RFAILED
1950 **********************************************************/
1952 PUBLIC S16 cmUnpkTfuDlCqiInd
1959 PUBLIC S16 cmUnpkTfuDlCqiInd(func, pst, mBuf)
1966 TfuDlCqiIndInfo *dlCqiInd;
1968 TRC3(cmUnpkTfuDlCqiInd)
1970 if (SUnpkS16(&suId, mBuf) != ROK) {
1972 #if (ERRCLASS & ERRCLS_ADD_RES)
1973 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1974 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1975 (ErrVal)ETFU064, (ErrVal)0, "Packing failed");
1979 if (pst->selector != TFU_SEL_LWLC) {
1981 sMem.region = pst->region;
1982 sMem.pool = pst->pool;
1983 if ((cmAllocEvnt(sizeof(TfuDlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&dlCqiInd)) != ROK) {
1984 #if (ERRCLASS & ERRCLS_ADD_RES)
1985 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1986 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1987 (ErrVal)ETFU065, (ErrVal)0, "Packing failed");
1995 if (pst->selector == TFU_SEL_LC)
1997 if (cmUnpkTfuDlCqiIndInfo(dlCqiInd, (Ptr)&dlCqiInd->memCp, mBuf) != ROK) {
1998 TFU_FREE_MEM(dlCqiInd);
2000 #if (ERRCLASS & ERRCLS_ADD_RES)
2001 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2002 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2003 (ErrVal)ETFU066, (ErrVal)0, "Packing failed");
2008 else if(pst->selector == TFU_SEL_LWLC)
2010 if (cmUnpkPtr((PTR *)&dlCqiInd, mBuf) != ROK)
2012 #if (ERRCLASS & ERRCLS_ADD_RES)
2013 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2014 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2015 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2017 TFU_FREE_MEM(dlCqiInd);
2023 RETVALUE((*func)(pst, suId, dlCqiInd));
2030 /***********************************************************
2032 * Func : cmPkTfuRawCqiInd
2035 * Desc : This Primitive is used to convey the Raw CQI information
2036 * transmitted by the UE.
2037 * @details Raw CQI report is the actual bits transmitted by the UE when
2038 * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI
2039 * etc. shall be done by MAC.
2041 * @param pst Pointer to the post structure.
2042 * @param suId SAP ID of the service user.
2043 * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
2044 * @return ROK/RFAILED
2053 **********************************************************/
2055 PUBLIC S16 cmPkTfuRawCqiInd
2059 TfuRawCqiIndInfo * rawCqiInd
2062 PUBLIC S16 cmPkTfuRawCqiInd(pst, suId, rawCqiInd)
2065 TfuRawCqiIndInfo * rawCqiInd;
2068 Buffer *mBuf = NULLP;
2069 TRC3(cmPkTfuRawCqiInd)
2071 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2072 #if (ERRCLASS & ERRCLS_ADD_RES)
2073 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2074 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2075 (ErrVal)ETFU067, (ErrVal)0, "Packing failed");
2077 TFU_FREE_MEM(rawCqiInd);
2080 cmPkTfuRawCqiIndInfo(rawCqiInd, mBuf);
2081 if (SPkS16(suId, mBuf) != ROK) {
2082 #if (ERRCLASS & ERRCLS_ADD_RES)
2083 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2084 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2085 (ErrVal)ETFU068, (ErrVal)0, "Packing failed");
2087 TFU_FREE_MEM(rawCqiInd);
2091 TFU_FREE_MEM(rawCqiInd);
2092 pst->event = (Event) EVTTFURAWCQIIND;
2093 RETVALUE(SPstTsk(pst,mBuf));
2097 /***********************************************************
2099 * Func : cmUnpkTfuRawCqiInd
2102 * Desc : This Primitive is used to convey the Raw CQI information
2103 * transmitted by the UE.
2104 * @details Raw CQI report is the actual bits transmitted by the UE when
2105 * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI
2106 * etc. shall be done by MAC.
2108 * @param pst Pointer to the post structure.
2109 * @param suId SAP ID of the service user.
2110 * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
2111 * @return ROK/RFAILED
2120 **********************************************************/
2122 PUBLIC S16 cmUnpkTfuRawCqiInd
2129 PUBLIC S16 cmUnpkTfuRawCqiInd(func, pst, mBuf)
2136 TfuRawCqiIndInfo *rawCqiInd;
2138 TRC3(cmUnpkTfuRawCqiInd)
2140 if (SUnpkS16(&suId, mBuf) != ROK) {
2142 #if (ERRCLASS & ERRCLS_ADD_RES)
2143 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2144 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2145 (ErrVal)ETFU069, (ErrVal)0, "Packing failed");
2151 sMem.region = pst->region;
2152 sMem.pool = pst->pool;
2153 if ((cmAllocEvnt(sizeof(TfuRawCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&rawCqiInd)) != ROK) {
2154 #if (ERRCLASS & ERRCLS_ADD_RES)
2155 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2156 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2157 (ErrVal)ETFU070, (ErrVal)0, "Packing failed");
2163 cmUnpkTfuRawCqiIndInfo(rawCqiInd, (Ptr)&rawCqiInd->memCp, mBuf);
2165 RETVALUE((*func)(pst, suId, rawCqiInd));
2169 /***********************************************************
2171 * Func : cmPkTfuSrsInd
2174 * Desc : This Primitive is used to convey the information derived by the
2175 * physical layer from the SRS transmission from the UE.
2176 * @details This primitive carries information derived from the SRS transmission
2179 * @param pst Pointer to the post structure.
2180 * @param suId SAP ID of the service user.
2181 * @param srsInd Pointer to the TfuSrIndInfo structure.
2182 * @return ROK/RFAILED
2191 **********************************************************/
2193 PUBLIC S16 cmPkTfuSrsInd
2197 TfuSrsIndInfo * srsInd
2200 PUBLIC S16 cmPkTfuSrsInd(pst, suId, srsInd)
2203 TfuSrsIndInfo * srsInd;
2206 Buffer *mBuf = NULLP;
2209 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2210 #if (ERRCLASS & ERRCLS_ADD_RES)
2211 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2212 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2213 (ErrVal)ETFU071, (ErrVal)0, "Packing failed");
2215 TFU_FREE_MEM(srsInd);
2218 cmPkTfuSrsIndInfo(srsInd, mBuf);
2219 if (SPkS16(suId, mBuf) != ROK) {
2220 #if (ERRCLASS & ERRCLS_ADD_RES)
2221 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2222 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2223 (ErrVal)ETFU072, (ErrVal)0, "Packing failed");
2225 TFU_FREE_MEM(srsInd);
2229 TFU_FREE_MEM(srsInd);
2230 pst->event = (Event) EVTTFUSRSIND;
2231 RETVALUE(SPstTsk(pst,mBuf));
2235 /***********************************************************
2237 * Func : cmUnpkTfuSrsInd
2240 * Desc : This Primitive is used to convey the information derived by the
2241 * physical layer from the SRS transmission from the UE.
2242 * @details This primitive carries information derived from the SRS transmission
2245 * @param pst Pointer to the post structure.
2246 * @param suId SAP ID of the service user.
2247 * @param srsInd Pointer to the TfuSrIndInfo structure.
2248 * @return ROK/RFAILED
2257 **********************************************************/
2259 PUBLIC S16 cmUnpkTfuSrsInd
2266 PUBLIC S16 cmUnpkTfuSrsInd(func, pst, mBuf)
2273 TfuSrsIndInfo *srsInd;
2275 TRC3(cmUnpkTfuSrsInd)
2277 if (SUnpkS16(&suId, mBuf) != ROK) {
2279 #if (ERRCLASS & ERRCLS_ADD_RES)
2280 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2281 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2282 (ErrVal)ETFU073, (ErrVal)0, "Packing failed");
2288 sMem.region = pst->region;
2289 sMem.pool = pst->pool;
2290 if ((cmAllocEvnt(sizeof(TfuSrsIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srsInd)) != ROK) {
2291 #if (ERRCLASS & ERRCLS_ADD_RES)
2292 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2293 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2294 (ErrVal)ETFU074, (ErrVal)0, "Packing failed");
2300 cmUnpkTfuSrsIndInfo(srsInd, (Ptr)&srsInd->memCp, mBuf);
2302 RETVALUE((*func)(pst, suId, srsInd));
2308 /***********************************************************
2310 * Func : cmPkTfuDatInd
2313 * Desc : This Primitive carries the Data PDUs from PHY to MAC.
2314 * @details The uplink Data i.e. the data transmitted by the UEs received by the
2315 * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2316 * is relayed to MAC using this primitive.
2319 * @param tfuDatInd pointer to TfuDatIndInfo
2329 **********************************************************/
2331 PUBLIC S16 cmPkTfuDatInd
2335 TfuDatIndInfo * datInd
2338 PUBLIC S16 cmPkTfuDatInd(pst, spId, datInd)
2341 TfuDatIndInfo * datInd;
2344 Buffer *mBuf = NULLP;
2347 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2348 #if (ERRCLASS & ERRCLS_ADD_RES)
2349 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2350 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2351 (ErrVal)ETFU075, (ErrVal)0, "Packing failed");
2353 TFU_FREE_MEM(datInd);
2356 if (pst->selector == TFU_SEL_LC) {
2357 if (cmPkTfuDatIndInfo(datInd, mBuf) != ROK) {
2358 #if (ERRCLASS & ERRCLS_ADD_RES)
2359 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2360 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2361 (ErrVal)ETFU076, (ErrVal)0, "Packing failed");
2363 TFU_FREE_MEM(datInd);
2368 else if(pst->selector == TFU_SEL_LWLC)
2370 if(cmPkPtr((PTR)datInd, mBuf) != ROK)
2372 #if (ERRCLASS & ERRCLS_ADD_RES)
2373 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2374 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2375 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2377 TFU_FREE_MEM(datInd);
2383 if (SPkS16(spId, mBuf) != ROK) {
2384 #if (ERRCLASS & ERRCLS_ADD_RES)
2385 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2386 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2387 (ErrVal)ETFU077, (ErrVal)0, "Packing failed");
2389 TFU_FREE_MEM(datInd);
2393 if (pst->selector != TFU_SEL_LWLC) {
2394 TFU_FREE_MEM(datInd);
2397 pst->event = (Event) EVTTFUDATIND;
2398 RETVALUE(SPstTsk(pst,mBuf));
2402 /***********************************************************
2404 * Func : cmUnpkTfuDatInd
2407 * Desc : This Primitive carries the Data PDUs from PHY to MAC.
2408 * @details The uplink Data i.e. the data transmitted by the UEs received by the
2409 * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2410 * is relayed to MAC using this primitive.
2413 * @param tfuDatInd pointer to TfuDatIndInfo
2423 **********************************************************/
2425 PUBLIC S16 cmUnpkTfuDatInd
2432 PUBLIC S16 cmUnpkTfuDatInd(func, pst, mBuf)
2439 TfuDatIndInfo *datInd;
2441 TRC3(cmUnpkTfuDatInd)
2443 if (SUnpkS16(&spId, mBuf) != ROK) {
2445 #if (ERRCLASS & ERRCLS_ADD_RES)
2446 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2447 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2448 (ErrVal)ETFU078, (ErrVal)0, "Packing failed");
2452 if (pst->selector != TFU_SEL_LWLC) {
2454 sMem.region = pst->region;
2455 sMem.pool = pst->pool;
2456 if ((cmAllocEvnt(sizeof(TfuDatIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&datInd)) != ROK) {
2457 #if (ERRCLASS & ERRCLS_ADD_RES)
2458 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2459 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2460 (ErrVal)ETFU079, (ErrVal)0, "Packing failed");
2468 if (pst->selector == TFU_SEL_LC)
2470 if (cmUnpkTfuDatIndInfo(datInd, (Ptr)&datInd->memCp, mBuf) != ROK) {
2471 TFU_FREE_MEM(datInd);
2473 #if (ERRCLASS & ERRCLS_ADD_RES)
2474 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2475 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2476 (ErrVal)ETFU080, (ErrVal)0, "Packing failed");
2481 else if(pst->selector == TFU_SEL_LWLC)
2483 if(cmUnpkPtr((PTR *)&datInd, mBuf) != ROK)
2485 #if (ERRCLASS & ERRCLS_ADD_RES)
2486 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2487 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2488 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2490 TFU_FREE_MEM(datInd);
2496 RETVALUE((*func)(pst, spId, datInd));
2500 /***********************************************************
2502 * Func : cmPkTfuCrcInd
2505 * Desc : This API is used by the Physical layer to indicate if the CRC Check
2506 * on the PUSCH Data was successful or not.
2507 * @details This primitive carries CRC indication for a list of UEs. This
2508 * is utilized in the scenario where MAC requested the reception of uplink data
2509 * for a particular UE. On reception of the PUSCH data, the CRC check on it
2510 * failed. This CRC failure is indicated to MAC, which would utillize this
2511 * information for further scheduling.
2512 * Physical layer would indicate failure or success for each PUSCH transmission.
2513 * @param pst Pointer to the post structure.
2514 * @param suId SAP ID of the service user.
2515 * @param crcInd Pointer to the TfuCrcIndInfo.
2516 * @return ROK/RFAILED
2525 **********************************************************/
2527 PUBLIC S16 cmPkTfuCrcInd
2531 TfuCrcIndInfo * crcIndInfo
2534 PUBLIC S16 cmPkTfuCrcInd(pst, suId, crcIndInfo)
2537 TfuCrcIndInfo * crcIndInfo;
2540 Buffer *mBuf = NULLP;
2543 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2544 #if (ERRCLASS & ERRCLS_ADD_RES)
2545 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2546 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2547 (ErrVal)ETFU081, (ErrVal)0, "Packing failed");
2549 TFU_FREE_MEM(crcIndInfo);
2552 if (pst->selector == TFU_SEL_LC) {
2553 if (cmPkTfuCrcIndInfo(crcIndInfo, mBuf) != ROK) {
2554 #if (ERRCLASS & ERRCLS_ADD_RES)
2555 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2556 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2557 (ErrVal)ETFU082, (ErrVal)0, "Packing failed");
2559 TFU_FREE_MEM(crcIndInfo);
2564 else if(pst->selector == TFU_SEL_LWLC)
2566 if (cmPkPtr((PTR)crcIndInfo, mBuf) != ROK)
2568 #if (ERRCLASS & ERRCLS_ADD_RES)
2569 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2570 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2571 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2573 TFU_FREE_MEM(crcIndInfo);
2580 if (SPkS16(suId, mBuf) != ROK) {
2581 #if (ERRCLASS & ERRCLS_ADD_RES)
2582 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2583 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2584 (ErrVal)ETFU083, (ErrVal)0, "Packing failed");
2586 TFU_FREE_MEM(crcIndInfo);
2590 if (pst->selector != TFU_SEL_LWLC) {
2591 TFU_FREE_MEM(crcIndInfo);
2594 pst->event = (Event) EVTTFUCRCIND;
2595 RETVALUE(SPstTsk(pst,mBuf));
2599 /***********************************************************
2601 * Func : cmUnpkTfuCrcInd
2604 * Desc : This API is used by the Physical layer to indicate if the CRC Check
2605 * on the PUSCH Data was successful or not.
2606 * @details This primitive carries CRC indication for a list of UEs. This
2607 * is utilized in the scenario where MAC requested the reception of uplink data
2608 * for a particular UE. On reception of the PUSCH data, the CRC check on it
2609 * failed. This CRC failure is indicated to MAC, which would utillize this
2610 * information for further scheduling.
2611 * Physical layer would indicate failure or success for each PUSCH transmission.
2612 * @param pst Pointer to the post structure.
2613 * @param suId SAP ID of the service user.
2614 * @param crcInd Pointer to the TfuCrcIndInfo.
2615 * @return ROK/RFAILED
2624 **********************************************************/
2626 PUBLIC S16 cmUnpkTfuCrcInd
2633 PUBLIC S16 cmUnpkTfuCrcInd(func, pst, mBuf)
2640 TfuCrcIndInfo *crcIndInfo;
2642 TRC3(cmUnpkTfuCrcInd)
2644 if (SUnpkS16(&suId, mBuf) != ROK) {
2646 #if (ERRCLASS & ERRCLS_ADD_RES)
2647 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2648 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2649 (ErrVal)ETFU084, (ErrVal)0, "Packing failed");
2653 if (pst->selector != TFU_SEL_LWLC) {
2655 sMem.region = pst->region;
2656 sMem.pool = pst->pool;
2657 if ((cmAllocEvnt(sizeof(TfuCrcIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&crcIndInfo)) != ROK) {
2658 #if (ERRCLASS & ERRCLS_ADD_RES)
2659 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2660 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2661 (ErrVal)ETFU085, (ErrVal)0, "Packing failed");
2669 if (pst->selector == TFU_SEL_LC)
2671 if (cmUnpkTfuCrcIndInfo(crcIndInfo, (Ptr)&crcIndInfo->memCp, mBuf) != ROK) {
2672 TFU_FREE_MEM(crcIndInfo);
2674 #if (ERRCLASS & ERRCLS_ADD_RES)
2675 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2676 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2677 (ErrVal)ETFU086, (ErrVal)0, "Packing failed");
2682 else if(pst->selector == TFU_SEL_LWLC)
2684 if (cmUnpkPtr((PTR *)&crcIndInfo, mBuf) != ROK)
2686 #if (ERRCLASS & ERRCLS_ADD_RES)
2687 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2688 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2689 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2691 TFU_FREE_MEM(crcIndInfo);
2697 RETVALUE((*func)(pst, suId, crcIndInfo));
2701 /***********************************************************
2703 * Func : cmPkTfuTimingAdvInd
2706 * Desc : This API is used to indicate a Timing Advance from PHY to Scheduler .
2707 * @details This primitive carries timing advance information for a number of
2708 * UEs that may need timing advance. Timing advance information is an estimate
2709 * of the timing adjustment that a UE would need to apply in order to be
2710 * synchronized in uplink. This estimate is to be calculated by physical layer.
2711 * @param pst Pointer to the post structure.
2712 * @param suId SAP ID of the service user.
2713 * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2714 * @return ROK/RFAILED
2723 **********************************************************/
2725 PUBLIC S16 cmPkTfuTimingAdvInd
2729 TfuTimingAdvIndInfo * timingAdvInd
2732 PUBLIC S16 cmPkTfuTimingAdvInd(pst, suId, timingAdvInd)
2735 TfuTimingAdvIndInfo * timingAdvInd;
2738 Buffer *mBuf = NULLP;
2739 TRC3(cmPkTfuTimingAdvInd)
2741 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2742 #if (ERRCLASS & ERRCLS_ADD_RES)
2743 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2744 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2745 (ErrVal)ETFU087, (ErrVal)0, "Packing failed");
2747 TFU_FREE_MEM(timingAdvInd);
2750 if (pst->selector == TFU_SEL_LC) {
2751 if (cmPkTfuTimingAdvIndInfo(timingAdvInd, mBuf) != ROK) {
2752 #if (ERRCLASS & ERRCLS_ADD_RES)
2753 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2754 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2755 (ErrVal)ETFU088, (ErrVal)0, "Packing failed");
2757 TFU_FREE_MEM(timingAdvInd);
2762 else if(pst->selector == TFU_SEL_LWLC)
2764 if (cmPkPtr((PTR)timingAdvInd, mBuf) != ROK)
2766 #if (ERRCLASS & ERRCLS_ADD_RES)
2767 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2768 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2769 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2771 TFU_FREE_MEM(timingAdvInd);
2777 if (SPkS16(suId, mBuf) != ROK) {
2778 #if (ERRCLASS & ERRCLS_ADD_RES)
2779 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2780 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2781 (ErrVal)ETFU089, (ErrVal)0, "Packing failed");
2783 TFU_FREE_MEM(timingAdvInd);
2787 if (pst->selector != TFU_SEL_LWLC) {
2788 TFU_FREE_MEM(timingAdvInd);
2791 pst->event = (Event) EVTTFUTIMINGADVIND;
2792 RETVALUE(SPstTsk(pst,mBuf));
2796 /***********************************************************
2798 * Func : cmUnpkTfuTimingAdvInd
2801 * Desc : This API is used to indicate a Timing Advance from PHY to Scheduler .
2802 * @details This primitive carries timing advance information for a number of
2803 * UEs that may need timing advance. Timing advance information is an estimate
2804 * of the timing adjustment that a UE would need to apply in order to be
2805 * synchronized in uplink. This estimate is to be calculated by physical layer.
2806 * @param pst Pointer to the post structure.
2807 * @param suId SAP ID of the service user.
2808 * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2809 * @return ROK/RFAILED
2818 **********************************************************/
2820 PUBLIC S16 cmUnpkTfuTimingAdvInd
2822 TfuTimingAdvInd func,
2827 PUBLIC S16 cmUnpkTfuTimingAdvInd(func, pst, mBuf)
2828 TfuTimingAdvInd func;
2834 TfuTimingAdvIndInfo *timingAdvInd;
2836 TRC3(cmUnpkTfuTimingAdvInd)
2838 if (SUnpkS16(&suId, mBuf) != ROK) {
2840 #if (ERRCLASS & ERRCLS_ADD_RES)
2841 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2842 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2843 (ErrVal)ETFU090, (ErrVal)0, "Packing failed");
2847 if (pst->selector != TFU_SEL_LWLC) {
2849 sMem.region = pst->region;
2850 sMem.pool = pst->pool;
2851 if ((cmAllocEvnt(sizeof(TfuTimingAdvIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&timingAdvInd)) != ROK) {
2852 #if (ERRCLASS & ERRCLS_ADD_RES)
2853 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2854 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2855 (ErrVal)ETFU091, (ErrVal)0, "Packing failed");
2863 if (pst->selector == TFU_SEL_LC)
2865 if (cmUnpkTfuTimingAdvIndInfo(timingAdvInd, (Ptr)&timingAdvInd->memCp, mBuf) != ROK) {
2866 TFU_FREE_MEM(timingAdvInd);
2868 #if (ERRCLASS & ERRCLS_ADD_RES)
2869 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2870 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2871 (ErrVal)ETFU092, (ErrVal)0, "Packing failed");
2876 else if(pst->selector == TFU_SEL_LWLC)
2878 if (cmUnpkPtr((PTR *)&timingAdvInd, mBuf) != ROK)
2880 #if (ERRCLASS & ERRCLS_ADD_RES)
2881 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2882 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2883 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2885 TFU_FREE_MEM(timingAdvInd);
2891 RETVALUE((*func)(pst, suId, timingAdvInd));
2895 /***********************************************************
2897 * Func : cmPkTfuDatReq
2900 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
2902 * @details The data being sent in this primitive is meant to be transmitted on
2903 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
2904 * layer processing, requisite control information is also sent along with the
2906 * @sa TfUiTfuCntrlReq
2909 * @param tfuDatReq pointer to TfuDatReqInfo
2919 **********************************************************/
2921 PUBLIC S16 cmPkTfuDatReq
2925 TfuDatReqInfo * datReq
2928 PUBLIC S16 cmPkTfuDatReq(pst, spId, datReq)
2931 TfuDatReqInfo * datReq;
2934 Buffer *mBuf = NULLP;
2937 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2938 #if (ERRCLASS & ERRCLS_ADD_RES)
2939 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2940 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2941 (ErrVal)ETFU093, (ErrVal)0, "Packing failed");
2943 TFU_FREE_MEM(datReq);
2946 if (pst->selector == TFU_SEL_LC) {
2947 if (cmPkTfuDatReqInfo(datReq, mBuf) != ROK) {
2948 #if (ERRCLASS & ERRCLS_ADD_RES)
2949 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2950 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2951 (ErrVal)ETFU094, (ErrVal)0, "Packing failed");
2953 TFU_FREE_MEM(datReq);
2958 else if(pst->selector == TFU_SEL_LWLC)
2960 if(cmPkPtr((PTR)datReq, mBuf) != ROK)
2962 #if (ERRCLASS & ERRCLS_ADD_RES)
2963 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2964 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2965 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2967 TFU_FREE_MEM(datReq);
2973 if (SPkS16(spId, mBuf) != ROK) {
2974 #if (ERRCLASS & ERRCLS_ADD_RES)
2975 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2976 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2977 (ErrVal)ETFU095, (ErrVal)0, "Packing failed");
2979 TFU_FREE_MEM(datReq);
2983 if (pst->selector != TFU_SEL_LWLC) {
2984 TFU_FREE_MEM(datReq);
2987 pst->event = (Event) EVTTFUDATREQ;
2988 RETVALUE(SPstTsk(pst,mBuf));
2992 /***********************************************************
2994 * Func : cmUnpkTfuDatReq
2997 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
2999 * @details The data being sent in this primitive is meant to be transmitted on
3000 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
3001 * layer processing, requisite control information is also sent along with the
3003 * @sa TfUiTfuCntrlReq
3006 * @param tfuDatReq pointer to TfuDatReqInfo
3016 **********************************************************/
3018 PUBLIC S16 cmUnpkTfuDatReq
3025 PUBLIC S16 cmUnpkTfuDatReq(func, pst, mBuf)
3032 TfuDatReqInfo *datReq;
3034 TRC3(cmUnpkTfuDatReq)
3036 if (SUnpkS16(&spId, mBuf) != ROK) {
3038 #if (ERRCLASS & ERRCLS_ADD_RES)
3039 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3040 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3041 (ErrVal)ETFU096, (ErrVal)0, "Packing failed");
3045 if (pst->selector != TFU_SEL_LWLC) {
3047 sMem.region = pst->region;
3048 sMem.pool = pst->pool;
3049 if ((cmAllocEvnt(sizeof(TfuDatReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&datReq)) != ROK) {
3050 #if (ERRCLASS & ERRCLS_ADD_RES)
3051 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3052 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3053 (ErrVal)ETFU097, (ErrVal)0, "Packing failed");
3061 if (pst->selector == TFU_SEL_LC)
3063 if (cmUnpkTfuDatReqInfo(datReq, (Ptr)&datReq->memCp, mBuf) != ROK) {
3064 TFU_FREE_MEM(datReq);
3066 #if (ERRCLASS & ERRCLS_ADD_RES)
3067 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3068 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3069 (ErrVal)ETFU098, (ErrVal)0, "Unpacking failed");
3074 else if (pst->selector == TFU_SEL_LWLC)
3076 if(cmUnpkPtr((PTR *)&datReq, mBuf) != ROK)
3078 TFU_FREE_MEM(datReq);
3080 #if (ERRCLASS & ERRCLS_ADD_RES)
3081 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3082 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3083 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Un-Packing failed");
3089 RETVALUE((*func)(pst, spId, datReq));
3093 /***********************************************************
3095 * Func : cmPkTfuCntrlReq
3098 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
3099 * all the control information
3100 * @details This primitive carries the information sent on the following
3108 * @param cntrlReq pointer to TfuCntrlReqInfo
3109 * @return ROK/RFAILED
3118 **********************************************************/
3120 PUBLIC S16 cmPkTfuCntrlReq
3124 TfuCntrlReqInfo * cntrlReq
3127 PUBLIC S16 cmPkTfuCntrlReq(pst, spId, cntrlReq)
3130 TfuCntrlReqInfo * cntrlReq;
3133 Buffer *mBuf = NULLP;
3134 TRC3(cmPkTfuCntrlReq)
3136 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3137 #if (ERRCLASS & ERRCLS_ADD_RES)
3138 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3139 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3140 (ErrVal)ETFU099, (ErrVal)0, "Packing failed");
3142 TFU_FREE_MEM(cntrlReq);
3145 if (pst->selector == TFU_SEL_LC) {
3146 if (cmPkTfuCntrlReqInfo(cntrlReq, mBuf) != ROK) {
3147 #if (ERRCLASS & ERRCLS_ADD_RES)
3148 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3149 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3150 (ErrVal)ETFU100, (ErrVal)0, "Packing failed");
3152 TFU_FREE_MEM(cntrlReq);
3157 else if(pst->selector == TFU_SEL_LWLC)
3159 if (cmPkPtr((PTR)cntrlReq, mBuf) != ROK)
3161 #if (ERRCLASS & ERRCLS_ADD_RES)
3162 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3163 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3164 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3166 TFU_FREE_MEM(cntrlReq);
3173 if (SPkS16(spId, mBuf) != ROK) {
3174 #if (ERRCLASS & ERRCLS_ADD_RES)
3175 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3176 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3177 (ErrVal)ETFU101, (ErrVal)0, "Packing failed");
3179 TFU_FREE_MEM(cntrlReq);
3183 if (pst->selector != TFU_SEL_LWLC) {
3184 TFU_FREE_MEM(cntrlReq);
3187 pst->event = (Event) EVTTFUCNTRLREQ;
3188 RETVALUE(SPstTsk(pst,mBuf));
3192 /***********************************************************
3194 * Func : cmUnpkTfuCntrlReq
3197 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
3198 * all the control information
3199 * @details This primitive carries the information sent on the following
3207 * @param cntrlReq pointer to TfuCntrlReqInfo
3208 * @return ROK/RFAILED
3217 **********************************************************/
3219 PUBLIC S16 cmUnpkTfuCntrlReq
3226 PUBLIC S16 cmUnpkTfuCntrlReq(func, pst, mBuf)
3233 TfuCntrlReqInfo *cntrlReq;
3235 TRC3(cmUnpkTfuCntrlReq)
3237 if (SUnpkS16(&spId, mBuf) != ROK) {
3239 #if (ERRCLASS & ERRCLS_ADD_RES)
3240 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3241 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3242 (ErrVal)ETFU102, (ErrVal)0, "Packing failed");
3246 if (pst->selector != TFU_SEL_LWLC) {
3248 sMem.region = pst->region;
3249 sMem.pool = pst->pool;
3250 if ((cmAllocEvnt(sizeof(TfuCntrlReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&cntrlReq)) != ROK) {
3251 #if (ERRCLASS & ERRCLS_ADD_RES)
3252 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3253 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3254 (ErrVal)ETFU103, (ErrVal)0, "Packing failed");
3262 if (pst->selector == TFU_SEL_LC)
3264 if (cmUnpkTfuCntrlReqInfo(cntrlReq, (Ptr)&cntrlReq->memCp, mBuf) != ROK) {
3265 TFU_FREE_MEM(cntrlReq);
3267 #if (ERRCLASS & ERRCLS_ADD_RES)
3268 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3269 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3270 (ErrVal)ETFU104, (ErrVal)0, "Packing failed");
3275 else if(pst->selector == TFU_SEL_LWLC)
3277 if (cmUnpkPtr((PTR *)&cntrlReq, mBuf) != ROK)
3279 #if (ERRCLASS & ERRCLS_ADD_RES)
3280 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3281 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3282 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3284 TFU_FREE_MEM(cntrlReq);
3290 RETVALUE((*func)(pst, spId, cntrlReq));
3295 /***********************************************************
3297 * Func : cmPkTfuTtiInd
3300 * Desc : This API is the TTI indication from PHY to MAC .
3301 * @details This primitive provides the timing information (SFN and subframe)
3302 * which is currently running on the physical layer.
3303 * @param pst Pointer to the post structure.
3304 * @param suId SAP ID of the service user.
3305 * @param ttiInd Pointer to the TfuTtiIndInfo.
3306 * @return ROK/RFAILED
3315 **********************************************************/
3317 PUBLIC S16 cmPkTfuTtiInd
3321 TfuTtiIndInfo * ttiInd
3324 PUBLIC S16 cmPkTfuTtiInd(pst, suId, ttiInd)
3327 TfuTtiIndInfo * ttiInd;
3330 Buffer *mBuf = NULLP;
3333 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3334 #if (ERRCLASS & ERRCLS_ADD_RES)
3335 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3336 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3337 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
3339 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3342 if (pst->selector == TFU_SEL_LC) {
3343 if (cmPkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
3344 #if (ERRCLASS & ERRCLS_ADD_RES)
3345 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3346 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3347 (ErrVal)ETFU106, (ErrVal)0, "Packing failed");
3349 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3354 else if(pst->selector == TFU_SEL_LWLC)
3356 if (cmPkPtr((PTR)ttiInd, mBuf) != ROK)
3358 #if (ERRCLASS & ERRCLS_ADD_RES)
3359 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3360 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3361 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3364 /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/
3365 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3371 if (SPkS16(suId, mBuf) != ROK) {
3372 #if (ERRCLASS & ERRCLS_ADD_RES)
3373 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3374 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3375 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
3377 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3381 if (pst->selector != TFU_SEL_LWLC) {
3382 if (SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)) != ROK) {
3383 #if (ERRCLASS & ERRCLS_ADD_RES)
3384 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3385 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3386 (ErrVal)ETFU108, (ErrVal)0, "Packing failed");
3393 pst->event = (Event) EVENT_SLOT_IND_TO_MAC;
3394 RETVALUE(SPstTsk(pst,mBuf));
3398 /***********************************************************
3400 * Func : cmUnpackSlotInd
3403 * Desc : This API is the TTI indication from PHY to MAC .
3404 * @details This primitive provides the timing information (SFN and subframe)
3405 * which is currently running on the physical layer.
3406 * @param pst Pointer to the post structure.
3407 * @param suId SAP ID of the service user.
3408 * @param ttiInd Pointer to the TfuTtiIndInfo.
3409 * @return ROK/RFAILED
3418 **********************************************************/
3419 PUBLIC S16 cmUnpackSlotInd
3427 SlotIndInfo *slotInd;
3429 TRC3(cmUnpackSlotInd)
3431 if (SUnpkS16(&suId, mBuf) != ROK) {
3433 #if (ERRCLASS & ERRCLS_ADD_RES)
3434 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3435 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3436 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
3440 if (pst->selector != TFU_SEL_LWLC) {
3441 if ((SGetSBuf(pst->region, pst->pool, (Data **)&slotInd, sizeof(SlotIndInfo))) != ROK) {
3442 #if (ERRCLASS & ERRCLS_ADD_RES)
3443 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3444 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3445 (ErrVal)ETFU110, (ErrVal)0, "Packing failed");
3452 if (pst->selector == TFU_SEL_LC)
3454 if (cmUnpackSlotIndInfo(slotInd, mBuf) != ROK) {
3455 SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
3457 #if (ERRCLASS & ERRCLS_ADD_RES)
3458 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3459 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3460 (ErrVal)ETFU111, (ErrVal)0, "Packing failed");
3465 else if(pst->selector == TFU_SEL_LWLC)
3467 if (cmUnpkPtr((PTR *)&slotInd, mBuf) != ROK)
3469 #if (ERRCLASS & ERRCLS_ADD_RES)
3470 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3471 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3472 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3474 SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
3481 RETVALUE((*func)(pst, slotInd));
3484 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
3485 /***********************************************************
3487 * Func : cmPkTfuNonRtInd
3490 * Desc : This API is the Non-Rt indication from CL to MAC .
3491 * @param pst Pointer to the post structure.
3492 * @param suId SAP ID of the service user.
3493 * @return ROK/RFAILED
3502 **********************************************************/
3504 PUBLIC S16 cmPkTfuNonRtInd
3510 PUBLIC S16 cmPkTfuNonRtInd(pst, suId)
3515 Buffer *mBuf = NULLP;
3516 TRC3(cmPkTfuNonRtInd)
3518 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3519 #if (ERRCLASS & ERRCLS_ADD_RES)
3520 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3521 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3522 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
3526 if (SPkS16(suId, mBuf) != ROK) {
3527 #if (ERRCLASS & ERRCLS_ADD_RES)
3528 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3529 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3530 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
3535 pst->event = (Event) EVTTFUNONRTIND;
3536 RETVALUE(SPstTsk(pst,mBuf));
3539 /***********************************************************
3541 * Func : cmUnpkTfuNonRtInd
3544 * Desc : This API is the Non Rt indication from PHY to MAC .
3545 * @param pst Pointer to the post structure.
3546 * @param suId SAP ID of the service user.
3547 * @return ROK/RFAILED
3556 **********************************************************/
3558 PUBLIC S16 cmUnpkTfuNonRtInd
3565 PUBLIC S16 cmUnpkTfuNonRtInd(func, pst, mBuf)
3572 TRC3(cmUnpkTfuNonRtInd)
3574 if (SUnpkS16(&suId, mBuf) != ROK) {
3576 #if (ERRCLASS & ERRCLS_ADD_RES)
3577 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3578 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3579 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
3584 RETVALUE((*func)(pst, suId));
3589 /***********************************************************
3591 * Func : cmUnpackMacSchSlotInd
3594 * Desc : This API is the TTI indication from PHY to scheduler.
3595 * @details This primitive provides the timing information (SFN and subframe)
3596 * which is currently running on the physical layer.
3597 * @param pst Pointer to the post structure.
3598 * @param suId SAP ID of the service user.
3599 * @param ttiInd Pointer to the TfuTtiIndInfo.
3600 * @return ROK/RFAILED
3609 **********************************************************/
3610 PUBLIC S16 cmUnpackMacSchSlotInd
3612 MacSchSlotIndFunc func,
3619 SlotIndInfo *slotInd;
3621 TRC3(cmUnpackMacSchSlotInd)
3623 if (SUnpkS16(&suId, mBuf) != ROK) {
3625 #if (ERRCLASS & ERRCLS_ADD_RES)
3626 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3627 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3628 (ErrVal)ETFU116, (ErrVal)0, "Packing failed");
3632 if (pst->selector != TFU_SEL_LWLC) {
3633 if ((SGetSBuf(pst->region, pst->pool, (Data **)&slotInd, sizeof(SlotIndInfo))) != ROK) {
3634 #if (ERRCLASS & ERRCLS_ADD_RES)
3635 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3636 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3637 (ErrVal)ETFU117, (ErrVal)0, "Packing failed");
3644 if (pst->selector == TFU_SEL_LC)
3646 if (cmUnpackSlotIndInfo(slotInd, mBuf) != ROK) {
3647 SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
3649 #if (ERRCLASS & ERRCLS_ADD_RES)
3650 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3651 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3652 (ErrVal)ETFU118, (ErrVal)0, "Packing failed");
3657 else if(pst->selector == TFU_SEL_LWLC)
3659 if (cmUnpkPtr((PTR *)&slotInd, mBuf) != ROK)
3661 #if (ERRCLASS & ERRCLS_ADD_RES)
3662 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3663 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3664 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3666 SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
3672 /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
3673 // (*func)(pst, suId, slotInd);
3674 (*func)(pst, slotInd);
3675 SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
3681 /***********************************************************
3683 * Func : cmPkTfuPucchDeltaPwr
3686 * Desc : This Primitive is used to convey PUCCH Delta power calculated by the
3688 * This information is utilized by Scheduler for power control.
3689 * @param pst Pointer to the post structure.
3690 * @param suId SAP ID of the service user.
3691 * @param Pointer to the TfuPucchDeltaPwrIndInfo structure.
3692 * @return ROK/RFAILED
3701 **********************************************************/
3703 PUBLIC S16 cmPkTfuPucchDeltaPwr
3707 TfuPucchDeltaPwrIndInfo * pucchDeltaPwr
3710 PUBLIC S16 cmPkTfuPucchDeltaPwr(pst, suId, pucchDeltaPwr)
3713 TfuPucchDeltaPwrIndInfo * pucchDeltaPwr;
3716 Buffer *mBuf = NULLP;
3717 TRC3(cmPkTfuPucchDeltaPwr)
3719 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3720 #if (ERRCLASS & ERRCLS_ADD_RES)
3721 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3722 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3723 (ErrVal)ETFU119, (ErrVal)0, "Packing failed");
3725 SPutSBuf(pst->region, pst->pool, (Data *)pucchDeltaPwr, sizeof(TfuPucchDeltaPwrIndInfo));
3728 if (pst->selector == TFU_SEL_LC) {
3729 if (cmPkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, mBuf) != ROK) {
3730 #if (ERRCLASS & ERRCLS_ADD_RES)
3731 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3732 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3733 (ErrVal)ETFU120, (ErrVal)0, "Packing failed");
3735 TFU_FREE_MEM(pucchDeltaPwr);
3740 else if(pst->selector == TFU_SEL_LWLC)
3742 if (cmPkPtr((PTR)pucchDeltaPwr, mBuf) != ROK)
3744 #if (ERRCLASS & ERRCLS_ADD_RES)
3745 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3746 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3747 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3749 TFU_FREE_MEM(pucchDeltaPwr);
3755 if (SPkS16(suId, mBuf) != ROK) {
3756 #if (ERRCLASS & ERRCLS_ADD_RES)
3757 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3758 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3759 (ErrVal)ETFU121, (ErrVal)0, "Packing failed");
3761 TFU_FREE_MEM(pucchDeltaPwr);
3765 if (pst->selector != TFU_SEL_LWLC) {
3766 TFU_FREE_MEM(pucchDeltaPwr);
3768 pst->event = (Event) EVTTFUPUCCHDELPWR;
3769 RETVALUE(SPstTsk(pst,mBuf));
3773 /***********************************************************
3775 * Func : cmUnpkTfuPucchDeltaPwr
3778 * Desc : This Primitive is used to convey PUCCH Delta power calculated by the
3780 * This information is utilized by Scheduler for power control.
3781 * @param pst Pointer to the post structure.
3782 * @param suId SAP ID of the service user.
3783 * @param Pointer to the TfuPucchDeltaPwrIndInfo structure.
3784 * @return ROK/RFAILED
3793 **********************************************************/
3795 PUBLIC S16 cmUnpkTfuPucchDeltaPwr
3797 TfuPucchDeltaPwrInd func,
3802 PUBLIC S16 cmUnpkTfuPucchDeltaPwr(func, pst, mBuf)
3803 TfuPucchDeltaPwrInd func;
3809 TfuPucchDeltaPwrIndInfo *pucchDeltaPwr;
3811 TRC3(cmUnpkTfuPucchDeltaPwr)
3813 if (SUnpkS16(&suId, mBuf) != ROK) {
3815 #if (ERRCLASS & ERRCLS_ADD_RES)
3816 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3817 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3818 (ErrVal)ETFU122, (ErrVal)0, "Packing failed");
3822 if (pst->selector != TFU_SEL_LWLC) {
3824 sMem.region = pst->region;
3825 sMem.pool = pst->pool;
3826 if ((cmAllocEvnt(sizeof(TfuPucchDeltaPwrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&pucchDeltaPwr)) != ROK) {
3827 #if (ERRCLASS & ERRCLS_ADD_RES)
3828 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3829 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3830 (ErrVal)ETFU123, (ErrVal)0, "Packing failed");
3837 if (pst->selector == TFU_SEL_LC)
3839 if (cmUnpkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, (Ptr)&pucchDeltaPwr->memCp, mBuf) != ROK) {
3840 TFU_FREE_MEM(pucchDeltaPwr);
3842 #if (ERRCLASS & ERRCLS_ADD_RES)
3843 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3844 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3845 (ErrVal)ETFU124, (ErrVal)0, "Packing failed");
3850 else if(pst->selector == TFU_SEL_LWLC)
3852 if (cmUnpkPtr((PTR *)&pucchDeltaPwr, mBuf) != ROK)
3854 #if (ERRCLASS & ERRCLS_ADD_RES)
3855 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3856 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3857 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3859 TFU_FREE_MEM(pucchDeltaPwr);
3865 RETVALUE((*func)(pst, suId, pucchDeltaPwr));
3870 /***********************************************************
3872 * Func : cmPkTfuRbAssignA1Val324
3875 * Desc : This structure contains the information needed to convey RIV value 324.
3884 **********************************************************/
3886 PUBLIC S16 cmPkTfuRbAssignA1Val324
3888 TfuRbAssignA1Val324 *param,
3892 PUBLIC S16 cmPkTfuRbAssignA1Val324(param, mBuf)
3893 TfuRbAssignA1Val324 *param;
3898 TRC3(cmPkTfuRbAssignA1Val324)
3900 CMCHKPK(SPkU8, param->ndi, mBuf);
3901 CMCHKPK(SPkU8, param->mcs, mBuf);
3902 CMCHKPK(SPkU8, param->hqProcId, mBuf);
3904 printf("cmPkTfuRbAssignA1Val324 param->ndi %d mcs %d param->hqProcId %d \n",param->ndi,param->mcs,param->hqProcId);
3910 /***********************************************************
3912 * Func : cmPkTfuRbAssignB1Val324
3915 * Desc : This structure contains the information needed to convey RIV value 324.
3924 **********************************************************/
3926 PUBLIC S16 cmPkTfuRbAssignB1Val324
3928 TfuRbAssignB1Val324 *param,
3932 PUBLIC S16 cmPkTfuRbAssignB1Val324(param, mBuf)
3933 TfuRbAssignB1Val324 *param;
3938 TRC3(cmPkTfuRbAssignB1Val324)
3940 CMCHKPK(SPkU8, param->bmiHqAckNack, mBuf);
3941 CMCHKPK(SPkU8, param->RV, mBuf);
3942 CMCHKPK(SPkU8, param->ndi, mBuf);
3943 CMCHKPK(SPkU8, param->mcs, mBuf);
3944 CMCHKPK(SPkU8, param->hqProcId, mBuf);
3949 /***********************************************************
3951 * Func : cmPkTfuRbAssignVal326
3954 * Desc : This structure contains the information needed to convey RIV value 326.
3963 **********************************************************/
3965 PUBLIC S16 cmPkTfuRbAssignVal326
3967 TfuRbAssignVal326 *param,
3971 PUBLIC S16 cmPkTfuRbAssignVal326(param, mBuf)
3972 TfuRbAssignVal326 *param;
3977 TRC3(cmPkTfuRbAssignVal326)
3979 CMCHKPK(SPkU8, param->CyclicShiftInd, mBuf);
3980 CMCHKPK(SPkU8, param->OCCInd, mBuf);
3981 CMCHKPK(SPkU8, param->FreqBandIdx, mBuf);
3986 /***********************************************************
3988 * Func : cmUnpkTfuRbAssignA1Val324
3991 * Desc : This structure contains the information needed to convey RIV value 324.
4000 **********************************************************/
4002 PUBLIC S16 cmUnpkTfuRbAssignA1Val324
4004 TfuRbAssignA1Val324 *param,
4008 PUBLIC S16 cmUnpkTfuRbAssignA1Val324(param, mBuf)
4009 TfuRbAssignA1Val324 *param;
4014 TRC3(cmUnpkTfuRbAssignA1Val324)
4016 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
4017 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4018 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4023 /***********************************************************
4025 * Func : cmUnpkTfuRbAssignB1Val324
4028 * Desc : This structure contains the information needed to convey RIV value 324.
4037 **********************************************************/
4039 PUBLIC S16 cmUnpkTfuRbAssignB1Val324
4041 TfuRbAssignB1Val324 *param,
4045 PUBLIC S16 cmUnpkTfuRbAssignB1Val324(param, mBuf)
4046 TfuRbAssignB1Val324 *param;
4051 TRC3(cmUnpkTfuRbAssignB1Val324)
4053 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
4054 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4055 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4056 CMCHKUNPK(SUnpkU8, ¶m->RV, mBuf);
4057 CMCHKUNPK(SUnpkU8, ¶m->bmiHqAckNack, mBuf);
4062 /***********************************************************
4064 * Func : cmUnpkTfuRbAssignVal326
4067 * Desc : This structure contains the information needed to convey RIV value 326.
4076 **********************************************************/
4078 PUBLIC S16 cmUnpkTfuRbAssignVal326
4080 TfuRbAssignVal326 *param,
4084 PUBLIC S16 cmUnpkTfuRbAssignVal326(param, mBuf)
4085 TfuRbAssignVal326 *param;
4090 TRC3(cmUnpkTfuRbAssignVal326)
4092 CMCHKUNPK(SUnpkU8, ¶m->FreqBandIdx, mBuf);
4093 CMCHKUNPK(SUnpkU8, ¶m->OCCInd, mBuf);
4094 CMCHKUNPK(SUnpkU8, ¶m->CyclicShiftInd, mBuf);
4100 /***********************************************************
4102 * Func : cmPkTfuDciFormatA1A2Info
4105 * Desc : This structure contains the information needed to convey DCI format A1/A2.
4114 **********************************************************/
4116 PUBLIC S16 cmPkTfuDciFormatA1A2Info
4118 TfuDciFormatA1Info *param,
4122 PUBLIC S16 cmPkTfuDciFormatA1A2Info(param, mBuf)
4123 TfuDciFormatA1Info *param;
4128 TRC3(cmPkTfuDciFormatA1A2Info)
4130 //printf("5GTF_DBG: cmPkTfuDciFormatA1Info() called by eNB\n");
4131 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4132 CMCHKPK(SPkU8, param->UL_PCRS, mBuf);
4133 CMCHKPK(SPkU8, param->PMI, mBuf);
4134 CMCHKPK(SPkU8, param->SCID, mBuf);
4136 CMCHKPK(SPkU8, param->REMapIdx_DMRS_PCRS_numLayers, mBuf);
4137 CMCHKPK(SPkU8, param->SRS_Symbol, mBuf);
4138 CMCHKPK(SPkU8, param->SRS_Config, mBuf);
4139 CMCHKPK(SPkU8, param->beamSwitch, mBuf);
4140 CMCHKPK(SPkU8, param->uciOnxPUSCH, mBuf);
4142 CMCHKPK(SPkU8, param->numBSI_Reports, mBuf);
4143 CMCHKPK(SPkU8, param->CSIRS_BRRS_ProcInd, mBuf);
4144 CMCHKPK(SPkU8, param->CSI_BRRS_Indicator, mBuf);
4145 CMCHKPK(SPkU8, param->CSIRS_BRRS_SymbIdx, mBuf);
4146 CMCHKPK(SPkU8, param->CSIRS_BRRS_TxTiming, mBuf);
4147 CMCHKPK(SPkU8, param->CSI_BSI_BRI_Req, mBuf);
4149 if(param->RBAssign <= TFU_RIV_324)
4151 CMCHKPK(cmPkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf);
4153 else if (param->RBAssign == TFU_RIV_326)
4155 CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4158 CMCHKPK(SPkU8, param->rv, mBuf);
4159 CMCHKPK(SPkU8, param->symbIdx, mBuf);
4160 CMCHKPK(SPkU8, param->beamIndex, mBuf);
4161 CMCHKPK(SPkU16, param->RBAssign, mBuf);
4162 CMCHKPK(SPkU8, param->xPUSCH_TxTiming, mBuf);
4163 CMCHKPK(SPkU8, param->xPUSCHRange, mBuf);
4164 CMCHKPK(SPkU8, param->formatType, mBuf);
4169 /***********************************************************
4171 * Func : cmPkTfuDciFormatB1B2Info
4174 * Desc : This structure contains the information needed to convey DCI format B1/B2.
4183 **********************************************************/
4185 PUBLIC S16 cmPkTfuDciFormatB1B2Info
4187 TfuDciFormatB1Info *param,
4191 PUBLIC S16 cmPkTfuDciFormatB1B2Info(param, mBuf)
4192 TfuDciFormatB1Info *param;
4197 TRC3(cmPkTfuDciFormatB1B2Info)
4199 CMCHKPK(SPkU8, param->DL_PCRS, mBuf);
4200 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4201 CMCHKPK(SPkU8, param->SCID, mBuf);
4203 CMCHKPK(SPkU8, param->AntPorts_numLayers, mBuf);
4204 CMCHKPK(SPkU8, param->SRS_Symbol, mBuf);
4205 CMCHKPK(SPkU8, param->SRS_Config, mBuf);
4206 CMCHKPK(SPkU8, param->beamSwitch, mBuf);
4207 CMCHKPK(SPkU8, param->freqResIdx_xPUCCH, mBuf);
4209 CMCHKPK(SPkU8, param->xPUCCH_TxTiming, mBuf);
4211 CMCHKPK(SPkU8, param->numBSI_Reports, mBuf);
4212 CMCHKPK(SPkU8, param->CSIRS_BRRS_ProcInd, mBuf);
4213 CMCHKPK(SPkU8, param->CSI_BRRS_Indicator, mBuf);
4214 CMCHKPK(SPkU8, param->CSIRS_BRRS_SymbIdx, mBuf);
4215 CMCHKPK(SPkU8, param->CSIRS_BRRS_TxTiming, mBuf);
4216 CMCHKPK(SPkU8, param->CSI_BSI_BRI_Req, mBuf);
4218 if(param->RBAssign <= TFU_RIV_324)
4220 CMCHKPK(cmPkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf);
4222 else if (param->RBAssign == TFU_RIV_326)
4224 CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4227 CMCHKPK(SPkU8, param->symbIdx, mBuf);
4228 CMCHKPK(SPkU8, param->beamIndex, mBuf);
4229 CMCHKPK(SPkU16, param->RBAssign, mBuf);
4230 CMCHKPK(SPkU8, param->xPDSCHRange, mBuf);
4231 CMCHKPK(SPkU8, param->formatType, mBuf);
4237 /***********************************************************
4239 * Func : cmUnpkTfuDciFormatA1A2Info
4242 * Desc : This structure contains the information needed to convey DCI format A1/A2.
4251 **********************************************************/
4253 PUBLIC S16 cmUnpkTfuDciFormatA1A2Info
4255 TfuDciFormatA1Info *param,
4259 PUBLIC S16 cmUnpkTfuDciFormatA1A2Info(param, mBuf)
4260 TfuDciFormatA1Info *param;
4265 TRC3(cmUnpkTfuDciFormatA1A2Info)
4267 CMCHKUNPK(SUnpkU8, ¶m->formatType, mBuf);
4268 CMCHKUNPK(SUnpkU8, ¶m->xPUSCHRange, mBuf);
4269 CMCHKUNPK(SUnpkU8, ¶m->xPUSCH_TxTiming, mBuf);
4270 CMCHKUNPK(SUnpkU16, ¶m->RBAssign, mBuf);
4271 CMCHKUNPK(SUnpkU8, ¶m->beamIndex, mBuf);
4272 CMCHKUNPK(SUnpkU8, ¶m->symbIdx, mBuf);
4273 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
4275 if(param->RBAssign <= TFU_RIV_324)
4277 CMCHKUNPK(cmUnpkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf);
4279 else if(param->RBAssign == TFU_RIV_326)
4281 CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4284 CMCHKUNPK(SUnpkU8, ¶m->CSI_BSI_BRI_Req, mBuf);
4285 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_TxTiming, mBuf);
4286 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_SymbIdx, mBuf);
4287 CMCHKUNPK(SUnpkU8, ¶m->CSI_BRRS_Indicator, mBuf);
4288 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_ProcInd, mBuf);
4289 CMCHKUNPK(SUnpkU8, ¶m->numBSI_Reports, mBuf);
4291 CMCHKUNPK(SUnpkU8, ¶m->uciOnxPUSCH, mBuf);
4292 CMCHKUNPK(SUnpkU8, ¶m->beamSwitch, mBuf);
4293 CMCHKUNPK(SUnpkU8, ¶m->SRS_Config, mBuf);
4294 CMCHKUNPK(SUnpkU8, ¶m->SRS_Symbol, mBuf);
4295 CMCHKUNPK(SUnpkU8, ¶m->REMapIdx_DMRS_PCRS_numLayers, mBuf);
4297 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
4298 CMCHKUNPK(SUnpkU8, ¶m->PMI, mBuf);
4299 CMCHKUNPK(SUnpkU8, ¶m->UL_PCRS, mBuf);
4300 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4306 /***********************************************************
4308 * Func : cmUnpkTfuDciFormatB1B2Info
4311 * Desc : This structure contains the information needed to convey DCI format B1/B2.
4320 **********************************************************/
4322 PUBLIC S16 cmUnpkTfuDciFormatB1B2Info
4324 TfuDciFormatB1Info *param,
4328 PUBLIC S16 cmUnpkTfuDciFormatB1B2Info(param, mBuf)
4329 TfuDciFormatB1Info *param;
4334 TRC3(cmUnpkTfuDciFormatB1B2Info)
4336 CMCHKUNPK(SUnpkU8, ¶m->formatType, mBuf);
4337 CMCHKUNPK(SUnpkU8, ¶m->xPDSCHRange, mBuf);
4338 CMCHKUNPK(SUnpkU16, ¶m->RBAssign, mBuf);
4339 CMCHKUNPK(SUnpkU8, ¶m->beamIndex, mBuf);
4340 CMCHKUNPK(SUnpkU8, ¶m->symbIdx, mBuf);
4342 if(param->RBAssign <= TFU_RIV_324)
4344 CMCHKUNPK(cmUnpkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf);
4346 else if (param->RBAssign == TFU_RIV_326)
4348 CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4351 CMCHKUNPK(SUnpkU8, ¶m->CSI_BSI_BRI_Req, mBuf);
4352 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_TxTiming, mBuf);
4353 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_SymbIdx, mBuf);
4354 CMCHKUNPK(SUnpkU8, ¶m->CSI_BRRS_Indicator, mBuf);
4355 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_ProcInd, mBuf);
4356 CMCHKUNPK(SUnpkU8, ¶m->numBSI_Reports, mBuf);
4358 CMCHKUNPK(SUnpkU8, ¶m->xPUCCH_TxTiming, mBuf);
4359 CMCHKUNPK(SUnpkU8, ¶m->freqResIdx_xPUCCH, mBuf);
4360 CMCHKUNPK(SUnpkU8, ¶m->beamSwitch, mBuf);
4361 CMCHKUNPK(SUnpkU8, ¶m->SRS_Config, mBuf);
4362 CMCHKUNPK(SUnpkU8, ¶m->SRS_Symbol, mBuf);
4363 CMCHKUNPK(SUnpkU8, ¶m->AntPorts_numLayers, mBuf);
4364 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
4365 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4366 CMCHKUNPK(SUnpkU8, ¶m->DL_PCRS, mBuf);
4372 #endif /* TFU_5GTF */
4375 /***********************************************************
4377 * Func : cmPkTfuDciFormat0Info
4380 * Desc : This structure contains the information needed to convey DCI format 0.
4389 **********************************************************/
4391 PUBLIC S16 cmPkTfuDciFormat0Info
4393 TfuDciFormat0Info *param,
4397 PUBLIC S16 cmPkTfuDciFormat0Info(param, mBuf)
4398 TfuDciFormat0Info *param;
4403 TRC3(cmPkTfuDciFormat0Info)
4405 /* tfu_c_001.main_3: Adding pack for hqProcId */
4406 CMCHKPK(SPkU8, param->hqProcId, mBuf);
4407 CMCHKPK(SPkU8, param->txAntenna, mBuf);
4408 CMCHKPK(SPkU8, param->numCqiBit, mBuf);
4409 CMCHKPK(SPkU8, param->cqiReq, mBuf);
4410 CMCHKPK(SPkU8, param->nDmrs, mBuf);
4413 CMCHKPK(SPkU8, param->dai, mBuf);
4414 CMCHKPK(SPkU8, param->ulIdx, mBuf);
4417 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4418 CMCHKPK(SPkU8, param->ndi, mBuf);
4419 CMCHKPK(SPkU8, param->mcs, mBuf);
4420 CMCHKPK(SPkU8, param->hoppingBits, mBuf);
4421 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
4423 CMCHKPK(SPkU32, param->riv, mBuf);
4425 CMCHKPK(SPkU8, param->numRb, mBuf);
4426 CMCHKPK(SPkU8, param->rbStart, mBuf);
4427 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
4433 /***********************************************************
4435 * Func : cmUnpkTfuDciFormat0Info
4438 * Desc : This structure contains the information needed to convey DCI format 0.
4447 **********************************************************/
4449 PUBLIC S16 cmUnpkTfuDciFormat0Info
4451 TfuDciFormat0Info *param,
4455 PUBLIC S16 cmUnpkTfuDciFormat0Info(param, mBuf)
4456 TfuDciFormat0Info *param;
4461 TRC3(cmUnpkTfuDciFormat0Info)
4463 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
4464 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
4465 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
4467 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
4468 #endif /* TFU_UPGRADE */
4469 CMCHKUNPK(SUnpkU8, ¶m->hoppingBits, mBuf);
4470 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4471 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4472 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4475 CMCHKUNPK(SUnpkU8, ¶m->ulIdx, mBuf);
4476 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
4479 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
4480 CMCHKUNPK(SUnpkU8, ¶m->cqiReq, mBuf);
4481 CMCHKUNPK(SUnpkU8, ¶m->numCqiBit, mBuf);
4482 CMCHKUNPK(SUnpkU8, ¶m->txAntenna, mBuf);
4483 /* tfu_c_001.main_3: Adding unpack for hqProcId */
4484 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
4491 /***********************************************************
4493 * Func : cmPkTfuAllocMapOrRiv
4496 * Desc : This Structure could either contain a resource allocation bit map OR a
4497 * RIV Value as defined in 213 - 7.1.6.
4506 **********************************************************/
4508 PUBLIC S16 cmPkTfuAllocMapOrRiv
4510 TfuAllocMapOrRiv *param,
4514 PUBLIC S16 cmPkTfuAllocMapOrRiv(param, mBuf)
4515 TfuAllocMapOrRiv *param;
4521 TRC3(cmPkTfuAllocMapOrRiv)
4523 switch(param->type) {
4524 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4525 #ifdef TFU_RESMAP_CHANGE
4527 CMCHKPK(cmPkTfuAllocMap, ¶m->u.allocMap, mBuf);
4532 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4533 #ifndef TFU_RESMAP_CHANGE
4534 case TFU_ALLOC_TYPE_MAP:
4535 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4536 CMCHKPK(SPkU8, param->u.resAllocMap[i], mBuf);
4541 case TFU_ALLOC_TYPE_RIV:
4542 CMCHKPK(SPkU32, param->u.riv, mBuf);
4547 CMCHKPK(SPkU32, param->type, mBuf);
4553 /***********************************************************
4555 * Func : cmUnpkTfuAllocMapOrRiv
4558 * Desc : This Structure could either contain a resource allocation bit map OR a
4559 * RIV Value as defined in 213 - 7.1.6.
4568 **********************************************************/
4570 PUBLIC S16 cmUnpkTfuAllocMapOrRiv
4572 TfuAllocMapOrRiv *param,
4576 PUBLIC S16 cmUnpkTfuAllocMapOrRiv(param, mBuf)
4577 TfuAllocMapOrRiv *param;
4583 TRC3(cmUnpkTfuAllocMapOrRiv)
4585 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
4586 switch(param->type) {
4587 case TFU_ALLOC_TYPE_RIV:
4588 CMCHKUNPK(SUnpkU32, ¶m->u.riv, mBuf);
4591 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4592 #ifndef TFU_RESMAP_CHANGE
4593 case TFU_ALLOC_TYPE_MAP:
4594 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4595 CMCHKUNPK(SUnpkU8, ¶m->u.resAllocMap[i], mBuf);
4601 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4602 #ifdef TFU_RESMAP_CHANGE
4604 CMCHKUNPK(cmUnpkTfuAllocMap, ¶m->u.allocMap, mBuf);
4616 /***********************************************************
4618 * Func : cmPkTfuDciFormat1AllocInfo
4621 * Desc : This structure contains only the allocation information, thats part
4623 * @details Allocation information also contains parameters necessary
4624 * for Physical layer to process Downlink Data. This structure accompanies the
4625 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4626 * @sa TfuDciFormat1Info
4635 **********************************************************/
4637 PUBLIC S16 cmPkTfuDciFormat1AllocInfo
4639 TfuDciFormat1AllocInfo *param,
4643 PUBLIC S16 cmPkTfuDciFormat1AllocInfo(param, mBuf)
4644 TfuDciFormat1AllocInfo *param;
4650 TRC3(cmPkTfuDciFormat1AllocInfo)
4652 CMCHKPK(SPkU8, param->rv, mBuf);
4653 CMCHKPK(SPkU8, param->mcs, mBuf);
4654 CMCHKPK(SPkU8, param->ndi, mBuf);
4655 CMCHKPK(SPkU8, param->harqProcId, mBuf);
4656 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4657 CMCHKPK(SPkU8, param->resAllocMap[i], mBuf);
4659 CMCHKPK(SPkU8, param->isAllocType0, mBuf);
4665 /***********************************************************
4667 * Func : cmUnpkTfuDciFormat1AllocInfo
4670 * Desc : This structure contains only the allocation information, thats part
4672 * @details Allocation information also contains parameters necessary
4673 * for Physical layer to process Downlink Data. This structure accompanies the
4674 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4675 * @sa TfuDciFormat1Info
4684 **********************************************************/
4686 PUBLIC S16 cmUnpkTfuDciFormat1AllocInfo
4688 TfuDciFormat1AllocInfo *param,
4692 PUBLIC S16 cmUnpkTfuDciFormat1AllocInfo(param, mBuf)
4693 TfuDciFormat1AllocInfo *param;
4699 TRC3(cmUnpkTfuDciFormat1AllocInfo)
4701 CMCHKUNPK(SUnpkU8, ¶m->isAllocType0, mBuf);
4702 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4703 CMCHKUNPK(SUnpkU8, ¶m->resAllocMap[i], mBuf);
4705 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
4706 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4707 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4708 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
4713 /***********************************************************
4715 * Func : cmPkTfuDciFormat1Info
4718 * Desc : This structure contains the information needed to convey DCI format 1.
4719 * @details Allocation information is separated from the other control
4720 * information carried in this format. This separation is needed as Data shall
4721 * also carry some control information, essentially allocation information,
4722 * along with it, in order to aid physical layer processing of the data.
4731 **********************************************************/
4733 PUBLIC S16 cmPkTfuDciFormat1Info
4735 TfuDciFormat1Info *param,
4739 PUBLIC S16 cmPkTfuDciFormat1Info(param, mBuf)
4740 TfuDciFormat1Info *param;
4745 TRC3(cmPkTfuDciFormat1Info)
4747 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4750 CMCHKPK(SPkU8, param->dai, mBuf);
4753 CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf);
4759 /***********************************************************
4761 * Func : cmUnpkTfuDciFormat1Info
4764 * Desc : This structure contains the information needed to convey DCI format 1.
4765 * @details Allocation information is separated from the other control
4766 * information carried in this format. This separation is needed as Data shall
4767 * also carry some control information, essentially allocation information,
4768 * along with it, in order to aid physical layer processing of the data.
4777 **********************************************************/
4779 PUBLIC S16 cmUnpkTfuDciFormat1Info
4781 TfuDciFormat1Info *param,
4785 PUBLIC S16 cmUnpkTfuDciFormat1Info(param, mBuf)
4786 TfuDciFormat1Info *param;
4791 TRC3(cmUnpkTfuDciFormat1Info)
4793 CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf);
4796 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
4799 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4805 /***********************************************************
4807 * Func : cmPkTfuDciFormat2AAllocInfo
4810 * Desc : This structure contains only the allocation information, that is part
4812 * @details Allocation information also contains parameters necessary
4813 * for Physical layer to process Downlink data. This structure accompanies the
4814 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4815 * @sa TfuDciFormat2AInfo
4824 **********************************************************/
4826 PUBLIC S16 cmPkTfuDciFormat2AAllocInfo
4828 TfuDciFormat2AAllocInfo *param,
4832 PUBLIC S16 cmPkTfuDciFormat2AAllocInfo(param, mBuf)
4833 TfuDciFormat2AAllocInfo *param;
4839 TRC3(cmPkTfuDciFormat2AAllocInfo)
4841 CMCHKPK(SPkU8, param->transSwap, mBuf);
4842 CMCHKPK(SPkU8, param->precoding, mBuf);
4844 for (i=1; i >= 0; i--) {
4845 CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
4848 CMCHKPK(SPkU8, param->harqProcId, mBuf);
4849 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4850 CMCHKPK(SPkU8, param->resAllocMap[i], mBuf);
4853 CMCHKPK(SPkU8, param->isAllocType0, mBuf);
4860 /***********************************************************
4862 * Func : cmUnpkTfuDciFormat2AAllocInfo
4865 * Desc : This structure contains only the allocation information, that is part
4867 * @details Allocation information also contains parameters necessary
4868 * for Physical layer to process Downlink data. This structure accompanies the
4869 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4870 * @sa TfuDciFormat2AInfo
4879 **********************************************************/
4881 PUBLIC S16 cmUnpkTfuDciFormat2AAllocInfo
4883 TfuDciFormat2AAllocInfo *param,
4887 PUBLIC S16 cmUnpkTfuDciFormat2AAllocInfo(param, mBuf)
4888 TfuDciFormat2AAllocInfo *param;
4894 TRC3(cmUnpkTfuDciFormat2AAllocInfo)
4897 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4898 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4899 CMCHKUNPK(SUnpkU8, ¶m->isAllocType0, mBuf);
4902 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4903 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4904 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4905 CMCHKUNPK(SUnpkU8, ¶m->resAllocMap[i], mBuf);
4907 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
4909 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4910 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4912 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4913 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4914 for (i=0; i<=1; i++) {
4915 CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
4918 CMCHKUNPK(SUnpkU8, ¶m->precoding, mBuf);
4919 CMCHKUNPK(SUnpkU8, ¶m->transSwap, mBuf);
4924 /***********************************************************
4926 * Func : cmPkTfuDciFormat6AAllocInfo
4929 * Desc : This structure contains only the allocation information, that is part
4930 * of DCI format 6-1A.
4931 * @details Allocation information also contains parameters necessary
4932 * for Physical layer to process Downlink data. This structure accompanies the
4933 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4934 * @sa TfuDciFormat61aInfo
4943 **********************************************************/
4945 PUBLIC S16 cmPkTfuDciFormat6AAllocInfo
4947 TfuDciFormat61AllocInfo *param,
4951 PUBLIC S16 cmPkTfuDciFormat6AAllocInfo(param, mBuf)
4952 TfuDciFormat61AllocInfo *param;
4957 TRC3(cmPkTfuDciFormat6AAllocInfo)
4959 CMCHKPK(SPkU8, param->rv, mBuf);
4960 CMCHKPK(SPkU8, param->mcs, mBuf);
4961 CMCHKPK(SPkU8, param->ndi, mBuf);
4962 CMCHKPK(SPkU8, param->harqProcId, mBuf);
4963 CMCHKPK(SPkU32, param->riv, mBuf);
4970 /***********************************************************
4972 * Func : cmUnpkTfuDciFormat6AAllocInfo
4975 * Desc : This structure contains only the allocation information, that is part
4976 * of DCI format 6-1A.
4977 * @details Allocation information also contains parameters necessary
4978 * for Physical layer to process Downlink data. This structure accompanies the
4979 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4980 * @sa TfuDciFormat61aInfo
4989 **********************************************************/
4991 PUBLIC S16 cmUnpkTfuDciFormat6AAllocInfo
4993 TfuDciFormat61AllocInfo *param,
4997 PUBLIC S16 cmUnpkTfuDciFormat6AAllocInfo(param, mBuf)
4998 TfuDciFormat61AllocInfo *param;
5003 TRC3(cmUnpkTfuDciFormat6AAllocInfo)
5005 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
5006 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
5007 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
5008 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
5009 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
5010 printf("In cmUnpkTfuDciFormat6AAllocInfo :: Passed \n");
5017 /***********************************************************
5019 * Func : cmPkTfuDciFormat2AInfo
5022 * Desc : This structure contains the information carried by DCI format 2A.
5023 * @details It carries the allocation information and other control information.
5032 **********************************************************/
5034 PUBLIC S16 cmPkTfuDciFormat2AInfo
5036 TfuDciFormat2AInfo *param,
5040 PUBLIC S16 cmPkTfuDciFormat2AInfo(param, mBuf)
5041 TfuDciFormat2AInfo *param;
5046 TRC3(cmPkTfuDciFormat2AInfo)
5048 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5051 CMCHKPK(SPkU8, param->dai, mBuf);
5054 CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf);
5060 /***********************************************************
5062 * Func : cmUnpkTfuDciFormat2AInfo
5065 * Desc : This structure contains the information carried by DCI format 2A.
5066 * @details It carries the allocation information and other control information.
5075 **********************************************************/
5077 PUBLIC S16 cmUnpkTfuDciFormat2AInfo
5079 TfuDciFormat2AInfo *param,
5083 PUBLIC S16 cmUnpkTfuDciFormat2AInfo(param, mBuf)
5084 TfuDciFormat2AInfo *param;
5089 TRC3(cmUnpkTfuDciFormat2AInfo)
5091 CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf);
5094 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5097 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
5103 /***********************************************************
5105 * Func : cmPkTfuDciFormat2AllocInfo
5108 * Desc : This structure contains only the allocation information, that is part
5110 * @details Allocation information also contains parameters necessary
5111 * for Physical layer to process Downlink data. This structure accompanies the
5112 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5113 * @sa TfuDciFormat2Info
5122 **********************************************************/
5124 PUBLIC S16 cmPkTfuDciFormat2AllocInfo
5126 TfuDciFormat2AllocInfo *param,
5130 PUBLIC S16 cmPkTfuDciFormat2AllocInfo(param, mBuf)
5131 TfuDciFormat2AllocInfo *param;
5137 TRC3(cmPkTfuDciFormat2AllocInfo)
5140 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5141 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5142 for (i=1; i >= 0; i--) {
5143 CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
5145 CMCHKPK(SPkU8, param->harqProcId, mBuf);
5147 CMCHKPK(SPkU8, param->precoding, mBuf);
5148 CMCHKPK(SPkU8, param->transSwap, mBuf);
5150 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5151 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5154 CMCHKPK(SPkU8, param->dai, mBuf);
5157 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
5158 CMCHKPK(SPkU8, param->resAllocMap[i], mBuf);
5161 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5162 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5164 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5165 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5166 CMCHKPK(SPkU8, param->isAllocType0, mBuf);
5173 /***********************************************************
5175 * Func : cmUnpkTfuDciFormat2AllocInfo
5178 * Desc : This structure contains only the allocation information, that is part
5180 * @details Allocation information also contains parameters necessary
5181 * for Physical layer to process Downlink data. This structure accompanies the
5182 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5183 * @sa TfuDciFormat2Info
5192 **********************************************************/
5194 PUBLIC S16 cmUnpkTfuDciFormat2AllocInfo
5196 TfuDciFormat2AllocInfo *param,
5200 PUBLIC S16 cmUnpkTfuDciFormat2AllocInfo(param, mBuf)
5201 TfuDciFormat2AllocInfo *param;
5207 TRC3(cmUnpkTfuDciFormat2AllocInfo)
5210 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5211 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5212 CMCHKUNPK(SUnpkU8, ¶m->isAllocType0, mBuf);
5215 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5216 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5217 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
5218 CMCHKUNPK(SUnpkU8, ¶m->resAllocMap[i], mBuf);
5222 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5226 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5227 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5228 CMCHKUNPK(SUnpkU8, ¶m->transSwap, mBuf);
5229 CMCHKUNPK(SUnpkU8, ¶m->precoding, mBuf);
5231 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5232 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5233 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
5234 for (i=0; i<=1; i++) {
5235 CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
5243 /***********************************************************
5245 * Func : cmPkTfuDciFormat2Info
5248 * Desc : This structure contains the information carried by DCI format 2.
5249 * @details Allocation information is separated from the other control
5250 * information carried in this format. This separation is needed as Data must
5251 * also carry some control information, essentially, allocation information
5252 * along with it, in order to aid physical layer processing of the data.
5261 **********************************************************/
5263 PUBLIC S16 cmPkTfuDciFormat2Info
5265 TfuDciFormat2Info *param,
5269 PUBLIC S16 cmPkTfuDciFormat2Info(param, mBuf)
5270 TfuDciFormat2Info *param;
5275 TRC3(cmPkTfuDciFormat2Info)
5278 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5279 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5282 CMCHKPK(SPkU8, param->dai, mBuf);
5286 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5288 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5289 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5290 CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf);
5296 /***********************************************************
5298 * Func : cmUnpkTfuDciFormat2Info
5301 * Desc : This structure contains the information carried by DCI format 2.
5302 * @details Allocation information is separated from the other control
5303 * information carried in this format. This separation is needed as Data must
5304 * also carry some control information, essentially, allocation information
5305 * along with it, in order to aid physical layer processing of the data.
5314 **********************************************************/
5316 PUBLIC S16 cmUnpkTfuDciFormat2Info
5318 TfuDciFormat2Info *param,
5322 PUBLIC S16 cmUnpkTfuDciFormat2Info(param, mBuf)
5323 TfuDciFormat2Info *param;
5328 TRC3(cmUnpkTfuDciFormat2Info)
5330 CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf);
5332 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5333 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5334 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
5336 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5337 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5340 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5349 /***********************************************************
5351 * Func : cmPkTfuDciFormat3Info
5354 * Desc : This structure contains the information carried in DCI format 3.
5363 **********************************************************/
5365 PUBLIC S16 cmPkTfuDciFormat3Info
5367 TfuDciFormat3Info *param,
5371 PUBLIC S16 cmPkTfuDciFormat3Info(param, mBuf)
5372 TfuDciFormat3Info *param;
5378 TRC3(cmPkTfuDciFormat3Info)
5380 CMCHKPK(SPkU8, param->isPucch, mBuf);
5381 for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) {
5382 CMCHKPK(SPkU8, param->tpcCmd[i], mBuf);
5389 /***********************************************************
5391 * Func : cmUnpkTfuDciFormat3Info
5394 * Desc : This structure contains the information carried in DCI format 3.
5403 **********************************************************/
5405 PUBLIC S16 cmUnpkTfuDciFormat3Info
5407 TfuDciFormat3Info *param,
5411 PUBLIC S16 cmUnpkTfuDciFormat3Info(param, mBuf)
5412 TfuDciFormat3Info *param;
5418 TRC3(cmUnpkTfuDciFormat3Info)
5420 for (i=0; i<TFU_MAX_2BIT_TPC; i++) {
5421 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd[i], mBuf);
5423 CMCHKUNPK(SUnpkU8, ¶m->isPucch, mBuf);
5429 /***********************************************************
5431 * Func : cmPkTfuDciFormat3AInfo
5434 * Desc : This structure contains the information carried by DCI format 3A.
5443 **********************************************************/
5445 PUBLIC S16 cmPkTfuDciFormat3AInfo
5447 TfuDciFormat3AInfo *param,
5451 PUBLIC S16 cmPkTfuDciFormat3AInfo(param, mBuf)
5452 TfuDciFormat3AInfo *param;
5458 TRC3(cmPkTfuDciFormat3AInfo)
5459 CMCHKPK(SPkU8, param->isPucch, mBuf);
5460 for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) {
5461 CMCHKPK(SPkU8, param->tpcCmd[i], mBuf);
5468 /***********************************************************
5470 * Func : cmUnpkTfuDciFormat3AInfo
5473 * Desc : This structure contains the information carried by DCI format 3A.
5482 **********************************************************/
5484 PUBLIC S16 cmUnpkTfuDciFormat3AInfo
5486 TfuDciFormat3AInfo *param,
5490 PUBLIC S16 cmUnpkTfuDciFormat3AInfo(param, mBuf)
5491 TfuDciFormat3AInfo *param;
5497 TRC3(cmUnpkTfuDciFormat3AInfo)
5499 for (i=0; i<TFU_MAX_2BIT_TPC; i++) {
5500 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd[i], mBuf);
5502 CMCHKUNPK(SUnpkU8, ¶m->isPucch, mBuf);
5509 /***********************************************************
5511 * Func : cmPkTfuDciFormat60aInfo
5514 * Desc : This structure contains the information that is carried in DCI
5524 ************************************************************/
5527 PRIVATE S16 cmPkTfuDciFormat60aInfo
5529 TfuDciFormat60aInfo *param,
5533 PRIVATE S16 cmPkTfuDciFormat60aInfo(param, mBuf)
5534 TfuDciFormat60aInfo *param;
5539 TRC3(cmPkTfuDciFormat60aInfo)
5541 CMCHKPK(SPkU8, param->dciRep, mBuf);
5542 CMCHKPK(SPkU8, param->isSrs, mBuf);
5543 CMCHKPK(SPkU8, param->cqiReq, mBuf);
5545 CMCHKPK(SPkU8, param->dai, mBuf);
5546 CMCHKPK(SPkU8, param->ulIdx, mBuf);
5548 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5549 CMCHKPK(SPkU8, param->rv, mBuf);
5550 CMCHKPK(SPkU8, param->ndi, mBuf);
5551 CMCHKPK(SPkU8, param->hqProcId, mBuf);
5552 CMCHKPK(SPkU8, param->rep, mBuf);
5553 CMCHKPK(SPkU8, param->mcs, mBuf);
5554 CMCHKPK(SPkU32, param->riv, mBuf);
5555 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
5558 /***********************************************************
5560 * Func : cmPkTfuPdcchOrderInfoEmtc
5563 * Desc : This structure contains the information that is carried in DCI
5564 * format 6-1A in the case of a PDCCH order.
5573 **********************************************************/
5575 PRIVATE S16 cmPkTfuPdcchOrderInfoEmtc
5577 TfuPdcchOrderInfoEmtc *param,
5581 PRIVATE S16 cmPkTfuPdcchOrderInfoEmtc(param, mBuf)
5582 TfuPdcchOrderInfoEmtc *param;
5587 TRC3(cmPkTfuPdcchOrderInfoEmtc)
5589 CMCHKPK(SPkU8, param->ceLevel, mBuf);
5590 CMCHKPK(SPkU8, param->prachMaskIdx, mBuf);
5591 CMCHKPK(SPkU8, param->preambleIdx, mBuf);
5592 CMCHKPK(SPkU32, param->riv, mBuf);
5596 /***********************************************************
5598 * Func : cmPkTfudciformat61aPdsch
5601 * Desc : This structure contains the information carried in DCI format 6-1A
5602 * when it is NOT used for a PDCCH order.
5611 **********************************************************/
5613 PRIVATE S16 cmPkTfudciformat61aPdsch
5615 Tfudciformat61aPdsch *param,
5619 PRIVATE S16 cmPkTfudciformat61aPdsch(param, mBuf)
5620 Tfudciformat61aPdsch *param;
5625 TRC3(cmPkTfudciformat61aPdsch)
5627 CMCHKPK(SPkU8, param->isTBMsg4, mBuf);
5628 CMCHKPK(SPkU8, param->dciRep, mBuf);
5629 CMCHKPK(SPkU8, param->harqAckOffst, mBuf);
5630 CMCHKPK(SPkU8, param->pmiCfm, mBuf);
5631 CMCHKPK(SPkU8, param->tPmi, mBuf);
5632 CMCHKPK(SPkU8, param->isSrs, mBuf);
5633 CMCHKPK(SPkU8, param->antPortAndScrId, mBuf);
5636 CMCHKPK(SPkU8, param->dai, mBuf);
5638 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5639 CMCHKPK(SPkU8, param->rep, mBuf);
5640 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
5641 CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf);
5646 /***********************************************************
5648 * Func : cmPkTfuDciFormat61aInfo
5651 * Desc : This structure contains the information needed to convey DCI format 6-1A.
5652 * @details Format can possibly carry PDSCH allocation or information needed for
5653 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
5663 **********************************************************/
5665 PUBLIC S16 cmPkTfuDciFormat61aInfo
5667 TfuDciFormat61aInfo *param,
5671 PUBLIC S16 cmPkTfuDciFormat61aInfo(param, mBuf)
5672 TfuDciFormat61aInfo *param;
5677 TRC3(cmPkTfuDciFormat61aInfo)
5679 switch(param->isPdcchOrder) {
5681 CMCHKPK(cmPkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf);
5684 CMCHKPK(cmPkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf);
5689 CMCHKPK(SPkU8, param->isPdcchOrder, mBuf);
5694 /***********************************************************
5696 * Func : cmUnpkTfuDciFormat60aInfo
5699 * Desc : This structure contains the information that is carried in DCI
5709 * **********************************************************/
5712 PRIVATE S16 cmUnpkTfuDciFormat60aInfo
5714 TfuDciFormat60aInfo *param,
5718 PRIVATE S16 cmUnpkTfuDciFormat60aInfo(param, mBuf)
5719 TfuDciFormat60aInfo *param;
5724 TRC3(cmUnpkTfuDciFormat60aInfo)
5726 printf("In cmUnpkTfuDciFormat60aInfo :: Entry \n");
5727 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
5728 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
5729 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
5730 CMCHKUNPK(SUnpkU8, ¶m->rep, mBuf);
5731 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
5732 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
5733 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
5734 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
5736 CMCHKUNPK(SUnpkU8, ¶m->ulIdx, mBuf);
5737 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5739 CMCHKUNPK(SUnpkU8, ¶m->cqiReq, mBuf);
5740 CMCHKUNPK(SUnpkU8, ¶m->isSrs, mBuf);
5741 CMCHKUNPK(SUnpkU8, ¶m->dciRep, mBuf);
5742 printf("In cmUnpkTfuDciFormat60aInfo :: Exit \n");
5745 /***********************************************************
5747 * Func : cmUnpkTfuPdcchOrderInfoEmtc
5750 * Desc : This structure contains the information that is carried in DCI
5751 * format 6-1A in the case of a PDCCH order.
5760 **********************************************************/
5762 PRIVATE S16 cmUnpkTfuPdcchOrderInfoEmtc
5764 TfuPdcchOrderInfoEmtc *param,
5768 PRIVATE S16 cmUnpkTfuPdcchOrderInfoEmtc(param, mBuf)
5769 TfuPdcchOrderInfoEmtc *param;
5774 TRC3(cmUnpkTfuPdcchOrderInfoEmtc)
5776 printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Entry \n");
5777 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
5778 CMCHKUNPK(SUnpkU8, ¶m->preambleIdx, mBuf);
5779 CMCHKUNPK(SUnpkU8, ¶m->prachMaskIdx, mBuf);
5780 CMCHKUNPK(SUnpkU8, ¶m->ceLevel, mBuf);
5781 printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Passed \n");
5785 /***********************************************************
5787 * Func : cmUnpkTfuDciFormat61aInfo
5790 * Desc : This structure contains the information carried by DCI format 6-1A.
5799 **********************************************************/
5801 PUBLIC S16 cmUnpkTfuDciFormat61aInfo
5803 TfuDciFormat61aInfo *param,
5807 PUBLIC S16 cmUnpkTfuDciFormat61aInfo(param, mBuf)
5808 TfuDciFormat61aInfo *param;
5813 TRC3(cmUnpkTfuDciFormat61aInfo)
5815 CMCHKUNPK(SUnpkU8, ¶m->isPdcchOrder, mBuf);
5816 printf("1. cmUnpkTfuDciFormat61aInfo :: isPdcchOrder %d \n", param->isPdcchOrder);
5817 switch(param->isPdcchOrder) {
5819 CMCHKUNPK(cmUnpkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf);
5822 CMCHKUNPK(cmUnpkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf);
5831 /***********************************************************
5833 * Func : cmPkTfuDciFormat1dAllocInfo
5836 * Desc : This structure contains only the allocation information, thats part
5838 * @details Allocation information also contains parameters necessary
5839 * for Physical layer to process Downlink Data. This structure accompanies the
5840 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5841 * @sa TfuDciFormat1dInfo
5850 **********************************************************/
5852 PUBLIC S16 cmPkTfuDciFormat1dAllocInfo
5854 TfuDciFormat1dAllocInfo *param,
5858 PUBLIC S16 cmPkTfuDciFormat1dAllocInfo(param, mBuf)
5859 TfuDciFormat1dAllocInfo *param;
5864 TRC3(cmPkTfuDciFormat1dAllocInfo)
5866 CMCHKPK(SPkU8, param->tPmi, mBuf);
5867 CMCHKPK(SPkU8, param->rv, mBuf);
5868 CMCHKPK(SPkU8, param->mcs, mBuf);
5869 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5870 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
5871 CMCHKPK(SPkU8, param->isLocal, mBuf);
5877 /***********************************************************
5879 * Func : cmUnpkTfuDciFormat1dAllocInfo
5882 * Desc : This structure contains only the allocation information, thats part
5884 * @details Allocation information also contains parameters necessary
5885 * for Physical layer to process Downlink Data. This structure accompanies the
5886 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5887 * @sa TfuDciFormat1dInfo
5896 **********************************************************/
5898 PUBLIC S16 cmUnpkTfuDciFormat1dAllocInfo
5900 TfuDciFormat1dAllocInfo *param,
5904 PUBLIC S16 cmUnpkTfuDciFormat1dAllocInfo(param, mBuf)
5905 TfuDciFormat1dAllocInfo *param;
5910 TRC3(cmUnpkTfuDciFormat1dAllocInfo)
5912 CMCHKUNPK(SUnpkU8, ¶m->isLocal, mBuf);
5913 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
5914 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5915 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
5916 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
5917 CMCHKUNPK(SUnpkU8, ¶m->tPmi, mBuf);
5923 /***********************************************************
5925 * Func : cmPkTfuDciFormat1dInfo
5928 * Desc : This structure contains the information carried by DCI format 1D.
5929 * @details Allocation information is separated from the other control
5930 * information carried in this format. This separation is needed as Data shall
5931 * also carry some control information, essentially allocation information,
5932 * along with it, in order to aid physical layer processing of the data.
5941 **********************************************************/
5943 PUBLIC S16 cmPkTfuDciFormat1dInfo
5945 TfuDciFormat1dInfo *param,
5949 PUBLIC S16 cmPkTfuDciFormat1dInfo(param, mBuf)
5950 TfuDciFormat1dInfo *param;
5955 TRC3(cmPkTfuDciFormat1dInfo)
5957 CMCHKPK(SPkU8, param->dlPwrOffset, mBuf);
5960 CMCHKPK(SPkU8, param->dai, mBuf);
5963 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5964 CMCHKPK(SPkU8, param->ndi, mBuf);
5965 CMCHKPK(SPkU8, param->harqProcId, mBuf);
5966 CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf);
5972 /***********************************************************
5974 * Func : cmUnpkTfuDciFormat1dInfo
5977 * Desc : This structure contains the information carried by DCI format 1D.
5978 * @details Allocation information is separated from the other control
5979 * information carried in this format. This separation is needed as Data shall
5980 * also carry some control information, essentially allocation information,
5981 * along with it, in order to aid physical layer processing of the data.
5990 **********************************************************/
5992 PUBLIC S16 cmUnpkTfuDciFormat1dInfo
5994 TfuDciFormat1dInfo *param,
5998 PUBLIC S16 cmUnpkTfuDciFormat1dInfo(param, mBuf)
5999 TfuDciFormat1dInfo *param;
6004 TRC3(cmUnpkTfuDciFormat1dInfo)
6006 CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf);
6007 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
6008 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
6009 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
6012 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
6015 CMCHKUNPK(SUnpkU8, ¶m->dlPwrOffset, mBuf);
6021 /***********************************************************
6023 * Func : cmPkTfuDciFormat1cInfo
6026 * Desc : This structure contains only the allocation information, thats part
6028 * @details Allocation information also contains parameters necessary
6029 * for Physical layer to process Downlink Data. This structure accompanies the
6030 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6031 * @sa TfuDciFormat1CInfo
6040 **********************************************************/
6042 PUBLIC S16 cmPkTfuDciFormat1cInfo
6044 TfuDciFormat1cInfo *param,
6048 PUBLIC S16 cmPkTfuDciFormat1cInfo(param, mBuf)
6049 TfuDciFormat1cInfo *param;
6054 TRC3(cmPkTfuDciFormat1cInfo)
6056 CMCHKPK(SPkU8, param->iTbs, mBuf);
6057 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6058 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6064 /***********************************************************
6066 * Func : cmUnpkTfuDciFormat1cInfo
6069 * Desc : This structure contains only the allocation information, thats part
6071 * @details Allocation information also contains parameters necessary
6072 * for Physical layer to process Downlink Data. This structure accompanies the
6073 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6074 * @sa TfuDciFormat1CInfo
6083 **********************************************************/
6085 PUBLIC S16 cmUnpkTfuDciFormat1cInfo
6087 TfuDciFormat1cInfo *param,
6091 PUBLIC S16 cmUnpkTfuDciFormat1cInfo(param, mBuf)
6092 TfuDciFormat1cInfo *param;
6097 TRC3(cmUnpkTfuDciFormat1cInfo)
6099 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6100 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6101 CMCHKUNPK(SUnpkU8, ¶m->iTbs, mBuf);
6107 /***********************************************************
6109 * Func : cmPkTfuDciFormat1bAllocInfo
6112 * Desc : This structure contains only the allocation information, thats part
6113 * of DCI format 1 B.
6114 * @details Allocation information also contains parameters necessary
6115 * for Physical layer to process Downlink Data. This structure accompanies the
6116 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6117 * @sa TfuDciFormat1BInfo
6126 **********************************************************/
6128 PUBLIC S16 cmPkTfuDciFormat1bAllocInfo
6130 TfuDciFormat1bAllocInfo *param,
6134 PUBLIC S16 cmPkTfuDciFormat1bAllocInfo(param, mBuf)
6135 TfuDciFormat1bAllocInfo *param;
6140 TRC3(cmPkTfuDciFormat1bAllocInfo)
6142 CMCHKPK(SPkU8, param->pmiCfm, mBuf);
6143 CMCHKPK(SPkU8, param->tPmi, mBuf);
6144 CMCHKPK(SPkU8, param->ndi, mBuf);
6145 CMCHKPK(SPkU8, param->harqProcId, mBuf);
6146 CMCHKPK(SPkU8, param->rv, mBuf);
6147 CMCHKPK(SPkU8, param->mcs, mBuf);
6148 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6149 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6150 CMCHKPK(SPkU8, param->isLocal, mBuf);
6156 /***********************************************************
6158 * Func : cmUnpkTfuDciFormat1bAllocInfo
6161 * Desc : This structure contains only the allocation information, thats part
6162 * of DCI format 1 B.
6163 * @details Allocation information also contains parameters necessary
6164 * for Physical layer to process Downlink Data. This structure accompanies the
6165 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6166 * @sa TfuDciFormat1BInfo
6175 **********************************************************/
6177 PUBLIC S16 cmUnpkTfuDciFormat1bAllocInfo
6179 TfuDciFormat1bAllocInfo *param,
6183 PUBLIC S16 cmUnpkTfuDciFormat1bAllocInfo(param, mBuf)
6184 TfuDciFormat1bAllocInfo *param;
6189 TRC3(cmUnpkTfuDciFormat1bAllocInfo)
6191 CMCHKUNPK(SUnpkU8, ¶m->isLocal, mBuf);
6192 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6193 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6194 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6195 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6196 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
6197 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
6198 CMCHKUNPK(SUnpkU8, ¶m->tPmi, mBuf);
6199 CMCHKUNPK(SUnpkU8, ¶m->pmiCfm, mBuf);
6205 /***********************************************************
6207 * Func : cmPkTfuPdcchOrderInfo
6210 * Desc : This structure contains the information that is carried in DCI
6211 * format 1A in the case of a PDCCH order.
6220 **********************************************************/
6222 PUBLIC S16 cmPkTfuPdcchOrderInfo
6224 TfuPdcchOrderInfo *param,
6228 PUBLIC S16 cmPkTfuPdcchOrderInfo(param, mBuf)
6229 TfuPdcchOrderInfo *param;
6234 TRC3(cmPkTfuPdcchOrderInfo)
6236 CMCHKPK(SPkU8, param->prachMaskIdx, mBuf);
6237 CMCHKPK(SPkU8, param->preambleIdx, mBuf);
6243 /***********************************************************
6245 * Func : cmUnpkTfuPdcchOrderInfo
6248 * Desc : This structure contains the information that is carried in DCI
6249 * format 1A in the case of a PDCCH order.
6258 **********************************************************/
6260 PUBLIC S16 cmUnpkTfuPdcchOrderInfo
6262 TfuPdcchOrderInfo *param,
6266 PUBLIC S16 cmUnpkTfuPdcchOrderInfo(param, mBuf)
6267 TfuPdcchOrderInfo *param;
6272 TRC3(cmUnpkTfuPdcchOrderInfo)
6274 CMCHKUNPK(SUnpkU8, ¶m->preambleIdx, mBuf);
6275 CMCHKUNPK(SUnpkU8, ¶m->prachMaskIdx, mBuf);
6281 /***********************************************************
6283 * Func : cmPkTfuDciFormat1aAllocInfo
6286 * Desc : This structure contains only the allocation information, thats part
6288 * @details Allocation information also contains parameters necessary
6289 * for Physical layer to process Downlink Data. This structure accompanies the
6290 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6291 * @sa TfuDciFormat1AInfo
6300 **********************************************************/
6302 PUBLIC S16 cmPkTfuDciFormat1aAllocInfo
6304 TfuDciFormat1aAllocInfo *param,
6308 PUBLIC S16 cmPkTfuDciFormat1aAllocInfo(param, mBuf)
6309 TfuDciFormat1aAllocInfo *param;
6314 TRC3(cmPkTfuDciFormat1aAllocInfo)
6316 CMCHKPK(SPkU8, param->ndi, mBuf);
6317 CMCHKPK(cmPkTknU8, ¶m->harqProcId, mBuf);
6318 CMCHKPK(SPkU8, param->rv, mBuf);
6319 CMCHKPK(SPkU8, param->mcs, mBuf);
6320 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6321 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6322 CMCHKPK(SPkU8, param->isLocal, mBuf);
6328 /***********************************************************
6330 * Func : cmUnpkTfuDciFormat1aAllocInfo
6333 * Desc : This structure contains only the allocation information, thats part
6335 * @details Allocation information also contains parameters necessary
6336 * for Physical layer to process Downlink Data. This structure accompanies the
6337 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6338 * @sa TfuDciFormat1AInfo
6347 **********************************************************/
6349 PUBLIC S16 cmUnpkTfuDciFormat1aAllocInfo
6351 TfuDciFormat1aAllocInfo *param,
6355 PUBLIC S16 cmUnpkTfuDciFormat1aAllocInfo(param, mBuf)
6356 TfuDciFormat1aAllocInfo *param;
6361 TRC3(cmUnpkTfuDciFormat1aAllocInfo)
6363 CMCHKUNPK(SUnpkU8, ¶m->isLocal, mBuf);
6364 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6365 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6366 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6367 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6368 CMCHKUNPK(cmUnpkTknU8, ¶m->harqProcId, mBuf);
6369 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
6375 /***********************************************************
6377 * Func : cmPkTfudciformat1aPdsch
6380 * Desc : This structure contains the information carried in DCI format 1A
6381 * when it is NOT used for a PDCCH order.
6390 **********************************************************/
6392 PUBLIC S16 cmPkTfudciformat1aPdsch
6394 Tfudciformat1aPdsch *param,
6398 PUBLIC S16 cmPkTfudciformat1aPdsch(param, mBuf)
6399 Tfudciformat1aPdsch *param;
6404 TRC3(cmPkTfudciformat1aPdsch)
6406 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
6409 CMCHKPK(cmPkTknU8, ¶m->dai, mBuf);
6412 CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf);
6418 /***********************************************************
6420 * Func : cmUnpkTfudciformat1aPdsch
6423 * Desc : This structure contains the information carried in DCI format 1A
6424 * when it is NOT used for a PDCCH order.
6433 **********************************************************/
6435 PUBLIC S16 cmUnpkTfudciformat1aPdsch
6437 Tfudciformat1aPdsch *param,
6441 PUBLIC S16 cmUnpkTfudciformat1aPdsch(param, mBuf)
6442 Tfudciformat1aPdsch *param;
6447 TRC3(cmUnpkTfudciformat1aPdsch)
6449 CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf);
6452 CMCHKUNPK(cmUnpkTknU8, ¶m->dai, mBuf);
6455 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
6462 /***********************************************************
6464 * Func : cmUnpkTfudciformat61aPdsch
6467 * Desc : This structure contains the information carried in DCI format 6-1A
6468 * when it is NOT used for a PDCCH order.
6477 **********************************************************/
6479 PUBLIC S16 cmUnpkTfudciformat61aPdsch
6481 Tfudciformat61aPdsch *param,
6485 PUBLIC S16 cmUnpkTfudciformat61aPdsch(param, mBuf)
6486 Tfudciformat61aPdsch *param;
6491 TRC3(cmUnpkTfudciformat61aPdsch)
6493 printf("1. cmUnpkTfudciformat61aPdsch :: Entry \n");
6494 CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf);
6495 printf("2. cmUnpkTfudciformat61aPdsch :: Entry \n");
6496 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
6497 printf("3. cmUnpkTfudciformat61aPdsch :: Entry \n");
6498 CMCHKUNPK(SUnpkU8, ¶m->rep, mBuf);
6499 printf("4. cmUnpkTfudciformat61aPdsch :: Entry \n");
6500 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
6501 printf("5. cmUnpkTfudciformat61aPdsch :: Entry \n");
6503 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
6504 printf("6. cmUnpkTfudciformat61aPdsch :: Entry \n");
6506 CMCHKUNPK(SUnpkU8, ¶m->antPortAndScrId, mBuf);
6507 printf("7. cmUnpkTfudciformat61aPdsch :: Entry \n");
6508 CMCHKUNPK(SUnpkU8, ¶m->isSrs, mBuf);
6509 printf("8. cmUnpkTfudciformat61aPdsch :: Entry \n");
6510 CMCHKUNPK(SUnpkU8, ¶m->tPmi, mBuf);
6511 printf("9. cmUnpkTfudciformat61aPdsch :: Entry \n");
6512 CMCHKUNPK(SUnpkU8, ¶m->pmiCfm, mBuf);
6513 printf("10. cmUnpkTfudciformat61aPdsch :: Entry \n");
6514 CMCHKUNPK(SUnpkU8, ¶m->harqAckOffst, mBuf);
6515 printf("11. cmUnpkTfudciformat61aPdsch :: Entry \n");
6516 CMCHKUNPK(SUnpkU8, ¶m->dciRep, mBuf);
6517 printf("12. cmUnpkTfudciformat61aPdsch :: Entry \n");
6518 CMCHKUNPK(SUnpkU8, ¶m->isTBMsg4, mBuf);
6519 printf("1. cmUnpkTfudciformat61aPdsch :: Passed \n");
6522 /***********************************************************
6524 * Func : cmUnpkTfuDirectIndication
6527 * Desc : This structure contains the information that is carried in DCI
6528 * format 6-2 in the case of a Direct information indication.
6537 **********************************************************/
6539 PRIVATE S16 cmUnpkTfuDirectIndication
6541 TfuDirectIndication *param,
6545 PRIVATE S16 cmUnpkTfuDirectIndication(param, mBuf)
6546 TfuDirectIndication *param;
6551 TRC3(cmUnpkTfuDirectIndication)
6552 CMCHKUNPK(SUnpkU8, ¶m->directInd, mBuf);
6558 /***********************************************************
6560 * Func : cmUnpkTfuDciFormat62AllocInfo
6563 * Desc : This structure contains only the allocation information, that is part
6564 * of DCI format 6-2.
6565 * @details Allocation information also contains parameters necessary
6566 * for Physical layer to process Downlink data. This structure accompanies the
6567 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6568 * @sa TfuDciFormat62Info
6577 **********************************************************/
6579 PUBLIC S16 cmUnpkTfuDciFormat62AllocInfo
6581 TfuDciFormat62AllocInfo *param,
6585 PUBLIC S16 cmUnpkTfuDciFormat62AllocInfo(param, mBuf)
6586 TfuDciFormat62AllocInfo *param;
6590 TRC3(cmUnpkTfuDciFormat62AllocInfo)
6591 CMCHKUNPK(SUnpkU8, ¶m->riv, mBuf);
6592 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6593 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6598 /***********************************************************
6600 * Func : cmUnpkTfudciformat62Pdsch
6603 * Desc : This structure contains the information carried in DCI format 6-2
6604 * when It is used for Paging message.
6613 **********************************************************/
6615 PRIVATE S16 cmUnpkTfudciformat62Pdsch
6617 Tfudciformat62Pdsch *param,
6621 PRIVATE S16 cmUnpkTfudciformat62Pdsch(param, mBuf)
6622 Tfudciformat62Pdsch *param;
6627 TRC3(cmUnpkTfudciformat62Pdsch)
6630 CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf);
6631 CMCHKUNPK(SUnpkU8, ¶m->repNum, mBuf);
6632 CMCHKUNPK(SUnpkU8, ¶m->dciSubRepNum, mBuf);
6637 /***********************************************************
6639 * Func : cmUnpkTfuDciFormat62Info
6642 * Desc : This structure contains the information needed to convey DCI format 6-2.
6643 * @details Format can possibly carry PDSCH allocation or information needed for
6644 * a Direct information Indication.
6654 **********************************************************/
6656 PUBLIC S16 cmUnpkTfuDciFormat62Info
6658 TfuDciFormat62Info *param,
6662 PUBLIC S16 cmUnpkTfuDciFormat62Info(param, mBuf)
6663 TfuDciFormat62Info *param;
6668 TRC3(cmUnpkTfuDciFormat62Info)
6669 CMCHKUNPK(SUnpkU8, ¶m->isPaging, mBuf);
6670 switch(param->isPaging) {
6672 CMCHKUNPK(cmUnpkTfuDirectIndication, ¶m->t.directIndication, mBuf);
6675 CMCHKUNPK(cmUnpkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf);
6696 /***********************************************************
6698 * Func : cmPkTfuDirectIndication
6701 * Desc : This structure contains the information that is carried in DCI
6702 * format 6-2 in the case of a Direct information indication.
6711 **********************************************************/
6713 PRIVATE S16 cmPkTfuDirectIndication
6715 TfuDirectIndication *param,
6719 PRIVATE S16 cmPkTfuDirectIndication(param, mBuf)
6720 TfuDirectIndication *param;
6725 TRC3(cmPkTfuDirectIndication)
6726 CMCHKPK(SPkU8, param->directInd, mBuf);
6734 /***********************************************************
6736 * Func : cmPkTfuDciFormat62AllocInfo
6739 * Desc : This structure contains only the allocation information, that is part
6740 * of DCI format 6-2.
6741 * @details Allocation information also contains parameters necessary
6742 * for Physical layer to process Downlink data. This structure accompanies the
6743 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6744 * @sa TfuDciFormat62Info
6753 **********************************************************/
6755 PUBLIC S16 cmPkTfuDciFormat62AllocInfo
6757 TfuDciFormat62AllocInfo *param,
6761 PUBLIC S16 cmPkTfuDciFormat62AllocInfo(param, mBuf)
6762 TfuDciFormat62AllocInfo *param;
6767 TRC3(cmPkTfuDciFormat6AAllocInfo)
6769 CMCHKPK(SPkU8, param->rv, mBuf);
6770 CMCHKPK(SPkU8, param->mcs, mBuf);
6771 CMCHKPK(SPkU8, param->riv, mBuf);
6778 /***********************************************************
6780 * Func : cmPkTfudciformat62Pdsch
6783 * Desc : This structure contains the information carried in DCI format 6-2
6784 * when It is used for Paging message.
6793 **********************************************************/
6795 PRIVATE S16 cmPkTfudciformat62Pdsch
6797 Tfudciformat62Pdsch *param,
6801 PRIVATE S16 cmPkTfudciformat62Pdsch(param, mBuf)
6802 Tfudciformat62Pdsch *param;
6807 TRC3(cmPkTfudciformat62Pdsch)
6808 CMCHKPK(SPkU8, param->dciSubRepNum, mBuf);
6809 CMCHKPK(SPkU8, param->repNum, mBuf);
6810 CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf);
6817 /***********************************************************
6819 * Func : cmPkTfuDciFormat62Info
6822 * Desc : This structure contains the information needed to convey DCI format 6-2.
6823 * @details Format can possibly carry PDSCH allocation or information needed for
6824 * a Direct information Indication.
6834 **********************************************************/
6836 PUBLIC S16 cmPkTfuDciFormat62Info
6838 TfuDciFormat62Info *param,
6842 PUBLIC S16 cmPkTfuDciFormat62Info(param, mBuf)
6843 TfuDciFormat62Info *param;
6848 TRC3(cmPkTfuDciFormat62Info)
6850 switch(param->isPaging) {
6852 CMCHKPK(cmPkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf);
6855 CMCHKPK(cmPkTfuDirectIndication, ¶m->t.directIndication, mBuf);
6860 CMCHKPK(SPkU8, param->isPaging, mBuf);
6873 /***********************************************************
6875 * Func : cmPkTfuDciFormat1aInfo
6878 * Desc : This structure contains the information needed to convey DCI format 1A.
6879 * @details Format can possibly carry PDSCH allocation or information needed for
6880 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
6890 **********************************************************/
6892 PUBLIC S16 cmPkTfuDciFormat1aInfo
6894 TfuDciFormat1aInfo *param,
6898 PUBLIC S16 cmPkTfuDciFormat1aInfo(param, mBuf)
6899 TfuDciFormat1aInfo *param;
6904 TRC3(cmPkTfuDciFormat1aInfo)
6906 switch(param->isPdcchOrder) {
6908 CMCHKPK(cmPkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf);
6911 CMCHKPK(cmPkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf);
6916 CMCHKPK(SPkU8, param->isPdcchOrder, mBuf);
6923 /***********************************************************
6925 * Func : cmUnpkTfuDciFormat1aInfo
6928 * Desc : This structure contains the information needed to convey DCI format 1A.
6929 * @details Format can possibly carry PDSCH allocation or information needed for
6930 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
6940 **********************************************************/
6942 PUBLIC S16 cmUnpkTfuDciFormat1aInfo
6944 TfuDciFormat1aInfo *param,
6948 PUBLIC S16 cmUnpkTfuDciFormat1aInfo(param, mBuf)
6949 TfuDciFormat1aInfo *param;
6954 TRC3(cmUnpkTfuDciFormat1aInfo)
6956 CMCHKUNPK(SUnpkU8, ¶m->isPdcchOrder, mBuf);
6957 switch(param->isPdcchOrder) {
6959 CMCHKUNPK(cmUnpkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf);
6962 CMCHKUNPK(cmUnpkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf);
6972 /***********************************************************
6974 * Func : cmPkTfuDciFormat1bInfo
6977 * Desc : This structure contains the information needed to convey DCI format 1A.
6978 * @details Allocation information is separated from the other control
6979 * information carried in this format. This separation is needed as Data shall
6980 * also carry some control information, essentially allocation information,
6981 * along with it, in order to aid physical layer processing of the data.
6990 **********************************************************/
6992 PUBLIC S16 cmPkTfuDciFormat1bInfo
6994 TfuDciFormat1bInfo *param,
6998 PUBLIC S16 cmPkTfuDciFormat1bInfo(param, mBuf)
6999 TfuDciFormat1bInfo *param;
7004 TRC3(cmPkTfuDciFormat1bInfo)
7006 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
7009 CMCHKPK(SPkU8, param->dai, mBuf);
7012 CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf);
7018 /***********************************************************
7020 * Func : cmUnpkTfuDciFormat1bInfo
7023 * Desc : This structure contains the information needed to convey DCI format 1A.
7024 * @details Allocation information is separated from the other control
7025 * information carried in this format. This separation is needed as Data shall
7026 * also carry some control information, essentially allocation information,
7027 * along with it, in order to aid physical layer processing of the data.
7036 **********************************************************/
7038 PUBLIC S16 cmUnpkTfuDciFormat1bInfo
7040 TfuDciFormat1bInfo *param,
7044 PUBLIC S16 cmUnpkTfuDciFormat1bInfo(param, mBuf)
7045 TfuDciFormat1bInfo *param;
7050 TRC3(cmUnpkTfuDciFormat1bInfo)
7052 CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf);
7055 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
7058 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
7064 /***********************************************************
7066 * Func : cmPkTfuDciInfo
7069 * Desc : This structure contains the information needed to convey the possible DCI
7070 * formats. The following are the supported formats -
7071 * -# Format 0 - used for PUSCH scheduling
7072 * -# Format 1 - used for PDSCH scheduling
7073 * -# Format 1A - used for compact scheduling of PDSCH or RA procedure
7074 * intitiated by a PDCCH order.
7075 * -# Format 1B - used for compact scheduling of PDSCH with precoding
7077 * -# Format 1C - used for very compact scheduling of PDSCH.
7078 * -# Format 1D - used for compact scheduling for PDSCH with precoding
7079 * information with power offset.
7080 * -# Format 2 - used for PDSCH Scheduling
7081 * -# Format 2A - used for PDSCH Scheduling
7082 * -# Format 3 - used for power control
7083 * -# Format 3A - used for power control
7092 **********************************************************/
7094 PUBLIC S16 cmPkTfuDciInfo
7100 PUBLIC S16 cmPkTfuDciInfo(param, mBuf)
7106 TRC3(cmPkTfuDciInfo)
7108 switch(param->dciFormat) {
7110 case TFU_DCI_FORMAT_B1:
7111 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
7113 case TFU_DCI_FORMAT_B2:
7114 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
7116 case TFU_DCI_FORMAT_A1:
7117 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
7119 case TFU_DCI_FORMAT_A2:
7120 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
7124 case TFU_DCI_FORMAT_6_2:
7125 CMCHKPK(cmPkTfuDciFormat62Info, ¶m->u.format62Info, mBuf);
7127 case TFU_DCI_FORMAT_6_1A:
7128 CMCHKPK(cmPkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf);
7130 case TFU_DCI_FORMAT_6_0A:
7131 CMCHKPK(cmPkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf);
7134 case TFU_DCI_FORMAT_3A:
7135 CMCHKPK(cmPkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf);
7137 case TFU_DCI_FORMAT_3:
7138 CMCHKPK(cmPkTfuDciFormat3Info, ¶m->u.format3Info, mBuf);
7140 case TFU_DCI_FORMAT_2A:
7141 CMCHKPK(cmPkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf);
7143 case TFU_DCI_FORMAT_2:
7144 CMCHKPK(cmPkTfuDciFormat2Info, ¶m->u.format2Info, mBuf);
7146 case TFU_DCI_FORMAT_1D:
7147 CMCHKPK(cmPkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf);
7149 case TFU_DCI_FORMAT_1C:
7150 CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf);
7152 case TFU_DCI_FORMAT_1B:
7153 CMCHKPK(cmPkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf);
7155 case TFU_DCI_FORMAT_1A:
7156 CMCHKPK(cmPkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf);
7158 case TFU_DCI_FORMAT_1:
7159 CMCHKPK(cmPkTfuDciFormat1Info, ¶m->u.format1Info, mBuf);
7161 case TFU_DCI_FORMAT_0:
7162 CMCHKPK(cmPkTfuDciFormat0Info, ¶m->u.format0Info, mBuf);
7167 CMCHKPK(SPkU32, param->dciFormat, mBuf);
7173 /***********************************************************
7175 * Func : cmUnpkTfuDciInfo
7178 * Desc : This structure contains the information needed to convey the possible DCI
7179 * formats. The following are the supported formats -
7180 * -# Format 0 - used for PUSCH scheduling
7181 * -# Format 1 - used for PDSCH scheduling
7182 * -# Format 1A - used for compact scheduling of PDSCH or RA procedure
7183 * intitiated by a PDCCH order.
7184 * -# Format 1B - used for compact scheduling of PDSCH with precoding
7186 * -# Format 1C - used for very compact scheduling of PDSCH.
7187 * -# Format 1D - used for compact scheduling for PDSCH with precoding
7188 * information with power offset.
7189 * -# Format 2 - used for PDSCH Scheduling
7190 * -# Format 2A - used for PDSCH Scheduling
7191 * -# Format 3 - used for power control
7192 * -# Format 3A - used for power control
7201 **********************************************************/
7203 PUBLIC S16 cmUnpkTfuDciInfo
7209 PUBLIC S16 cmUnpkTfuDciInfo(param, mBuf)
7215 TRC3(cmUnpkTfuDciInfo)
7218 CMCHKUNPK(SUnpkU32, (U32 *)¶m->dciFormat, mBuf);
7219 switch(param->dciFormat) {
7220 case TFU_DCI_FORMAT_0:
7221 CMCHKUNPK(cmUnpkTfuDciFormat0Info, ¶m->u.format0Info, mBuf);
7223 case TFU_DCI_FORMAT_1:
7224 CMCHKUNPK(cmUnpkTfuDciFormat1Info, ¶m->u.format1Info, mBuf);
7226 case TFU_DCI_FORMAT_1A:
7227 CMCHKUNPK(cmUnpkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf);
7229 case TFU_DCI_FORMAT_1B:
7230 CMCHKUNPK(cmUnpkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf);
7232 case TFU_DCI_FORMAT_1C:
7233 CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf);
7235 case TFU_DCI_FORMAT_1D:
7236 CMCHKUNPK(cmUnpkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf);
7238 case TFU_DCI_FORMAT_2:
7239 CMCHKUNPK(cmUnpkTfuDciFormat2Info, ¶m->u.format2Info, mBuf);
7241 case TFU_DCI_FORMAT_2A:
7242 CMCHKUNPK(cmUnpkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf);
7244 case TFU_DCI_FORMAT_3:
7245 CMCHKUNPK(cmUnpkTfuDciFormat3Info, ¶m->u.format3Info, mBuf);
7247 case TFU_DCI_FORMAT_3A:
7248 CMCHKUNPK(cmUnpkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf);
7251 case TFU_DCI_FORMAT_6_0A:
7252 CMCHKUNPK(cmUnpkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf);
7253 printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat);
7255 case TFU_DCI_FORMAT_6_1A:
7256 CMCHKUNPK(cmUnpkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf);
7257 printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat);
7259 case TFU_DCI_FORMAT_6_2:
7260 CMCHKUNPK(cmUnpkTfuDciFormat62Info, ¶m->u.format62Info, mBuf);
7265 case TFU_DCI_FORMAT_A1:
7266 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
7268 case TFU_DCI_FORMAT_A2:
7269 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
7271 case TFU_DCI_FORMAT_B1:
7272 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
7274 case TFU_DCI_FORMAT_B2:
7275 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
7286 /***********************************************************
7288 * Func : cmPkTfuSubbandInfo
7291 * Desc : This structure contains the information needed to convey the start and size
7292 * of the subband in the CQI report.
7301 **********************************************************/
7303 PUBLIC S16 cmPkTfuSubbandInfo
7305 TfuSubbandInfo *param,
7309 PUBLIC S16 cmPkTfuSubbandInfo(param, mBuf)
7310 TfuSubbandInfo *param;
7315 TRC3(cmPkTfuSubbandInfo)
7317 CMCHKPK(SPkU8, param->numRb, mBuf);
7318 CMCHKPK(SPkU8, param->rbStart, mBuf);
7324 /***********************************************************
7326 * Func : cmUnpkTfuSubbandInfo
7329 * Desc : This structure contains the information needed to convey the start and size
7330 * of the subband in the CQI report.
7339 **********************************************************/
7341 PUBLIC S16 cmUnpkTfuSubbandInfo
7343 TfuSubbandInfo *param,
7347 PUBLIC S16 cmUnpkTfuSubbandInfo(param, mBuf)
7348 TfuSubbandInfo *param;
7353 TRC3(cmUnpkTfuSubbandInfo)
7355 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
7356 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
7363 /***********************************************************
7365 * Func : cmPkTfuSubbandCqiInfo
7368 * Desc : This structure is used to convey the subbannd CQI reported.
7377 **********************************************************/
7379 PUBLIC S16 cmPkTfuSubbandCqiInfo
7381 TfuSubbandCqiInfo *param,
7385 PUBLIC S16 cmPkTfuSubbandCqiInfo(param, mBuf)
7386 TfuSubbandCqiInfo *param;
7391 TRC3(cmPkTfuSubbandCqiInfo)
7393 CMCHKPK(SPkU8, param->cqiIdx, mBuf);
7394 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf);
7400 /***********************************************************
7402 * Func : cmUnpkTfuSubbandCqiInfo
7405 * Desc : This structure is used to convey the subbannd CQI reported.
7414 **********************************************************/
7416 PUBLIC S16 cmUnpkTfuSubbandCqiInfo
7418 TfuSubbandCqiInfo *param,
7422 PUBLIC S16 cmUnpkTfuSubbandCqiInfo(param, mBuf)
7423 TfuSubbandCqiInfo *param;
7428 TRC3(cmUnpkTfuSubbandCqiInfo)
7430 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf);
7431 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx, mBuf);
7437 /***********************************************************
7439 * Func : cmPkTfuPdcchCceInfo
7442 * Desc : This structure conveys the CCE information.
7451 **********************************************************/
7453 PUBLIC S16 cmPkTfuPdcchCceInfo
7455 TfuPdcchCceInfo *param,
7459 PUBLIC S16 cmPkTfuPdcchCceInfo(param, mBuf)
7460 TfuPdcchCceInfo *param;
7465 TRC3(cmPkTfuPdcchCceInfo)
7467 CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf);
7468 CMCHKPK(SPkU8, param->cceIdx, mBuf);
7474 /***********************************************************
7476 * Func : cmUnpkTfuPdcchCceInfo
7479 * Desc : This structure conveys the CCE information.
7488 **********************************************************/
7490 PUBLIC S16 cmUnpkTfuPdcchCceInfo
7492 TfuPdcchCceInfo *param,
7496 PUBLIC S16 cmUnpkTfuPdcchCceInfo(param, mBuf)
7497 TfuPdcchCceInfo *param;
7502 TRC3(cmUnpkTfuPdcchCceInfo)
7504 CMCHKUNPK(SUnpkU8, ¶m->cceIdx, mBuf);
7505 CMCHKUNPK(cmUnpkLteAggrLvl,(U32 *)¶m->aggrLvl, mBuf);
7511 /***********************************************************
7513 * Func : cmPkTfuCqiPucchMode10
7516 * Desc : This structure maps to the CQI mode 10. The report could either
7517 * convey a Rank index or a wideband CQI.
7526 **********************************************************/
7528 PUBLIC S16 cmPkTfuCqiPucchMode10
7530 TfuCqiPucchMode10 *param,
7534 PUBLIC S16 cmPkTfuCqiPucchMode10(param, mBuf)
7535 TfuCqiPucchMode10 *param;
7540 TRC3(cmPkTfuCqiPucchMode10)
7542 switch(param->type) {
7544 CMCHKPK(SPkU8, param->u.cqi, mBuf);
7547 CMCHKPK(SPkU8, param->u.ri, mBuf);
7552 CMCHKPK(SPkU32, param->type, mBuf);
7558 /***********************************************************
7560 * Func : cmUnpkTfuCqiPucchMode10
7563 * Desc : This structure maps to the CQI mode 10. The report could either
7564 * convey a Rank index or a wideband CQI.
7573 **********************************************************/
7575 PUBLIC S16 cmUnpkTfuCqiPucchMode10
7577 TfuCqiPucchMode10 *param,
7581 PUBLIC S16 cmUnpkTfuCqiPucchMode10(param, mBuf)
7582 TfuCqiPucchMode10 *param;
7587 TRC3(cmUnpkTfuCqiPucchMode10)
7589 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
7590 switch(param->type) {
7592 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
7595 CMCHKUNPK(SUnpkU8, ¶m->u.cqi, mBuf);
7605 /***********************************************************
7607 * Func : cmPkTfuCqiMode11Cqi
7610 * Desc : This structure contains a wideband CQI, PMI and optionally a
7611 * wideband differential CQI.
7620 **********************************************************/
7622 PUBLIC S16 cmPkTfuCqiMode11Cqi
7624 TfuCqiMode11Cqi *param,
7628 PUBLIC S16 cmPkTfuCqiMode11Cqi(param, mBuf)
7629 TfuCqiMode11Cqi *param;
7634 TRC3(cmPkTfuCqiMode11Cqi)
7636 CMCHKPK(cmPkTknU8, ¶m->wideDiffCqi, mBuf);
7637 CMCHKPK(SPkU8, param->pmi, mBuf);
7638 CMCHKPK(SPkU8, param->cqi, mBuf);
7644 /***********************************************************
7646 * Func : cmUnpkTfuCqiMode11Cqi
7649 * Desc : This structure contains a wideband CQI, PMI and optionally a
7650 * wideband differential CQI.
7659 **********************************************************/
7661 PUBLIC S16 cmUnpkTfuCqiMode11Cqi
7663 TfuCqiMode11Cqi *param,
7667 PUBLIC S16 cmUnpkTfuCqiMode11Cqi(param, mBuf)
7668 TfuCqiMode11Cqi *param;
7673 TRC3(cmUnpkTfuCqiMode11Cqi)
7675 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
7676 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
7677 CMCHKUNPK(cmUnpkTknU8, ¶m->wideDiffCqi, mBuf);
7683 /***********************************************************
7685 * Func : cmPkTfuCqiPucchMode11
7688 * Desc : This structure maps to the CQI mode 11. The report could either
7689 * convey a Rank index or a CQI report.
7698 **********************************************************/
7700 PUBLIC S16 cmPkTfuCqiPucchMode11
7702 TfuCqiPucchMode11 *param,
7706 PUBLIC S16 cmPkTfuCqiPucchMode11(param, mBuf)
7707 TfuCqiPucchMode11 *param;
7712 TRC3(cmPkTfuCqiPucchMode11)
7714 switch(param->type) {
7716 CMCHKPK(cmPkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf);
7719 CMCHKPK(SPkU8, param->u.ri, mBuf);
7724 CMCHKPK(SPkU32, param->type, mBuf);
7730 /***********************************************************
7732 * Func : cmUnpkTfuCqiPucchMode11
7735 * Desc : This structure maps to the CQI mode 11. The report could either
7736 * convey a Rank index or a CQI report.
7745 **********************************************************/
7747 PUBLIC S16 cmUnpkTfuCqiPucchMode11
7749 TfuCqiPucchMode11 *param,
7753 PUBLIC S16 cmUnpkTfuCqiPucchMode11(param, mBuf)
7754 TfuCqiPucchMode11 *param;
7759 TRC3(cmUnpkTfuCqiPucchMode11)
7761 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
7762 switch(param->type) {
7764 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
7767 CMCHKUNPK(cmUnpkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf);
7777 /***********************************************************
7779 * Func : cmPkTfuCqiMode20SubCqi
7782 * Desc : This structure contains the SubBand CQI for mode 2-0.
7791 **********************************************************/
7793 PUBLIC S16 cmPkTfuCqiMode20SubCqi
7795 TfuCqiMode20SubCqi *param,
7799 PUBLIC S16 cmPkTfuCqiMode20SubCqi(param, mBuf)
7800 TfuCqiMode20SubCqi *param;
7805 TRC3(cmPkTfuCqiMode20SubCqi)
7807 CMCHKPK(SPkU8, param->l, mBuf);
7808 CMCHKPK(SPkU8, param->cqi, mBuf);
7814 /***********************************************************
7816 * Func : cmUnpkTfuCqiMode20SubCqi
7819 * Desc : This structure contains the SubBand CQI for mode 2-0.
7828 **********************************************************/
7830 PUBLIC S16 cmUnpkTfuCqiMode20SubCqi
7832 TfuCqiMode20SubCqi *param,
7836 PUBLIC S16 cmUnpkTfuCqiMode20SubCqi(param, mBuf)
7837 TfuCqiMode20SubCqi *param;
7842 TRC3(cmUnpkTfuCqiMode20SubCqi)
7844 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
7845 CMCHKUNPK(SUnpkU8, ¶m->l, mBuf);
7851 /***********************************************************
7853 * Func : cmPkTfuCqiMode20Cqi
7856 * Desc : This structure contains Mode20 CQI report. It could either be a
7857 * wideband CQI or a sub-band CQI.
7866 **********************************************************/
7868 PUBLIC S16 cmPkTfuCqiMode20Cqi
7870 TfuCqiMode20Cqi *param,
7874 PUBLIC S16 cmPkTfuCqiMode20Cqi(param, mBuf)
7875 TfuCqiMode20Cqi *param;
7880 TRC3(cmPkTfuCqiMode20Cqi)
7882 switch(param->isWideband) {
7884 CMCHKPK(cmPkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf);
7887 CMCHKPK(SPkU8, param->u.wideCqi, mBuf);
7892 CMCHKPK(SPkU8, param->isWideband, mBuf);
7898 /***********************************************************
7900 * Func : cmUnpkTfuCqiMode20Cqi
7903 * Desc : This structure contains Mode20 CQI report. It could either be a
7904 * wideband CQI or a sub-band CQI.
7913 **********************************************************/
7915 PUBLIC S16 cmUnpkTfuCqiMode20Cqi
7917 TfuCqiMode20Cqi *param,
7921 PUBLIC S16 cmUnpkTfuCqiMode20Cqi(param, mBuf)
7922 TfuCqiMode20Cqi *param;
7927 TRC3(cmUnpkTfuCqiMode20Cqi)
7929 CMCHKUNPK(SUnpkU8, ¶m->isWideband, mBuf);
7930 switch(param->isWideband) {
7932 CMCHKUNPK(SUnpkU8, ¶m->u.wideCqi, mBuf);
7935 CMCHKUNPK(cmUnpkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf);
7945 /***********************************************************
7947 * Func : cmPkTfuCqiPucchMode20
7950 * Desc : This structure maps to CQI mode 20. The report either contains a
7951 * Rank Index or a CQI report.
7960 **********************************************************/
7962 PUBLIC S16 cmPkTfuCqiPucchMode20
7964 TfuCqiPucchMode20 *param,
7968 PUBLIC S16 cmPkTfuCqiPucchMode20(param, mBuf)
7969 TfuCqiPucchMode20 *param;
7974 TRC3(cmPkTfuCqiPucchMode20)
7976 switch(param->type) {
7978 CMCHKPK(cmPkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf);
7981 CMCHKPK(SPkU8, param->u.ri, mBuf);
7986 CMCHKPK(SPkU32, param->type, mBuf);
7992 /***********************************************************
7994 * Func : cmUnpkTfuCqiPucchMode20
7997 * Desc : This structure maps to CQI mode 20. The report either contains a
7998 * Rank Index or a CQI report.
8007 **********************************************************/
8009 PUBLIC S16 cmUnpkTfuCqiPucchMode20
8011 TfuCqiPucchMode20 *param,
8015 PUBLIC S16 cmUnpkTfuCqiPucchMode20(param, mBuf)
8016 TfuCqiPucchMode20 *param;
8021 TRC3(cmUnpkTfuCqiPucchMode20)
8023 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
8024 switch(param->type) {
8026 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
8029 CMCHKUNPK(cmUnpkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf);
8039 /***********************************************************
8041 * Func : cmPkTfuCqiMode21SubCqi
8044 * Desc : This structure contains the sub-band CQI report for mode 2-1.
8045 * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
8054 **********************************************************/
8056 PUBLIC S16 cmPkTfuCqiMode21SubCqi
8058 TfuCqiMode21SubCqi *param,
8062 PUBLIC S16 cmPkTfuCqiMode21SubCqi(param, mBuf)
8063 TfuCqiMode21SubCqi *param;
8068 TRC3(cmPkTfuCqiMode21SubCqi)
8070 CMCHKPK(cmPkTknU8, ¶m->diffCqi, mBuf);
8071 CMCHKPK(SPkU8, param->l, mBuf);
8072 CMCHKPK(SPkU8, param->cqi, mBuf);
8078 /***********************************************************
8080 * Func : cmUnpkTfuCqiMode21SubCqi
8083 * Desc : This structure contains the sub-band CQI report for mode 2-1.
8084 * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
8093 **********************************************************/
8095 PUBLIC S16 cmUnpkTfuCqiMode21SubCqi
8097 TfuCqiMode21SubCqi *param,
8101 PUBLIC S16 cmUnpkTfuCqiMode21SubCqi(param, mBuf)
8102 TfuCqiMode21SubCqi *param;
8107 TRC3(cmUnpkTfuCqiMode21SubCqi)
8109 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
8110 CMCHKUNPK(SUnpkU8, ¶m->l, mBuf);
8111 CMCHKUNPK(cmUnpkTknU8, ¶m->diffCqi, mBuf);
8117 /***********************************************************
8119 * Func : cmPkTfuCqiMode21WideCqi
8122 * Desc : This structure contains the wideband CQI report for mode 2-1.
8123 * It carries a wideband CQI, PMI and optionally a differential CQI.
8132 **********************************************************/
8134 PUBLIC S16 cmPkTfuCqiMode21WideCqi
8136 TfuCqiMode21WideCqi *param,
8140 PUBLIC S16 cmPkTfuCqiMode21WideCqi(param, mBuf)
8141 TfuCqiMode21WideCqi *param;
8146 TRC3(cmPkTfuCqiMode21WideCqi)
8148 CMCHKPK(cmPkTknU8, ¶m->diffCqi, mBuf);
8149 CMCHKPK(SPkU8, param->pmi, mBuf);
8150 CMCHKPK(SPkU8, param->cqi, mBuf);
8156 /***********************************************************
8158 * Func : cmUnpkTfuCqiMode21WideCqi
8161 * Desc : This structure contains the wideband CQI report for mode 2-1.
8162 * It carries a wideband CQI, PMI and optionally a differential CQI.
8171 **********************************************************/
8173 PUBLIC S16 cmUnpkTfuCqiMode21WideCqi
8175 TfuCqiMode21WideCqi *param,
8179 PUBLIC S16 cmUnpkTfuCqiMode21WideCqi(param, mBuf)
8180 TfuCqiMode21WideCqi *param;
8185 TRC3(cmUnpkTfuCqiMode21WideCqi)
8187 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
8188 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
8189 CMCHKUNPK(cmUnpkTknU8, ¶m->diffCqi, mBuf);
8195 /***********************************************************
8197 * Func : cmPkTfuCqiMode21Cqi
8200 * Desc : This structure conveys CQI report for mode 2-1. The reported value
8201 * could either be wideband or sub-band.
8210 **********************************************************/
8212 PUBLIC S16 cmPkTfuCqiMode21Cqi
8214 TfuCqiMode21Cqi *param,
8218 PUBLIC S16 cmPkTfuCqiMode21Cqi(param, mBuf)
8219 TfuCqiMode21Cqi *param;
8224 TRC3(cmPkTfuCqiMode21Cqi)
8226 switch(param->isWideband) {
8228 CMCHKPK(cmPkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf);
8231 CMCHKPK(cmPkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf);
8236 CMCHKPK(SPkU8, param->isWideband, mBuf);
8242 /***********************************************************
8244 * Func : cmUnpkTfuCqiMode21Cqi
8247 * Desc : This structure conveys CQI report for mode 2-1. The reported value
8248 * could either be wideband or sub-band.
8257 **********************************************************/
8259 PUBLIC S16 cmUnpkTfuCqiMode21Cqi
8261 TfuCqiMode21Cqi *param,
8265 PUBLIC S16 cmUnpkTfuCqiMode21Cqi(param, mBuf)
8266 TfuCqiMode21Cqi *param;
8271 TRC3(cmUnpkTfuCqiMode21Cqi)
8273 CMCHKUNPK(SUnpkU8, ¶m->isWideband, mBuf);
8274 switch(param->isWideband) {
8276 CMCHKUNPK(cmUnpkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf);
8279 CMCHKUNPK(cmUnpkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf);
8289 /***********************************************************
8291 * Func : cmPkTfuCqiPucchMode21
8294 * Desc : This structure maps to the CQI reporting mode 2-1. The report either
8295 * conveys a Rank Indicator or a CQI report.
8304 **********************************************************/
8306 PUBLIC S16 cmPkTfuCqiPucchMode21
8308 TfuCqiPucchMode21 *param,
8312 PUBLIC S16 cmPkTfuCqiPucchMode21(param, mBuf)
8313 TfuCqiPucchMode21 *param;
8318 TRC3(cmPkTfuCqiPucchMode21)
8320 switch(param->type) {
8322 CMCHKPK(cmPkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf);
8325 CMCHKPK(SPkU8, param->u.ri, mBuf);
8330 CMCHKPK(SPkU32, param->type, mBuf);
8336 /***********************************************************
8338 * Func : cmUnpkTfuCqiPucchMode21
8341 * Desc : This structure maps to the CQI reporting mode 2-1. The report either
8342 * conveys a Rank Indicator or a CQI report.
8351 **********************************************************/
8353 PUBLIC S16 cmUnpkTfuCqiPucchMode21
8355 TfuCqiPucchMode21 *param,
8359 PUBLIC S16 cmUnpkTfuCqiPucchMode21(param, mBuf)
8360 TfuCqiPucchMode21 *param;
8365 TRC3(cmUnpkTfuCqiPucchMode21)
8367 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
8368 switch(param->type) {
8370 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
8373 CMCHKUNPK(cmUnpkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf);
8383 /***********************************************************
8385 * Func : cmPkTfuDlCqiPucch
8388 * Desc : This structure conveys the Downlink CQI reported on PUCCH.
8397 **********************************************************/
8399 PUBLIC S16 cmPkTfuDlCqiPucch
8401 TfuDlCqiPucch *param,
8405 PUBLIC S16 cmPkTfuDlCqiPucch(param, mBuf)
8406 TfuDlCqiPucch *param;
8411 TRC3(cmPkTfuDlCqiPucch)
8413 switch(param->mode) {
8414 case TFU_PUCCH_CQI_MODE21:
8415 CMCHKPK(cmPkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf);
8417 case TFU_PUCCH_CQI_MODE20:
8418 CMCHKPK(cmPkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf);
8420 case TFU_PUCCH_CQI_MODE11:
8421 CMCHKPK(cmPkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf);
8423 case TFU_PUCCH_CQI_MODE10:
8424 CMCHKPK(cmPkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf);
8429 CMCHKPK(SPkU32, param->mode, mBuf);
8430 CMCHKPK(SPkU8, param->cellIdx, mBuf);
8436 /***********************************************************
8438 * Func : cmUnpkTfuDlCqiPucch
8441 * Desc : This structure conveys the Downlink CQI reported on PUCCH.
8450 **********************************************************/
8452 PUBLIC S16 cmUnpkTfuDlCqiPucch
8454 TfuDlCqiPucch *param,
8458 PUBLIC S16 cmUnpkTfuDlCqiPucch(param, mBuf)
8459 TfuDlCqiPucch *param;
8464 TRC3(cmUnpkTfuDlCqiPucch)
8466 CMCHKUNPK(SUnpkU8, ¶m->cellIdx, mBuf);
8467 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
8468 switch(param->mode) {
8469 case TFU_PUCCH_CQI_MODE10:
8470 CMCHKUNPK(cmUnpkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf);
8472 case TFU_PUCCH_CQI_MODE11:
8473 CMCHKUNPK(cmUnpkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf);
8475 case TFU_PUCCH_CQI_MODE20:
8476 CMCHKUNPK(cmUnpkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf);
8478 case TFU_PUCCH_CQI_MODE21:
8479 CMCHKUNPK(cmUnpkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf);
8489 /***********************************************************
8491 * Func : cmPkTfuSubbandMode12
8494 * Desc : This structure carries subband information and PMI, in the CQI
8495 * reporting format 1-2.
8504 **********************************************************/
8506 PUBLIC S16 cmPkTfuSubbandMode12
8508 TfuSubbandMode12 *param,
8512 PUBLIC S16 cmPkTfuSubbandMode12(param, mBuf)
8513 TfuSubbandMode12 *param;
8518 TRC3(cmPkTfuSubbandMode12)
8520 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8521 CMCHKPK(SPkU8, param->pmi, mBuf);
8527 /***********************************************************
8529 * Func : cmUnpkTfuSubbandMode12
8532 * Desc : This structure carries subband information and PMI, in the CQI
8533 * reporting format 1-2.
8542 **********************************************************/
8544 PUBLIC S16 cmUnpkTfuSubbandMode12
8546 TfuSubbandMode12 *param,
8550 PUBLIC S16 cmUnpkTfuSubbandMode12(param, mBuf)
8551 TfuSubbandMode12 *param;
8556 TRC3(cmUnpkTfuSubbandMode12)
8558 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
8559 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8565 /***********************************************************
8567 * Func : cmPkTfuCqiPuschMode12
8570 * Desc : This structure conveys information present in CQI reporting mode 1-2 received
8580 **********************************************************/
8582 PUBLIC S16 cmPkTfuCqiPuschMode12
8584 TfuCqiPuschMode12 *param,
8588 PUBLIC S16 cmPkTfuCqiPuschMode12(param, mBuf)
8589 TfuCqiPuschMode12 *param;
8595 TRC3(cmPkTfuCqiPuschMode12)
8597 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8598 CMCHKPK(cmPkTfuSubbandMode12, ¶m->subbandArr[i], mBuf);
8600 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8601 CMCHKPK(SPkU8, param->cqiIdx[i], mBuf);
8603 CMCHKPK(SPkU8, param->numSubband, mBuf);
8609 /***********************************************************
8611 * Func : cmUnpkTfuCqiPuschMode12
8614 * Desc : This structure conveys information present in CQI reporting mode 1-2 received
8624 **********************************************************/
8626 PUBLIC S16 cmUnpkTfuCqiPuschMode12
8628 TfuCqiPuschMode12 *param,
8632 PUBLIC S16 cmUnpkTfuCqiPuschMode12(param, mBuf)
8633 TfuCqiPuschMode12 *param;
8639 TRC3(cmUnpkTfuCqiPuschMode12)
8641 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8642 for (i=0; i<TFU_MAX_TB; i++) {
8643 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx[i], mBuf);
8645 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8646 CMCHKUNPK(cmUnpkTfuSubbandMode12, ¶m->subbandArr[i], mBuf);
8653 /***********************************************************
8655 * Func : cmPkTfuCqiPuschMode20
8658 * Desc : This structure conveys information present in CQI reporting mode 2-0 received
8659 * over PUSCH. This mode is for UE selected sub-band feedback.
8668 **********************************************************/
8670 PUBLIC S16 cmPkTfuCqiPuschMode20
8672 TfuCqiPuschMode20 *param,
8676 PUBLIC S16 cmPkTfuCqiPuschMode20(param, mBuf)
8677 TfuCqiPuschMode20 *param;
8683 TRC3(cmPkTfuCqiPuschMode20)
8685 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8686 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8688 CMCHKPK(SPkU8, param->numSubband, mBuf);
8689 CMCHKPK(SPkU8, param->wideBandCqi, mBuf);
8690 CMCHKPK(SPkU8, param->cqiIdx, mBuf);
8696 /***********************************************************
8698 * Func : cmUnpkTfuCqiPuschMode20
8701 * Desc : This structure conveys information present in CQI reporting mode 2-0 received
8702 * over PUSCH. This mode is for UE selected sub-band feedback.
8711 **********************************************************/
8713 PUBLIC S16 cmUnpkTfuCqiPuschMode20
8715 TfuCqiPuschMode20 *param,
8719 PUBLIC S16 cmUnpkTfuCqiPuschMode20(param, mBuf)
8720 TfuCqiPuschMode20 *param;
8726 TRC3(cmUnpkTfuCqiPuschMode20)
8728 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx, mBuf);
8729 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi, mBuf);
8730 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8731 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8732 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8738 /***********************************************************
8740 * Func : cmPkTfuCqiPuschMode22
8743 * Desc : This structure conveys information present in CQI reporting mode 2-2 received
8753 **********************************************************/
8755 PUBLIC S16 cmPkTfuCqiPuschMode22
8757 TfuCqiPuschMode22 *param,
8761 PUBLIC S16 cmPkTfuCqiPuschMode22(param, mBuf)
8762 TfuCqiPuschMode22 *param;
8768 TRC3(cmPkTfuCqiPuschMode22)
8771 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8772 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8775 CMCHKPK(SPkU8, param->numSubband, mBuf);
8776 CMCHKPK(SPkU8, param->wideBandPmi, mBuf);
8777 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8778 CMCHKPK(SPkU8, param->wideBandCqi[i], mBuf);
8780 CMCHKPK(SPkU8, param->pmi, mBuf);
8781 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8782 CMCHKPK(SPkU8, param->cqi[i], mBuf);
8789 /***********************************************************
8791 * Func : cmUnpkTfuCqiPuschMode22
8794 * Desc : This structure conveys information present in CQI reporting mode 2-2 received
8804 **********************************************************/
8806 PUBLIC S16 cmUnpkTfuCqiPuschMode22
8808 TfuCqiPuschMode22 *param,
8812 PUBLIC S16 cmUnpkTfuCqiPuschMode22(param, mBuf)
8813 TfuCqiPuschMode22 *param;
8819 TRC3(cmUnpkTfuCqiPuschMode22)
8821 for (i=0; i<TFU_MAX_TB; i++) {
8822 CMCHKUNPK(SUnpkU8, ¶m->cqi[i], mBuf);
8824 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
8825 for (i=0; i<TFU_MAX_TB; i++) {
8826 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi[i], mBuf);
8828 CMCHKUNPK(SUnpkU8, ¶m->wideBandPmi, mBuf);
8829 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8831 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8832 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8840 PUBLIC S16 cmPkTfuSubbandMode30
8842 TfuSubbandMode30 *param,
8846 PUBLIC S16 cmPkTfuSubbandMode30(param, mBuf)
8847 TfuSubbandMode30 *param;
8852 TRC3(cmPkTfuSubbandMode30)
8854 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8855 CMCHKPK(SPkU8, param->cqi, mBuf);
8861 PUBLIC S16 cmUnpkTfuSubbandMode30
8863 TfuSubbandMode30 *param,
8867 PUBLIC S16 cmUnpkTfuSubbandMode30(param, mBuf)
8868 TfuSubbandMode30 *param;
8873 TRC3(cmUnpkTfuSubbandMode30)
8875 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
8876 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8882 /***********************************************************
8884 * Func : cmPkTfuCqiPuschMode30
8887 * Desc : This structure conveys information present in CQI reporting mode 3-0
8888 * received over PUSCH.
8897 **********************************************************/
8899 PUBLIC S16 cmPkTfuCqiPuschMode30
8901 TfuCqiPuschMode30 *param,
8905 PUBLIC S16 cmPkTfuCqiPuschMode30(param, mBuf)
8906 TfuCqiPuschMode30 *param;
8912 TRC3(cmPkTfuCqiPuschMode30)
8914 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8915 CMCHKPK(cmPkTfuSubbandMode30, ¶m->subbandArr[i], mBuf);
8917 CMCHKPK(SPkU8, param->numSubband, mBuf);
8918 CMCHKPK(SPkU8, param->wideBandCqi, mBuf);
8924 /***********************************************************
8926 * Func : cmUnpkTfuCqiPuschMode30
8929 * Desc : This structure conveys information present in CQI reporting mode 3-0
8930 * received over PUSCH.
8939 **********************************************************/
8941 PUBLIC S16 cmUnpkTfuCqiPuschMode30
8943 TfuCqiPuschMode30 *param,
8947 PUBLIC S16 cmUnpkTfuCqiPuschMode30(param, mBuf)
8948 TfuCqiPuschMode30 *param;
8954 TRC3(cmUnpkTfuCqiPuschMode30)
8956 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi, mBuf);
8957 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8958 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8959 CMCHKUNPK(cmUnpkTfuSubbandMode30, ¶m->subbandArr[i], mBuf);
8966 PUBLIC S16 cmPkTfuSubbandMode31
8968 TfuSubbandMode31 *param,
8972 PUBLIC S16 cmPkTfuSubbandMode31(param, mBuf)
8973 TfuSubbandMode31 *param;
8979 TRC3(cmPkTfuSubbandMode31)
8981 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8982 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8983 CMCHKPK(SPkU8, param->cqi[i], mBuf);
8990 PUBLIC S16 cmUnpkTfuSubbandMode31
8992 TfuSubbandMode31 *param,
8996 PUBLIC S16 cmUnpkTfuSubbandMode31(param, mBuf)
8997 TfuSubbandMode31 *param;
9003 TRC3(cmUnpkTfuSubbandMode31)
9005 for (i=0; i<TFU_MAX_TB; i++) {
9006 CMCHKUNPK(SUnpkU8, ¶m->cqi[i], mBuf);
9008 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
9014 /***********************************************************
9016 * Func : cmPkTfuCqiPuschMode31
9019 * Desc : This structure conveys information present in CQI reporting mode 3-1
9020 * received over PUSCH.
9029 **********************************************************/
9031 PUBLIC S16 cmPkTfuCqiPuschMode31
9033 TfuCqiPuschMode31 *param,
9037 PUBLIC S16 cmPkTfuCqiPuschMode31(param, mBuf)
9038 TfuCqiPuschMode31 *param;
9044 TRC3(cmPkTfuCqiPuschMode31)
9047 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9048 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9050 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9051 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9052 for (i=param->numSubband-1; i >= 0; i--) {
9053 CMCHKPK(cmPkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf);
9056 CMCHKPK(SPkU8, param->numSubband, mBuf);
9057 for (i=TFU_MAX_TB-1; i >= 0; i--) {
9058 CMCHKPK(SPkU8, param->wideBandCqi[i], mBuf);
9060 CMCHKPK(SPkU8, param->pmi, mBuf);
9066 /***********************************************************
9068 * Func : cmUnpkTfuCqiPuschMode31
9071 * Desc : This structure conveys information present in CQI reporting mode 3-1
9072 * received over PUSCH.
9081 **********************************************************/
9083 PUBLIC S16 cmUnpkTfuCqiPuschMode31
9085 TfuCqiPuschMode31 *param,
9089 PUBLIC S16 cmUnpkTfuCqiPuschMode31(param, mBuf)
9090 TfuCqiPuschMode31 *param;
9096 TRC3(cmUnpkTfuCqiPuschMode31)
9098 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
9099 for (i=0; i<TFU_MAX_TB; i++) {
9100 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi[i], mBuf);
9102 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
9104 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9105 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9106 for (i=0; i<param->numSubband; i++) {
9107 CMCHKUNPK(cmUnpkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf);
9111 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9112 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9119 /***********************************************************
9121 * Func : cmPkTfuDlCqiPusch
9124 * Desc : This structure conveys Downlink CQI information (mode and corresponding
9125 * CQI) received over PUSCH.
9134 **********************************************************/
9136 PUBLIC S16 cmPkTfuDlCqiPusch
9138 TfuDlCqiPusch *param,
9142 PUBLIC S16 cmPkTfuDlCqiPusch(param, mBuf)
9143 TfuDlCqiPusch *param;
9148 TRC3(cmPkTfuDlCqiPusch)
9150 switch(param->mode) {
9151 case TFU_PUSCH_CQI_MODE_31:
9152 CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
9154 case TFU_PUSCH_CQI_MODE_30:
9155 CMCHKPK(cmPkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf);
9157 case TFU_PUSCH_CQI_MODE_22:
9158 CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
9160 case TFU_PUSCH_CQI_MODE_20:
9161 CMCHKPK(cmPkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf);
9163 case TFU_PUSCH_CQI_MODE_12:
9164 CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
9170 CMCHKPK(cmPkTknU8, ¶m->ri, mBuf);
9171 CMCHKPK(SPkU32, param->mode, mBuf);
9173 CMCHKPK(SPkU8, param->cellIdx, mBuf);
9179 /***********************************************************
9181 * Func : cmUnpkTfuDlCqiPusch
9184 * Desc : This structure conveys Downlink CQI information (mode and corresponding
9185 * CQI) received over PUSCH.
9194 **********************************************************/
9196 PUBLIC S16 cmUnpkTfuDlCqiPusch
9198 TfuDlCqiPusch *param,
9202 PUBLIC S16 cmUnpkTfuDlCqiPusch(param, mBuf)
9203 TfuDlCqiPusch *param;
9208 TRC3(cmUnpkTfuDlCqiPusch)
9210 CMCHKUNPK(SUnpkU8, ¶m->cellIdx, mBuf);
9211 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
9212 CMCHKUNPK(cmUnpkTknU8, ¶m->ri, mBuf);
9213 switch(param->mode) {
9214 case TFU_PUSCH_CQI_MODE_12:
9215 CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
9217 case TFU_PUSCH_CQI_MODE_20:
9218 CMCHKUNPK(cmUnpkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf);
9220 case TFU_PUSCH_CQI_MODE_22:
9221 CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
9223 case TFU_PUSCH_CQI_MODE_30:
9224 CMCHKUNPK(cmUnpkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf);
9226 case TFU_PUSCH_CQI_MODE_31:
9227 CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
9236 /***********************************************************
9238 * Func : cmPkTfuDlCqiInfo
9241 * Desc : This structure contains CQI information received over PUCCH or PUSCH.
9250 **********************************************************/
9252 PUBLIC S16 cmPkTfuDlCqiInfo
9255 TfuDlCqiInfo *param,
9259 PUBLIC S16 cmPkTfuDlCqiInfo(selector, param, mBuf)
9261 TfuDlCqiInfo *param;
9267 TRC3(cmPkTfuDlCqiInfo)
9271 for (idx = 0; idx < param->pusch.numOfCells; idx++)
9273 CMCHKPK(cmPkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx], mBuf);
9275 CMCHKPK(SPkU8, param->pusch.numOfCells, mBuf);
9278 CMCHKPK(cmPkTfuDlCqiPucch, ¶m->pucchCqi, mBuf);
9288 /***********************************************************
9290 * Func : cmUnpkTfuDlCqiInfo
9293 * Desc : This structure contains CQI information received over PUCCH or PUSCH.
9302 **********************************************************/
9304 PUBLIC S16 cmUnpkTfuDlCqiInfo
9307 TfuDlCqiInfo *param,
9311 PUBLIC S16 cmUnpkTfuDlCqiInfo(selector, param, mBuf)
9313 TfuDlCqiInfo *param;
9319 TRC3(cmUnpkTfuDlCqiInfo)
9323 CMCHKUNPK(cmUnpkTfuDlCqiPucch, ¶m->pucchCqi, mBuf);
9326 CMCHKUNPK(SUnpkU8, ¶m->pusch.numOfCells, mBuf);
9327 for (idx = param->pusch.numOfCells; idx > 0; idx--)
9329 CMCHKUNPK(cmUnpkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx-1], mBuf);
9340 /***********************************************************
9342 * Func : cmPkTfuRecpReqInfo
9345 * Desc : This structure is sent from Scheduler to PHY. This includes params
9346 * needed by PHY to decode the following
9348 * 2. HARQ Feedback on PUCCH
9351 * 5. SR Indications.
9352 * This structure carries the reception information for all the scheduled UE.
9361 **********************************************************/
9363 PUBLIC S16 cmPkTfuRecpReqInfo
9365 TfuRecpReqInfo *param,
9369 PUBLIC S16 cmPkTfuRecpReqInfo(param, mBuf)
9370 TfuRecpReqInfo *param;
9376 TfuUeRecpReqInfo *tfuUeRecpReqInfo;
9378 TRC3(cmPkTfuRecpReqInfo)
9380 /*ccpu00116923 - ADD - SRS present support*/
9381 /*tfu_c_001.main_7 - ADD - SRS present field inclusion */
9383 CMCHKPK(SPkU8, param->srsPres, mBuf);
9385 count = param->ueRecpReqLst.count;
9386 node = param->ueRecpReqLst.last;
9388 tfuUeRecpReqInfo = (TfuUeRecpReqInfo *)node->node;
9390 CMCHKPK(cmPkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf);
9391 cmLListDelFrm(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk);
9392 tfuUeRecpReqInfo->lnk.node = (PTR)NULLP;
9394 CMCHKPK(SPkU32, count, mBuf);
9395 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
9396 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
9402 /***********************************************************
9404 * Func : cmUnpkTfuRecpReqInfo
9407 * Desc : This structure is sent from Scheduler to PHY. This includes params
9408 * needed by PHY to decode the following
9410 * 2. HARQ Feedback on PUCCH
9413 * 5. SR Indications.
9414 * This structure carries the reception information for all the scheduled UE.
9423 **********************************************************/
9425 PUBLIC S16 cmUnpkTfuRecpReqInfo
9427 TfuRecpReqInfo *param,
9432 PUBLIC S16 cmUnpkTfuRecpReqInfo(param, memCp, mBuf)
9433 TfuRecpReqInfo *param;
9440 TfuUeRecpReqInfo *tfuUeRecpReqInfo;
9442 TRC3(cmUnpkTfuRecpReqInfo)
9444 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
9445 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
9446 cmLListInit(¶m->ueRecpReqLst);
9447 CMCHKUNPK(SUnpkU32, &count, mBuf);
9448 for (loopCnt=0; loopCnt<count; loopCnt++) {
9449 cmGetMem((Ptr)memCp, sizeof(*tfuUeRecpReqInfo), (Ptr *)&tfuUeRecpReqInfo);
9450 CMCHKUNPK(cmUnpkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf);
9451 cmLListAdd2Tail(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk);
9452 tfuUeRecpReqInfo->lnk.node = (PTR)tfuUeRecpReqInfo;
9454 /*ccpu00116923 - ADD - SRS present support*/
9455 /*tfu_c_001.main_7 - ADD - SRS present field inclusion */
9457 CMCHKUNPK(SUnpkU8, ¶m->srsPres, mBuf);
9464 /***********************************************************
9466 * Func : cmPkTfuPdcchInfo
9469 * Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI
9470 * formats. This information is associated with an RNTI.
9479 **********************************************************/
9481 PUBLIC S16 cmPkTfuPdcchInfo
9483 TfuPdcchInfo *param,
9487 PUBLIC S16 cmPkTfuPdcchInfo(param, mBuf)
9488 TfuPdcchInfo *param;
9493 TRC3(cmPkTfuPdcchInfo)
9495 CMCHKPK(SPkU8, param->grpId, mBuf);
9496 CMCHKPK(SPkU8, param->sccIdx, mBuf);
9497 CMCHKPK(SPkU8, param->sectorId, mBuf);
9498 #endif /* TFU_5GTF */
9499 CMCHKPK(cmPkTfuDciInfo, ¶m->dci, mBuf);
9500 CMCHKPK(SPkU8, param->dciNumOfBits, mBuf);
9501 CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf);
9502 CMCHKPK(SPkU16, param->nCce, mBuf);
9504 CMCHKPK(cmPkLteRnti, param->crnti, mBuf);
9505 CMCHKPK(SPkU8, param->isSpsRnti, mBuf);
9507 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
9513 /***********************************************************
9515 * Func : cmUnpkTfuPdcchInfo
9518 * Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI
9519 * formats. This information is associated with an RNTI.
9528 **********************************************************/
9530 PUBLIC S16 cmUnpkTfuPdcchInfo
9532 TfuPdcchInfo *param,
9536 PUBLIC S16 cmUnpkTfuPdcchInfo(param, mBuf)
9537 TfuPdcchInfo *param;
9542 TRC3(cmUnpkTfuPdcchInfo)
9544 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
9546 CMCHKUNPK(SUnpkU8, ¶m->isSpsRnti, mBuf);
9547 CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf);
9549 CMCHKUNPK(SUnpkU16, ¶m->nCce, mBuf);
9550 CMCHKUNPK(cmUnpkLteAggrLvl, (U32*)¶m->aggrLvl, mBuf);
9551 CMCHKUNPK(SUnpkU8, ¶m->dciNumOfBits, mBuf);
9552 CMCHKUNPK(cmUnpkTfuDciInfo, ¶m->dci, mBuf);
9554 CMCHKUNPK(SUnpkU8, ¶m->sectorId, mBuf);
9555 CMCHKUNPK(SUnpkU8, ¶m->sccIdx, mBuf);
9556 CMCHKUNPK(SUnpkU8, ¶m->grpId, mBuf);
9557 #endif /* TFU_5GTF */
9563 /***********************************************************
9565 * Func : cmPkTfuPhichInfo
9568 * Desc : This structure contains one PHICH information. In order to locate the
9569 * resources to be used for PHICH the following information is provided along
9570 * with the feedback -
9581 **********************************************************/
9583 PUBLIC S16 cmPkTfuPhichInfo
9585 TfuPhichInfo *param,
9589 PUBLIC S16 cmPkTfuPhichInfo(param, mBuf)
9590 TfuPhichInfo *param;
9595 TRC3(cmPkTfuPhichInfo)
9596 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9598 CMCHKPK(SPkU16, param->txPower, mBuf);
9601 CMCHKPK(SPkU8, param->iPhich, mBuf);
9603 CMCHKPK(SPkU8, param->isAck, mBuf);
9604 CMCHKPK(SPkU8, param->nDmrs, mBuf);
9605 CMCHKPK(SPkU8, param->rbStart, mBuf);
9611 /***********************************************************
9613 * Func : cmUnpkTfuPhichInfo
9616 * Desc : This structure contains one PHICH information. In order to locate the
9617 * resources to be used for PHICH the following information is provided along
9618 * with the feedback -
9629 **********************************************************/
9631 PUBLIC S16 cmUnpkTfuPhichInfo
9633 TfuPhichInfo *param,
9637 PUBLIC S16 cmUnpkTfuPhichInfo(param, mBuf)
9638 TfuPhichInfo *param;
9643 TRC3(cmUnpkTfuPhichInfo)
9645 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
9646 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
9647 CMCHKUNPK(SUnpkU8, ¶m->isAck, mBuf);
9648 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9650 CMCHKUNPK(SUnpkU8, ¶m->iPhich, mBuf);
9653 CMCHKUNPK(SUnpkU16, ¶m->txPower, mBuf);
9660 /***********************************************************
9662 * Func : cmPkTfuCntrlReqInfo
9665 * Desc : This structure is sent from Scheduler to PHY. This includes all the
9666 * control information to be sent to the UE.
9667 * -# PDCCH Physical Downlink Control Channel
9668 * -# PHICH Physical HARQ Indicator Channel
9669 * -# PCFICH Physical Control Format Indicator Channel
9678 **********************************************************/
9680 PUBLIC S16 cmPkTfuCntrlReqInfo
9682 TfuCntrlReqInfo *param,
9686 PUBLIC S16 cmPkTfuCntrlReqInfo(param, mBuf)
9687 TfuCntrlReqInfo *param;
9692 TfuPdcchInfo *tfuPdcchInfo;
9693 TfuPhichInfo *tfuPhichInfo;
9697 TRC3(cmPkTfuCntrlReqInfo)
9699 count = param->dlMpdcchLst.count;
9700 node = param->dlMpdcchLst.last;
9702 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9704 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9705 cmLListDelFrm(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk);
9706 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9708 CMCHKPK(SPkU32, count, mBuf);
9709 count = param->ulMpdcchLst.count;
9710 node = param->ulMpdcchLst.last;
9712 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9714 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9715 cmLListDelFrm(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk);
9716 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9718 CMCHKPK(SPkU32, count, mBuf);
9720 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
9721 CMCHKPK(cmPkBool, param->isSPSOcc, mBuf);
9723 count = param->phichLst.count;
9724 node = param->phichLst.last;
9726 tfuPhichInfo = (TfuPhichInfo *)node->node;
9728 CMCHKPK(cmPkTfuPhichInfo, tfuPhichInfo, mBuf);
9729 cmLListDelFrm(¶m->phichLst, &tfuPhichInfo->lnk);
9730 tfuPhichInfo->lnk.node = (PTR)NULLP;
9732 CMCHKPK(SPkU32, count, mBuf);
9733 count = param->dlPdcchLst.count;
9734 node = param->dlPdcchLst.last;
9736 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9738 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9739 cmLListDelFrm(¶m->dlPdcchLst, &tfuPdcchInfo->lnk);
9740 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9742 CMCHKPK(SPkU32, count, mBuf);
9743 count = param->ulPdcchLst.count;
9744 node = param->ulPdcchLst.last;
9746 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9749 printf("ulPdcchLst count %d time[ %d %d] \n",count,param->ulTiming.sfn,param->ulTiming.subframe);
9751 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9752 cmLListDelFrm(¶m->ulPdcchLst, &tfuPdcchInfo->lnk);
9753 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9755 CMCHKPK(SPkU32, count, mBuf);
9756 CMCHKPK(SPkU8, param->cfi, mBuf);
9757 CMCHKPK(cmPkLteTimingInfo, ¶m->dlTiming, mBuf);
9758 CMCHKPK(cmPkLteTimingInfo, ¶m->ulTiming, mBuf);
9759 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
9765 /***********************************************************
9767 * Func : cmUnpkTfuCntrlReqInfo
9770 * Desc : This structure is sent from Scheduler to PHY. This includes all the
9771 * control information to be sent to the UE.
9772 * -# PDCCH Physical Downlink Control Channel
9773 * -# PHICH Physical HARQ Indicator Channel
9774 * -# PCFICH Physical Control Format Indicator Channel
9783 **********************************************************/
9785 PUBLIC S16 cmUnpkTfuCntrlReqInfo
9787 TfuCntrlReqInfo *param,
9792 PUBLIC S16 cmUnpkTfuCntrlReqInfo(param, memCp, mBuf)
9793 TfuCntrlReqInfo *param;
9799 TfuPdcchInfo *tfuPdcchInfo;
9801 TfuPhichInfo *tfuPhichInfo;
9803 TRC3(cmUnpkTfuCntrlReqInfo)
9805 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
9806 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->ulTiming, mBuf);
9807 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->dlTiming, mBuf);
9808 CMCHKUNPK(SUnpkU8, ¶m->cfi, mBuf);
9809 cmLListInit(¶m->ulPdcchLst);
9810 CMCHKUNPK(SUnpkU32, &count, mBuf);
9811 for (loopCnt=0; loopCnt<count; loopCnt++) {
9812 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9813 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9814 cmLListAdd2Tail(¶m->ulPdcchLst, &tfuPdcchInfo->lnk);
9815 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9817 cmLListInit(¶m->dlPdcchLst);
9818 CMCHKUNPK(SUnpkU32, &count, mBuf);
9819 for (loopCnt=0; loopCnt<count; loopCnt++) {
9820 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9821 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9822 cmLListAdd2Tail(¶m->dlPdcchLst, &tfuPdcchInfo->lnk);
9823 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9825 cmLListInit(¶m->phichLst);
9826 CMCHKUNPK(SUnpkU32, &count, mBuf);
9827 for (loopCnt=0; loopCnt<count; loopCnt++) {
9828 cmGetMem((Ptr)memCp, sizeof(*tfuPhichInfo), (Ptr *)&tfuPhichInfo);
9829 CMCHKUNPK(cmUnpkTfuPhichInfo, tfuPhichInfo, mBuf);
9830 cmLListAdd2Tail(¶m->phichLst, &tfuPhichInfo->lnk);
9831 tfuPhichInfo->lnk.node = (PTR)tfuPhichInfo;
9834 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
9835 CMCHKUNPK(cmUnpkBool, ¶m->isSPSOcc, mBuf);
9838 cmLListInit(¶m->ulMpdcchLst);
9839 CMCHKUNPK(SUnpkU32, &count, mBuf);
9840 for (loopCnt=0; loopCnt<count; loopCnt++) {
9841 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9842 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9843 cmLListAdd2Tail(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk);
9844 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9846 cmLListInit(¶m->dlMpdcchLst);
9847 CMCHKUNPK(SUnpkU32, &count, mBuf);
9848 printf("4. cmUnpkTfuCntrlReqInfo :: count %ld \n", count);
9849 for (loopCnt=0; loopCnt<count; loopCnt++) {
9850 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9851 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9852 cmLListAdd2Tail(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk);
9853 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9854 printf("5. cmUnpkTfuCntrlReqInfo :: Failed \n");
9862 /***********************************************************
9864 * Func : cmPkTfuPdschDciInfo
9867 * Desc : This structure Carries the control information that would be needed
9868 * by the Physical layer to process the data to be sent on PDSCH.
9877 **********************************************************/
9879 PUBLIC S16 cmPkTfuPdschDciInfo
9881 TfuPdschDciInfo *param,
9885 PUBLIC S16 cmPkTfuPdschDciInfo(param, mBuf)
9886 TfuPdschDciInfo *param;
9891 TRC3(cmPkTfuPdschDciInfo)
9893 switch(param->format) {
9895 case TFU_DCI_FORMAT_B1:
9897 if (param->u.formatB1Info.RBAssign <= 324)
9899 printf("DCI Format: [B1] RBAssign: [%d] MCS: [%d]",
9900 param->u.formatB1Info.RBAssign,
9901 param->u.formatB1Info.u.rbAssignB1Val324.mcs);
9904 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
9906 case TFU_DCI_FORMAT_B2:
9908 if (param->u.formatB2Info.RBAssign <= 324)
9910 printf("DCI Format: [B2] RBAssign: [%d] MCS: [%d]",
9911 param->u.formatB2Info.RBAssign,
9912 param->u.formatB2Info.u.rbAssignB1Val324.mcs);
9915 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
9917 case TFU_DCI_FORMAT_A1:
9918 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
9920 case TFU_DCI_FORMAT_A2:
9921 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
9925 case TFU_DCI_FORMAT_6_2:
9926 CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf);
9928 case TFU_DCI_FORMAT_6_1A:
9929 CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf);
9932 case TFU_DCI_FORMAT_2A:
9933 CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf);
9935 case TFU_DCI_FORMAT_2:
9936 CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf);
9938 case TFU_DCI_FORMAT_1D:
9939 CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf);
9941 case TFU_DCI_FORMAT_1C:
9942 CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf);
9944 case TFU_DCI_FORMAT_1B:
9945 CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf);
9947 case TFU_DCI_FORMAT_1A:
9948 CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf);
9950 case TFU_DCI_FORMAT_1:
9951 CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf);
9956 CMCHKPK(SPkU32, param->format, mBuf);
9962 /***********************************************************
9964 * Func : cmUnpkTfuPdschDciInfo
9967 * Desc : This structure Carries the control information that would be needed
9968 * by the Physical layer to process the data to be sent on PDSCH.
9977 **********************************************************/
9979 PUBLIC S16 cmUnpkTfuPdschDciInfo
9981 TfuPdschDciInfo *param,
9985 PUBLIC S16 cmUnpkTfuPdschDciInfo(param, mBuf)
9986 TfuPdschDciInfo *param;
9991 TRC3(cmUnpkTfuPdschDciInfo)
9993 CMCHKUNPK(SUnpkU32, (U32 *)¶m->format, mBuf);
9994 switch(param->format) {
9995 case TFU_DCI_FORMAT_1:
9996 CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf);
9998 case TFU_DCI_FORMAT_1A:
9999 CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf);
10001 case TFU_DCI_FORMAT_1B:
10002 CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf);
10004 case TFU_DCI_FORMAT_1C:
10005 CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf);
10007 case TFU_DCI_FORMAT_1D:
10008 CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf);
10010 case TFU_DCI_FORMAT_2:
10011 CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf);
10013 case TFU_DCI_FORMAT_2A:
10014 CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf);
10017 case TFU_DCI_FORMAT_6_1A:
10018 CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf);
10020 case TFU_DCI_FORMAT_6_2:
10021 CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf);
10025 case TFU_DCI_FORMAT_A1:
10026 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
10028 case TFU_DCI_FORMAT_A2:
10029 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
10031 case TFU_DCI_FORMAT_B1:
10032 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
10034 case TFU_DCI_FORMAT_B2:
10035 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
10043 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10045 /***********************************************************
10047 * Func : cmPkTfuBfVectorInfo
10050 * Desc : This structure conveys the BeamForming Vector
10051 * Information that hold relevance to Tx Mode 7
10060 **********************************************************/
10062 PUBLIC S16 cmPkTfuBfVectorInfo
10064 TfuBfVectorInfo *param,
10068 PUBLIC S16 cmPkTfuBfVectorInfo(param, mBuf)
10069 TfuBfVectorInfo *param;
10074 TRC3(cmPkTfuBfVectorInfo)
10075 for(idx=TFU_MAX_DL_SUBBAND-1;idx>=0; idx--)
10077 for (idx2=param->numPhyAnt -1; idx2 >= 0; idx2--) {
10078 CMCHKPK(SPkU16, param->bfValue[idx2], mBuf);}
10079 CMCHKPK(SPkU8, param->numPhyAnt, mBuf);
10080 CMCHKPK(SPkU8, param->sbIndex, mBuf);
10085 /***********************************************************
10087 * Func : cmUnpkTfuBfVectorInfo
10090 * Desc : This structure conveys the BeamForming Vector
10091 * Information that hold relevance to Tx Mode 7
10100 **********************************************************/
10102 PUBLIC S16 cmUnpkTfuBfVectorInfo
10104 TfuBfVectorInfo *param,
10108 PUBLIC S16 cmUnpkTfuBfVectorInfo(param, mBuf)
10109 TfuBfVectorInfo *param;
10114 TRC3(cmUnpkTfuBfVectorInfo)
10115 for(idx=0;idx<TFU_MAX_DL_SUBBAND; idx++)
10117 CMCHKUNPK(SUnpkU8, ¶m->sbIndex, mBuf);
10118 CMCHKUNPK(SUnpkU8, ¶m->numPhyAnt, mBuf);
10119 for (idx2=0; idx2 <param->numPhyAnt; idx2++) {
10120 CMCHKUNPK(SUnpkU16, ¶m->bfValue[idx2], mBuf);}
10127 /***********************************************************
10129 * Func : cmPkTfuDatReqPduInfo
10132 * Desc : Pack Function for Tfu Dat Req PDU.
10141 **********************************************************/
10143 PUBLIC S16 cmPkTfuDatReqPduInfo
10145 TfuDatReqPduInfo *param,
10149 PUBLIC S16 cmPkTfuDatReqPduInfo(param, mBuf)
10150 TfuDatReqPduInfo *param;
10158 U32 lchIdx, pduIdx;
10161 TRC3(cmPkTfuDatReqPduInfo)
10163 /* LTE_ADV_FLAG_REMOVED_START */
10164 CMCHKPK(SPkU8, param->isEnbSFR, mBuf);
10165 /* LTE_ADV_FLAG_REMOVED_END */
10167 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10169 CMCHKPK(SPkU16, param->txPwrOffset, mBuf);
10170 if(param->transMode == TFU_UE_TM_7)
10172 CMCHKPK(cmPkTfuBfVectorInfo, param->bfVector, mBuf);
10173 CMCHKPK(SPkU8, param->numBfVectors, mBuf);
10174 CMCHKPK(SPkU8, param->numBfPrbPerSb, mBuf);
10176 CMCHKPK(SPkU8, param->deltaPowOffIdx, mBuf);
10177 /* LTE_ADV_FLAG_REMOVED_START */
10178 CMCHKPK(SPkU8, param->pa, mBuf);
10179 /* LTE_ADV_FLAG_REMOVED_END */
10180 CMCHKPK(SPkU8, param->numLayers, mBuf);
10182 CMCHKPK(cmPkBool, param->isTApres, mBuf);
10183 CMCHKPK(cmPkTknU32, ¶m->doa, mBuf);
10184 CMCHKPK(SPkU32, param->transMode, mBuf);
10185 CMCHKPK(cmPkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf);
10186 CMCHKPK(SPkU8, param->puschRptUsd, mBuf);
10187 for (i = 0; i < TFU_MAX_TB; i++)
10190 if (param->mBuf[i] != NULLP)
10192 tbMask = tbMask | (1 << i);
10194 #else /* L2_OPTMZ */
10195 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10197 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10200 if (param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] != NULLP)
10202 tbMask = tbMask | (1 << i);
10206 #endif /* L2_OPTMZ */
10208 /* tfu_c_001.main_2: Packing should consider nmbOfTBs.*/
10209 for (i=TFU_MAX_TB - 1; i >= 0; i--) {
10211 if (param->mBuf[i] != NULLP)
10213 CMCHKPK(cmPkBuffer, ¶m->mBuf[i], mBuf);
10216 // CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macPad, mBuf);
10217 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10219 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10222 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx],
10226 CMCHKPK(SPkU32, param->tbInfo[i].lchInfo[lchIdx].numPdu, mBuf);
10228 CMCHKPK(SPkU32, param->tbInfo[i].numLch, mBuf);
10229 CMCHKPK(SPkU32, param->tbInfo[i].padSize, mBuf);
10230 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macCes, mBuf);
10231 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macHdr, mBuf);
10232 CMCHKPK(cmPkMsgLen, param->tbInfo[i].tbSize, mBuf);
10233 CMCHKPK(cmPkBool, param->tbInfo[i].tbPres, mBuf);
10236 CMCHKPK(SPkU8, tbMask, mBuf);
10237 CMCHKPK(SPkU8, param->nmbOfTBs, mBuf);
10238 CMCHKPK(cmPkTfuPdschDciInfo, ¶m->dciInfo, mBuf);
10239 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10245 /***********************************************************
10247 * Func : cmUnpkTfuDatReqPduInfo
10250 * Desc : UnPack function for Tfu Dat req pdu .
10259 **********************************************************/
10261 PUBLIC S16 cmUnpkTfuDatReqPduInfo
10263 TfuDatReqPduInfo *param,
10267 PUBLIC S16 cmUnpkTfuDatReqPduInfo(param, mBuf)
10268 TfuDatReqPduInfo *param;
10276 U32 lchIdx, pduIdx;
10278 TRC3(cmUnpkTfuDatReqPduInfo)
10280 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10281 CMCHKUNPK(cmUnpkTfuPdschDciInfo, ¶m->dciInfo, mBuf);
10282 CMCHKUNPK(SUnpkU8, ¶m->nmbOfTBs, mBuf);
10284 CMCHKUNPK(SUnpkU8, &tbMask, mBuf);
10285 for (i=0; i<TFU_MAX_TB; i++) {
10287 if (tbMask & (1<<i))
10289 CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf[i], mBuf);
10293 param->mBuf[i] = NULLP;
10295 #else /* L2_OPTMZ*/
10296 CMCHKUNPK(cmUnpkBool, ¶m->tbInfo[i].tbPres, mBuf);
10297 CMCHKUNPK(cmUnpkMsgLen, ¶m->tbInfo[i].tbSize, mBuf);
10298 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macHdr, mBuf);
10299 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macCes, mBuf);
10300 CMCHKUNPK(SUnpkU32, ¶m->tbInfo[i].padSize, mBuf);
10301 CMCHKUNPK(SUnpkU32, (U32 *)¶m->tbInfo[i].numLch, mBuf);
10302 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10304 CMCHKUNPK(SUnpkU32, (U32 *)¶m->tbInfo[i].lchInfo[lchIdx].numPdu,
10306 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10309 if (tbMask & (1<<i))
10311 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].\
10312 mBuf[pduIdx], mBuf);
10316 param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] = NULLP;
10320 //CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macPad, mBuf);
10321 #endif /* L2_OPTMZ*/
10324 CMCHKUNPK(SUnpkU8, ¶m->puschRptUsd, mBuf);
10325 CMCHKUNPK(cmUnpkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf);
10326 CMCHKUNPK(SUnpkU32, (U32 *)¶m->transMode, mBuf);
10327 CMCHKUNPK(cmUnpkTknU32, ¶m->doa, mBuf);
10328 CMCHKUNPK(cmUnpkBool, ¶m->isTApres, mBuf);
10329 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10331 CMCHKUNPK(SUnpkU8, ¶m->numLayers, mBuf);
10332 /* LTE_ADV_FLAG_REMOVED_START */
10333 CMCHKUNPK(SUnpkU8, ¶m->pa, mBuf);
10334 /* LTE_ADV_FLAG_REMOVED_END */
10335 CMCHKUNPK(SUnpkU8, ¶m->deltaPowOffIdx, mBuf);
10336 if(param->transMode == TFU_UE_TM_7)
10338 CMCHKUNPK(SUnpkU8, ¶m->numBfPrbPerSb, mBuf);
10339 CMCHKUNPK(SUnpkU8, ¶m->numBfVectors, mBuf);
10340 CMCHKUNPK(cmUnpkTfuBfVectorInfo, param->bfVector, mBuf);
10342 CMCHKUNPK(SUnpkU16, ¶m->txPwrOffset, mBuf);
10345 /* LTE_ADV_FLAG_REMOVED_START */
10346 CMCHKUNPK(SUnpkU8, ¶m->isEnbSFR, mBuf);
10347 /* LTE_ADV_FLAG_REMOVED_END */
10354 /***********************************************************
10356 * Func : cmPkTfuDatReqInfo
10359 * Desc : This structure contains the Data PDUs
10360 * @details This structure contains Data meant to be sent on both PBCH and
10361 * PDSCH. Control information necessary for processing of the data is sent along
10371 **********************************************************/
10373 PUBLIC S16 cmPkTfuDatReqInfo
10375 TfuDatReqInfo *param,
10379 PUBLIC S16 cmPkTfuDatReqInfo(param, mBuf)
10380 TfuDatReqInfo *param;
10387 TfuDatReqPduInfo *tfuDatReqPduInfo;
10389 TRC3(cmPkTfuDatReqInfo)
10391 count = param->pdus.count;
10392 node = param->pdus.last;
10394 tfuDatReqPduInfo = (TfuDatReqPduInfo *)node->node;
10396 CMCHKPK(cmPkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf);
10397 cmLListDelFrm(¶m->pdus, &tfuDatReqPduInfo->lnk);
10398 tfuDatReqPduInfo->lnk.node = (PTR)NULLP;
10400 CMCHKPK(SPkU32, count, mBuf);
10401 CMCHKPK(cmPkTknBuf, ¶m->bchDat, mBuf);
10402 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10403 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10409 /***********************************************************
10411 * Func : cmUnpkTfuDatReqInfo
10414 * Desc : This structure contains the Data PDUs
10415 * @details This structure contains Data meant to be sent on both PBCH and
10416 * PDSCH. Control information necessary for processing of the data is sent along
10426 **********************************************************/
10428 PUBLIC S16 cmUnpkTfuDatReqInfo
10430 TfuDatReqInfo *param,
10435 PUBLIC S16 cmUnpkTfuDatReqInfo(param, memCp, mBuf)
10436 TfuDatReqInfo *param;
10442 U32 count, loopCnt;
10443 TfuDatReqPduInfo *tfuDatReqPduInfo;
10445 TRC3(cmUnpkTfuDatReqInfo)
10447 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10448 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10449 CMCHKUNPK(cmUnpkTknBuf, ¶m->bchDat, &mBuf);
10450 cmLListInit(¶m->pdus);
10451 CMCHKUNPK(SUnpkU32, &count, mBuf);
10452 for (loopCnt=0; loopCnt<count; loopCnt++) {
10453 cmGetMem((Ptr)memCp, sizeof(*tfuDatReqPduInfo), (Ptr *)&tfuDatReqPduInfo);
10454 CMCHKUNPK(cmUnpkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf);
10455 cmLListAdd2Tail(¶m->pdus, &tfuDatReqPduInfo->lnk);
10456 tfuDatReqPduInfo->lnk.node = (PTR)tfuDatReqPduInfo;
10463 /***********************************************************
10465 * Func : cmPkTfuDatInfo
10468 * Desc : This structure contains the Data PDU and the RNTI of the UE.
10477 **********************************************************/
10479 PUBLIC S16 cmPkTfuDatInfo
10485 PUBLIC S16 cmPkTfuDatInfo(param, mBuf)
10491 TRC3(cmPkTfuDatInfo)
10493 CMCHKPK(cmPkBuffer, ¶m->mBuf, mBuf);
10494 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10500 /***********************************************************
10502 * Func : cmUnpkTfuDatInfo
10505 * Desc : This structure contains the Data PDU and the RNTI of the UE.
10514 **********************************************************/
10516 PUBLIC S16 cmUnpkTfuDatInfo
10522 PUBLIC S16 cmUnpkTfuDatInfo(param, mBuf)
10528 TRC3(cmUnpkTfuDatInfo)
10530 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10531 CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf, mBuf);
10537 /***********************************************************
10539 * Func : cmPkTfuDatIndInfo
10542 * Desc : This structure contains the Data PDUs received at Physical Layer.
10543 * @details All the PDUs received by Physical layer in one subframe are clubbed
10544 * together into a single data structure and sent to MAC for processing.
10553 **********************************************************/
10555 PUBLIC S16 cmPkTfuDatIndInfo
10557 TfuDatIndInfo *param,
10561 PUBLIC S16 cmPkTfuDatIndInfo(param, mBuf)
10562 TfuDatIndInfo *param;
10569 TfuDatInfo *tfuDatInfo;
10571 TRC3(cmPkTfuDatIndInfo)
10574 CMCHKPK(SPkU8, param->sccIdx, mBuf);
10575 CMCHKPK(SPkU8, param->sectorId, mBuf);
10576 #endif /* TFU_5GTF */
10577 count = param->datIndLst.count;
10578 node = param->datIndLst.last;
10580 tfuDatInfo = (TfuDatInfo *)node->node;
10582 CMCHKPK(cmPkTfuDatInfo, tfuDatInfo, mBuf);
10583 cmLListDelFrm(¶m->datIndLst, &tfuDatInfo->lnk);
10584 tfuDatInfo->lnk.node = (PTR)NULLP;
10586 CMCHKPK(SPkU32, count, mBuf);
10587 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10588 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10594 /***********************************************************
10596 * Func : cmUnpkTfuDatIndInfo
10599 * Desc : This structure contains the Data PDUs received at Physical Layer.
10600 * @details All the PDUs received by Physical layer in one subframe are clubbed
10601 * together into a single data structure and sent to MAC for processing.
10610 **********************************************************/
10612 PUBLIC S16 cmUnpkTfuDatIndInfo
10614 TfuDatIndInfo *param,
10619 PUBLIC S16 cmUnpkTfuDatIndInfo(param, memCp, mBuf)
10620 TfuDatIndInfo *param;
10626 U32 count, loopCnt;
10627 TfuDatInfo *tfuDatInfo;
10629 TRC3(cmUnpkTfuDatIndInfo)
10631 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10632 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10633 cmLListInit(¶m->datIndLst);
10634 CMCHKUNPK(SUnpkU32, &count, mBuf);
10635 for (loopCnt=0; loopCnt<count; loopCnt++) {
10636 cmGetMem((Ptr)memCp, sizeof(*tfuDatInfo), (Ptr *)&tfuDatInfo);
10637 CMCHKUNPK(cmUnpkTfuDatInfo, tfuDatInfo, mBuf);
10638 cmLListAdd2Tail(¶m->datIndLst, &tfuDatInfo->lnk);
10639 tfuDatInfo->lnk.node = (PTR)tfuDatInfo;
10642 CMCHKUNPK(SUnpkU8, ¶m->sectorId, mBuf);
10643 CMCHKUNPK(SUnpkU8, ¶m->sccIdx, mBuf);
10644 #endif /* TFU_5GTF */
10650 /***********************************************************
10652 * Func : cmPkTfuSrInfo
10655 * Desc : This structure contains the SR indication for a UE, identified by
10656 * the given RNTI. The structure also contains a PUCCH Delta power, that is
10657 * calculated by the physical layer, and is used by the scheduler for Power
10658 * control of the UE.
10667 **********************************************************/
10669 PUBLIC S16 cmPkTfuSrInfo
10675 PUBLIC S16 cmPkTfuSrInfo(param, mBuf)
10681 TRC3(cmPkTfuSrInfo)
10683 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10689 /***********************************************************
10691 * Func : cmUnpkTfuSrInfo
10694 * Desc : This structure contains the SR indication for a UE, identified by
10695 * the given RNTI. The structure also contains a PUCCH Delta power, that is
10696 * calculated by the physical layer, and is used by the scheduler for Power
10697 * control of the UE.
10706 **********************************************************/
10708 PUBLIC S16 cmUnpkTfuSrInfo
10714 PUBLIC S16 cmUnpkTfuSrInfo(param, mBuf)
10720 TRC3(cmUnpkTfuSrInfo)
10722 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10728 /***********************************************************
10730 * Func : cmPkTfuSrIndInfo
10733 * Desc : This structure contains all the Scheduling Requests (SR) indications
10734 * received in a subframe.
10743 **********************************************************/
10745 PUBLIC S16 cmPkTfuSrIndInfo
10747 TfuSrIndInfo *param,
10751 PUBLIC S16 cmPkTfuSrIndInfo(param, mBuf)
10752 TfuSrIndInfo *param;
10759 TfuSrInfo *tfuSrInfo;
10761 TRC3(cmPkTfuSrIndInfo)
10763 count = param->srLst.count;
10764 node = param->srLst.last;
10766 tfuSrInfo = (TfuSrInfo *)node->node;
10768 CMCHKPK(cmPkTfuSrInfo, tfuSrInfo, mBuf);
10769 cmLListDelFrm(¶m->srLst, &tfuSrInfo->lnk);
10770 tfuSrInfo->lnk.node = (PTR)NULLP;
10772 CMCHKPK(SPkU32, count, mBuf);
10773 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10774 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10780 /***********************************************************
10782 * Func : cmUnpkTfuSrIndInfo
10785 * Desc : This structure contains all the Scheduling Requests (SR) indications
10786 * received in a subframe.
10795 **********************************************************/
10797 PUBLIC S16 cmUnpkTfuSrIndInfo
10799 TfuSrIndInfo *param,
10804 PUBLIC S16 cmUnpkTfuSrIndInfo(param, memCp, mBuf)
10805 TfuSrIndInfo *param;
10811 U32 count, loopCnt;
10812 TfuSrInfo *tfuSrInfo;
10814 TRC3(cmUnpkTfuSrIndInfo)
10816 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10817 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10818 cmLListInit(¶m->srLst);
10819 CMCHKUNPK(SUnpkU32, &count, mBuf);
10820 for (loopCnt=0; loopCnt<count; loopCnt++) {
10821 cmGetMem((Ptr)memCp, sizeof(*tfuSrInfo), (Ptr *)&tfuSrInfo);
10822 CMCHKUNPK(cmUnpkTfuSrInfo, tfuSrInfo, mBuf);
10823 cmLListAdd2Tail(¶m->srLst, &tfuSrInfo->lnk);
10824 tfuSrInfo->lnk.node = (PTR)tfuSrInfo;
10829 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10830 /***********************************************************
10832 * Func : cmPkTfuHqInfo
10835 * Desc : This structure contains the HARQ feedback for a single UE.
10836 * @details RNTI is present to identify the UE.
10837 * For FDD a single feedback is present.
10838 * For TDD HARQ multiplexing a list of HARQ feedbacks is present.
10847 **********************************************************/
10849 PUBLIC S16 cmPkTfuHqInfo
10855 PUBLIC S16 cmPkTfuHqInfo(param, mBuf)
10862 TRC3(cmPkTfuHqInfo)
10864 CMCHKPK(SPkU8, param->isPusch, mBuf);
10865 for (i=TFU_MAX_HARQ_FDBKS-1; i >= 0; i--) {
10866 CMCHKPK(SPkU32, param->isAck[i], mBuf);
10869 CMCHKPK(SPkU8, param->M, mBuf);
10871 CMCHKPK(SPkU8, param->noOfTbs, mBuf);
10872 /* ACC-TDD ccpu00130520 */
10873 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
10874 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10878 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10879 /***********************************************************
10881 * Func : cmUnpkTfuHqInfo
10884 * Desc : This structure contains the HARQ feedback for a single UE.
10885 * @details RNTI is present to identify the UE.
10886 * For FDD a single feedback is present.
10887 * For TDD HARQ multiplexing a list of HARQ feedbacks is present.
10896 **********************************************************/
10898 PUBLIC S16 cmUnpkTfuHqInfo
10904 PUBLIC S16 cmUnpkTfuHqInfo(param, mBuf)
10910 TRC3(cmUnpkTfuHqInfo)
10912 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10913 /* ACC-TDD ccpu00130520 */
10914 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
10915 CMCHKUNPK(SUnpkU8, ¶m->noOfTbs, mBuf);
10917 CMCHKUNPK(SUnpkU8, ¶m->M, mBuf);
10919 for (i=0; i<TFU_MAX_HARQ_FDBKS; i++) {
10920 CMCHKUNPK(SUnpkU32, (U32 *)¶m->isAck[i], mBuf);
10922 CMCHKUNPK(SUnpkU8, ¶m->isPusch, mBuf);
10930 /***********************************************************
10932 * Func : cmPkTfuHqIndInfo
10935 * Desc : This structure contains a list of HARQ feedback for a number of UEs.
10936 * @details All the HARQ feedback received in the subframe are clubbed together
10937 * in this data structure and given to the scheduler for processing.
10946 **********************************************************/
10948 PUBLIC S16 cmPkTfuHqIndInfo
10950 TfuHqIndInfo *param,
10954 PUBLIC S16 cmPkTfuHqIndInfo(param, mBuf)
10955 TfuHqIndInfo *param;
10962 TfuHqInfo *tfuHqInfo;
10964 TRC3(cmPkTfuHqIndInfo)
10966 count = param->hqIndLst.count;
10967 node = param->hqIndLst.last;
10969 tfuHqInfo = (TfuHqInfo *)node->node;
10971 CMCHKPK(cmPkTfuHqInfo, tfuHqInfo, mBuf);
10972 cmLListDelFrm(¶m->hqIndLst, &tfuHqInfo->lnk);
10973 tfuHqInfo->lnk.node = (PTR)NULLP;
10975 CMCHKPK(SPkU32, count, mBuf);
10976 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10977 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10983 /***********************************************************
10985 * Func : cmUnpkTfuHqIndInfo
10988 * Desc : This structure contains a list of HARQ feedback for a number of UEs.
10989 * @details All the HARQ feedback received in the subframe are clubbed together
10990 * in this data structure and given to the scheduler for processing.
10999 **********************************************************/
11001 PUBLIC S16 cmUnpkTfuHqIndInfo
11003 TfuHqIndInfo *param,
11008 PUBLIC S16 cmUnpkTfuHqIndInfo(param, memCp, mBuf)
11009 TfuHqIndInfo *param;
11015 U32 count, loopCnt;
11016 TfuHqInfo *tfuHqInfo;
11018 TRC3(cmUnpkTfuHqIndInfo)
11020 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11021 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11022 cmLListInit(¶m->hqIndLst);
11023 CMCHKUNPK(SUnpkU32, &count, mBuf);
11024 for (loopCnt=0; loopCnt<count; loopCnt++) {
11025 cmGetMem((Ptr)memCp, sizeof(*tfuHqInfo), (Ptr *)&tfuHqInfo);
11026 CMCHKUNPK(cmUnpkTfuHqInfo, tfuHqInfo, mBuf);
11027 cmLListAdd2Tail(¶m->hqIndLst, &tfuHqInfo->lnk);
11028 tfuHqInfo->lnk.node = (PTR)tfuHqInfo;
11035 /***********************************************************
11037 * Func : cmPkTfuUlCqiInfo
11040 * Desc : This structure conveys the Uplink CQI information for a single subband.
11049 **********************************************************/
11051 PUBLIC S16 cmPkTfuUlCqiInfo
11053 TfuUlCqiInfo *param,
11057 PUBLIC S16 cmPkTfuUlCqiInfo(param, mBuf)
11058 TfuUlCqiInfo *param;
11063 TRC3(cmPkTfuUlCqiInfo)
11065 CMCHKPK(cmPkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf);
11071 /***********************************************************
11073 * Func : cmUnpkTfuUlCqiInfo
11076 * Desc : This structure conveys the Uplink CQI information for a single subband.
11085 **********************************************************/
11087 PUBLIC S16 cmUnpkTfuUlCqiInfo
11089 TfuUlCqiInfo *param,
11093 PUBLIC S16 cmUnpkTfuUlCqiInfo(param, mBuf)
11094 TfuUlCqiInfo *param;
11099 TRC3(cmUnpkTfuUlCqiInfo)
11101 CMCHKUNPK(cmUnpkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf);
11107 /***********************************************************
11109 * Func : cmPkTfuUlCqiRpt
11112 * Desc : This structure contains the UL CQI estimated by the physical layer.
11113 * @details The report could be wideband CQI or subBand CQI or both.
11122 **********************************************************/
11124 PUBLIC S16 cmPkTfuUlCqiRpt
11126 TfuUlCqiRpt *param,
11130 PUBLIC S16 cmPkTfuUlCqiRpt(param, mBuf)
11131 TfuUlCqiRpt *param;
11137 TRC3(cmPkTfuUlCqiRpt)
11139 for (i=TFU_MAX_UL_SUBBAND-1; i >= 0; i--) {
11140 CMCHKPK(cmPkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf);
11142 CMCHKPK(SPkU8, param->numSubband, mBuf);
11143 CMCHKPK(SPkU8, param->wideCqi, mBuf);
11144 CMCHKPK(SPkU8, param->isTxPort0, mBuf);
11145 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11151 /***********************************************************
11153 * Func : cmUnpkTfuUlCqiRpt
11156 * Desc : This structure contains the UL CQI estimated by the physical layer.
11157 * @details The report could be wideband CQI or subBand CQI or both.
11166 **********************************************************/
11168 PUBLIC S16 cmUnpkTfuUlCqiRpt
11170 TfuUlCqiRpt *param,
11174 PUBLIC S16 cmUnpkTfuUlCqiRpt(param, mBuf)
11175 TfuUlCqiRpt *param;
11181 TRC3(cmUnpkTfuUlCqiRpt)
11183 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11184 CMCHKUNPK(SUnpkU8, ¶m->isTxPort0, mBuf);
11185 CMCHKUNPK(SUnpkU8, ¶m->wideCqi, mBuf);
11186 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
11187 for (i=0; i<TFU_MAX_UL_SUBBAND; i++) {
11188 CMCHKUNPK(cmUnpkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf);
11195 /***********************************************************
11197 * Func : cmPkTfuUlCqiIndInfo
11200 * Desc : This structure conveys the Uplink CQI information.
11201 * @details Uplink CQI is calculated by the physical layer, and is this
11202 * information is provided to the scheduler.
11203 * This data structure clubs together the UL CQI estimates for all the UEs that
11204 * have been scheduled in the subframe for uplink transmission.
11213 **********************************************************/
11215 PUBLIC S16 cmPkTfuUlCqiIndInfo
11217 TfuUlCqiIndInfo *param,
11221 PUBLIC S16 cmPkTfuUlCqiIndInfo(param, mBuf)
11222 TfuUlCqiIndInfo *param;
11229 TfuUlCqiRpt *tfuUlCqiRpt;
11231 TRC3(cmPkTfuUlCqiIndInfo)
11233 count = param->ulCqiRpt.count;
11234 node = param->ulCqiRpt.last;
11236 tfuUlCqiRpt = (TfuUlCqiRpt *)node->node;
11238 CMCHKPK(cmPkTfuUlCqiRpt, tfuUlCqiRpt, mBuf);
11239 cmLListDelFrm(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk);
11240 tfuUlCqiRpt->lnk.node = (PTR)NULLP;
11242 CMCHKPK(SPkU32, count, mBuf);
11243 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11244 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11250 /***********************************************************
11252 * Func : cmUnpkTfuUlCqiIndInfo
11255 * Desc : This structure conveys the Uplink CQI information.
11256 * @details Uplink CQI is calculated by the physical layer, and is this
11257 * information is provided to the scheduler.
11258 * This data structure clubs together the UL CQI estimates for all the UEs that
11259 * have been scheduled in the subframe for uplink transmission.
11268 **********************************************************/
11270 PUBLIC S16 cmUnpkTfuUlCqiIndInfo
11272 TfuUlCqiIndInfo *param,
11277 PUBLIC S16 cmUnpkTfuUlCqiIndInfo(param, memCp, mBuf)
11278 TfuUlCqiIndInfo *param;
11284 U32 count, loopCnt;
11285 TfuUlCqiRpt *tfuUlCqiRpt;
11287 TRC3(cmUnpkTfuUlCqiIndInfo)
11289 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11290 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11291 cmLListInit(¶m->ulCqiRpt);
11292 CMCHKUNPK(SUnpkU32, &count, mBuf);
11293 for (loopCnt=0; loopCnt<count; loopCnt++) {
11294 cmGetMem((Ptr)memCp, sizeof(*tfuUlCqiRpt), (Ptr *)&tfuUlCqiRpt);
11295 CMCHKUNPK(cmUnpkTfuUlCqiRpt, tfuUlCqiRpt, mBuf);
11296 cmLListAdd2Tail(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk);
11297 tfuUlCqiRpt->lnk.node = (PTR)tfuUlCqiRpt;
11305 /***********************************************************
11307 * Func : cmPkTfuDlCqiRpt
11310 * Desc : This structure contains the DL CQI report for a single UE.
11311 * @details The report could either be reported on PUCCH or PUSCH, a flag
11312 * conveys this information.
11321 **********************************************************/
11323 PUBLIC S16 cmPkTfuDlCqiRpt
11325 TfuDlCqiRpt *param,
11329 PUBLIC S16 cmPkTfuDlCqiRpt(param, mBuf)
11330 TfuDlCqiRpt *param;
11335 TRC3(cmPkTfuDlCqiRpt)
11337 if (cmPkTfuDlCqiInfo(param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK)
11339 CMCHKPK(SPkU8, param->isPucchInfo, mBuf);
11340 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11346 /***********************************************************
11348 * Func : cmUnpkTfuDlCqiRpt
11351 * Desc : This structure contains the DL CQI report for a single UE.
11352 * @details The report could either be reported on PUCCH or PUSCH, a flag
11353 * conveys this information.
11362 **********************************************************/
11364 PUBLIC S16 cmUnpkTfuDlCqiRpt
11366 TfuDlCqiRpt *param,
11370 PUBLIC S16 cmUnpkTfuDlCqiRpt(param, mBuf)
11371 TfuDlCqiRpt *param;
11376 TRC3(cmUnpkTfuDlCqiRpt)
11378 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11379 CMCHKUNPK(SUnpkU8, ¶m->isPucchInfo, mBuf);
11380 if (cmUnpkTfuDlCqiInfo (param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK)
11387 /***********************************************************
11389 * Func : cmPkTfuDlCqiIndInfo
11392 * Desc : This structure contains a list of Downlink CQI reports transmitted by
11394 * @details This structure clubs together DL CQI reports for a number of UEs.
11403 **********************************************************/
11405 PUBLIC S16 cmPkTfuDlCqiIndInfo
11407 TfuDlCqiIndInfo *param,
11411 PUBLIC S16 cmPkTfuDlCqiIndInfo(param, mBuf)
11412 TfuDlCqiIndInfo *param;
11419 TfuDlCqiRpt *tfuDlCqiRpt;
11421 TRC3(cmPkTfuDlCqiIndInfo)
11423 count = param->dlCqiRptsLst.count;
11424 node = param->dlCqiRptsLst.last;
11426 tfuDlCqiRpt = (TfuDlCqiRpt *)node->node;
11428 CMCHKPK(cmPkTfuDlCqiRpt, tfuDlCqiRpt, mBuf);
11429 cmLListDelFrm(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk);
11430 tfuDlCqiRpt->lnk.node = (PTR)NULLP;
11432 CMCHKPK(SPkU32, count, mBuf);
11433 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11434 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11440 /***********************************************************
11442 * Func : cmUnpkTfuDlCqiIndInfo
11445 * Desc : This structure contains a list of Downlink CQI reports transmitted by
11447 * @details This structure clubs together DL CQI reports for a number of UEs.
11456 **********************************************************/
11458 PUBLIC S16 cmUnpkTfuDlCqiIndInfo
11460 TfuDlCqiIndInfo *param,
11465 PUBLIC S16 cmUnpkTfuDlCqiIndInfo(param, memCp, mBuf)
11466 TfuDlCqiIndInfo *param;
11472 U32 count, loopCnt;
11473 TfuDlCqiRpt *tfuDlCqiRpt;
11475 TRC3(cmUnpkTfuDlCqiIndInfo)
11477 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11478 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11479 cmLListInit(¶m->dlCqiRptsLst);
11480 CMCHKUNPK(SUnpkU32, &count, mBuf);
11481 for (loopCnt=0; loopCnt<count; loopCnt++) {
11482 cmGetMem((Ptr)memCp, sizeof(*tfuDlCqiRpt), (Ptr *)&tfuDlCqiRpt);
11483 CMCHKUNPK(cmUnpkTfuDlCqiRpt, tfuDlCqiRpt, mBuf);
11484 cmLListAdd2Tail(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk);
11485 tfuDlCqiRpt->lnk.node = (PTR)tfuDlCqiRpt;
11492 /***********************************************************
11494 * Func : cmPkTfuCrcInfo
11497 * Desc : This structure contains the CRC indication for a single
11507 **********************************************************/
11509 PUBLIC S16 cmPkTfuCrcInfo
11515 PUBLIC S16 cmPkTfuCrcInfo(param, mBuf)
11521 TRC3(cmPkTfuCrcInfo)
11523 CMCHKPK(cmPkTknU8, ¶m->rv, mBuf);
11524 CMCHKPK(SPkU8, param->isFailure, mBuf);
11525 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11531 /***********************************************************
11533 * Func : cmUnpkTfuCrcInfo
11536 * Desc : This structure contains the CRC indication for a single
11546 **********************************************************/
11548 PUBLIC S16 cmUnpkTfuCrcInfo
11554 PUBLIC S16 cmUnpkTfuCrcInfo(param, mBuf)
11560 TRC3(cmUnpkTfuCrcInfo)
11562 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11563 CMCHKUNPK(SUnpkU8, ¶m->isFailure, mBuf);
11564 CMCHKUNPK(cmUnpkTknU8, ¶m->rv, mBuf);
11570 /***********************************************************
11572 * Func : cmPkTfuCrcIndInfo
11575 * Desc : This structure contains information that is passed as a part of the
11576 * CRC Indication from PHY to MAC.
11577 * @details This structure clubs together all the CRC indications for
11578 * a single subframe and conveys this information to the scheduler.
11587 **********************************************************/
11589 PUBLIC S16 cmPkTfuCrcIndInfo
11591 TfuCrcIndInfo *param,
11595 PUBLIC S16 cmPkTfuCrcIndInfo(param, mBuf)
11596 TfuCrcIndInfo *param;
11603 TfuCrcInfo *tfuCrcIndInfo;
11605 TRC3(cmPkTfuCrcIndInfo)
11608 CMCHKPK(SPkU8, param->sccIdx, mBuf);
11609 CMCHKPK(SPkU8, param->sectorId, mBuf);
11610 #endif /* TFU_5GTF */
11611 count = param->crcLst.count;
11612 node = param->crcLst.last;
11614 tfuCrcIndInfo = (TfuCrcInfo *)node->node;
11616 CMCHKPK(cmPkTfuCrcInfo, tfuCrcIndInfo, mBuf);
11617 cmLListDelFrm(¶m->crcLst, &tfuCrcIndInfo->lnk);
11618 tfuCrcIndInfo->lnk.node = (PTR)NULLP;
11620 CMCHKPK(SPkU32, count, mBuf);
11621 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11622 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11628 /***********************************************************
11630 * Func : cmUnpkTfuCrcIndInfo
11633 * Desc : This structure contains information that is passed as a part of the
11634 * CRC Indication from PHY to MAC.
11635 * @details This structure clubs together all the CRC indications for
11636 * a single subframe and conveys this information to the scheduler.
11645 **********************************************************/
11647 PUBLIC S16 cmUnpkTfuCrcIndInfo
11649 TfuCrcIndInfo *param,
11654 PUBLIC S16 cmUnpkTfuCrcIndInfo(param, memCp, mBuf)
11655 TfuCrcIndInfo *param;
11661 U32 count, loopCnt;
11662 TfuCrcInfo *tfuCrcIndInfo;
11664 TRC3(cmUnpkTfuCrcIndInfo)
11666 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11667 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11668 cmLListInit(¶m->crcLst);
11669 CMCHKUNPK(SUnpkU32, &count, mBuf);
11670 for (loopCnt=0; loopCnt<count; loopCnt++) {
11671 cmGetMem((Ptr)memCp, sizeof(*tfuCrcIndInfo), (Ptr *)&tfuCrcIndInfo);
11672 CMCHKUNPK(cmUnpkTfuCrcInfo, tfuCrcIndInfo, mBuf);
11673 cmLListAdd2Tail(¶m->crcLst, &tfuCrcIndInfo->lnk);
11674 tfuCrcIndInfo->lnk.node = (PTR)tfuCrcIndInfo;
11677 CMCHKUNPK(SUnpkU8, ¶m->sectorId, mBuf);
11678 CMCHKUNPK(SUnpkU8, ¶m->sccIdx, mBuf);
11679 #endif /* TFU_5GTF */
11685 /***********************************************************
11687 * Func : cmPkTfuTimingAdvInfo
11690 * Desc : This structure contains the timing advance information for a single
11700 **********************************************************/
11702 PUBLIC S16 cmPkTfuTimingAdvInfo
11704 TfuTimingAdvInfo *param,
11708 PUBLIC S16 cmPkTfuTimingAdvInfo(param, mBuf)
11709 TfuTimingAdvInfo *param;
11714 TRC3(cmPkTfuTimingAdvInfo)
11716 CMCHKPK(SPkU8, param->timingAdv, mBuf);
11717 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11723 /***********************************************************
11725 * Func : cmUnpkTfuTimingAdvInfo
11728 * Desc : This structure contains the timing advance information for a single
11738 **********************************************************/
11740 PUBLIC S16 cmUnpkTfuTimingAdvInfo
11742 TfuTimingAdvInfo *param,
11746 PUBLIC S16 cmUnpkTfuTimingAdvInfo(param, mBuf)
11747 TfuTimingAdvInfo *param;
11752 TRC3(cmUnpkTfuTimingAdvInfo)
11754 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11755 CMCHKUNPK(SUnpkU8, ¶m->timingAdv, mBuf);
11761 /***********************************************************
11763 * Func : cmPkTfuTimingAdvIndInfo
11766 * Desc : This structure contains information that is passed as part of the Timing
11767 * Advance indication from PHY to MAC.
11768 * @details This structure clubs together timing advances for a number of UEs.
11777 **********************************************************/
11779 PUBLIC S16 cmPkTfuTimingAdvIndInfo
11781 TfuTimingAdvIndInfo *param,
11785 PUBLIC S16 cmPkTfuTimingAdvIndInfo(param, mBuf)
11786 TfuTimingAdvIndInfo *param;
11793 TfuTimingAdvInfo *tfuTimingAdvInfo;
11795 TRC3(cmPkTfuTimingAdvIndInfo)
11797 count = param->timingAdvLst.count;
11798 node = param->timingAdvLst.last;
11800 tfuTimingAdvInfo = (TfuTimingAdvInfo *)node->node;
11802 CMCHKPK(cmPkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf);
11803 cmLListDelFrm(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk);
11804 tfuTimingAdvInfo->lnk.node = (PTR)NULLP;
11806 CMCHKPK(SPkU32, count, mBuf);
11807 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11808 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11814 /***********************************************************
11816 * Func : cmUnpkTfuTimingAdvIndInfo
11819 * Desc : This structure contains information that is passed as part of the Timing
11820 * Advance indication from PHY to MAC.
11821 * @details This structure clubs together timing advances for a number of UEs.
11830 **********************************************************/
11832 PUBLIC S16 cmUnpkTfuTimingAdvIndInfo
11834 TfuTimingAdvIndInfo *param,
11839 PUBLIC S16 cmUnpkTfuTimingAdvIndInfo(param, memCp, mBuf)
11840 TfuTimingAdvIndInfo *param;
11846 U32 count, loopCnt;
11847 TfuTimingAdvInfo *tfuTimingAdvInfo;
11849 TRC3(cmUnpkTfuTimingAdvIndInfo)
11851 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11852 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11853 cmLListInit(¶m->timingAdvLst);
11854 CMCHKUNPK(SUnpkU32, &count, mBuf);
11855 for (loopCnt=0; loopCnt<count; loopCnt++) {
11856 cmGetMem((Ptr)memCp, sizeof(*tfuTimingAdvInfo), (Ptr *)&tfuTimingAdvInfo);
11857 CMCHKUNPK(cmUnpkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf);
11858 cmLListAdd2Tail(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk);
11859 tfuTimingAdvInfo->lnk.node = (PTR)tfuTimingAdvInfo;
11865 /***********************************************************
11867 * Func : cmPkTfuTtiCellInfo
11870 * Desc : This structure contains information that is
11871 * passed as a part of the TTI indication sent
11872 * from CL to MAC and SCH
11881 **********************************************************/
11883 PUBLIC S16 cmPkTfuTtiCellInfo
11885 TfuTtiCellInfo *param,
11889 PUBLIC S16 cmPkTfuTtiCellInfo(param, mBuf)
11890 TfuTtiCellInfo *param;
11895 TRC3(cmPkTfuTtiCellInfo)
11897 CMCHKPK(SPkU8, param->ulBlankSf, mBuf);
11898 CMCHKPK(SPkU8, param->dlBlankSf, mBuf);
11899 CMCHKPK(SPkU8, param->schTickDelta, mBuf);
11900 CMCHKPK(cmPkBool, param->isDummyTti, mBuf);
11901 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11902 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11907 /***********************************************************
11909 * Func : cmPkTfuTtiIndInfo
11912 * Desc : This structure contains information that is passed as a part of the TTI
11913 * indication sent from PHY to MAC.
11922 **********************************************************/
11924 PUBLIC S16 cmPkTfuTtiIndInfo
11926 TfuTtiIndInfo *param,
11930 PUBLIC S16 cmPkTfuTtiIndInfo(param, mBuf)
11931 TfuTtiIndInfo *param;
11937 TRC3(cmPkTfuTtiIndInfo)
11940 for (i=(param->numCells-1); i >= 0; i--) {
11941 CMCHKPK(cmPkTfuTtiCellInfo, ¶m->cells[i], mBuf);
11943 CMCHKPK(SPkU8, param->numCells, mBuf);
11949 /***********************************************************
11951 * Func : cmUnpkTfuTtiCellInfo
11954 * Desc : This structure contains information that is
11955 * passed as a part of the TTI indication sent
11956 * from CL to MAC and SCH
11965 **********************************************************/
11967 PUBLIC S16 cmUnpkTfuTtiCellInfo
11969 TfuTtiCellInfo *param,
11973 PUBLIC S16 cmUnpkTfuTtiCellInfo(param, mBuf)
11974 TfuTtiCellInfo *param;
11979 TRC3(cmUnpkTfuTtiCellInfo)
11981 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11982 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11983 CMCHKUNPK(cmUnpkBool, ¶m->isDummyTti, mBuf);
11984 CMCHKUNPK(SUnpkU8, ¶m->schTickDelta, mBuf);
11985 CMCHKUNPK(SUnpkU8, ¶m->dlBlankSf, mBuf);
11986 CMCHKUNPK(SUnpkU8, ¶m->ulBlankSf, mBuf);
11992 /***********************************************************
11994 * Func : cmUnpackSlotIndInfo
11997 * Desc : This structure contains information that is passed as a part of the Slot
11998 * indication sent from PHY to MAC.
12007 **********************************************************/
12008 PUBLIC S16 cmUnpackSlotIndInfo
12010 SlotIndInfo *param,
12014 CMCHKUNPK(SUnpkU16, ¶m->sfn, mBuf);
12015 CMCHKUNPK(SUnpkU16, ¶m->slot, mBuf);
12022 /***********************************************************
12024 * Func : cmPkTfuRaReqInfo
12027 * Desc : This structure contains the information for a single Random Access Request.
12028 * @details The information present in this structure is for a single preamble.
12029 * Associated with each preamble are fields that the physical layer calculates
12030 * based on the reception of the Random Access Request. These are the following
12031 * -# Timing Advance
12033 * -# CQI (optional).
12042 **********************************************************/
12044 PUBLIC S16 cmPkTfuRaReqInfo
12046 TfuRaReqInfo *param,
12050 PUBLIC S16 cmPkTfuRaReqInfo(param, mBuf)
12051 TfuRaReqInfo *param;
12056 TRC3(cmPkTfuRaReqInfo)
12058 CMCHKPK(SPkU8, param->cqiIdx, mBuf);
12059 CMCHKPK(SPkU8, param->cqiPres, mBuf);
12060 CMCHKPK(SPkU8, param->tpc, mBuf);
12061 CMCHKPK(SPkU16, param->ta, mBuf);
12062 CMCHKPK(SPkU8, param->rapId, mBuf);
12068 /***********************************************************
12070 * Func : cmUnpkTfuRaReqInfo
12073 * Desc : This structure contains the information for a single Random Access Request.
12074 * @details The information present in this structure is for a single preamble.
12075 * Associated with each preamble are fields that the physical layer calculates
12076 * based on the reception of the Random Access Request. These are the following
12077 * -# Timing Advance
12079 * -# CQI (optional).
12088 **********************************************************/
12090 PUBLIC S16 cmUnpkTfuRaReqInfo
12092 TfuRaReqInfo *param,
12096 PUBLIC S16 cmUnpkTfuRaReqInfo(param, mBuf)
12097 TfuRaReqInfo *param;
12102 TRC3(cmUnpkTfuRaReqInfo)
12104 CMCHKUNPK(SUnpkU8, ¶m->rapId, mBuf);
12105 CMCHKUNPK(SUnpkU16, ¶m->ta, mBuf);
12106 CMCHKUNPK(SUnpkU8, ¶m->tpc, mBuf);
12107 CMCHKUNPK(SUnpkU8, ¶m->cqiPres, mBuf);
12108 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx, mBuf);
12114 /***********************************************************
12116 * Func : cmPkTfuRachInfo
12119 * Desc : This structure contains RACH request information for a single
12129 **********************************************************/
12131 PUBLIC S16 cmPkTfuRachInfo
12134 TfuRachInfo *param,
12138 PUBLIC S16 cmPkTfuRachInfo(memCp, param, mBuf)
12140 TfuRachInfo *param;
12146 TRC3(cmPkTfuRachInfo)
12148 for (i= (param->numRaReqInfo - 1); i >= 0; i--) {
12149 CMCHKPK(cmPkTfuRaReqInfo, &(param->raReqInfoArr[i]), mBuf);
12152 CMCHKPK(SPkU16, param->nPwrFactor, mBuf);
12153 CMCHKPK(SPkU8, param->nPRACHSymbIndex, mBuf);
12154 CMCHKPK(SPkU8, param->nf1Value, mBuf);
12155 CMCHKPK(SPkU8, param->nCyclicShift, mBuf);
12156 CMCHKPK(SPkU8, param->nRootSeq, mBuf);
12157 CMCHKPK(SPkU8, param->nPRACHConfiguration, mBuf);
12158 CMCHKPK(SPkU8, param->nPreambleFormat, mBuf);
12160 CMCHKPK(SPkU8, param->numRaReqInfo, mBuf);
12161 CMCHKPK(cmPkLteRnti, param->raRnti, mBuf);
12167 /***********************************************************
12169 * Func : cmUnpkTfuRachInfo
12172 * Desc : This structure contains RACH request information for a single
12182 **********************************************************/
12184 PUBLIC S16 cmUnpkTfuRachInfo
12187 TfuRachInfo *param,
12191 PUBLIC S16 cmUnpkTfuRachInfo(memCp, param, mBuf)
12193 TfuRachInfo *param;
12199 TRC3(cmUnpkTfuRachInfo)
12201 CMCHKUNPK(cmUnpkLteRnti, ¶m->raRnti, mBuf);
12202 CMCHKUNPK(SUnpkU8, ¶m->numRaReqInfo, mBuf);
12204 CMCHKUNPK(SPkU8, param->nPreambleFormat, mBuf);
12205 CMCHKUNPK(SPkU8, param->nPRACHConfiguration, mBuf);
12206 CMCHKUNPK(SPkU8, param->nRootSeq, mBuf);
12207 CMCHKUNPK(SPkU8, param->nCyclicShift, mBuf);
12208 CMCHKUNPK(SPkU8, param->nf1Value, mBuf);
12209 CMCHKUNPK(SPkU8, param->nPRACHSymbIndex, mBuf);
12210 CMCHKUNPK(SPkU16, param->nPwrFactor, mBuf);
12212 if (cmGetMem (&(memCp), (sizeof(TfuRaReqInfo) * param->numRaReqInfo),
12213 (Ptr *)¶m->raReqInfoArr) != ROK)
12217 for (i=0; i<param->numRaReqInfo; i++) {
12218 CMCHKUNPK(cmUnpkTfuRaReqInfo, ¶m->raReqInfoArr[i], mBuf);
12225 /***********************************************************
12227 * Func : cmPkTfuRaReqIndInfo
12230 * Desc : This structure contains the list of Random Access Requests received in a
12232 * @details Random Access Request is associated with a RA-RNTI, which remains
12233 * common for all the Random access requests within a subframe. This structure
12234 * thus carries the RA-RNTI and a list of Random Access Request information.
12235 * This information consists of the following
12236 * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
12238 * -# Timing Advance - this corresponds to the timing adjustment that the UE
12239 * needs to be uplink synchronized. This value is calculated by physical layer.
12240 * -# tpc - this is the power control command that the physical layer calculates
12241 * from the received RA request. This value is transmitted in the RA Response
12243 * -# CQI - this is the Channel quality index of the UL channel estimated by the
12244 * physical layer. This aids MAC in the scheduling of this UE.
12253 **********************************************************/
12255 PUBLIC S16 cmPkTfuRaReqIndInfo
12257 TfuRaReqIndInfo *param,
12261 PUBLIC S16 cmPkTfuRaReqIndInfo(param, mBuf)
12262 TfuRaReqIndInfo *param;
12268 TRC3(cmPkTfuRaReqIndInfo)
12270 for (i= (param->nmbOfRaRnti-1); i >= 0; i--)
12272 if (ROK != cmPkTfuRachInfo(param->memCp,
12273 &(param->rachInfoArr[i]), mBuf))
12278 CMCHKPK(SPkU8, param->nmbOfRaRnti, mBuf);
12279 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12280 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12286 /***********************************************************
12288 * Func : cmUnpkTfuRaReqIndInfo
12291 * Desc : This structure contains the list of Random Access Requests received in a
12293 * @details Random Access Request is associated with a RA-RNTI, which remains
12294 * common for all the Random access requests within a subframe. This structure
12295 * thus carries the RA-RNTI and a list of Random Access Request information.
12296 * This information consists of the following
12297 * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
12299 * -# Timing Advance - this corresponds to the timing adjustment that the UE
12300 * needs to be uplink synchronized. This value is calculated by physical layer.
12301 * -# tpc - this is the power control command that the physical layer calculates
12302 * from the received RA request. This value is transmitted in the RA Response
12304 * -# CQI - this is the Channel quality index of the UL channel estimated by the
12305 * physical layer. This aids MAC in the scheduling of this UE.
12314 **********************************************************/
12316 PUBLIC S16 cmUnpkTfuRaReqIndInfo
12318 TfuRaReqIndInfo *param,
12322 PUBLIC S16 cmUnpkTfuRaReqIndInfo(param, mBuf)
12323 TfuRaReqIndInfo *param;
12329 TRC3(cmUnpkTfuRaReqIndInfo)
12331 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12332 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12333 CMCHKUNPK(SUnpkU8, ¶m->nmbOfRaRnti, mBuf);
12334 if (cmGetMem (&(param->memCp), (sizeof(TfuRachInfo) * param->nmbOfRaRnti),
12335 (Ptr *)¶m->rachInfoArr) != ROK)
12339 for (i=0; i<param->nmbOfRaRnti; i++)
12341 if (ROK != cmUnpkTfuRachInfo(param->memCp, ¶m->rachInfoArr[i], mBuf))
12351 /***********************************************************
12353 * Func : cmPkTfuPucchDeltaPwr
12356 * Desc : This structure contains PUCCH Delta power for a single UE.
12365 **********************************************************/
12367 PUBLIC S16 cmPkTfuPucchDeltaPwrInfo
12369 TfuPucchDeltaPwr *param,
12373 PUBLIC S16 cmPkTfuPucchDeltaPwrInfo(param, mBuf)
12374 TfuPucchDeltaPwr *param;
12379 TRC3(cmPkTfuPucchDeltaPwrInfo)
12381 CMCHKPK(SPkS8, param->pucchDeltaPwr, mBuf);
12382 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
12388 /***********************************************************
12390 * Func : cmUnpkTfuPucchDeltaPwr
12393 * Desc : This structure contains PUCCH Delta power for a single UE.
12402 **********************************************************/
12404 PUBLIC S16 cmUnpkTfuPucchDeltaPwrInfo
12406 TfuPucchDeltaPwr *param,
12410 PUBLIC S16 cmUnpkTfuPucchDeltaPwrInfo(param, mBuf)
12411 TfuPucchDeltaPwr *param;
12416 TRC3(cmUnpkTfuPucchDeltaPwrInfo)
12418 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
12419 CMCHKUNPK(SUnpkS8, ¶m->pucchDeltaPwr, mBuf);
12425 /***********************************************************
12427 * Func : cmPkTfuPucchDeltaPwrIndInfo
12430 * Desc : This structure contains information that is passed as a part of the
12431 * PUCCH Delta power indication from PHY to SCH.
12432 * @details This structure clubs together PUCCH Delta power values for a number
12442 **********************************************************/
12444 PUBLIC S16 cmPkTfuPucchDeltaPwrIndInfo
12446 TfuPucchDeltaPwrIndInfo *param,
12450 PUBLIC S16 cmPkTfuPucchDeltaPwrIndInfo(param, mBuf)
12451 TfuPucchDeltaPwrIndInfo *param;
12458 TfuPucchDeltaPwr *tfuPucchDeltaPwr;
12460 TRC3(cmPkTfuPucchDeltaPwrIndInfo)
12462 count = param->pucchDeltaPwrLst.count;
12463 node = param->pucchDeltaPwrLst.last;
12465 tfuPucchDeltaPwr = (TfuPucchDeltaPwr *)node->node;
12467 CMCHKPK(cmPkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf);
12468 cmLListDelFrm(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk);
12469 tfuPucchDeltaPwr->lnk.node = (PTR)NULLP;
12471 CMCHKPK(SPkU32, count, mBuf);
12472 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12473 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12479 /***********************************************************
12481 * Func : cmUnpkTfuPucchDeltaPwrIndInfo
12484 * Desc : This structure contains information that is passed as a part of the
12485 * PUCCH Delta power indication from PHY to SCH.
12486 * @details This structure clubs together PUCCH Delta power values for a number
12496 **********************************************************/
12498 PUBLIC S16 cmUnpkTfuPucchDeltaPwrIndInfo
12500 TfuPucchDeltaPwrIndInfo *param,
12505 PUBLIC S16 cmUnpkTfuPucchDeltaPwrIndInfo(param, memCp, mBuf)
12506 TfuPucchDeltaPwrIndInfo *param;
12512 U32 count, loopCnt;
12513 TfuPucchDeltaPwr *tfuPucchDeltaPwr;
12515 TRC3(cmUnpkTfuPucchDeltaPwrIndInfo)
12517 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12518 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12519 cmLListInit(¶m->pucchDeltaPwrLst);
12520 CMCHKUNPK(SUnpkU32, &count, mBuf);
12521 for (loopCnt=0; loopCnt<count; loopCnt++) {
12522 cmGetMem((Ptr)memCp, sizeof(*tfuPucchDeltaPwr), (Ptr *)&tfuPucchDeltaPwr);
12523 CMCHKUNPK(cmUnpkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf);
12524 cmLListAdd2Tail(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk);
12525 tfuPucchDeltaPwr->lnk.node = (PTR)tfuPucchDeltaPwr;
12531 PUBLIC S16 cmPkBuffer
12537 PUBLIC S16 cmPkBuffer(param, mBuf)
12544 if (SFndLenMsg(*param, &msgLen) != ROK)
12546 if (SCatMsg(mBuf, *param, M1M2) != ROK)
12548 TFU_FREE_MSG(*param);
12550 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
12554 PUBLIC S16 cmUnpkBuffer
12560 PUBLIC S16 cmUnpkBuffer(param, mBuf)
12565 MsgLen msgLen=0, totalMsgLen=0;
12567 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
12568 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
12570 if (SSegMsg(mBuf, totalMsgLen-msgLen, param) != ROK)
12576 /***********************************************************
12578 * Func : cmPkTfuDoaInd
12581 * Desc : This API is used to indicate DOA(Direction Of Arrival)
12582 * identifier for one or more UEs.
12583 * It carries a DOA for each UE.
12584 * @param pst Pointer to the post structure.
12585 * @param suId SAP ID of the service user.
12586 * @param doaInd Pointer to the TfuDoaIndInfo structure.
12587 * @return ROK/RFAILED
12596 **********************************************************/
12598 PUBLIC S16 cmPkTfuDoaInd
12602 TfuDoaIndInfo * doaInd
12605 PUBLIC S16 cmPkTfuDoaInd(pst, suId, doaInd)
12608 TfuDoaIndInfo * doaInd;
12611 Buffer *mBuf = NULLP;
12612 TRC3(cmPkTfuDoaInd)
12614 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
12615 #if (ERRCLASS & ERRCLS_ADD_RES)
12616 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12617 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12618 (ErrVal)ETFU125, (ErrVal)0, "Packing failed");
12620 SPutSBuf(pst->region, pst->pool, (Data *)doaInd, sizeof(TfuDoaIndInfo));
12623 cmPkTfuDoaIndInfo(doaInd, mBuf);
12624 if (SPkS16(suId, mBuf) != ROK) {
12625 #if (ERRCLASS & ERRCLS_ADD_RES)
12626 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12627 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12628 (ErrVal)ETFU126, (ErrVal)0, "Packing failed");
12630 TFU_FREE_MEM(doaInd);
12631 TFU_FREE_MSG(mBuf);
12634 TFU_FREE_MEM(doaInd);
12635 pst->event = (Event) EVTTFUDOAIND;
12636 RETVALUE(SPstTsk(pst,mBuf));
12640 /***********************************************************
12642 * Func : cmUnpkTfuDoaInd
12645 * Desc : This API is used to indicate DOA(Direction Of Arrival)
12646 * identifier for one or more UEs.
12647 * It carries a DOA for each UE.
12648 * @param pst Pointer to the post structure.
12649 * @param suId SAP ID of the service user.
12650 * @param doaInd Pointer to the TfuDoaIndInfo structure.
12651 * @return ROK/RFAILED
12660 **********************************************************/
12662 PUBLIC S16 cmUnpkTfuDoaInd
12669 PUBLIC S16 cmUnpkTfuDoaInd(func, pst, mBuf)
12676 TfuDoaIndInfo *doaInd;
12678 TRC3(cmUnpkTfuDoaInd)
12680 if (SUnpkS16(&suId, mBuf) != ROK) {
12681 TFU_FREE_MSG(mBuf);
12682 #if (ERRCLASS & ERRCLS_ADD_RES)
12683 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12684 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12685 (ErrVal)ETFU127, (ErrVal)0, "Packing failed");
12691 sMem.region = pst->region;
12692 sMem.pool = pst->pool;
12693 if ((cmAllocEvnt(sizeof(TfuDoaIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&doaInd)) != ROK) {
12694 #if (ERRCLASS & ERRCLS_ADD_RES)
12695 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12696 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12697 (ErrVal)ETFU128, (ErrVal)0, "Packing failed");
12699 TFU_FREE_MSG(mBuf);
12704 cmUnpkTfuDoaIndInfo(doaInd, (Ptr)&doaInd->memCp, mBuf);
12705 TFU_FREE_MSG(mBuf);
12706 RETVALUE((*func)(pst, suId, doaInd));
12711 /***********************************************************
12713 * Func : cmPkTfuDciFormatTbInfo
12716 * Desc : This structure contains the TB level DCI signalling
12717 * parameters in case of DCI formats 2 and 2A
12726 **********************************************************/
12728 PUBLIC S16 cmPkTfuDciFormatTbInfo
12730 TfuDciFormatTbInfo *param,
12734 PUBLIC S16 cmPkTfuDciFormatTbInfo(param, mBuf)
12735 TfuDciFormatTbInfo *param;
12740 TRC3(cmPkTfuDciFormatTbInfo)
12742 CMCHKPK(SPkU8, param->mcs, mBuf);
12743 CMCHKPK(SPkU8, param->rv, mBuf);
12744 CMCHKPK(SPkU8, param->ndi, mBuf);
12750 /***********************************************************
12752 * Func : cmUnpkTfuDciFormatTbInfo
12755 * Desc : This structure contains the TB level DCI signalling
12756 * parameters in case of DCI formats 2 and 2A
12765 **********************************************************/
12767 PUBLIC S16 cmUnpkTfuDciFormatTbInfo
12769 TfuDciFormatTbInfo *param,
12773 PUBLIC S16 cmUnpkTfuDciFormatTbInfo(param, mBuf)
12774 TfuDciFormatTbInfo *param;
12779 TRC3(cmUnpkTfuDciFormatTbInfo)
12781 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
12782 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
12783 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
12789 /***********************************************************
12791 * Func : cmPkTfuSubbandDlCqiInfo
12794 * Desc : This structure is used to convey the subbannd CQI reported.
12803 **********************************************************/
12805 PUBLIC S16 cmPkTfuSubbandDlCqiInfo
12807 TfuSubbandDlCqiInfo *param,
12811 PUBLIC S16 cmPkTfuSubbandDlCqiInfo(param, mBuf)
12812 TfuSubbandDlCqiInfo *param;
12818 TRC3(cmPkTfuSubbandDlCqiInfo)
12820 for (i=TFU_MAX_TB-1; i >= 0; i--) {
12821 CMCHKPK(SPkU8, param->cqiIdx[i], mBuf);
12823 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf);
12829 /***********************************************************
12831 * Func : cmUnpkTfuSubbandDlCqiInfo
12834 * Desc : This structure is used to convey the subbannd CQI reported.
12843 **********************************************************/
12845 PUBLIC S16 cmUnpkTfuSubbandDlCqiInfo
12847 TfuSubbandDlCqiInfo *param,
12851 PUBLIC S16 cmUnpkTfuSubbandDlCqiInfo(param, mBuf)
12852 TfuSubbandDlCqiInfo *param;
12858 TRC3(cmUnpkTfuSubbandDlCqiInfo)
12860 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf);
12861 for (i=0; i<TFU_MAX_TB; i++) {
12862 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx[i], mBuf);
12867 /***********************************************************
12869 * Func : cmPkTfuDlCqiPuschInfo
12872 * Desc : This structure conveys explicitly the PMI information in case
12873 * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6.
12882 **********************************************************/
12884 PUBLIC S16 cmPkTfuDlCqiPuschInfo
12886 TfuDlCqiPuschInfo *param,
12890 PUBLIC S16 cmPkTfuDlCqiPuschInfo(param, mBuf)
12891 TfuDlCqiPuschInfo *param;
12896 TRC3(cmPkTfuDlCqiPuschInfo)
12898 switch(param->mode) {
12899 case TFU_PUSCH_CQI_MODE_31:
12900 CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
12902 case TFU_PUSCH_CQI_MODE_22:
12903 CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
12905 case TFU_PUSCH_CQI_MODE_12:
12906 CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
12911 CMCHKPK(SPkU32, param->mode, mBuf);
12917 /***********************************************************
12919 * Func : cmUnpkTfuDlCqiPuschInfo
12922 * Desc : This structure conveys explicitly the PMI information in case
12923 * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6.
12932 **********************************************************/
12934 PUBLIC S16 cmUnpkTfuDlCqiPuschInfo
12936 TfuDlCqiPuschInfo *param,
12940 PUBLIC S16 cmUnpkTfuDlCqiPuschInfo(param, mBuf)
12941 TfuDlCqiPuschInfo *param;
12946 TRC3(cmUnpkTfuDlCqiPuschInfo)
12948 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
12949 switch(param->mode) {
12950 case TFU_PUSCH_CQI_MODE_12:
12951 CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
12953 case TFU_PUSCH_CQI_MODE_22:
12954 CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
12956 case TFU_PUSCH_CQI_MODE_31:
12957 CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
12965 /***********************************************************
12967 * Func : cmPkTfuDoaRpt
12970 * Desc : This structure contains the DOA estimated by the physical layer.
12971 * @details DOA for a given UE.
12980 **********************************************************/
12982 PUBLIC S16 cmPkTfuDoaRpt
12988 PUBLIC S16 cmPkTfuDoaRpt(param, mBuf)
12994 TRC3(cmPkTfuDoaRpt)
12996 CMCHKPK(SPkU32, param->doa, mBuf);
12997 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
13003 /***********************************************************
13005 * Func : cmUnpkTfuDoaRpt
13008 * Desc : This structure contains the DOA estimated by the physical layer.
13009 * @details DOA for a given UE.
13018 **********************************************************/
13020 PUBLIC S16 cmUnpkTfuDoaRpt
13026 PUBLIC S16 cmUnpkTfuDoaRpt(param, mBuf)
13032 TRC3(cmUnpkTfuDoaRpt)
13034 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
13035 CMCHKUNPK(SUnpkU32, ¶m->doa, mBuf);
13041 /***********************************************************
13043 * Func : cmPkTfuDoaIndInfo
13046 * Desc : This structure conveys the DOA(Direction Of Arrival) indicator.
13047 * @details DOA is calculated by the physical layer, and this
13048 * information is provided to the scheduler.
13049 * This data structure clubs together the DOAs for all the UEs
13050 * calculated by PHY in this subframe.
13059 **********************************************************/
13061 PUBLIC S16 cmPkTfuDoaIndInfo
13063 TfuDoaIndInfo *param,
13067 PUBLIC S16 cmPkTfuDoaIndInfo(param, mBuf)
13068 TfuDoaIndInfo *param;
13075 TfuDoaRpt *tfuDoaRpt;
13076 TRC3(cmPkTfuDoaIndInfo)
13078 count = param->doaRpt.count;
13079 node = param->doaRpt.last;
13081 tfuDoaRpt = (TfuDoaRpt *)node->node;
13083 CMCHKPK(cmPkTfuDoaRpt, tfuDoaRpt, mBuf);
13084 cmLListDelFrm(¶m->doaRpt, &tfuDoaRpt->lnk);
13085 tfuDoaRpt->lnk.node = (PTR)NULLP;
13087 CMCHKPK(SPkU32, count, mBuf);
13088 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13094 /***********************************************************
13096 * Func : cmUnpkTfuDoaIndInfo
13099 * Desc : This structure conveys the DOA(Direction Of Arrival) indicator.
13100 * @details DOA is calculated by the physical layer, and this
13101 * information is provided to the scheduler.
13102 * This data structure clubs together the DOAs for all the UEs
13103 * calculated by PHY in this subframe.
13112 **********************************************************/
13114 PUBLIC S16 cmUnpkTfuDoaIndInfo
13116 TfuDoaIndInfo *param,
13121 PUBLIC S16 cmUnpkTfuDoaIndInfo(param, memCp, mBuf)
13122 TfuDoaIndInfo *param;
13128 U32 count, loopCnt;
13129 TfuDoaRpt *tfuDoaRpt;
13130 TRC3(cmUnpkTfuDoaIndInfo)
13132 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13133 cmLListInit(¶m->doaRpt);
13134 CMCHKUNPK(SUnpkU32, &count, mBuf);
13135 for (loopCnt=0; loopCnt<count; loopCnt++) {
13136 cmGetMem((Ptr)memCp, sizeof(*tfuDoaRpt), (Ptr *)&tfuDoaRpt);
13137 CMCHKUNPK(cmUnpkTfuDoaRpt, tfuDoaRpt, mBuf);
13138 cmLListAdd2Tail(¶m->doaRpt, &tfuDoaRpt->lnk);
13139 tfuDoaRpt->lnk.node = (PTR)tfuDoaRpt;
13145 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
13149 /***********************************************************
13151 * Func : cmPkTfuSrsRpt
13154 * Desc : This structure conveys the Uplink SRS indication of a UE.
13155 * @details Uplink SRS from each UE is received by the physical layer, and this
13156 * information is provided to the scheduler.
13165 **********************************************************/
13167 PUBLIC S16 cmPkTfuSrsRpt
13173 PUBLIC S16 cmPkTfuSrsRpt(param, mBuf)
13180 TRC3(cmPkTfuSrsRpt)
13182 CMCHKPK(SPkU8, param->wideCqi, mBuf);
13183 CMCHKPK(SPkU8, param->wideCqiPres, mBuf);
13184 for (i=TFU_MAX_UL_RB-1; i >= 0; i--) {
13185 CMCHKPK(SPkU8, param->snr[i], mBuf);
13187 CMCHKPK(SPkU8, param->rbStart, mBuf);
13188 CMCHKPK(SPkU8, param->numRbs, mBuf);
13189 CMCHKPK(SPkU16, param->ta, mBuf);
13190 CMCHKPK(SPkU16, param->dopEst, mBuf);
13191 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
13197 /***********************************************************
13199 * Func : cmUnpkTfuSrsRpt
13202 * Desc : This structure conveys the Uplink SRS indication of a UE.
13203 * @details Uplink SRS from each UE is received by the physical layer, and this
13204 * information is provided to the scheduler.
13213 **********************************************************/
13215 PUBLIC S16 cmUnpkTfuSrsRpt
13221 PUBLIC S16 cmUnpkTfuSrsRpt(param, mBuf)
13228 TRC3(cmUnpkTfuSrsRpt)
13230 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
13231 CMCHKUNPK(SUnpkU16, ¶m->dopEst, mBuf);
13232 CMCHKUNPK(SUnpkU16, ¶m->ta, mBuf);
13233 CMCHKUNPK(SUnpkU8, ¶m->numRbs, mBuf);
13234 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
13235 for (i=0; i<TFU_MAX_UL_RB; i++) {
13236 CMCHKUNPK(SUnpkU8, ¶m->snr[i], mBuf);
13238 CMCHKUNPK(SUnpkU8, ¶m->wideCqiPres, mBuf);
13239 CMCHKUNPK(SUnpkU8, ¶m->wideCqi, mBuf);
13245 /***********************************************************
13247 * Func : cmPkTfuSrsIndInfo
13250 * Desc : This structure conveys the Uplink SRS indication.
13251 * @details Uplink SRS is received by the physical layer, and this
13252 * information is provided to the scheduler.
13253 * This data structure clubs together the UL SRS indications of all the UEs
13263 **********************************************************/
13265 PUBLIC S16 cmPkTfuSrsIndInfo
13267 TfuSrsIndInfo *param,
13271 PUBLIC S16 cmPkTfuSrsIndInfo(param, mBuf)
13272 TfuSrsIndInfo *param;
13279 TfuSrsRpt *tfuSrsRpt;
13281 TRC3(cmPkTfuSrsIndInfo)
13283 count = param->srsRpt.count;
13284 node = param->srsRpt.last;
13286 tfuSrsRpt = (TfuSrsRpt *)node->node;
13288 CMCHKPK(cmPkTfuSrsRpt, tfuSrsRpt, mBuf);
13289 cmLListDelFrm(¶m->srsRpt, &tfuSrsRpt->lnk);
13290 tfuSrsRpt->lnk.node = (PTR)NULLP;
13292 CMCHKPK(SPkU32, count, mBuf);
13293 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
13294 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13300 /***********************************************************
13302 * Func : cmUnpkTfuSrsIndInfo
13305 * Desc : This structure conveys the Uplink SRS indication.
13306 * @details Uplink SRS is received by the physical layer, and this
13307 * information is provided to the scheduler.
13308 * This data structure clubs together the UL SRS indications of all the UEs
13318 **********************************************************/
13320 PUBLIC S16 cmUnpkTfuSrsIndInfo
13322 TfuSrsIndInfo *param,
13327 PUBLIC S16 cmUnpkTfuSrsIndInfo(param, memCp, mBuf)
13328 TfuSrsIndInfo *param;
13334 U32 count, loopCnt;
13335 TfuSrsRpt *tfuSrsRpt;
13337 TRC3(cmUnpkTfuSrsIndInfo)
13339 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13340 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
13341 cmLListInit(¶m->srsRpt);
13342 CMCHKUNPK(SUnpkU32, &count, mBuf);
13343 for (loopCnt=0; loopCnt<count; loopCnt++) {
13344 cmGetMem((Ptr)memCp, sizeof(*tfuSrsRpt), (Ptr *)&tfuSrsRpt);
13345 CMCHKUNPK(cmUnpkTfuSrsRpt, tfuSrsRpt, mBuf);
13346 cmLListAdd2Tail(¶m->srsRpt, &tfuSrsRpt->lnk);
13347 tfuSrsRpt->lnk.node = (PTR)tfuSrsRpt;
13354 /***********************************************************
13356 * Func : cmPkTfuRawCqiRpt
13359 * Desc : This structure contains the Raw CQI information i.e. the CQI report
13360 * as transmitted by the UE.
13361 * @details These bits shall be interpretted by MAC to derive the following
13374 **********************************************************/
13376 PUBLIC S16 cmPkTfuRawCqiRpt
13378 TfuRawCqiRpt *param,
13382 PUBLIC S16 cmPkTfuRawCqiRpt(param, mBuf)
13383 TfuRawCqiRpt *param;
13388 TRC3(cmPkTfuRawCqiRpt)
13390 CMCHKPK(SPkU32, param->uciPayload, mBuf);
13393 for (i=CM_LTE_MAX_CELLS-1; i >= 0; i--) {
13394 CMCHKPK(SPkU8, param->ri[i], mBuf);
13396 for (i=TFU_MAX_CQI_BYTES-1; i >= 0; i--) {
13397 CMCHKPK(SPkU8, param->cqiBits[i], mBuf);
13400 CMCHKPK(SPkU8, param->numBits, mBuf);
13401 CMCHKPK(cmPkLteRnti, param->crnti, mBuf);
13407 /***********************************************************
13409 * Func : cmUnpkTfuRawCqiRpt
13412 * Desc : This structure contains the Raw CQI information i.e. the CQI report
13413 * as transmitted by the UE.
13414 * @details These bits shall be interpretted by MAC to derive the following
13427 **********************************************************/
13429 PUBLIC S16 cmUnpkTfuRawCqiRpt
13431 TfuRawCqiRpt *param,
13435 PUBLIC S16 cmUnpkTfuRawCqiRpt(param, mBuf)
13436 TfuRawCqiRpt *param;
13441 TRC3(cmUnpkTfuRawCqiRpt)
13443 CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf);
13444 CMCHKUNPK(SUnpkU8, ¶m->numBits, mBuf);
13447 for (i=0; i<TFU_MAX_CQI_BYTES; i++) {
13448 CMCHKUNPK(SUnpkU8, ¶m->cqiBits[i], mBuf);
13450 for (i=0; i<CM_LTE_MAX_CELLS; i++) {
13451 CMCHKUNPK(SUnpkU8, ¶m->ri[i], mBuf);
13454 CMCHKUNPK(SUnpkU32, ¶m->uciPayload, mBuf);
13461 /***********************************************************
13463 * Func : cmPkTfuRawCqiIndInfo
13466 * Desc : This structure contains the Raw CQI reports received for the
13467 * transmitting UEs in a single subframe.
13468 * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
13469 * interpretation is upto the MAC layer.
13478 **********************************************************/
13480 PUBLIC S16 cmPkTfuRawCqiIndInfo
13482 TfuRawCqiIndInfo *param,
13486 PUBLIC S16 cmPkTfuRawCqiIndInfo(param, mBuf)
13487 TfuRawCqiIndInfo *param;
13493 TfuRawCqiRpt *tfuRawCqiRpt;
13496 TRC3(cmPkTfuRawCqiIndInfo)
13498 count = param->rawCqiRpt.count;
13499 node = param->rawCqiRpt.last;
13501 tfuRawCqiRpt = (TfuRawCqiRpt *)node->node;
13503 CMCHKPK(cmPkTfuRawCqiRpt, tfuRawCqiRpt, mBuf);
13504 cmLListDelFrm(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk);
13505 tfuRawCqiRpt->lnk.node = (PTR)NULLP;
13507 CMCHKPK(SPkU32, count, mBuf);
13508 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
13509 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13515 /***********************************************************
13517 * Func : cmUnpkTfuRawCqiIndInfo
13520 * Desc : This structure contains the Raw CQI reports received for the
13521 * transmitting UEs in a single subframe.
13522 * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
13523 * interpretation is upto the MAC layer.
13532 **********************************************************/
13534 PUBLIC S16 cmUnpkTfuRawCqiIndInfo
13536 TfuRawCqiIndInfo *param,
13541 PUBLIC S16 cmUnpkTfuRawCqiIndInfo(param, memCp, mBuf)
13542 TfuRawCqiIndInfo *param;
13548 U32 count, loopCnt;
13549 TfuRawCqiRpt *tfuRawCqiRpt;
13551 TRC3(cmUnpkTfuRawCqiIndInfo)
13553 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13554 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
13555 cmLListInit(¶m->rawCqiRpt);
13556 CMCHKUNPK(SUnpkU32, &count, mBuf);
13557 for (loopCnt=0; loopCnt<count; loopCnt++) {
13558 cmGetMem((Ptr)memCp, sizeof(*tfuRawCqiRpt), (Ptr *)&tfuRawCqiRpt);
13559 CMCHKUNPK(cmUnpkTfuRawCqiRpt, tfuRawCqiRpt, mBuf);
13560 cmLListAdd2Tail(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk);
13561 tfuRawCqiRpt->lnk.node = (PTR)tfuRawCqiRpt;
13572 /***********************************************************
13574 * Func : cmPkTfuUePucchHqRecpInfo
13577 * Desc : This structure is sent from scheduler to PHY in order to request the
13578 * reception of harq information on PUCCH.
13587 **********************************************************/
13589 PUBLIC S16 cmPkTfuUePucchHqRecpInfo
13591 TfuUePucchHqRecpInfo *param,
13595 PUBLIC S16 cmPkTfuUePucchHqRecpInfo(param, mBuf)
13596 TfuUePucchHqRecpInfo *param;
13602 TRC3(cmPkTfuUePucchHqRecpInfo)
13604 CMCHKPK(SPkU8, param->a, mBuf);
13605 for (i=TFU_MAX_HQ_RES-1; i >= 0; i--) {
13606 CMCHKPK(SPkU16, param->hqRes[i], mBuf);
13608 CMCHKPK(SPkU8, param->pucchResCnt, mBuf);
13609 CMCHKPK(SPkU8, param->hqSz, mBuf);
13610 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
13616 /***********************************************************
13618 * Func : cmUnpkTfuUePucchHqRecpInfo
13621 * Desc : This structure is sent from scheduler to PHY in order to request the
13622 * reception of harq information on PUCCH.
13631 **********************************************************/
13633 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo
13635 TfuUePucchHqRecpInfo *param,
13639 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf)
13640 TfuUePucchHqRecpInfo *param;
13646 TRC3(cmUnpkTfuUePucchHqRecpInfo)
13648 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
13649 CMCHKUNPK(SUnpkU8, ¶m->hqSz, mBuf);
13650 CMCHKUNPK(SUnpkU8, ¶m->pucchResCnt, mBuf);
13651 for (i=0; i<TFU_MAX_HQ_RES; i++) {
13652 CMCHKUNPK(SUnpkU16, ¶m->hqRes[i], mBuf);
13654 CMCHKUNPK(SUnpkU8, ¶m->a, mBuf);
13663 #ifndef TFU_TDD /* else of TFU_TDD */
13665 #ifndef TFU_TDD /* else of TFU_TDD */
13668 /***********************************************************
13670 * Func : cmPkTfuUePucchHqRecpInfo
13673 * Desc : This structure is sent from scheduler to PHY in order to request the
13674 * reception of harq information on PUCCH.
13683 **********************************************************/
13685 PUBLIC S16 cmPkTfuUePucchHqRecpInfo
13687 TfuUePucchHqRecpInfo *param,
13691 PUBLIC S16 cmPkTfuUePucchHqRecpInfo(param, mBuf)
13692 TfuUePucchHqRecpInfo *param;
13697 TRC3(cmPkTfuUePucchHqRecpInfo)
13700 for (idx=(TFU_MAX_HQ_RES-1); idx >= 0; idx--) {
13701 CMCHKPK(SPkU16, param->hqRes[idx], mBuf);
13704 CMCHKPK(SPkU16, param->hqRes[0], mBuf);
13706 CMCHKPK(SPkU8, param->pucchResCnt, mBuf);
13707 CMCHKPK(SPkU8, param->hqSz, mBuf);
13708 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
13715 /***********************************************************
13717 * Func : cmUnpkTfuUePucchHqRecpInfo
13720 * Desc : This structure is sent from scheduler to PHY in order to request the
13721 * reception of harq information on PUCCH.
13730 **********************************************************/
13732 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo
13734 TfuUePucchHqRecpInfo *param,
13738 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf)
13739 TfuUePucchHqRecpInfo *param;
13743 TRC3(cmUnpkTfuUePucchHqRecpInfo)
13745 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
13746 CMCHKUNPK(SUnpkU8, ¶m->hqSz, mBuf);
13747 CMCHKUNPK(SUnpkU8, ¶m->pucchResCnt, mBuf);
13750 for (idx=0; idx<TFU_MAX_HQ_RES; idx++) {
13751 CMCHKUNPK(SUnpkU16, ¶m->hqRes[idx], mBuf);
13754 CMCHKUNPK(SUnpkU16, ¶m->hqRes[0], mBuf);
13766 /***********************************************************
13768 * Func : cmPkTfuUePucchSrRecpInfo
13771 * Desc : This structure is sent from scheduler to PHY in order to request the
13772 * reception of SR information on PUCCH.
13781 **********************************************************/
13783 PUBLIC S16 cmPkTfuUePucchSrRecpInfo
13785 TfuUePucchSrRecpInfo *param,
13789 PUBLIC S16 cmPkTfuUePucchSrRecpInfo(param, mBuf)
13790 TfuUePucchSrRecpInfo *param;
13795 TRC3(cmPkTfuUePucchSrRecpInfo)
13797 CMCHKPK(SPkU16, param->n1PucchIdx, mBuf);
13803 /***********************************************************
13805 * Func : cmUnpkTfuUePucchSrRecpInfo
13808 * Desc : This structure is sent from scheduler to PHY in order to request the
13809 * reception of SR information on PUCCH.
13818 **********************************************************/
13820 PUBLIC S16 cmUnpkTfuUePucchSrRecpInfo
13822 TfuUePucchSrRecpInfo *param,
13826 PUBLIC S16 cmUnpkTfuUePucchSrRecpInfo(param, mBuf)
13827 TfuUePucchSrRecpInfo *param;
13832 TRC3(cmUnpkTfuUePucchSrRecpInfo)
13834 CMCHKUNPK(SUnpkU16, ¶m->n1PucchIdx, mBuf);
13840 /***********************************************************
13842 * Func : cmPkTfuUePucchCqiRecpInfo
13845 * Desc : This structure is sent from scheduler to PHY in order to request the
13846 * reception of CQI information on PUCCH.
13855 **********************************************************/
13857 PUBLIC S16 cmPkTfuUePucchCqiRecpInfo
13859 TfuUePucchCqiRecpInfo *param,
13863 PUBLIC S16 cmPkTfuUePucchCqiRecpInfo(param, mBuf)
13864 TfuUePucchCqiRecpInfo *param;
13869 TRC3(cmPkTfuUePucchCqiRecpInfo)
13871 CMCHKPK(SPkU8, param->cqiPmiSz, mBuf);
13872 CMCHKPK(SPkU16, param->n2PucchIdx, mBuf);
13878 /***********************************************************
13880 * Func : cmUnpkTfuUePucchCqiRecpInfo
13883 * Desc : This structure is sent from scheduler to PHY in order to request the
13884 * reception of CQI information on PUCCH.
13893 **********************************************************/
13895 PUBLIC S16 cmUnpkTfuUePucchCqiRecpInfo
13897 TfuUePucchCqiRecpInfo *param,
13901 PUBLIC S16 cmUnpkTfuUePucchCqiRecpInfo(param, mBuf)
13902 TfuUePucchCqiRecpInfo *param;
13907 TRC3(cmUnpkTfuUePucchCqiRecpInfo)
13909 CMCHKUNPK(SUnpkU16, ¶m->n2PucchIdx, mBuf);
13910 CMCHKUNPK(SUnpkU8, ¶m->cqiPmiSz, mBuf);
13916 /***********************************************************
13918 * Func : cmPkTfuUePucchSrsRecpInfo
13921 * Desc : This structure is sent from scheduler to PHY in order to request the
13922 * reception of SRS information on PUCCH.
13931 **********************************************************/
13933 PUBLIC S16 cmPkTfuUePucchSrsRecpInfo
13935 TfuUePucchSrsRecpInfo *param,
13939 PUBLIC S16 cmPkTfuUePucchSrsRecpInfo(param, mBuf)
13940 TfuUePucchSrsRecpInfo *param;
13945 TRC3(cmPkTfuUePucchSrsRecpInfo)
13947 CMCHKPK(SPkU32, param->srsCyclicShft, mBuf);
13948 CMCHKPK(SPkU16, param->srsCfgIdx, mBuf);
13949 CMCHKPK(SPkU8, param->transComb, mBuf);
13950 CMCHKPK(SPkU32, param->srsHopBw, mBuf);
13951 CMCHKPK(SPkU8, param->nRrc, mBuf);
13952 CMCHKPK(SPkU32, param->srsBw, mBuf);
13958 PUBLIC S16 cmPkTfuUePucchUciRecpInfo
13960 TfuUePucchUciRecpInfo *param,
13964 PUBLIC S16 cmPkTfuUePucchUciRecpInfo(param, mBuf)
13965 TfuUePucchUciRecpInfo *param;
13970 TRC3(cmPkTfuUePucchUciRecpInfo)
13972 CMCHKPK(SPkU8, param->SCID, mBuf);
13973 CMCHKPK(SPkU8, param->pucchIndex, mBuf);
13974 CMCHKPK(SPkU8, param->numBits, mBuf);
13980 /***********************************************************
13982 * Func : cmUnpkTfuUePucchSrsRecpInfo
13985 * Desc : This structure is sent from scheduler to PHY in order to request the
13986 * reception of SRS information on PUCCH.
13995 **********************************************************/
13997 PUBLIC S16 cmUnpkTfuUePucchSrsRecpInfo
13999 TfuUePucchSrsRecpInfo *param,
14003 PUBLIC S16 cmUnpkTfuUePucchSrsRecpInfo(param, mBuf)
14004 TfuUePucchSrsRecpInfo *param;
14009 TRC3(cmUnpkTfuUePucchSrsRecpInfo)
14011 CMCHKUNPK(SUnpkU32, (U32 *)¶m->srsBw, mBuf);
14012 CMCHKUNPK(SUnpkU8, ¶m->nRrc, mBuf);
14013 CMCHKUNPK(SUnpkU32, (U32 *)¶m->srsHopBw, mBuf);
14014 CMCHKUNPK(SUnpkU8, ¶m->transComb, mBuf);
14015 CMCHKUNPK(SUnpkU16, ¶m->srsCfgIdx, mBuf);
14016 CMCHKUNPK(SUnpkU32, (U32 *)¶m->srsCyclicShft, mBuf);
14021 /***********************************************************
14023 * Func : cmPkTfuUePucchBsiBriRecpInfo
14026 * Desc : This structure is sent from scheduler to PHY in order to request the
14027 * reception of BSI_BRI information on PUCCH.
14036 **********************************************************/
14038 PUBLIC S16 cmPkTfuUePucchBsiBriRecpInfo
14040 TfuUePucchBsiBriRecpInfo *param,
14044 PUBLIC S16 cmPkTfuUePucchBsiBriRecpInfo(param, mBuf)
14045 TfuUePucchBsiBriRecpInfo *param;
14050 TRC3(cmPkTfuUePucchBsiBriRecpInfo)
14052 CMCHKPK(SPkU8, param->briRpt, mBuf);
14053 CMCHKPK(SPkU8, param->bsiRpt, mBuf);
14054 CMCHKPK(SPkU8, param->SCID, mBuf);
14055 CMCHKPK(SPkU8, param->pucchIndex, mBuf);
14056 CMCHKPK(SPkU8, param->puschFlag, mBuf);
14060 /***********************************************************
14062 * Func : cmUnpkTfuUePucchBsiBriRecpInfo
14065 * Desc : This structure is sent from scheduler to PHY in order to request the
14066 * reception of BSI_BRI information on PUCCH.
14075 **********************************************************/
14077 PUBLIC S16 cmUnpkTfuUePucchBsiBriRecpInfo
14079 TfuUePucchBsiBriRecpInfo *param,
14083 PUBLIC S16 cmUnpkTfuUePucchBsiBriRecpInfo(param, mBuf)
14084 TfuUePucchBsiBriRecpInfo *param;
14089 TRC3(cmUnpkTfuUePucchBsiBriRecpInfo)
14091 CMCHKUNPK(SUnpkU8, ¶m->puschFlag, mBuf);
14092 CMCHKUNPK(SUnpkU8, ¶m->pucchIndex, mBuf);
14093 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
14094 CMCHKUNPK(SUnpkU8, ¶m->bsiRpt, mBuf);
14095 CMCHKUNPK(SUnpkU8, ¶m->briRpt, mBuf);
14102 PUBLIC S16 cmUnpkTfuUePucchUciRecpInfo
14104 TfuUePucchUciRecpInfo *param,
14108 PUBLIC S16 cmUnpkTfuUePucchUciRecpInfo(param, mBuf)
14109 TfuUePucchUciRecpInfo *param;
14114 TRC3(cmUnpkTfuUePucchUciRecpInfo)
14116 CMCHKUNPK(SUnpkU8, ¶m->numBits, mBuf);
14117 CMCHKUNPK(SUnpkU8, ¶m->pucchIndex, mBuf);
14118 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
14125 /***********************************************************
14127 * Func : cmPkTfuUePucchRecpReq
14130 * Desc : This structure is sent from scheduler to PHY in order to request the
14131 * reception of UCI on PUCCH. This may contain the following:
14151 **********************************************************/
14153 PUBLIC S16 cmPkTfuUePucchRecpReq
14155 TfuUePucchRecpReq *param,
14159 PUBLIC S16 cmPkTfuUePucchRecpReq(param, mBuf)
14160 TfuUePucchRecpReq *param;
14165 TRC3(cmPkTfuUePucchRecpReq)
14168 CMCHKPK(cmPkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf);
14169 CMCHKPK(cmPkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf);
14170 #endif /* TFU_5GTF */
14171 CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14172 CMCHKPK(cmPkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf);
14173 CMCHKPK(cmPkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf);
14174 CMCHKPK(cmPkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf);
14175 CMCHKPK(SPkU32, param->uciInfo, mBuf);
14181 /***********************************************************
14183 * Func : cmUnpkTfuUePucchRecpReq
14186 * Desc : This structure is sent from scheduler to PHY in order to request the
14187 * reception of UCI on PUCCH. This may contain the following:
14207 **********************************************************/
14209 PUBLIC S16 cmUnpkTfuUePucchRecpReq
14211 TfuUePucchRecpReq *param,
14215 PUBLIC S16 cmUnpkTfuUePucchRecpReq(param, mBuf)
14216 TfuUePucchRecpReq *param;
14221 TRC3(cmUnpkTfuUePucchRecpReq)
14223 CMCHKUNPK(SUnpkU32, (U32 *)¶m->uciInfo, mBuf);
14224 CMCHKUNPK(cmUnpkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf);
14225 CMCHKUNPK(cmUnpkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf);
14226 CMCHKUNPK(cmUnpkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf);
14227 CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14229 CMCHKUNPK(cmUnpkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf);
14230 CMCHKUNPK(cmUnpkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf);
14231 #endif /* TFU_5GTF */
14237 /***********************************************************
14239 * Func : cmPkTfuUeUlSchRecpInfo
14242 * Desc : This structure is sent from scheduler to PHY in order to request the
14243 * reception of UEs data on ULSCH.
14252 **********************************************************/
14254 PUBLIC S16 cmPkTfuUeUlSchRecpInfo
14256 TfuUeUlSchRecpInfo *param,
14260 PUBLIC S16 cmPkTfuUeUlSchRecpInfo(param, mBuf)
14261 TfuUeUlSchRecpInfo *param;
14266 TRC3(cmPkTfuUeUlSchRecpInfo)
14268 CMCHKPK(SPkU8, param->beamIndex, mBuf);
14269 CMCHKPK(SPkU8, param->uciWoTBFlag, mBuf);
14270 CMCHKPK(SPkU8, param->PMI, mBuf);
14271 CMCHKPK(SPkU8, param->SCID, mBuf);
14272 CMCHKPK(SPkU8, param->nAntPortLayer, mBuf);
14273 CMCHKPK(SPkU8, param->xPUSCHRange, mBuf);
14274 CMCHKPK(SPkU8, param->numRbg, mBuf);
14275 CMCHKPK(SPkU8, param->rbgStart, mBuf);
14277 CMCHKPK(SPkU8, param->mcs, mBuf);
14278 CMCHKPK(SPkU8, param->nSrs, mBuf);
14279 CMCHKPK(SPkU8, param->crntTxNb, mBuf);
14280 CMCHKPK(SPkU8, param->txMode, mBuf);
14281 CMCHKPK(SPkU8, param->harqProcId, mBuf);
14282 CMCHKPK(SPkU8, param->rv, mBuf);
14283 CMCHKPK(SPkU8, param->ndi, mBuf);
14284 CMCHKPK(SPkU8, param->isRtx, mBuf);
14285 CMCHKPK(SPkU8, param->hoppingBits, mBuf);
14286 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
14287 CMCHKPK(SPkU8, param->nDmrs, mBuf);
14288 CMCHKPK(SPkU32, param->modType, mBuf);
14289 CMCHKPK(SPkU8, param->numRb, mBuf);
14290 CMCHKPK(SPkU8, param->rbStart, mBuf);
14291 CMCHKPK(SPkU16, param->size, mBuf);
14298 /***********************************************************
14300 * Func : cmUnpkTfuUeUlSchRecpInfo
14303 * Desc : This structure is sent from scheduler to PHY in order to request the
14304 * reception of UEs data on ULSCH.
14313 **********************************************************/
14315 PUBLIC S16 cmUnpkTfuUeUlSchRecpInfo
14317 TfuUeUlSchRecpInfo *param,
14321 PUBLIC S16 cmUnpkTfuUeUlSchRecpInfo(param, mBuf)
14322 TfuUeUlSchRecpInfo *param;
14327 TRC3(cmUnpkTfuUeUlSchRecpInfo)
14329 CMCHKUNPK(SUnpkU16, ¶m->size, mBuf);
14330 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
14331 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
14332 CMCHKUNPK(SUnpkU32, (U32 *)¶m->modType, mBuf);
14333 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
14334 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
14335 CMCHKUNPK(SUnpkU8, ¶m->hoppingBits, mBuf);
14336 CMCHKUNPK(SUnpkU8, ¶m->isRtx, mBuf);
14337 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
14338 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
14339 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
14340 CMCHKUNPK(SUnpkU8, ¶m->txMode, mBuf);
14341 CMCHKUNPK(SUnpkU8, ¶m->crntTxNb, mBuf);
14342 CMCHKUNPK(SUnpkU8, ¶m->nSrs, mBuf);
14343 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
14345 CMCHKUNPK(SUnpkU8, ¶m->rbgStart, mBuf);
14346 CMCHKUNPK(SUnpkU8, ¶m->numRbg, mBuf);
14347 CMCHKUNPK(SUnpkU8, ¶m->xPUSCHRange, mBuf);
14348 CMCHKUNPK(SUnpkU8, ¶m->nAntPortLayer, mBuf);
14349 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
14350 CMCHKUNPK(SUnpkU8, ¶m->PMI, mBuf);
14351 CMCHKUNPK(SUnpkU8, ¶m->uciWoTBFlag, mBuf);
14352 CMCHKUNPK(SUnpkU8, ¶m->beamIndex, mBuf);
14359 /***********************************************************
14361 * Func : cmPkTfuUePuschCqiRecpInfo
14364 * Desc : This structure is sent from scheduler to PHY in order to request the
14365 * reception of CQI_RI info on PUSCH.
14374 **********************************************************/
14376 PUBLIC S16 cmPkTfuUePuschCqiRecpInfo
14378 TfuUePuschCqiRecpInfo *param,
14382 PUBLIC S16 cmPkTfuUePuschCqiRecpInfo(param, mBuf)
14383 TfuUePuschCqiRecpInfo *param;
14389 TRC3(cmPkTfuUePuschCqiRecpInfo)
14391 CMCHKPK(SPkU8, param->riBetaOff, mBuf);
14392 CMCHKPK(SPkU8, param->cqiBetaOff, mBuf);
14393 for (idx = 0; idx < param->cCNum; idx++)
14395 CMCHKPK(cmPkTknU8, ¶m->riSz[idx], mBuf);
14396 CMCHKPK(SPkU8, param->cqiPmiSzRn1[idx], mBuf);
14397 CMCHKPK(SPkU8, param->cqiPmiSzR1[idx], mBuf);
14399 CMCHKPK(SPkU8, param->cCNum, mBuf);
14400 CMCHKPK(SPkU8, param->reportType, mBuf);
14406 /***********************************************************
14408 * Func : cmUnpkTfuUePuschCqiRecpInfo
14411 * Desc : This structure is sent from scheduler to PHY in order to request the
14412 * reception of CQI_RI info on PUSCH.
14421 **********************************************************/
14423 PUBLIC S16 cmUnpkTfuUePuschCqiRecpInfo
14425 TfuUePuschCqiRecpInfo *param,
14429 PUBLIC S16 cmUnpkTfuUePuschCqiRecpInfo(param, mBuf)
14430 TfuUePuschCqiRecpInfo *param;
14436 TRC3(cmUnpkTfuUePuschCqiRecpInfo)
14438 CMCHKUNPK(SUnpkU8, ¶m->reportType, mBuf);
14439 CMCHKUNPK(SUnpkU8, ¶m->cCNum, mBuf);
14440 for (idx = param->cCNum; idx > 0; idx--)
14442 CMCHKUNPK(SUnpkU8, ¶m->cqiPmiSzR1[idx-1], mBuf);
14443 CMCHKUNPK(SUnpkU8, ¶m->cqiPmiSzRn1[idx-1], mBuf);
14444 CMCHKUNPK(cmUnpkTknU8, ¶m->riSz[idx-1], mBuf);
14446 CMCHKUNPK(SUnpkU8, ¶m->cqiBetaOff, mBuf);
14447 CMCHKUNPK(SUnpkU8, ¶m->riBetaOff, mBuf);
14453 /***********************************************************
14455 * Func : cmPkTfuUePuschHqRecpInfo
14458 * Desc : This structure is sent from scheduler to PHY in order to request the
14459 * reception of Harq info on PUSCH.
14468 **********************************************************/
14470 PUBLIC S16 cmPkTfuUePuschHqRecpInfo
14472 TfuUePuschHqRecpInfo *param,
14476 PUBLIC S16 cmPkTfuUePuschHqRecpInfo(param, mBuf)
14477 TfuUePuschHqRecpInfo *param;
14482 TRC3(cmPkTfuUePuschHqRecpInfo)
14486 CMCHKPK(SPkU8, param->ulDai, mBuf);
14487 CMCHKPK(SPkU8, param->nBundled, mBuf);
14488 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
14490 CMCHKPK(SPkU8, param->hqBetaOff, mBuf);
14491 CMCHKPK(SPkU8, param->hqSz, mBuf);
14497 /***********************************************************
14499 * Func : cmUnpkTfuUePuschHqRecpInfo
14502 * Desc : This structure is sent from scheduler to PHY in order to request the
14503 * reception of Harq info on PUSCH.
14512 **********************************************************/
14514 PUBLIC S16 cmUnpkTfuUePuschHqRecpInfo
14516 TfuUePuschHqRecpInfo *param,
14520 PUBLIC S16 cmUnpkTfuUePuschHqRecpInfo(param, mBuf)
14521 TfuUePuschHqRecpInfo *param;
14526 TRC3(cmUnpkTfuUePuschHqRecpInfo)
14528 CMCHKUNPK(SUnpkU8, ¶m->hqSz, mBuf);
14529 CMCHKUNPK(SUnpkU8, ¶m->hqBetaOff, mBuf);
14532 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
14533 CMCHKUNPK(SUnpkU8, ¶m->nBundled, mBuf);
14534 CMCHKUNPK(SUnpkU8, ¶m->ulDai, mBuf);
14541 /***********************************************************
14543 * Func : cmPkTfuUePuschRecpReq
14546 * Desc : This structure is sent from scheduler to PHY in order to request the
14547 * reception of UEs data on PUSCH. This may contain the following:
14551 * -# Data + HARQ + SRS
14553 * -# Data + CQI/RI + SRS
14554 * -# Data + CQI/RI + HARQ
14555 * -# Data + CQI/RI + HARQ + SRS
14564 **********************************************************/
14566 PUBLIC S16 cmPkTfuUePuschRecpReq
14568 TfuUePuschRecpReq *param,
14572 PUBLIC S16 cmPkTfuUePuschRecpReq(param, mBuf)
14573 TfuUePuschRecpReq *param;
14578 TRC3(cmPkTfuUePuschRecpReq)
14580 CMCHKPK(cmPkTknU8, ¶m->initialNumRbs, mBuf);
14581 CMCHKPK(cmPkTknU8, ¶m->initialNSrs, mBuf);
14582 CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14583 CMCHKPK(cmPkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf);
14584 CMCHKPK(cmPkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf);
14585 CMCHKPK(cmPkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf);
14586 CMCHKPK(SPkU32, param->rcpInfo, mBuf);
14592 /***********************************************************
14594 * Func : cmUnpkTfuUePuschRecpReq
14597 * Desc : This structure is sent from scheduler to PHY in order to request the
14598 * reception of UEs data on PUSCH. This may contain the following:
14602 * -# Data + HARQ + SRS
14604 * -# Data + CQI/RI + SRS
14605 * -# Data + CQI/RI + HARQ
14606 * -# Data + CQI/RI + HARQ + SRS
14615 **********************************************************/
14617 PUBLIC S16 cmUnpkTfuUePuschRecpReq
14619 TfuUePuschRecpReq *param,
14623 PUBLIC S16 cmUnpkTfuUePuschRecpReq(param, mBuf)
14624 TfuUePuschRecpReq *param;
14629 TRC3(cmUnpkTfuUePuschRecpReq)
14631 CMCHKUNPK(SUnpkU32, (U32 *)¶m->rcpInfo, mBuf);
14632 CMCHKUNPK(cmUnpkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf);
14633 CMCHKUNPK(cmUnpkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf);
14634 CMCHKUNPK(cmUnpkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf);
14635 CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14636 CMCHKUNPK(cmUnpkTknU8, ¶m->initialNSrs, mBuf);
14637 CMCHKUNPK(cmUnpkTknU8, ¶m->initialNumRbs, mBuf);
14643 /***********************************************************
14645 * Func : cmPkTfuUeRecpReqInfo
14648 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14649 * data. This contains information needed by PHY to decode the data sent by the
14659 **********************************************************/
14661 PUBLIC S16 cmPkTfuUeRecpReqInfo
14663 TfuUeRecpReqInfo *param,
14667 PUBLIC S16 cmPkTfuUeRecpReqInfo(param, mBuf)
14668 TfuUeRecpReqInfo *param;
14673 TRC3(cmPkTfuUeRecpReqInfo)
14675 switch(param->type) {
14676 case TFU_RECP_REQ_PUSCH:
14677 CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14679 case TFU_RECP_REQ_PUCCH:
14680 CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14685 CMCHKPK(SPkU32, param->type, mBuf);
14687 CMCHKPK(SPkU8, param->groupId, mBuf);
14688 #endif /* TFU_5GTF */
14689 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
14695 /***********************************************************
14697 * Func : cmUnpkTfuUeRecpReqInfo
14700 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14701 * data. This contains information needed by PHY to decode the data sent by the
14711 **********************************************************/
14713 PUBLIC S16 cmUnpkTfuUeRecpReqInfo
14715 TfuUeRecpReqInfo *param,
14719 PUBLIC S16 cmUnpkTfuUeRecpReqInfo(param, mBuf)
14720 TfuUeRecpReqInfo *param;
14725 TRC3(cmUnpkTfuUeRecpReqInfo)
14727 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
14729 CMCHKUNPK(SUnpkU8, ¶m->groupId, mBuf);
14730 #endif /* TFU_5GTF */
14731 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
14732 switch(param->type) {
14733 case TFU_RECP_REQ_PUCCH:
14734 CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14736 case TFU_RECP_REQ_PUSCH:
14737 CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14744 #endif /* TFU_UPGRADE */
14745 #ifndef TFU_UPGRADE /* TFU_UPGRADE */
14746 /***********************************************************
14748 * Func : cmPkTfuUePucchRecpReq
14751 * Desc : This structure is sent from Scheduler to PHY in order to request the
14752 * reception of an UEs data on PUCCH. This may contain the following:
14754 * -# Scheduling Request (SR)
14755 * -# HARQ-ACK and SR
14757 * -# CQI and HARQ-ACK
14766 **********************************************************/
14768 PUBLIC S16 cmPkTfuUePucchRecpReq
14770 TfuUePucchRecpReq *param,
14774 PUBLIC S16 cmPkTfuUePucchRecpReq(param, mBuf)
14775 TfuUePucchRecpReq *param;
14783 TRC3(cmPkTfuUePucchRecpReq)
14787 for (i=TFU_MAX_M-1; i >= 0; i--) {
14788 CMCHKPK(SPkU8, param->p[i], mBuf);
14790 for (i=TFU_MAX_M-1; i >= 0; i--) {
14791 CMCHKPK(SPkU8, param->m[i], mBuf);
14793 CMCHKPK(SPkU8, param->M, mBuf);
14794 CMCHKPK(SPkU8, param->multCnt, mBuf);
14797 CMCHKPK(SPkU32, param->type, mBuf);
14798 switch(param->hqType) {
14799 case TFU_HQ_RECP_REQ_N1PUCCH:
14800 CMCHKPK(SPkU16, param->t.n1Pucch, mBuf);
14804 case TFU_HQ_RECP_REQ_NORMAL:
14805 for (i=TFU_MAX_M-1; i >= 0; i--) {
14806 CMCHKPK(SPkU16, param->t.nCce[i], mBuf);
14813 case TFU_HQ_RECP_REQ_NORMAL:
14814 CMCHKPK(SPkU16, param->t.nCce, mBuf);
14821 CMCHKPK(SPkU32, param->hqType, mBuf);
14827 /***********************************************************
14829 * Func : cmUnpkTfuUePucchRecpReq
14832 * Desc : This structure is sent from Scheduler to PHY in order to request the
14833 * reception of an UEs data on PUCCH. This may contain the following:
14835 * -# Scheduling Request (SR)
14836 * -# HARQ-ACK and SR
14838 * -# CQI and HARQ-ACK
14847 **********************************************************/
14849 PUBLIC S16 cmUnpkTfuUePucchRecpReq
14851 TfuUePucchRecpReq *param,
14855 PUBLIC S16 cmUnpkTfuUePucchRecpReq(param, mBuf)
14856 TfuUePucchRecpReq *param;
14864 TRC3(cmUnpkTfuUePucchRecpReq)
14866 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqType, mBuf);
14867 switch(param->hqType) {
14870 case TFU_HQ_RECP_REQ_NORMAL:
14871 CMCHKUNPK(SUnpkU16, ¶m->t.nCce, mBuf);
14877 case TFU_HQ_RECP_REQ_NORMAL:
14878 for (i=0; i<TFU_MAX_M; i++) {
14879 CMCHKUNPK(SUnpkU16, ¶m->t.nCce[i], mBuf);
14884 case TFU_HQ_RECP_REQ_N1PUCCH:
14885 CMCHKUNPK(SUnpkU16, ¶m->t.n1Pucch, mBuf);
14890 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
14893 CMCHKUNPK(SUnpkU8, ¶m->multCnt, mBuf);
14894 CMCHKUNPK(SUnpkU8, ¶m->M, mBuf);
14895 for (i=0; i<TFU_MAX_M; i++) {
14896 CMCHKUNPK(SUnpkU8, ¶m->m[i], mBuf);
14898 for (i=0; i<TFU_MAX_M; i++) {
14899 CMCHKUNPK(SUnpkU8, ¶m->p[i], mBuf);
14908 /***********************************************************
14910 * Func : cmPkTfuUeMsg3RecpReq
14913 * Desc : This structure is sent from scheduler to PHY in order to request the
14914 * reception of UEs data sent as MSG3 for Random access.
14923 **********************************************************/
14925 PUBLIC S16 cmPkTfuUeMsg3RecpReq
14927 TfuUeMsg3RecpReq *param,
14931 PUBLIC S16 cmPkTfuUeMsg3RecpReq(param, mBuf)
14932 TfuUeMsg3RecpReq *param;
14937 TRC3(cmPkTfuUeMsg3RecpReq)
14939 CMCHKPK(SPkU32, param->modType, mBuf);
14940 CMCHKPK(SPkU16, param->size, mBuf);
14941 /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
14942 CMCHKPK(SPkU8, param->nDmrs, mBuf);
14943 CMCHKPK(SPkU8, param->rv, mBuf);
14944 CMCHKPK(SPkU8, param->ndi, mBuf);
14945 CMCHKPK(SPkU8, param->harqProcId, mBuf);
14946 CMCHKPK(SPkU8, param->isRtx, mBuf);
14947 CMCHKPK(SPkU8, param->ulDelay, mBuf);
14948 CMCHKPK(SPkU8, param->expCqi, mBuf);
14949 CMCHKPK(SPkU8, param->mcs, mBuf);
14950 CMCHKPK(SPkU8, param->numRb, mBuf);
14951 CMCHKPK(SPkU8, param->rbStart, mBuf);
14952 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
14958 /***********************************************************
14960 * Func : cmUnpkTfuUeMsg3RecpReq
14963 * Desc : This structure is sent from scheduler to PHY in order to request the
14964 * reception of UEs data sent as MSG3 for Random access.
14973 **********************************************************/
14975 PUBLIC S16 cmUnpkTfuUeMsg3RecpReq
14977 TfuUeMsg3RecpReq *param,
14981 PUBLIC S16 cmUnpkTfuUeMsg3RecpReq(param, mBuf)
14982 TfuUeMsg3RecpReq *param;
14987 TRC3(cmUnpkTfuUeMsg3RecpReq)
14989 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
14990 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
14991 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
14992 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
14993 CMCHKUNPK(SUnpkU8, ¶m->expCqi, mBuf);
14994 CMCHKUNPK(SUnpkU8, ¶m->ulDelay, mBuf);
14995 CMCHKUNPK(SUnpkU8, ¶m->isRtx, mBuf);
14996 /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
14997 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
14998 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
14999 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
15000 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
15001 CMCHKUNPK(SUnpkU16, ¶m->size, mBuf);
15002 CMCHKUNPK(SUnpkU32, (U32 *)¶m->modType, mBuf);
15008 /***********************************************************
15010 * Func : cmPkTfuUePuschRecpReq
15013 * Desc : This structure is sent from scheduler to PHY in order to request the
15014 * reception of UEs data on PUSCH. This may contain the following:
15016 * -# Data + CQI and RI
15017 * -# Data + CQI and HARQ
15026 **********************************************************/
15028 PUBLIC S16 cmPkTfuUePuschRecpReq
15030 TfuUePuschRecpReq *param,
15034 PUBLIC S16 cmPkTfuUePuschRecpReq(param, mBuf)
15035 TfuUePuschRecpReq *param;
15040 TRC3(cmPkTfuUePuschRecpReq)
15042 CMCHKPK(SPkU32, param->modType, mBuf);
15043 CMCHKPK(SPkU16, param->size, mBuf);
15044 CMCHKPK(SPkU32, param->mode, mBuf);
15045 CMCHKPK(SPkU8, param->expHarq, mBuf);
15046 CMCHKPK(SPkU8, param->expCqi, mBuf);
15047 CMCHKPK(SPkU8, param->nDmrs, mBuf);
15048 CMCHKPK(SPkU8, param->rv, mBuf);
15049 CMCHKPK(SPkU8, param->isRtx, mBuf);
15050 CMCHKPK(SPkU8, param->ndi, mBuf);
15051 CMCHKPK(SPkU8, param->harqProcId, mBuf);
15052 CMCHKPK(SPkU8, param->mcs, mBuf);
15053 CMCHKPK(SPkU8, param->numRb, mBuf);
15054 CMCHKPK(SPkU8, param->rbStart, mBuf);
15055 CMCHKPK(SPkU8, param->hoppingBits, mBuf);
15056 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
15062 /***********************************************************
15064 * Func : cmUnpkTfuUePuschRecpReq
15067 * Desc : This structure is sent from scheduler to PHY in order to request the
15068 * reception of UEs data on PUSCH. This may contain the following:
15070 * -# Data + CQI and RI
15071 * -# Data + CQI and HARQ
15080 **********************************************************/
15082 PUBLIC S16 cmUnpkTfuUePuschRecpReq
15084 TfuUePuschRecpReq *param,
15088 PUBLIC S16 cmUnpkTfuUePuschRecpReq(param, mBuf)
15089 TfuUePuschRecpReq *param;
15094 TRC3(cmUnpkTfuUePuschRecpReq)
15096 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
15097 CMCHKUNPK(SUnpkU8, ¶m->hoppingBits, mBuf);
15098 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
15099 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
15100 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
15101 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
15102 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
15103 CMCHKUNPK(SUnpkU8, ¶m->isRtx, mBuf);
15104 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
15105 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
15106 CMCHKUNPK(SUnpkU8, ¶m->expCqi, mBuf);
15107 CMCHKUNPK(SUnpkU8, ¶m->expHarq, mBuf);
15108 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
15109 CMCHKUNPK(SUnpkU16, ¶m->size, mBuf);
15110 CMCHKUNPK(SUnpkU32, (U32 *)¶m->modType, mBuf);
15116 /***********************************************************
15118 * Func : cmPkTfuUeRecpReqInfo
15121 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
15122 * data. This contains information needed by PHY to decode the data sent by the
15132 **********************************************************/
15134 PUBLIC S16 cmPkTfuUeRecpReqInfo
15136 TfuUeRecpReqInfo *param,
15140 PUBLIC S16 cmPkTfuUeRecpReqInfo(param, mBuf)
15141 TfuUeRecpReqInfo *param;
15146 TRC3(cmPkTfuUeRecpReqInfo)
15148 switch(param->type) {
15149 case TFU_RECP_REQ_PUSCH:
15150 CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
15152 case TFU_RECP_REQ_MSG3:
15153 CMCHKPK(cmPkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf);
15155 case TFU_RECP_REQ_PUCCH:
15156 CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
15161 CMCHKPK(SPkU32, param->type, mBuf);
15162 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
15168 /***********************************************************
15170 * Func : cmUnpkTfuUeRecpReqInfo
15173 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
15174 * data. This contains information needed by PHY to decode the data sent by the
15184 **********************************************************/
15186 PUBLIC S16 cmUnpkTfuUeRecpReqInfo
15188 TfuUeRecpReqInfo *param,
15192 PUBLIC S16 cmUnpkTfuUeRecpReqInfo(param, mBuf)
15193 TfuUeRecpReqInfo *param;
15198 TRC3(cmUnpkTfuUeRecpReqInfo)
15200 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
15201 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
15202 switch(param->type) {
15203 case TFU_RECP_REQ_PUCCH:
15204 CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
15206 case TFU_RECP_REQ_MSG3:
15207 CMCHKUNPK(cmUnpkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf);
15209 case TFU_RECP_REQ_PUSCH:
15210 CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
15219 #endif /* ifndef TFU_UPGRADE */
15220 /*LAA: Packing and Unpacking*/
15222 /***********************************************************
15224 * Func : cmPkTfuErrIndInfo
15227 * Desc : This structure contains information that is passed as a part of
15228 * the ERR indication sent from PHY to MAC.
15237 **********************************************************/
15239 PRIVATE S16 cmPkTfuErrIndInfo
15241 TfuErrIndInfo *param,
15245 PRIVATE S16 cmPkTfuErrIndInfo(param, mBuf)
15246 TfuErrIndInfo *param;
15251 TRC3(cmPkTfuErrIndInfo)
15253 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
15254 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
15257 /***********************************************************
15259 * Func : cmUnpkTfuErrIndInfo
15262 * Desc : This structure contains information that is passed as a part of the ERR
15263 * indication sent from PHY to MAC.
15272 **********************************************************/
15274 PRIVATE S16 cmUnpkTfuErrIndInfo
15276 TfuErrIndInfo *param,
15280 PRIVATE S16 cmUnpkTfuErrIndInfo(param, mBuf)
15281 TfuErrIndInfo *param;
15286 TRC3(cmUnpkTfuErrIndInfo)
15288 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
15289 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
15293 /***********************************************************
15295 * Func : cmPkTfuErrInd
15298 * This API is invoked by PHY to send ERROR INDICATION to scheduler
15299 * Currently invoked in the cases when the Unlicensed SCell transmission
15301 * This API contains the Cell and subframe information for which the
15302 * transmission failed.
15304 * @param[in] Pst *pst
15305 * @param[in] SuId suId
15306 * @param[in] TfuErrIndInfo *errIndInfo
15318 **********************************************************/
15320 PUBLIC S16 cmPkTfuErrInd
15324 TfuErrIndInfo * errInd
15327 PUBLIC S16 cmPkTfuErrInd(pst, suId, errInd)
15330 TfuErrIndInfo * errInd;
15333 Buffer *mBuf = NULLP;
15334 TRC3(cmPkTfuErrInd)
15336 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
15337 #if (ERRCLASS & ERRCLS_ADD_RES)
15338 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15339 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15340 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
15342 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15345 if (pst->selector == TFU_SEL_LC) {
15346 if (cmPkTfuErrIndInfo(errInd, mBuf) != ROK) {
15347 #if (ERRCLASS & ERRCLS_ADD_RES)
15348 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15349 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15350 (ErrVal)ETFU106, (ErrVal)0, "Packing failed");
15352 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15353 TFU_FREE_MSG(mBuf);
15357 else if(pst->selector == TFU_SEL_LWLC)
15359 if (cmPkPtr((PTR)errInd, mBuf) != ROK)
15361 #if (ERRCLASS & ERRCLS_ADD_RES)
15362 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15363 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15364 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
15367 /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/
15368 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15369 TFU_FREE_MSG(mBuf);
15374 if (SPkS16(suId, mBuf) != ROK) {
15375 #if (ERRCLASS & ERRCLS_ADD_RES)
15376 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15377 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15378 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
15380 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15381 TFU_FREE_MSG(mBuf);
15384 if (pst->selector != TFU_SEL_LWLC) {
15385 if (SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)) != ROK) {
15386 #if (ERRCLASS & ERRCLS_ADD_RES)
15387 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15388 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15389 (ErrVal)ETFU108, (ErrVal)0, "Packing failed");
15391 TFU_FREE_MSG(mBuf);
15396 pst->event = (Event) EVTTFUERRIND;
15397 RETVALUE(SPstTsk(pst,mBuf));
15401 /***********************************************************
15403 * Func : cmUnpkTfuErrInd
15406 * This API is invoked by PHY to send ERROR INDICATION to scheduler
15407 * Currently invoked in the cases when the Unlicensed SCell transmission
15409 * This API contains the Cell and subframe information for which the
15410 * transmission failed.
15411 * @param pst Pointer to the post structure.
15412 * @param suId SAP ID of the service user.
15413 * @param errInd Pointer to the TfuErrIndInfo.
15414 * @return ROK/RFAILED
15423 **********************************************************/
15425 PUBLIC S16 cmUnpkTfuErrInd
15432 PUBLIC S16 cmUnpkTfuErrInd(func, pst, mBuf)
15439 TfuErrIndInfo *errInd;
15441 TRC3(cmUnpkTfuErrInd)
15443 if (SUnpkS16(&suId, mBuf) != ROK) {
15444 TFU_FREE_MSG(mBuf);
15445 #if (ERRCLASS & ERRCLS_ADD_RES)
15446 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15447 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15448 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
15452 if (pst->selector != TFU_SEL_LWLC) {
15453 if ((SGetSBuf(pst->region, pst->pool, (Data **)&errInd, sizeof(TfuErrIndInfo))) != ROK) {
15454 #if (ERRCLASS & ERRCLS_ADD_RES)
15455 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15456 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15457 (ErrVal)ETFU110, (ErrVal)0, "Packing failed");
15459 TFU_FREE_MSG(mBuf);
15464 if (pst->selector == TFU_SEL_LC)
15466 if (cmUnpkTfuErrIndInfo(errInd, mBuf) != ROK) {
15467 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15468 TFU_FREE_MSG(mBuf);
15469 #if (ERRCLASS & ERRCLS_ADD_RES)
15470 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15471 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15472 (ErrVal)ETFU111, (ErrVal)0, "Packing failed");
15477 else if(pst->selector == TFU_SEL_LWLC)
15479 if (cmUnpkPtr((PTR *)&errInd, mBuf) != ROK)
15481 #if (ERRCLASS & ERRCLS_ADD_RES)
15482 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15483 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15484 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
15486 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15487 TFU_FREE_MSG(mBuf);
15491 TFU_FREE_MSG(mBuf);
15492 /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
15493 (*func)(pst, suId, errInd);
15494 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15498 #endif /* if defined(LCTFU) */
15500 /**********************************************************************
15502 **********************************************************************/