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 */
64 /***********************************************************
66 * Func : cmPkTfuBndReq
69 * Desc : This API is used to send a Bind Request from MAC to PHY.
70 * @param pst Pointer to the post structure.
71 * @param suId SAP ID of the service user.
72 * @param spId SAP ID of the service provider.
82 **********************************************************/
84 PUBLIC S16 cmPkTfuBndReq
91 PUBLIC S16 cmPkTfuBndReq(pst, suId, spId)
100 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
101 #if (ERRCLASS & ERRCLS_ADD_RES)
102 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
103 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
104 (ErrVal)ETFU001, (ErrVal)0, "Packing failed");
108 if (SPkS16(spId, mBuf) != ROK) {
109 #if (ERRCLASS & ERRCLS_ADD_RES)
110 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
111 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
112 (ErrVal)ETFU002, (ErrVal)0, "Packing failed");
117 if (SPkS16(suId, mBuf) != ROK) {
118 #if (ERRCLASS & ERRCLS_ADD_RES)
119 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
120 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
121 (ErrVal)ETFU003, (ErrVal)0, "Packing failed");
126 pst->event = (Event) EVTTFUBNDREQ;
127 RETVALUE(SPstTsk(pst,mBuf));
131 /***********************************************************
133 * Func : cmUnpkTfuBndReq
136 * Desc : This API is used to send a Bind Request from MAC to PHY.
137 * @param pst Pointer to the post structure.
138 * @param suId SAP ID of the service user.
139 * @param spId SAP ID of the service provider.
140 * @return ROK/RFAILED
149 **********************************************************/
151 PUBLIC S16 cmUnpkTfuBndReq
158 PUBLIC S16 cmUnpkTfuBndReq(func, pst, mBuf)
167 TRC3(cmUnpkTfuBndReq)
169 if (SUnpkS16(&suId, mBuf) != ROK) {
171 #if (ERRCLASS & ERRCLS_ADD_RES)
172 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
173 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
174 (ErrVal)ETFU004, (ErrVal)0, "Packing failed");
178 if (SUnpkS16(&spId, mBuf) != ROK) {
180 #if (ERRCLASS & ERRCLS_ADD_RES)
181 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
182 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
183 (ErrVal)ETFU005, (ErrVal)0, "Packing failed");
188 RETVALUE((*func)(pst, suId, spId));
192 /***********************************************************
194 * Func : cmPkTfuBndCfm
197 * Desc : This API is used to receive a Bind Confirm from PHY to MAC.
198 * @param pst Pointer to the post structure.
199 * @param suId SAP ID of the service user.
200 * @param status Status of the bind request.
201 * @return ROK/RFAILED
210 **********************************************************/
212 PUBLIC S16 cmPkTfuBndCfm
219 PUBLIC S16 cmPkTfuBndCfm(pst, suId, status)
225 Buffer *mBuf = NULLP;
228 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
229 #if (ERRCLASS & ERRCLS_ADD_RES)
230 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
231 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
232 (ErrVal)ETFU006, (ErrVal)0, "Packing failed");
236 if (SPkU8(status, mBuf) != ROK) {
237 #if (ERRCLASS & ERRCLS_ADD_RES)
238 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
239 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
240 (ErrVal)ETFU007, (ErrVal)0, "Packing failed");
245 if (SPkS16(suId, mBuf) != ROK) {
246 #if (ERRCLASS & ERRCLS_ADD_RES)
247 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
248 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
249 (ErrVal)ETFU008, (ErrVal)0, "Packing failed");
254 pst->event = (Event) EVTTFUBNDCFM;
255 RETVALUE(SPstTsk(pst,mBuf));
259 /***********************************************************
261 * Func : cmUnpkTfuBndCfm
264 * Desc : This API is used to receive a Bind Confirm from PHY to MAC.
265 * @param pst Pointer to the post structure.
266 * @param suId SAP ID of the service user.
267 * @param status Status of the bind request.
268 * @return ROK/RFAILED
277 **********************************************************/
279 PUBLIC S16 cmUnpkTfuBndCfm
286 PUBLIC S16 cmUnpkTfuBndCfm(func, pst, mBuf)
295 TRC3(cmUnpkTfuBndCfm)
297 if (SUnpkS16(&suId, mBuf) != ROK) {
299 #if (ERRCLASS & ERRCLS_ADD_RES)
300 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
301 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
302 (ErrVal)ETFU009, (ErrVal)0, "Packing failed");
306 if (SUnpkU8(&status, mBuf) != ROK) {
308 #if (ERRCLASS & ERRCLS_ADD_RES)
309 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
310 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
311 (ErrVal)ETFU010, (ErrVal)0, "Packing failed");
316 RETVALUE((*func)(pst, suId, status));
320 /***********************************************************
322 * Func : cmPkTfuUbndReq
325 * Desc : This API is used to send an Unbind Request from MAC to PHY.
326 * @param pst Pointer to the post structure.
327 * @param suId SAP ID of the service provider.
328 * @param reason Reason for Unbind request.
329 * @return ROK/RFAILED
338 **********************************************************/
340 PUBLIC S16 cmPkTfuUbndReq
347 PUBLIC S16 cmPkTfuUbndReq(pst, spId, reason)
353 Buffer *mBuf = NULLP;
356 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
357 #if (ERRCLASS & ERRCLS_ADD_RES)
358 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
359 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
360 (ErrVal)ETFU011, (ErrVal)0, "Packing failed");
364 if (SPkS16(reason, mBuf) != ROK) {
365 #if (ERRCLASS & ERRCLS_ADD_RES)
366 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
367 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
368 (ErrVal)ETFU012, (ErrVal)0, "Packing failed");
373 if (SPkS16(spId, mBuf) != ROK) {
374 #if (ERRCLASS & ERRCLS_ADD_RES)
375 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
376 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
377 (ErrVal)ETFU013, (ErrVal)0, "Packing failed");
382 pst->event = (Event) EVTTFUUBNDREQ;
383 RETVALUE(SPstTsk(pst,mBuf));
387 /***********************************************************
389 * Func : cmUnpkTfuUbndReq
392 * Desc : This API is used to send an Unbind Request from MAC to PHY.
393 * @param pst Pointer to the post structure.
394 * @param suId SAP ID of the service provider.
395 * @param reason Reason for Unbind request.
396 * @return ROK/RFAILED
405 **********************************************************/
407 PUBLIC S16 cmUnpkTfuUbndReq
414 PUBLIC S16 cmUnpkTfuUbndReq(func, pst, mBuf)
423 TRC3(cmUnpkTfuUbndReq)
425 if (SUnpkS16(&spId, mBuf) != ROK) {
427 #if (ERRCLASS & ERRCLS_ADD_RES)
428 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
429 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
430 (ErrVal)ETFU014, (ErrVal)0, "Packing failed");
434 if (SUnpkS16(&reason, mBuf) != ROK) {
436 #if (ERRCLASS & ERRCLS_ADD_RES)
437 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
438 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
439 (ErrVal)ETFU015, (ErrVal)0, "Packing failed");
444 RETVALUE((*func)(pst, spId, reason));
448 /***********************************************************
450 * Func : cmPkTfuSchBndReq
453 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
454 * @param pst Pointer to the post structure.
455 * @param suId SAP ID of the service user.
456 * @param spId SAP ID of the service provider.
457 * @return ROK/RFAILED
466 **********************************************************/
468 PUBLIC S16 cmPkTfuSchBndReq
475 PUBLIC S16 cmPkTfuSchBndReq(pst, suId, spId)
481 Buffer *mBuf = NULLP;
482 TRC3(cmPkTfuSchBndReq)
484 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
485 #if (ERRCLASS & ERRCLS_ADD_RES)
486 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
487 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
488 (ErrVal)ETFU016, (ErrVal)0, "Packing failed");
492 if (SPkS16(spId, mBuf) != ROK) {
493 #if (ERRCLASS & ERRCLS_ADD_RES)
494 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
495 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
496 (ErrVal)ETFU017, (ErrVal)0, "Packing failed");
501 if (SPkS16(suId, mBuf) != ROK) {
502 #if (ERRCLASS & ERRCLS_ADD_RES)
503 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
504 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
505 (ErrVal)ETFU018, (ErrVal)0, "Packing failed");
510 pst->event = (Event) EVTTFUSCHBNDREQ;
511 RETVALUE(SPstTsk(pst,mBuf));
515 /***********************************************************
517 * Func : cmUnpkTfuSchBndReq
520 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
521 * @param pst Pointer to the post structure.
522 * @param suId SAP ID of the service user.
523 * @param spId SAP ID of the service provider.
524 * @return ROK/RFAILED
533 **********************************************************/
535 PUBLIC S16 cmUnpkTfuSchBndReq
542 PUBLIC S16 cmUnpkTfuSchBndReq(func, pst, mBuf)
551 TRC3(cmUnpkTfuSchBndReq)
553 if (SUnpkS16(&suId, mBuf) != ROK) {
555 #if (ERRCLASS & ERRCLS_ADD_RES)
556 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
557 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
558 (ErrVal)ETFU019, (ErrVal)0, "Packing failed");
562 if (SUnpkS16(&spId, mBuf) != ROK) {
564 #if (ERRCLASS & ERRCLS_ADD_RES)
565 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
566 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
567 (ErrVal)ETFU020, (ErrVal)0, "Packing failed");
572 RETVALUE((*func)(pst, suId, spId));
576 /***********************************************************
578 * Func : cmPkTfuSchBndCfm
581 * Desc : This API is used to receive a Bind Confirm from PHY to Scheduler.
582 * @param pst Pointer to the post structure.
583 * @param suId SAP ID of the service user.
584 * @param status Status of the bind request.
585 * @return ROK/RFAILED
594 **********************************************************/
596 PUBLIC S16 cmPkTfuSchBndCfm
603 PUBLIC S16 cmPkTfuSchBndCfm(pst, suId, status)
609 Buffer *mBuf = NULLP;
610 TRC3(cmPkTfuSchBndCfm)
612 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
613 #if (ERRCLASS & ERRCLS_ADD_RES)
614 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
615 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
616 (ErrVal)ETFU021, (ErrVal)0, "Packing failed");
620 if (SPkU8(status, mBuf) != ROK) {
621 #if (ERRCLASS & ERRCLS_ADD_RES)
622 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
623 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
624 (ErrVal)ETFU022, (ErrVal)0, "Packing failed");
629 if (SPkS16(suId, mBuf) != ROK) {
630 #if (ERRCLASS & ERRCLS_ADD_RES)
631 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
632 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
633 (ErrVal)ETFU023, (ErrVal)0, "Packing failed");
638 pst->event = (Event) EVTTFUSCHBNDCFM;
639 RETVALUE(SPstTsk(pst,mBuf));
643 /***********************************************************
645 * Func : cmUnpkTfuSchBndCfm
648 * Desc : This API is used to receive a Bind Confirm from PHY to Scheduler.
649 * @param pst Pointer to the post structure.
650 * @param suId SAP ID of the service user.
651 * @param status Status of the bind request.
652 * @return ROK/RFAILED
661 **********************************************************/
663 PUBLIC S16 cmUnpkTfuSchBndCfm
670 PUBLIC S16 cmUnpkTfuSchBndCfm(func, pst, mBuf)
679 TRC3(cmUnpkTfuSchBndCfm)
681 if (SUnpkS16(&suId, mBuf) != ROK) {
683 #if (ERRCLASS & ERRCLS_ADD_RES)
684 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
685 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
686 (ErrVal)ETFU024, (ErrVal)0, "Packing failed");
690 if (SUnpkU8(&status, mBuf) != ROK) {
692 #if (ERRCLASS & ERRCLS_ADD_RES)
693 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
694 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
695 (ErrVal)ETFU025, (ErrVal)0, "Packing failed");
700 RETVALUE((*func)(pst, suId, status));
704 /***********************************************************
706 * Func : cmPkTfuSchUbndReq
709 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
710 * @param pst Pointer to the post structure.
711 * @param suId SAP ID of the service provider.
712 * @param reason Reason for Unbind request.
713 * @return ROK/RFAILED
722 **********************************************************/
724 PUBLIC S16 cmPkTfuSchUbndReq
731 PUBLIC S16 cmPkTfuSchUbndReq(pst, spId, reason)
737 Buffer *mBuf = NULLP;
738 TRC3(cmPkTfuSchUbndReq)
740 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
741 #if (ERRCLASS & ERRCLS_ADD_RES)
742 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
743 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
744 (ErrVal)ETFU026, (ErrVal)0, "Packing failed");
748 if (SPkS16(reason, mBuf) != ROK) {
749 #if (ERRCLASS & ERRCLS_ADD_RES)
750 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
751 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
752 (ErrVal)ETFU027, (ErrVal)0, "Packing failed");
757 if (SPkS16(spId, mBuf) != ROK) {
758 #if (ERRCLASS & ERRCLS_ADD_RES)
759 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
760 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
761 (ErrVal)ETFU028, (ErrVal)0, "Packing failed");
766 pst->event = (Event) EVTTFUSCHUBNDREQ;
767 RETVALUE(SPstTsk(pst,mBuf));
771 /***********************************************************
773 * Func : cmUnpkTfuSchUbndReq
776 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
777 * @param pst Pointer to the post structure.
778 * @param suId SAP ID of the service provider.
779 * @param reason Reason for Unbind request.
780 * @return ROK/RFAILED
789 **********************************************************/
791 PUBLIC S16 cmUnpkTfuSchUbndReq
798 PUBLIC S16 cmUnpkTfuSchUbndReq(func, pst, mBuf)
807 TRC3(cmUnpkTfuSchUbndReq)
809 if (SUnpkS16(&spId, mBuf) != ROK) {
811 #if (ERRCLASS & ERRCLS_ADD_RES)
812 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
813 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
814 (ErrVal)ETFU029, (ErrVal)0, "Packing failed");
818 if (SUnpkS16(&reason, mBuf) != ROK) {
820 #if (ERRCLASS & ERRCLS_ADD_RES)
821 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
822 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
823 (ErrVal)ETFU030, (ErrVal)0, "Packing failed");
828 RETVALUE((*func)(pst, spId, reason));
832 /***********************************************************
834 * Func : cmPkTfuRaReqInd
837 * Desc : This API is used to indication Random Access Request reception from
839 * @details This primitive is used by physical layer to indicate the reception
840 * of a Random Access Request from a set of UEs. The information passed consists
841 * of the RA-RNTI and the list of preambles received.
842 * @param pst Pointer to the post structure.
843 * @param suId SAP ID of the service user.
844 * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
845 * @return ROK/RFAILED
854 **********************************************************/
856 PUBLIC S16 cmPkTfuRaReqInd
860 TfuRaReqIndInfo * raReqInd
863 PUBLIC S16 cmPkTfuRaReqInd(pst, suId, raReqInd)
866 TfuRaReqIndInfo * raReqInd;
869 Buffer *mBuf = NULLP;
870 TRC3(cmPkTfuRaReqInd)
872 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
873 #if (ERRCLASS & ERRCLS_ADD_RES)
874 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
875 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
876 (ErrVal)ETFU031, (ErrVal)0, "Packing failed");
878 TFU_FREE_MEM(raReqInd);
881 if (pst->selector == TFU_SEL_LC) {
882 if (cmPkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) {
883 #if (ERRCLASS & ERRCLS_ADD_RES)
884 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
885 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
886 (ErrVal)ETFU032, (ErrVal)0, "Packing failed");
888 TFU_FREE_MEM(raReqInd);
893 else if(pst->selector == TFU_SEL_LWLC)
895 if (cmPkPtr((PTR)raReqInd, mBuf) != ROK)
897 #if (ERRCLASS & ERRCLS_ADD_RES)
898 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
899 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
900 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
902 TFU_FREE_MEM(raReqInd);
908 if (SPkS16(suId, mBuf) != ROK) {
909 #if (ERRCLASS & ERRCLS_ADD_RES)
910 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
911 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
912 (ErrVal)ETFU033, (ErrVal)0, "Packing failed");
914 TFU_FREE_MEM(raReqInd);
918 if (pst->selector != TFU_SEL_LWLC) {
919 TFU_FREE_MEM(raReqInd);
922 pst->event = (Event) EVTTFURAREQIND;
923 RETVALUE(SPstTsk(pst,mBuf));
927 /***********************************************************
929 * Func : cmUnpkTfuRaReqInd
932 * Desc : This API is used to indication Random Access Request reception from
934 * @details This primitive is used by physical layer to indicate the reception
935 * of a Random Access Request from a set of UEs. The information passed consists
936 * of the RA-RNTI and the list of preambles received.
937 * @param pst Pointer to the post structure.
938 * @param suId SAP ID of the service user.
939 * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
940 * @return ROK/RFAILED
949 **********************************************************/
951 PUBLIC S16 cmUnpkTfuRaReqInd
958 PUBLIC S16 cmUnpkTfuRaReqInd(func, pst, mBuf)
965 TfuRaReqIndInfo *raReqInd;
967 TRC3(cmUnpkTfuRaReqInd)
969 if (SUnpkS16(&suId, mBuf) != ROK) {
971 #if (ERRCLASS & ERRCLS_ADD_RES)
972 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
973 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
974 (ErrVal)ETFU034, (ErrVal)0, "Packing failed");
978 if (pst->selector != TFU_SEL_LWLC) {
980 sMem.region = pst->region;
981 sMem.pool = pst->pool;
982 if ((cmAllocEvnt(sizeof(TfuRaReqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&raReqInd)) != ROK) {
983 #if (ERRCLASS & ERRCLS_ADD_RES)
984 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
985 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
986 (ErrVal)ETFU035, (ErrVal)0, "Packing failed");
994 if (pst->selector == TFU_SEL_LC)
996 if (cmUnpkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) {
997 TFU_FREE_MEM(raReqInd);
999 #if (ERRCLASS & ERRCLS_ADD_RES)
1000 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1001 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1002 (ErrVal)ETFU036, (ErrVal)0, "Packing failed");
1007 else if(pst->selector == TFU_SEL_LWLC)
1009 if (cmUnpkPtr((PTR *)&raReqInd, mBuf) != ROK)
1011 #if (ERRCLASS & ERRCLS_ADD_RES)
1012 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1013 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1014 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1016 TFU_FREE_MEM(raReqInd);
1022 RETVALUE((*func)(pst, suId, raReqInd));
1026 /***********************************************************
1028 * Func : cmPkTfuRecpReq
1031 * Desc : This primitive is sent from Scheduler to PHY.
1032 * @details This primitive provides PHY with all the information required by
1033 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
1034 * -# On PUCCH UE can transmit the following
1040 * -# On PUSCH UE can transmit the following
1043 * -# Data + HARQ Feedback
1044 * This primitive carries all the information for the expected subframe for all
1045 * the UEs that have been scheduled to transmit.
1046 * @param pst Pointer to the post structure.
1047 * @param spId SAP ID of the service provider.
1048 * @param recpReq Pointer to the TfuRecpReqInfo structure.
1049 * @return ROK/RFAILED
1058 **********************************************************/
1060 PUBLIC S16 cmPkTfuRecpReq
1064 TfuRecpReqInfo * recpReq
1067 PUBLIC S16 cmPkTfuRecpReq(pst, spId, recpReq)
1070 TfuRecpReqInfo * recpReq;
1073 Buffer *mBuf = NULLP;
1074 TRC3(cmPkTfuRecpReq)
1076 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1077 #if (ERRCLASS & ERRCLS_ADD_RES)
1078 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1079 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1080 (ErrVal)ETFU037, (ErrVal)0, "Packing failed");
1082 TFU_FREE_MEM(recpReq);
1085 if (pst->selector == TFU_SEL_LC) {
1086 if (cmPkTfuRecpReqInfo(recpReq, mBuf) != ROK) {
1087 #if (ERRCLASS & ERRCLS_ADD_RES)
1088 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1089 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1090 (ErrVal)ETFU038, (ErrVal)0, "Packing failed");
1092 TFU_FREE_MEM(recpReq);
1097 else if(pst->selector == TFU_SEL_LWLC)
1099 if (cmPkPtr((PTR)recpReq, mBuf) != ROK)
1101 #if (ERRCLASS & ERRCLS_ADD_RES)
1102 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1103 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1104 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1106 TFU_FREE_MEM(recpReq);
1113 if (SPkS16(spId, mBuf) != ROK) {
1114 #if (ERRCLASS & ERRCLS_ADD_RES)
1115 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1116 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1117 (ErrVal)ETFU039, (ErrVal)0, "Packing failed");
1119 TFU_FREE_MEM(recpReq);
1123 if (pst->selector != TFU_SEL_LWLC) {
1124 TFU_FREE_MEM(recpReq);
1127 pst->event = (Event) EVTTFURECPREQ;
1128 RETVALUE(SPstTsk(pst,mBuf));
1132 /***********************************************************
1134 * Func : cmUnpkTfuRecpReq
1137 * Desc : This primitive is sent from Scheduler to PHY.
1138 * @details This primitive provides PHY with all the information required by
1139 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
1140 * -# On PUCCH UE can transmit the following
1146 * -# On PUSCH UE can transmit the following
1149 * -# Data + HARQ Feedback
1150 * This primitive carries all the information for the expected subframe for all
1151 * the UEs that have been scheduled to transmit.
1152 * @param pst Pointer to the post structure.
1153 * @param spId SAP ID of the service provider.
1154 * @param recpReq Pointer to the TfuRecpReqInfo structure.
1155 * @return ROK/RFAILED
1164 **********************************************************/
1166 PUBLIC S16 cmUnpkTfuRecpReq
1173 PUBLIC S16 cmUnpkTfuRecpReq(func, pst, mBuf)
1180 TfuRecpReqInfo *recpReq;
1182 TRC3(cmUnpkTfuRecpReq)
1184 if (SUnpkS16(&spId, mBuf) != ROK) {
1186 #if (ERRCLASS & ERRCLS_ADD_RES)
1187 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1188 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1189 (ErrVal)ETFU040, (ErrVal)0, "Packing failed");
1193 if (pst->selector != TFU_SEL_LWLC) {
1195 sMem.region = pst->region;
1196 sMem.pool = pst->pool;
1197 if ((cmAllocEvnt(sizeof(TfuRecpReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&recpReq)) != ROK) {
1198 #if (ERRCLASS & ERRCLS_ADD_RES)
1199 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1200 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1201 (ErrVal)ETFU041, (ErrVal)0, "Packing failed");
1207 else if(pst->selector == TFU_SEL_LWLC)
1209 if (cmUnpkPtr((PTR *)&recpReq, mBuf) != ROK)
1211 #if (ERRCLASS & ERRCLS_ADD_RES)
1212 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1213 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1214 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1216 TFU_FREE_MEM(recpReq);
1222 if (pst->selector == TFU_SEL_LC)
1224 if (cmUnpkTfuRecpReqInfo(recpReq, (Ptr)&recpReq->memCp, mBuf) != ROK) {
1225 TFU_FREE_MEM(recpReq);
1227 #if (ERRCLASS & ERRCLS_ADD_RES)
1228 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1229 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1230 (ErrVal)ETFU042, (ErrVal)0, "Packing failed");
1235 else if(pst->selector == TFU_SEL_LWLC)
1237 if (cmUnpkPtr((PTR*)&recpReq, mBuf) != ROK)
1239 #if (ERRCLASS & ERRCLS_ADD_RES)
1240 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1241 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1242 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1244 TFU_FREE_MEM(recpReq);
1251 RETVALUE((*func)(pst, spId, recpReq));
1255 /***********************************************************
1257 * Func : cmPkTfuUlCqiInd
1260 * Desc : This API is used to indicate CQI reporting from PHY to Scheduler
1261 * @details This primitive carries an estimate of the uplink Channel quality
1262 * index (CQI) for a list of UEs. This is an extimate of the uplink channel
1263 * quality i.e. the transmission from UE as calculated at the Physical layer at
1265 * It carries a list of subband CQIs for each UE.
1266 * @param pst Pointer to the post structure.
1267 * @param suId SAP ID of the service user.
1268 * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
1269 * @return ROK/RFAILED
1278 **********************************************************/
1280 PUBLIC S16 cmPkTfuUlCqiInd
1284 TfuUlCqiIndInfo * ulCqiInd
1287 PUBLIC S16 cmPkTfuUlCqiInd(pst, suId, ulCqiInd)
1290 TfuUlCqiIndInfo * ulCqiInd;
1293 Buffer *mBuf = NULLP;
1294 TRC3(cmPkTfuUlCqiInd)
1296 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1297 #if (ERRCLASS & ERRCLS_ADD_RES)
1298 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1299 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1300 (ErrVal)ETFU043, (ErrVal)0, "Packing failed");
1302 TFU_FREE_MEM(ulCqiInd);
1305 if (pst->selector == TFU_SEL_LC) {
1306 if (cmPkTfuUlCqiIndInfo(ulCqiInd, mBuf) != ROK) {
1307 #if (ERRCLASS & ERRCLS_ADD_RES)
1308 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1309 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1310 (ErrVal)ETFU044, (ErrVal)0, "Packing failed");
1312 TFU_FREE_MEM(ulCqiInd);
1317 else if(pst->selector == TFU_SEL_LWLC)
1319 if (cmPkPtr((PTR)ulCqiInd, mBuf) != ROK)
1321 #if (ERRCLASS & ERRCLS_ADD_RES)
1322 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1323 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1324 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1326 TFU_FREE_MEM(ulCqiInd);
1332 if (SPkS16(suId, mBuf) != ROK) {
1333 #if (ERRCLASS & ERRCLS_ADD_RES)
1334 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1335 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1336 (ErrVal)ETFU045, (ErrVal)0, "Packing failed");
1338 TFU_FREE_MEM(ulCqiInd);
1342 if (pst->selector != TFU_SEL_LWLC) {
1343 TFU_FREE_MEM(ulCqiInd);
1346 pst->event = (Event) EVTTFUULCQIIND;
1347 RETVALUE(SPstTsk(pst,mBuf));
1351 /***********************************************************
1353 * Func : cmUnpkTfuUlCqiInd
1356 * Desc : This API is used to indicate CQI reporting from PHY to Scheduler
1357 * @details This primitive carries an estimate of the uplink Channel quality
1358 * index (CQI) for a list of UEs. This is an extimate of the uplink channel
1359 * quality i.e. the transmission from UE as calculated at the Physical layer at
1361 * It carries a list of subband CQIs for each UE.
1362 * @param pst Pointer to the post structure.
1363 * @param suId SAP ID of the service user.
1364 * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
1365 * @return ROK/RFAILED
1374 **********************************************************/
1376 PUBLIC S16 cmUnpkTfuUlCqiInd
1383 PUBLIC S16 cmUnpkTfuUlCqiInd(func, pst, mBuf)
1390 TfuUlCqiIndInfo *ulCqiInd;
1392 TRC3(cmUnpkTfuUlCqiInd)
1394 if (SUnpkS16(&suId, mBuf) != ROK) {
1396 #if (ERRCLASS & ERRCLS_ADD_RES)
1397 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1398 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1399 (ErrVal)ETFU046, (ErrVal)0, "Packing failed");
1403 if (pst->selector != TFU_SEL_LWLC) {
1405 sMem.region = pst->region;
1406 sMem.pool = pst->pool;
1407 if ((cmAllocEvnt(sizeof(TfuUlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&ulCqiInd)) != ROK) {
1408 #if (ERRCLASS & ERRCLS_ADD_RES)
1409 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1410 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1411 (ErrVal)ETFU047, (ErrVal)0, "Packing failed");
1419 if (pst->selector == TFU_SEL_LC)
1421 if (cmUnpkTfuUlCqiIndInfo(ulCqiInd, (Ptr)&ulCqiInd->memCp, mBuf) != ROK) {
1422 TFU_FREE_MEM(ulCqiInd);
1424 #if (ERRCLASS & ERRCLS_ADD_RES)
1425 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1426 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1427 (ErrVal)ETFU048, (ErrVal)0, "Packing failed");
1432 else if(pst->selector == TFU_SEL_LWLC)
1434 if (cmUnpkPtr((PTR *)&ulCqiInd, mBuf) != ROK)
1436 #if (ERRCLASS & ERRCLS_ADD_RES)
1437 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1438 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1439 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1441 TFU_FREE_MEM(ulCqiInd);
1447 RETVALUE((*func)(pst, suId, ulCqiInd));
1451 /***********************************************************
1453 * Func : cmPkTfuHqInd
1456 * Desc : This Primitive carries the HARQ Feedback from PHY to scheduler
1457 * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
1458 * could successfully recieve the data transmitted by the eNodeB, else a NACK is
1459 * sent. This feedback is utilized by MAC for further scheduling, for instance
1460 * it could schedule an adaptive retransmission of the same data.
1463 * @param tfuHqInd pointer to TfuHqIndInfo
1473 **********************************************************/
1475 PUBLIC S16 cmPkTfuHqInd
1479 TfuHqIndInfo * hqInd
1482 PUBLIC S16 cmPkTfuHqInd(pst, spId, hqInd)
1485 TfuHqIndInfo * hqInd;
1488 Buffer *mBuf = NULLP;
1491 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1492 #if (ERRCLASS & ERRCLS_ADD_RES)
1493 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1494 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1495 (ErrVal)ETFU049, (ErrVal)0, "Packing failed");
1497 TFU_FREE_MEM(hqInd);
1500 if (pst->selector == TFU_SEL_LC) {
1501 if (cmPkTfuHqIndInfo(hqInd, mBuf) != ROK) {
1502 #if (ERRCLASS & ERRCLS_ADD_RES)
1503 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1504 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1505 (ErrVal)ETFU050, (ErrVal)0, "Packing failed");
1507 TFU_FREE_MEM(hqInd);
1512 else if(pst->selector == TFU_SEL_LWLC)
1514 if (cmPkPtr((PTR)hqInd, mBuf) != ROK)
1516 #if (ERRCLASS & ERRCLS_ADD_RES)
1517 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1518 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1519 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1521 TFU_FREE_MEM(hqInd);
1527 if (SPkS16(spId, mBuf) != ROK) {
1528 #if (ERRCLASS & ERRCLS_ADD_RES)
1529 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1530 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1531 (ErrVal)ETFU051, (ErrVal)0, "Packing failed");
1533 TFU_FREE_MEM(hqInd);
1537 if (pst->selector != TFU_SEL_LWLC) {
1538 TFU_FREE_MEM(hqInd);
1541 pst->event = (Event) EVTTFUHQIND;
1542 RETVALUE(SPstTsk(pst,mBuf));
1546 /***********************************************************
1548 * Func : cmUnpkTfuHqInd
1551 * Desc : This Primitive carries the HARQ Feedback from PHY to scheduler
1552 * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
1553 * could successfully recieve the data transmitted by the eNodeB, else a NACK is
1554 * sent. This feedback is utilized by MAC for further scheduling, for instance
1555 * it could schedule an adaptive retransmission of the same data.
1558 * @param tfuHqInd pointer to TfuHqIndInfo
1568 **********************************************************/
1570 PUBLIC S16 cmUnpkTfuHqInd
1577 PUBLIC S16 cmUnpkTfuHqInd(func, pst, mBuf)
1584 TfuHqIndInfo *hqInd;
1586 TRC3(cmUnpkTfuHqInd)
1588 if (SUnpkS16(&spId, mBuf) != ROK) {
1590 #if (ERRCLASS & ERRCLS_ADD_RES)
1591 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1592 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1593 (ErrVal)ETFU052, (ErrVal)0, "Packing failed");
1597 if (pst->selector != TFU_SEL_LWLC) {
1599 sMem.region = pst->region;
1600 sMem.pool = pst->pool;
1601 if ((cmAllocEvnt(sizeof(TfuHqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&hqInd)) != ROK) {
1602 #if (ERRCLASS & ERRCLS_ADD_RES)
1603 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1604 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1605 (ErrVal)ETFU053, (ErrVal)0, "Packing failed");
1613 if (pst->selector == TFU_SEL_LC)
1615 if (cmUnpkTfuHqIndInfo(hqInd, (Ptr)&hqInd->memCp, mBuf) != ROK) {
1616 TFU_FREE_MEM(hqInd);
1618 #if (ERRCLASS & ERRCLS_ADD_RES)
1619 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1620 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1621 (ErrVal)ETFU054, (ErrVal)0, "Packing failed");
1626 else if(pst->selector == TFU_SEL_LWLC)
1628 if (cmUnpkPtr((PTR *)&hqInd, mBuf) != ROK)
1630 #if (ERRCLASS & ERRCLS_ADD_RES)
1631 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1632 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1633 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1635 TFU_FREE_MEM(hqInd);
1641 RETVALUE((*func)(pst, spId, hqInd));
1645 /***********************************************************
1647 * Func : cmPkTfuSrInd
1650 * Desc : This Primitive carries the SR Indication from PHY to scheduler.
1651 * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
1652 * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
1653 * UEs received in the indicated subframe.
1656 * @param tfqSrInd pointer to TfuSrIndInfo
1666 **********************************************************/
1668 PUBLIC S16 cmPkTfuSrInd
1672 TfuSrIndInfo * srInd
1675 PUBLIC S16 cmPkTfuSrInd(pst, spId, srInd)
1678 TfuSrIndInfo * srInd;
1681 Buffer *mBuf = NULLP;
1684 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1685 #if (ERRCLASS & ERRCLS_ADD_RES)
1686 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1687 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1688 (ErrVal)ETFU055, (ErrVal)0, "Packing failed");
1690 TFU_FREE_MEM(srInd);
1693 if (pst->selector == TFU_SEL_LC) {
1694 if (cmPkTfuSrIndInfo(srInd, mBuf) != ROK) {
1695 #if (ERRCLASS & ERRCLS_ADD_RES)
1696 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1697 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1698 (ErrVal)ETFU056, (ErrVal)0, "Packing failed");
1700 TFU_FREE_MEM(srInd);
1705 else if(pst->selector == TFU_SEL_LWLC)
1707 if (cmPkPtr((PTR)srInd, mBuf) != ROK)
1709 #if (ERRCLASS & ERRCLS_ADD_RES)
1710 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1711 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1712 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1714 TFU_FREE_MEM(srInd);
1720 if (SPkS16(spId, mBuf) != ROK) {
1721 #if (ERRCLASS & ERRCLS_ADD_RES)
1722 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1723 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1724 (ErrVal)ETFU057, (ErrVal)0, "Packing failed");
1726 TFU_FREE_MEM(srInd);
1730 if (pst->selector != TFU_SEL_LWLC) {
1731 TFU_FREE_MEM(srInd);
1734 pst->event = (Event) EVTTFUSRIND;
1735 RETVALUE(SPstTsk(pst,mBuf));
1739 /***********************************************************
1741 * Func : cmUnpkTfuSrInd
1744 * Desc : This Primitive carries the SR Indication from PHY to scheduler.
1745 * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
1746 * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
1747 * UEs received in the indicated subframe.
1750 * @param tfqSrInd pointer to TfuSrIndInfo
1760 **********************************************************/
1762 PUBLIC S16 cmUnpkTfuSrInd
1769 PUBLIC S16 cmUnpkTfuSrInd(func, pst, mBuf)
1776 TfuSrIndInfo *srInd;
1778 TRC3(cmUnpkTfuSrInd)
1780 if (SUnpkS16(&spId, mBuf) != ROK) {
1782 #if (ERRCLASS & ERRCLS_ADD_RES)
1783 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1784 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1785 (ErrVal)ETFU058, (ErrVal)0, "Packing failed");
1789 if (pst->selector != TFU_SEL_LWLC) {
1791 sMem.region = pst->region;
1792 sMem.pool = pst->pool;
1793 if ((cmAllocEvnt(sizeof(TfuSrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srInd)) != ROK) {
1794 #if (ERRCLASS & ERRCLS_ADD_RES)
1795 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1796 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1797 (ErrVal)ETFU059, (ErrVal)0, "Packing failed");
1805 if (pst->selector == TFU_SEL_LC)
1807 if (cmUnpkTfuSrIndInfo(srInd, (Ptr)&srInd->memCp, mBuf) != ROK) {
1808 TFU_FREE_MEM(srInd);
1810 #if (ERRCLASS & ERRCLS_ADD_RES)
1811 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1812 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1813 (ErrVal)ETFU060, (ErrVal)0, "Packing failed");
1818 else if(pst->selector == TFU_SEL_LWLC)
1820 if (cmUnpkPtr((PTR *)&srInd, mBuf) != ROK)
1822 #if (ERRCLASS & ERRCLS_ADD_RES)
1823 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1824 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1825 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1827 TFU_FREE_MEM(srInd);
1833 RETVALUE((*func)(pst, spId, srInd));
1837 /***********************************************************
1839 * Func : cmPkTfuDlCqiInd
1842 * Desc : This API is used to indicate the reception of CQI report from PHY to
1843 * Scheduler, also carries the RI.
1844 * @param pst Pointer to the post structure.
1845 * @param suId SAP ID of the service user.
1846 * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
1847 * @return ROK/RFAILED
1856 **********************************************************/
1858 PUBLIC S16 cmPkTfuDlCqiInd
1862 TfuDlCqiIndInfo * dlCqiInd
1865 PUBLIC S16 cmPkTfuDlCqiInd(pst, suId, dlCqiInd)
1868 TfuDlCqiIndInfo * dlCqiInd;
1871 Buffer *mBuf = NULLP;
1872 TRC3(cmPkTfuDlCqiInd)
1874 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1875 #if (ERRCLASS & ERRCLS_ADD_RES)
1876 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1877 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1878 (ErrVal)ETFU061, (ErrVal)0, "Packing failed");
1880 TFU_FREE_MEM(dlCqiInd);
1883 if (pst->selector == TFU_SEL_LC) {
1884 if (cmPkTfuDlCqiIndInfo(dlCqiInd, mBuf) != ROK) {
1885 #if (ERRCLASS & ERRCLS_ADD_RES)
1886 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1887 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1888 (ErrVal)ETFU062, (ErrVal)0, "Packing failed");
1890 TFU_FREE_MEM(dlCqiInd);
1895 else if(pst->selector == TFU_SEL_LWLC)
1897 if (cmPkPtr((PTR)dlCqiInd, mBuf) != ROK)
1899 #if (ERRCLASS & ERRCLS_ADD_RES)
1900 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1901 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1902 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1904 TFU_FREE_MEM(dlCqiInd);
1910 if (SPkS16(suId, mBuf) != ROK) {
1911 #if (ERRCLASS & ERRCLS_ADD_RES)
1912 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1913 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1914 (ErrVal)ETFU063, (ErrVal)0, "Packing failed");
1916 TFU_FREE_MEM(dlCqiInd);
1920 if (pst->selector != TFU_SEL_LWLC) {
1921 TFU_FREE_MEM(dlCqiInd);
1923 pst->event = (Event) EVTTFUDLCQIIND;
1924 RETVALUE(SPstTsk(pst,mBuf));
1928 /***********************************************************
1930 * Func : cmUnpkTfuDlCqiInd
1933 * Desc : This API is used to indicate the reception of CQI report from PHY to
1934 * Scheduler, also carries the RI.
1935 * @param pst Pointer to the post structure.
1936 * @param suId SAP ID of the service user.
1937 * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
1938 * @return ROK/RFAILED
1947 **********************************************************/
1949 PUBLIC S16 cmUnpkTfuDlCqiInd
1956 PUBLIC S16 cmUnpkTfuDlCqiInd(func, pst, mBuf)
1963 TfuDlCqiIndInfo *dlCqiInd;
1965 TRC3(cmUnpkTfuDlCqiInd)
1967 if (SUnpkS16(&suId, mBuf) != ROK) {
1969 #if (ERRCLASS & ERRCLS_ADD_RES)
1970 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1971 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1972 (ErrVal)ETFU064, (ErrVal)0, "Packing failed");
1976 if (pst->selector != TFU_SEL_LWLC) {
1978 sMem.region = pst->region;
1979 sMem.pool = pst->pool;
1980 if ((cmAllocEvnt(sizeof(TfuDlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&dlCqiInd)) != ROK) {
1981 #if (ERRCLASS & ERRCLS_ADD_RES)
1982 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1983 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1984 (ErrVal)ETFU065, (ErrVal)0, "Packing failed");
1992 if (pst->selector == TFU_SEL_LC)
1994 if (cmUnpkTfuDlCqiIndInfo(dlCqiInd, (Ptr)&dlCqiInd->memCp, mBuf) != ROK) {
1995 TFU_FREE_MEM(dlCqiInd);
1997 #if (ERRCLASS & ERRCLS_ADD_RES)
1998 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1999 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2000 (ErrVal)ETFU066, (ErrVal)0, "Packing failed");
2005 else if(pst->selector == TFU_SEL_LWLC)
2007 if (cmUnpkPtr((PTR *)&dlCqiInd, mBuf) != ROK)
2009 #if (ERRCLASS & ERRCLS_ADD_RES)
2010 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2011 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2012 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2014 TFU_FREE_MEM(dlCqiInd);
2020 RETVALUE((*func)(pst, suId, dlCqiInd));
2027 /***********************************************************
2029 * Func : cmPkTfuRawCqiInd
2032 * Desc : This Primitive is used to convey the Raw CQI information
2033 * transmitted by the UE.
2034 * @details Raw CQI report is the actual bits transmitted by the UE when
2035 * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI
2036 * etc. shall be done by MAC.
2038 * @param pst Pointer to the post structure.
2039 * @param suId SAP ID of the service user.
2040 * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
2041 * @return ROK/RFAILED
2050 **********************************************************/
2052 PUBLIC S16 cmPkTfuRawCqiInd
2056 TfuRawCqiIndInfo * rawCqiInd
2059 PUBLIC S16 cmPkTfuRawCqiInd(pst, suId, rawCqiInd)
2062 TfuRawCqiIndInfo * rawCqiInd;
2065 Buffer *mBuf = NULLP;
2066 TRC3(cmPkTfuRawCqiInd)
2068 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2069 #if (ERRCLASS & ERRCLS_ADD_RES)
2070 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2071 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2072 (ErrVal)ETFU067, (ErrVal)0, "Packing failed");
2074 TFU_FREE_MEM(rawCqiInd);
2077 cmPkTfuRawCqiIndInfo(rawCqiInd, mBuf);
2078 if (SPkS16(suId, mBuf) != ROK) {
2079 #if (ERRCLASS & ERRCLS_ADD_RES)
2080 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2081 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2082 (ErrVal)ETFU068, (ErrVal)0, "Packing failed");
2084 TFU_FREE_MEM(rawCqiInd);
2088 TFU_FREE_MEM(rawCqiInd);
2089 pst->event = (Event) EVTTFURAWCQIIND;
2090 RETVALUE(SPstTsk(pst,mBuf));
2094 /***********************************************************
2096 * Func : cmUnpkTfuRawCqiInd
2099 * Desc : This Primitive is used to convey the Raw CQI information
2100 * transmitted by the UE.
2101 * @details Raw CQI report is the actual bits transmitted by the UE when
2102 * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI
2103 * etc. shall be done by MAC.
2105 * @param pst Pointer to the post structure.
2106 * @param suId SAP ID of the service user.
2107 * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
2108 * @return ROK/RFAILED
2117 **********************************************************/
2119 PUBLIC S16 cmUnpkTfuRawCqiInd
2126 PUBLIC S16 cmUnpkTfuRawCqiInd(func, pst, mBuf)
2133 TfuRawCqiIndInfo *rawCqiInd;
2135 TRC3(cmUnpkTfuRawCqiInd)
2137 if (SUnpkS16(&suId, mBuf) != ROK) {
2139 #if (ERRCLASS & ERRCLS_ADD_RES)
2140 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2141 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2142 (ErrVal)ETFU069, (ErrVal)0, "Packing failed");
2148 sMem.region = pst->region;
2149 sMem.pool = pst->pool;
2150 if ((cmAllocEvnt(sizeof(TfuRawCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&rawCqiInd)) != ROK) {
2151 #if (ERRCLASS & ERRCLS_ADD_RES)
2152 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2153 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2154 (ErrVal)ETFU070, (ErrVal)0, "Packing failed");
2160 cmUnpkTfuRawCqiIndInfo(rawCqiInd, (Ptr)&rawCqiInd->memCp, mBuf);
2162 RETVALUE((*func)(pst, suId, rawCqiInd));
2166 /***********************************************************
2168 * Func : cmPkTfuSrsInd
2171 * Desc : This Primitive is used to convey the information derived by the
2172 * physical layer from the SRS transmission from the UE.
2173 * @details This primitive carries information derived from the SRS transmission
2176 * @param pst Pointer to the post structure.
2177 * @param suId SAP ID of the service user.
2178 * @param srsInd Pointer to the TfuSrIndInfo structure.
2179 * @return ROK/RFAILED
2188 **********************************************************/
2190 PUBLIC S16 cmPkTfuSrsInd
2194 TfuSrsIndInfo * srsInd
2197 PUBLIC S16 cmPkTfuSrsInd(pst, suId, srsInd)
2200 TfuSrsIndInfo * srsInd;
2203 Buffer *mBuf = NULLP;
2206 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2207 #if (ERRCLASS & ERRCLS_ADD_RES)
2208 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2209 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2210 (ErrVal)ETFU071, (ErrVal)0, "Packing failed");
2212 TFU_FREE_MEM(srsInd);
2215 cmPkTfuSrsIndInfo(srsInd, mBuf);
2216 if (SPkS16(suId, mBuf) != ROK) {
2217 #if (ERRCLASS & ERRCLS_ADD_RES)
2218 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2219 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2220 (ErrVal)ETFU072, (ErrVal)0, "Packing failed");
2222 TFU_FREE_MEM(srsInd);
2226 TFU_FREE_MEM(srsInd);
2227 pst->event = (Event) EVTTFUSRSIND;
2228 RETVALUE(SPstTsk(pst,mBuf));
2232 /***********************************************************
2234 * Func : cmUnpkTfuSrsInd
2237 * Desc : This Primitive is used to convey the information derived by the
2238 * physical layer from the SRS transmission from the UE.
2239 * @details This primitive carries information derived from the SRS transmission
2242 * @param pst Pointer to the post structure.
2243 * @param suId SAP ID of the service user.
2244 * @param srsInd Pointer to the TfuSrIndInfo structure.
2245 * @return ROK/RFAILED
2254 **********************************************************/
2256 PUBLIC S16 cmUnpkTfuSrsInd
2263 PUBLIC S16 cmUnpkTfuSrsInd(func, pst, mBuf)
2270 TfuSrsIndInfo *srsInd;
2272 TRC3(cmUnpkTfuSrsInd)
2274 if (SUnpkS16(&suId, mBuf) != ROK) {
2276 #if (ERRCLASS & ERRCLS_ADD_RES)
2277 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2278 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2279 (ErrVal)ETFU073, (ErrVal)0, "Packing failed");
2285 sMem.region = pst->region;
2286 sMem.pool = pst->pool;
2287 if ((cmAllocEvnt(sizeof(TfuSrsIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srsInd)) != ROK) {
2288 #if (ERRCLASS & ERRCLS_ADD_RES)
2289 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2290 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2291 (ErrVal)ETFU074, (ErrVal)0, "Packing failed");
2297 cmUnpkTfuSrsIndInfo(srsInd, (Ptr)&srsInd->memCp, mBuf);
2299 RETVALUE((*func)(pst, suId, srsInd));
2305 /***********************************************************
2307 * Func : cmPkTfuDatInd
2310 * Desc : This Primitive carries the Data PDUs from PHY to MAC.
2311 * @details The uplink Data i.e. the data transmitted by the UEs received by the
2312 * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2313 * is relayed to MAC using this primitive.
2316 * @param tfuDatInd pointer to TfuDatIndInfo
2326 **********************************************************/
2328 PUBLIC S16 cmPkTfuDatInd
2332 TfuDatIndInfo * datInd
2335 PUBLIC S16 cmPkTfuDatInd(pst, spId, datInd)
2338 TfuDatIndInfo * datInd;
2341 Buffer *mBuf = NULLP;
2344 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2345 #if (ERRCLASS & ERRCLS_ADD_RES)
2346 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2347 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2348 (ErrVal)ETFU075, (ErrVal)0, "Packing failed");
2350 TFU_FREE_MEM(datInd);
2353 if (pst->selector == TFU_SEL_LC) {
2354 if (cmPkTfuDatIndInfo(datInd, mBuf) != ROK) {
2355 #if (ERRCLASS & ERRCLS_ADD_RES)
2356 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2357 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2358 (ErrVal)ETFU076, (ErrVal)0, "Packing failed");
2360 TFU_FREE_MEM(datInd);
2365 else if(pst->selector == TFU_SEL_LWLC)
2367 if(cmPkPtr((PTR)datInd, mBuf) != ROK)
2369 #if (ERRCLASS & ERRCLS_ADD_RES)
2370 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2371 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2372 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2374 TFU_FREE_MEM(datInd);
2380 if (SPkS16(spId, mBuf) != ROK) {
2381 #if (ERRCLASS & ERRCLS_ADD_RES)
2382 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2383 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2384 (ErrVal)ETFU077, (ErrVal)0, "Packing failed");
2386 TFU_FREE_MEM(datInd);
2390 if (pst->selector != TFU_SEL_LWLC) {
2391 TFU_FREE_MEM(datInd);
2394 pst->event = (Event) EVTTFUDATIND;
2395 RETVALUE(SPstTsk(pst,mBuf));
2399 /***********************************************************
2401 * Func : cmUnpkTfuDatInd
2404 * Desc : This Primitive carries the Data PDUs from PHY to MAC.
2405 * @details The uplink Data i.e. the data transmitted by the UEs received by the
2406 * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2407 * is relayed to MAC using this primitive.
2410 * @param tfuDatInd pointer to TfuDatIndInfo
2420 **********************************************************/
2422 PUBLIC S16 cmUnpkTfuDatInd
2429 PUBLIC S16 cmUnpkTfuDatInd(func, pst, mBuf)
2436 TfuDatIndInfo *datInd;
2438 TRC3(cmUnpkTfuDatInd)
2440 if (SUnpkS16(&spId, mBuf) != ROK) {
2442 #if (ERRCLASS & ERRCLS_ADD_RES)
2443 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2444 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2445 (ErrVal)ETFU078, (ErrVal)0, "Packing failed");
2449 if (pst->selector != TFU_SEL_LWLC) {
2451 sMem.region = pst->region;
2452 sMem.pool = pst->pool;
2453 if ((cmAllocEvnt(sizeof(TfuDatIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&datInd)) != ROK) {
2454 #if (ERRCLASS & ERRCLS_ADD_RES)
2455 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2456 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2457 (ErrVal)ETFU079, (ErrVal)0, "Packing failed");
2465 if (pst->selector == TFU_SEL_LC)
2467 if (cmUnpkTfuDatIndInfo(datInd, (Ptr)&datInd->memCp, mBuf) != ROK) {
2468 TFU_FREE_MEM(datInd);
2470 #if (ERRCLASS & ERRCLS_ADD_RES)
2471 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2472 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2473 (ErrVal)ETFU080, (ErrVal)0, "Packing failed");
2478 else if(pst->selector == TFU_SEL_LWLC)
2480 if(cmUnpkPtr((PTR *)&datInd, mBuf) != ROK)
2482 #if (ERRCLASS & ERRCLS_ADD_RES)
2483 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2484 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2485 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2487 TFU_FREE_MEM(datInd);
2493 RETVALUE((*func)(pst, spId, datInd));
2497 /***********************************************************
2499 * Func : cmPkTfuCrcInd
2502 * Desc : This API is used by the Physical layer to indicate if the CRC Check
2503 * on the PUSCH Data was successful or not.
2504 * @details This primitive carries CRC indication for a list of UEs. This
2505 * is utilized in the scenario where MAC requested the reception of uplink data
2506 * for a particular UE. On reception of the PUSCH data, the CRC check on it
2507 * failed. This CRC failure is indicated to MAC, which would utillize this
2508 * information for further scheduling.
2509 * Physical layer would indicate failure or success for each PUSCH transmission.
2510 * @param pst Pointer to the post structure.
2511 * @param suId SAP ID of the service user.
2512 * @param crcInd Pointer to the TfuCrcIndInfo.
2513 * @return ROK/RFAILED
2522 **********************************************************/
2524 PUBLIC S16 cmPkTfuCrcInd
2528 TfuCrcIndInfo * crcIndInfo
2531 PUBLIC S16 cmPkTfuCrcInd(pst, suId, crcIndInfo)
2534 TfuCrcIndInfo * crcIndInfo;
2537 Buffer *mBuf = NULLP;
2540 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2541 #if (ERRCLASS & ERRCLS_ADD_RES)
2542 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2543 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2544 (ErrVal)ETFU081, (ErrVal)0, "Packing failed");
2546 TFU_FREE_MEM(crcIndInfo);
2549 if (pst->selector == TFU_SEL_LC) {
2550 if (cmPkTfuCrcIndInfo(crcIndInfo, mBuf) != ROK) {
2551 #if (ERRCLASS & ERRCLS_ADD_RES)
2552 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2553 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2554 (ErrVal)ETFU082, (ErrVal)0, "Packing failed");
2556 TFU_FREE_MEM(crcIndInfo);
2561 else if(pst->selector == TFU_SEL_LWLC)
2563 if (cmPkPtr((PTR)crcIndInfo, mBuf) != ROK)
2565 #if (ERRCLASS & ERRCLS_ADD_RES)
2566 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2567 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2568 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2570 TFU_FREE_MEM(crcIndInfo);
2577 if (SPkS16(suId, mBuf) != ROK) {
2578 #if (ERRCLASS & ERRCLS_ADD_RES)
2579 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2580 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2581 (ErrVal)ETFU083, (ErrVal)0, "Packing failed");
2583 TFU_FREE_MEM(crcIndInfo);
2587 if (pst->selector != TFU_SEL_LWLC) {
2588 TFU_FREE_MEM(crcIndInfo);
2591 pst->event = (Event) EVTTFUCRCIND;
2592 RETVALUE(SPstTsk(pst,mBuf));
2596 /***********************************************************
2598 * Func : cmUnpkTfuCrcInd
2601 * Desc : This API is used by the Physical layer to indicate if the CRC Check
2602 * on the PUSCH Data was successful or not.
2603 * @details This primitive carries CRC indication for a list of UEs. This
2604 * is utilized in the scenario where MAC requested the reception of uplink data
2605 * for a particular UE. On reception of the PUSCH data, the CRC check on it
2606 * failed. This CRC failure is indicated to MAC, which would utillize this
2607 * information for further scheduling.
2608 * Physical layer would indicate failure or success for each PUSCH transmission.
2609 * @param pst Pointer to the post structure.
2610 * @param suId SAP ID of the service user.
2611 * @param crcInd Pointer to the TfuCrcIndInfo.
2612 * @return ROK/RFAILED
2621 **********************************************************/
2623 PUBLIC S16 cmUnpkTfuCrcInd
2630 PUBLIC S16 cmUnpkTfuCrcInd(func, pst, mBuf)
2637 TfuCrcIndInfo *crcIndInfo;
2639 TRC3(cmUnpkTfuCrcInd)
2641 if (SUnpkS16(&suId, mBuf) != ROK) {
2643 #if (ERRCLASS & ERRCLS_ADD_RES)
2644 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2645 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2646 (ErrVal)ETFU084, (ErrVal)0, "Packing failed");
2650 if (pst->selector != TFU_SEL_LWLC) {
2652 sMem.region = pst->region;
2653 sMem.pool = pst->pool;
2654 if ((cmAllocEvnt(sizeof(TfuCrcIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&crcIndInfo)) != ROK) {
2655 #if (ERRCLASS & ERRCLS_ADD_RES)
2656 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2657 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2658 (ErrVal)ETFU085, (ErrVal)0, "Packing failed");
2666 if (pst->selector == TFU_SEL_LC)
2668 if (cmUnpkTfuCrcIndInfo(crcIndInfo, (Ptr)&crcIndInfo->memCp, mBuf) != ROK) {
2669 TFU_FREE_MEM(crcIndInfo);
2671 #if (ERRCLASS & ERRCLS_ADD_RES)
2672 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2673 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2674 (ErrVal)ETFU086, (ErrVal)0, "Packing failed");
2679 else if(pst->selector == TFU_SEL_LWLC)
2681 if (cmUnpkPtr((PTR *)&crcIndInfo, mBuf) != ROK)
2683 #if (ERRCLASS & ERRCLS_ADD_RES)
2684 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2685 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2686 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2688 TFU_FREE_MEM(crcIndInfo);
2694 RETVALUE((*func)(pst, suId, crcIndInfo));
2698 /***********************************************************
2700 * Func : cmPkTfuTimingAdvInd
2703 * Desc : This API is used to indicate a Timing Advance from PHY to Scheduler .
2704 * @details This primitive carries timing advance information for a number of
2705 * UEs that may need timing advance. Timing advance information is an estimate
2706 * of the timing adjustment that a UE would need to apply in order to be
2707 * synchronized in uplink. This estimate is to be calculated by physical layer.
2708 * @param pst Pointer to the post structure.
2709 * @param suId SAP ID of the service user.
2710 * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2711 * @return ROK/RFAILED
2720 **********************************************************/
2722 PUBLIC S16 cmPkTfuTimingAdvInd
2726 TfuTimingAdvIndInfo * timingAdvInd
2729 PUBLIC S16 cmPkTfuTimingAdvInd(pst, suId, timingAdvInd)
2732 TfuTimingAdvIndInfo * timingAdvInd;
2735 Buffer *mBuf = NULLP;
2736 TRC3(cmPkTfuTimingAdvInd)
2738 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2739 #if (ERRCLASS & ERRCLS_ADD_RES)
2740 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2741 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2742 (ErrVal)ETFU087, (ErrVal)0, "Packing failed");
2744 TFU_FREE_MEM(timingAdvInd);
2747 if (pst->selector == TFU_SEL_LC) {
2748 if (cmPkTfuTimingAdvIndInfo(timingAdvInd, mBuf) != ROK) {
2749 #if (ERRCLASS & ERRCLS_ADD_RES)
2750 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2751 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2752 (ErrVal)ETFU088, (ErrVal)0, "Packing failed");
2754 TFU_FREE_MEM(timingAdvInd);
2759 else if(pst->selector == TFU_SEL_LWLC)
2761 if (cmPkPtr((PTR)timingAdvInd, mBuf) != ROK)
2763 #if (ERRCLASS & ERRCLS_ADD_RES)
2764 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2765 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2766 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2768 TFU_FREE_MEM(timingAdvInd);
2774 if (SPkS16(suId, mBuf) != ROK) {
2775 #if (ERRCLASS & ERRCLS_ADD_RES)
2776 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2777 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2778 (ErrVal)ETFU089, (ErrVal)0, "Packing failed");
2780 TFU_FREE_MEM(timingAdvInd);
2784 if (pst->selector != TFU_SEL_LWLC) {
2785 TFU_FREE_MEM(timingAdvInd);
2788 pst->event = (Event) EVTTFUTIMINGADVIND;
2789 RETVALUE(SPstTsk(pst,mBuf));
2793 /***********************************************************
2795 * Func : cmUnpkTfuTimingAdvInd
2798 * Desc : This API is used to indicate a Timing Advance from PHY to Scheduler .
2799 * @details This primitive carries timing advance information for a number of
2800 * UEs that may need timing advance. Timing advance information is an estimate
2801 * of the timing adjustment that a UE would need to apply in order to be
2802 * synchronized in uplink. This estimate is to be calculated by physical layer.
2803 * @param pst Pointer to the post structure.
2804 * @param suId SAP ID of the service user.
2805 * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2806 * @return ROK/RFAILED
2815 **********************************************************/
2817 PUBLIC S16 cmUnpkTfuTimingAdvInd
2819 TfuTimingAdvInd func,
2824 PUBLIC S16 cmUnpkTfuTimingAdvInd(func, pst, mBuf)
2825 TfuTimingAdvInd func;
2831 TfuTimingAdvIndInfo *timingAdvInd;
2833 TRC3(cmUnpkTfuTimingAdvInd)
2835 if (SUnpkS16(&suId, mBuf) != ROK) {
2837 #if (ERRCLASS & ERRCLS_ADD_RES)
2838 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2839 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2840 (ErrVal)ETFU090, (ErrVal)0, "Packing failed");
2844 if (pst->selector != TFU_SEL_LWLC) {
2846 sMem.region = pst->region;
2847 sMem.pool = pst->pool;
2848 if ((cmAllocEvnt(sizeof(TfuTimingAdvIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&timingAdvInd)) != ROK) {
2849 #if (ERRCLASS & ERRCLS_ADD_RES)
2850 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2851 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2852 (ErrVal)ETFU091, (ErrVal)0, "Packing failed");
2860 if (pst->selector == TFU_SEL_LC)
2862 if (cmUnpkTfuTimingAdvIndInfo(timingAdvInd, (Ptr)&timingAdvInd->memCp, mBuf) != ROK) {
2863 TFU_FREE_MEM(timingAdvInd);
2865 #if (ERRCLASS & ERRCLS_ADD_RES)
2866 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2867 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2868 (ErrVal)ETFU092, (ErrVal)0, "Packing failed");
2873 else if(pst->selector == TFU_SEL_LWLC)
2875 if (cmUnpkPtr((PTR *)&timingAdvInd, mBuf) != ROK)
2877 #if (ERRCLASS & ERRCLS_ADD_RES)
2878 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2879 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2880 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2882 TFU_FREE_MEM(timingAdvInd);
2888 RETVALUE((*func)(pst, suId, timingAdvInd));
2892 /***********************************************************
2894 * Func : cmPkTfuDatReq
2897 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
2899 * @details The data being sent in this primitive is meant to be transmitted on
2900 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
2901 * layer processing, requisite control information is also sent along with the
2903 * @sa TfUiTfuCntrlReq
2906 * @param tfuDatReq pointer to TfuDatReqInfo
2916 **********************************************************/
2918 PUBLIC S16 cmPkTfuDatReq
2922 TfuDatReqInfo * datReq
2925 PUBLIC S16 cmPkTfuDatReq(pst, spId, datReq)
2928 TfuDatReqInfo * datReq;
2931 Buffer *mBuf = NULLP;
2934 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2935 #if (ERRCLASS & ERRCLS_ADD_RES)
2936 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2937 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2938 (ErrVal)ETFU093, (ErrVal)0, "Packing failed");
2940 TFU_FREE_MEM(datReq);
2943 if (pst->selector == TFU_SEL_LC) {
2944 if (cmPkTfuDatReqInfo(datReq, mBuf) != ROK) {
2945 #if (ERRCLASS & ERRCLS_ADD_RES)
2946 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2947 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2948 (ErrVal)ETFU094, (ErrVal)0, "Packing failed");
2950 TFU_FREE_MEM(datReq);
2955 else if(pst->selector == TFU_SEL_LWLC)
2957 if(cmPkPtr((PTR)datReq, mBuf) != ROK)
2959 #if (ERRCLASS & ERRCLS_ADD_RES)
2960 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2961 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2962 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2964 TFU_FREE_MEM(datReq);
2970 if (SPkS16(spId, mBuf) != ROK) {
2971 #if (ERRCLASS & ERRCLS_ADD_RES)
2972 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2973 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2974 (ErrVal)ETFU095, (ErrVal)0, "Packing failed");
2976 TFU_FREE_MEM(datReq);
2980 if (pst->selector != TFU_SEL_LWLC) {
2981 TFU_FREE_MEM(datReq);
2984 pst->event = (Event) EVTTFUDATREQ;
2985 RETVALUE(SPstTsk(pst,mBuf));
2989 /***********************************************************
2991 * Func : cmUnpkTfuDatReq
2994 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
2996 * @details The data being sent in this primitive is meant to be transmitted on
2997 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
2998 * layer processing, requisite control information is also sent along with the
3000 * @sa TfUiTfuCntrlReq
3003 * @param tfuDatReq pointer to TfuDatReqInfo
3013 **********************************************************/
3015 PUBLIC S16 cmUnpkTfuDatReq
3022 PUBLIC S16 cmUnpkTfuDatReq(func, pst, mBuf)
3029 TfuDatReqInfo *datReq;
3031 TRC3(cmUnpkTfuDatReq)
3033 if (SUnpkS16(&spId, mBuf) != ROK) {
3035 #if (ERRCLASS & ERRCLS_ADD_RES)
3036 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3037 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3038 (ErrVal)ETFU096, (ErrVal)0, "Packing failed");
3042 if (pst->selector != TFU_SEL_LWLC) {
3044 sMem.region = pst->region;
3045 sMem.pool = pst->pool;
3046 if ((cmAllocEvnt(sizeof(TfuDatReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&datReq)) != ROK) {
3047 #if (ERRCLASS & ERRCLS_ADD_RES)
3048 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3049 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3050 (ErrVal)ETFU097, (ErrVal)0, "Packing failed");
3058 if (pst->selector == TFU_SEL_LC)
3060 if (cmUnpkTfuDatReqInfo(datReq, (Ptr)&datReq->memCp, mBuf) != ROK) {
3061 TFU_FREE_MEM(datReq);
3063 #if (ERRCLASS & ERRCLS_ADD_RES)
3064 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3065 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3066 (ErrVal)ETFU098, (ErrVal)0, "Unpacking failed");
3071 else if (pst->selector == TFU_SEL_LWLC)
3073 if(cmUnpkPtr((PTR *)&datReq, mBuf) != ROK)
3075 TFU_FREE_MEM(datReq);
3077 #if (ERRCLASS & ERRCLS_ADD_RES)
3078 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3079 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3080 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Un-Packing failed");
3086 RETVALUE((*func)(pst, spId, datReq));
3090 /***********************************************************
3092 * Func : cmPkTfuCntrlReq
3095 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
3096 * all the control information
3097 * @details This primitive carries the information sent on the following
3105 * @param cntrlReq pointer to TfuCntrlReqInfo
3106 * @return ROK/RFAILED
3115 **********************************************************/
3117 PUBLIC S16 cmPkTfuCntrlReq
3121 TfuCntrlReqInfo * cntrlReq
3124 PUBLIC S16 cmPkTfuCntrlReq(pst, spId, cntrlReq)
3127 TfuCntrlReqInfo * cntrlReq;
3130 Buffer *mBuf = NULLP;
3131 TRC3(cmPkTfuCntrlReq)
3133 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3134 #if (ERRCLASS & ERRCLS_ADD_RES)
3135 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3136 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3137 (ErrVal)ETFU099, (ErrVal)0, "Packing failed");
3139 TFU_FREE_MEM(cntrlReq);
3142 if (pst->selector == TFU_SEL_LC) {
3143 if (cmPkTfuCntrlReqInfo(cntrlReq, mBuf) != ROK) {
3144 #if (ERRCLASS & ERRCLS_ADD_RES)
3145 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3146 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3147 (ErrVal)ETFU100, (ErrVal)0, "Packing failed");
3149 TFU_FREE_MEM(cntrlReq);
3154 else if(pst->selector == TFU_SEL_LWLC)
3156 if (cmPkPtr((PTR)cntrlReq, mBuf) != ROK)
3158 #if (ERRCLASS & ERRCLS_ADD_RES)
3159 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3160 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3161 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3163 TFU_FREE_MEM(cntrlReq);
3170 if (SPkS16(spId, mBuf) != ROK) {
3171 #if (ERRCLASS & ERRCLS_ADD_RES)
3172 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3173 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3174 (ErrVal)ETFU101, (ErrVal)0, "Packing failed");
3176 TFU_FREE_MEM(cntrlReq);
3180 if (pst->selector != TFU_SEL_LWLC) {
3181 TFU_FREE_MEM(cntrlReq);
3184 pst->event = (Event) EVTTFUCNTRLREQ;
3185 RETVALUE(SPstTsk(pst,mBuf));
3189 /***********************************************************
3191 * Func : cmUnpkTfuCntrlReq
3194 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
3195 * all the control information
3196 * @details This primitive carries the information sent on the following
3204 * @param cntrlReq pointer to TfuCntrlReqInfo
3205 * @return ROK/RFAILED
3214 **********************************************************/
3216 PUBLIC S16 cmUnpkTfuCntrlReq
3223 PUBLIC S16 cmUnpkTfuCntrlReq(func, pst, mBuf)
3230 TfuCntrlReqInfo *cntrlReq;
3232 TRC3(cmUnpkTfuCntrlReq)
3234 if (SUnpkS16(&spId, mBuf) != ROK) {
3236 #if (ERRCLASS & ERRCLS_ADD_RES)
3237 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3238 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3239 (ErrVal)ETFU102, (ErrVal)0, "Packing failed");
3243 if (pst->selector != TFU_SEL_LWLC) {
3245 sMem.region = pst->region;
3246 sMem.pool = pst->pool;
3247 if ((cmAllocEvnt(sizeof(TfuCntrlReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&cntrlReq)) != ROK) {
3248 #if (ERRCLASS & ERRCLS_ADD_RES)
3249 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3250 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3251 (ErrVal)ETFU103, (ErrVal)0, "Packing failed");
3259 if (pst->selector == TFU_SEL_LC)
3261 if (cmUnpkTfuCntrlReqInfo(cntrlReq, (Ptr)&cntrlReq->memCp, mBuf) != ROK) {
3262 TFU_FREE_MEM(cntrlReq);
3264 #if (ERRCLASS & ERRCLS_ADD_RES)
3265 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3266 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3267 (ErrVal)ETFU104, (ErrVal)0, "Packing failed");
3272 else if(pst->selector == TFU_SEL_LWLC)
3274 if (cmUnpkPtr((PTR *)&cntrlReq, mBuf) != ROK)
3276 #if (ERRCLASS & ERRCLS_ADD_RES)
3277 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3278 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3279 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3281 TFU_FREE_MEM(cntrlReq);
3287 RETVALUE((*func)(pst, spId, cntrlReq));
3292 /***********************************************************
3294 * Func : cmPkTfuTtiInd
3297 * Desc : This API is the TTI indication from PHY to MAC .
3298 * @details This primitive provides the timing information (SFN and subframe)
3299 * which is currently running on the physical layer.
3300 * @param pst Pointer to the post structure.
3301 * @param suId SAP ID of the service user.
3302 * @param ttiInd Pointer to the TfuTtiIndInfo.
3303 * @return ROK/RFAILED
3312 **********************************************************/
3314 PUBLIC S16 cmPkTfuTtiInd
3318 TfuTtiIndInfo * ttiInd
3321 PUBLIC S16 cmPkTfuTtiInd(pst, suId, ttiInd)
3324 TfuTtiIndInfo * ttiInd;
3327 Buffer *mBuf = NULLP;
3330 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3331 #if (ERRCLASS & ERRCLS_ADD_RES)
3332 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3333 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3334 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
3336 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3339 if (pst->selector == TFU_SEL_LC) {
3340 if (cmPkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
3341 #if (ERRCLASS & ERRCLS_ADD_RES)
3342 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3343 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3344 (ErrVal)ETFU106, (ErrVal)0, "Packing failed");
3346 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3351 else if(pst->selector == TFU_SEL_LWLC)
3353 if (cmPkPtr((PTR)ttiInd, mBuf) != ROK)
3355 #if (ERRCLASS & ERRCLS_ADD_RES)
3356 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3357 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3358 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3361 /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/
3362 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3368 if (SPkS16(suId, mBuf) != ROK) {
3369 #if (ERRCLASS & ERRCLS_ADD_RES)
3370 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3371 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3372 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
3374 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3378 if (pst->selector != TFU_SEL_LWLC) {
3379 if (SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)) != ROK) {
3380 #if (ERRCLASS & ERRCLS_ADD_RES)
3381 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3382 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3383 (ErrVal)ETFU108, (ErrVal)0, "Packing failed");
3390 pst->event = (Event) EVTTFUTTIIND;
3391 RETVALUE(SPstTsk(pst,mBuf));
3395 /***********************************************************
3397 * Func : cmUnpkTfuTtiInd
3400 * Desc : This API is the TTI indication from PHY to MAC .
3401 * @details This primitive provides the timing information (SFN and subframe)
3402 * which is currently running on the physical layer.
3403 * @param pst Pointer to the post structure.
3404 * @param suId SAP ID of the service user.
3405 * @param ttiInd Pointer to the TfuTtiIndInfo.
3406 * @return ROK/RFAILED
3415 **********************************************************/
3417 PUBLIC S16 cmUnpkTfuTtiInd
3424 PUBLIC S16 cmUnpkTfuTtiInd(func, pst, mBuf)
3431 TfuTtiIndInfo *ttiInd;
3433 TRC3(cmUnpkTfuTtiInd)
3435 if (SUnpkS16(&suId, mBuf) != ROK) {
3437 #if (ERRCLASS & ERRCLS_ADD_RES)
3438 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3439 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3440 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
3444 if (pst->selector != TFU_SEL_LWLC) {
3445 if ((SGetSBuf(pst->region, pst->pool, (Data **)&ttiInd, sizeof(TfuTtiIndInfo))) != ROK) {
3446 #if (ERRCLASS & ERRCLS_ADD_RES)
3447 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3448 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3449 (ErrVal)ETFU110, (ErrVal)0, "Packing failed");
3456 if (pst->selector == TFU_SEL_LC)
3458 if (cmUnpkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
3459 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3461 #if (ERRCLASS & ERRCLS_ADD_RES)
3462 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3463 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3464 (ErrVal)ETFU111, (ErrVal)0, "Packing failed");
3469 else if(pst->selector == TFU_SEL_LWLC)
3471 if (cmUnpkPtr((PTR *)&ttiInd, mBuf) != ROK)
3473 #if (ERRCLASS & ERRCLS_ADD_RES)
3474 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3475 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3476 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3478 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3484 /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
3485 (*func)(pst, suId, ttiInd);
3486 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3488 RETVALUE((*func)(pst, suId, ttiInd));
3491 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
3492 /***********************************************************
3494 * Func : cmPkTfuNonRtInd
3497 * Desc : This API is the Non-Rt indication from CL to MAC .
3498 * @param pst Pointer to the post structure.
3499 * @param suId SAP ID of the service user.
3500 * @return ROK/RFAILED
3509 **********************************************************/
3511 PUBLIC S16 cmPkTfuNonRtInd
3517 PUBLIC S16 cmPkTfuNonRtInd(pst, suId)
3522 Buffer *mBuf = NULLP;
3523 TRC3(cmPkTfuNonRtInd)
3525 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3526 #if (ERRCLASS & ERRCLS_ADD_RES)
3527 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3528 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3529 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
3533 if (SPkS16(suId, mBuf) != ROK) {
3534 #if (ERRCLASS & ERRCLS_ADD_RES)
3535 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3536 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3537 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
3542 pst->event = (Event) EVTTFUNONRTIND;
3543 RETVALUE(SPstTsk(pst,mBuf));
3546 /***********************************************************
3548 * Func : cmUnpkTfuNonRtInd
3551 * Desc : This API is the Non Rt indication from PHY to MAC .
3552 * @param pst Pointer to the post structure.
3553 * @param suId SAP ID of the service user.
3554 * @return ROK/RFAILED
3563 **********************************************************/
3565 PUBLIC S16 cmUnpkTfuNonRtInd
3572 PUBLIC S16 cmUnpkTfuNonRtInd(func, pst, mBuf)
3579 TRC3(cmUnpkTfuNonRtInd)
3581 if (SUnpkS16(&suId, mBuf) != ROK) {
3583 #if (ERRCLASS & ERRCLS_ADD_RES)
3584 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3585 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3586 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
3591 RETVALUE((*func)(pst, suId));
3596 /***********************************************************
3598 * Func : cmPkTfuSchTtiInd
3601 * Desc : This API is the TTI indication from PHY to scheduler.
3602 * @details This primitive provides the timing information (SFN and subframe)
3603 * which is currently running on the physical layer.
3604 * @param pst Pointer to the post structure.
3605 * @param suId SAP ID of the service user.
3606 * @param ttiInd Pointer to the TfuTtiIndInfo.
3607 * @return ROK/RFAILED
3616 **********************************************************/
3618 PUBLIC S16 cmPkTfuSchTtiInd
3622 TfuTtiIndInfo * ttiInd
3625 PUBLIC S16 cmPkTfuSchTtiInd(pst, suId, ttiInd)
3628 TfuTtiIndInfo * ttiInd;
3631 Buffer *mBuf = NULLP;
3632 TRC3(cmPkTfuSchTtiInd)
3634 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3635 #if (ERRCLASS & ERRCLS_ADD_RES)
3636 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3637 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3638 (ErrVal)ETFU112, (ErrVal)0, "Packing failed");
3640 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3643 if (pst->selector == TFU_SEL_LC) {
3644 if (cmPkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
3645 #if (ERRCLASS & ERRCLS_ADD_RES)
3646 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3647 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3648 (ErrVal)ETFU113, (ErrVal)0, "Packing failed");
3650 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3655 else if(pst->selector == TFU_SEL_LWLC)
3657 if (cmPkPtr((PTR)ttiInd, mBuf) != ROK)
3659 #if (ERRCLASS & ERRCLS_ADD_RES)
3660 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3661 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3662 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3664 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3670 if (SPkS16(suId, mBuf) != ROK) {
3671 #if (ERRCLASS & ERRCLS_ADD_RES)
3672 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3673 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3674 (ErrVal)ETFU114, (ErrVal)0, "Packing failed");
3676 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3680 if (pst->selector != TFU_SEL_LWLC) {
3681 if (SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)) != ROK) {
3682 #if (ERRCLASS & ERRCLS_ADD_RES)
3683 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3684 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3685 (ErrVal)ETFU115, (ErrVal)0, "Packing failed");
3691 pst->event = (Event) EVTTFUSCHTTIIND;
3692 RETVALUE(SPstTsk(pst,mBuf));
3696 /***********************************************************
3698 * Func : cmUnpkTfuSchTtiInd
3701 * Desc : This API is the TTI indication from PHY to scheduler.
3702 * @details This primitive provides the timing information (SFN and subframe)
3703 * which is currently running on the physical layer.
3704 * @param pst Pointer to the post structure.
3705 * @param suId SAP ID of the service user.
3706 * @param ttiInd Pointer to the TfuTtiIndInfo.
3707 * @return ROK/RFAILED
3716 **********************************************************/
3718 PUBLIC S16 cmUnpkTfuSchTtiInd
3725 PUBLIC S16 cmUnpkTfuSchTtiInd(func, pst, mBuf)
3732 TfuTtiIndInfo *ttiInd;
3734 TRC3(cmUnpkTfuSchTtiInd)
3736 if (SUnpkS16(&suId, mBuf) != ROK) {
3738 #if (ERRCLASS & ERRCLS_ADD_RES)
3739 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3740 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3741 (ErrVal)ETFU116, (ErrVal)0, "Packing failed");
3745 if (pst->selector != TFU_SEL_LWLC) {
3746 if ((SGetSBuf(pst->region, pst->pool, (Data **)&ttiInd, sizeof(TfuTtiIndInfo))) != ROK) {
3747 #if (ERRCLASS & ERRCLS_ADD_RES)
3748 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3749 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3750 (ErrVal)ETFU117, (ErrVal)0, "Packing failed");
3757 if (pst->selector == TFU_SEL_LC)
3759 if (cmUnpkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
3760 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3762 #if (ERRCLASS & ERRCLS_ADD_RES)
3763 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3764 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3765 (ErrVal)ETFU118, (ErrVal)0, "Packing failed");
3770 else if(pst->selector == TFU_SEL_LWLC)
3772 if (cmUnpkPtr((PTR *)&ttiInd, mBuf) != ROK)
3774 #if (ERRCLASS & ERRCLS_ADD_RES)
3775 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3776 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3777 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3779 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3785 /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
3786 (*func)(pst, suId, ttiInd);
3787 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3793 /***********************************************************
3795 * Func : cmPkTfuPucchDeltaPwr
3798 * Desc : This Primitive is used to convey PUCCH Delta power calculated by the
3800 * This information is utilized by Scheduler for power control.
3801 * @param pst Pointer to the post structure.
3802 * @param suId SAP ID of the service user.
3803 * @param Pointer to the TfuPucchDeltaPwrIndInfo structure.
3804 * @return ROK/RFAILED
3813 **********************************************************/
3815 PUBLIC S16 cmPkTfuPucchDeltaPwr
3819 TfuPucchDeltaPwrIndInfo * pucchDeltaPwr
3822 PUBLIC S16 cmPkTfuPucchDeltaPwr(pst, suId, pucchDeltaPwr)
3825 TfuPucchDeltaPwrIndInfo * pucchDeltaPwr;
3828 Buffer *mBuf = NULLP;
3829 TRC3(cmPkTfuPucchDeltaPwr)
3831 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3832 #if (ERRCLASS & ERRCLS_ADD_RES)
3833 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3834 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3835 (ErrVal)ETFU119, (ErrVal)0, "Packing failed");
3837 SPutSBuf(pst->region, pst->pool, (Data *)pucchDeltaPwr, sizeof(TfuPucchDeltaPwrIndInfo));
3840 if (pst->selector == TFU_SEL_LC) {
3841 if (cmPkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, mBuf) != ROK) {
3842 #if (ERRCLASS & ERRCLS_ADD_RES)
3843 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3844 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3845 (ErrVal)ETFU120, (ErrVal)0, "Packing failed");
3847 TFU_FREE_MEM(pucchDeltaPwr);
3852 else if(pst->selector == TFU_SEL_LWLC)
3854 if (cmPkPtr((PTR)pucchDeltaPwr, mBuf) != ROK)
3856 #if (ERRCLASS & ERRCLS_ADD_RES)
3857 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3858 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3859 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3861 TFU_FREE_MEM(pucchDeltaPwr);
3867 if (SPkS16(suId, mBuf) != ROK) {
3868 #if (ERRCLASS & ERRCLS_ADD_RES)
3869 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3870 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3871 (ErrVal)ETFU121, (ErrVal)0, "Packing failed");
3873 TFU_FREE_MEM(pucchDeltaPwr);
3877 if (pst->selector != TFU_SEL_LWLC) {
3878 TFU_FREE_MEM(pucchDeltaPwr);
3880 pst->event = (Event) EVTTFUPUCCHDELPWR;
3881 RETVALUE(SPstTsk(pst,mBuf));
3885 /***********************************************************
3887 * Func : cmUnpkTfuPucchDeltaPwr
3890 * Desc : This Primitive is used to convey PUCCH Delta power calculated by the
3892 * This information is utilized by Scheduler for power control.
3893 * @param pst Pointer to the post structure.
3894 * @param suId SAP ID of the service user.
3895 * @param Pointer to the TfuPucchDeltaPwrIndInfo structure.
3896 * @return ROK/RFAILED
3905 **********************************************************/
3907 PUBLIC S16 cmUnpkTfuPucchDeltaPwr
3909 TfuPucchDeltaPwrInd func,
3914 PUBLIC S16 cmUnpkTfuPucchDeltaPwr(func, pst, mBuf)
3915 TfuPucchDeltaPwrInd func;
3921 TfuPucchDeltaPwrIndInfo *pucchDeltaPwr;
3923 TRC3(cmUnpkTfuPucchDeltaPwr)
3925 if (SUnpkS16(&suId, mBuf) != ROK) {
3927 #if (ERRCLASS & ERRCLS_ADD_RES)
3928 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3929 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3930 (ErrVal)ETFU122, (ErrVal)0, "Packing failed");
3934 if (pst->selector != TFU_SEL_LWLC) {
3936 sMem.region = pst->region;
3937 sMem.pool = pst->pool;
3938 if ((cmAllocEvnt(sizeof(TfuPucchDeltaPwrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&pucchDeltaPwr)) != ROK) {
3939 #if (ERRCLASS & ERRCLS_ADD_RES)
3940 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3941 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3942 (ErrVal)ETFU123, (ErrVal)0, "Packing failed");
3949 if (pst->selector == TFU_SEL_LC)
3951 if (cmUnpkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, (Ptr)&pucchDeltaPwr->memCp, mBuf) != ROK) {
3952 TFU_FREE_MEM(pucchDeltaPwr);
3954 #if (ERRCLASS & ERRCLS_ADD_RES)
3955 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3956 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3957 (ErrVal)ETFU124, (ErrVal)0, "Packing failed");
3962 else if(pst->selector == TFU_SEL_LWLC)
3964 if (cmUnpkPtr((PTR *)&pucchDeltaPwr, mBuf) != ROK)
3966 #if (ERRCLASS & ERRCLS_ADD_RES)
3967 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3968 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3969 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3971 TFU_FREE_MEM(pucchDeltaPwr);
3977 RETVALUE((*func)(pst, suId, pucchDeltaPwr));
3982 /***********************************************************
3984 * Func : cmPkTfuRbAssignA1Val324
3987 * Desc : This structure contains the information needed to convey RIV value 324.
3996 **********************************************************/
3998 PUBLIC S16 cmPkTfuRbAssignA1Val324
4000 TfuRbAssignA1Val324 *param,
4004 PUBLIC S16 cmPkTfuRbAssignA1Val324(param, mBuf)
4005 TfuRbAssignA1Val324 *param;
4010 TRC3(cmPkTfuRbAssignA1Val324)
4012 CMCHKPK(SPkU8, param->ndi, mBuf);
4013 CMCHKPK(SPkU8, param->mcs, mBuf);
4014 CMCHKPK(SPkU8, param->hqProcId, mBuf);
4016 printf("cmPkTfuRbAssignA1Val324 param->ndi %d mcs %d param->hqProcId %d \n",param->ndi,param->mcs,param->hqProcId);
4022 /***********************************************************
4024 * Func : cmPkTfuRbAssignB1Val324
4027 * Desc : This structure contains the information needed to convey RIV value 324.
4036 **********************************************************/
4038 PUBLIC S16 cmPkTfuRbAssignB1Val324
4040 TfuRbAssignB1Val324 *param,
4044 PUBLIC S16 cmPkTfuRbAssignB1Val324(param, mBuf)
4045 TfuRbAssignB1Val324 *param;
4050 TRC3(cmPkTfuRbAssignB1Val324)
4052 CMCHKPK(SPkU8, param->bmiHqAckNack, mBuf);
4053 CMCHKPK(SPkU8, param->RV, mBuf);
4054 CMCHKPK(SPkU8, param->ndi, mBuf);
4055 CMCHKPK(SPkU8, param->mcs, mBuf);
4056 CMCHKPK(SPkU8, param->hqProcId, mBuf);
4061 /***********************************************************
4063 * Func : cmPkTfuRbAssignVal326
4066 * Desc : This structure contains the information needed to convey RIV value 326.
4075 **********************************************************/
4077 PUBLIC S16 cmPkTfuRbAssignVal326
4079 TfuRbAssignVal326 *param,
4083 PUBLIC S16 cmPkTfuRbAssignVal326(param, mBuf)
4084 TfuRbAssignVal326 *param;
4089 TRC3(cmPkTfuRbAssignVal326)
4091 CMCHKPK(SPkU8, param->CyclicShiftInd, mBuf);
4092 CMCHKPK(SPkU8, param->OCCInd, mBuf);
4093 CMCHKPK(SPkU8, param->FreqBandIdx, mBuf);
4098 /***********************************************************
4100 * Func : cmUnpkTfuRbAssignA1Val324
4103 * Desc : This structure contains the information needed to convey RIV value 324.
4112 **********************************************************/
4114 PUBLIC S16 cmUnpkTfuRbAssignA1Val324
4116 TfuRbAssignA1Val324 *param,
4120 PUBLIC S16 cmUnpkTfuRbAssignA1Val324(param, mBuf)
4121 TfuRbAssignA1Val324 *param;
4126 TRC3(cmUnpkTfuRbAssignA1Val324)
4128 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
4129 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4130 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4135 /***********************************************************
4137 * Func : cmUnpkTfuRbAssignB1Val324
4140 * Desc : This structure contains the information needed to convey RIV value 324.
4149 **********************************************************/
4151 PUBLIC S16 cmUnpkTfuRbAssignB1Val324
4153 TfuRbAssignB1Val324 *param,
4157 PUBLIC S16 cmUnpkTfuRbAssignB1Val324(param, mBuf)
4158 TfuRbAssignB1Val324 *param;
4163 TRC3(cmUnpkTfuRbAssignB1Val324)
4165 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
4166 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4167 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4168 CMCHKUNPK(SUnpkU8, ¶m->RV, mBuf);
4169 CMCHKUNPK(SUnpkU8, ¶m->bmiHqAckNack, mBuf);
4174 /***********************************************************
4176 * Func : cmUnpkTfuRbAssignVal326
4179 * Desc : This structure contains the information needed to convey RIV value 326.
4188 **********************************************************/
4190 PUBLIC S16 cmUnpkTfuRbAssignVal326
4192 TfuRbAssignVal326 *param,
4196 PUBLIC S16 cmUnpkTfuRbAssignVal326(param, mBuf)
4197 TfuRbAssignVal326 *param;
4202 TRC3(cmUnpkTfuRbAssignVal326)
4204 CMCHKUNPK(SUnpkU8, ¶m->FreqBandIdx, mBuf);
4205 CMCHKUNPK(SUnpkU8, ¶m->OCCInd, mBuf);
4206 CMCHKUNPK(SUnpkU8, ¶m->CyclicShiftInd, mBuf);
4212 /***********************************************************
4214 * Func : cmPkTfuDciFormatA1A2Info
4217 * Desc : This structure contains the information needed to convey DCI format A1/A2.
4226 **********************************************************/
4228 PUBLIC S16 cmPkTfuDciFormatA1A2Info
4230 TfuDciFormatA1Info *param,
4234 PUBLIC S16 cmPkTfuDciFormatA1A2Info(param, mBuf)
4235 TfuDciFormatA1Info *param;
4240 TRC3(cmPkTfuDciFormatA1A2Info)
4242 //printf("5GTF_DBG: cmPkTfuDciFormatA1Info() called by eNB\n");
4243 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4244 CMCHKPK(SPkU8, param->UL_PCRS, mBuf);
4245 CMCHKPK(SPkU8, param->PMI, mBuf);
4246 CMCHKPK(SPkU8, param->SCID, mBuf);
4248 CMCHKPK(SPkU8, param->REMapIdx_DMRS_PCRS_numLayers, mBuf);
4249 CMCHKPK(SPkU8, param->SRS_Symbol, mBuf);
4250 CMCHKPK(SPkU8, param->SRS_Config, mBuf);
4251 CMCHKPK(SPkU8, param->beamSwitch, mBuf);
4252 CMCHKPK(SPkU8, param->uciOnxPUSCH, mBuf);
4254 CMCHKPK(SPkU8, param->numBSI_Reports, mBuf);
4255 CMCHKPK(SPkU8, param->CSIRS_BRRS_ProcInd, mBuf);
4256 CMCHKPK(SPkU8, param->CSI_BRRS_Indicator, mBuf);
4257 CMCHKPK(SPkU8, param->CSIRS_BRRS_SymbIdx, mBuf);
4258 CMCHKPK(SPkU8, param->CSIRS_BRRS_TxTiming, mBuf);
4259 CMCHKPK(SPkU8, param->CSI_BSI_BRI_Req, mBuf);
4261 if(param->RBAssign <= TFU_RIV_324)
4263 CMCHKPK(cmPkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf);
4265 else if (param->RBAssign == TFU_RIV_326)
4267 CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4270 CMCHKPK(SPkU8, param->rv, mBuf);
4271 CMCHKPK(SPkU8, param->symbIdx, mBuf);
4272 CMCHKPK(SPkU8, param->beamIndex, mBuf);
4273 CMCHKPK(SPkU16, param->RBAssign, mBuf);
4274 CMCHKPK(SPkU8, param->xPUSCH_TxTiming, mBuf);
4275 CMCHKPK(SPkU8, param->xPUSCHRange, mBuf);
4276 CMCHKPK(SPkU8, param->formatType, mBuf);
4281 /***********************************************************
4283 * Func : cmPkTfuDciFormatB1B2Info
4286 * Desc : This structure contains the information needed to convey DCI format B1/B2.
4295 **********************************************************/
4297 PUBLIC S16 cmPkTfuDciFormatB1B2Info
4299 TfuDciFormatB1Info *param,
4303 PUBLIC S16 cmPkTfuDciFormatB1B2Info(param, mBuf)
4304 TfuDciFormatB1Info *param;
4309 TRC3(cmPkTfuDciFormatB1B2Info)
4311 CMCHKPK(SPkU8, param->DL_PCRS, mBuf);
4312 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4313 CMCHKPK(SPkU8, param->SCID, mBuf);
4315 CMCHKPK(SPkU8, param->AntPorts_numLayers, mBuf);
4316 CMCHKPK(SPkU8, param->SRS_Symbol, mBuf);
4317 CMCHKPK(SPkU8, param->SRS_Config, mBuf);
4318 CMCHKPK(SPkU8, param->beamSwitch, mBuf);
4319 CMCHKPK(SPkU8, param->freqResIdx_xPUCCH, mBuf);
4321 CMCHKPK(SPkU8, param->xPUCCH_TxTiming, mBuf);
4323 CMCHKPK(SPkU8, param->numBSI_Reports, mBuf);
4324 CMCHKPK(SPkU8, param->CSIRS_BRRS_ProcInd, mBuf);
4325 CMCHKPK(SPkU8, param->CSI_BRRS_Indicator, mBuf);
4326 CMCHKPK(SPkU8, param->CSIRS_BRRS_SymbIdx, mBuf);
4327 CMCHKPK(SPkU8, param->CSIRS_BRRS_TxTiming, mBuf);
4328 CMCHKPK(SPkU8, param->CSI_BSI_BRI_Req, mBuf);
4330 if(param->RBAssign <= TFU_RIV_324)
4332 CMCHKPK(cmPkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf);
4334 else if (param->RBAssign == TFU_RIV_326)
4336 CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4339 CMCHKPK(SPkU8, param->symbIdx, mBuf);
4340 CMCHKPK(SPkU8, param->beamIndex, mBuf);
4341 CMCHKPK(SPkU16, param->RBAssign, mBuf);
4342 CMCHKPK(SPkU8, param->xPDSCHRange, mBuf);
4343 CMCHKPK(SPkU8, param->formatType, mBuf);
4349 /***********************************************************
4351 * Func : cmUnpkTfuDciFormatA1A2Info
4354 * Desc : This structure contains the information needed to convey DCI format A1/A2.
4363 **********************************************************/
4365 PUBLIC S16 cmUnpkTfuDciFormatA1A2Info
4367 TfuDciFormatA1Info *param,
4371 PUBLIC S16 cmUnpkTfuDciFormatA1A2Info(param, mBuf)
4372 TfuDciFormatA1Info *param;
4377 TRC3(cmUnpkTfuDciFormatA1A2Info)
4379 CMCHKUNPK(SUnpkU8, ¶m->formatType, mBuf);
4380 CMCHKUNPK(SUnpkU8, ¶m->xPUSCHRange, mBuf);
4381 CMCHKUNPK(SUnpkU8, ¶m->xPUSCH_TxTiming, mBuf);
4382 CMCHKUNPK(SUnpkU16, ¶m->RBAssign, mBuf);
4383 CMCHKUNPK(SUnpkU8, ¶m->beamIndex, mBuf);
4384 CMCHKUNPK(SUnpkU8, ¶m->symbIdx, mBuf);
4385 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
4387 if(param->RBAssign <= TFU_RIV_324)
4389 CMCHKUNPK(cmUnpkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf);
4391 else if(param->RBAssign == TFU_RIV_326)
4393 CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4396 CMCHKUNPK(SUnpkU8, ¶m->CSI_BSI_BRI_Req, mBuf);
4397 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_TxTiming, mBuf);
4398 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_SymbIdx, mBuf);
4399 CMCHKUNPK(SUnpkU8, ¶m->CSI_BRRS_Indicator, mBuf);
4400 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_ProcInd, mBuf);
4401 CMCHKUNPK(SUnpkU8, ¶m->numBSI_Reports, mBuf);
4403 CMCHKUNPK(SUnpkU8, ¶m->uciOnxPUSCH, mBuf);
4404 CMCHKUNPK(SUnpkU8, ¶m->beamSwitch, mBuf);
4405 CMCHKUNPK(SUnpkU8, ¶m->SRS_Config, mBuf);
4406 CMCHKUNPK(SUnpkU8, ¶m->SRS_Symbol, mBuf);
4407 CMCHKUNPK(SUnpkU8, ¶m->REMapIdx_DMRS_PCRS_numLayers, mBuf);
4409 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
4410 CMCHKUNPK(SUnpkU8, ¶m->PMI, mBuf);
4411 CMCHKUNPK(SUnpkU8, ¶m->UL_PCRS, mBuf);
4412 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4418 /***********************************************************
4420 * Func : cmUnpkTfuDciFormatB1B2Info
4423 * Desc : This structure contains the information needed to convey DCI format B1/B2.
4432 **********************************************************/
4434 PUBLIC S16 cmUnpkTfuDciFormatB1B2Info
4436 TfuDciFormatB1Info *param,
4440 PUBLIC S16 cmUnpkTfuDciFormatB1B2Info(param, mBuf)
4441 TfuDciFormatB1Info *param;
4446 TRC3(cmUnpkTfuDciFormatB1B2Info)
4448 CMCHKUNPK(SUnpkU8, ¶m->formatType, mBuf);
4449 CMCHKUNPK(SUnpkU8, ¶m->xPDSCHRange, mBuf);
4450 CMCHKUNPK(SUnpkU16, ¶m->RBAssign, mBuf);
4451 CMCHKUNPK(SUnpkU8, ¶m->beamIndex, mBuf);
4452 CMCHKUNPK(SUnpkU8, ¶m->symbIdx, mBuf);
4454 if(param->RBAssign <= TFU_RIV_324)
4456 CMCHKUNPK(cmUnpkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf);
4458 else if (param->RBAssign == TFU_RIV_326)
4460 CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4463 CMCHKUNPK(SUnpkU8, ¶m->CSI_BSI_BRI_Req, mBuf);
4464 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_TxTiming, mBuf);
4465 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_SymbIdx, mBuf);
4466 CMCHKUNPK(SUnpkU8, ¶m->CSI_BRRS_Indicator, mBuf);
4467 CMCHKUNPK(SUnpkU8, ¶m->CSIRS_BRRS_ProcInd, mBuf);
4468 CMCHKUNPK(SUnpkU8, ¶m->numBSI_Reports, mBuf);
4470 CMCHKUNPK(SUnpkU8, ¶m->xPUCCH_TxTiming, mBuf);
4471 CMCHKUNPK(SUnpkU8, ¶m->freqResIdx_xPUCCH, mBuf);
4472 CMCHKUNPK(SUnpkU8, ¶m->beamSwitch, mBuf);
4473 CMCHKUNPK(SUnpkU8, ¶m->SRS_Config, mBuf);
4474 CMCHKUNPK(SUnpkU8, ¶m->SRS_Symbol, mBuf);
4475 CMCHKUNPK(SUnpkU8, ¶m->AntPorts_numLayers, mBuf);
4476 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
4477 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4478 CMCHKUNPK(SUnpkU8, ¶m->DL_PCRS, mBuf);
4484 #endif /* TFU_5GTF */
4487 /***********************************************************
4489 * Func : cmPkTfuDciFormat0Info
4492 * Desc : This structure contains the information needed to convey DCI format 0.
4501 **********************************************************/
4503 PUBLIC S16 cmPkTfuDciFormat0Info
4505 TfuDciFormat0Info *param,
4509 PUBLIC S16 cmPkTfuDciFormat0Info(param, mBuf)
4510 TfuDciFormat0Info *param;
4515 TRC3(cmPkTfuDciFormat0Info)
4517 /* tfu_c_001.main_3: Adding pack for hqProcId */
4518 CMCHKPK(SPkU8, param->hqProcId, mBuf);
4519 CMCHKPK(SPkU8, param->txAntenna, mBuf);
4520 CMCHKPK(SPkU8, param->numCqiBit, mBuf);
4521 CMCHKPK(SPkU8, param->cqiReq, mBuf);
4522 CMCHKPK(SPkU8, param->nDmrs, mBuf);
4525 CMCHKPK(SPkU8, param->dai, mBuf);
4526 CMCHKPK(SPkU8, param->ulIdx, mBuf);
4529 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4530 CMCHKPK(SPkU8, param->ndi, mBuf);
4531 CMCHKPK(SPkU8, param->mcs, mBuf);
4532 CMCHKPK(SPkU8, param->hoppingBits, mBuf);
4533 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
4535 CMCHKPK(SPkU32, param->riv, mBuf);
4537 CMCHKPK(SPkU8, param->numRb, mBuf);
4538 CMCHKPK(SPkU8, param->rbStart, mBuf);
4539 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
4545 /***********************************************************
4547 * Func : cmUnpkTfuDciFormat0Info
4550 * Desc : This structure contains the information needed to convey DCI format 0.
4559 **********************************************************/
4561 PUBLIC S16 cmUnpkTfuDciFormat0Info
4563 TfuDciFormat0Info *param,
4567 PUBLIC S16 cmUnpkTfuDciFormat0Info(param, mBuf)
4568 TfuDciFormat0Info *param;
4573 TRC3(cmUnpkTfuDciFormat0Info)
4575 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
4576 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
4577 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
4579 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
4580 #endif /* TFU_UPGRADE */
4581 CMCHKUNPK(SUnpkU8, ¶m->hoppingBits, mBuf);
4582 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4583 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4584 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4587 CMCHKUNPK(SUnpkU8, ¶m->ulIdx, mBuf);
4588 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
4591 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
4592 CMCHKUNPK(SUnpkU8, ¶m->cqiReq, mBuf);
4593 CMCHKUNPK(SUnpkU8, ¶m->numCqiBit, mBuf);
4594 CMCHKUNPK(SUnpkU8, ¶m->txAntenna, mBuf);
4595 /* tfu_c_001.main_3: Adding unpack for hqProcId */
4596 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
4603 /***********************************************************
4605 * Func : cmPkTfuAllocMapOrRiv
4608 * Desc : This Structure could either contain a resource allocation bit map OR a
4609 * RIV Value as defined in 213 - 7.1.6.
4618 **********************************************************/
4620 PUBLIC S16 cmPkTfuAllocMapOrRiv
4622 TfuAllocMapOrRiv *param,
4626 PUBLIC S16 cmPkTfuAllocMapOrRiv(param, mBuf)
4627 TfuAllocMapOrRiv *param;
4633 TRC3(cmPkTfuAllocMapOrRiv)
4635 switch(param->type) {
4636 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4637 #ifdef TFU_RESMAP_CHANGE
4639 CMCHKPK(cmPkTfuAllocMap, ¶m->u.allocMap, mBuf);
4644 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4645 #ifndef TFU_RESMAP_CHANGE
4646 case TFU_ALLOC_TYPE_MAP:
4647 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4648 CMCHKPK(SPkU8, param->u.resAllocMap[i], mBuf);
4653 case TFU_ALLOC_TYPE_RIV:
4654 CMCHKPK(SPkU32, param->u.riv, mBuf);
4659 CMCHKPK(SPkU32, param->type, mBuf);
4665 /***********************************************************
4667 * Func : cmUnpkTfuAllocMapOrRiv
4670 * Desc : This Structure could either contain a resource allocation bit map OR a
4671 * RIV Value as defined in 213 - 7.1.6.
4680 **********************************************************/
4682 PUBLIC S16 cmUnpkTfuAllocMapOrRiv
4684 TfuAllocMapOrRiv *param,
4688 PUBLIC S16 cmUnpkTfuAllocMapOrRiv(param, mBuf)
4689 TfuAllocMapOrRiv *param;
4695 TRC3(cmUnpkTfuAllocMapOrRiv)
4697 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
4698 switch(param->type) {
4699 case TFU_ALLOC_TYPE_RIV:
4700 CMCHKUNPK(SUnpkU32, ¶m->u.riv, mBuf);
4703 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4704 #ifndef TFU_RESMAP_CHANGE
4705 case TFU_ALLOC_TYPE_MAP:
4706 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4707 CMCHKUNPK(SUnpkU8, ¶m->u.resAllocMap[i], mBuf);
4713 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4714 #ifdef TFU_RESMAP_CHANGE
4716 CMCHKUNPK(cmUnpkTfuAllocMap, ¶m->u.allocMap, mBuf);
4728 /***********************************************************
4730 * Func : cmPkTfuDciFormat1AllocInfo
4733 * Desc : This structure contains only the allocation information, thats part
4735 * @details Allocation information also contains parameters necessary
4736 * for Physical layer to process Downlink Data. This structure accompanies the
4737 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4738 * @sa TfuDciFormat1Info
4747 **********************************************************/
4749 PUBLIC S16 cmPkTfuDciFormat1AllocInfo
4751 TfuDciFormat1AllocInfo *param,
4755 PUBLIC S16 cmPkTfuDciFormat1AllocInfo(param, mBuf)
4756 TfuDciFormat1AllocInfo *param;
4762 TRC3(cmPkTfuDciFormat1AllocInfo)
4764 CMCHKPK(SPkU8, param->rv, mBuf);
4765 CMCHKPK(SPkU8, param->mcs, mBuf);
4766 CMCHKPK(SPkU8, param->ndi, mBuf);
4767 CMCHKPK(SPkU8, param->harqProcId, mBuf);
4768 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4769 CMCHKPK(SPkU8, param->resAllocMap[i], mBuf);
4771 CMCHKPK(SPkU8, param->isAllocType0, mBuf);
4777 /***********************************************************
4779 * Func : cmUnpkTfuDciFormat1AllocInfo
4782 * Desc : This structure contains only the allocation information, thats part
4784 * @details Allocation information also contains parameters necessary
4785 * for Physical layer to process Downlink Data. This structure accompanies the
4786 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4787 * @sa TfuDciFormat1Info
4796 **********************************************************/
4798 PUBLIC S16 cmUnpkTfuDciFormat1AllocInfo
4800 TfuDciFormat1AllocInfo *param,
4804 PUBLIC S16 cmUnpkTfuDciFormat1AllocInfo(param, mBuf)
4805 TfuDciFormat1AllocInfo *param;
4811 TRC3(cmUnpkTfuDciFormat1AllocInfo)
4813 CMCHKUNPK(SUnpkU8, ¶m->isAllocType0, mBuf);
4814 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4815 CMCHKUNPK(SUnpkU8, ¶m->resAllocMap[i], mBuf);
4817 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
4818 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
4819 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
4820 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
4825 /***********************************************************
4827 * Func : cmPkTfuDciFormat1Info
4830 * Desc : This structure contains the information needed to convey DCI format 1.
4831 * @details Allocation information is separated from the other control
4832 * information carried in this format. This separation is needed as Data shall
4833 * also carry some control information, essentially allocation information,
4834 * along with it, in order to aid physical layer processing of the data.
4843 **********************************************************/
4845 PUBLIC S16 cmPkTfuDciFormat1Info
4847 TfuDciFormat1Info *param,
4851 PUBLIC S16 cmPkTfuDciFormat1Info(param, mBuf)
4852 TfuDciFormat1Info *param;
4857 TRC3(cmPkTfuDciFormat1Info)
4859 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
4862 CMCHKPK(SPkU8, param->dai, mBuf);
4865 CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf);
4871 /***********************************************************
4873 * Func : cmUnpkTfuDciFormat1Info
4876 * Desc : This structure contains the information needed to convey DCI format 1.
4877 * @details Allocation information is separated from the other control
4878 * information carried in this format. This separation is needed as Data shall
4879 * also carry some control information, essentially allocation information,
4880 * along with it, in order to aid physical layer processing of the data.
4889 **********************************************************/
4891 PUBLIC S16 cmUnpkTfuDciFormat1Info
4893 TfuDciFormat1Info *param,
4897 PUBLIC S16 cmUnpkTfuDciFormat1Info(param, mBuf)
4898 TfuDciFormat1Info *param;
4903 TRC3(cmUnpkTfuDciFormat1Info)
4905 CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf);
4908 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
4911 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
4917 /***********************************************************
4919 * Func : cmPkTfuDciFormat2AAllocInfo
4922 * Desc : This structure contains only the allocation information, that is part
4924 * @details Allocation information also contains parameters necessary
4925 * for Physical layer to process Downlink data. This structure accompanies the
4926 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4927 * @sa TfuDciFormat2AInfo
4936 **********************************************************/
4938 PUBLIC S16 cmPkTfuDciFormat2AAllocInfo
4940 TfuDciFormat2AAllocInfo *param,
4944 PUBLIC S16 cmPkTfuDciFormat2AAllocInfo(param, mBuf)
4945 TfuDciFormat2AAllocInfo *param;
4951 TRC3(cmPkTfuDciFormat2AAllocInfo)
4953 CMCHKPK(SPkU8, param->transSwap, mBuf);
4954 CMCHKPK(SPkU8, param->precoding, mBuf);
4956 for (i=1; i >= 0; i--) {
4957 CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
4960 CMCHKPK(SPkU8, param->harqProcId, mBuf);
4961 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4962 CMCHKPK(SPkU8, param->resAllocMap[i], mBuf);
4965 CMCHKPK(SPkU8, param->isAllocType0, mBuf);
4972 /***********************************************************
4974 * Func : cmUnpkTfuDciFormat2AAllocInfo
4977 * Desc : This structure contains only the allocation information, that is part
4979 * @details Allocation information also contains parameters necessary
4980 * for Physical layer to process Downlink data. This structure accompanies the
4981 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4982 * @sa TfuDciFormat2AInfo
4991 **********************************************************/
4993 PUBLIC S16 cmUnpkTfuDciFormat2AAllocInfo
4995 TfuDciFormat2AAllocInfo *param,
4999 PUBLIC S16 cmUnpkTfuDciFormat2AAllocInfo(param, mBuf)
5000 TfuDciFormat2AAllocInfo *param;
5006 TRC3(cmUnpkTfuDciFormat2AAllocInfo)
5009 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5010 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5011 CMCHKUNPK(SUnpkU8, ¶m->isAllocType0, mBuf);
5014 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5015 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5016 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
5017 CMCHKUNPK(SUnpkU8, ¶m->resAllocMap[i], mBuf);
5019 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
5021 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5022 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5024 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5025 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5026 for (i=0; i<=1; i++) {
5027 CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
5030 CMCHKUNPK(SUnpkU8, ¶m->precoding, mBuf);
5031 CMCHKUNPK(SUnpkU8, ¶m->transSwap, mBuf);
5036 /***********************************************************
5038 * Func : cmPkTfuDciFormat6AAllocInfo
5041 * Desc : This structure contains only the allocation information, that is part
5042 * of DCI format 6-1A.
5043 * @details Allocation information also contains parameters necessary
5044 * for Physical layer to process Downlink data. This structure accompanies the
5045 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5046 * @sa TfuDciFormat61aInfo
5055 **********************************************************/
5057 PUBLIC S16 cmPkTfuDciFormat6AAllocInfo
5059 TfuDciFormat61AllocInfo *param,
5063 PUBLIC S16 cmPkTfuDciFormat6AAllocInfo(param, mBuf)
5064 TfuDciFormat61AllocInfo *param;
5069 TRC3(cmPkTfuDciFormat6AAllocInfo)
5071 CMCHKPK(SPkU8, param->rv, mBuf);
5072 CMCHKPK(SPkU8, param->mcs, mBuf);
5073 CMCHKPK(SPkU8, param->ndi, mBuf);
5074 CMCHKPK(SPkU8, param->harqProcId, mBuf);
5075 CMCHKPK(SPkU32, param->riv, mBuf);
5082 /***********************************************************
5084 * Func : cmUnpkTfuDciFormat6AAllocInfo
5087 * Desc : This structure contains only the allocation information, that is part
5088 * of DCI format 6-1A.
5089 * @details Allocation information also contains parameters necessary
5090 * for Physical layer to process Downlink data. This structure accompanies the
5091 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5092 * @sa TfuDciFormat61aInfo
5101 **********************************************************/
5103 PUBLIC S16 cmUnpkTfuDciFormat6AAllocInfo
5105 TfuDciFormat61AllocInfo *param,
5109 PUBLIC S16 cmUnpkTfuDciFormat6AAllocInfo(param, mBuf)
5110 TfuDciFormat61AllocInfo *param;
5115 TRC3(cmUnpkTfuDciFormat6AAllocInfo)
5117 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
5118 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
5119 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
5120 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
5121 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
5122 printf("In cmUnpkTfuDciFormat6AAllocInfo :: Passed \n");
5129 /***********************************************************
5131 * Func : cmPkTfuDciFormat2AInfo
5134 * Desc : This structure contains the information carried by DCI format 2A.
5135 * @details It carries the allocation information and other control information.
5144 **********************************************************/
5146 PUBLIC S16 cmPkTfuDciFormat2AInfo
5148 TfuDciFormat2AInfo *param,
5152 PUBLIC S16 cmPkTfuDciFormat2AInfo(param, mBuf)
5153 TfuDciFormat2AInfo *param;
5158 TRC3(cmPkTfuDciFormat2AInfo)
5160 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5163 CMCHKPK(SPkU8, param->dai, mBuf);
5166 CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf);
5172 /***********************************************************
5174 * Func : cmUnpkTfuDciFormat2AInfo
5177 * Desc : This structure contains the information carried by DCI format 2A.
5178 * @details It carries the allocation information and other control information.
5187 **********************************************************/
5189 PUBLIC S16 cmUnpkTfuDciFormat2AInfo
5191 TfuDciFormat2AInfo *param,
5195 PUBLIC S16 cmUnpkTfuDciFormat2AInfo(param, mBuf)
5196 TfuDciFormat2AInfo *param;
5201 TRC3(cmUnpkTfuDciFormat2AInfo)
5203 CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf);
5206 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5209 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
5215 /***********************************************************
5217 * Func : cmPkTfuDciFormat2AllocInfo
5220 * Desc : This structure contains only the allocation information, that is part
5222 * @details Allocation information also contains parameters necessary
5223 * for Physical layer to process Downlink data. This structure accompanies the
5224 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5225 * @sa TfuDciFormat2Info
5234 **********************************************************/
5236 PUBLIC S16 cmPkTfuDciFormat2AllocInfo
5238 TfuDciFormat2AllocInfo *param,
5242 PUBLIC S16 cmPkTfuDciFormat2AllocInfo(param, mBuf)
5243 TfuDciFormat2AllocInfo *param;
5249 TRC3(cmPkTfuDciFormat2AllocInfo)
5252 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5253 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5254 for (i=1; i >= 0; i--) {
5255 CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
5257 CMCHKPK(SPkU8, param->harqProcId, mBuf);
5259 CMCHKPK(SPkU8, param->precoding, mBuf);
5260 CMCHKPK(SPkU8, param->transSwap, mBuf);
5262 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5263 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5266 CMCHKPK(SPkU8, param->dai, mBuf);
5269 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
5270 CMCHKPK(SPkU8, param->resAllocMap[i], mBuf);
5273 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5274 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5276 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5277 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5278 CMCHKPK(SPkU8, param->isAllocType0, mBuf);
5285 /***********************************************************
5287 * Func : cmUnpkTfuDciFormat2AllocInfo
5290 * Desc : This structure contains only the allocation information, that is part
5292 * @details Allocation information also contains parameters necessary
5293 * for Physical layer to process Downlink data. This structure accompanies the
5294 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5295 * @sa TfuDciFormat2Info
5304 **********************************************************/
5306 PUBLIC S16 cmUnpkTfuDciFormat2AllocInfo
5308 TfuDciFormat2AllocInfo *param,
5312 PUBLIC S16 cmUnpkTfuDciFormat2AllocInfo(param, mBuf)
5313 TfuDciFormat2AllocInfo *param;
5319 TRC3(cmUnpkTfuDciFormat2AllocInfo)
5322 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5323 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5324 CMCHKUNPK(SUnpkU8, ¶m->isAllocType0, mBuf);
5327 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5328 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5329 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
5330 CMCHKUNPK(SUnpkU8, ¶m->resAllocMap[i], mBuf);
5334 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5338 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5339 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5340 CMCHKUNPK(SUnpkU8, ¶m->transSwap, mBuf);
5341 CMCHKUNPK(SUnpkU8, ¶m->precoding, mBuf);
5343 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5344 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5345 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
5346 for (i=0; i<=1; i++) {
5347 CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
5355 /***********************************************************
5357 * Func : cmPkTfuDciFormat2Info
5360 * Desc : This structure contains the information carried by DCI format 2.
5361 * @details Allocation information is separated from the other control
5362 * information carried in this format. This separation is needed as Data must
5363 * also carry some control information, essentially, allocation information
5364 * along with it, in order to aid physical layer processing of the data.
5373 **********************************************************/
5375 PUBLIC S16 cmPkTfuDciFormat2Info
5377 TfuDciFormat2Info *param,
5381 PUBLIC S16 cmPkTfuDciFormat2Info(param, mBuf)
5382 TfuDciFormat2Info *param;
5387 TRC3(cmPkTfuDciFormat2Info)
5390 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5391 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5394 CMCHKPK(SPkU8, param->dai, mBuf);
5398 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5400 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5401 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5402 CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf);
5408 /***********************************************************
5410 * Func : cmUnpkTfuDciFormat2Info
5413 * Desc : This structure contains the information carried by DCI format 2.
5414 * @details Allocation information is separated from the other control
5415 * information carried in this format. This separation is needed as Data must
5416 * also carry some control information, essentially, allocation information
5417 * along with it, in order to aid physical layer processing of the data.
5426 **********************************************************/
5428 PUBLIC S16 cmUnpkTfuDciFormat2Info
5430 TfuDciFormat2Info *param,
5434 PUBLIC S16 cmUnpkTfuDciFormat2Info(param, mBuf)
5435 TfuDciFormat2Info *param;
5440 TRC3(cmUnpkTfuDciFormat2Info)
5442 CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf);
5444 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5445 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5446 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
5448 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5449 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5452 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5461 /***********************************************************
5463 * Func : cmPkTfuDciFormat3Info
5466 * Desc : This structure contains the information carried in DCI format 3.
5475 **********************************************************/
5477 PUBLIC S16 cmPkTfuDciFormat3Info
5479 TfuDciFormat3Info *param,
5483 PUBLIC S16 cmPkTfuDciFormat3Info(param, mBuf)
5484 TfuDciFormat3Info *param;
5490 TRC3(cmPkTfuDciFormat3Info)
5492 CMCHKPK(SPkU8, param->isPucch, mBuf);
5493 for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) {
5494 CMCHKPK(SPkU8, param->tpcCmd[i], mBuf);
5501 /***********************************************************
5503 * Func : cmUnpkTfuDciFormat3Info
5506 * Desc : This structure contains the information carried in DCI format 3.
5515 **********************************************************/
5517 PUBLIC S16 cmUnpkTfuDciFormat3Info
5519 TfuDciFormat3Info *param,
5523 PUBLIC S16 cmUnpkTfuDciFormat3Info(param, mBuf)
5524 TfuDciFormat3Info *param;
5530 TRC3(cmUnpkTfuDciFormat3Info)
5532 for (i=0; i<TFU_MAX_2BIT_TPC; i++) {
5533 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd[i], mBuf);
5535 CMCHKUNPK(SUnpkU8, ¶m->isPucch, mBuf);
5541 /***********************************************************
5543 * Func : cmPkTfuDciFormat3AInfo
5546 * Desc : This structure contains the information carried by DCI format 3A.
5555 **********************************************************/
5557 PUBLIC S16 cmPkTfuDciFormat3AInfo
5559 TfuDciFormat3AInfo *param,
5563 PUBLIC S16 cmPkTfuDciFormat3AInfo(param, mBuf)
5564 TfuDciFormat3AInfo *param;
5570 TRC3(cmPkTfuDciFormat3AInfo)
5571 CMCHKPK(SPkU8, param->isPucch, mBuf);
5572 for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) {
5573 CMCHKPK(SPkU8, param->tpcCmd[i], mBuf);
5580 /***********************************************************
5582 * Func : cmUnpkTfuDciFormat3AInfo
5585 * Desc : This structure contains the information carried by DCI format 3A.
5594 **********************************************************/
5596 PUBLIC S16 cmUnpkTfuDciFormat3AInfo
5598 TfuDciFormat3AInfo *param,
5602 PUBLIC S16 cmUnpkTfuDciFormat3AInfo(param, mBuf)
5603 TfuDciFormat3AInfo *param;
5609 TRC3(cmUnpkTfuDciFormat3AInfo)
5611 for (i=0; i<TFU_MAX_2BIT_TPC; i++) {
5612 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd[i], mBuf);
5614 CMCHKUNPK(SUnpkU8, ¶m->isPucch, mBuf);
5621 /***********************************************************
5623 * Func : cmPkTfuDciFormat60aInfo
5626 * Desc : This structure contains the information that is carried in DCI
5636 ************************************************************/
5639 PRIVATE S16 cmPkTfuDciFormat60aInfo
5641 TfuDciFormat60aInfo *param,
5645 PRIVATE S16 cmPkTfuDciFormat60aInfo(param, mBuf)
5646 TfuDciFormat60aInfo *param;
5651 TRC3(cmPkTfuDciFormat60aInfo)
5653 CMCHKPK(SPkU8, param->dciRep, mBuf);
5654 CMCHKPK(SPkU8, param->isSrs, mBuf);
5655 CMCHKPK(SPkU8, param->cqiReq, mBuf);
5657 CMCHKPK(SPkU8, param->dai, mBuf);
5658 CMCHKPK(SPkU8, param->ulIdx, mBuf);
5660 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5661 CMCHKPK(SPkU8, param->rv, mBuf);
5662 CMCHKPK(SPkU8, param->ndi, mBuf);
5663 CMCHKPK(SPkU8, param->hqProcId, mBuf);
5664 CMCHKPK(SPkU8, param->rep, mBuf);
5665 CMCHKPK(SPkU8, param->mcs, mBuf);
5666 CMCHKPK(SPkU32, param->riv, mBuf);
5667 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
5670 /***********************************************************
5672 * Func : cmPkTfuPdcchOrderInfoEmtc
5675 * Desc : This structure contains the information that is carried in DCI
5676 * format 6-1A in the case of a PDCCH order.
5685 **********************************************************/
5687 PRIVATE S16 cmPkTfuPdcchOrderInfoEmtc
5689 TfuPdcchOrderInfoEmtc *param,
5693 PRIVATE S16 cmPkTfuPdcchOrderInfoEmtc(param, mBuf)
5694 TfuPdcchOrderInfoEmtc *param;
5699 TRC3(cmPkTfuPdcchOrderInfoEmtc)
5701 CMCHKPK(SPkU8, param->ceLevel, mBuf);
5702 CMCHKPK(SPkU8, param->prachMaskIdx, mBuf);
5703 CMCHKPK(SPkU8, param->preambleIdx, mBuf);
5704 CMCHKPK(SPkU32, param->riv, mBuf);
5708 /***********************************************************
5710 * Func : cmPkTfudciformat61aPdsch
5713 * Desc : This structure contains the information carried in DCI format 6-1A
5714 * when it is NOT used for a PDCCH order.
5723 **********************************************************/
5725 PRIVATE S16 cmPkTfudciformat61aPdsch
5727 Tfudciformat61aPdsch *param,
5731 PRIVATE S16 cmPkTfudciformat61aPdsch(param, mBuf)
5732 Tfudciformat61aPdsch *param;
5737 TRC3(cmPkTfudciformat61aPdsch)
5739 CMCHKPK(SPkU8, param->isTBMsg4, mBuf);
5740 CMCHKPK(SPkU8, param->dciRep, mBuf);
5741 CMCHKPK(SPkU8, param->harqAckOffst, mBuf);
5742 CMCHKPK(SPkU8, param->pmiCfm, mBuf);
5743 CMCHKPK(SPkU8, param->tPmi, mBuf);
5744 CMCHKPK(SPkU8, param->isSrs, mBuf);
5745 CMCHKPK(SPkU8, param->antPortAndScrId, mBuf);
5748 CMCHKPK(SPkU8, param->dai, mBuf);
5750 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
5751 CMCHKPK(SPkU8, param->rep, mBuf);
5752 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
5753 CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf);
5758 /***********************************************************
5760 * Func : cmPkTfuDciFormat61aInfo
5763 * Desc : This structure contains the information needed to convey DCI format 6-1A.
5764 * @details Format can possibly carry PDSCH allocation or information needed for
5765 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
5775 **********************************************************/
5777 PUBLIC S16 cmPkTfuDciFormat61aInfo
5779 TfuDciFormat61aInfo *param,
5783 PUBLIC S16 cmPkTfuDciFormat61aInfo(param, mBuf)
5784 TfuDciFormat61aInfo *param;
5789 TRC3(cmPkTfuDciFormat61aInfo)
5791 switch(param->isPdcchOrder) {
5793 CMCHKPK(cmPkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf);
5796 CMCHKPK(cmPkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf);
5801 CMCHKPK(SPkU8, param->isPdcchOrder, mBuf);
5806 /***********************************************************
5808 * Func : cmUnpkTfuDciFormat60aInfo
5811 * Desc : This structure contains the information that is carried in DCI
5821 * **********************************************************/
5824 PRIVATE S16 cmUnpkTfuDciFormat60aInfo
5826 TfuDciFormat60aInfo *param,
5830 PRIVATE S16 cmUnpkTfuDciFormat60aInfo(param, mBuf)
5831 TfuDciFormat60aInfo *param;
5836 TRC3(cmUnpkTfuDciFormat60aInfo)
5838 printf("In cmUnpkTfuDciFormat60aInfo :: Entry \n");
5839 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
5840 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
5841 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
5842 CMCHKUNPK(SUnpkU8, ¶m->rep, mBuf);
5843 CMCHKUNPK(SUnpkU8, ¶m->hqProcId, mBuf);
5844 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
5845 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
5846 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
5848 CMCHKUNPK(SUnpkU8, ¶m->ulIdx, mBuf);
5849 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
5851 CMCHKUNPK(SUnpkU8, ¶m->cqiReq, mBuf);
5852 CMCHKUNPK(SUnpkU8, ¶m->isSrs, mBuf);
5853 CMCHKUNPK(SUnpkU8, ¶m->dciRep, mBuf);
5854 printf("In cmUnpkTfuDciFormat60aInfo :: Exit \n");
5857 /***********************************************************
5859 * Func : cmUnpkTfuPdcchOrderInfoEmtc
5862 * Desc : This structure contains the information that is carried in DCI
5863 * format 6-1A in the case of a PDCCH order.
5872 **********************************************************/
5874 PRIVATE S16 cmUnpkTfuPdcchOrderInfoEmtc
5876 TfuPdcchOrderInfoEmtc *param,
5880 PRIVATE S16 cmUnpkTfuPdcchOrderInfoEmtc(param, mBuf)
5881 TfuPdcchOrderInfoEmtc *param;
5886 TRC3(cmUnpkTfuPdcchOrderInfoEmtc)
5888 printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Entry \n");
5889 CMCHKUNPK(SUnpkU32, ¶m->riv, mBuf);
5890 CMCHKUNPK(SUnpkU8, ¶m->preambleIdx, mBuf);
5891 CMCHKUNPK(SUnpkU8, ¶m->prachMaskIdx, mBuf);
5892 CMCHKUNPK(SUnpkU8, ¶m->ceLevel, mBuf);
5893 printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Passed \n");
5897 /***********************************************************
5899 * Func : cmUnpkTfuDciFormat61aInfo
5902 * Desc : This structure contains the information carried by DCI format 6-1A.
5911 **********************************************************/
5913 PUBLIC S16 cmUnpkTfuDciFormat61aInfo
5915 TfuDciFormat61aInfo *param,
5919 PUBLIC S16 cmUnpkTfuDciFormat61aInfo(param, mBuf)
5920 TfuDciFormat61aInfo *param;
5925 TRC3(cmUnpkTfuDciFormat61aInfo)
5927 CMCHKUNPK(SUnpkU8, ¶m->isPdcchOrder, mBuf);
5928 printf("1. cmUnpkTfuDciFormat61aInfo :: isPdcchOrder %d \n", param->isPdcchOrder);
5929 switch(param->isPdcchOrder) {
5931 CMCHKUNPK(cmUnpkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf);
5934 CMCHKUNPK(cmUnpkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf);
5943 /***********************************************************
5945 * Func : cmPkTfuDciFormat1dAllocInfo
5948 * Desc : This structure contains only the allocation information, thats part
5950 * @details Allocation information also contains parameters necessary
5951 * for Physical layer to process Downlink Data. This structure accompanies the
5952 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5953 * @sa TfuDciFormat1dInfo
5962 **********************************************************/
5964 PUBLIC S16 cmPkTfuDciFormat1dAllocInfo
5966 TfuDciFormat1dAllocInfo *param,
5970 PUBLIC S16 cmPkTfuDciFormat1dAllocInfo(param, mBuf)
5971 TfuDciFormat1dAllocInfo *param;
5976 TRC3(cmPkTfuDciFormat1dAllocInfo)
5978 CMCHKPK(SPkU8, param->tPmi, mBuf);
5979 CMCHKPK(SPkU8, param->rv, mBuf);
5980 CMCHKPK(SPkU8, param->mcs, mBuf);
5981 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5982 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
5983 CMCHKPK(SPkU8, param->isLocal, mBuf);
5989 /***********************************************************
5991 * Func : cmUnpkTfuDciFormat1dAllocInfo
5994 * Desc : This structure contains only the allocation information, thats part
5996 * @details Allocation information also contains parameters necessary
5997 * for Physical layer to process Downlink Data. This structure accompanies the
5998 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5999 * @sa TfuDciFormat1dInfo
6008 **********************************************************/
6010 PUBLIC S16 cmUnpkTfuDciFormat1dAllocInfo
6012 TfuDciFormat1dAllocInfo *param,
6016 PUBLIC S16 cmUnpkTfuDciFormat1dAllocInfo(param, mBuf)
6017 TfuDciFormat1dAllocInfo *param;
6022 TRC3(cmUnpkTfuDciFormat1dAllocInfo)
6024 CMCHKUNPK(SUnpkU8, ¶m->isLocal, mBuf);
6025 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6026 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6027 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6028 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6029 CMCHKUNPK(SUnpkU8, ¶m->tPmi, mBuf);
6035 /***********************************************************
6037 * Func : cmPkTfuDciFormat1dInfo
6040 * Desc : This structure contains the information carried by DCI format 1D.
6041 * @details Allocation information is separated from the other control
6042 * information carried in this format. This separation is needed as Data shall
6043 * also carry some control information, essentially allocation information,
6044 * along with it, in order to aid physical layer processing of the data.
6053 **********************************************************/
6055 PUBLIC S16 cmPkTfuDciFormat1dInfo
6057 TfuDciFormat1dInfo *param,
6061 PUBLIC S16 cmPkTfuDciFormat1dInfo(param, mBuf)
6062 TfuDciFormat1dInfo *param;
6067 TRC3(cmPkTfuDciFormat1dInfo)
6069 CMCHKPK(SPkU8, param->dlPwrOffset, mBuf);
6072 CMCHKPK(SPkU8, param->dai, mBuf);
6075 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
6076 CMCHKPK(SPkU8, param->ndi, mBuf);
6077 CMCHKPK(SPkU8, param->harqProcId, mBuf);
6078 CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf);
6084 /***********************************************************
6086 * Func : cmUnpkTfuDciFormat1dInfo
6089 * Desc : This structure contains the information carried by DCI format 1D.
6090 * @details Allocation information is separated from the other control
6091 * information carried in this format. This separation is needed as Data shall
6092 * also carry some control information, essentially allocation information,
6093 * along with it, in order to aid physical layer processing of the data.
6102 **********************************************************/
6104 PUBLIC S16 cmUnpkTfuDciFormat1dInfo
6106 TfuDciFormat1dInfo *param,
6110 PUBLIC S16 cmUnpkTfuDciFormat1dInfo(param, mBuf)
6111 TfuDciFormat1dInfo *param;
6116 TRC3(cmUnpkTfuDciFormat1dInfo)
6118 CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf);
6119 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
6120 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
6121 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
6124 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
6127 CMCHKUNPK(SUnpkU8, ¶m->dlPwrOffset, mBuf);
6133 /***********************************************************
6135 * Func : cmPkTfuDciFormat1cInfo
6138 * Desc : This structure contains only the allocation information, thats part
6140 * @details Allocation information also contains parameters necessary
6141 * for Physical layer to process Downlink Data. This structure accompanies the
6142 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6143 * @sa TfuDciFormat1CInfo
6152 **********************************************************/
6154 PUBLIC S16 cmPkTfuDciFormat1cInfo
6156 TfuDciFormat1cInfo *param,
6160 PUBLIC S16 cmPkTfuDciFormat1cInfo(param, mBuf)
6161 TfuDciFormat1cInfo *param;
6166 TRC3(cmPkTfuDciFormat1cInfo)
6168 CMCHKPK(SPkU8, param->iTbs, mBuf);
6169 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6170 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6176 /***********************************************************
6178 * Func : cmUnpkTfuDciFormat1cInfo
6181 * Desc : This structure contains only the allocation information, thats part
6183 * @details Allocation information also contains parameters necessary
6184 * for Physical layer to process Downlink Data. This structure accompanies the
6185 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6186 * @sa TfuDciFormat1CInfo
6195 **********************************************************/
6197 PUBLIC S16 cmUnpkTfuDciFormat1cInfo
6199 TfuDciFormat1cInfo *param,
6203 PUBLIC S16 cmUnpkTfuDciFormat1cInfo(param, mBuf)
6204 TfuDciFormat1cInfo *param;
6209 TRC3(cmUnpkTfuDciFormat1cInfo)
6211 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6212 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6213 CMCHKUNPK(SUnpkU8, ¶m->iTbs, mBuf);
6219 /***********************************************************
6221 * Func : cmPkTfuDciFormat1bAllocInfo
6224 * Desc : This structure contains only the allocation information, thats part
6225 * of DCI format 1 B.
6226 * @details Allocation information also contains parameters necessary
6227 * for Physical layer to process Downlink Data. This structure accompanies the
6228 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6229 * @sa TfuDciFormat1BInfo
6238 **********************************************************/
6240 PUBLIC S16 cmPkTfuDciFormat1bAllocInfo
6242 TfuDciFormat1bAllocInfo *param,
6246 PUBLIC S16 cmPkTfuDciFormat1bAllocInfo(param, mBuf)
6247 TfuDciFormat1bAllocInfo *param;
6252 TRC3(cmPkTfuDciFormat1bAllocInfo)
6254 CMCHKPK(SPkU8, param->pmiCfm, mBuf);
6255 CMCHKPK(SPkU8, param->tPmi, mBuf);
6256 CMCHKPK(SPkU8, param->ndi, mBuf);
6257 CMCHKPK(SPkU8, param->harqProcId, mBuf);
6258 CMCHKPK(SPkU8, param->rv, mBuf);
6259 CMCHKPK(SPkU8, param->mcs, mBuf);
6260 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6261 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6262 CMCHKPK(SPkU8, param->isLocal, mBuf);
6268 /***********************************************************
6270 * Func : cmUnpkTfuDciFormat1bAllocInfo
6273 * Desc : This structure contains only the allocation information, thats part
6274 * of DCI format 1 B.
6275 * @details Allocation information also contains parameters necessary
6276 * for Physical layer to process Downlink Data. This structure accompanies the
6277 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6278 * @sa TfuDciFormat1BInfo
6287 **********************************************************/
6289 PUBLIC S16 cmUnpkTfuDciFormat1bAllocInfo
6291 TfuDciFormat1bAllocInfo *param,
6295 PUBLIC S16 cmUnpkTfuDciFormat1bAllocInfo(param, mBuf)
6296 TfuDciFormat1bAllocInfo *param;
6301 TRC3(cmUnpkTfuDciFormat1bAllocInfo)
6303 CMCHKUNPK(SUnpkU8, ¶m->isLocal, mBuf);
6304 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6305 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6306 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6307 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6308 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
6309 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
6310 CMCHKUNPK(SUnpkU8, ¶m->tPmi, mBuf);
6311 CMCHKUNPK(SUnpkU8, ¶m->pmiCfm, mBuf);
6317 /***********************************************************
6319 * Func : cmPkTfuPdcchOrderInfo
6322 * Desc : This structure contains the information that is carried in DCI
6323 * format 1A in the case of a PDCCH order.
6332 **********************************************************/
6334 PUBLIC S16 cmPkTfuPdcchOrderInfo
6336 TfuPdcchOrderInfo *param,
6340 PUBLIC S16 cmPkTfuPdcchOrderInfo(param, mBuf)
6341 TfuPdcchOrderInfo *param;
6346 TRC3(cmPkTfuPdcchOrderInfo)
6348 CMCHKPK(SPkU8, param->prachMaskIdx, mBuf);
6349 CMCHKPK(SPkU8, param->preambleIdx, mBuf);
6355 /***********************************************************
6357 * Func : cmUnpkTfuPdcchOrderInfo
6360 * Desc : This structure contains the information that is carried in DCI
6361 * format 1A in the case of a PDCCH order.
6370 **********************************************************/
6372 PUBLIC S16 cmUnpkTfuPdcchOrderInfo
6374 TfuPdcchOrderInfo *param,
6378 PUBLIC S16 cmUnpkTfuPdcchOrderInfo(param, mBuf)
6379 TfuPdcchOrderInfo *param;
6384 TRC3(cmUnpkTfuPdcchOrderInfo)
6386 CMCHKUNPK(SUnpkU8, ¶m->preambleIdx, mBuf);
6387 CMCHKUNPK(SUnpkU8, ¶m->prachMaskIdx, mBuf);
6393 /***********************************************************
6395 * Func : cmPkTfuDciFormat1aAllocInfo
6398 * Desc : This structure contains only the allocation information, thats part
6400 * @details Allocation information also contains parameters necessary
6401 * for Physical layer to process Downlink Data. This structure accompanies the
6402 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6403 * @sa TfuDciFormat1AInfo
6412 **********************************************************/
6414 PUBLIC S16 cmPkTfuDciFormat1aAllocInfo
6416 TfuDciFormat1aAllocInfo *param,
6420 PUBLIC S16 cmPkTfuDciFormat1aAllocInfo(param, mBuf)
6421 TfuDciFormat1aAllocInfo *param;
6426 TRC3(cmPkTfuDciFormat1aAllocInfo)
6428 CMCHKPK(SPkU8, param->ndi, mBuf);
6429 CMCHKPK(cmPkTknU8, ¶m->harqProcId, mBuf);
6430 CMCHKPK(SPkU8, param->rv, mBuf);
6431 CMCHKPK(SPkU8, param->mcs, mBuf);
6432 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6433 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6434 CMCHKPK(SPkU8, param->isLocal, mBuf);
6440 /***********************************************************
6442 * Func : cmUnpkTfuDciFormat1aAllocInfo
6445 * Desc : This structure contains only the allocation information, thats part
6447 * @details Allocation information also contains parameters necessary
6448 * for Physical layer to process Downlink Data. This structure accompanies the
6449 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6450 * @sa TfuDciFormat1AInfo
6459 **********************************************************/
6461 PUBLIC S16 cmUnpkTfuDciFormat1aAllocInfo
6463 TfuDciFormat1aAllocInfo *param,
6467 PUBLIC S16 cmUnpkTfuDciFormat1aAllocInfo(param, mBuf)
6468 TfuDciFormat1aAllocInfo *param;
6473 TRC3(cmUnpkTfuDciFormat1aAllocInfo)
6475 CMCHKUNPK(SUnpkU8, ¶m->isLocal, mBuf);
6476 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6477 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6478 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6479 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6480 CMCHKUNPK(cmUnpkTknU8, ¶m->harqProcId, mBuf);
6481 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
6487 /***********************************************************
6489 * Func : cmPkTfudciformat1aPdsch
6492 * Desc : This structure contains the information carried in DCI format 1A
6493 * when it is NOT used for a PDCCH order.
6502 **********************************************************/
6504 PUBLIC S16 cmPkTfudciformat1aPdsch
6506 Tfudciformat1aPdsch *param,
6510 PUBLIC S16 cmPkTfudciformat1aPdsch(param, mBuf)
6511 Tfudciformat1aPdsch *param;
6516 TRC3(cmPkTfudciformat1aPdsch)
6518 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
6521 CMCHKPK(cmPkTknU8, ¶m->dai, mBuf);
6524 CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf);
6530 /***********************************************************
6532 * Func : cmUnpkTfudciformat1aPdsch
6535 * Desc : This structure contains the information carried in DCI format 1A
6536 * when it is NOT used for a PDCCH order.
6545 **********************************************************/
6547 PUBLIC S16 cmUnpkTfudciformat1aPdsch
6549 Tfudciformat1aPdsch *param,
6553 PUBLIC S16 cmUnpkTfudciformat1aPdsch(param, mBuf)
6554 Tfudciformat1aPdsch *param;
6559 TRC3(cmUnpkTfudciformat1aPdsch)
6561 CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf);
6564 CMCHKUNPK(cmUnpkTknU8, ¶m->dai, mBuf);
6567 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
6574 /***********************************************************
6576 * Func : cmUnpkTfudciformat61aPdsch
6579 * Desc : This structure contains the information carried in DCI format 6-1A
6580 * when it is NOT used for a PDCCH order.
6589 **********************************************************/
6591 PUBLIC S16 cmUnpkTfudciformat61aPdsch
6593 Tfudciformat61aPdsch *param,
6597 PUBLIC S16 cmUnpkTfudciformat61aPdsch(param, mBuf)
6598 Tfudciformat61aPdsch *param;
6603 TRC3(cmUnpkTfudciformat61aPdsch)
6605 printf("1. cmUnpkTfudciformat61aPdsch :: Entry \n");
6606 CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf);
6607 printf("2. cmUnpkTfudciformat61aPdsch :: Entry \n");
6608 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
6609 printf("3. cmUnpkTfudciformat61aPdsch :: Entry \n");
6610 CMCHKUNPK(SUnpkU8, ¶m->rep, mBuf);
6611 printf("4. cmUnpkTfudciformat61aPdsch :: Entry \n");
6612 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
6613 printf("5. cmUnpkTfudciformat61aPdsch :: Entry \n");
6615 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
6616 printf("6. cmUnpkTfudciformat61aPdsch :: Entry \n");
6618 CMCHKUNPK(SUnpkU8, ¶m->antPortAndScrId, mBuf);
6619 printf("7. cmUnpkTfudciformat61aPdsch :: Entry \n");
6620 CMCHKUNPK(SUnpkU8, ¶m->isSrs, mBuf);
6621 printf("8. cmUnpkTfudciformat61aPdsch :: Entry \n");
6622 CMCHKUNPK(SUnpkU8, ¶m->tPmi, mBuf);
6623 printf("9. cmUnpkTfudciformat61aPdsch :: Entry \n");
6624 CMCHKUNPK(SUnpkU8, ¶m->pmiCfm, mBuf);
6625 printf("10. cmUnpkTfudciformat61aPdsch :: Entry \n");
6626 CMCHKUNPK(SUnpkU8, ¶m->harqAckOffst, mBuf);
6627 printf("11. cmUnpkTfudciformat61aPdsch :: Entry \n");
6628 CMCHKUNPK(SUnpkU8, ¶m->dciRep, mBuf);
6629 printf("12. cmUnpkTfudciformat61aPdsch :: Entry \n");
6630 CMCHKUNPK(SUnpkU8, ¶m->isTBMsg4, mBuf);
6631 printf("1. cmUnpkTfudciformat61aPdsch :: Passed \n");
6634 /***********************************************************
6636 * Func : cmUnpkTfuDirectIndication
6639 * Desc : This structure contains the information that is carried in DCI
6640 * format 6-2 in the case of a Direct information indication.
6649 **********************************************************/
6651 PRIVATE S16 cmUnpkTfuDirectIndication
6653 TfuDirectIndication *param,
6657 PRIVATE S16 cmUnpkTfuDirectIndication(param, mBuf)
6658 TfuDirectIndication *param;
6663 TRC3(cmUnpkTfuDirectIndication)
6664 CMCHKUNPK(SUnpkU8, ¶m->directInd, mBuf);
6670 /***********************************************************
6672 * Func : cmUnpkTfuDciFormat62AllocInfo
6675 * Desc : This structure contains only the allocation information, that is part
6676 * of DCI format 6-2.
6677 * @details Allocation information also contains parameters necessary
6678 * for Physical layer to process Downlink data. This structure accompanies the
6679 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6680 * @sa TfuDciFormat62Info
6689 **********************************************************/
6691 PUBLIC S16 cmUnpkTfuDciFormat62AllocInfo
6693 TfuDciFormat62AllocInfo *param,
6697 PUBLIC S16 cmUnpkTfuDciFormat62AllocInfo(param, mBuf)
6698 TfuDciFormat62AllocInfo *param;
6702 TRC3(cmUnpkTfuDciFormat62AllocInfo)
6703 CMCHKUNPK(SUnpkU8, ¶m->riv, mBuf);
6704 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
6705 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
6710 /***********************************************************
6712 * Func : cmUnpkTfudciformat62Pdsch
6715 * Desc : This structure contains the information carried in DCI format 6-2
6716 * when It is used for Paging message.
6725 **********************************************************/
6727 PRIVATE S16 cmUnpkTfudciformat62Pdsch
6729 Tfudciformat62Pdsch *param,
6733 PRIVATE S16 cmUnpkTfudciformat62Pdsch(param, mBuf)
6734 Tfudciformat62Pdsch *param;
6739 TRC3(cmUnpkTfudciformat62Pdsch)
6742 CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf);
6743 CMCHKUNPK(SUnpkU8, ¶m->repNum, mBuf);
6744 CMCHKUNPK(SUnpkU8, ¶m->dciSubRepNum, mBuf);
6749 /***********************************************************
6751 * Func : cmUnpkTfuDciFormat62Info
6754 * Desc : This structure contains the information needed to convey DCI format 6-2.
6755 * @details Format can possibly carry PDSCH allocation or information needed for
6756 * a Direct information Indication.
6766 **********************************************************/
6768 PUBLIC S16 cmUnpkTfuDciFormat62Info
6770 TfuDciFormat62Info *param,
6774 PUBLIC S16 cmUnpkTfuDciFormat62Info(param, mBuf)
6775 TfuDciFormat62Info *param;
6780 TRC3(cmUnpkTfuDciFormat62Info)
6781 CMCHKUNPK(SUnpkU8, ¶m->isPaging, mBuf);
6782 switch(param->isPaging) {
6784 CMCHKUNPK(cmUnpkTfuDirectIndication, ¶m->t.directIndication, mBuf);
6787 CMCHKUNPK(cmUnpkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf);
6808 /***********************************************************
6810 * Func : cmPkTfuDirectIndication
6813 * Desc : This structure contains the information that is carried in DCI
6814 * format 6-2 in the case of a Direct information indication.
6823 **********************************************************/
6825 PRIVATE S16 cmPkTfuDirectIndication
6827 TfuDirectIndication *param,
6831 PRIVATE S16 cmPkTfuDirectIndication(param, mBuf)
6832 TfuDirectIndication *param;
6837 TRC3(cmPkTfuDirectIndication)
6838 CMCHKPK(SPkU8, param->directInd, mBuf);
6846 /***********************************************************
6848 * Func : cmPkTfuDciFormat62AllocInfo
6851 * Desc : This structure contains only the allocation information, that is part
6852 * of DCI format 6-2.
6853 * @details Allocation information also contains parameters necessary
6854 * for Physical layer to process Downlink data. This structure accompanies the
6855 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6856 * @sa TfuDciFormat62Info
6865 **********************************************************/
6867 PUBLIC S16 cmPkTfuDciFormat62AllocInfo
6869 TfuDciFormat62AllocInfo *param,
6873 PUBLIC S16 cmPkTfuDciFormat62AllocInfo(param, mBuf)
6874 TfuDciFormat62AllocInfo *param;
6879 TRC3(cmPkTfuDciFormat6AAllocInfo)
6881 CMCHKPK(SPkU8, param->rv, mBuf);
6882 CMCHKPK(SPkU8, param->mcs, mBuf);
6883 CMCHKPK(SPkU8, param->riv, mBuf);
6890 /***********************************************************
6892 * Func : cmPkTfudciformat62Pdsch
6895 * Desc : This structure contains the information carried in DCI format 6-2
6896 * when It is used for Paging message.
6905 **********************************************************/
6907 PRIVATE S16 cmPkTfudciformat62Pdsch
6909 Tfudciformat62Pdsch *param,
6913 PRIVATE S16 cmPkTfudciformat62Pdsch(param, mBuf)
6914 Tfudciformat62Pdsch *param;
6919 TRC3(cmPkTfudciformat62Pdsch)
6920 CMCHKPK(SPkU8, param->dciSubRepNum, mBuf);
6921 CMCHKPK(SPkU8, param->repNum, mBuf);
6922 CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf);
6929 /***********************************************************
6931 * Func : cmPkTfuDciFormat62Info
6934 * Desc : This structure contains the information needed to convey DCI format 6-2.
6935 * @details Format can possibly carry PDSCH allocation or information needed for
6936 * a Direct information Indication.
6946 **********************************************************/
6948 PUBLIC S16 cmPkTfuDciFormat62Info
6950 TfuDciFormat62Info *param,
6954 PUBLIC S16 cmPkTfuDciFormat62Info(param, mBuf)
6955 TfuDciFormat62Info *param;
6960 TRC3(cmPkTfuDciFormat62Info)
6962 switch(param->isPaging) {
6964 CMCHKPK(cmPkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf);
6967 CMCHKPK(cmPkTfuDirectIndication, ¶m->t.directIndication, mBuf);
6972 CMCHKPK(SPkU8, param->isPaging, mBuf);
6985 /***********************************************************
6987 * Func : cmPkTfuDciFormat1aInfo
6990 * Desc : This structure contains the information needed to convey DCI format 1A.
6991 * @details Format can possibly carry PDSCH allocation or information needed for
6992 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
7002 **********************************************************/
7004 PUBLIC S16 cmPkTfuDciFormat1aInfo
7006 TfuDciFormat1aInfo *param,
7010 PUBLIC S16 cmPkTfuDciFormat1aInfo(param, mBuf)
7011 TfuDciFormat1aInfo *param;
7016 TRC3(cmPkTfuDciFormat1aInfo)
7018 switch(param->isPdcchOrder) {
7020 CMCHKPK(cmPkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf);
7023 CMCHKPK(cmPkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf);
7028 CMCHKPK(SPkU8, param->isPdcchOrder, mBuf);
7035 /***********************************************************
7037 * Func : cmUnpkTfuDciFormat1aInfo
7040 * Desc : This structure contains the information needed to convey DCI format 1A.
7041 * @details Format can possibly carry PDSCH allocation or information needed for
7042 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
7052 **********************************************************/
7054 PUBLIC S16 cmUnpkTfuDciFormat1aInfo
7056 TfuDciFormat1aInfo *param,
7060 PUBLIC S16 cmUnpkTfuDciFormat1aInfo(param, mBuf)
7061 TfuDciFormat1aInfo *param;
7066 TRC3(cmUnpkTfuDciFormat1aInfo)
7068 CMCHKUNPK(SUnpkU8, ¶m->isPdcchOrder, mBuf);
7069 switch(param->isPdcchOrder) {
7071 CMCHKUNPK(cmUnpkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf);
7074 CMCHKUNPK(cmUnpkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf);
7084 /***********************************************************
7086 * Func : cmPkTfuDciFormat1bInfo
7089 * Desc : This structure contains the information needed to convey DCI format 1A.
7090 * @details Allocation information is separated from the other control
7091 * information carried in this format. This separation is needed as Data shall
7092 * also carry some control information, essentially allocation information,
7093 * along with it, in order to aid physical layer processing of the data.
7102 **********************************************************/
7104 PUBLIC S16 cmPkTfuDciFormat1bInfo
7106 TfuDciFormat1bInfo *param,
7110 PUBLIC S16 cmPkTfuDciFormat1bInfo(param, mBuf)
7111 TfuDciFormat1bInfo *param;
7116 TRC3(cmPkTfuDciFormat1bInfo)
7118 CMCHKPK(SPkU8, param->tpcCmd, mBuf);
7121 CMCHKPK(SPkU8, param->dai, mBuf);
7124 CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf);
7130 /***********************************************************
7132 * Func : cmUnpkTfuDciFormat1bInfo
7135 * Desc : This structure contains the information needed to convey DCI format 1A.
7136 * @details Allocation information is separated from the other control
7137 * information carried in this format. This separation is needed as Data shall
7138 * also carry some control information, essentially allocation information,
7139 * along with it, in order to aid physical layer processing of the data.
7148 **********************************************************/
7150 PUBLIC S16 cmUnpkTfuDciFormat1bInfo
7152 TfuDciFormat1bInfo *param,
7156 PUBLIC S16 cmUnpkTfuDciFormat1bInfo(param, mBuf)
7157 TfuDciFormat1bInfo *param;
7162 TRC3(cmUnpkTfuDciFormat1bInfo)
7164 CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf);
7167 CMCHKUNPK(SUnpkU8, ¶m->dai, mBuf);
7170 CMCHKUNPK(SUnpkU8, ¶m->tpcCmd, mBuf);
7176 /***********************************************************
7178 * Func : cmPkTfuDciInfo
7181 * Desc : This structure contains the information needed to convey the possible DCI
7182 * formats. The following are the supported formats -
7183 * -# Format 0 - used for PUSCH scheduling
7184 * -# Format 1 - used for PDSCH scheduling
7185 * -# Format 1A - used for compact scheduling of PDSCH or RA procedure
7186 * intitiated by a PDCCH order.
7187 * -# Format 1B - used for compact scheduling of PDSCH with precoding
7189 * -# Format 1C - used for very compact scheduling of PDSCH.
7190 * -# Format 1D - used for compact scheduling for PDSCH with precoding
7191 * information with power offset.
7192 * -# Format 2 - used for PDSCH Scheduling
7193 * -# Format 2A - used for PDSCH Scheduling
7194 * -# Format 3 - used for power control
7195 * -# Format 3A - used for power control
7204 **********************************************************/
7206 PUBLIC S16 cmPkTfuDciInfo
7212 PUBLIC S16 cmPkTfuDciInfo(param, mBuf)
7218 TRC3(cmPkTfuDciInfo)
7220 switch(param->dciFormat) {
7222 case TFU_DCI_FORMAT_B1:
7223 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
7225 case TFU_DCI_FORMAT_B2:
7226 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
7228 case TFU_DCI_FORMAT_A1:
7229 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
7231 case TFU_DCI_FORMAT_A2:
7232 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
7236 case TFU_DCI_FORMAT_6_2:
7237 CMCHKPK(cmPkTfuDciFormat62Info, ¶m->u.format62Info, mBuf);
7239 case TFU_DCI_FORMAT_6_1A:
7240 CMCHKPK(cmPkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf);
7242 case TFU_DCI_FORMAT_6_0A:
7243 CMCHKPK(cmPkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf);
7246 case TFU_DCI_FORMAT_3A:
7247 CMCHKPK(cmPkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf);
7249 case TFU_DCI_FORMAT_3:
7250 CMCHKPK(cmPkTfuDciFormat3Info, ¶m->u.format3Info, mBuf);
7252 case TFU_DCI_FORMAT_2A:
7253 CMCHKPK(cmPkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf);
7255 case TFU_DCI_FORMAT_2:
7256 CMCHKPK(cmPkTfuDciFormat2Info, ¶m->u.format2Info, mBuf);
7258 case TFU_DCI_FORMAT_1D:
7259 CMCHKPK(cmPkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf);
7261 case TFU_DCI_FORMAT_1C:
7262 CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf);
7264 case TFU_DCI_FORMAT_1B:
7265 CMCHKPK(cmPkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf);
7267 case TFU_DCI_FORMAT_1A:
7268 CMCHKPK(cmPkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf);
7270 case TFU_DCI_FORMAT_1:
7271 CMCHKPK(cmPkTfuDciFormat1Info, ¶m->u.format1Info, mBuf);
7273 case TFU_DCI_FORMAT_0:
7274 CMCHKPK(cmPkTfuDciFormat0Info, ¶m->u.format0Info, mBuf);
7279 CMCHKPK(SPkU32, param->dciFormat, mBuf);
7285 /***********************************************************
7287 * Func : cmUnpkTfuDciInfo
7290 * Desc : This structure contains the information needed to convey the possible DCI
7291 * formats. The following are the supported formats -
7292 * -# Format 0 - used for PUSCH scheduling
7293 * -# Format 1 - used for PDSCH scheduling
7294 * -# Format 1A - used for compact scheduling of PDSCH or RA procedure
7295 * intitiated by a PDCCH order.
7296 * -# Format 1B - used for compact scheduling of PDSCH with precoding
7298 * -# Format 1C - used for very compact scheduling of PDSCH.
7299 * -# Format 1D - used for compact scheduling for PDSCH with precoding
7300 * information with power offset.
7301 * -# Format 2 - used for PDSCH Scheduling
7302 * -# Format 2A - used for PDSCH Scheduling
7303 * -# Format 3 - used for power control
7304 * -# Format 3A - used for power control
7313 **********************************************************/
7315 PUBLIC S16 cmUnpkTfuDciInfo
7321 PUBLIC S16 cmUnpkTfuDciInfo(param, mBuf)
7327 TRC3(cmUnpkTfuDciInfo)
7330 CMCHKUNPK(SUnpkU32, (U32 *)¶m->dciFormat, mBuf);
7331 switch(param->dciFormat) {
7332 case TFU_DCI_FORMAT_0:
7333 CMCHKUNPK(cmUnpkTfuDciFormat0Info, ¶m->u.format0Info, mBuf);
7335 case TFU_DCI_FORMAT_1:
7336 CMCHKUNPK(cmUnpkTfuDciFormat1Info, ¶m->u.format1Info, mBuf);
7338 case TFU_DCI_FORMAT_1A:
7339 CMCHKUNPK(cmUnpkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf);
7341 case TFU_DCI_FORMAT_1B:
7342 CMCHKUNPK(cmUnpkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf);
7344 case TFU_DCI_FORMAT_1C:
7345 CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf);
7347 case TFU_DCI_FORMAT_1D:
7348 CMCHKUNPK(cmUnpkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf);
7350 case TFU_DCI_FORMAT_2:
7351 CMCHKUNPK(cmUnpkTfuDciFormat2Info, ¶m->u.format2Info, mBuf);
7353 case TFU_DCI_FORMAT_2A:
7354 CMCHKUNPK(cmUnpkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf);
7356 case TFU_DCI_FORMAT_3:
7357 CMCHKUNPK(cmUnpkTfuDciFormat3Info, ¶m->u.format3Info, mBuf);
7359 case TFU_DCI_FORMAT_3A:
7360 CMCHKUNPK(cmUnpkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf);
7363 case TFU_DCI_FORMAT_6_0A:
7364 CMCHKUNPK(cmUnpkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf);
7365 printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat);
7367 case TFU_DCI_FORMAT_6_1A:
7368 CMCHKUNPK(cmUnpkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf);
7369 printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat);
7371 case TFU_DCI_FORMAT_6_2:
7372 CMCHKUNPK(cmUnpkTfuDciFormat62Info, ¶m->u.format62Info, mBuf);
7377 case TFU_DCI_FORMAT_A1:
7378 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
7380 case TFU_DCI_FORMAT_A2:
7381 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
7383 case TFU_DCI_FORMAT_B1:
7384 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
7386 case TFU_DCI_FORMAT_B2:
7387 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
7398 /***********************************************************
7400 * Func : cmPkTfuSubbandInfo
7403 * Desc : This structure contains the information needed to convey the start and size
7404 * of the subband in the CQI report.
7413 **********************************************************/
7415 PUBLIC S16 cmPkTfuSubbandInfo
7417 TfuSubbandInfo *param,
7421 PUBLIC S16 cmPkTfuSubbandInfo(param, mBuf)
7422 TfuSubbandInfo *param;
7427 TRC3(cmPkTfuSubbandInfo)
7429 CMCHKPK(SPkU8, param->numRb, mBuf);
7430 CMCHKPK(SPkU8, param->rbStart, mBuf);
7436 /***********************************************************
7438 * Func : cmUnpkTfuSubbandInfo
7441 * Desc : This structure contains the information needed to convey the start and size
7442 * of the subband in the CQI report.
7451 **********************************************************/
7453 PUBLIC S16 cmUnpkTfuSubbandInfo
7455 TfuSubbandInfo *param,
7459 PUBLIC S16 cmUnpkTfuSubbandInfo(param, mBuf)
7460 TfuSubbandInfo *param;
7465 TRC3(cmUnpkTfuSubbandInfo)
7467 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
7468 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
7475 /***********************************************************
7477 * Func : cmPkTfuSubbandCqiInfo
7480 * Desc : This structure is used to convey the subbannd CQI reported.
7489 **********************************************************/
7491 PUBLIC S16 cmPkTfuSubbandCqiInfo
7493 TfuSubbandCqiInfo *param,
7497 PUBLIC S16 cmPkTfuSubbandCqiInfo(param, mBuf)
7498 TfuSubbandCqiInfo *param;
7503 TRC3(cmPkTfuSubbandCqiInfo)
7505 CMCHKPK(SPkU8, param->cqiIdx, mBuf);
7506 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf);
7512 /***********************************************************
7514 * Func : cmUnpkTfuSubbandCqiInfo
7517 * Desc : This structure is used to convey the subbannd CQI reported.
7526 **********************************************************/
7528 PUBLIC S16 cmUnpkTfuSubbandCqiInfo
7530 TfuSubbandCqiInfo *param,
7534 PUBLIC S16 cmUnpkTfuSubbandCqiInfo(param, mBuf)
7535 TfuSubbandCqiInfo *param;
7540 TRC3(cmUnpkTfuSubbandCqiInfo)
7542 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf);
7543 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx, mBuf);
7549 /***********************************************************
7551 * Func : cmPkTfuPdcchCceInfo
7554 * Desc : This structure conveys the CCE information.
7563 **********************************************************/
7565 PUBLIC S16 cmPkTfuPdcchCceInfo
7567 TfuPdcchCceInfo *param,
7571 PUBLIC S16 cmPkTfuPdcchCceInfo(param, mBuf)
7572 TfuPdcchCceInfo *param;
7577 TRC3(cmPkTfuPdcchCceInfo)
7579 CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf);
7580 CMCHKPK(SPkU8, param->cceIdx, mBuf);
7586 /***********************************************************
7588 * Func : cmUnpkTfuPdcchCceInfo
7591 * Desc : This structure conveys the CCE information.
7600 **********************************************************/
7602 PUBLIC S16 cmUnpkTfuPdcchCceInfo
7604 TfuPdcchCceInfo *param,
7608 PUBLIC S16 cmUnpkTfuPdcchCceInfo(param, mBuf)
7609 TfuPdcchCceInfo *param;
7614 TRC3(cmUnpkTfuPdcchCceInfo)
7616 CMCHKUNPK(SUnpkU8, ¶m->cceIdx, mBuf);
7617 CMCHKUNPK(cmUnpkLteAggrLvl,(U32 *)¶m->aggrLvl, mBuf);
7623 /***********************************************************
7625 * Func : cmPkTfuCqiPucchMode10
7628 * Desc : This structure maps to the CQI mode 10. The report could either
7629 * convey a Rank index or a wideband CQI.
7638 **********************************************************/
7640 PUBLIC S16 cmPkTfuCqiPucchMode10
7642 TfuCqiPucchMode10 *param,
7646 PUBLIC S16 cmPkTfuCqiPucchMode10(param, mBuf)
7647 TfuCqiPucchMode10 *param;
7652 TRC3(cmPkTfuCqiPucchMode10)
7654 switch(param->type) {
7656 CMCHKPK(SPkU8, param->u.cqi, mBuf);
7659 CMCHKPK(SPkU8, param->u.ri, mBuf);
7664 CMCHKPK(SPkU32, param->type, mBuf);
7670 /***********************************************************
7672 * Func : cmUnpkTfuCqiPucchMode10
7675 * Desc : This structure maps to the CQI mode 10. The report could either
7676 * convey a Rank index or a wideband CQI.
7685 **********************************************************/
7687 PUBLIC S16 cmUnpkTfuCqiPucchMode10
7689 TfuCqiPucchMode10 *param,
7693 PUBLIC S16 cmUnpkTfuCqiPucchMode10(param, mBuf)
7694 TfuCqiPucchMode10 *param;
7699 TRC3(cmUnpkTfuCqiPucchMode10)
7701 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
7702 switch(param->type) {
7704 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
7707 CMCHKUNPK(SUnpkU8, ¶m->u.cqi, mBuf);
7717 /***********************************************************
7719 * Func : cmPkTfuCqiMode11Cqi
7722 * Desc : This structure contains a wideband CQI, PMI and optionally a
7723 * wideband differential CQI.
7732 **********************************************************/
7734 PUBLIC S16 cmPkTfuCqiMode11Cqi
7736 TfuCqiMode11Cqi *param,
7740 PUBLIC S16 cmPkTfuCqiMode11Cqi(param, mBuf)
7741 TfuCqiMode11Cqi *param;
7746 TRC3(cmPkTfuCqiMode11Cqi)
7748 CMCHKPK(cmPkTknU8, ¶m->wideDiffCqi, mBuf);
7749 CMCHKPK(SPkU8, param->pmi, mBuf);
7750 CMCHKPK(SPkU8, param->cqi, mBuf);
7756 /***********************************************************
7758 * Func : cmUnpkTfuCqiMode11Cqi
7761 * Desc : This structure contains a wideband CQI, PMI and optionally a
7762 * wideband differential CQI.
7771 **********************************************************/
7773 PUBLIC S16 cmUnpkTfuCqiMode11Cqi
7775 TfuCqiMode11Cqi *param,
7779 PUBLIC S16 cmUnpkTfuCqiMode11Cqi(param, mBuf)
7780 TfuCqiMode11Cqi *param;
7785 TRC3(cmUnpkTfuCqiMode11Cqi)
7787 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
7788 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
7789 CMCHKUNPK(cmUnpkTknU8, ¶m->wideDiffCqi, mBuf);
7795 /***********************************************************
7797 * Func : cmPkTfuCqiPucchMode11
7800 * Desc : This structure maps to the CQI mode 11. The report could either
7801 * convey a Rank index or a CQI report.
7810 **********************************************************/
7812 PUBLIC S16 cmPkTfuCqiPucchMode11
7814 TfuCqiPucchMode11 *param,
7818 PUBLIC S16 cmPkTfuCqiPucchMode11(param, mBuf)
7819 TfuCqiPucchMode11 *param;
7824 TRC3(cmPkTfuCqiPucchMode11)
7826 switch(param->type) {
7828 CMCHKPK(cmPkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf);
7831 CMCHKPK(SPkU8, param->u.ri, mBuf);
7836 CMCHKPK(SPkU32, param->type, mBuf);
7842 /***********************************************************
7844 * Func : cmUnpkTfuCqiPucchMode11
7847 * Desc : This structure maps to the CQI mode 11. The report could either
7848 * convey a Rank index or a CQI report.
7857 **********************************************************/
7859 PUBLIC S16 cmUnpkTfuCqiPucchMode11
7861 TfuCqiPucchMode11 *param,
7865 PUBLIC S16 cmUnpkTfuCqiPucchMode11(param, mBuf)
7866 TfuCqiPucchMode11 *param;
7871 TRC3(cmUnpkTfuCqiPucchMode11)
7873 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
7874 switch(param->type) {
7876 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
7879 CMCHKUNPK(cmUnpkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf);
7889 /***********************************************************
7891 * Func : cmPkTfuCqiMode20SubCqi
7894 * Desc : This structure contains the SubBand CQI for mode 2-0.
7903 **********************************************************/
7905 PUBLIC S16 cmPkTfuCqiMode20SubCqi
7907 TfuCqiMode20SubCqi *param,
7911 PUBLIC S16 cmPkTfuCqiMode20SubCqi(param, mBuf)
7912 TfuCqiMode20SubCqi *param;
7917 TRC3(cmPkTfuCqiMode20SubCqi)
7919 CMCHKPK(SPkU8, param->l, mBuf);
7920 CMCHKPK(SPkU8, param->cqi, mBuf);
7926 /***********************************************************
7928 * Func : cmUnpkTfuCqiMode20SubCqi
7931 * Desc : This structure contains the SubBand CQI for mode 2-0.
7940 **********************************************************/
7942 PUBLIC S16 cmUnpkTfuCqiMode20SubCqi
7944 TfuCqiMode20SubCqi *param,
7948 PUBLIC S16 cmUnpkTfuCqiMode20SubCqi(param, mBuf)
7949 TfuCqiMode20SubCqi *param;
7954 TRC3(cmUnpkTfuCqiMode20SubCqi)
7956 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
7957 CMCHKUNPK(SUnpkU8, ¶m->l, mBuf);
7963 /***********************************************************
7965 * Func : cmPkTfuCqiMode20Cqi
7968 * Desc : This structure contains Mode20 CQI report. It could either be a
7969 * wideband CQI or a sub-band CQI.
7978 **********************************************************/
7980 PUBLIC S16 cmPkTfuCqiMode20Cqi
7982 TfuCqiMode20Cqi *param,
7986 PUBLIC S16 cmPkTfuCqiMode20Cqi(param, mBuf)
7987 TfuCqiMode20Cqi *param;
7992 TRC3(cmPkTfuCqiMode20Cqi)
7994 switch(param->isWideband) {
7996 CMCHKPK(cmPkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf);
7999 CMCHKPK(SPkU8, param->u.wideCqi, mBuf);
8004 CMCHKPK(SPkU8, param->isWideband, mBuf);
8010 /***********************************************************
8012 * Func : cmUnpkTfuCqiMode20Cqi
8015 * Desc : This structure contains Mode20 CQI report. It could either be a
8016 * wideband CQI or a sub-band CQI.
8025 **********************************************************/
8027 PUBLIC S16 cmUnpkTfuCqiMode20Cqi
8029 TfuCqiMode20Cqi *param,
8033 PUBLIC S16 cmUnpkTfuCqiMode20Cqi(param, mBuf)
8034 TfuCqiMode20Cqi *param;
8039 TRC3(cmUnpkTfuCqiMode20Cqi)
8041 CMCHKUNPK(SUnpkU8, ¶m->isWideband, mBuf);
8042 switch(param->isWideband) {
8044 CMCHKUNPK(SUnpkU8, ¶m->u.wideCqi, mBuf);
8047 CMCHKUNPK(cmUnpkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf);
8057 /***********************************************************
8059 * Func : cmPkTfuCqiPucchMode20
8062 * Desc : This structure maps to CQI mode 20. The report either contains a
8063 * Rank Index or a CQI report.
8072 **********************************************************/
8074 PUBLIC S16 cmPkTfuCqiPucchMode20
8076 TfuCqiPucchMode20 *param,
8080 PUBLIC S16 cmPkTfuCqiPucchMode20(param, mBuf)
8081 TfuCqiPucchMode20 *param;
8086 TRC3(cmPkTfuCqiPucchMode20)
8088 switch(param->type) {
8090 CMCHKPK(cmPkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf);
8093 CMCHKPK(SPkU8, param->u.ri, mBuf);
8098 CMCHKPK(SPkU32, param->type, mBuf);
8104 /***********************************************************
8106 * Func : cmUnpkTfuCqiPucchMode20
8109 * Desc : This structure maps to CQI mode 20. The report either contains a
8110 * Rank Index or a CQI report.
8119 **********************************************************/
8121 PUBLIC S16 cmUnpkTfuCqiPucchMode20
8123 TfuCqiPucchMode20 *param,
8127 PUBLIC S16 cmUnpkTfuCqiPucchMode20(param, mBuf)
8128 TfuCqiPucchMode20 *param;
8133 TRC3(cmUnpkTfuCqiPucchMode20)
8135 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
8136 switch(param->type) {
8138 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
8141 CMCHKUNPK(cmUnpkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf);
8151 /***********************************************************
8153 * Func : cmPkTfuCqiMode21SubCqi
8156 * Desc : This structure contains the sub-band CQI report for mode 2-1.
8157 * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
8166 **********************************************************/
8168 PUBLIC S16 cmPkTfuCqiMode21SubCqi
8170 TfuCqiMode21SubCqi *param,
8174 PUBLIC S16 cmPkTfuCqiMode21SubCqi(param, mBuf)
8175 TfuCqiMode21SubCqi *param;
8180 TRC3(cmPkTfuCqiMode21SubCqi)
8182 CMCHKPK(cmPkTknU8, ¶m->diffCqi, mBuf);
8183 CMCHKPK(SPkU8, param->l, mBuf);
8184 CMCHKPK(SPkU8, param->cqi, mBuf);
8190 /***********************************************************
8192 * Func : cmUnpkTfuCqiMode21SubCqi
8195 * Desc : This structure contains the sub-band CQI report for mode 2-1.
8196 * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
8205 **********************************************************/
8207 PUBLIC S16 cmUnpkTfuCqiMode21SubCqi
8209 TfuCqiMode21SubCqi *param,
8213 PUBLIC S16 cmUnpkTfuCqiMode21SubCqi(param, mBuf)
8214 TfuCqiMode21SubCqi *param;
8219 TRC3(cmUnpkTfuCqiMode21SubCqi)
8221 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
8222 CMCHKUNPK(SUnpkU8, ¶m->l, mBuf);
8223 CMCHKUNPK(cmUnpkTknU8, ¶m->diffCqi, mBuf);
8229 /***********************************************************
8231 * Func : cmPkTfuCqiMode21WideCqi
8234 * Desc : This structure contains the wideband CQI report for mode 2-1.
8235 * It carries a wideband CQI, PMI and optionally a differential CQI.
8244 **********************************************************/
8246 PUBLIC S16 cmPkTfuCqiMode21WideCqi
8248 TfuCqiMode21WideCqi *param,
8252 PUBLIC S16 cmPkTfuCqiMode21WideCqi(param, mBuf)
8253 TfuCqiMode21WideCqi *param;
8258 TRC3(cmPkTfuCqiMode21WideCqi)
8260 CMCHKPK(cmPkTknU8, ¶m->diffCqi, mBuf);
8261 CMCHKPK(SPkU8, param->pmi, mBuf);
8262 CMCHKPK(SPkU8, param->cqi, mBuf);
8268 /***********************************************************
8270 * Func : cmUnpkTfuCqiMode21WideCqi
8273 * Desc : This structure contains the wideband CQI report for mode 2-1.
8274 * It carries a wideband CQI, PMI and optionally a differential CQI.
8283 **********************************************************/
8285 PUBLIC S16 cmUnpkTfuCqiMode21WideCqi
8287 TfuCqiMode21WideCqi *param,
8291 PUBLIC S16 cmUnpkTfuCqiMode21WideCqi(param, mBuf)
8292 TfuCqiMode21WideCqi *param;
8297 TRC3(cmUnpkTfuCqiMode21WideCqi)
8299 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
8300 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
8301 CMCHKUNPK(cmUnpkTknU8, ¶m->diffCqi, mBuf);
8307 /***********************************************************
8309 * Func : cmPkTfuCqiMode21Cqi
8312 * Desc : This structure conveys CQI report for mode 2-1. The reported value
8313 * could either be wideband or sub-band.
8322 **********************************************************/
8324 PUBLIC S16 cmPkTfuCqiMode21Cqi
8326 TfuCqiMode21Cqi *param,
8330 PUBLIC S16 cmPkTfuCqiMode21Cqi(param, mBuf)
8331 TfuCqiMode21Cqi *param;
8336 TRC3(cmPkTfuCqiMode21Cqi)
8338 switch(param->isWideband) {
8340 CMCHKPK(cmPkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf);
8343 CMCHKPK(cmPkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf);
8348 CMCHKPK(SPkU8, param->isWideband, mBuf);
8354 /***********************************************************
8356 * Func : cmUnpkTfuCqiMode21Cqi
8359 * Desc : This structure conveys CQI report for mode 2-1. The reported value
8360 * could either be wideband or sub-band.
8369 **********************************************************/
8371 PUBLIC S16 cmUnpkTfuCqiMode21Cqi
8373 TfuCqiMode21Cqi *param,
8377 PUBLIC S16 cmUnpkTfuCqiMode21Cqi(param, mBuf)
8378 TfuCqiMode21Cqi *param;
8383 TRC3(cmUnpkTfuCqiMode21Cqi)
8385 CMCHKUNPK(SUnpkU8, ¶m->isWideband, mBuf);
8386 switch(param->isWideband) {
8388 CMCHKUNPK(cmUnpkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf);
8391 CMCHKUNPK(cmUnpkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf);
8401 /***********************************************************
8403 * Func : cmPkTfuCqiPucchMode21
8406 * Desc : This structure maps to the CQI reporting mode 2-1. The report either
8407 * conveys a Rank Indicator or a CQI report.
8416 **********************************************************/
8418 PUBLIC S16 cmPkTfuCqiPucchMode21
8420 TfuCqiPucchMode21 *param,
8424 PUBLIC S16 cmPkTfuCqiPucchMode21(param, mBuf)
8425 TfuCqiPucchMode21 *param;
8430 TRC3(cmPkTfuCqiPucchMode21)
8432 switch(param->type) {
8434 CMCHKPK(cmPkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf);
8437 CMCHKPK(SPkU8, param->u.ri, mBuf);
8442 CMCHKPK(SPkU32, param->type, mBuf);
8448 /***********************************************************
8450 * Func : cmUnpkTfuCqiPucchMode21
8453 * Desc : This structure maps to the CQI reporting mode 2-1. The report either
8454 * conveys a Rank Indicator or a CQI report.
8463 **********************************************************/
8465 PUBLIC S16 cmUnpkTfuCqiPucchMode21
8467 TfuCqiPucchMode21 *param,
8471 PUBLIC S16 cmUnpkTfuCqiPucchMode21(param, mBuf)
8472 TfuCqiPucchMode21 *param;
8477 TRC3(cmUnpkTfuCqiPucchMode21)
8479 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
8480 switch(param->type) {
8482 CMCHKUNPK(SUnpkU8, ¶m->u.ri, mBuf);
8485 CMCHKUNPK(cmUnpkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf);
8495 /***********************************************************
8497 * Func : cmPkTfuDlCqiPucch
8500 * Desc : This structure conveys the Downlink CQI reported on PUCCH.
8509 **********************************************************/
8511 PUBLIC S16 cmPkTfuDlCqiPucch
8513 TfuDlCqiPucch *param,
8517 PUBLIC S16 cmPkTfuDlCqiPucch(param, mBuf)
8518 TfuDlCqiPucch *param;
8523 TRC3(cmPkTfuDlCqiPucch)
8525 switch(param->mode) {
8526 case TFU_PUCCH_CQI_MODE21:
8527 CMCHKPK(cmPkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf);
8529 case TFU_PUCCH_CQI_MODE20:
8530 CMCHKPK(cmPkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf);
8532 case TFU_PUCCH_CQI_MODE11:
8533 CMCHKPK(cmPkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf);
8535 case TFU_PUCCH_CQI_MODE10:
8536 CMCHKPK(cmPkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf);
8541 CMCHKPK(SPkU32, param->mode, mBuf);
8542 CMCHKPK(SPkU8, param->cellIdx, mBuf);
8548 /***********************************************************
8550 * Func : cmUnpkTfuDlCqiPucch
8553 * Desc : This structure conveys the Downlink CQI reported on PUCCH.
8562 **********************************************************/
8564 PUBLIC S16 cmUnpkTfuDlCqiPucch
8566 TfuDlCqiPucch *param,
8570 PUBLIC S16 cmUnpkTfuDlCqiPucch(param, mBuf)
8571 TfuDlCqiPucch *param;
8576 TRC3(cmUnpkTfuDlCqiPucch)
8578 CMCHKUNPK(SUnpkU8, ¶m->cellIdx, mBuf);
8579 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
8580 switch(param->mode) {
8581 case TFU_PUCCH_CQI_MODE10:
8582 CMCHKUNPK(cmUnpkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf);
8584 case TFU_PUCCH_CQI_MODE11:
8585 CMCHKUNPK(cmUnpkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf);
8587 case TFU_PUCCH_CQI_MODE20:
8588 CMCHKUNPK(cmUnpkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf);
8590 case TFU_PUCCH_CQI_MODE21:
8591 CMCHKUNPK(cmUnpkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf);
8601 /***********************************************************
8603 * Func : cmPkTfuSubbandMode12
8606 * Desc : This structure carries subband information and PMI, in the CQI
8607 * reporting format 1-2.
8616 **********************************************************/
8618 PUBLIC S16 cmPkTfuSubbandMode12
8620 TfuSubbandMode12 *param,
8624 PUBLIC S16 cmPkTfuSubbandMode12(param, mBuf)
8625 TfuSubbandMode12 *param;
8630 TRC3(cmPkTfuSubbandMode12)
8632 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8633 CMCHKPK(SPkU8, param->pmi, mBuf);
8639 /***********************************************************
8641 * Func : cmUnpkTfuSubbandMode12
8644 * Desc : This structure carries subband information and PMI, in the CQI
8645 * reporting format 1-2.
8654 **********************************************************/
8656 PUBLIC S16 cmUnpkTfuSubbandMode12
8658 TfuSubbandMode12 *param,
8662 PUBLIC S16 cmUnpkTfuSubbandMode12(param, mBuf)
8663 TfuSubbandMode12 *param;
8668 TRC3(cmUnpkTfuSubbandMode12)
8670 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
8671 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8677 /***********************************************************
8679 * Func : cmPkTfuCqiPuschMode12
8682 * Desc : This structure conveys information present in CQI reporting mode 1-2 received
8692 **********************************************************/
8694 PUBLIC S16 cmPkTfuCqiPuschMode12
8696 TfuCqiPuschMode12 *param,
8700 PUBLIC S16 cmPkTfuCqiPuschMode12(param, mBuf)
8701 TfuCqiPuschMode12 *param;
8707 TRC3(cmPkTfuCqiPuschMode12)
8709 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8710 CMCHKPK(cmPkTfuSubbandMode12, ¶m->subbandArr[i], mBuf);
8712 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8713 CMCHKPK(SPkU8, param->cqiIdx[i], mBuf);
8715 CMCHKPK(SPkU8, param->numSubband, mBuf);
8721 /***********************************************************
8723 * Func : cmUnpkTfuCqiPuschMode12
8726 * Desc : This structure conveys information present in CQI reporting mode 1-2 received
8736 **********************************************************/
8738 PUBLIC S16 cmUnpkTfuCqiPuschMode12
8740 TfuCqiPuschMode12 *param,
8744 PUBLIC S16 cmUnpkTfuCqiPuschMode12(param, mBuf)
8745 TfuCqiPuschMode12 *param;
8751 TRC3(cmUnpkTfuCqiPuschMode12)
8753 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8754 for (i=0; i<TFU_MAX_TB; i++) {
8755 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx[i], mBuf);
8757 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8758 CMCHKUNPK(cmUnpkTfuSubbandMode12, ¶m->subbandArr[i], mBuf);
8765 /***********************************************************
8767 * Func : cmPkTfuCqiPuschMode20
8770 * Desc : This structure conveys information present in CQI reporting mode 2-0 received
8771 * over PUSCH. This mode is for UE selected sub-band feedback.
8780 **********************************************************/
8782 PUBLIC S16 cmPkTfuCqiPuschMode20
8784 TfuCqiPuschMode20 *param,
8788 PUBLIC S16 cmPkTfuCqiPuschMode20(param, mBuf)
8789 TfuCqiPuschMode20 *param;
8795 TRC3(cmPkTfuCqiPuschMode20)
8797 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8798 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8800 CMCHKPK(SPkU8, param->numSubband, mBuf);
8801 CMCHKPK(SPkU8, param->wideBandCqi, mBuf);
8802 CMCHKPK(SPkU8, param->cqiIdx, mBuf);
8808 /***********************************************************
8810 * Func : cmUnpkTfuCqiPuschMode20
8813 * Desc : This structure conveys information present in CQI reporting mode 2-0 received
8814 * over PUSCH. This mode is for UE selected sub-band feedback.
8823 **********************************************************/
8825 PUBLIC S16 cmUnpkTfuCqiPuschMode20
8827 TfuCqiPuschMode20 *param,
8831 PUBLIC S16 cmUnpkTfuCqiPuschMode20(param, mBuf)
8832 TfuCqiPuschMode20 *param;
8838 TRC3(cmUnpkTfuCqiPuschMode20)
8840 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx, mBuf);
8841 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi, mBuf);
8842 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8843 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8844 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8850 /***********************************************************
8852 * Func : cmPkTfuCqiPuschMode22
8855 * Desc : This structure conveys information present in CQI reporting mode 2-2 received
8865 **********************************************************/
8867 PUBLIC S16 cmPkTfuCqiPuschMode22
8869 TfuCqiPuschMode22 *param,
8873 PUBLIC S16 cmPkTfuCqiPuschMode22(param, mBuf)
8874 TfuCqiPuschMode22 *param;
8880 TRC3(cmPkTfuCqiPuschMode22)
8883 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8884 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8887 CMCHKPK(SPkU8, param->numSubband, mBuf);
8888 CMCHKPK(SPkU8, param->wideBandPmi, mBuf);
8889 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8890 CMCHKPK(SPkU8, param->wideBandCqi[i], mBuf);
8892 CMCHKPK(SPkU8, param->pmi, mBuf);
8893 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8894 CMCHKPK(SPkU8, param->cqi[i], mBuf);
8901 /***********************************************************
8903 * Func : cmUnpkTfuCqiPuschMode22
8906 * Desc : This structure conveys information present in CQI reporting mode 2-2 received
8916 **********************************************************/
8918 PUBLIC S16 cmUnpkTfuCqiPuschMode22
8920 TfuCqiPuschMode22 *param,
8924 PUBLIC S16 cmUnpkTfuCqiPuschMode22(param, mBuf)
8925 TfuCqiPuschMode22 *param;
8931 TRC3(cmUnpkTfuCqiPuschMode22)
8933 for (i=0; i<TFU_MAX_TB; i++) {
8934 CMCHKUNPK(SUnpkU8, ¶m->cqi[i], mBuf);
8936 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
8937 for (i=0; i<TFU_MAX_TB; i++) {
8938 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi[i], mBuf);
8940 CMCHKUNPK(SUnpkU8, ¶m->wideBandPmi, mBuf);
8941 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
8943 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8944 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8952 PUBLIC S16 cmPkTfuSubbandMode30
8954 TfuSubbandMode30 *param,
8958 PUBLIC S16 cmPkTfuSubbandMode30(param, mBuf)
8959 TfuSubbandMode30 *param;
8964 TRC3(cmPkTfuSubbandMode30)
8966 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8967 CMCHKPK(SPkU8, param->cqi, mBuf);
8973 PUBLIC S16 cmUnpkTfuSubbandMode30
8975 TfuSubbandMode30 *param,
8979 PUBLIC S16 cmUnpkTfuSubbandMode30(param, mBuf)
8980 TfuSubbandMode30 *param;
8985 TRC3(cmUnpkTfuSubbandMode30)
8987 CMCHKUNPK(SUnpkU8, ¶m->cqi, mBuf);
8988 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8994 /***********************************************************
8996 * Func : cmPkTfuCqiPuschMode30
8999 * Desc : This structure conveys information present in CQI reporting mode 3-0
9000 * received over PUSCH.
9009 **********************************************************/
9011 PUBLIC S16 cmPkTfuCqiPuschMode30
9013 TfuCqiPuschMode30 *param,
9017 PUBLIC S16 cmPkTfuCqiPuschMode30(param, mBuf)
9018 TfuCqiPuschMode30 *param;
9024 TRC3(cmPkTfuCqiPuschMode30)
9026 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
9027 CMCHKPK(cmPkTfuSubbandMode30, ¶m->subbandArr[i], mBuf);
9029 CMCHKPK(SPkU8, param->numSubband, mBuf);
9030 CMCHKPK(SPkU8, param->wideBandCqi, mBuf);
9036 /***********************************************************
9038 * Func : cmUnpkTfuCqiPuschMode30
9041 * Desc : This structure conveys information present in CQI reporting mode 3-0
9042 * received over PUSCH.
9051 **********************************************************/
9053 PUBLIC S16 cmUnpkTfuCqiPuschMode30
9055 TfuCqiPuschMode30 *param,
9059 PUBLIC S16 cmUnpkTfuCqiPuschMode30(param, mBuf)
9060 TfuCqiPuschMode30 *param;
9066 TRC3(cmUnpkTfuCqiPuschMode30)
9068 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi, mBuf);
9069 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
9070 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
9071 CMCHKUNPK(cmUnpkTfuSubbandMode30, ¶m->subbandArr[i], mBuf);
9078 PUBLIC S16 cmPkTfuSubbandMode31
9080 TfuSubbandMode31 *param,
9084 PUBLIC S16 cmPkTfuSubbandMode31(param, mBuf)
9085 TfuSubbandMode31 *param;
9091 TRC3(cmPkTfuSubbandMode31)
9093 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
9094 for (i=TFU_MAX_TB-1; i >= 0; i--) {
9095 CMCHKPK(SPkU8, param->cqi[i], mBuf);
9102 PUBLIC S16 cmUnpkTfuSubbandMode31
9104 TfuSubbandMode31 *param,
9108 PUBLIC S16 cmUnpkTfuSubbandMode31(param, mBuf)
9109 TfuSubbandMode31 *param;
9115 TRC3(cmUnpkTfuSubbandMode31)
9117 for (i=0; i<TFU_MAX_TB; i++) {
9118 CMCHKUNPK(SUnpkU8, ¶m->cqi[i], mBuf);
9120 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
9126 /***********************************************************
9128 * Func : cmPkTfuCqiPuschMode31
9131 * Desc : This structure conveys information present in CQI reporting mode 3-1
9132 * received over PUSCH.
9141 **********************************************************/
9143 PUBLIC S16 cmPkTfuCqiPuschMode31
9145 TfuCqiPuschMode31 *param,
9149 PUBLIC S16 cmPkTfuCqiPuschMode31(param, mBuf)
9150 TfuCqiPuschMode31 *param;
9156 TRC3(cmPkTfuCqiPuschMode31)
9159 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9160 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9162 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9163 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9164 for (i=param->numSubband-1; i >= 0; i--) {
9165 CMCHKPK(cmPkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf);
9168 CMCHKPK(SPkU8, param->numSubband, mBuf);
9169 for (i=TFU_MAX_TB-1; i >= 0; i--) {
9170 CMCHKPK(SPkU8, param->wideBandCqi[i], mBuf);
9172 CMCHKPK(SPkU8, param->pmi, mBuf);
9178 /***********************************************************
9180 * Func : cmUnpkTfuCqiPuschMode31
9183 * Desc : This structure conveys information present in CQI reporting mode 3-1
9184 * received over PUSCH.
9193 **********************************************************/
9195 PUBLIC S16 cmUnpkTfuCqiPuschMode31
9197 TfuCqiPuschMode31 *param,
9201 PUBLIC S16 cmUnpkTfuCqiPuschMode31(param, mBuf)
9202 TfuCqiPuschMode31 *param;
9208 TRC3(cmUnpkTfuCqiPuschMode31)
9210 CMCHKUNPK(SUnpkU8, ¶m->pmi, mBuf);
9211 for (i=0; i<TFU_MAX_TB; i++) {
9212 CMCHKUNPK(SUnpkU8, ¶m->wideBandCqi[i], mBuf);
9214 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
9216 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9217 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9218 for (i=0; i<param->numSubband; i++) {
9219 CMCHKUNPK(cmUnpkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf);
9223 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
9224 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
9231 /***********************************************************
9233 * Func : cmPkTfuDlCqiPusch
9236 * Desc : This structure conveys Downlink CQI information (mode and corresponding
9237 * CQI) received over PUSCH.
9246 **********************************************************/
9248 PUBLIC S16 cmPkTfuDlCqiPusch
9250 TfuDlCqiPusch *param,
9254 PUBLIC S16 cmPkTfuDlCqiPusch(param, mBuf)
9255 TfuDlCqiPusch *param;
9260 TRC3(cmPkTfuDlCqiPusch)
9262 switch(param->mode) {
9263 case TFU_PUSCH_CQI_MODE_31:
9264 CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
9266 case TFU_PUSCH_CQI_MODE_30:
9267 CMCHKPK(cmPkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf);
9269 case TFU_PUSCH_CQI_MODE_22:
9270 CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
9272 case TFU_PUSCH_CQI_MODE_20:
9273 CMCHKPK(cmPkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf);
9275 case TFU_PUSCH_CQI_MODE_12:
9276 CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
9282 CMCHKPK(cmPkTknU8, ¶m->ri, mBuf);
9283 CMCHKPK(SPkU32, param->mode, mBuf);
9285 CMCHKPK(SPkU8, param->cellIdx, mBuf);
9291 /***********************************************************
9293 * Func : cmUnpkTfuDlCqiPusch
9296 * Desc : This structure conveys Downlink CQI information (mode and corresponding
9297 * CQI) received over PUSCH.
9306 **********************************************************/
9308 PUBLIC S16 cmUnpkTfuDlCqiPusch
9310 TfuDlCqiPusch *param,
9314 PUBLIC S16 cmUnpkTfuDlCqiPusch(param, mBuf)
9315 TfuDlCqiPusch *param;
9320 TRC3(cmUnpkTfuDlCqiPusch)
9322 CMCHKUNPK(SUnpkU8, ¶m->cellIdx, mBuf);
9323 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
9324 CMCHKUNPK(cmUnpkTknU8, ¶m->ri, mBuf);
9325 switch(param->mode) {
9326 case TFU_PUSCH_CQI_MODE_12:
9327 CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
9329 case TFU_PUSCH_CQI_MODE_20:
9330 CMCHKUNPK(cmUnpkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf);
9332 case TFU_PUSCH_CQI_MODE_22:
9333 CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
9335 case TFU_PUSCH_CQI_MODE_30:
9336 CMCHKUNPK(cmUnpkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf);
9338 case TFU_PUSCH_CQI_MODE_31:
9339 CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
9348 /***********************************************************
9350 * Func : cmPkTfuDlCqiInfo
9353 * Desc : This structure contains CQI information received over PUCCH or PUSCH.
9362 **********************************************************/
9364 PUBLIC S16 cmPkTfuDlCqiInfo
9367 TfuDlCqiInfo *param,
9371 PUBLIC S16 cmPkTfuDlCqiInfo(selector, param, mBuf)
9373 TfuDlCqiInfo *param;
9379 TRC3(cmPkTfuDlCqiInfo)
9383 for (idx = 0; idx < param->pusch.numOfCells; idx++)
9385 CMCHKPK(cmPkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx], mBuf);
9387 CMCHKPK(SPkU8, param->pusch.numOfCells, mBuf);
9390 CMCHKPK(cmPkTfuDlCqiPucch, ¶m->pucchCqi, mBuf);
9400 /***********************************************************
9402 * Func : cmUnpkTfuDlCqiInfo
9405 * Desc : This structure contains CQI information received over PUCCH or PUSCH.
9414 **********************************************************/
9416 PUBLIC S16 cmUnpkTfuDlCqiInfo
9419 TfuDlCqiInfo *param,
9423 PUBLIC S16 cmUnpkTfuDlCqiInfo(selector, param, mBuf)
9425 TfuDlCqiInfo *param;
9431 TRC3(cmUnpkTfuDlCqiInfo)
9435 CMCHKUNPK(cmUnpkTfuDlCqiPucch, ¶m->pucchCqi, mBuf);
9438 CMCHKUNPK(SUnpkU8, ¶m->pusch.numOfCells, mBuf);
9439 for (idx = param->pusch.numOfCells; idx > 0; idx--)
9441 CMCHKUNPK(cmUnpkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx-1], mBuf);
9452 /***********************************************************
9454 * Func : cmPkTfuRecpReqInfo
9457 * Desc : This structure is sent from Scheduler to PHY. This includes params
9458 * needed by PHY to decode the following
9460 * 2. HARQ Feedback on PUCCH
9463 * 5. SR Indications.
9464 * This structure carries the reception information for all the scheduled UE.
9473 **********************************************************/
9475 PUBLIC S16 cmPkTfuRecpReqInfo
9477 TfuRecpReqInfo *param,
9481 PUBLIC S16 cmPkTfuRecpReqInfo(param, mBuf)
9482 TfuRecpReqInfo *param;
9488 TfuUeRecpReqInfo *tfuUeRecpReqInfo;
9490 TRC3(cmPkTfuRecpReqInfo)
9492 /*ccpu00116923 - ADD - SRS present support*/
9493 /*tfu_c_001.main_7 - ADD - SRS present field inclusion */
9495 CMCHKPK(SPkU8, param->srsPres, mBuf);
9497 count = param->ueRecpReqLst.count;
9498 node = param->ueRecpReqLst.last;
9500 tfuUeRecpReqInfo = (TfuUeRecpReqInfo *)node->node;
9502 CMCHKPK(cmPkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf);
9503 cmLListDelFrm(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk);
9504 tfuUeRecpReqInfo->lnk.node = (PTR)NULLP;
9506 CMCHKPK(SPkU32, count, mBuf);
9507 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
9508 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
9514 /***********************************************************
9516 * Func : cmUnpkTfuRecpReqInfo
9519 * Desc : This structure is sent from Scheduler to PHY. This includes params
9520 * needed by PHY to decode the following
9522 * 2. HARQ Feedback on PUCCH
9525 * 5. SR Indications.
9526 * This structure carries the reception information for all the scheduled UE.
9535 **********************************************************/
9537 PUBLIC S16 cmUnpkTfuRecpReqInfo
9539 TfuRecpReqInfo *param,
9544 PUBLIC S16 cmUnpkTfuRecpReqInfo(param, memCp, mBuf)
9545 TfuRecpReqInfo *param;
9552 TfuUeRecpReqInfo *tfuUeRecpReqInfo;
9554 TRC3(cmUnpkTfuRecpReqInfo)
9556 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
9557 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
9558 cmLListInit(¶m->ueRecpReqLst);
9559 CMCHKUNPK(SUnpkU32, &count, mBuf);
9560 for (loopCnt=0; loopCnt<count; loopCnt++) {
9561 cmGetMem((Ptr)memCp, sizeof(*tfuUeRecpReqInfo), (Ptr *)&tfuUeRecpReqInfo);
9562 CMCHKUNPK(cmUnpkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf);
9563 cmLListAdd2Tail(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk);
9564 tfuUeRecpReqInfo->lnk.node = (PTR)tfuUeRecpReqInfo;
9566 /*ccpu00116923 - ADD - SRS present support*/
9567 /*tfu_c_001.main_7 - ADD - SRS present field inclusion */
9569 CMCHKUNPK(SUnpkU8, ¶m->srsPres, mBuf);
9576 /***********************************************************
9578 * Func : cmPkTfuPdcchInfo
9581 * Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI
9582 * formats. This information is associated with an RNTI.
9591 **********************************************************/
9593 PUBLIC S16 cmPkTfuPdcchInfo
9595 TfuPdcchInfo *param,
9599 PUBLIC S16 cmPkTfuPdcchInfo(param, mBuf)
9600 TfuPdcchInfo *param;
9605 TRC3(cmPkTfuPdcchInfo)
9607 CMCHKPK(SPkU8, param->grpId, mBuf);
9608 CMCHKPK(SPkU8, param->sccIdx, mBuf);
9609 CMCHKPK(SPkU8, param->sectorId, mBuf);
9610 #endif /* TFU_5GTF */
9611 CMCHKPK(cmPkTfuDciInfo, ¶m->dci, mBuf);
9612 CMCHKPK(SPkU8, param->dciNumOfBits, mBuf);
9613 CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf);
9614 CMCHKPK(SPkU16, param->nCce, mBuf);
9616 CMCHKPK(cmPkLteRnti, param->crnti, mBuf);
9617 CMCHKPK(SPkU8, param->isSpsRnti, mBuf);
9619 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
9625 /***********************************************************
9627 * Func : cmUnpkTfuPdcchInfo
9630 * Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI
9631 * formats. This information is associated with an RNTI.
9640 **********************************************************/
9642 PUBLIC S16 cmUnpkTfuPdcchInfo
9644 TfuPdcchInfo *param,
9648 PUBLIC S16 cmUnpkTfuPdcchInfo(param, mBuf)
9649 TfuPdcchInfo *param;
9654 TRC3(cmUnpkTfuPdcchInfo)
9656 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
9658 CMCHKUNPK(SUnpkU8, ¶m->isSpsRnti, mBuf);
9659 CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf);
9661 CMCHKUNPK(SUnpkU16, ¶m->nCce, mBuf);
9662 CMCHKUNPK(cmUnpkLteAggrLvl, (U32*)¶m->aggrLvl, mBuf);
9663 CMCHKUNPK(SUnpkU8, ¶m->dciNumOfBits, mBuf);
9664 CMCHKUNPK(cmUnpkTfuDciInfo, ¶m->dci, mBuf);
9666 CMCHKUNPK(SUnpkU8, ¶m->sectorId, mBuf);
9667 CMCHKUNPK(SUnpkU8, ¶m->sccIdx, mBuf);
9668 CMCHKUNPK(SUnpkU8, ¶m->grpId, mBuf);
9669 #endif /* TFU_5GTF */
9675 /***********************************************************
9677 * Func : cmPkTfuPhichInfo
9680 * Desc : This structure contains one PHICH information. In order to locate the
9681 * resources to be used for PHICH the following information is provided along
9682 * with the feedback -
9693 **********************************************************/
9695 PUBLIC S16 cmPkTfuPhichInfo
9697 TfuPhichInfo *param,
9701 PUBLIC S16 cmPkTfuPhichInfo(param, mBuf)
9702 TfuPhichInfo *param;
9707 TRC3(cmPkTfuPhichInfo)
9708 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9710 CMCHKPK(SPkU16, param->txPower, mBuf);
9713 CMCHKPK(SPkU8, param->iPhich, mBuf);
9715 CMCHKPK(SPkU8, param->isAck, mBuf);
9716 CMCHKPK(SPkU8, param->nDmrs, mBuf);
9717 CMCHKPK(SPkU8, param->rbStart, mBuf);
9723 /***********************************************************
9725 * Func : cmUnpkTfuPhichInfo
9728 * Desc : This structure contains one PHICH information. In order to locate the
9729 * resources to be used for PHICH the following information is provided along
9730 * with the feedback -
9741 **********************************************************/
9743 PUBLIC S16 cmUnpkTfuPhichInfo
9745 TfuPhichInfo *param,
9749 PUBLIC S16 cmUnpkTfuPhichInfo(param, mBuf)
9750 TfuPhichInfo *param;
9755 TRC3(cmUnpkTfuPhichInfo)
9757 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
9758 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
9759 CMCHKUNPK(SUnpkU8, ¶m->isAck, mBuf);
9760 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9762 CMCHKUNPK(SUnpkU8, ¶m->iPhich, mBuf);
9765 CMCHKUNPK(SUnpkU16, ¶m->txPower, mBuf);
9772 /***********************************************************
9774 * Func : cmPkTfuCntrlReqInfo
9777 * Desc : This structure is sent from Scheduler to PHY. This includes all the
9778 * control information to be sent to the UE.
9779 * -# PDCCH Physical Downlink Control Channel
9780 * -# PHICH Physical HARQ Indicator Channel
9781 * -# PCFICH Physical Control Format Indicator Channel
9790 **********************************************************/
9792 PUBLIC S16 cmPkTfuCntrlReqInfo
9794 TfuCntrlReqInfo *param,
9798 PUBLIC S16 cmPkTfuCntrlReqInfo(param, mBuf)
9799 TfuCntrlReqInfo *param;
9804 TfuPdcchInfo *tfuPdcchInfo;
9805 TfuPhichInfo *tfuPhichInfo;
9809 TRC3(cmPkTfuCntrlReqInfo)
9811 count = param->dlMpdcchLst.count;
9812 node = param->dlMpdcchLst.last;
9814 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9816 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9817 cmLListDelFrm(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk);
9818 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9820 CMCHKPK(SPkU32, count, mBuf);
9821 count = param->ulMpdcchLst.count;
9822 node = param->ulMpdcchLst.last;
9824 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9826 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9827 cmLListDelFrm(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk);
9828 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9830 CMCHKPK(SPkU32, count, mBuf);
9832 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
9833 CMCHKPK(cmPkBool, param->isSPSOcc, mBuf);
9835 count = param->phichLst.count;
9836 node = param->phichLst.last;
9838 tfuPhichInfo = (TfuPhichInfo *)node->node;
9840 CMCHKPK(cmPkTfuPhichInfo, tfuPhichInfo, mBuf);
9841 cmLListDelFrm(¶m->phichLst, &tfuPhichInfo->lnk);
9842 tfuPhichInfo->lnk.node = (PTR)NULLP;
9844 CMCHKPK(SPkU32, count, mBuf);
9845 count = param->dlPdcchLst.count;
9846 node = param->dlPdcchLst.last;
9848 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9850 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9851 cmLListDelFrm(¶m->dlPdcchLst, &tfuPdcchInfo->lnk);
9852 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9854 CMCHKPK(SPkU32, count, mBuf);
9855 count = param->ulPdcchLst.count;
9856 node = param->ulPdcchLst.last;
9858 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9861 printf("ulPdcchLst count %d time[ %d %d] \n",count,param->ulTiming.sfn,param->ulTiming.subframe);
9863 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9864 cmLListDelFrm(¶m->ulPdcchLst, &tfuPdcchInfo->lnk);
9865 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9867 CMCHKPK(SPkU32, count, mBuf);
9868 CMCHKPK(SPkU8, param->cfi, mBuf);
9869 CMCHKPK(cmPkLteTimingInfo, ¶m->dlTiming, mBuf);
9870 CMCHKPK(cmPkLteTimingInfo, ¶m->ulTiming, mBuf);
9871 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
9877 /***********************************************************
9879 * Func : cmUnpkTfuCntrlReqInfo
9882 * Desc : This structure is sent from Scheduler to PHY. This includes all the
9883 * control information to be sent to the UE.
9884 * -# PDCCH Physical Downlink Control Channel
9885 * -# PHICH Physical HARQ Indicator Channel
9886 * -# PCFICH Physical Control Format Indicator Channel
9895 **********************************************************/
9897 PUBLIC S16 cmUnpkTfuCntrlReqInfo
9899 TfuCntrlReqInfo *param,
9904 PUBLIC S16 cmUnpkTfuCntrlReqInfo(param, memCp, mBuf)
9905 TfuCntrlReqInfo *param;
9911 TfuPdcchInfo *tfuPdcchInfo;
9913 TfuPhichInfo *tfuPhichInfo;
9915 TRC3(cmUnpkTfuCntrlReqInfo)
9917 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
9918 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->ulTiming, mBuf);
9919 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->dlTiming, mBuf);
9920 CMCHKUNPK(SUnpkU8, ¶m->cfi, mBuf);
9921 cmLListInit(¶m->ulPdcchLst);
9922 CMCHKUNPK(SUnpkU32, &count, mBuf);
9923 for (loopCnt=0; loopCnt<count; loopCnt++) {
9924 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9925 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9926 cmLListAdd2Tail(¶m->ulPdcchLst, &tfuPdcchInfo->lnk);
9927 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9929 cmLListInit(¶m->dlPdcchLst);
9930 CMCHKUNPK(SUnpkU32, &count, mBuf);
9931 for (loopCnt=0; loopCnt<count; loopCnt++) {
9932 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9933 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9934 cmLListAdd2Tail(¶m->dlPdcchLst, &tfuPdcchInfo->lnk);
9935 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9937 cmLListInit(¶m->phichLst);
9938 CMCHKUNPK(SUnpkU32, &count, mBuf);
9939 for (loopCnt=0; loopCnt<count; loopCnt++) {
9940 cmGetMem((Ptr)memCp, sizeof(*tfuPhichInfo), (Ptr *)&tfuPhichInfo);
9941 CMCHKUNPK(cmUnpkTfuPhichInfo, tfuPhichInfo, mBuf);
9942 cmLListAdd2Tail(¶m->phichLst, &tfuPhichInfo->lnk);
9943 tfuPhichInfo->lnk.node = (PTR)tfuPhichInfo;
9946 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
9947 CMCHKUNPK(cmUnpkBool, ¶m->isSPSOcc, mBuf);
9950 cmLListInit(¶m->ulMpdcchLst);
9951 CMCHKUNPK(SUnpkU32, &count, mBuf);
9952 for (loopCnt=0; loopCnt<count; loopCnt++) {
9953 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9954 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9955 cmLListAdd2Tail(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk);
9956 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9958 cmLListInit(¶m->dlMpdcchLst);
9959 CMCHKUNPK(SUnpkU32, &count, mBuf);
9960 printf("4. cmUnpkTfuCntrlReqInfo :: count %ld \n", count);
9961 for (loopCnt=0; loopCnt<count; loopCnt++) {
9962 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9963 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9964 cmLListAdd2Tail(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk);
9965 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9966 printf("5. cmUnpkTfuCntrlReqInfo :: Failed \n");
9974 /***********************************************************
9976 * Func : cmPkTfuPdschDciInfo
9979 * Desc : This structure Carries the control information that would be needed
9980 * by the Physical layer to process the data to be sent on PDSCH.
9989 **********************************************************/
9991 PUBLIC S16 cmPkTfuPdschDciInfo
9993 TfuPdschDciInfo *param,
9997 PUBLIC S16 cmPkTfuPdschDciInfo(param, mBuf)
9998 TfuPdschDciInfo *param;
10003 TRC3(cmPkTfuPdschDciInfo)
10005 switch(param->format) {
10007 case TFU_DCI_FORMAT_B1:
10009 if (param->u.formatB1Info.RBAssign <= 324)
10011 printf("DCI Format: [B1] RBAssign: [%d] MCS: [%d]",
10012 param->u.formatB1Info.RBAssign,
10013 param->u.formatB1Info.u.rbAssignB1Val324.mcs);
10016 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
10018 case TFU_DCI_FORMAT_B2:
10020 if (param->u.formatB2Info.RBAssign <= 324)
10022 printf("DCI Format: [B2] RBAssign: [%d] MCS: [%d]",
10023 param->u.formatB2Info.RBAssign,
10024 param->u.formatB2Info.u.rbAssignB1Val324.mcs);
10027 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
10029 case TFU_DCI_FORMAT_A1:
10030 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
10032 case TFU_DCI_FORMAT_A2:
10033 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
10037 case TFU_DCI_FORMAT_6_2:
10038 CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf);
10040 case TFU_DCI_FORMAT_6_1A:
10041 CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf);
10044 case TFU_DCI_FORMAT_2A:
10045 CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf);
10047 case TFU_DCI_FORMAT_2:
10048 CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf);
10050 case TFU_DCI_FORMAT_1D:
10051 CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf);
10053 case TFU_DCI_FORMAT_1C:
10054 CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf);
10056 case TFU_DCI_FORMAT_1B:
10057 CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf);
10059 case TFU_DCI_FORMAT_1A:
10060 CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf);
10062 case TFU_DCI_FORMAT_1:
10063 CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf);
10068 CMCHKPK(SPkU32, param->format, mBuf);
10074 /***********************************************************
10076 * Func : cmUnpkTfuPdschDciInfo
10079 * Desc : This structure Carries the control information that would be needed
10080 * by the Physical layer to process the data to be sent on PDSCH.
10089 **********************************************************/
10091 PUBLIC S16 cmUnpkTfuPdschDciInfo
10093 TfuPdschDciInfo *param,
10097 PUBLIC S16 cmUnpkTfuPdschDciInfo(param, mBuf)
10098 TfuPdschDciInfo *param;
10103 TRC3(cmUnpkTfuPdschDciInfo)
10105 CMCHKUNPK(SUnpkU32, (U32 *)¶m->format, mBuf);
10106 switch(param->format) {
10107 case TFU_DCI_FORMAT_1:
10108 CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf);
10110 case TFU_DCI_FORMAT_1A:
10111 CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf);
10113 case TFU_DCI_FORMAT_1B:
10114 CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf);
10116 case TFU_DCI_FORMAT_1C:
10117 CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf);
10119 case TFU_DCI_FORMAT_1D:
10120 CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf);
10122 case TFU_DCI_FORMAT_2:
10123 CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf);
10125 case TFU_DCI_FORMAT_2A:
10126 CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf);
10129 case TFU_DCI_FORMAT_6_1A:
10130 CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf);
10132 case TFU_DCI_FORMAT_6_2:
10133 CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf);
10137 case TFU_DCI_FORMAT_A1:
10138 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
10140 case TFU_DCI_FORMAT_A2:
10141 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
10143 case TFU_DCI_FORMAT_B1:
10144 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
10146 case TFU_DCI_FORMAT_B2:
10147 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
10155 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10157 /***********************************************************
10159 * Func : cmPkTfuBfVectorInfo
10162 * Desc : This structure conveys the BeamForming Vector
10163 * Information that hold relevance to Tx Mode 7
10172 **********************************************************/
10174 PUBLIC S16 cmPkTfuBfVectorInfo
10176 TfuBfVectorInfo *param,
10180 PUBLIC S16 cmPkTfuBfVectorInfo(param, mBuf)
10181 TfuBfVectorInfo *param;
10186 TRC3(cmPkTfuBfVectorInfo)
10187 for(idx=TFU_MAX_DL_SUBBAND-1;idx>=0; idx--)
10189 for (idx2=param->numPhyAnt -1; idx2 >= 0; idx2--) {
10190 CMCHKPK(SPkU16, param->bfValue[idx2], mBuf);}
10191 CMCHKPK(SPkU8, param->numPhyAnt, mBuf);
10192 CMCHKPK(SPkU8, param->sbIndex, mBuf);
10197 /***********************************************************
10199 * Func : cmUnpkTfuBfVectorInfo
10202 * Desc : This structure conveys the BeamForming Vector
10203 * Information that hold relevance to Tx Mode 7
10212 **********************************************************/
10214 PUBLIC S16 cmUnpkTfuBfVectorInfo
10216 TfuBfVectorInfo *param,
10220 PUBLIC S16 cmUnpkTfuBfVectorInfo(param, mBuf)
10221 TfuBfVectorInfo *param;
10226 TRC3(cmUnpkTfuBfVectorInfo)
10227 for(idx=0;idx<TFU_MAX_DL_SUBBAND; idx++)
10229 CMCHKUNPK(SUnpkU8, ¶m->sbIndex, mBuf);
10230 CMCHKUNPK(SUnpkU8, ¶m->numPhyAnt, mBuf);
10231 for (idx2=0; idx2 <param->numPhyAnt; idx2++) {
10232 CMCHKUNPK(SUnpkU16, ¶m->bfValue[idx2], mBuf);}
10239 /***********************************************************
10241 * Func : cmPkTfuDatReqPduInfo
10244 * Desc : Pack Function for Tfu Dat Req PDU.
10253 **********************************************************/
10255 PUBLIC S16 cmPkTfuDatReqPduInfo
10257 TfuDatReqPduInfo *param,
10261 PUBLIC S16 cmPkTfuDatReqPduInfo(param, mBuf)
10262 TfuDatReqPduInfo *param;
10270 U32 lchIdx, pduIdx;
10273 TRC3(cmPkTfuDatReqPduInfo)
10275 /* LTE_ADV_FLAG_REMOVED_START */
10276 CMCHKPK(SPkU8, param->isEnbSFR, mBuf);
10277 /* LTE_ADV_FLAG_REMOVED_END */
10279 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10281 CMCHKPK(SPkU16, param->txPwrOffset, mBuf);
10282 if(param->transMode == TFU_UE_TM_7)
10284 CMCHKPK(cmPkTfuBfVectorInfo, param->bfVector, mBuf);
10285 CMCHKPK(SPkU8, param->numBfVectors, mBuf);
10286 CMCHKPK(SPkU8, param->numBfPrbPerSb, mBuf);
10288 CMCHKPK(SPkU8, param->deltaPowOffIdx, mBuf);
10289 /* LTE_ADV_FLAG_REMOVED_START */
10290 CMCHKPK(SPkU8, param->pa, mBuf);
10291 /* LTE_ADV_FLAG_REMOVED_END */
10292 CMCHKPK(SPkU8, param->numLayers, mBuf);
10294 CMCHKPK(cmPkBool, param->isTApres, mBuf);
10295 CMCHKPK(cmPkTknU32, ¶m->doa, mBuf);
10296 CMCHKPK(SPkU32, param->transMode, mBuf);
10297 CMCHKPK(cmPkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf);
10298 CMCHKPK(SPkU8, param->puschRptUsd, mBuf);
10299 for (i = 0; i < TFU_MAX_TB; i++)
10302 if (param->mBuf[i] != NULLP)
10304 tbMask = tbMask | (1 << i);
10306 #else /* L2_OPTMZ */
10307 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10309 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10312 if (param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] != NULLP)
10314 tbMask = tbMask | (1 << i);
10318 #endif /* L2_OPTMZ */
10320 /* tfu_c_001.main_2: Packing should consider nmbOfTBs.*/
10321 for (i=TFU_MAX_TB - 1; i >= 0; i--) {
10323 if (param->mBuf[i] != NULLP)
10325 CMCHKPK(cmPkBuffer, ¶m->mBuf[i], mBuf);
10328 // CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macPad, mBuf);
10329 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10331 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10334 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx],
10338 CMCHKPK(SPkU32, param->tbInfo[i].lchInfo[lchIdx].numPdu, mBuf);
10340 CMCHKPK(SPkU32, param->tbInfo[i].numLch, mBuf);
10341 CMCHKPK(SPkU32, param->tbInfo[i].padSize, mBuf);
10342 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macCes, mBuf);
10343 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macHdr, mBuf);
10344 CMCHKPK(cmPkMsgLen, param->tbInfo[i].tbSize, mBuf);
10345 CMCHKPK(cmPkBool, param->tbInfo[i].tbPres, mBuf);
10348 CMCHKPK(SPkU8, tbMask, mBuf);
10349 CMCHKPK(SPkU8, param->nmbOfTBs, mBuf);
10350 CMCHKPK(cmPkTfuPdschDciInfo, ¶m->dciInfo, mBuf);
10351 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10357 /***********************************************************
10359 * Func : cmUnpkTfuDatReqPduInfo
10362 * Desc : UnPack function for Tfu Dat req pdu .
10371 **********************************************************/
10373 PUBLIC S16 cmUnpkTfuDatReqPduInfo
10375 TfuDatReqPduInfo *param,
10379 PUBLIC S16 cmUnpkTfuDatReqPduInfo(param, mBuf)
10380 TfuDatReqPduInfo *param;
10388 U32 lchIdx, pduIdx;
10390 TRC3(cmUnpkTfuDatReqPduInfo)
10392 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10393 CMCHKUNPK(cmUnpkTfuPdschDciInfo, ¶m->dciInfo, mBuf);
10394 CMCHKUNPK(SUnpkU8, ¶m->nmbOfTBs, mBuf);
10396 CMCHKUNPK(SUnpkU8, &tbMask, mBuf);
10397 for (i=0; i<TFU_MAX_TB; i++) {
10399 if (tbMask & (1<<i))
10401 CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf[i], mBuf);
10405 param->mBuf[i] = NULLP;
10407 #else /* L2_OPTMZ*/
10408 CMCHKUNPK(cmUnpkBool, ¶m->tbInfo[i].tbPres, mBuf);
10409 CMCHKUNPK(cmUnpkMsgLen, ¶m->tbInfo[i].tbSize, mBuf);
10410 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macHdr, mBuf);
10411 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macCes, mBuf);
10412 CMCHKUNPK(SUnpkU32, ¶m->tbInfo[i].padSize, mBuf);
10413 CMCHKUNPK(SUnpkU32, (U32 *)¶m->tbInfo[i].numLch, mBuf);
10414 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10416 CMCHKUNPK(SUnpkU32, (U32 *)¶m->tbInfo[i].lchInfo[lchIdx].numPdu,
10418 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10421 if (tbMask & (1<<i))
10423 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].\
10424 mBuf[pduIdx], mBuf);
10428 param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] = NULLP;
10432 //CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macPad, mBuf);
10433 #endif /* L2_OPTMZ*/
10436 CMCHKUNPK(SUnpkU8, ¶m->puschRptUsd, mBuf);
10437 CMCHKUNPK(cmUnpkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf);
10438 CMCHKUNPK(SUnpkU32, (U32 *)¶m->transMode, mBuf);
10439 CMCHKUNPK(cmUnpkTknU32, ¶m->doa, mBuf);
10440 CMCHKUNPK(cmUnpkBool, ¶m->isTApres, mBuf);
10441 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10443 CMCHKUNPK(SUnpkU8, ¶m->numLayers, mBuf);
10444 /* LTE_ADV_FLAG_REMOVED_START */
10445 CMCHKUNPK(SUnpkU8, ¶m->pa, mBuf);
10446 /* LTE_ADV_FLAG_REMOVED_END */
10447 CMCHKUNPK(SUnpkU8, ¶m->deltaPowOffIdx, mBuf);
10448 if(param->transMode == TFU_UE_TM_7)
10450 CMCHKUNPK(SUnpkU8, ¶m->numBfPrbPerSb, mBuf);
10451 CMCHKUNPK(SUnpkU8, ¶m->numBfVectors, mBuf);
10452 CMCHKUNPK(cmUnpkTfuBfVectorInfo, param->bfVector, mBuf);
10454 CMCHKUNPK(SUnpkU16, ¶m->txPwrOffset, mBuf);
10457 /* LTE_ADV_FLAG_REMOVED_START */
10458 CMCHKUNPK(SUnpkU8, ¶m->isEnbSFR, mBuf);
10459 /* LTE_ADV_FLAG_REMOVED_END */
10466 /***********************************************************
10468 * Func : cmPkTfuDatReqInfo
10471 * Desc : This structure contains the Data PDUs
10472 * @details This structure contains Data meant to be sent on both PBCH and
10473 * PDSCH. Control information necessary for processing of the data is sent along
10483 **********************************************************/
10485 PUBLIC S16 cmPkTfuDatReqInfo
10487 TfuDatReqInfo *param,
10491 PUBLIC S16 cmPkTfuDatReqInfo(param, mBuf)
10492 TfuDatReqInfo *param;
10499 TfuDatReqPduInfo *tfuDatReqPduInfo;
10501 TRC3(cmPkTfuDatReqInfo)
10503 count = param->pdus.count;
10504 node = param->pdus.last;
10506 tfuDatReqPduInfo = (TfuDatReqPduInfo *)node->node;
10508 CMCHKPK(cmPkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf);
10509 cmLListDelFrm(¶m->pdus, &tfuDatReqPduInfo->lnk);
10510 tfuDatReqPduInfo->lnk.node = (PTR)NULLP;
10512 CMCHKPK(SPkU32, count, mBuf);
10513 CMCHKPK(cmPkTknBuf, ¶m->bchDat, mBuf);
10514 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10515 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10521 /***********************************************************
10523 * Func : cmUnpkTfuDatReqInfo
10526 * Desc : This structure contains the Data PDUs
10527 * @details This structure contains Data meant to be sent on both PBCH and
10528 * PDSCH. Control information necessary for processing of the data is sent along
10538 **********************************************************/
10540 PUBLIC S16 cmUnpkTfuDatReqInfo
10542 TfuDatReqInfo *param,
10547 PUBLIC S16 cmUnpkTfuDatReqInfo(param, memCp, mBuf)
10548 TfuDatReqInfo *param;
10554 U32 count, loopCnt;
10555 TfuDatReqPduInfo *tfuDatReqPduInfo;
10557 TRC3(cmUnpkTfuDatReqInfo)
10559 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10560 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10561 CMCHKUNPK(cmUnpkTknBuf, ¶m->bchDat, &mBuf);
10562 cmLListInit(¶m->pdus);
10563 CMCHKUNPK(SUnpkU32, &count, mBuf);
10564 for (loopCnt=0; loopCnt<count; loopCnt++) {
10565 cmGetMem((Ptr)memCp, sizeof(*tfuDatReqPduInfo), (Ptr *)&tfuDatReqPduInfo);
10566 CMCHKUNPK(cmUnpkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf);
10567 cmLListAdd2Tail(¶m->pdus, &tfuDatReqPduInfo->lnk);
10568 tfuDatReqPduInfo->lnk.node = (PTR)tfuDatReqPduInfo;
10575 /***********************************************************
10577 * Func : cmPkTfuDatInfo
10580 * Desc : This structure contains the Data PDU and the RNTI of the UE.
10589 **********************************************************/
10591 PUBLIC S16 cmPkTfuDatInfo
10597 PUBLIC S16 cmPkTfuDatInfo(param, mBuf)
10603 TRC3(cmPkTfuDatInfo)
10605 CMCHKPK(cmPkBuffer, ¶m->mBuf, mBuf);
10606 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10612 /***********************************************************
10614 * Func : cmUnpkTfuDatInfo
10617 * Desc : This structure contains the Data PDU and the RNTI of the UE.
10626 **********************************************************/
10628 PUBLIC S16 cmUnpkTfuDatInfo
10634 PUBLIC S16 cmUnpkTfuDatInfo(param, mBuf)
10640 TRC3(cmUnpkTfuDatInfo)
10642 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10643 CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf, mBuf);
10649 /***********************************************************
10651 * Func : cmPkTfuDatIndInfo
10654 * Desc : This structure contains the Data PDUs received at Physical Layer.
10655 * @details All the PDUs received by Physical layer in one subframe are clubbed
10656 * together into a single data structure and sent to MAC for processing.
10665 **********************************************************/
10667 PUBLIC S16 cmPkTfuDatIndInfo
10669 TfuDatIndInfo *param,
10673 PUBLIC S16 cmPkTfuDatIndInfo(param, mBuf)
10674 TfuDatIndInfo *param;
10681 TfuDatInfo *tfuDatInfo;
10683 TRC3(cmPkTfuDatIndInfo)
10686 CMCHKPK(SPkU8, param->sccIdx, mBuf);
10687 CMCHKPK(SPkU8, param->sectorId, mBuf);
10688 #endif /* TFU_5GTF */
10689 count = param->datIndLst.count;
10690 node = param->datIndLst.last;
10692 tfuDatInfo = (TfuDatInfo *)node->node;
10694 CMCHKPK(cmPkTfuDatInfo, tfuDatInfo, mBuf);
10695 cmLListDelFrm(¶m->datIndLst, &tfuDatInfo->lnk);
10696 tfuDatInfo->lnk.node = (PTR)NULLP;
10698 CMCHKPK(SPkU32, count, mBuf);
10699 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10700 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10706 /***********************************************************
10708 * Func : cmUnpkTfuDatIndInfo
10711 * Desc : This structure contains the Data PDUs received at Physical Layer.
10712 * @details All the PDUs received by Physical layer in one subframe are clubbed
10713 * together into a single data structure and sent to MAC for processing.
10722 **********************************************************/
10724 PUBLIC S16 cmUnpkTfuDatIndInfo
10726 TfuDatIndInfo *param,
10731 PUBLIC S16 cmUnpkTfuDatIndInfo(param, memCp, mBuf)
10732 TfuDatIndInfo *param;
10738 U32 count, loopCnt;
10739 TfuDatInfo *tfuDatInfo;
10741 TRC3(cmUnpkTfuDatIndInfo)
10743 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10744 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10745 cmLListInit(¶m->datIndLst);
10746 CMCHKUNPK(SUnpkU32, &count, mBuf);
10747 for (loopCnt=0; loopCnt<count; loopCnt++) {
10748 cmGetMem((Ptr)memCp, sizeof(*tfuDatInfo), (Ptr *)&tfuDatInfo);
10749 CMCHKUNPK(cmUnpkTfuDatInfo, tfuDatInfo, mBuf);
10750 cmLListAdd2Tail(¶m->datIndLst, &tfuDatInfo->lnk);
10751 tfuDatInfo->lnk.node = (PTR)tfuDatInfo;
10754 CMCHKUNPK(SUnpkU8, ¶m->sectorId, mBuf);
10755 CMCHKUNPK(SUnpkU8, ¶m->sccIdx, mBuf);
10756 #endif /* TFU_5GTF */
10762 /***********************************************************
10764 * Func : cmPkTfuSrInfo
10767 * Desc : This structure contains the SR indication for a UE, identified by
10768 * the given RNTI. The structure also contains a PUCCH Delta power, that is
10769 * calculated by the physical layer, and is used by the scheduler for Power
10770 * control of the UE.
10779 **********************************************************/
10781 PUBLIC S16 cmPkTfuSrInfo
10787 PUBLIC S16 cmPkTfuSrInfo(param, mBuf)
10793 TRC3(cmPkTfuSrInfo)
10795 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10801 /***********************************************************
10803 * Func : cmUnpkTfuSrInfo
10806 * Desc : This structure contains the SR indication for a UE, identified by
10807 * the given RNTI. The structure also contains a PUCCH Delta power, that is
10808 * calculated by the physical layer, and is used by the scheduler for Power
10809 * control of the UE.
10818 **********************************************************/
10820 PUBLIC S16 cmUnpkTfuSrInfo
10826 PUBLIC S16 cmUnpkTfuSrInfo(param, mBuf)
10832 TRC3(cmUnpkTfuSrInfo)
10834 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10840 /***********************************************************
10842 * Func : cmPkTfuSrIndInfo
10845 * Desc : This structure contains all the Scheduling Requests (SR) indications
10846 * received in a subframe.
10855 **********************************************************/
10857 PUBLIC S16 cmPkTfuSrIndInfo
10859 TfuSrIndInfo *param,
10863 PUBLIC S16 cmPkTfuSrIndInfo(param, mBuf)
10864 TfuSrIndInfo *param;
10871 TfuSrInfo *tfuSrInfo;
10873 TRC3(cmPkTfuSrIndInfo)
10875 count = param->srLst.count;
10876 node = param->srLst.last;
10878 tfuSrInfo = (TfuSrInfo *)node->node;
10880 CMCHKPK(cmPkTfuSrInfo, tfuSrInfo, mBuf);
10881 cmLListDelFrm(¶m->srLst, &tfuSrInfo->lnk);
10882 tfuSrInfo->lnk.node = (PTR)NULLP;
10884 CMCHKPK(SPkU32, count, mBuf);
10885 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10886 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10892 /***********************************************************
10894 * Func : cmUnpkTfuSrIndInfo
10897 * Desc : This structure contains all the Scheduling Requests (SR) indications
10898 * received in a subframe.
10907 **********************************************************/
10909 PUBLIC S16 cmUnpkTfuSrIndInfo
10911 TfuSrIndInfo *param,
10916 PUBLIC S16 cmUnpkTfuSrIndInfo(param, memCp, mBuf)
10917 TfuSrIndInfo *param;
10923 U32 count, loopCnt;
10924 TfuSrInfo *tfuSrInfo;
10926 TRC3(cmUnpkTfuSrIndInfo)
10928 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10929 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10930 cmLListInit(¶m->srLst);
10931 CMCHKUNPK(SUnpkU32, &count, mBuf);
10932 for (loopCnt=0; loopCnt<count; loopCnt++) {
10933 cmGetMem((Ptr)memCp, sizeof(*tfuSrInfo), (Ptr *)&tfuSrInfo);
10934 CMCHKUNPK(cmUnpkTfuSrInfo, tfuSrInfo, mBuf);
10935 cmLListAdd2Tail(¶m->srLst, &tfuSrInfo->lnk);
10936 tfuSrInfo->lnk.node = (PTR)tfuSrInfo;
10941 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10942 /***********************************************************
10944 * Func : cmPkTfuHqInfo
10947 * Desc : This structure contains the HARQ feedback for a single UE.
10948 * @details RNTI is present to identify the UE.
10949 * For FDD a single feedback is present.
10950 * For TDD HARQ multiplexing a list of HARQ feedbacks is present.
10959 **********************************************************/
10961 PUBLIC S16 cmPkTfuHqInfo
10967 PUBLIC S16 cmPkTfuHqInfo(param, mBuf)
10974 TRC3(cmPkTfuHqInfo)
10976 CMCHKPK(SPkU8, param->isPusch, mBuf);
10977 for (i=TFU_MAX_HARQ_FDBKS-1; i >= 0; i--) {
10978 CMCHKPK(SPkU32, param->isAck[i], mBuf);
10981 CMCHKPK(SPkU8, param->M, mBuf);
10983 CMCHKPK(SPkU8, param->noOfTbs, mBuf);
10984 /* ACC-TDD ccpu00130520 */
10985 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
10986 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10990 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10991 /***********************************************************
10993 * Func : cmUnpkTfuHqInfo
10996 * Desc : This structure contains the HARQ feedback for a single UE.
10997 * @details RNTI is present to identify the UE.
10998 * For FDD a single feedback is present.
10999 * For TDD HARQ multiplexing a list of HARQ feedbacks is present.
11008 **********************************************************/
11010 PUBLIC S16 cmUnpkTfuHqInfo
11016 PUBLIC S16 cmUnpkTfuHqInfo(param, mBuf)
11022 TRC3(cmUnpkTfuHqInfo)
11024 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11025 /* ACC-TDD ccpu00130520 */
11026 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
11027 CMCHKUNPK(SUnpkU8, ¶m->noOfTbs, mBuf);
11029 CMCHKUNPK(SUnpkU8, ¶m->M, mBuf);
11031 for (i=0; i<TFU_MAX_HARQ_FDBKS; i++) {
11032 CMCHKUNPK(SUnpkU32, (U32 *)¶m->isAck[i], mBuf);
11034 CMCHKUNPK(SUnpkU8, ¶m->isPusch, mBuf);
11042 /***********************************************************
11044 * Func : cmPkTfuHqIndInfo
11047 * Desc : This structure contains a list of HARQ feedback for a number of UEs.
11048 * @details All the HARQ feedback received in the subframe are clubbed together
11049 * in this data structure and given to the scheduler for processing.
11058 **********************************************************/
11060 PUBLIC S16 cmPkTfuHqIndInfo
11062 TfuHqIndInfo *param,
11066 PUBLIC S16 cmPkTfuHqIndInfo(param, mBuf)
11067 TfuHqIndInfo *param;
11074 TfuHqInfo *tfuHqInfo;
11076 TRC3(cmPkTfuHqIndInfo)
11078 count = param->hqIndLst.count;
11079 node = param->hqIndLst.last;
11081 tfuHqInfo = (TfuHqInfo *)node->node;
11083 CMCHKPK(cmPkTfuHqInfo, tfuHqInfo, mBuf);
11084 cmLListDelFrm(¶m->hqIndLst, &tfuHqInfo->lnk);
11085 tfuHqInfo->lnk.node = (PTR)NULLP;
11087 CMCHKPK(SPkU32, count, mBuf);
11088 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11089 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11095 /***********************************************************
11097 * Func : cmUnpkTfuHqIndInfo
11100 * Desc : This structure contains a list of HARQ feedback for a number of UEs.
11101 * @details All the HARQ feedback received in the subframe are clubbed together
11102 * in this data structure and given to the scheduler for processing.
11111 **********************************************************/
11113 PUBLIC S16 cmUnpkTfuHqIndInfo
11115 TfuHqIndInfo *param,
11120 PUBLIC S16 cmUnpkTfuHqIndInfo(param, memCp, mBuf)
11121 TfuHqIndInfo *param;
11127 U32 count, loopCnt;
11128 TfuHqInfo *tfuHqInfo;
11130 TRC3(cmUnpkTfuHqIndInfo)
11132 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11133 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11134 cmLListInit(¶m->hqIndLst);
11135 CMCHKUNPK(SUnpkU32, &count, mBuf);
11136 for (loopCnt=0; loopCnt<count; loopCnt++) {
11137 cmGetMem((Ptr)memCp, sizeof(*tfuHqInfo), (Ptr *)&tfuHqInfo);
11138 CMCHKUNPK(cmUnpkTfuHqInfo, tfuHqInfo, mBuf);
11139 cmLListAdd2Tail(¶m->hqIndLst, &tfuHqInfo->lnk);
11140 tfuHqInfo->lnk.node = (PTR)tfuHqInfo;
11147 /***********************************************************
11149 * Func : cmPkTfuUlCqiInfo
11152 * Desc : This structure conveys the Uplink CQI information for a single subband.
11161 **********************************************************/
11163 PUBLIC S16 cmPkTfuUlCqiInfo
11165 TfuUlCqiInfo *param,
11169 PUBLIC S16 cmPkTfuUlCqiInfo(param, mBuf)
11170 TfuUlCqiInfo *param;
11175 TRC3(cmPkTfuUlCqiInfo)
11177 CMCHKPK(cmPkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf);
11183 /***********************************************************
11185 * Func : cmUnpkTfuUlCqiInfo
11188 * Desc : This structure conveys the Uplink CQI information for a single subband.
11197 **********************************************************/
11199 PUBLIC S16 cmUnpkTfuUlCqiInfo
11201 TfuUlCqiInfo *param,
11205 PUBLIC S16 cmUnpkTfuUlCqiInfo(param, mBuf)
11206 TfuUlCqiInfo *param;
11211 TRC3(cmUnpkTfuUlCqiInfo)
11213 CMCHKUNPK(cmUnpkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf);
11219 /***********************************************************
11221 * Func : cmPkTfuUlCqiRpt
11224 * Desc : This structure contains the UL CQI estimated by the physical layer.
11225 * @details The report could be wideband CQI or subBand CQI or both.
11234 **********************************************************/
11236 PUBLIC S16 cmPkTfuUlCqiRpt
11238 TfuUlCqiRpt *param,
11242 PUBLIC S16 cmPkTfuUlCqiRpt(param, mBuf)
11243 TfuUlCqiRpt *param;
11249 TRC3(cmPkTfuUlCqiRpt)
11251 for (i=TFU_MAX_UL_SUBBAND-1; i >= 0; i--) {
11252 CMCHKPK(cmPkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf);
11254 CMCHKPK(SPkU8, param->numSubband, mBuf);
11255 CMCHKPK(SPkU8, param->wideCqi, mBuf);
11256 CMCHKPK(SPkU8, param->isTxPort0, mBuf);
11257 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11263 /***********************************************************
11265 * Func : cmUnpkTfuUlCqiRpt
11268 * Desc : This structure contains the UL CQI estimated by the physical layer.
11269 * @details The report could be wideband CQI or subBand CQI or both.
11278 **********************************************************/
11280 PUBLIC S16 cmUnpkTfuUlCqiRpt
11282 TfuUlCqiRpt *param,
11286 PUBLIC S16 cmUnpkTfuUlCqiRpt(param, mBuf)
11287 TfuUlCqiRpt *param;
11293 TRC3(cmUnpkTfuUlCqiRpt)
11295 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11296 CMCHKUNPK(SUnpkU8, ¶m->isTxPort0, mBuf);
11297 CMCHKUNPK(SUnpkU8, ¶m->wideCqi, mBuf);
11298 CMCHKUNPK(SUnpkU8, ¶m->numSubband, mBuf);
11299 for (i=0; i<TFU_MAX_UL_SUBBAND; i++) {
11300 CMCHKUNPK(cmUnpkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf);
11307 /***********************************************************
11309 * Func : cmPkTfuUlCqiIndInfo
11312 * Desc : This structure conveys the Uplink CQI information.
11313 * @details Uplink CQI is calculated by the physical layer, and is this
11314 * information is provided to the scheduler.
11315 * This data structure clubs together the UL CQI estimates for all the UEs that
11316 * have been scheduled in the subframe for uplink transmission.
11325 **********************************************************/
11327 PUBLIC S16 cmPkTfuUlCqiIndInfo
11329 TfuUlCqiIndInfo *param,
11333 PUBLIC S16 cmPkTfuUlCqiIndInfo(param, mBuf)
11334 TfuUlCqiIndInfo *param;
11341 TfuUlCqiRpt *tfuUlCqiRpt;
11343 TRC3(cmPkTfuUlCqiIndInfo)
11345 count = param->ulCqiRpt.count;
11346 node = param->ulCqiRpt.last;
11348 tfuUlCqiRpt = (TfuUlCqiRpt *)node->node;
11350 CMCHKPK(cmPkTfuUlCqiRpt, tfuUlCqiRpt, mBuf);
11351 cmLListDelFrm(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk);
11352 tfuUlCqiRpt->lnk.node = (PTR)NULLP;
11354 CMCHKPK(SPkU32, count, mBuf);
11355 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11356 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11362 /***********************************************************
11364 * Func : cmUnpkTfuUlCqiIndInfo
11367 * Desc : This structure conveys the Uplink CQI information.
11368 * @details Uplink CQI is calculated by the physical layer, and is this
11369 * information is provided to the scheduler.
11370 * This data structure clubs together the UL CQI estimates for all the UEs that
11371 * have been scheduled in the subframe for uplink transmission.
11380 **********************************************************/
11382 PUBLIC S16 cmUnpkTfuUlCqiIndInfo
11384 TfuUlCqiIndInfo *param,
11389 PUBLIC S16 cmUnpkTfuUlCqiIndInfo(param, memCp, mBuf)
11390 TfuUlCqiIndInfo *param;
11396 U32 count, loopCnt;
11397 TfuUlCqiRpt *tfuUlCqiRpt;
11399 TRC3(cmUnpkTfuUlCqiIndInfo)
11401 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11402 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11403 cmLListInit(¶m->ulCqiRpt);
11404 CMCHKUNPK(SUnpkU32, &count, mBuf);
11405 for (loopCnt=0; loopCnt<count; loopCnt++) {
11406 cmGetMem((Ptr)memCp, sizeof(*tfuUlCqiRpt), (Ptr *)&tfuUlCqiRpt);
11407 CMCHKUNPK(cmUnpkTfuUlCqiRpt, tfuUlCqiRpt, mBuf);
11408 cmLListAdd2Tail(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk);
11409 tfuUlCqiRpt->lnk.node = (PTR)tfuUlCqiRpt;
11417 /***********************************************************
11419 * Func : cmPkTfuDlCqiRpt
11422 * Desc : This structure contains the DL CQI report for a single UE.
11423 * @details The report could either be reported on PUCCH or PUSCH, a flag
11424 * conveys this information.
11433 **********************************************************/
11435 PUBLIC S16 cmPkTfuDlCqiRpt
11437 TfuDlCqiRpt *param,
11441 PUBLIC S16 cmPkTfuDlCqiRpt(param, mBuf)
11442 TfuDlCqiRpt *param;
11447 TRC3(cmPkTfuDlCqiRpt)
11449 if (cmPkTfuDlCqiInfo(param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK)
11451 CMCHKPK(SPkU8, param->isPucchInfo, mBuf);
11452 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11458 /***********************************************************
11460 * Func : cmUnpkTfuDlCqiRpt
11463 * Desc : This structure contains the DL CQI report for a single UE.
11464 * @details The report could either be reported on PUCCH or PUSCH, a flag
11465 * conveys this information.
11474 **********************************************************/
11476 PUBLIC S16 cmUnpkTfuDlCqiRpt
11478 TfuDlCqiRpt *param,
11482 PUBLIC S16 cmUnpkTfuDlCqiRpt(param, mBuf)
11483 TfuDlCqiRpt *param;
11488 TRC3(cmUnpkTfuDlCqiRpt)
11490 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11491 CMCHKUNPK(SUnpkU8, ¶m->isPucchInfo, mBuf);
11492 if (cmUnpkTfuDlCqiInfo (param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK)
11499 /***********************************************************
11501 * Func : cmPkTfuDlCqiIndInfo
11504 * Desc : This structure contains a list of Downlink CQI reports transmitted by
11506 * @details This structure clubs together DL CQI reports for a number of UEs.
11515 **********************************************************/
11517 PUBLIC S16 cmPkTfuDlCqiIndInfo
11519 TfuDlCqiIndInfo *param,
11523 PUBLIC S16 cmPkTfuDlCqiIndInfo(param, mBuf)
11524 TfuDlCqiIndInfo *param;
11531 TfuDlCqiRpt *tfuDlCqiRpt;
11533 TRC3(cmPkTfuDlCqiIndInfo)
11535 count = param->dlCqiRptsLst.count;
11536 node = param->dlCqiRptsLst.last;
11538 tfuDlCqiRpt = (TfuDlCqiRpt *)node->node;
11540 CMCHKPK(cmPkTfuDlCqiRpt, tfuDlCqiRpt, mBuf);
11541 cmLListDelFrm(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk);
11542 tfuDlCqiRpt->lnk.node = (PTR)NULLP;
11544 CMCHKPK(SPkU32, count, mBuf);
11545 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11546 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11552 /***********************************************************
11554 * Func : cmUnpkTfuDlCqiIndInfo
11557 * Desc : This structure contains a list of Downlink CQI reports transmitted by
11559 * @details This structure clubs together DL CQI reports for a number of UEs.
11568 **********************************************************/
11570 PUBLIC S16 cmUnpkTfuDlCqiIndInfo
11572 TfuDlCqiIndInfo *param,
11577 PUBLIC S16 cmUnpkTfuDlCqiIndInfo(param, memCp, mBuf)
11578 TfuDlCqiIndInfo *param;
11584 U32 count, loopCnt;
11585 TfuDlCqiRpt *tfuDlCqiRpt;
11587 TRC3(cmUnpkTfuDlCqiIndInfo)
11589 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11590 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11591 cmLListInit(¶m->dlCqiRptsLst);
11592 CMCHKUNPK(SUnpkU32, &count, mBuf);
11593 for (loopCnt=0; loopCnt<count; loopCnt++) {
11594 cmGetMem((Ptr)memCp, sizeof(*tfuDlCqiRpt), (Ptr *)&tfuDlCqiRpt);
11595 CMCHKUNPK(cmUnpkTfuDlCqiRpt, tfuDlCqiRpt, mBuf);
11596 cmLListAdd2Tail(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk);
11597 tfuDlCqiRpt->lnk.node = (PTR)tfuDlCqiRpt;
11604 /***********************************************************
11606 * Func : cmPkTfuCrcInfo
11609 * Desc : This structure contains the CRC indication for a single
11619 **********************************************************/
11621 PUBLIC S16 cmPkTfuCrcInfo
11627 PUBLIC S16 cmPkTfuCrcInfo(param, mBuf)
11633 TRC3(cmPkTfuCrcInfo)
11635 CMCHKPK(cmPkTknU8, ¶m->rv, mBuf);
11636 CMCHKPK(SPkU8, param->isFailure, mBuf);
11637 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11643 /***********************************************************
11645 * Func : cmUnpkTfuCrcInfo
11648 * Desc : This structure contains the CRC indication for a single
11658 **********************************************************/
11660 PUBLIC S16 cmUnpkTfuCrcInfo
11666 PUBLIC S16 cmUnpkTfuCrcInfo(param, mBuf)
11672 TRC3(cmUnpkTfuCrcInfo)
11674 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11675 CMCHKUNPK(SUnpkU8, ¶m->isFailure, mBuf);
11676 CMCHKUNPK(cmUnpkTknU8, ¶m->rv, mBuf);
11682 /***********************************************************
11684 * Func : cmPkTfuCrcIndInfo
11687 * Desc : This structure contains information that is passed as a part of the
11688 * CRC Indication from PHY to MAC.
11689 * @details This structure clubs together all the CRC indications for
11690 * a single subframe and conveys this information to the scheduler.
11699 **********************************************************/
11701 PUBLIC S16 cmPkTfuCrcIndInfo
11703 TfuCrcIndInfo *param,
11707 PUBLIC S16 cmPkTfuCrcIndInfo(param, mBuf)
11708 TfuCrcIndInfo *param;
11715 TfuCrcInfo *tfuCrcIndInfo;
11717 TRC3(cmPkTfuCrcIndInfo)
11720 CMCHKPK(SPkU8, param->sccIdx, mBuf);
11721 CMCHKPK(SPkU8, param->sectorId, mBuf);
11722 #endif /* TFU_5GTF */
11723 count = param->crcLst.count;
11724 node = param->crcLst.last;
11726 tfuCrcIndInfo = (TfuCrcInfo *)node->node;
11728 CMCHKPK(cmPkTfuCrcInfo, tfuCrcIndInfo, mBuf);
11729 cmLListDelFrm(¶m->crcLst, &tfuCrcIndInfo->lnk);
11730 tfuCrcIndInfo->lnk.node = (PTR)NULLP;
11732 CMCHKPK(SPkU32, count, mBuf);
11733 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11734 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11740 /***********************************************************
11742 * Func : cmUnpkTfuCrcIndInfo
11745 * Desc : This structure contains information that is passed as a part of the
11746 * CRC Indication from PHY to MAC.
11747 * @details This structure clubs together all the CRC indications for
11748 * a single subframe and conveys this information to the scheduler.
11757 **********************************************************/
11759 PUBLIC S16 cmUnpkTfuCrcIndInfo
11761 TfuCrcIndInfo *param,
11766 PUBLIC S16 cmUnpkTfuCrcIndInfo(param, memCp, mBuf)
11767 TfuCrcIndInfo *param;
11773 U32 count, loopCnt;
11774 TfuCrcInfo *tfuCrcIndInfo;
11776 TRC3(cmUnpkTfuCrcIndInfo)
11778 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11779 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11780 cmLListInit(¶m->crcLst);
11781 CMCHKUNPK(SUnpkU32, &count, mBuf);
11782 for (loopCnt=0; loopCnt<count; loopCnt++) {
11783 cmGetMem((Ptr)memCp, sizeof(*tfuCrcIndInfo), (Ptr *)&tfuCrcIndInfo);
11784 CMCHKUNPK(cmUnpkTfuCrcInfo, tfuCrcIndInfo, mBuf);
11785 cmLListAdd2Tail(¶m->crcLst, &tfuCrcIndInfo->lnk);
11786 tfuCrcIndInfo->lnk.node = (PTR)tfuCrcIndInfo;
11789 CMCHKUNPK(SUnpkU8, ¶m->sectorId, mBuf);
11790 CMCHKUNPK(SUnpkU8, ¶m->sccIdx, mBuf);
11791 #endif /* TFU_5GTF */
11797 /***********************************************************
11799 * Func : cmPkTfuTimingAdvInfo
11802 * Desc : This structure contains the timing advance information for a single
11812 **********************************************************/
11814 PUBLIC S16 cmPkTfuTimingAdvInfo
11816 TfuTimingAdvInfo *param,
11820 PUBLIC S16 cmPkTfuTimingAdvInfo(param, mBuf)
11821 TfuTimingAdvInfo *param;
11826 TRC3(cmPkTfuTimingAdvInfo)
11828 CMCHKPK(SPkU8, param->timingAdv, mBuf);
11829 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11835 /***********************************************************
11837 * Func : cmUnpkTfuTimingAdvInfo
11840 * Desc : This structure contains the timing advance information for a single
11850 **********************************************************/
11852 PUBLIC S16 cmUnpkTfuTimingAdvInfo
11854 TfuTimingAdvInfo *param,
11858 PUBLIC S16 cmUnpkTfuTimingAdvInfo(param, mBuf)
11859 TfuTimingAdvInfo *param;
11864 TRC3(cmUnpkTfuTimingAdvInfo)
11866 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11867 CMCHKUNPK(SUnpkU8, ¶m->timingAdv, mBuf);
11873 /***********************************************************
11875 * Func : cmPkTfuTimingAdvIndInfo
11878 * Desc : This structure contains information that is passed as part of the Timing
11879 * Advance indication from PHY to MAC.
11880 * @details This structure clubs together timing advances for a number of UEs.
11889 **********************************************************/
11891 PUBLIC S16 cmPkTfuTimingAdvIndInfo
11893 TfuTimingAdvIndInfo *param,
11897 PUBLIC S16 cmPkTfuTimingAdvIndInfo(param, mBuf)
11898 TfuTimingAdvIndInfo *param;
11905 TfuTimingAdvInfo *tfuTimingAdvInfo;
11907 TRC3(cmPkTfuTimingAdvIndInfo)
11909 count = param->timingAdvLst.count;
11910 node = param->timingAdvLst.last;
11912 tfuTimingAdvInfo = (TfuTimingAdvInfo *)node->node;
11914 CMCHKPK(cmPkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf);
11915 cmLListDelFrm(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk);
11916 tfuTimingAdvInfo->lnk.node = (PTR)NULLP;
11918 CMCHKPK(SPkU32, count, mBuf);
11919 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11920 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11926 /***********************************************************
11928 * Func : cmUnpkTfuTimingAdvIndInfo
11931 * Desc : This structure contains information that is passed as part of the Timing
11932 * Advance indication from PHY to MAC.
11933 * @details This structure clubs together timing advances for a number of UEs.
11942 **********************************************************/
11944 PUBLIC S16 cmUnpkTfuTimingAdvIndInfo
11946 TfuTimingAdvIndInfo *param,
11951 PUBLIC S16 cmUnpkTfuTimingAdvIndInfo(param, memCp, mBuf)
11952 TfuTimingAdvIndInfo *param;
11958 U32 count, loopCnt;
11959 TfuTimingAdvInfo *tfuTimingAdvInfo;
11961 TRC3(cmUnpkTfuTimingAdvIndInfo)
11963 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11964 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11965 cmLListInit(¶m->timingAdvLst);
11966 CMCHKUNPK(SUnpkU32, &count, mBuf);
11967 for (loopCnt=0; loopCnt<count; loopCnt++) {
11968 cmGetMem((Ptr)memCp, sizeof(*tfuTimingAdvInfo), (Ptr *)&tfuTimingAdvInfo);
11969 CMCHKUNPK(cmUnpkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf);
11970 cmLListAdd2Tail(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk);
11971 tfuTimingAdvInfo->lnk.node = (PTR)tfuTimingAdvInfo;
11977 /***********************************************************
11979 * Func : cmPkTfuTtiCellInfo
11982 * Desc : This structure contains information that is
11983 * passed as a part of the TTI indication sent
11984 * from CL to MAC and SCH
11993 **********************************************************/
11995 PUBLIC S16 cmPkTfuTtiCellInfo
11997 TfuTtiCellInfo *param,
12001 PUBLIC S16 cmPkTfuTtiCellInfo(param, mBuf)
12002 TfuTtiCellInfo *param;
12007 TRC3(cmPkTfuTtiCellInfo)
12009 CMCHKPK(SPkU8, param->ulBlankSf, mBuf);
12010 CMCHKPK(SPkU8, param->dlBlankSf, mBuf);
12011 CMCHKPK(SPkU8, param->schTickDelta, mBuf);
12012 CMCHKPK(cmPkBool, param->isDummyTti, mBuf);
12013 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12014 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12019 /***********************************************************
12021 * Func : cmPkTfuTtiIndInfo
12024 * Desc : This structure contains information that is passed as a part of the TTI
12025 * indication sent from PHY to MAC.
12034 **********************************************************/
12036 PUBLIC S16 cmPkTfuTtiIndInfo
12038 TfuTtiIndInfo *param,
12042 PUBLIC S16 cmPkTfuTtiIndInfo(param, mBuf)
12043 TfuTtiIndInfo *param;
12049 TRC3(cmPkTfuTtiIndInfo)
12052 for (i=(param->numCells-1); i >= 0; i--) {
12053 CMCHKPK(cmPkTfuTtiCellInfo, ¶m->cells[i], mBuf);
12055 CMCHKPK(SPkU8, param->numCells, mBuf);
12061 /***********************************************************
12063 * Func : cmUnpkTfuTtiCellInfo
12066 * Desc : This structure contains information that is
12067 * passed as a part of the TTI indication sent
12068 * from CL to MAC and SCH
12077 **********************************************************/
12079 PUBLIC S16 cmUnpkTfuTtiCellInfo
12081 TfuTtiCellInfo *param,
12085 PUBLIC S16 cmUnpkTfuTtiCellInfo(param, mBuf)
12086 TfuTtiCellInfo *param;
12091 TRC3(cmUnpkTfuTtiCellInfo)
12093 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12094 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12095 CMCHKUNPK(cmUnpkBool, ¶m->isDummyTti, mBuf);
12096 CMCHKUNPK(SUnpkU8, ¶m->schTickDelta, mBuf);
12097 CMCHKUNPK(SUnpkU8, ¶m->dlBlankSf, mBuf);
12098 CMCHKUNPK(SUnpkU8, ¶m->ulBlankSf, mBuf);
12104 /***********************************************************
12106 * Func : cmUnpkTfuTtiIndInfo
12109 * Desc : This structure contains information that is passed as a part of the TTI
12110 * indication sent from PHY to MAC.
12119 **********************************************************/
12121 PUBLIC S16 cmUnpkTfuTtiIndInfo
12123 TfuTtiIndInfo *param,
12127 PUBLIC S16 cmUnpkTfuTtiIndInfo(param, mBuf)
12128 TfuTtiIndInfo *param;
12134 TRC3(cmUnpkTfuTtiIndInfo)
12137 CMCHKUNPK(SUnpkU8, ¶m->numCells, mBuf);
12138 for (i=0; i<(param->numCells); i++) {
12139 CMCHKUNPK(cmUnpkTfuTtiCellInfo, ¶m->cells[i], mBuf);
12147 /***********************************************************
12149 * Func : cmPkTfuRaReqInfo
12152 * Desc : This structure contains the information for a single Random Access Request.
12153 * @details The information present in this structure is for a single preamble.
12154 * Associated with each preamble are fields that the physical layer calculates
12155 * based on the reception of the Random Access Request. These are the following
12156 * -# Timing Advance
12158 * -# CQI (optional).
12167 **********************************************************/
12169 PUBLIC S16 cmPkTfuRaReqInfo
12171 TfuRaReqInfo *param,
12175 PUBLIC S16 cmPkTfuRaReqInfo(param, mBuf)
12176 TfuRaReqInfo *param;
12181 TRC3(cmPkTfuRaReqInfo)
12183 CMCHKPK(SPkU8, param->cqiIdx, mBuf);
12184 CMCHKPK(SPkU8, param->cqiPres, mBuf);
12185 CMCHKPK(SPkU8, param->tpc, mBuf);
12186 CMCHKPK(SPkU16, param->ta, mBuf);
12187 CMCHKPK(SPkU8, param->rapId, mBuf);
12193 /***********************************************************
12195 * Func : cmUnpkTfuRaReqInfo
12198 * Desc : This structure contains the information for a single Random Access Request.
12199 * @details The information present in this structure is for a single preamble.
12200 * Associated with each preamble are fields that the physical layer calculates
12201 * based on the reception of the Random Access Request. These are the following
12202 * -# Timing Advance
12204 * -# CQI (optional).
12213 **********************************************************/
12215 PUBLIC S16 cmUnpkTfuRaReqInfo
12217 TfuRaReqInfo *param,
12221 PUBLIC S16 cmUnpkTfuRaReqInfo(param, mBuf)
12222 TfuRaReqInfo *param;
12227 TRC3(cmUnpkTfuRaReqInfo)
12229 CMCHKUNPK(SUnpkU8, ¶m->rapId, mBuf);
12230 CMCHKUNPK(SUnpkU16, ¶m->ta, mBuf);
12231 CMCHKUNPK(SUnpkU8, ¶m->tpc, mBuf);
12232 CMCHKUNPK(SUnpkU8, ¶m->cqiPres, mBuf);
12233 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx, mBuf);
12239 /***********************************************************
12241 * Func : cmPkTfuRachInfo
12244 * Desc : This structure contains RACH request information for a single
12254 **********************************************************/
12256 PUBLIC S16 cmPkTfuRachInfo
12259 TfuRachInfo *param,
12263 PUBLIC S16 cmPkTfuRachInfo(memCp, param, mBuf)
12265 TfuRachInfo *param;
12271 TRC3(cmPkTfuRachInfo)
12273 for (i= (param->numRaReqInfo - 1); i >= 0; i--) {
12274 CMCHKPK(cmPkTfuRaReqInfo, &(param->raReqInfoArr[i]), mBuf);
12277 CMCHKPK(SPkU16, param->nPwrFactor, mBuf);
12278 CMCHKPK(SPkU8, param->nPRACHSymbIndex, mBuf);
12279 CMCHKPK(SPkU8, param->nf1Value, mBuf);
12280 CMCHKPK(SPkU8, param->nCyclicShift, mBuf);
12281 CMCHKPK(SPkU8, param->nRootSeq, mBuf);
12282 CMCHKPK(SPkU8, param->nPRACHConfiguration, mBuf);
12283 CMCHKPK(SPkU8, param->nPreambleFormat, mBuf);
12285 CMCHKPK(SPkU8, param->numRaReqInfo, mBuf);
12286 CMCHKPK(cmPkLteRnti, param->raRnti, mBuf);
12292 /***********************************************************
12294 * Func : cmUnpkTfuRachInfo
12297 * Desc : This structure contains RACH request information for a single
12307 **********************************************************/
12309 PUBLIC S16 cmUnpkTfuRachInfo
12312 TfuRachInfo *param,
12316 PUBLIC S16 cmUnpkTfuRachInfo(memCp, param, mBuf)
12318 TfuRachInfo *param;
12324 TRC3(cmUnpkTfuRachInfo)
12326 CMCHKUNPK(cmUnpkLteRnti, ¶m->raRnti, mBuf);
12327 CMCHKUNPK(SUnpkU8, ¶m->numRaReqInfo, mBuf);
12329 CMCHKUNPK(SPkU8, param->nPreambleFormat, mBuf);
12330 CMCHKUNPK(SPkU8, param->nPRACHConfiguration, mBuf);
12331 CMCHKUNPK(SPkU8, param->nRootSeq, mBuf);
12332 CMCHKUNPK(SPkU8, param->nCyclicShift, mBuf);
12333 CMCHKUNPK(SPkU8, param->nf1Value, mBuf);
12334 CMCHKUNPK(SPkU8, param->nPRACHSymbIndex, mBuf);
12335 CMCHKUNPK(SPkU16, param->nPwrFactor, mBuf);
12337 if (cmGetMem (&(memCp), (sizeof(TfuRaReqInfo) * param->numRaReqInfo),
12338 (Ptr *)¶m->raReqInfoArr) != ROK)
12342 for (i=0; i<param->numRaReqInfo; i++) {
12343 CMCHKUNPK(cmUnpkTfuRaReqInfo, ¶m->raReqInfoArr[i], mBuf);
12350 /***********************************************************
12352 * Func : cmPkTfuRaReqIndInfo
12355 * Desc : This structure contains the list of Random Access Requests received in a
12357 * @details Random Access Request is associated with a RA-RNTI, which remains
12358 * common for all the Random access requests within a subframe. This structure
12359 * thus carries the RA-RNTI and a list of Random Access Request information.
12360 * This information consists of the following
12361 * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
12363 * -# Timing Advance - this corresponds to the timing adjustment that the UE
12364 * needs to be uplink synchronized. This value is calculated by physical layer.
12365 * -# tpc - this is the power control command that the physical layer calculates
12366 * from the received RA request. This value is transmitted in the RA Response
12368 * -# CQI - this is the Channel quality index of the UL channel estimated by the
12369 * physical layer. This aids MAC in the scheduling of this UE.
12378 **********************************************************/
12380 PUBLIC S16 cmPkTfuRaReqIndInfo
12382 TfuRaReqIndInfo *param,
12386 PUBLIC S16 cmPkTfuRaReqIndInfo(param, mBuf)
12387 TfuRaReqIndInfo *param;
12393 TRC3(cmPkTfuRaReqIndInfo)
12395 for (i= (param->nmbOfRaRnti-1); i >= 0; i--)
12397 if (ROK != cmPkTfuRachInfo(param->memCp,
12398 &(param->rachInfoArr[i]), mBuf))
12403 CMCHKPK(SPkU8, param->nmbOfRaRnti, mBuf);
12404 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12405 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12411 /***********************************************************
12413 * Func : cmUnpkTfuRaReqIndInfo
12416 * Desc : This structure contains the list of Random Access Requests received in a
12418 * @details Random Access Request is associated with a RA-RNTI, which remains
12419 * common for all the Random access requests within a subframe. This structure
12420 * thus carries the RA-RNTI and a list of Random Access Request information.
12421 * This information consists of the following
12422 * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
12424 * -# Timing Advance - this corresponds to the timing adjustment that the UE
12425 * needs to be uplink synchronized. This value is calculated by physical layer.
12426 * -# tpc - this is the power control command that the physical layer calculates
12427 * from the received RA request. This value is transmitted in the RA Response
12429 * -# CQI - this is the Channel quality index of the UL channel estimated by the
12430 * physical layer. This aids MAC in the scheduling of this UE.
12439 **********************************************************/
12441 PUBLIC S16 cmUnpkTfuRaReqIndInfo
12443 TfuRaReqIndInfo *param,
12447 PUBLIC S16 cmUnpkTfuRaReqIndInfo(param, mBuf)
12448 TfuRaReqIndInfo *param;
12454 TRC3(cmUnpkTfuRaReqIndInfo)
12456 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12457 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12458 CMCHKUNPK(SUnpkU8, ¶m->nmbOfRaRnti, mBuf);
12459 if (cmGetMem (&(param->memCp), (sizeof(TfuRachInfo) * param->nmbOfRaRnti),
12460 (Ptr *)¶m->rachInfoArr) != ROK)
12464 for (i=0; i<param->nmbOfRaRnti; i++)
12466 if (ROK != cmUnpkTfuRachInfo(param->memCp, ¶m->rachInfoArr[i], mBuf))
12476 /***********************************************************
12478 * Func : cmPkTfuPucchDeltaPwr
12481 * Desc : This structure contains PUCCH Delta power for a single UE.
12490 **********************************************************/
12492 PUBLIC S16 cmPkTfuPucchDeltaPwrInfo
12494 TfuPucchDeltaPwr *param,
12498 PUBLIC S16 cmPkTfuPucchDeltaPwrInfo(param, mBuf)
12499 TfuPucchDeltaPwr *param;
12504 TRC3(cmPkTfuPucchDeltaPwrInfo)
12506 CMCHKPK(SPkS8, param->pucchDeltaPwr, mBuf);
12507 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
12513 /***********************************************************
12515 * Func : cmUnpkTfuPucchDeltaPwr
12518 * Desc : This structure contains PUCCH Delta power for a single UE.
12527 **********************************************************/
12529 PUBLIC S16 cmUnpkTfuPucchDeltaPwrInfo
12531 TfuPucchDeltaPwr *param,
12535 PUBLIC S16 cmUnpkTfuPucchDeltaPwrInfo(param, mBuf)
12536 TfuPucchDeltaPwr *param;
12541 TRC3(cmUnpkTfuPucchDeltaPwrInfo)
12543 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
12544 CMCHKUNPK(SUnpkS8, ¶m->pucchDeltaPwr, mBuf);
12550 /***********************************************************
12552 * Func : cmPkTfuPucchDeltaPwrIndInfo
12555 * Desc : This structure contains information that is passed as a part of the
12556 * PUCCH Delta power indication from PHY to SCH.
12557 * @details This structure clubs together PUCCH Delta power values for a number
12567 **********************************************************/
12569 PUBLIC S16 cmPkTfuPucchDeltaPwrIndInfo
12571 TfuPucchDeltaPwrIndInfo *param,
12575 PUBLIC S16 cmPkTfuPucchDeltaPwrIndInfo(param, mBuf)
12576 TfuPucchDeltaPwrIndInfo *param;
12583 TfuPucchDeltaPwr *tfuPucchDeltaPwr;
12585 TRC3(cmPkTfuPucchDeltaPwrIndInfo)
12587 count = param->pucchDeltaPwrLst.count;
12588 node = param->pucchDeltaPwrLst.last;
12590 tfuPucchDeltaPwr = (TfuPucchDeltaPwr *)node->node;
12592 CMCHKPK(cmPkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf);
12593 cmLListDelFrm(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk);
12594 tfuPucchDeltaPwr->lnk.node = (PTR)NULLP;
12596 CMCHKPK(SPkU32, count, mBuf);
12597 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12598 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12604 /***********************************************************
12606 * Func : cmUnpkTfuPucchDeltaPwrIndInfo
12609 * Desc : This structure contains information that is passed as a part of the
12610 * PUCCH Delta power indication from PHY to SCH.
12611 * @details This structure clubs together PUCCH Delta power values for a number
12621 **********************************************************/
12623 PUBLIC S16 cmUnpkTfuPucchDeltaPwrIndInfo
12625 TfuPucchDeltaPwrIndInfo *param,
12630 PUBLIC S16 cmUnpkTfuPucchDeltaPwrIndInfo(param, memCp, mBuf)
12631 TfuPucchDeltaPwrIndInfo *param;
12637 U32 count, loopCnt;
12638 TfuPucchDeltaPwr *tfuPucchDeltaPwr;
12640 TRC3(cmUnpkTfuPucchDeltaPwrIndInfo)
12642 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12643 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12644 cmLListInit(¶m->pucchDeltaPwrLst);
12645 CMCHKUNPK(SUnpkU32, &count, mBuf);
12646 for (loopCnt=0; loopCnt<count; loopCnt++) {
12647 cmGetMem((Ptr)memCp, sizeof(*tfuPucchDeltaPwr), (Ptr *)&tfuPucchDeltaPwr);
12648 CMCHKUNPK(cmUnpkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf);
12649 cmLListAdd2Tail(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk);
12650 tfuPucchDeltaPwr->lnk.node = (PTR)tfuPucchDeltaPwr;
12656 PUBLIC S16 cmPkBuffer
12662 PUBLIC S16 cmPkBuffer(param, mBuf)
12669 if (SFndLenMsg(*param, &msgLen) != ROK)
12671 if (SCatMsg(mBuf, *param, M1M2) != ROK)
12673 TFU_FREE_MSG(*param);
12675 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
12679 PUBLIC S16 cmUnpkBuffer
12685 PUBLIC S16 cmUnpkBuffer(param, mBuf)
12690 MsgLen msgLen=0, totalMsgLen=0;
12692 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
12693 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
12695 if (SSegMsg(mBuf, totalMsgLen-msgLen, param) != ROK)
12701 /***********************************************************
12703 * Func : cmPkTfuDoaInd
12706 * Desc : This API is used to indicate DOA(Direction Of Arrival)
12707 * identifier for one or more UEs.
12708 * It carries a DOA for each UE.
12709 * @param pst Pointer to the post structure.
12710 * @param suId SAP ID of the service user.
12711 * @param doaInd Pointer to the TfuDoaIndInfo structure.
12712 * @return ROK/RFAILED
12721 **********************************************************/
12723 PUBLIC S16 cmPkTfuDoaInd
12727 TfuDoaIndInfo * doaInd
12730 PUBLIC S16 cmPkTfuDoaInd(pst, suId, doaInd)
12733 TfuDoaIndInfo * doaInd;
12736 Buffer *mBuf = NULLP;
12737 TRC3(cmPkTfuDoaInd)
12739 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
12740 #if (ERRCLASS & ERRCLS_ADD_RES)
12741 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12742 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12743 (ErrVal)ETFU125, (ErrVal)0, "Packing failed");
12745 SPutSBuf(pst->region, pst->pool, (Data *)doaInd, sizeof(TfuDoaIndInfo));
12748 cmPkTfuDoaIndInfo(doaInd, mBuf);
12749 if (SPkS16(suId, mBuf) != ROK) {
12750 #if (ERRCLASS & ERRCLS_ADD_RES)
12751 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12752 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12753 (ErrVal)ETFU126, (ErrVal)0, "Packing failed");
12755 TFU_FREE_MEM(doaInd);
12756 TFU_FREE_MSG(mBuf);
12759 TFU_FREE_MEM(doaInd);
12760 pst->event = (Event) EVTTFUDOAIND;
12761 RETVALUE(SPstTsk(pst,mBuf));
12765 /***********************************************************
12767 * Func : cmUnpkTfuDoaInd
12770 * Desc : This API is used to indicate DOA(Direction Of Arrival)
12771 * identifier for one or more UEs.
12772 * It carries a DOA for each UE.
12773 * @param pst Pointer to the post structure.
12774 * @param suId SAP ID of the service user.
12775 * @param doaInd Pointer to the TfuDoaIndInfo structure.
12776 * @return ROK/RFAILED
12785 **********************************************************/
12787 PUBLIC S16 cmUnpkTfuDoaInd
12794 PUBLIC S16 cmUnpkTfuDoaInd(func, pst, mBuf)
12801 TfuDoaIndInfo *doaInd;
12803 TRC3(cmUnpkTfuDoaInd)
12805 if (SUnpkS16(&suId, mBuf) != ROK) {
12806 TFU_FREE_MSG(mBuf);
12807 #if (ERRCLASS & ERRCLS_ADD_RES)
12808 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12809 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12810 (ErrVal)ETFU127, (ErrVal)0, "Packing failed");
12816 sMem.region = pst->region;
12817 sMem.pool = pst->pool;
12818 if ((cmAllocEvnt(sizeof(TfuDoaIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&doaInd)) != ROK) {
12819 #if (ERRCLASS & ERRCLS_ADD_RES)
12820 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12821 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12822 (ErrVal)ETFU128, (ErrVal)0, "Packing failed");
12824 TFU_FREE_MSG(mBuf);
12829 cmUnpkTfuDoaIndInfo(doaInd, (Ptr)&doaInd->memCp, mBuf);
12830 TFU_FREE_MSG(mBuf);
12831 RETVALUE((*func)(pst, suId, doaInd));
12836 /***********************************************************
12838 * Func : cmPkTfuDciFormatTbInfo
12841 * Desc : This structure contains the TB level DCI signalling
12842 * parameters in case of DCI formats 2 and 2A
12851 **********************************************************/
12853 PUBLIC S16 cmPkTfuDciFormatTbInfo
12855 TfuDciFormatTbInfo *param,
12859 PUBLIC S16 cmPkTfuDciFormatTbInfo(param, mBuf)
12860 TfuDciFormatTbInfo *param;
12865 TRC3(cmPkTfuDciFormatTbInfo)
12867 CMCHKPK(SPkU8, param->mcs, mBuf);
12868 CMCHKPK(SPkU8, param->rv, mBuf);
12869 CMCHKPK(SPkU8, param->ndi, mBuf);
12875 /***********************************************************
12877 * Func : cmUnpkTfuDciFormatTbInfo
12880 * Desc : This structure contains the TB level DCI signalling
12881 * parameters in case of DCI formats 2 and 2A
12890 **********************************************************/
12892 PUBLIC S16 cmUnpkTfuDciFormatTbInfo
12894 TfuDciFormatTbInfo *param,
12898 PUBLIC S16 cmUnpkTfuDciFormatTbInfo(param, mBuf)
12899 TfuDciFormatTbInfo *param;
12904 TRC3(cmUnpkTfuDciFormatTbInfo)
12906 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
12907 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
12908 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
12914 /***********************************************************
12916 * Func : cmPkTfuSubbandDlCqiInfo
12919 * Desc : This structure is used to convey the subbannd CQI reported.
12928 **********************************************************/
12930 PUBLIC S16 cmPkTfuSubbandDlCqiInfo
12932 TfuSubbandDlCqiInfo *param,
12936 PUBLIC S16 cmPkTfuSubbandDlCqiInfo(param, mBuf)
12937 TfuSubbandDlCqiInfo *param;
12943 TRC3(cmPkTfuSubbandDlCqiInfo)
12945 for (i=TFU_MAX_TB-1; i >= 0; i--) {
12946 CMCHKPK(SPkU8, param->cqiIdx[i], mBuf);
12948 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf);
12954 /***********************************************************
12956 * Func : cmUnpkTfuSubbandDlCqiInfo
12959 * Desc : This structure is used to convey the subbannd CQI reported.
12968 **********************************************************/
12970 PUBLIC S16 cmUnpkTfuSubbandDlCqiInfo
12972 TfuSubbandDlCqiInfo *param,
12976 PUBLIC S16 cmUnpkTfuSubbandDlCqiInfo(param, mBuf)
12977 TfuSubbandDlCqiInfo *param;
12983 TRC3(cmUnpkTfuSubbandDlCqiInfo)
12985 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf);
12986 for (i=0; i<TFU_MAX_TB; i++) {
12987 CMCHKUNPK(SUnpkU8, ¶m->cqiIdx[i], mBuf);
12992 /***********************************************************
12994 * Func : cmPkTfuDlCqiPuschInfo
12997 * Desc : This structure conveys explicitly the PMI information in case
12998 * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6.
13007 **********************************************************/
13009 PUBLIC S16 cmPkTfuDlCqiPuschInfo
13011 TfuDlCqiPuschInfo *param,
13015 PUBLIC S16 cmPkTfuDlCqiPuschInfo(param, mBuf)
13016 TfuDlCqiPuschInfo *param;
13021 TRC3(cmPkTfuDlCqiPuschInfo)
13023 switch(param->mode) {
13024 case TFU_PUSCH_CQI_MODE_31:
13025 CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
13027 case TFU_PUSCH_CQI_MODE_22:
13028 CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
13030 case TFU_PUSCH_CQI_MODE_12:
13031 CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
13036 CMCHKPK(SPkU32, param->mode, mBuf);
13042 /***********************************************************
13044 * Func : cmUnpkTfuDlCqiPuschInfo
13047 * Desc : This structure conveys explicitly the PMI information in case
13048 * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6.
13057 **********************************************************/
13059 PUBLIC S16 cmUnpkTfuDlCqiPuschInfo
13061 TfuDlCqiPuschInfo *param,
13065 PUBLIC S16 cmUnpkTfuDlCqiPuschInfo(param, mBuf)
13066 TfuDlCqiPuschInfo *param;
13071 TRC3(cmUnpkTfuDlCqiPuschInfo)
13073 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
13074 switch(param->mode) {
13075 case TFU_PUSCH_CQI_MODE_12:
13076 CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
13078 case TFU_PUSCH_CQI_MODE_22:
13079 CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
13081 case TFU_PUSCH_CQI_MODE_31:
13082 CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
13090 /***********************************************************
13092 * Func : cmPkTfuDoaRpt
13095 * Desc : This structure contains the DOA estimated by the physical layer.
13096 * @details DOA for a given UE.
13105 **********************************************************/
13107 PUBLIC S16 cmPkTfuDoaRpt
13113 PUBLIC S16 cmPkTfuDoaRpt(param, mBuf)
13119 TRC3(cmPkTfuDoaRpt)
13121 CMCHKPK(SPkU32, param->doa, mBuf);
13122 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
13128 /***********************************************************
13130 * Func : cmUnpkTfuDoaRpt
13133 * Desc : This structure contains the DOA estimated by the physical layer.
13134 * @details DOA for a given UE.
13143 **********************************************************/
13145 PUBLIC S16 cmUnpkTfuDoaRpt
13151 PUBLIC S16 cmUnpkTfuDoaRpt(param, mBuf)
13157 TRC3(cmUnpkTfuDoaRpt)
13159 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
13160 CMCHKUNPK(SUnpkU32, ¶m->doa, mBuf);
13166 /***********************************************************
13168 * Func : cmPkTfuDoaIndInfo
13171 * Desc : This structure conveys the DOA(Direction Of Arrival) indicator.
13172 * @details DOA is calculated by the physical layer, and this
13173 * information is provided to the scheduler.
13174 * This data structure clubs together the DOAs for all the UEs
13175 * calculated by PHY in this subframe.
13184 **********************************************************/
13186 PUBLIC S16 cmPkTfuDoaIndInfo
13188 TfuDoaIndInfo *param,
13192 PUBLIC S16 cmPkTfuDoaIndInfo(param, mBuf)
13193 TfuDoaIndInfo *param;
13200 TfuDoaRpt *tfuDoaRpt;
13201 TRC3(cmPkTfuDoaIndInfo)
13203 count = param->doaRpt.count;
13204 node = param->doaRpt.last;
13206 tfuDoaRpt = (TfuDoaRpt *)node->node;
13208 CMCHKPK(cmPkTfuDoaRpt, tfuDoaRpt, mBuf);
13209 cmLListDelFrm(¶m->doaRpt, &tfuDoaRpt->lnk);
13210 tfuDoaRpt->lnk.node = (PTR)NULLP;
13212 CMCHKPK(SPkU32, count, mBuf);
13213 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13219 /***********************************************************
13221 * Func : cmUnpkTfuDoaIndInfo
13224 * Desc : This structure conveys the DOA(Direction Of Arrival) indicator.
13225 * @details DOA is calculated by the physical layer, and this
13226 * information is provided to the scheduler.
13227 * This data structure clubs together the DOAs for all the UEs
13228 * calculated by PHY in this subframe.
13237 **********************************************************/
13239 PUBLIC S16 cmUnpkTfuDoaIndInfo
13241 TfuDoaIndInfo *param,
13246 PUBLIC S16 cmUnpkTfuDoaIndInfo(param, memCp, mBuf)
13247 TfuDoaIndInfo *param;
13253 U32 count, loopCnt;
13254 TfuDoaRpt *tfuDoaRpt;
13255 TRC3(cmUnpkTfuDoaIndInfo)
13257 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13258 cmLListInit(¶m->doaRpt);
13259 CMCHKUNPK(SUnpkU32, &count, mBuf);
13260 for (loopCnt=0; loopCnt<count; loopCnt++) {
13261 cmGetMem((Ptr)memCp, sizeof(*tfuDoaRpt), (Ptr *)&tfuDoaRpt);
13262 CMCHKUNPK(cmUnpkTfuDoaRpt, tfuDoaRpt, mBuf);
13263 cmLListAdd2Tail(¶m->doaRpt, &tfuDoaRpt->lnk);
13264 tfuDoaRpt->lnk.node = (PTR)tfuDoaRpt;
13270 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
13274 /***********************************************************
13276 * Func : cmPkTfuSrsRpt
13279 * Desc : This structure conveys the Uplink SRS indication of a UE.
13280 * @details Uplink SRS from each UE is received by the physical layer, and this
13281 * information is provided to the scheduler.
13290 **********************************************************/
13292 PUBLIC S16 cmPkTfuSrsRpt
13298 PUBLIC S16 cmPkTfuSrsRpt(param, mBuf)
13305 TRC3(cmPkTfuSrsRpt)
13307 CMCHKPK(SPkU8, param->wideCqi, mBuf);
13308 CMCHKPK(SPkU8, param->wideCqiPres, mBuf);
13309 for (i=TFU_MAX_UL_RB-1; i >= 0; i--) {
13310 CMCHKPK(SPkU8, param->snr[i], mBuf);
13312 CMCHKPK(SPkU8, param->rbStart, mBuf);
13313 CMCHKPK(SPkU8, param->numRbs, mBuf);
13314 CMCHKPK(SPkU16, param->ta, mBuf);
13315 CMCHKPK(SPkU16, param->dopEst, mBuf);
13316 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
13322 /***********************************************************
13324 * Func : cmUnpkTfuSrsRpt
13327 * Desc : This structure conveys the Uplink SRS indication of a UE.
13328 * @details Uplink SRS from each UE is received by the physical layer, and this
13329 * information is provided to the scheduler.
13338 **********************************************************/
13340 PUBLIC S16 cmUnpkTfuSrsRpt
13346 PUBLIC S16 cmUnpkTfuSrsRpt(param, mBuf)
13353 TRC3(cmUnpkTfuSrsRpt)
13355 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
13356 CMCHKUNPK(SUnpkU16, ¶m->dopEst, mBuf);
13357 CMCHKUNPK(SUnpkU16, ¶m->ta, mBuf);
13358 CMCHKUNPK(SUnpkU8, ¶m->numRbs, mBuf);
13359 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
13360 for (i=0; i<TFU_MAX_UL_RB; i++) {
13361 CMCHKUNPK(SUnpkU8, ¶m->snr[i], mBuf);
13363 CMCHKUNPK(SUnpkU8, ¶m->wideCqiPres, mBuf);
13364 CMCHKUNPK(SUnpkU8, ¶m->wideCqi, mBuf);
13370 /***********************************************************
13372 * Func : cmPkTfuSrsIndInfo
13375 * Desc : This structure conveys the Uplink SRS indication.
13376 * @details Uplink SRS is received by the physical layer, and this
13377 * information is provided to the scheduler.
13378 * This data structure clubs together the UL SRS indications of all the UEs
13388 **********************************************************/
13390 PUBLIC S16 cmPkTfuSrsIndInfo
13392 TfuSrsIndInfo *param,
13396 PUBLIC S16 cmPkTfuSrsIndInfo(param, mBuf)
13397 TfuSrsIndInfo *param;
13404 TfuSrsRpt *tfuSrsRpt;
13406 TRC3(cmPkTfuSrsIndInfo)
13408 count = param->srsRpt.count;
13409 node = param->srsRpt.last;
13411 tfuSrsRpt = (TfuSrsRpt *)node->node;
13413 CMCHKPK(cmPkTfuSrsRpt, tfuSrsRpt, mBuf);
13414 cmLListDelFrm(¶m->srsRpt, &tfuSrsRpt->lnk);
13415 tfuSrsRpt->lnk.node = (PTR)NULLP;
13417 CMCHKPK(SPkU32, count, mBuf);
13418 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
13419 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13425 /***********************************************************
13427 * Func : cmUnpkTfuSrsIndInfo
13430 * Desc : This structure conveys the Uplink SRS indication.
13431 * @details Uplink SRS is received by the physical layer, and this
13432 * information is provided to the scheduler.
13433 * This data structure clubs together the UL SRS indications of all the UEs
13443 **********************************************************/
13445 PUBLIC S16 cmUnpkTfuSrsIndInfo
13447 TfuSrsIndInfo *param,
13452 PUBLIC S16 cmUnpkTfuSrsIndInfo(param, memCp, mBuf)
13453 TfuSrsIndInfo *param;
13459 U32 count, loopCnt;
13460 TfuSrsRpt *tfuSrsRpt;
13462 TRC3(cmUnpkTfuSrsIndInfo)
13464 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13465 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
13466 cmLListInit(¶m->srsRpt);
13467 CMCHKUNPK(SUnpkU32, &count, mBuf);
13468 for (loopCnt=0; loopCnt<count; loopCnt++) {
13469 cmGetMem((Ptr)memCp, sizeof(*tfuSrsRpt), (Ptr *)&tfuSrsRpt);
13470 CMCHKUNPK(cmUnpkTfuSrsRpt, tfuSrsRpt, mBuf);
13471 cmLListAdd2Tail(¶m->srsRpt, &tfuSrsRpt->lnk);
13472 tfuSrsRpt->lnk.node = (PTR)tfuSrsRpt;
13479 /***********************************************************
13481 * Func : cmPkTfuRawCqiRpt
13484 * Desc : This structure contains the Raw CQI information i.e. the CQI report
13485 * as transmitted by the UE.
13486 * @details These bits shall be interpretted by MAC to derive the following
13499 **********************************************************/
13501 PUBLIC S16 cmPkTfuRawCqiRpt
13503 TfuRawCqiRpt *param,
13507 PUBLIC S16 cmPkTfuRawCqiRpt(param, mBuf)
13508 TfuRawCqiRpt *param;
13513 TRC3(cmPkTfuRawCqiRpt)
13515 CMCHKPK(SPkU32, param->uciPayload, mBuf);
13518 for (i=CM_LTE_MAX_CELLS-1; i >= 0; i--) {
13519 CMCHKPK(SPkU8, param->ri[i], mBuf);
13521 for (i=TFU_MAX_CQI_BYTES-1; i >= 0; i--) {
13522 CMCHKPK(SPkU8, param->cqiBits[i], mBuf);
13525 CMCHKPK(SPkU8, param->numBits, mBuf);
13526 CMCHKPK(cmPkLteRnti, param->crnti, mBuf);
13532 /***********************************************************
13534 * Func : cmUnpkTfuRawCqiRpt
13537 * Desc : This structure contains the Raw CQI information i.e. the CQI report
13538 * as transmitted by the UE.
13539 * @details These bits shall be interpretted by MAC to derive the following
13552 **********************************************************/
13554 PUBLIC S16 cmUnpkTfuRawCqiRpt
13556 TfuRawCqiRpt *param,
13560 PUBLIC S16 cmUnpkTfuRawCqiRpt(param, mBuf)
13561 TfuRawCqiRpt *param;
13566 TRC3(cmUnpkTfuRawCqiRpt)
13568 CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf);
13569 CMCHKUNPK(SUnpkU8, ¶m->numBits, mBuf);
13572 for (i=0; i<TFU_MAX_CQI_BYTES; i++) {
13573 CMCHKUNPK(SUnpkU8, ¶m->cqiBits[i], mBuf);
13575 for (i=0; i<CM_LTE_MAX_CELLS; i++) {
13576 CMCHKUNPK(SUnpkU8, ¶m->ri[i], mBuf);
13579 CMCHKUNPK(SUnpkU32, ¶m->uciPayload, mBuf);
13586 /***********************************************************
13588 * Func : cmPkTfuRawCqiIndInfo
13591 * Desc : This structure contains the Raw CQI reports received for the
13592 * transmitting UEs in a single subframe.
13593 * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
13594 * interpretation is upto the MAC layer.
13603 **********************************************************/
13605 PUBLIC S16 cmPkTfuRawCqiIndInfo
13607 TfuRawCqiIndInfo *param,
13611 PUBLIC S16 cmPkTfuRawCqiIndInfo(param, mBuf)
13612 TfuRawCqiIndInfo *param;
13618 TfuRawCqiRpt *tfuRawCqiRpt;
13621 TRC3(cmPkTfuRawCqiIndInfo)
13623 count = param->rawCqiRpt.count;
13624 node = param->rawCqiRpt.last;
13626 tfuRawCqiRpt = (TfuRawCqiRpt *)node->node;
13628 CMCHKPK(cmPkTfuRawCqiRpt, tfuRawCqiRpt, mBuf);
13629 cmLListDelFrm(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk);
13630 tfuRawCqiRpt->lnk.node = (PTR)NULLP;
13632 CMCHKPK(SPkU32, count, mBuf);
13633 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
13634 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13640 /***********************************************************
13642 * Func : cmUnpkTfuRawCqiIndInfo
13645 * Desc : This structure contains the Raw CQI reports received for the
13646 * transmitting UEs in a single subframe.
13647 * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
13648 * interpretation is upto the MAC layer.
13657 **********************************************************/
13659 PUBLIC S16 cmUnpkTfuRawCqiIndInfo
13661 TfuRawCqiIndInfo *param,
13666 PUBLIC S16 cmUnpkTfuRawCqiIndInfo(param, memCp, mBuf)
13667 TfuRawCqiIndInfo *param;
13673 U32 count, loopCnt;
13674 TfuRawCqiRpt *tfuRawCqiRpt;
13676 TRC3(cmUnpkTfuRawCqiIndInfo)
13678 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13679 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
13680 cmLListInit(¶m->rawCqiRpt);
13681 CMCHKUNPK(SUnpkU32, &count, mBuf);
13682 for (loopCnt=0; loopCnt<count; loopCnt++) {
13683 cmGetMem((Ptr)memCp, sizeof(*tfuRawCqiRpt), (Ptr *)&tfuRawCqiRpt);
13684 CMCHKUNPK(cmUnpkTfuRawCqiRpt, tfuRawCqiRpt, mBuf);
13685 cmLListAdd2Tail(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk);
13686 tfuRawCqiRpt->lnk.node = (PTR)tfuRawCqiRpt;
13697 /***********************************************************
13699 * Func : cmPkTfuUePucchHqRecpInfo
13702 * Desc : This structure is sent from scheduler to PHY in order to request the
13703 * reception of harq information on PUCCH.
13712 **********************************************************/
13714 PUBLIC S16 cmPkTfuUePucchHqRecpInfo
13716 TfuUePucchHqRecpInfo *param,
13720 PUBLIC S16 cmPkTfuUePucchHqRecpInfo(param, mBuf)
13721 TfuUePucchHqRecpInfo *param;
13727 TRC3(cmPkTfuUePucchHqRecpInfo)
13729 CMCHKPK(SPkU8, param->a, mBuf);
13730 for (i=TFU_MAX_HQ_RES-1; i >= 0; i--) {
13731 CMCHKPK(SPkU16, param->hqRes[i], mBuf);
13733 CMCHKPK(SPkU8, param->pucchResCnt, mBuf);
13734 CMCHKPK(SPkU8, param->hqSz, mBuf);
13735 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
13741 /***********************************************************
13743 * Func : cmUnpkTfuUePucchHqRecpInfo
13746 * Desc : This structure is sent from scheduler to PHY in order to request the
13747 * reception of harq information on PUCCH.
13756 **********************************************************/
13758 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo
13760 TfuUePucchHqRecpInfo *param,
13764 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf)
13765 TfuUePucchHqRecpInfo *param;
13771 TRC3(cmUnpkTfuUePucchHqRecpInfo)
13773 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
13774 CMCHKUNPK(SUnpkU8, ¶m->hqSz, mBuf);
13775 CMCHKUNPK(SUnpkU8, ¶m->pucchResCnt, mBuf);
13776 for (i=0; i<TFU_MAX_HQ_RES; i++) {
13777 CMCHKUNPK(SUnpkU16, ¶m->hqRes[i], mBuf);
13779 CMCHKUNPK(SUnpkU8, ¶m->a, mBuf);
13788 #ifndef TFU_TDD /* else of TFU_TDD */
13790 #ifndef TFU_TDD /* else of TFU_TDD */
13793 /***********************************************************
13795 * Func : cmPkTfuUePucchHqRecpInfo
13798 * Desc : This structure is sent from scheduler to PHY in order to request the
13799 * reception of harq information on PUCCH.
13808 **********************************************************/
13810 PUBLIC S16 cmPkTfuUePucchHqRecpInfo
13812 TfuUePucchHqRecpInfo *param,
13816 PUBLIC S16 cmPkTfuUePucchHqRecpInfo(param, mBuf)
13817 TfuUePucchHqRecpInfo *param;
13822 TRC3(cmPkTfuUePucchHqRecpInfo)
13825 for (idx=(TFU_MAX_HQ_RES-1); idx >= 0; idx--) {
13826 CMCHKPK(SPkU16, param->hqRes[idx], mBuf);
13829 CMCHKPK(SPkU16, param->hqRes[0], mBuf);
13831 CMCHKPK(SPkU8, param->pucchResCnt, mBuf);
13832 CMCHKPK(SPkU8, param->hqSz, mBuf);
13833 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
13840 /***********************************************************
13842 * Func : cmUnpkTfuUePucchHqRecpInfo
13845 * Desc : This structure is sent from scheduler to PHY in order to request the
13846 * reception of harq information on PUCCH.
13855 **********************************************************/
13857 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo
13859 TfuUePucchHqRecpInfo *param,
13863 PUBLIC S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf)
13864 TfuUePucchHqRecpInfo *param;
13868 TRC3(cmUnpkTfuUePucchHqRecpInfo)
13870 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
13871 CMCHKUNPK(SUnpkU8, ¶m->hqSz, mBuf);
13872 CMCHKUNPK(SUnpkU8, ¶m->pucchResCnt, mBuf);
13875 for (idx=0; idx<TFU_MAX_HQ_RES; idx++) {
13876 CMCHKUNPK(SUnpkU16, ¶m->hqRes[idx], mBuf);
13879 CMCHKUNPK(SUnpkU16, ¶m->hqRes[0], mBuf);
13891 /***********************************************************
13893 * Func : cmPkTfuUePucchSrRecpInfo
13896 * Desc : This structure is sent from scheduler to PHY in order to request the
13897 * reception of SR information on PUCCH.
13906 **********************************************************/
13908 PUBLIC S16 cmPkTfuUePucchSrRecpInfo
13910 TfuUePucchSrRecpInfo *param,
13914 PUBLIC S16 cmPkTfuUePucchSrRecpInfo(param, mBuf)
13915 TfuUePucchSrRecpInfo *param;
13920 TRC3(cmPkTfuUePucchSrRecpInfo)
13922 CMCHKPK(SPkU16, param->n1PucchIdx, mBuf);
13928 /***********************************************************
13930 * Func : cmUnpkTfuUePucchSrRecpInfo
13933 * Desc : This structure is sent from scheduler to PHY in order to request the
13934 * reception of SR information on PUCCH.
13943 **********************************************************/
13945 PUBLIC S16 cmUnpkTfuUePucchSrRecpInfo
13947 TfuUePucchSrRecpInfo *param,
13951 PUBLIC S16 cmUnpkTfuUePucchSrRecpInfo(param, mBuf)
13952 TfuUePucchSrRecpInfo *param;
13957 TRC3(cmUnpkTfuUePucchSrRecpInfo)
13959 CMCHKUNPK(SUnpkU16, ¶m->n1PucchIdx, mBuf);
13965 /***********************************************************
13967 * Func : cmPkTfuUePucchCqiRecpInfo
13970 * Desc : This structure is sent from scheduler to PHY in order to request the
13971 * reception of CQI information on PUCCH.
13980 **********************************************************/
13982 PUBLIC S16 cmPkTfuUePucchCqiRecpInfo
13984 TfuUePucchCqiRecpInfo *param,
13988 PUBLIC S16 cmPkTfuUePucchCqiRecpInfo(param, mBuf)
13989 TfuUePucchCqiRecpInfo *param;
13994 TRC3(cmPkTfuUePucchCqiRecpInfo)
13996 CMCHKPK(SPkU8, param->cqiPmiSz, mBuf);
13997 CMCHKPK(SPkU16, param->n2PucchIdx, mBuf);
14003 /***********************************************************
14005 * Func : cmUnpkTfuUePucchCqiRecpInfo
14008 * Desc : This structure is sent from scheduler to PHY in order to request the
14009 * reception of CQI information on PUCCH.
14018 **********************************************************/
14020 PUBLIC S16 cmUnpkTfuUePucchCqiRecpInfo
14022 TfuUePucchCqiRecpInfo *param,
14026 PUBLIC S16 cmUnpkTfuUePucchCqiRecpInfo(param, mBuf)
14027 TfuUePucchCqiRecpInfo *param;
14032 TRC3(cmUnpkTfuUePucchCqiRecpInfo)
14034 CMCHKUNPK(SUnpkU16, ¶m->n2PucchIdx, mBuf);
14035 CMCHKUNPK(SUnpkU8, ¶m->cqiPmiSz, mBuf);
14041 /***********************************************************
14043 * Func : cmPkTfuUePucchSrsRecpInfo
14046 * Desc : This structure is sent from scheduler to PHY in order to request the
14047 * reception of SRS information on PUCCH.
14056 **********************************************************/
14058 PUBLIC S16 cmPkTfuUePucchSrsRecpInfo
14060 TfuUePucchSrsRecpInfo *param,
14064 PUBLIC S16 cmPkTfuUePucchSrsRecpInfo(param, mBuf)
14065 TfuUePucchSrsRecpInfo *param;
14070 TRC3(cmPkTfuUePucchSrsRecpInfo)
14072 CMCHKPK(SPkU32, param->srsCyclicShft, mBuf);
14073 CMCHKPK(SPkU16, param->srsCfgIdx, mBuf);
14074 CMCHKPK(SPkU8, param->transComb, mBuf);
14075 CMCHKPK(SPkU32, param->srsHopBw, mBuf);
14076 CMCHKPK(SPkU8, param->nRrc, mBuf);
14077 CMCHKPK(SPkU32, param->srsBw, mBuf);
14083 PUBLIC S16 cmPkTfuUePucchUciRecpInfo
14085 TfuUePucchUciRecpInfo *param,
14089 PUBLIC S16 cmPkTfuUePucchUciRecpInfo(param, mBuf)
14090 TfuUePucchUciRecpInfo *param;
14095 TRC3(cmPkTfuUePucchUciRecpInfo)
14097 CMCHKPK(SPkU8, param->SCID, mBuf);
14098 CMCHKPK(SPkU8, param->pucchIndex, mBuf);
14099 CMCHKPK(SPkU8, param->numBits, mBuf);
14105 /***********************************************************
14107 * Func : cmUnpkTfuUePucchSrsRecpInfo
14110 * Desc : This structure is sent from scheduler to PHY in order to request the
14111 * reception of SRS information on PUCCH.
14120 **********************************************************/
14122 PUBLIC S16 cmUnpkTfuUePucchSrsRecpInfo
14124 TfuUePucchSrsRecpInfo *param,
14128 PUBLIC S16 cmUnpkTfuUePucchSrsRecpInfo(param, mBuf)
14129 TfuUePucchSrsRecpInfo *param;
14134 TRC3(cmUnpkTfuUePucchSrsRecpInfo)
14136 CMCHKUNPK(SUnpkU32, (U32 *)¶m->srsBw, mBuf);
14137 CMCHKUNPK(SUnpkU8, ¶m->nRrc, mBuf);
14138 CMCHKUNPK(SUnpkU32, (U32 *)¶m->srsHopBw, mBuf);
14139 CMCHKUNPK(SUnpkU8, ¶m->transComb, mBuf);
14140 CMCHKUNPK(SUnpkU16, ¶m->srsCfgIdx, mBuf);
14141 CMCHKUNPK(SUnpkU32, (U32 *)¶m->srsCyclicShft, mBuf);
14146 /***********************************************************
14148 * Func : cmPkTfuUePucchBsiBriRecpInfo
14151 * Desc : This structure is sent from scheduler to PHY in order to request the
14152 * reception of BSI_BRI information on PUCCH.
14161 **********************************************************/
14163 PUBLIC S16 cmPkTfuUePucchBsiBriRecpInfo
14165 TfuUePucchBsiBriRecpInfo *param,
14169 PUBLIC S16 cmPkTfuUePucchBsiBriRecpInfo(param, mBuf)
14170 TfuUePucchBsiBriRecpInfo *param;
14175 TRC3(cmPkTfuUePucchBsiBriRecpInfo)
14177 CMCHKPK(SPkU8, param->briRpt, mBuf);
14178 CMCHKPK(SPkU8, param->bsiRpt, mBuf);
14179 CMCHKPK(SPkU8, param->SCID, mBuf);
14180 CMCHKPK(SPkU8, param->pucchIndex, mBuf);
14181 CMCHKPK(SPkU8, param->puschFlag, mBuf);
14185 /***********************************************************
14187 * Func : cmUnpkTfuUePucchBsiBriRecpInfo
14190 * Desc : This structure is sent from scheduler to PHY in order to request the
14191 * reception of BSI_BRI information on PUCCH.
14200 **********************************************************/
14202 PUBLIC S16 cmUnpkTfuUePucchBsiBriRecpInfo
14204 TfuUePucchBsiBriRecpInfo *param,
14208 PUBLIC S16 cmUnpkTfuUePucchBsiBriRecpInfo(param, mBuf)
14209 TfuUePucchBsiBriRecpInfo *param;
14214 TRC3(cmUnpkTfuUePucchBsiBriRecpInfo)
14216 CMCHKUNPK(SUnpkU8, ¶m->puschFlag, mBuf);
14217 CMCHKUNPK(SUnpkU8, ¶m->pucchIndex, mBuf);
14218 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
14219 CMCHKUNPK(SUnpkU8, ¶m->bsiRpt, mBuf);
14220 CMCHKUNPK(SUnpkU8, ¶m->briRpt, mBuf);
14227 PUBLIC S16 cmUnpkTfuUePucchUciRecpInfo
14229 TfuUePucchUciRecpInfo *param,
14233 PUBLIC S16 cmUnpkTfuUePucchUciRecpInfo(param, mBuf)
14234 TfuUePucchUciRecpInfo *param;
14239 TRC3(cmUnpkTfuUePucchUciRecpInfo)
14241 CMCHKUNPK(SUnpkU8, ¶m->numBits, mBuf);
14242 CMCHKUNPK(SUnpkU8, ¶m->pucchIndex, mBuf);
14243 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
14250 /***********************************************************
14252 * Func : cmPkTfuUePucchRecpReq
14255 * Desc : This structure is sent from scheduler to PHY in order to request the
14256 * reception of UCI on PUCCH. This may contain the following:
14276 **********************************************************/
14278 PUBLIC S16 cmPkTfuUePucchRecpReq
14280 TfuUePucchRecpReq *param,
14284 PUBLIC S16 cmPkTfuUePucchRecpReq(param, mBuf)
14285 TfuUePucchRecpReq *param;
14290 TRC3(cmPkTfuUePucchRecpReq)
14293 CMCHKPK(cmPkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf);
14294 CMCHKPK(cmPkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf);
14295 #endif /* TFU_5GTF */
14296 CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14297 CMCHKPK(cmPkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf);
14298 CMCHKPK(cmPkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf);
14299 CMCHKPK(cmPkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf);
14300 CMCHKPK(SPkU32, param->uciInfo, mBuf);
14306 /***********************************************************
14308 * Func : cmUnpkTfuUePucchRecpReq
14311 * Desc : This structure is sent from scheduler to PHY in order to request the
14312 * reception of UCI on PUCCH. This may contain the following:
14332 **********************************************************/
14334 PUBLIC S16 cmUnpkTfuUePucchRecpReq
14336 TfuUePucchRecpReq *param,
14340 PUBLIC S16 cmUnpkTfuUePucchRecpReq(param, mBuf)
14341 TfuUePucchRecpReq *param;
14346 TRC3(cmUnpkTfuUePucchRecpReq)
14348 CMCHKUNPK(SUnpkU32, (U32 *)¶m->uciInfo, mBuf);
14349 CMCHKUNPK(cmUnpkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf);
14350 CMCHKUNPK(cmUnpkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf);
14351 CMCHKUNPK(cmUnpkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf);
14352 CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14354 CMCHKUNPK(cmUnpkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf);
14355 CMCHKUNPK(cmUnpkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf);
14356 #endif /* TFU_5GTF */
14362 /***********************************************************
14364 * Func : cmPkTfuUeUlSchRecpInfo
14367 * Desc : This structure is sent from scheduler to PHY in order to request the
14368 * reception of UEs data on ULSCH.
14377 **********************************************************/
14379 PUBLIC S16 cmPkTfuUeUlSchRecpInfo
14381 TfuUeUlSchRecpInfo *param,
14385 PUBLIC S16 cmPkTfuUeUlSchRecpInfo(param, mBuf)
14386 TfuUeUlSchRecpInfo *param;
14391 TRC3(cmPkTfuUeUlSchRecpInfo)
14393 CMCHKPK(SPkU8, param->beamIndex, mBuf);
14394 CMCHKPK(SPkU8, param->uciWoTBFlag, mBuf);
14395 CMCHKPK(SPkU8, param->PMI, mBuf);
14396 CMCHKPK(SPkU8, param->SCID, mBuf);
14397 CMCHKPK(SPkU8, param->nAntPortLayer, mBuf);
14398 CMCHKPK(SPkU8, param->xPUSCHRange, mBuf);
14399 CMCHKPK(SPkU8, param->numRbg, mBuf);
14400 CMCHKPK(SPkU8, param->rbgStart, mBuf);
14402 CMCHKPK(SPkU8, param->mcs, mBuf);
14403 CMCHKPK(SPkU8, param->nSrs, mBuf);
14404 CMCHKPK(SPkU8, param->crntTxNb, mBuf);
14405 CMCHKPK(SPkU8, param->txMode, mBuf);
14406 CMCHKPK(SPkU8, param->harqProcId, mBuf);
14407 CMCHKPK(SPkU8, param->rv, mBuf);
14408 CMCHKPK(SPkU8, param->ndi, mBuf);
14409 CMCHKPK(SPkU8, param->isRtx, mBuf);
14410 CMCHKPK(SPkU8, param->hoppingBits, mBuf);
14411 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
14412 CMCHKPK(SPkU8, param->nDmrs, mBuf);
14413 CMCHKPK(SPkU32, param->modType, mBuf);
14414 CMCHKPK(SPkU8, param->numRb, mBuf);
14415 CMCHKPK(SPkU8, param->rbStart, mBuf);
14416 CMCHKPK(SPkU16, param->size, mBuf);
14423 /***********************************************************
14425 * Func : cmUnpkTfuUeUlSchRecpInfo
14428 * Desc : This structure is sent from scheduler to PHY in order to request the
14429 * reception of UEs data on ULSCH.
14438 **********************************************************/
14440 PUBLIC S16 cmUnpkTfuUeUlSchRecpInfo
14442 TfuUeUlSchRecpInfo *param,
14446 PUBLIC S16 cmUnpkTfuUeUlSchRecpInfo(param, mBuf)
14447 TfuUeUlSchRecpInfo *param;
14452 TRC3(cmUnpkTfuUeUlSchRecpInfo)
14454 CMCHKUNPK(SUnpkU16, ¶m->size, mBuf);
14455 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
14456 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
14457 CMCHKUNPK(SUnpkU32, (U32 *)¶m->modType, mBuf);
14458 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
14459 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
14460 CMCHKUNPK(SUnpkU8, ¶m->hoppingBits, mBuf);
14461 CMCHKUNPK(SUnpkU8, ¶m->isRtx, mBuf);
14462 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
14463 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
14464 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
14465 CMCHKUNPK(SUnpkU8, ¶m->txMode, mBuf);
14466 CMCHKUNPK(SUnpkU8, ¶m->crntTxNb, mBuf);
14467 CMCHKUNPK(SUnpkU8, ¶m->nSrs, mBuf);
14468 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
14470 CMCHKUNPK(SUnpkU8, ¶m->rbgStart, mBuf);
14471 CMCHKUNPK(SUnpkU8, ¶m->numRbg, mBuf);
14472 CMCHKUNPK(SUnpkU8, ¶m->xPUSCHRange, mBuf);
14473 CMCHKUNPK(SUnpkU8, ¶m->nAntPortLayer, mBuf);
14474 CMCHKUNPK(SUnpkU8, ¶m->SCID, mBuf);
14475 CMCHKUNPK(SUnpkU8, ¶m->PMI, mBuf);
14476 CMCHKUNPK(SUnpkU8, ¶m->uciWoTBFlag, mBuf);
14477 CMCHKUNPK(SUnpkU8, ¶m->beamIndex, mBuf);
14484 /***********************************************************
14486 * Func : cmPkTfuUePuschCqiRecpInfo
14489 * Desc : This structure is sent from scheduler to PHY in order to request the
14490 * reception of CQI_RI info on PUSCH.
14499 **********************************************************/
14501 PUBLIC S16 cmPkTfuUePuschCqiRecpInfo
14503 TfuUePuschCqiRecpInfo *param,
14507 PUBLIC S16 cmPkTfuUePuschCqiRecpInfo(param, mBuf)
14508 TfuUePuschCqiRecpInfo *param;
14514 TRC3(cmPkTfuUePuschCqiRecpInfo)
14516 CMCHKPK(SPkU8, param->riBetaOff, mBuf);
14517 CMCHKPK(SPkU8, param->cqiBetaOff, mBuf);
14518 for (idx = 0; idx < param->cCNum; idx++)
14520 CMCHKPK(cmPkTknU8, ¶m->riSz[idx], mBuf);
14521 CMCHKPK(SPkU8, param->cqiPmiSzRn1[idx], mBuf);
14522 CMCHKPK(SPkU8, param->cqiPmiSzR1[idx], mBuf);
14524 CMCHKPK(SPkU8, param->cCNum, mBuf);
14525 CMCHKPK(SPkU8, param->reportType, mBuf);
14531 /***********************************************************
14533 * Func : cmUnpkTfuUePuschCqiRecpInfo
14536 * Desc : This structure is sent from scheduler to PHY in order to request the
14537 * reception of CQI_RI info on PUSCH.
14546 **********************************************************/
14548 PUBLIC S16 cmUnpkTfuUePuschCqiRecpInfo
14550 TfuUePuschCqiRecpInfo *param,
14554 PUBLIC S16 cmUnpkTfuUePuschCqiRecpInfo(param, mBuf)
14555 TfuUePuschCqiRecpInfo *param;
14561 TRC3(cmUnpkTfuUePuschCqiRecpInfo)
14563 CMCHKUNPK(SUnpkU8, ¶m->reportType, mBuf);
14564 CMCHKUNPK(SUnpkU8, ¶m->cCNum, mBuf);
14565 for (idx = param->cCNum; idx > 0; idx--)
14567 CMCHKUNPK(SUnpkU8, ¶m->cqiPmiSzR1[idx-1], mBuf);
14568 CMCHKUNPK(SUnpkU8, ¶m->cqiPmiSzRn1[idx-1], mBuf);
14569 CMCHKUNPK(cmUnpkTknU8, ¶m->riSz[idx-1], mBuf);
14571 CMCHKUNPK(SUnpkU8, ¶m->cqiBetaOff, mBuf);
14572 CMCHKUNPK(SUnpkU8, ¶m->riBetaOff, mBuf);
14578 /***********************************************************
14580 * Func : cmPkTfuUePuschHqRecpInfo
14583 * Desc : This structure is sent from scheduler to PHY in order to request the
14584 * reception of Harq info on PUSCH.
14593 **********************************************************/
14595 PUBLIC S16 cmPkTfuUePuschHqRecpInfo
14597 TfuUePuschHqRecpInfo *param,
14601 PUBLIC S16 cmPkTfuUePuschHqRecpInfo(param, mBuf)
14602 TfuUePuschHqRecpInfo *param;
14607 TRC3(cmPkTfuUePuschHqRecpInfo)
14611 CMCHKPK(SPkU8, param->ulDai, mBuf);
14612 CMCHKPK(SPkU8, param->nBundled, mBuf);
14613 CMCHKPK(SPkU32, param->hqFdbkMode, mBuf);
14615 CMCHKPK(SPkU8, param->hqBetaOff, mBuf);
14616 CMCHKPK(SPkU8, param->hqSz, mBuf);
14622 /***********************************************************
14624 * Func : cmUnpkTfuUePuschHqRecpInfo
14627 * Desc : This structure is sent from scheduler to PHY in order to request the
14628 * reception of Harq info on PUSCH.
14637 **********************************************************/
14639 PUBLIC S16 cmUnpkTfuUePuschHqRecpInfo
14641 TfuUePuschHqRecpInfo *param,
14645 PUBLIC S16 cmUnpkTfuUePuschHqRecpInfo(param, mBuf)
14646 TfuUePuschHqRecpInfo *param;
14651 TRC3(cmUnpkTfuUePuschHqRecpInfo)
14653 CMCHKUNPK(SUnpkU8, ¶m->hqSz, mBuf);
14654 CMCHKUNPK(SUnpkU8, ¶m->hqBetaOff, mBuf);
14657 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqFdbkMode, mBuf);
14658 CMCHKUNPK(SUnpkU8, ¶m->nBundled, mBuf);
14659 CMCHKUNPK(SUnpkU8, ¶m->ulDai, mBuf);
14666 /***********************************************************
14668 * Func : cmPkTfuUePuschRecpReq
14671 * Desc : This structure is sent from scheduler to PHY in order to request the
14672 * reception of UEs data on PUSCH. This may contain the following:
14676 * -# Data + HARQ + SRS
14678 * -# Data + CQI/RI + SRS
14679 * -# Data + CQI/RI + HARQ
14680 * -# Data + CQI/RI + HARQ + SRS
14689 **********************************************************/
14691 PUBLIC S16 cmPkTfuUePuschRecpReq
14693 TfuUePuschRecpReq *param,
14697 PUBLIC S16 cmPkTfuUePuschRecpReq(param, mBuf)
14698 TfuUePuschRecpReq *param;
14703 TRC3(cmPkTfuUePuschRecpReq)
14705 CMCHKPK(cmPkTknU8, ¶m->initialNumRbs, mBuf);
14706 CMCHKPK(cmPkTknU8, ¶m->initialNSrs, mBuf);
14707 CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14708 CMCHKPK(cmPkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf);
14709 CMCHKPK(cmPkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf);
14710 CMCHKPK(cmPkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf);
14711 CMCHKPK(SPkU32, param->rcpInfo, mBuf);
14717 /***********************************************************
14719 * Func : cmUnpkTfuUePuschRecpReq
14722 * Desc : This structure is sent from scheduler to PHY in order to request the
14723 * reception of UEs data on PUSCH. This may contain the following:
14727 * -# Data + HARQ + SRS
14729 * -# Data + CQI/RI + SRS
14730 * -# Data + CQI/RI + HARQ
14731 * -# Data + CQI/RI + HARQ + SRS
14740 **********************************************************/
14742 PUBLIC S16 cmUnpkTfuUePuschRecpReq
14744 TfuUePuschRecpReq *param,
14748 PUBLIC S16 cmUnpkTfuUePuschRecpReq(param, mBuf)
14749 TfuUePuschRecpReq *param;
14754 TRC3(cmUnpkTfuUePuschRecpReq)
14756 CMCHKUNPK(SUnpkU32, (U32 *)¶m->rcpInfo, mBuf);
14757 CMCHKUNPK(cmUnpkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf);
14758 CMCHKUNPK(cmUnpkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf);
14759 CMCHKUNPK(cmUnpkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf);
14760 CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14761 CMCHKUNPK(cmUnpkTknU8, ¶m->initialNSrs, mBuf);
14762 CMCHKUNPK(cmUnpkTknU8, ¶m->initialNumRbs, mBuf);
14768 /***********************************************************
14770 * Func : cmPkTfuUeRecpReqInfo
14773 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14774 * data. This contains information needed by PHY to decode the data sent by the
14784 **********************************************************/
14786 PUBLIC S16 cmPkTfuUeRecpReqInfo
14788 TfuUeRecpReqInfo *param,
14792 PUBLIC S16 cmPkTfuUeRecpReqInfo(param, mBuf)
14793 TfuUeRecpReqInfo *param;
14798 TRC3(cmPkTfuUeRecpReqInfo)
14800 switch(param->type) {
14801 case TFU_RECP_REQ_PUSCH:
14802 CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14804 case TFU_RECP_REQ_PUCCH:
14805 CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14810 CMCHKPK(SPkU32, param->type, mBuf);
14812 CMCHKPK(SPkU8, param->groupId, mBuf);
14813 #endif /* TFU_5GTF */
14814 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
14820 /***********************************************************
14822 * Func : cmUnpkTfuUeRecpReqInfo
14825 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14826 * data. This contains information needed by PHY to decode the data sent by the
14836 **********************************************************/
14838 PUBLIC S16 cmUnpkTfuUeRecpReqInfo
14840 TfuUeRecpReqInfo *param,
14844 PUBLIC S16 cmUnpkTfuUeRecpReqInfo(param, mBuf)
14845 TfuUeRecpReqInfo *param;
14850 TRC3(cmUnpkTfuUeRecpReqInfo)
14852 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
14854 CMCHKUNPK(SUnpkU8, ¶m->groupId, mBuf);
14855 #endif /* TFU_5GTF */
14856 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
14857 switch(param->type) {
14858 case TFU_RECP_REQ_PUCCH:
14859 CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14861 case TFU_RECP_REQ_PUSCH:
14862 CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14869 #endif /* TFU_UPGRADE */
14870 #ifndef TFU_UPGRADE /* TFU_UPGRADE */
14871 /***********************************************************
14873 * Func : cmPkTfuUePucchRecpReq
14876 * Desc : This structure is sent from Scheduler to PHY in order to request the
14877 * reception of an UEs data on PUCCH. This may contain the following:
14879 * -# Scheduling Request (SR)
14880 * -# HARQ-ACK and SR
14882 * -# CQI and HARQ-ACK
14891 **********************************************************/
14893 PUBLIC S16 cmPkTfuUePucchRecpReq
14895 TfuUePucchRecpReq *param,
14899 PUBLIC S16 cmPkTfuUePucchRecpReq(param, mBuf)
14900 TfuUePucchRecpReq *param;
14908 TRC3(cmPkTfuUePucchRecpReq)
14912 for (i=TFU_MAX_M-1; i >= 0; i--) {
14913 CMCHKPK(SPkU8, param->p[i], mBuf);
14915 for (i=TFU_MAX_M-1; i >= 0; i--) {
14916 CMCHKPK(SPkU8, param->m[i], mBuf);
14918 CMCHKPK(SPkU8, param->M, mBuf);
14919 CMCHKPK(SPkU8, param->multCnt, mBuf);
14922 CMCHKPK(SPkU32, param->type, mBuf);
14923 switch(param->hqType) {
14924 case TFU_HQ_RECP_REQ_N1PUCCH:
14925 CMCHKPK(SPkU16, param->t.n1Pucch, mBuf);
14929 case TFU_HQ_RECP_REQ_NORMAL:
14930 for (i=TFU_MAX_M-1; i >= 0; i--) {
14931 CMCHKPK(SPkU16, param->t.nCce[i], mBuf);
14938 case TFU_HQ_RECP_REQ_NORMAL:
14939 CMCHKPK(SPkU16, param->t.nCce, mBuf);
14946 CMCHKPK(SPkU32, param->hqType, mBuf);
14952 /***********************************************************
14954 * Func : cmUnpkTfuUePucchRecpReq
14957 * Desc : This structure is sent from Scheduler to PHY in order to request the
14958 * reception of an UEs data on PUCCH. This may contain the following:
14960 * -# Scheduling Request (SR)
14961 * -# HARQ-ACK and SR
14963 * -# CQI and HARQ-ACK
14972 **********************************************************/
14974 PUBLIC S16 cmUnpkTfuUePucchRecpReq
14976 TfuUePucchRecpReq *param,
14980 PUBLIC S16 cmUnpkTfuUePucchRecpReq(param, mBuf)
14981 TfuUePucchRecpReq *param;
14989 TRC3(cmUnpkTfuUePucchRecpReq)
14991 CMCHKUNPK(SUnpkU32, (U32 *)¶m->hqType, mBuf);
14992 switch(param->hqType) {
14995 case TFU_HQ_RECP_REQ_NORMAL:
14996 CMCHKUNPK(SUnpkU16, ¶m->t.nCce, mBuf);
15002 case TFU_HQ_RECP_REQ_NORMAL:
15003 for (i=0; i<TFU_MAX_M; i++) {
15004 CMCHKUNPK(SUnpkU16, ¶m->t.nCce[i], mBuf);
15009 case TFU_HQ_RECP_REQ_N1PUCCH:
15010 CMCHKUNPK(SUnpkU16, ¶m->t.n1Pucch, mBuf);
15015 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
15018 CMCHKUNPK(SUnpkU8, ¶m->multCnt, mBuf);
15019 CMCHKUNPK(SUnpkU8, ¶m->M, mBuf);
15020 for (i=0; i<TFU_MAX_M; i++) {
15021 CMCHKUNPK(SUnpkU8, ¶m->m[i], mBuf);
15023 for (i=0; i<TFU_MAX_M; i++) {
15024 CMCHKUNPK(SUnpkU8, ¶m->p[i], mBuf);
15033 /***********************************************************
15035 * Func : cmPkTfuUeMsg3RecpReq
15038 * Desc : This structure is sent from scheduler to PHY in order to request the
15039 * reception of UEs data sent as MSG3 for Random access.
15048 **********************************************************/
15050 PUBLIC S16 cmPkTfuUeMsg3RecpReq
15052 TfuUeMsg3RecpReq *param,
15056 PUBLIC S16 cmPkTfuUeMsg3RecpReq(param, mBuf)
15057 TfuUeMsg3RecpReq *param;
15062 TRC3(cmPkTfuUeMsg3RecpReq)
15064 CMCHKPK(SPkU32, param->modType, mBuf);
15065 CMCHKPK(SPkU16, param->size, mBuf);
15066 /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
15067 CMCHKPK(SPkU8, param->nDmrs, mBuf);
15068 CMCHKPK(SPkU8, param->rv, mBuf);
15069 CMCHKPK(SPkU8, param->ndi, mBuf);
15070 CMCHKPK(SPkU8, param->harqProcId, mBuf);
15071 CMCHKPK(SPkU8, param->isRtx, mBuf);
15072 CMCHKPK(SPkU8, param->ulDelay, mBuf);
15073 CMCHKPK(SPkU8, param->expCqi, mBuf);
15074 CMCHKPK(SPkU8, param->mcs, mBuf);
15075 CMCHKPK(SPkU8, param->numRb, mBuf);
15076 CMCHKPK(SPkU8, param->rbStart, mBuf);
15077 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
15083 /***********************************************************
15085 * Func : cmUnpkTfuUeMsg3RecpReq
15088 * Desc : This structure is sent from scheduler to PHY in order to request the
15089 * reception of UEs data sent as MSG3 for Random access.
15098 **********************************************************/
15100 PUBLIC S16 cmUnpkTfuUeMsg3RecpReq
15102 TfuUeMsg3RecpReq *param,
15106 PUBLIC S16 cmUnpkTfuUeMsg3RecpReq(param, mBuf)
15107 TfuUeMsg3RecpReq *param;
15112 TRC3(cmUnpkTfuUeMsg3RecpReq)
15114 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
15115 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
15116 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
15117 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
15118 CMCHKUNPK(SUnpkU8, ¶m->expCqi, mBuf);
15119 CMCHKUNPK(SUnpkU8, ¶m->ulDelay, mBuf);
15120 CMCHKUNPK(SUnpkU8, ¶m->isRtx, mBuf);
15121 /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
15122 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
15123 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
15124 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
15125 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
15126 CMCHKUNPK(SUnpkU16, ¶m->size, mBuf);
15127 CMCHKUNPK(SUnpkU32, (U32 *)¶m->modType, mBuf);
15133 /***********************************************************
15135 * Func : cmPkTfuUePuschRecpReq
15138 * Desc : This structure is sent from scheduler to PHY in order to request the
15139 * reception of UEs data on PUSCH. This may contain the following:
15141 * -# Data + CQI and RI
15142 * -# Data + CQI and HARQ
15151 **********************************************************/
15153 PUBLIC S16 cmPkTfuUePuschRecpReq
15155 TfuUePuschRecpReq *param,
15159 PUBLIC S16 cmPkTfuUePuschRecpReq(param, mBuf)
15160 TfuUePuschRecpReq *param;
15165 TRC3(cmPkTfuUePuschRecpReq)
15167 CMCHKPK(SPkU32, param->modType, mBuf);
15168 CMCHKPK(SPkU16, param->size, mBuf);
15169 CMCHKPK(SPkU32, param->mode, mBuf);
15170 CMCHKPK(SPkU8, param->expHarq, mBuf);
15171 CMCHKPK(SPkU8, param->expCqi, mBuf);
15172 CMCHKPK(SPkU8, param->nDmrs, mBuf);
15173 CMCHKPK(SPkU8, param->rv, mBuf);
15174 CMCHKPK(SPkU8, param->isRtx, mBuf);
15175 CMCHKPK(SPkU8, param->ndi, mBuf);
15176 CMCHKPK(SPkU8, param->harqProcId, mBuf);
15177 CMCHKPK(SPkU8, param->mcs, mBuf);
15178 CMCHKPK(SPkU8, param->numRb, mBuf);
15179 CMCHKPK(SPkU8, param->rbStart, mBuf);
15180 CMCHKPK(SPkU8, param->hoppingBits, mBuf);
15181 CMCHKPK(SPkU8, param->hoppingEnbld, mBuf);
15187 /***********************************************************
15189 * Func : cmUnpkTfuUePuschRecpReq
15192 * Desc : This structure is sent from scheduler to PHY in order to request the
15193 * reception of UEs data on PUSCH. This may contain the following:
15195 * -# Data + CQI and RI
15196 * -# Data + CQI and HARQ
15205 **********************************************************/
15207 PUBLIC S16 cmUnpkTfuUePuschRecpReq
15209 TfuUePuschRecpReq *param,
15213 PUBLIC S16 cmUnpkTfuUePuschRecpReq(param, mBuf)
15214 TfuUePuschRecpReq *param;
15219 TRC3(cmUnpkTfuUePuschRecpReq)
15221 CMCHKUNPK(SUnpkU8, ¶m->hoppingEnbld, mBuf);
15222 CMCHKUNPK(SUnpkU8, ¶m->hoppingBits, mBuf);
15223 CMCHKUNPK(SUnpkU8, ¶m->rbStart, mBuf);
15224 CMCHKUNPK(SUnpkU8, ¶m->numRb, mBuf);
15225 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
15226 CMCHKUNPK(SUnpkU8, ¶m->harqProcId, mBuf);
15227 CMCHKUNPK(SUnpkU8, ¶m->ndi, mBuf);
15228 CMCHKUNPK(SUnpkU8, ¶m->isRtx, mBuf);
15229 CMCHKUNPK(SUnpkU8, ¶m->rv, mBuf);
15230 CMCHKUNPK(SUnpkU8, ¶m->nDmrs, mBuf);
15231 CMCHKUNPK(SUnpkU8, ¶m->expCqi, mBuf);
15232 CMCHKUNPK(SUnpkU8, ¶m->expHarq, mBuf);
15233 CMCHKUNPK(SUnpkU32, (U32 *)¶m->mode, mBuf);
15234 CMCHKUNPK(SUnpkU16, ¶m->size, mBuf);
15235 CMCHKUNPK(SUnpkU32, (U32 *)¶m->modType, mBuf);
15241 /***********************************************************
15243 * Func : cmPkTfuUeRecpReqInfo
15246 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
15247 * data. This contains information needed by PHY to decode the data sent by the
15257 **********************************************************/
15259 PUBLIC S16 cmPkTfuUeRecpReqInfo
15261 TfuUeRecpReqInfo *param,
15265 PUBLIC S16 cmPkTfuUeRecpReqInfo(param, mBuf)
15266 TfuUeRecpReqInfo *param;
15271 TRC3(cmPkTfuUeRecpReqInfo)
15273 switch(param->type) {
15274 case TFU_RECP_REQ_PUSCH:
15275 CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
15277 case TFU_RECP_REQ_MSG3:
15278 CMCHKPK(cmPkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf);
15280 case TFU_RECP_REQ_PUCCH:
15281 CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
15286 CMCHKPK(SPkU32, param->type, mBuf);
15287 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
15293 /***********************************************************
15295 * Func : cmUnpkTfuUeRecpReqInfo
15298 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
15299 * data. This contains information needed by PHY to decode the data sent by the
15309 **********************************************************/
15311 PUBLIC S16 cmUnpkTfuUeRecpReqInfo
15313 TfuUeRecpReqInfo *param,
15317 PUBLIC S16 cmUnpkTfuUeRecpReqInfo(param, mBuf)
15318 TfuUeRecpReqInfo *param;
15323 TRC3(cmUnpkTfuUeRecpReqInfo)
15325 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
15326 CMCHKUNPK(SUnpkU32, (U32 *)¶m->type, mBuf);
15327 switch(param->type) {
15328 case TFU_RECP_REQ_PUCCH:
15329 CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
15331 case TFU_RECP_REQ_MSG3:
15332 CMCHKUNPK(cmUnpkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf);
15334 case TFU_RECP_REQ_PUSCH:
15335 CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
15344 #endif /* ifndef TFU_UPGRADE */
15345 /*LAA: Packing and Unpacking*/
15347 /***********************************************************
15349 * Func : cmPkTfuErrIndInfo
15352 * Desc : This structure contains information that is passed as a part of
15353 * the ERR indication sent from PHY to MAC.
15362 **********************************************************/
15364 PRIVATE S16 cmPkTfuErrIndInfo
15366 TfuErrIndInfo *param,
15370 PRIVATE S16 cmPkTfuErrIndInfo(param, mBuf)
15371 TfuErrIndInfo *param;
15376 TRC3(cmPkTfuErrIndInfo)
15378 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
15379 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
15382 /***********************************************************
15384 * Func : cmUnpkTfuErrIndInfo
15387 * Desc : This structure contains information that is passed as a part of the ERR
15388 * indication sent from PHY to MAC.
15397 **********************************************************/
15399 PRIVATE S16 cmUnpkTfuErrIndInfo
15401 TfuErrIndInfo *param,
15405 PRIVATE S16 cmUnpkTfuErrIndInfo(param, mBuf)
15406 TfuErrIndInfo *param;
15411 TRC3(cmUnpkTfuErrIndInfo)
15413 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
15414 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
15418 /***********************************************************
15420 * Func : cmPkTfuErrInd
15423 * This API is invoked by PHY to send ERROR INDICATION to scheduler
15424 * Currently invoked in the cases when the Unlicensed SCell transmission
15426 * This API contains the Cell and subframe information for which the
15427 * transmission failed.
15429 * @param[in] Pst *pst
15430 * @param[in] SuId suId
15431 * @param[in] TfuErrIndInfo *errIndInfo
15443 **********************************************************/
15445 PUBLIC S16 cmPkTfuErrInd
15449 TfuErrIndInfo * errInd
15452 PUBLIC S16 cmPkTfuErrInd(pst, suId, errInd)
15455 TfuErrIndInfo * errInd;
15458 Buffer *mBuf = NULLP;
15459 TRC3(cmPkTfuErrInd)
15461 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
15462 #if (ERRCLASS & ERRCLS_ADD_RES)
15463 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15464 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15465 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
15467 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15470 if (pst->selector == TFU_SEL_LC) {
15471 if (cmPkTfuErrIndInfo(errInd, mBuf) != ROK) {
15472 #if (ERRCLASS & ERRCLS_ADD_RES)
15473 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15474 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15475 (ErrVal)ETFU106, (ErrVal)0, "Packing failed");
15477 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15478 TFU_FREE_MSG(mBuf);
15482 else if(pst->selector == TFU_SEL_LWLC)
15484 if (cmPkPtr((PTR)errInd, mBuf) != ROK)
15486 #if (ERRCLASS & ERRCLS_ADD_RES)
15487 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15488 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15489 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
15492 /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/
15493 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15494 TFU_FREE_MSG(mBuf);
15499 if (SPkS16(suId, mBuf) != ROK) {
15500 #if (ERRCLASS & ERRCLS_ADD_RES)
15501 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15502 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15503 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
15505 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15506 TFU_FREE_MSG(mBuf);
15509 if (pst->selector != TFU_SEL_LWLC) {
15510 if (SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)) != ROK) {
15511 #if (ERRCLASS & ERRCLS_ADD_RES)
15512 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15513 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15514 (ErrVal)ETFU108, (ErrVal)0, "Packing failed");
15516 TFU_FREE_MSG(mBuf);
15521 pst->event = (Event) EVTTFUERRIND;
15522 RETVALUE(SPstTsk(pst,mBuf));
15526 /***********************************************************
15528 * Func : cmUnpkTfuErrInd
15531 * This API is invoked by PHY to send ERROR INDICATION to scheduler
15532 * Currently invoked in the cases when the Unlicensed SCell transmission
15534 * This API contains the Cell and subframe information for which the
15535 * transmission failed.
15536 * @param pst Pointer to the post structure.
15537 * @param suId SAP ID of the service user.
15538 * @param errInd Pointer to the TfuErrIndInfo.
15539 * @return ROK/RFAILED
15548 **********************************************************/
15550 PUBLIC S16 cmUnpkTfuErrInd
15557 PUBLIC S16 cmUnpkTfuErrInd(func, pst, mBuf)
15564 TfuErrIndInfo *errInd;
15566 TRC3(cmUnpkTfuErrInd)
15568 if (SUnpkS16(&suId, mBuf) != ROK) {
15569 TFU_FREE_MSG(mBuf);
15570 #if (ERRCLASS & ERRCLS_ADD_RES)
15571 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15572 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15573 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
15577 if (pst->selector != TFU_SEL_LWLC) {
15578 if ((SGetSBuf(pst->region, pst->pool, (Data **)&errInd, sizeof(TfuErrIndInfo))) != ROK) {
15579 #if (ERRCLASS & ERRCLS_ADD_RES)
15580 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15581 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15582 (ErrVal)ETFU110, (ErrVal)0, "Packing failed");
15584 TFU_FREE_MSG(mBuf);
15589 if (pst->selector == TFU_SEL_LC)
15591 if (cmUnpkTfuErrIndInfo(errInd, mBuf) != ROK) {
15592 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15593 TFU_FREE_MSG(mBuf);
15594 #if (ERRCLASS & ERRCLS_ADD_RES)
15595 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15596 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15597 (ErrVal)ETFU111, (ErrVal)0, "Packing failed");
15602 else if(pst->selector == TFU_SEL_LWLC)
15604 if (cmUnpkPtr((PTR *)&errInd, mBuf) != ROK)
15606 #if (ERRCLASS & ERRCLS_ADD_RES)
15607 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15608 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15609 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
15611 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15612 TFU_FREE_MSG(mBuf);
15616 TFU_FREE_MSG(mBuf);
15617 /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
15618 (*func)(pst, suId, errInd);
15619 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15623 #endif /* if defined(LCTFU) */
15625 /**********************************************************************
15627 **********************************************************************/