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 "common_def.h"
39 #include "tfu.h" /* RGU Interface defines */
41 /* header/extern include files (.x) */
42 #include "tfu.x" /* RGU Interface includes */
44 #include "du_app_mac_inf.h"
45 //#include "mac_sch_interface.h"
50 /***********************************************************
52 * Func : cmPkTfuBndReq
55 * Desc : This API is used to send a Bind Request from MAC to PHY.
56 * @param pst Pointer to the post structure.
57 * @param suId SAP ID of the service user.
58 * @param spId SAP ID of the service provider.
68 **********************************************************/
77 S16 cmPkTfuBndReq(pst, suId, spId)
86 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
87 #if (ERRCLASS & ERRCLS_ADD_RES)
88 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
89 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
90 (ErrVal)ETFU001, (ErrVal)0, "Packing failed");
94 if (SPkS16(spId, mBuf) != ROK) {
95 #if (ERRCLASS & ERRCLS_ADD_RES)
96 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
97 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
98 (ErrVal)ETFU002, (ErrVal)0, "Packing failed");
103 if (SPkS16(suId, mBuf) != ROK) {
104 #if (ERRCLASS & ERRCLS_ADD_RES)
105 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
106 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
107 (ErrVal)ETFU003, (ErrVal)0, "Packing failed");
112 pst->event = (Event) EVTTFUBNDREQ;
113 return (SPstTsk(pst,mBuf));
117 /***********************************************************
119 * Func : cmUnpkTfuBndReq
122 * Desc : This API is used to send a Bind Request from MAC to PHY.
123 * @param pst Pointer to the post structure.
124 * @param suId SAP ID of the service user.
125 * @param spId SAP ID of the service provider.
126 * @return ROK/RFAILED
135 **********************************************************/
144 S16 cmUnpkTfuBndReq(func, pst, mBuf)
153 TRC3(cmUnpkTfuBndReq)
155 if (SUnpkS16(&suId, mBuf) != ROK) {
157 #if (ERRCLASS & ERRCLS_ADD_RES)
158 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
159 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
160 (ErrVal)ETFU004, (ErrVal)0, "Packing failed");
164 if (SUnpkS16(&spId, mBuf) != ROK) {
166 #if (ERRCLASS & ERRCLS_ADD_RES)
167 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
168 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
169 (ErrVal)ETFU005, (ErrVal)0, "Packing failed");
174 return ((*func)(pst, suId, spId));
178 /***********************************************************
180 * Func : cmPkTfuBndCfm
183 * Desc : This API is used to receive a Bind Confirm from PHY to MAC.
184 * @param pst Pointer to the post structure.
185 * @param suId SAP ID of the service user.
186 * @param status Status of the bind request.
187 * @return ROK/RFAILED
196 **********************************************************/
205 S16 cmPkTfuBndCfm(pst, suId, status)
211 Buffer *mBuf = NULLP;
214 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
215 #if (ERRCLASS & ERRCLS_ADD_RES)
216 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
217 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
218 (ErrVal)ETFU006, (ErrVal)0, "Packing failed");
222 if (oduUnpackUInt8(status, mBuf) != ROK) {
223 #if (ERRCLASS & ERRCLS_ADD_RES)
224 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
225 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
226 (ErrVal)ETFU007, (ErrVal)0, "Packing failed");
231 if (SPkS16(suId, mBuf) != ROK) {
232 #if (ERRCLASS & ERRCLS_ADD_RES)
233 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
234 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
235 (ErrVal)ETFU008, (ErrVal)0, "Packing failed");
240 pst->event = (Event) EVTTFUBNDCFM;
241 return (SPstTsk(pst,mBuf));
245 /***********************************************************
247 * Func : cmUnpkTfuBndCfm
250 * Desc : This API is used to receive a Bind Confirm from PHY to MAC.
251 * @param pst Pointer to the post structure.
252 * @param suId SAP ID of the service user.
253 * @param status Status of the bind request.
254 * @return ROK/RFAILED
263 **********************************************************/
272 S16 cmUnpkTfuBndCfm(func, pst, mBuf)
281 TRC3(cmUnpkTfuBndCfm)
283 if (SUnpkS16(&suId, mBuf) != ROK) {
285 #if (ERRCLASS & ERRCLS_ADD_RES)
286 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
287 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
288 (ErrVal)ETFU009, (ErrVal)0, "Packing failed");
292 if (oduPackUInt8(&status, mBuf) != ROK) {
294 #if (ERRCLASS & ERRCLS_ADD_RES)
295 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
296 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
297 (ErrVal)ETFU010, (ErrVal)0, "Packing failed");
302 return ((*func)(pst, suId, status));
306 /***********************************************************
308 * Func : cmPkTfuUbndReq
311 * Desc : This API is used to send an Unbind Request from MAC to PHY.
312 * @param pst Pointer to the post structure.
313 * @param suId SAP ID of the service provider.
314 * @param reason Reason for Unbind request.
315 * @return ROK/RFAILED
324 **********************************************************/
333 S16 cmPkTfuUbndReq(pst, spId, reason)
339 Buffer *mBuf = NULLP;
342 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
343 #if (ERRCLASS & ERRCLS_ADD_RES)
344 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
345 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
346 (ErrVal)ETFU011, (ErrVal)0, "Packing failed");
350 if (SPkS16(reason, mBuf) != ROK) {
351 #if (ERRCLASS & ERRCLS_ADD_RES)
352 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
353 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
354 (ErrVal)ETFU012, (ErrVal)0, "Packing failed");
359 if (SPkS16(spId, mBuf) != ROK) {
360 #if (ERRCLASS & ERRCLS_ADD_RES)
361 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
362 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
363 (ErrVal)ETFU013, (ErrVal)0, "Packing failed");
368 pst->event = (Event) EVTTFUUBNDREQ;
369 return (SPstTsk(pst,mBuf));
373 /***********************************************************
375 * Func : cmUnpkTfuUbndReq
378 * Desc : This API is used to send an Unbind Request from MAC to PHY.
379 * @param pst Pointer to the post structure.
380 * @param suId SAP ID of the service provider.
381 * @param reason Reason for Unbind request.
382 * @return ROK/RFAILED
391 **********************************************************/
400 S16 cmUnpkTfuUbndReq(func, pst, mBuf)
409 TRC3(cmUnpkTfuUbndReq)
411 if (SUnpkS16(&spId, mBuf) != ROK) {
413 #if (ERRCLASS & ERRCLS_ADD_RES)
414 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
415 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
416 (ErrVal)ETFU014, (ErrVal)0, "Packing failed");
420 if (SUnpkS16(&reason, mBuf) != ROK) {
422 #if (ERRCLASS & ERRCLS_ADD_RES)
423 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
424 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
425 (ErrVal)ETFU015, (ErrVal)0, "Packing failed");
430 return ((*func)(pst, spId, reason));
434 /***********************************************************
436 * Func : cmPkTfuSchBndReq
439 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
440 * @param pst Pointer to the post structure.
441 * @param suId SAP ID of the service user.
442 * @param spId SAP ID of the service provider.
443 * @return ROK/RFAILED
452 **********************************************************/
461 S16 cmPkTfuSchBndReq(pst, suId, spId)
467 Buffer *mBuf = NULLP;
468 TRC3(cmPkTfuSchBndReq)
470 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
471 #if (ERRCLASS & ERRCLS_ADD_RES)
472 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
473 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
474 (ErrVal)ETFU016, (ErrVal)0, "Packing failed");
478 if (SPkS16(spId, mBuf) != ROK) {
479 #if (ERRCLASS & ERRCLS_ADD_RES)
480 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
481 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
482 (ErrVal)ETFU017, (ErrVal)0, "Packing failed");
487 if (SPkS16(suId, mBuf) != ROK) {
488 #if (ERRCLASS & ERRCLS_ADD_RES)
489 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
490 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
491 (ErrVal)ETFU018, (ErrVal)0, "Packing failed");
496 pst->event = (Event) EVTTFUSCHBNDREQ;
497 return (SPstTsk(pst,mBuf));
501 /***********************************************************
503 * Func : cmUnpkTfuSchBndReq
506 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
507 * @param pst Pointer to the post structure.
508 * @param suId SAP ID of the service user.
509 * @param spId SAP ID of the service provider.
510 * @return ROK/RFAILED
519 **********************************************************/
521 S16 cmUnpkTfuSchBndReq
528 S16 cmUnpkTfuSchBndReq(func, pst, mBuf)
537 TRC3(cmUnpkTfuSchBndReq)
539 if (SUnpkS16(&suId, mBuf) != ROK) {
541 #if (ERRCLASS & ERRCLS_ADD_RES)
542 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
543 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
544 (ErrVal)ETFU019, (ErrVal)0, "Packing failed");
548 if (SUnpkS16(&spId, mBuf) != ROK) {
550 #if (ERRCLASS & ERRCLS_ADD_RES)
551 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
552 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
553 (ErrVal)ETFU020, (ErrVal)0, "Packing failed");
558 return ((*func)(pst, suId, spId));
562 /***********************************************************
564 * Func : cmPkTfuSchBndCfm
567 * Desc : This API is used to receive a Bind Confirm from PHY to Scheduler.
568 * @param pst Pointer to the post structure.
569 * @param suId SAP ID of the service user.
570 * @param status Status of the bind request.
571 * @return ROK/RFAILED
580 **********************************************************/
589 S16 cmPkTfuSchBndCfm(pst, suId, status)
595 Buffer *mBuf = NULLP;
596 TRC3(cmPkTfuSchBndCfm)
598 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
599 #if (ERRCLASS & ERRCLS_ADD_RES)
600 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
601 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
602 (ErrVal)ETFU021, (ErrVal)0, "Packing failed");
606 if (oduUnpackUInt8(status, mBuf) != ROK) {
607 #if (ERRCLASS & ERRCLS_ADD_RES)
608 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
609 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
610 (ErrVal)ETFU022, (ErrVal)0, "Packing failed");
615 if (SPkS16(suId, mBuf) != ROK) {
616 #if (ERRCLASS & ERRCLS_ADD_RES)
617 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
618 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
619 (ErrVal)ETFU023, (ErrVal)0, "Packing failed");
624 pst->event = (Event) EVTTFUSCHBNDCFM;
625 return (SPstTsk(pst,mBuf));
629 /***********************************************************
631 * Func : cmUnpkTfuSchBndCfm
634 * Desc : This API is used to receive a Bind Confirm from PHY to Scheduler.
635 * @param pst Pointer to the post structure.
636 * @param suId SAP ID of the service user.
637 * @param status Status of the bind request.
638 * @return ROK/RFAILED
647 **********************************************************/
649 S16 cmUnpkTfuSchBndCfm
656 S16 cmUnpkTfuSchBndCfm(func, pst, mBuf)
665 TRC3(cmUnpkTfuSchBndCfm)
667 if (SUnpkS16(&suId, mBuf) != ROK) {
669 #if (ERRCLASS & ERRCLS_ADD_RES)
670 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
671 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
672 (ErrVal)ETFU024, (ErrVal)0, "Packing failed");
676 if (oduPackUInt8(&status, mBuf) != ROK) {
678 #if (ERRCLASS & ERRCLS_ADD_RES)
679 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
680 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
681 (ErrVal)ETFU025, (ErrVal)0, "Packing failed");
686 return ((*func)(pst, suId, status));
690 /***********************************************************
692 * Func : cmPkTfuSchUbndReq
695 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
696 * @param pst Pointer to the post structure.
697 * @param suId SAP ID of the service provider.
698 * @param reason Reason for Unbind request.
699 * @return ROK/RFAILED
708 **********************************************************/
710 S16 cmPkTfuSchUbndReq
717 S16 cmPkTfuSchUbndReq(pst, spId, reason)
723 Buffer *mBuf = NULLP;
724 TRC3(cmPkTfuSchUbndReq)
726 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
727 #if (ERRCLASS & ERRCLS_ADD_RES)
728 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
729 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
730 (ErrVal)ETFU026, (ErrVal)0, "Packing failed");
734 if (SPkS16(reason, mBuf) != ROK) {
735 #if (ERRCLASS & ERRCLS_ADD_RES)
736 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
737 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
738 (ErrVal)ETFU027, (ErrVal)0, "Packing failed");
743 if (SPkS16(spId, mBuf) != ROK) {
744 #if (ERRCLASS & ERRCLS_ADD_RES)
745 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
746 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
747 (ErrVal)ETFU028, (ErrVal)0, "Packing failed");
752 pst->event = (Event) EVTTFUSCHUBNDREQ;
753 return (SPstTsk(pst,mBuf));
757 /***********************************************************
759 * Func : cmUnpkTfuSchUbndReq
762 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
763 * @param pst Pointer to the post structure.
764 * @param suId SAP ID of the service provider.
765 * @param reason Reason for Unbind request.
766 * @return ROK/RFAILED
775 **********************************************************/
777 S16 cmUnpkTfuSchUbndReq
784 S16 cmUnpkTfuSchUbndReq(func, pst, mBuf)
793 TRC3(cmUnpkTfuSchUbndReq)
795 if (SUnpkS16(&spId, mBuf) != ROK) {
797 #if (ERRCLASS & ERRCLS_ADD_RES)
798 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
799 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
800 (ErrVal)ETFU029, (ErrVal)0, "Packing failed");
804 if (SUnpkS16(&reason, mBuf) != ROK) {
806 #if (ERRCLASS & ERRCLS_ADD_RES)
807 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
808 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
809 (ErrVal)ETFU030, (ErrVal)0, "Packing failed");
814 return ((*func)(pst, spId, reason));
818 /***********************************************************
820 * Func : cmPkTfuRaReqInd
823 * Desc : This API is used to indication Random Access Request reception from
825 * @details This primitive is used by physical layer to indicate the reception
826 * of a Random Access Request from a set of UEs. The information passed consists
827 * of the RA-RNTI and the list of preambles received.
828 * @param pst Pointer to the post structure.
829 * @param suId SAP ID of the service user.
830 * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
831 * @return ROK/RFAILED
840 **********************************************************/
846 TfuRaReqIndInfo * raReqInd
849 S16 cmPkTfuRaReqInd(pst, suId, raReqInd)
852 TfuRaReqIndInfo * raReqInd;
855 Buffer *mBuf = NULLP;
856 TRC3(cmPkTfuRaReqInd)
858 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
859 #if (ERRCLASS & ERRCLS_ADD_RES)
860 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
861 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
862 (ErrVal)ETFU031, (ErrVal)0, "Packing failed");
864 TFU_FREE_MEM(raReqInd);
867 if (pst->selector == ODU_SELECTOR_LC) {
868 if (cmPkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) {
869 #if (ERRCLASS & ERRCLS_ADD_RES)
870 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
871 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
872 (ErrVal)ETFU032, (ErrVal)0, "Packing failed");
874 TFU_FREE_MEM(raReqInd);
879 else if(pst->selector == ODU_SELECTOR_LWLC)
881 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
888 TFU_FREE_MEM(raReqInd);
894 if (SPkS16(suId, mBuf) != ROK) {
895 #if (ERRCLASS & ERRCLS_ADD_RES)
896 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
897 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
898 (ErrVal)ETFU033, (ErrVal)0, "Packing failed");
900 TFU_FREE_MEM(raReqInd);
904 if (pst->selector != ODU_SELECTOR_LWLC) {
905 TFU_FREE_MEM(raReqInd);
908 pst->event = (Event) EVTTFURAREQIND;
909 return (SPstTsk(pst,mBuf));
913 /***********************************************************
915 * Func : cmUnpkTfuRaReqInd
918 * Desc : This API is used to indication Random Access Request reception from
920 * @details This primitive is used by physical layer to indicate the reception
921 * of a Random Access Request from a set of UEs. The information passed consists
922 * of the RA-RNTI and the list of preambles received.
923 * @param pst Pointer to the post structure.
924 * @param suId SAP ID of the service user.
925 * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
926 * @return ROK/RFAILED
935 **********************************************************/
937 S16 cmUnpkTfuRaReqInd
944 S16 cmUnpkTfuRaReqInd(func, pst, mBuf)
951 TfuRaReqIndInfo *raReqInd;
953 TRC3(cmUnpkTfuRaReqInd)
955 if (SUnpkS16(&suId, mBuf) != ROK) {
957 #if (ERRCLASS & ERRCLS_ADD_RES)
958 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
959 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
960 (ErrVal)ETFU034, (ErrVal)0, "Packing failed");
964 if (pst->selector != ODU_SELECTOR_LWLC) {
966 sMem.region = pst->region;
967 sMem.pool = pst->pool;
968 if ((cmAllocEvnt(sizeof(TfuRaReqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&raReqInd)) != ROK) {
969 #if (ERRCLASS & ERRCLS_ADD_RES)
970 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
971 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
972 (ErrVal)ETFU035, (ErrVal)0, "Packing failed");
980 if (pst->selector == ODU_SELECTOR_LC)
982 if (cmUnpkTfuRaReqIndInfo(raReqInd, mBuf) != ROK) {
983 TFU_FREE_MEM(raReqInd);
985 #if (ERRCLASS & ERRCLS_ADD_RES)
986 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
987 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
988 (ErrVal)ETFU036, (ErrVal)0, "Packing failed");
993 else if(pst->selector == ODU_SELECTOR_LWLC)
995 if (oduUnpackPointer((PTR *)&raReqInd, mBuf) != ROK)
997 #if (ERRCLASS & ERRCLS_ADD_RES)
998 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
999 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1000 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1002 TFU_FREE_MEM(raReqInd);
1008 return ((*func)(pst, suId, raReqInd));
1012 /***********************************************************
1014 * Func : cmPkTfuRecpReq
1017 * Desc : This primitive is sent from Scheduler to PHY.
1018 * @details This primitive provides PHY with all the information required by
1019 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
1020 * -# On PUCCH UE can transmit the following
1026 * -# On PUSCH UE can transmit the following
1029 * -# Data + HARQ Feedback
1030 * This primitive carries all the information for the expected subframe for all
1031 * the UEs that have been scheduled to transmit.
1032 * @param pst Pointer to the post structure.
1033 * @param spId SAP ID of the service provider.
1034 * @param recpReq Pointer to the TfuRecpReqInfo structure.
1035 * @return ROK/RFAILED
1044 **********************************************************/
1050 TfuRecpReqInfo * recpReq
1053 S16 cmPkTfuRecpReq(pst, spId, recpReq)
1056 TfuRecpReqInfo * recpReq;
1059 Buffer *mBuf = NULLP;
1060 TRC3(cmPkTfuRecpReq)
1062 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1063 #if (ERRCLASS & ERRCLS_ADD_RES)
1064 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1065 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1066 (ErrVal)ETFU037, (ErrVal)0, "Packing failed");
1068 TFU_FREE_MEM(recpReq);
1071 if (pst->selector == ODU_SELECTOR_LC) {
1072 if (cmPkTfuRecpReqInfo(recpReq, mBuf) != ROK) {
1073 #if (ERRCLASS & ERRCLS_ADD_RES)
1074 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1075 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1076 (ErrVal)ETFU038, (ErrVal)0, "Packing failed");
1078 TFU_FREE_MEM(recpReq);
1083 else if(pst->selector == ODU_SELECTOR_LWLC)
1085 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1092 TFU_FREE_MEM(recpReq);
1099 if (SPkS16(spId, mBuf) != ROK) {
1100 #if (ERRCLASS & ERRCLS_ADD_RES)
1101 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1102 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1103 (ErrVal)ETFU039, (ErrVal)0, "Packing failed");
1105 TFU_FREE_MEM(recpReq);
1109 if (pst->selector != ODU_SELECTOR_LWLC) {
1110 TFU_FREE_MEM(recpReq);
1113 pst->event = (Event) EVTTFURECPREQ;
1114 return (SPstTsk(pst,mBuf));
1118 /***********************************************************
1120 * Func : cmUnpkTfuRecpReq
1123 * Desc : This primitive is sent from Scheduler to PHY.
1124 * @details This primitive provides PHY with all the information required by
1125 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
1126 * -# On PUCCH UE can transmit the following
1132 * -# On PUSCH UE can transmit the following
1135 * -# Data + HARQ Feedback
1136 * This primitive carries all the information for the expected subframe for all
1137 * the UEs that have been scheduled to transmit.
1138 * @param pst Pointer to the post structure.
1139 * @param spId SAP ID of the service provider.
1140 * @param recpReq Pointer to the TfuRecpReqInfo structure.
1141 * @return ROK/RFAILED
1150 **********************************************************/
1152 S16 cmUnpkTfuRecpReq
1159 S16 cmUnpkTfuRecpReq(func, pst, mBuf)
1166 TfuRecpReqInfo *recpReq;
1168 TRC3(cmUnpkTfuRecpReq)
1170 if (SUnpkS16(&spId, mBuf) != ROK) {
1172 #if (ERRCLASS & ERRCLS_ADD_RES)
1173 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1174 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1175 (ErrVal)ETFU040, (ErrVal)0, "Packing failed");
1179 if (pst->selector != ODU_SELECTOR_LWLC) {
1181 sMem.region = pst->region;
1182 sMem.pool = pst->pool;
1183 if ((cmAllocEvnt(sizeof(TfuRecpReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&recpReq)) != ROK) {
1184 #if (ERRCLASS & ERRCLS_ADD_RES)
1185 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1186 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1187 (ErrVal)ETFU041, (ErrVal)0, "Packing failed");
1193 else if(pst->selector == ODU_SELECTOR_LWLC)
1195 if (oduUnpackPointer((PTR *)&recpReq, mBuf) != ROK)
1197 #if (ERRCLASS & ERRCLS_ADD_RES)
1198 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1199 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1200 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1202 TFU_FREE_MEM(recpReq);
1208 if (pst->selector == ODU_SELECTOR_LC)
1210 if (cmUnpkTfuRecpReqInfo(recpReq, (Ptr)&recpReq->memCp, mBuf) != ROK) {
1211 TFU_FREE_MEM(recpReq);
1213 #if (ERRCLASS & ERRCLS_ADD_RES)
1214 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1215 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1216 (ErrVal)ETFU042, (ErrVal)0, "Packing failed");
1221 else if(pst->selector == ODU_SELECTOR_LWLC)
1223 if (oduUnpackPointer((PTR*)&recpReq, mBuf) != ROK)
1225 #if (ERRCLASS & ERRCLS_ADD_RES)
1226 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1227 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1228 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1230 TFU_FREE_MEM(recpReq);
1237 return ((*func)(pst, spId, recpReq));
1241 /***********************************************************
1243 * Func : cmPkTfuUlCqiInd
1246 * Desc : This API is used to indicate CQI reporting from PHY to Scheduler
1247 * @details This primitive carries an estimate of the uplink Channel quality
1248 * index (CQI) for a list of UEs. This is an extimate of the uplink channel
1249 * quality i.e. the transmission from UE as calculated at the Physical layer at
1251 * It carries a list of subband CQIs for each UE.
1252 * @param pst Pointer to the post structure.
1253 * @param suId SAP ID of the service user.
1254 * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
1255 * @return ROK/RFAILED
1264 **********************************************************/
1270 TfuUlCqiIndInfo * ulCqiInd
1273 S16 cmPkTfuUlCqiInd(pst, suId, ulCqiInd)
1276 TfuUlCqiIndInfo * ulCqiInd;
1279 Buffer *mBuf = NULLP;
1280 TRC3(cmPkTfuUlCqiInd)
1282 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1283 #if (ERRCLASS & ERRCLS_ADD_RES)
1284 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1285 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1286 (ErrVal)ETFU043, (ErrVal)0, "Packing failed");
1288 TFU_FREE_MEM(ulCqiInd);
1291 if (pst->selector == ODU_SELECTOR_LC) {
1292 if (cmPkTfuUlCqiIndInfo(ulCqiInd, mBuf) != ROK) {
1293 #if (ERRCLASS & ERRCLS_ADD_RES)
1294 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1295 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1296 (ErrVal)ETFU044, (ErrVal)0, "Packing failed");
1298 TFU_FREE_MEM(ulCqiInd);
1303 else if(pst->selector == ODU_SELECTOR_LWLC)
1305 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1312 TFU_FREE_MEM(ulCqiInd);
1318 if (SPkS16(suId, mBuf) != ROK) {
1319 #if (ERRCLASS & ERRCLS_ADD_RES)
1320 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1321 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1322 (ErrVal)ETFU045, (ErrVal)0, "Packing failed");
1324 TFU_FREE_MEM(ulCqiInd);
1328 if (pst->selector != ODU_SELECTOR_LWLC) {
1329 TFU_FREE_MEM(ulCqiInd);
1332 pst->event = (Event) EVTTFUULCQIIND;
1333 return (SPstTsk(pst,mBuf));
1337 /***********************************************************
1339 * Func : cmUnpkTfuUlCqiInd
1342 * Desc : This API is used to indicate CQI reporting from PHY to Scheduler
1343 * @details This primitive carries an estimate of the uplink Channel quality
1344 * index (CQI) for a list of UEs. This is an extimate of the uplink channel
1345 * quality i.e. the transmission from UE as calculated at the Physical layer at
1347 * It carries a list of subband CQIs for each UE.
1348 * @param pst Pointer to the post structure.
1349 * @param suId SAP ID of the service user.
1350 * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
1351 * @return ROK/RFAILED
1360 **********************************************************/
1362 S16 cmUnpkTfuUlCqiInd
1369 S16 cmUnpkTfuUlCqiInd(func, pst, mBuf)
1376 TfuUlCqiIndInfo *ulCqiInd;
1378 TRC3(cmUnpkTfuUlCqiInd)
1380 if (SUnpkS16(&suId, mBuf) != ROK) {
1382 #if (ERRCLASS & ERRCLS_ADD_RES)
1383 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1384 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1385 (ErrVal)ETFU046, (ErrVal)0, "Packing failed");
1389 if (pst->selector != ODU_SELECTOR_LWLC) {
1391 sMem.region = pst->region;
1392 sMem.pool = pst->pool;
1393 if ((cmAllocEvnt(sizeof(TfuUlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&ulCqiInd)) != ROK) {
1394 #if (ERRCLASS & ERRCLS_ADD_RES)
1395 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1396 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1397 (ErrVal)ETFU047, (ErrVal)0, "Packing failed");
1405 if (pst->selector == ODU_SELECTOR_LC)
1407 if (cmUnpkTfuUlCqiIndInfo(ulCqiInd, (Ptr)&ulCqiInd->memCp, mBuf) != ROK) {
1408 TFU_FREE_MEM(ulCqiInd);
1410 #if (ERRCLASS & ERRCLS_ADD_RES)
1411 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1412 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1413 (ErrVal)ETFU048, (ErrVal)0, "Packing failed");
1418 else if(pst->selector == ODU_SELECTOR_LWLC)
1420 if (oduUnpackPointer((PTR *)&ulCqiInd, mBuf) != ROK)
1422 #if (ERRCLASS & ERRCLS_ADD_RES)
1423 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1424 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1425 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1427 TFU_FREE_MEM(ulCqiInd);
1433 return ((*func)(pst, suId, ulCqiInd));
1437 /***********************************************************
1439 * Func : cmPkTfuHqInd
1442 * Desc : This Primitive carries the HARQ Feedback from PHY to scheduler
1443 * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
1444 * could successfully recieve the data transmitted by the eNodeB, else a NACK is
1445 * sent. This feedback is utilized by MAC for further scheduling, for instance
1446 * it could schedule an adaptive retransmission of the same data.
1449 * @param tfuHqInd pointer to TfuHqIndInfo
1459 **********************************************************/
1465 TfuHqIndInfo * hqInd
1468 S16 cmPkTfuHqInd(pst, spId, hqInd)
1471 TfuHqIndInfo * hqInd;
1474 Buffer *mBuf = NULLP;
1477 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1478 #if (ERRCLASS & ERRCLS_ADD_RES)
1479 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1480 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1481 (ErrVal)ETFU049, (ErrVal)0, "Packing failed");
1483 TFU_FREE_MEM(hqInd);
1486 if (pst->selector == ODU_SELECTOR_LC) {
1487 if (cmPkTfuHqIndInfo(hqInd, mBuf) != ROK) {
1488 #if (ERRCLASS & ERRCLS_ADD_RES)
1489 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1490 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1491 (ErrVal)ETFU050, (ErrVal)0, "Packing failed");
1493 TFU_FREE_MEM(hqInd);
1498 else if(pst->selector == ODU_SELECTOR_LWLC)
1500 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1507 TFU_FREE_MEM(hqInd);
1513 if (SPkS16(spId, mBuf) != ROK) {
1514 #if (ERRCLASS & ERRCLS_ADD_RES)
1515 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1516 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1517 (ErrVal)ETFU051, (ErrVal)0, "Packing failed");
1519 TFU_FREE_MEM(hqInd);
1523 if (pst->selector != ODU_SELECTOR_LWLC) {
1524 TFU_FREE_MEM(hqInd);
1527 pst->event = (Event) EVTTFUHQIND;
1528 return (SPstTsk(pst,mBuf));
1532 /***********************************************************
1534 * Func : cmUnpkTfuHqInd
1537 * Desc : This Primitive carries the HARQ Feedback from PHY to scheduler
1538 * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
1539 * could successfully recieve the data transmitted by the eNodeB, else a NACK is
1540 * sent. This feedback is utilized by MAC for further scheduling, for instance
1541 * it could schedule an adaptive retransmission of the same data.
1544 * @param tfuHqInd pointer to TfuHqIndInfo
1554 **********************************************************/
1563 S16 cmUnpkTfuHqInd(func, pst, mBuf)
1570 TfuHqIndInfo *hqInd;
1572 TRC3(cmUnpkTfuHqInd)
1574 if (SUnpkS16(&spId, mBuf) != ROK) {
1576 #if (ERRCLASS & ERRCLS_ADD_RES)
1577 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1578 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1579 (ErrVal)ETFU052, (ErrVal)0, "Packing failed");
1583 if (pst->selector != ODU_SELECTOR_LWLC) {
1585 sMem.region = pst->region;
1586 sMem.pool = pst->pool;
1587 if ((cmAllocEvnt(sizeof(TfuHqIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&hqInd)) != ROK) {
1588 #if (ERRCLASS & ERRCLS_ADD_RES)
1589 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1590 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1591 (ErrVal)ETFU053, (ErrVal)0, "Packing failed");
1599 if (pst->selector == ODU_SELECTOR_LC)
1601 if (cmUnpkTfuHqIndInfo(hqInd, (Ptr)&hqInd->memCp, mBuf) != ROK) {
1602 TFU_FREE_MEM(hqInd);
1604 #if (ERRCLASS & ERRCLS_ADD_RES)
1605 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1606 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1607 (ErrVal)ETFU054, (ErrVal)0, "Packing failed");
1612 else if(pst->selector == ODU_SELECTOR_LWLC)
1614 if (oduUnpackPointer((PTR *)&hqInd, mBuf) != ROK)
1616 #if (ERRCLASS & ERRCLS_ADD_RES)
1617 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1618 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1619 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1621 TFU_FREE_MEM(hqInd);
1627 return ((*func)(pst, spId, hqInd));
1631 /***********************************************************
1633 * Func : cmPkTfuSrInd
1636 * Desc : This Primitive carries the SR Indication from PHY to scheduler.
1637 * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
1638 * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
1639 * UEs received in the indicated subframe.
1642 * @param tfqSrInd pointer to TfuSrIndInfo
1652 **********************************************************/
1658 TfuSrIndInfo * srInd
1661 S16 cmPkTfuSrInd(pst, spId, srInd)
1664 TfuSrIndInfo * srInd;
1667 Buffer *mBuf = NULLP;
1670 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1671 #if (ERRCLASS & ERRCLS_ADD_RES)
1672 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1673 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1674 (ErrVal)ETFU055, (ErrVal)0, "Packing failed");
1676 TFU_FREE_MEM(srInd);
1679 if (pst->selector == ODU_SELECTOR_LC) {
1680 if (cmPkTfuSrIndInfo(srInd, mBuf) != ROK) {
1681 #if (ERRCLASS & ERRCLS_ADD_RES)
1682 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1683 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1684 (ErrVal)ETFU056, (ErrVal)0, "Packing failed");
1686 TFU_FREE_MEM(srInd);
1691 else if(pst->selector == ODU_SELECTOR_LWLC)
1693 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1700 TFU_FREE_MEM(srInd);
1706 if (SPkS16(spId, mBuf) != ROK) {
1707 #if (ERRCLASS & ERRCLS_ADD_RES)
1708 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1709 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1710 (ErrVal)ETFU057, (ErrVal)0, "Packing failed");
1712 TFU_FREE_MEM(srInd);
1716 if (pst->selector != ODU_SELECTOR_LWLC) {
1717 TFU_FREE_MEM(srInd);
1720 pst->event = (Event) EVTTFUSRIND;
1721 return (SPstTsk(pst,mBuf));
1725 /***********************************************************
1727 * Func : cmUnpkTfuSrInd
1730 * Desc : This Primitive carries the SR Indication from PHY to scheduler.
1731 * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
1732 * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
1733 * UEs received in the indicated subframe.
1736 * @param tfqSrInd pointer to TfuSrIndInfo
1746 **********************************************************/
1755 S16 cmUnpkTfuSrInd(func, pst, mBuf)
1762 TfuSrIndInfo *srInd;
1764 TRC3(cmUnpkTfuSrInd)
1766 if (SUnpkS16(&spId, mBuf) != ROK) {
1768 #if (ERRCLASS & ERRCLS_ADD_RES)
1769 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1770 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1771 (ErrVal)ETFU058, (ErrVal)0, "Packing failed");
1775 if (pst->selector != ODU_SELECTOR_LWLC) {
1777 sMem.region = pst->region;
1778 sMem.pool = pst->pool;
1779 if ((cmAllocEvnt(sizeof(TfuSrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srInd)) != ROK) {
1780 #if (ERRCLASS & ERRCLS_ADD_RES)
1781 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1782 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1783 (ErrVal)ETFU059, (ErrVal)0, "Packing failed");
1791 if (pst->selector == ODU_SELECTOR_LC)
1793 if (cmUnpkTfuSrIndInfo(srInd, (Ptr)&srInd->memCp, mBuf) != ROK) {
1794 TFU_FREE_MEM(srInd);
1796 #if (ERRCLASS & ERRCLS_ADD_RES)
1797 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1798 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1799 (ErrVal)ETFU060, (ErrVal)0, "Packing failed");
1804 else if(pst->selector == ODU_SELECTOR_LWLC)
1806 if (oduUnpackPointer((PTR *)&srInd, mBuf) != ROK)
1808 #if (ERRCLASS & ERRCLS_ADD_RES)
1809 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1810 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1811 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
1813 TFU_FREE_MEM(srInd);
1819 return ((*func)(pst, spId, srInd));
1823 /***********************************************************
1825 * Func : cmPkTfuDlCqiInd
1828 * Desc : This API is used to indicate the reception of CQI report from PHY to
1829 * Scheduler, also carries the RI.
1830 * @param pst Pointer to the post structure.
1831 * @param suId SAP ID of the service user.
1832 * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
1833 * @return ROK/RFAILED
1842 **********************************************************/
1848 TfuDlCqiIndInfo * dlCqiInd
1851 S16 cmPkTfuDlCqiInd(pst, suId, dlCqiInd)
1854 TfuDlCqiIndInfo * dlCqiInd;
1857 Buffer *mBuf = NULLP;
1858 TRC3(cmPkTfuDlCqiInd)
1860 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1861 #if (ERRCLASS & ERRCLS_ADD_RES)
1862 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1863 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1864 (ErrVal)ETFU061, (ErrVal)0, "Packing failed");
1866 TFU_FREE_MEM(dlCqiInd);
1869 if (pst->selector == ODU_SELECTOR_LC) {
1870 if (cmPkTfuDlCqiIndInfo(dlCqiInd, mBuf) != ROK) {
1871 #if (ERRCLASS & ERRCLS_ADD_RES)
1872 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1873 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1874 (ErrVal)ETFU062, (ErrVal)0, "Packing failed");
1876 TFU_FREE_MEM(dlCqiInd);
1881 else if(pst->selector == ODU_SELECTOR_LWLC)
1883 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
1890 TFU_FREE_MEM(dlCqiInd);
1896 if (SPkS16(suId, mBuf) != ROK) {
1897 #if (ERRCLASS & ERRCLS_ADD_RES)
1898 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1899 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1900 (ErrVal)ETFU063, (ErrVal)0, "Packing failed");
1902 TFU_FREE_MEM(dlCqiInd);
1906 if (pst->selector != ODU_SELECTOR_LWLC) {
1907 TFU_FREE_MEM(dlCqiInd);
1909 pst->event = (Event) EVTTFUDLCQIIND;
1910 return (SPstTsk(pst,mBuf));
1914 /***********************************************************
1916 * Func : cmUnpkTfuDlCqiInd
1919 * Desc : This API is used to indicate the reception of CQI report from PHY to
1920 * Scheduler, also carries the RI.
1921 * @param pst Pointer to the post structure.
1922 * @param suId SAP ID of the service user.
1923 * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
1924 * @return ROK/RFAILED
1933 **********************************************************/
1935 S16 cmUnpkTfuDlCqiInd
1942 S16 cmUnpkTfuDlCqiInd(func, pst, mBuf)
1949 TfuDlCqiIndInfo *dlCqiInd;
1951 TRC3(cmUnpkTfuDlCqiInd)
1953 if (SUnpkS16(&suId, mBuf) != ROK) {
1955 #if (ERRCLASS & ERRCLS_ADD_RES)
1956 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1957 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1958 (ErrVal)ETFU064, (ErrVal)0, "Packing failed");
1962 if (pst->selector != ODU_SELECTOR_LWLC) {
1964 sMem.region = pst->region;
1965 sMem.pool = pst->pool;
1966 if ((cmAllocEvnt(sizeof(TfuDlCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&dlCqiInd)) != ROK) {
1967 #if (ERRCLASS & ERRCLS_ADD_RES)
1968 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1969 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1970 (ErrVal)ETFU065, (ErrVal)0, "Packing failed");
1978 if (pst->selector == ODU_SELECTOR_LC)
1980 if (cmUnpkTfuDlCqiIndInfo(dlCqiInd, (Ptr)&dlCqiInd->memCp, mBuf) != ROK) {
1981 TFU_FREE_MEM(dlCqiInd);
1983 #if (ERRCLASS & ERRCLS_ADD_RES)
1984 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1985 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1986 (ErrVal)ETFU066, (ErrVal)0, "Packing failed");
1991 else if(pst->selector == ODU_SELECTOR_LWLC)
1993 if (oduUnpackPointer((PTR *)&dlCqiInd, mBuf) != ROK)
1995 #if (ERRCLASS & ERRCLS_ADD_RES)
1996 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1997 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1998 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2000 TFU_FREE_MEM(dlCqiInd);
2006 return ((*func)(pst, suId, dlCqiInd));
2013 /***********************************************************
2015 * Func : cmPkTfuRawCqiInd
2018 * Desc : This Primitive is used to convey the Raw CQI information
2019 * transmitted by the UE.
2020 * @details Raw CQI report is the actual bits transmitted by the UE when
2021 * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI
2022 * etc. shall be done by MAC.
2024 * @param pst Pointer to the post structure.
2025 * @param suId SAP ID of the service user.
2026 * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
2027 * @return ROK/RFAILED
2036 **********************************************************/
2038 S16 cmPkTfuRawCqiInd
2042 TfuRawCqiIndInfo * rawCqiInd
2045 S16 cmPkTfuRawCqiInd(pst, suId, rawCqiInd)
2048 TfuRawCqiIndInfo * rawCqiInd;
2051 Buffer *mBuf = NULLP;
2052 TRC3(cmPkTfuRawCqiInd)
2054 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2055 #if (ERRCLASS & ERRCLS_ADD_RES)
2056 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2057 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2058 (ErrVal)ETFU067, (ErrVal)0, "Packing failed");
2060 TFU_FREE_MEM(rawCqiInd);
2063 cmPkTfuRawCqiIndInfo(rawCqiInd, mBuf);
2064 if (SPkS16(suId, mBuf) != ROK) {
2065 #if (ERRCLASS & ERRCLS_ADD_RES)
2066 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2067 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2068 (ErrVal)ETFU068, (ErrVal)0, "Packing failed");
2070 TFU_FREE_MEM(rawCqiInd);
2074 TFU_FREE_MEM(rawCqiInd);
2075 pst->event = (Event) EVTTFURAWCQIIND;
2076 return (SPstTsk(pst,mBuf));
2080 /***********************************************************
2082 * Func : cmUnpkTfuRawCqiInd
2085 * Desc : This Primitive is used to convey the Raw CQI information
2086 * transmitted by the UE.
2087 * @details Raw CQI report is the actual bits transmitted by the UE when
2088 * reporting CQI/PMI/RI. The interpretation of these bits to CQI/subband CQI
2089 * etc. shall be done by MAC.
2091 * @param pst Pointer to the post structure.
2092 * @param suId SAP ID of the service user.
2093 * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
2094 * @return ROK/RFAILED
2103 **********************************************************/
2105 S16 cmUnpkTfuRawCqiInd
2112 S16 cmUnpkTfuRawCqiInd(func, pst, mBuf)
2119 TfuRawCqiIndInfo *rawCqiInd;
2121 TRC3(cmUnpkTfuRawCqiInd)
2123 if (SUnpkS16(&suId, mBuf) != ROK) {
2125 #if (ERRCLASS & ERRCLS_ADD_RES)
2126 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2127 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2128 (ErrVal)ETFU069, (ErrVal)0, "Packing failed");
2134 sMem.region = pst->region;
2135 sMem.pool = pst->pool;
2136 if ((cmAllocEvnt(sizeof(TfuRawCqiIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&rawCqiInd)) != ROK) {
2137 #if (ERRCLASS & ERRCLS_ADD_RES)
2138 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2139 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2140 (ErrVal)ETFU070, (ErrVal)0, "Packing failed");
2146 cmUnpkTfuRawCqiIndInfo(rawCqiInd, (Ptr)&rawCqiInd->memCp, mBuf);
2148 return ((*func)(pst, suId, rawCqiInd));
2152 /***********************************************************
2154 * Func : cmPkTfuSrsInd
2157 * Desc : This Primitive is used to convey the information derived by the
2158 * physical layer from the SRS transmission from the UE.
2159 * @details This primitive carries information derived from the SRS transmission
2162 * @param pst Pointer to the post structure.
2163 * @param suId SAP ID of the service user.
2164 * @param srsInd Pointer to the TfuSrIndInfo structure.
2165 * @return ROK/RFAILED
2174 **********************************************************/
2180 TfuSrsIndInfo * srsInd
2183 S16 cmPkTfuSrsInd(pst, suId, srsInd)
2186 TfuSrsIndInfo * srsInd;
2189 Buffer *mBuf = NULLP;
2192 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2193 #if (ERRCLASS & ERRCLS_ADD_RES)
2194 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2195 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2196 (ErrVal)ETFU071, (ErrVal)0, "Packing failed");
2198 TFU_FREE_MEM(srsInd);
2201 cmPkTfuSrsIndInfo(srsInd, mBuf);
2202 if (SPkS16(suId, mBuf) != ROK) {
2203 #if (ERRCLASS & ERRCLS_ADD_RES)
2204 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2205 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2206 (ErrVal)ETFU072, (ErrVal)0, "Packing failed");
2208 TFU_FREE_MEM(srsInd);
2212 TFU_FREE_MEM(srsInd);
2213 pst->event = (Event) EVTTFUSRSIND;
2214 return (SPstTsk(pst,mBuf));
2218 /***********************************************************
2220 * Func : cmUnpkTfuSrsInd
2223 * Desc : This Primitive is used to convey the information derived by the
2224 * physical layer from the SRS transmission from the UE.
2225 * @details This primitive carries information derived from the SRS transmission
2228 * @param pst Pointer to the post structure.
2229 * @param suId SAP ID of the service user.
2230 * @param srsInd Pointer to the TfuSrIndInfo structure.
2231 * @return ROK/RFAILED
2240 **********************************************************/
2249 S16 cmUnpkTfuSrsInd(func, pst, mBuf)
2256 TfuSrsIndInfo *srsInd;
2258 TRC3(cmUnpkTfuSrsInd)
2260 if (SUnpkS16(&suId, mBuf) != ROK) {
2262 #if (ERRCLASS & ERRCLS_ADD_RES)
2263 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2264 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2265 (ErrVal)ETFU073, (ErrVal)0, "Packing failed");
2271 sMem.region = pst->region;
2272 sMem.pool = pst->pool;
2273 if ((cmAllocEvnt(sizeof(TfuSrsIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&srsInd)) != ROK) {
2274 #if (ERRCLASS & ERRCLS_ADD_RES)
2275 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2276 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2277 (ErrVal)ETFU074, (ErrVal)0, "Packing failed");
2283 cmUnpkTfuSrsIndInfo(srsInd, (Ptr)&srsInd->memCp, mBuf);
2285 return ((*func)(pst, suId, srsInd));
2291 /***********************************************************
2293 * Func : cmPkTfuDatInd
2296 * Desc : This Primitive carries the Data PDUs from PHY to MAC.
2297 * @details The uplink Data i.e. the data transmitted by the UEs received by the
2298 * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2299 * is relayed to MAC using this primitive.
2302 * @param tfuDatInd pointer to TfuDatIndInfo
2312 **********************************************************/
2318 TfuDatIndInfo * datInd
2321 S16 cmPkTfuDatInd(pst, spId, datInd)
2324 TfuDatIndInfo * datInd;
2327 Buffer *mBuf = NULLP;
2330 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2331 #if (ERRCLASS & ERRCLS_ADD_RES)
2332 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2333 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2334 (ErrVal)ETFU075, (ErrVal)0, "Packing failed");
2336 TFU_FREE_MEM(datInd);
2339 if (pst->selector == ODU_SELECTOR_LC) {
2340 if (cmPkTfuDatIndInfo(datInd, mBuf) != ROK) {
2341 #if (ERRCLASS & ERRCLS_ADD_RES)
2342 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2343 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2344 (ErrVal)ETFU076, (ErrVal)0, "Packing failed");
2346 TFU_FREE_MEM(datInd);
2351 else if(pst->selector == ODU_SELECTOR_LWLC)
2353 if(oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2360 TFU_FREE_MEM(datInd);
2366 if (SPkS16(spId, mBuf) != ROK) {
2367 #if (ERRCLASS & ERRCLS_ADD_RES)
2368 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2369 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2370 (ErrVal)ETFU077, (ErrVal)0, "Packing failed");
2372 TFU_FREE_MEM(datInd);
2376 if (pst->selector != ODU_SELECTOR_LWLC) {
2377 TFU_FREE_MEM(datInd);
2380 pst->event = (Event) EVTTFUDATIND;
2381 return (SPstTsk(pst,mBuf));
2385 /***********************************************************
2387 * Func : cmUnpkTfuDatInd
2390 * Desc : This Primitive carries the Data PDUs from PHY to MAC.
2391 * @details The uplink Data i.e. the data transmitted by the UEs received by the
2392 * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2393 * is relayed to MAC using this primitive.
2396 * @param tfuDatInd pointer to TfuDatIndInfo
2406 **********************************************************/
2415 S16 cmUnpkTfuDatInd(func, pst, mBuf)
2422 TfuDatIndInfo *datInd;
2424 TRC3(cmUnpkTfuDatInd)
2426 if (SUnpkS16(&spId, mBuf) != ROK) {
2428 #if (ERRCLASS & ERRCLS_ADD_RES)
2429 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2430 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2431 (ErrVal)ETFU078, (ErrVal)0, "Packing failed");
2435 if (pst->selector != ODU_SELECTOR_LWLC) {
2437 sMem.region = pst->region;
2438 sMem.pool = pst->pool;
2439 if ((cmAllocEvnt(sizeof(TfuDatIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&datInd)) != ROK) {
2440 #if (ERRCLASS & ERRCLS_ADD_RES)
2441 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2442 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2443 (ErrVal)ETFU079, (ErrVal)0, "Packing failed");
2451 if (pst->selector == ODU_SELECTOR_LC)
2453 if (cmUnpkTfuDatIndInfo(datInd, (Ptr)&datInd->memCp, mBuf) != ROK) {
2454 TFU_FREE_MEM(datInd);
2456 #if (ERRCLASS & ERRCLS_ADD_RES)
2457 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2458 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2459 (ErrVal)ETFU080, (ErrVal)0, "Packing failed");
2464 else if(pst->selector == ODU_SELECTOR_LWLC)
2466 if(oduUnpackPointer((PTR *)&datInd, mBuf) != ROK)
2468 #if (ERRCLASS & ERRCLS_ADD_RES)
2469 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2470 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2471 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2473 TFU_FREE_MEM(datInd);
2479 return ((*func)(pst, spId, datInd));
2483 /***********************************************************
2485 * Func : cmPkTfuCrcInd
2488 * Desc : This API is used by the Physical layer to indicate if the CRC Check
2489 * on the PUSCH Data was successful or not.
2490 * @details This primitive carries CRC indication for a list of UEs. This
2491 * is utilized in the scenario where MAC requested the reception of uplink data
2492 * for a particular UE. On reception of the PUSCH data, the CRC check on it
2493 * failed. This CRC failure is indicated to MAC, which would utillize this
2494 * information for further scheduling.
2495 * Physical layer would indicate failure or success for each PUSCH transmission.
2496 * @param pst Pointer to the post structure.
2497 * @param suId SAP ID of the service user.
2498 * @param crcInd Pointer to the TfuCrcIndInfo.
2499 * @return ROK/RFAILED
2508 **********************************************************/
2514 TfuCrcIndInfo * crcIndInfo
2517 S16 cmPkTfuCrcInd(pst, suId, crcIndInfo)
2520 TfuCrcIndInfo * crcIndInfo;
2523 Buffer *mBuf = NULLP;
2526 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2527 #if (ERRCLASS & ERRCLS_ADD_RES)
2528 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2529 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2530 (ErrVal)ETFU081, (ErrVal)0, "Packing failed");
2532 TFU_FREE_MEM(crcIndInfo);
2535 if (pst->selector == ODU_SELECTOR_LC) {
2536 if (cmPkTfuCrcIndInfo(crcIndInfo, mBuf) != ROK) {
2537 #if (ERRCLASS & ERRCLS_ADD_RES)
2538 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2539 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2540 (ErrVal)ETFU082, (ErrVal)0, "Packing failed");
2542 TFU_FREE_MEM(crcIndInfo);
2547 else if(pst->selector == ODU_SELECTOR_LWLC)
2549 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2556 TFU_FREE_MEM(crcIndInfo);
2563 if (SPkS16(suId, mBuf) != ROK) {
2564 #if (ERRCLASS & ERRCLS_ADD_RES)
2565 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2566 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2567 (ErrVal)ETFU083, (ErrVal)0, "Packing failed");
2569 TFU_FREE_MEM(crcIndInfo);
2573 if (pst->selector != ODU_SELECTOR_LWLC) {
2574 TFU_FREE_MEM(crcIndInfo);
2577 pst->event = (Event) EVTTFUCRCIND;
2578 return (SPstTsk(pst,mBuf));
2582 /***********************************************************
2584 * Func : cmUnpkTfuCrcInd
2587 * Desc : This API is used by the Physical layer to indicate if the CRC Check
2588 * on the PUSCH Data was successful or not.
2589 * @details This primitive carries CRC indication for a list of UEs. This
2590 * is utilized in the scenario where MAC requested the reception of uplink data
2591 * for a particular UE. On reception of the PUSCH data, the CRC check on it
2592 * failed. This CRC failure is indicated to MAC, which would utillize this
2593 * information for further scheduling.
2594 * Physical layer would indicate failure or success for each PUSCH transmission.
2595 * @param pst Pointer to the post structure.
2596 * @param suId SAP ID of the service user.
2597 * @param crcInd Pointer to the TfuCrcIndInfo.
2598 * @return ROK/RFAILED
2607 **********************************************************/
2616 S16 cmUnpkTfuCrcInd(func, pst, mBuf)
2623 TfuCrcIndInfo *crcIndInfo;
2625 TRC3(cmUnpkTfuCrcInd)
2627 if (SUnpkS16(&suId, mBuf) != ROK) {
2629 #if (ERRCLASS & ERRCLS_ADD_RES)
2630 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2631 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2632 (ErrVal)ETFU084, (ErrVal)0, "Packing failed");
2636 if (pst->selector != ODU_SELECTOR_LWLC) {
2638 sMem.region = pst->region;
2639 sMem.pool = pst->pool;
2640 if ((cmAllocEvnt(sizeof(TfuCrcIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&crcIndInfo)) != ROK) {
2641 #if (ERRCLASS & ERRCLS_ADD_RES)
2642 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2643 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2644 (ErrVal)ETFU085, (ErrVal)0, "Packing failed");
2652 if (pst->selector == ODU_SELECTOR_LC)
2654 if (cmUnpkTfuCrcIndInfo(crcIndInfo, (Ptr)&crcIndInfo->memCp, mBuf) != ROK) {
2655 TFU_FREE_MEM(crcIndInfo);
2657 #if (ERRCLASS & ERRCLS_ADD_RES)
2658 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2659 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2660 (ErrVal)ETFU086, (ErrVal)0, "Packing failed");
2665 else if(pst->selector == ODU_SELECTOR_LWLC)
2667 if (oduUnpackPointer((PTR *)&crcIndInfo, mBuf) != ROK)
2669 #if (ERRCLASS & ERRCLS_ADD_RES)
2670 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2671 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2672 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2674 TFU_FREE_MEM(crcIndInfo);
2680 return ((*func)(pst, suId, crcIndInfo));
2684 /***********************************************************
2686 * Func : cmPkTfuTimingAdvInd
2689 * Desc : This API is used to indicate a Timing Advance from PHY to Scheduler .
2690 * @details This primitive carries timing advance information for a number of
2691 * UEs that may need timing advance. Timing advance information is an estimate
2692 * of the timing adjustment that a UE would need to apply in order to be
2693 * synchronized in uplink. This estimate is to be calculated by physical layer.
2694 * @param pst Pointer to the post structure.
2695 * @param suId SAP ID of the service user.
2696 * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2697 * @return ROK/RFAILED
2706 **********************************************************/
2708 S16 cmPkTfuTimingAdvInd
2712 TfuTimingAdvIndInfo * timingAdvInd
2715 S16 cmPkTfuTimingAdvInd(pst, suId, timingAdvInd)
2718 TfuTimingAdvIndInfo * timingAdvInd;
2721 Buffer *mBuf = NULLP;
2722 TRC3(cmPkTfuTimingAdvInd)
2724 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2725 #if (ERRCLASS & ERRCLS_ADD_RES)
2726 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2727 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2728 (ErrVal)ETFU087, (ErrVal)0, "Packing failed");
2730 TFU_FREE_MEM(timingAdvInd);
2733 if (pst->selector == ODU_SELECTOR_LC) {
2734 if (cmPkTfuTimingAdvIndInfo(timingAdvInd, mBuf) != ROK) {
2735 #if (ERRCLASS & ERRCLS_ADD_RES)
2736 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2737 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2738 (ErrVal)ETFU088, (ErrVal)0, "Packing failed");
2740 TFU_FREE_MEM(timingAdvInd);
2745 else if(pst->selector == ODU_SELECTOR_LWLC)
2747 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2754 TFU_FREE_MEM(timingAdvInd);
2760 if (SPkS16(suId, mBuf) != ROK) {
2761 #if (ERRCLASS & ERRCLS_ADD_RES)
2762 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2763 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2764 (ErrVal)ETFU089, (ErrVal)0, "Packing failed");
2766 TFU_FREE_MEM(timingAdvInd);
2770 if (pst->selector != ODU_SELECTOR_LWLC) {
2771 TFU_FREE_MEM(timingAdvInd);
2774 pst->event = (Event) EVTTFUTIMINGADVIND;
2775 return (SPstTsk(pst,mBuf));
2779 /***********************************************************
2781 * Func : cmUnpkTfuTimingAdvInd
2784 * Desc : This API is used to indicate a Timing Advance from PHY to Scheduler .
2785 * @details This primitive carries timing advance information for a number of
2786 * UEs that may need timing advance. Timing advance information is an estimate
2787 * of the timing adjustment that a UE would need to apply in order to be
2788 * synchronized in uplink. This estimate is to be calculated by physical layer.
2789 * @param pst Pointer to the post structure.
2790 * @param suId SAP ID of the service user.
2791 * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2792 * @return ROK/RFAILED
2801 **********************************************************/
2803 S16 cmUnpkTfuTimingAdvInd
2805 TfuTimingAdvInd func,
2810 S16 cmUnpkTfuTimingAdvInd(func, pst, mBuf)
2811 TfuTimingAdvInd func;
2817 TfuTimingAdvIndInfo *timingAdvInd;
2819 TRC3(cmUnpkTfuTimingAdvInd)
2821 if (SUnpkS16(&suId, mBuf) != ROK) {
2823 #if (ERRCLASS & ERRCLS_ADD_RES)
2824 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2825 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2826 (ErrVal)ETFU090, (ErrVal)0, "Packing failed");
2830 if (pst->selector != ODU_SELECTOR_LWLC) {
2832 sMem.region = pst->region;
2833 sMem.pool = pst->pool;
2834 if ((cmAllocEvnt(sizeof(TfuTimingAdvIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&timingAdvInd)) != ROK) {
2835 #if (ERRCLASS & ERRCLS_ADD_RES)
2836 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2837 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2838 (ErrVal)ETFU091, (ErrVal)0, "Packing failed");
2846 if (pst->selector == ODU_SELECTOR_LC)
2848 if (cmUnpkTfuTimingAdvIndInfo(timingAdvInd, (Ptr)&timingAdvInd->memCp, mBuf) != ROK) {
2849 TFU_FREE_MEM(timingAdvInd);
2851 #if (ERRCLASS & ERRCLS_ADD_RES)
2852 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2853 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2854 (ErrVal)ETFU092, (ErrVal)0, "Packing failed");
2859 else if(pst->selector == ODU_SELECTOR_LWLC)
2861 if (oduUnpackPointer((PTR *)&timingAdvInd, mBuf) != ROK)
2863 #if (ERRCLASS & ERRCLS_ADD_RES)
2864 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2865 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2866 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
2868 TFU_FREE_MEM(timingAdvInd);
2874 return ((*func)(pst, suId, timingAdvInd));
2878 /***********************************************************
2880 * Func : cmPkTfuDatReq
2883 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
2885 * @details The data being sent in this primitive is meant to be transmitted on
2886 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
2887 * layer processing, requisite control information is also sent along with the
2889 * @sa TfUiTfuCntrlReq
2892 * @param tfuDatReq pointer to TfuDatReqInfo
2902 **********************************************************/
2908 TfuDatReqInfo * datReq
2911 S16 cmPkTfuDatReq(pst, spId, datReq)
2914 TfuDatReqInfo * datReq;
2917 Buffer *mBuf = NULLP;
2920 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2921 #if (ERRCLASS & ERRCLS_ADD_RES)
2922 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2923 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2924 (ErrVal)ETFU093, (ErrVal)0, "Packing failed");
2926 TFU_FREE_MEM(datReq);
2929 if (pst->selector == ODU_SELECTOR_LC) {
2930 if (cmPkTfuDatReqInfo(datReq, mBuf) != ROK) {
2931 #if (ERRCLASS & ERRCLS_ADD_RES)
2932 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2933 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2934 (ErrVal)ETFU094, (ErrVal)0, "Packing failed");
2936 TFU_FREE_MEM(datReq);
2941 else if(pst->selector == ODU_SELECTOR_LWLC)
2943 if(oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
2950 TFU_FREE_MEM(datReq);
2956 if (SPkS16(spId, mBuf) != ROK) {
2957 #if (ERRCLASS & ERRCLS_ADD_RES)
2958 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2959 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2960 (ErrVal)ETFU095, (ErrVal)0, "Packing failed");
2962 TFU_FREE_MEM(datReq);
2966 if (pst->selector != ODU_SELECTOR_LWLC) {
2967 TFU_FREE_MEM(datReq);
2970 pst->event = (Event) EVTTFUDATREQ;
2971 return (SPstTsk(pst,mBuf));
2975 /***********************************************************
2977 * Func : cmUnpkTfuDatReq
2980 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
2982 * @details The data being sent in this primitive is meant to be transmitted on
2983 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
2984 * layer processing, requisite control information is also sent along with the
2986 * @sa TfUiTfuCntrlReq
2989 * @param tfuDatReq pointer to TfuDatReqInfo
2999 **********************************************************/
3008 S16 cmUnpkTfuDatReq(func, pst, mBuf)
3015 TfuDatReqInfo *datReq;
3017 TRC3(cmUnpkTfuDatReq)
3019 if (SUnpkS16(&spId, mBuf) != ROK) {
3021 #if (ERRCLASS & ERRCLS_ADD_RES)
3022 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3023 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3024 (ErrVal)ETFU096, (ErrVal)0, "Packing failed");
3028 if (pst->selector != ODU_SELECTOR_LWLC) {
3030 sMem.region = pst->region;
3031 sMem.pool = pst->pool;
3032 if ((cmAllocEvnt(sizeof(TfuDatReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&datReq)) != ROK) {
3033 #if (ERRCLASS & ERRCLS_ADD_RES)
3034 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3035 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3036 (ErrVal)ETFU097, (ErrVal)0, "Packing failed");
3044 if (pst->selector == ODU_SELECTOR_LC)
3046 if (cmUnpkTfuDatReqInfo(datReq, (Ptr)&datReq->memCp, mBuf) != ROK) {
3047 TFU_FREE_MEM(datReq);
3049 #if (ERRCLASS & ERRCLS_ADD_RES)
3050 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3051 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3052 (ErrVal)ETFU098, (ErrVal)0, "Unpacking failed");
3057 else if (pst->selector == ODU_SELECTOR_LWLC)
3059 if(oduUnpackPointer((PTR *)&datReq, 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)ETFUXXX, (ErrVal)0, "LWLC Un-Packing failed");
3072 return ((*func)(pst, spId, datReq));
3076 /***********************************************************
3078 * Func : cmPkTfuCntrlReq
3081 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
3082 * all the control information
3083 * @details This primitive carries the information sent on the following
3091 * @param cntrlReq pointer to TfuCntrlReqInfo
3092 * @return ROK/RFAILED
3101 **********************************************************/
3107 TfuCntrlReqInfo * cntrlReq
3110 S16 cmPkTfuCntrlReq(pst, spId, cntrlReq)
3113 TfuCntrlReqInfo * cntrlReq;
3116 Buffer *mBuf = NULLP;
3117 TRC3(cmPkTfuCntrlReq)
3119 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3120 #if (ERRCLASS & ERRCLS_ADD_RES)
3121 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3122 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3123 (ErrVal)ETFU099, (ErrVal)0, "Packing failed");
3125 TFU_FREE_MEM(cntrlReq);
3128 if (pst->selector == ODU_SELECTOR_LC) {
3129 if (cmPkTfuCntrlReqInfo(cntrlReq, mBuf) != ROK) {
3130 #if (ERRCLASS & ERRCLS_ADD_RES)
3131 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3132 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3133 (ErrVal)ETFU100, (ErrVal)0, "Packing failed");
3135 TFU_FREE_MEM(cntrlReq);
3140 else if(pst->selector == ODU_SELECTOR_LWLC)
3142 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3149 TFU_FREE_MEM(cntrlReq);
3156 if (SPkS16(spId, mBuf) != ROK) {
3157 #if (ERRCLASS & ERRCLS_ADD_RES)
3158 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3159 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3160 (ErrVal)ETFU101, (ErrVal)0, "Packing failed");
3162 TFU_FREE_MEM(cntrlReq);
3166 if (pst->selector != ODU_SELECTOR_LWLC) {
3167 TFU_FREE_MEM(cntrlReq);
3170 pst->event = (Event) EVTTFUCNTRLREQ;
3171 return (SPstTsk(pst,mBuf));
3175 /***********************************************************
3177 * Func : cmUnpkTfuCntrlReq
3180 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
3181 * all the control information
3182 * @details This primitive carries the information sent on the following
3190 * @param cntrlReq pointer to TfuCntrlReqInfo
3191 * @return ROK/RFAILED
3200 **********************************************************/
3202 S16 cmUnpkTfuCntrlReq
3209 S16 cmUnpkTfuCntrlReq(func, pst, mBuf)
3216 TfuCntrlReqInfo *cntrlReq;
3218 TRC3(cmUnpkTfuCntrlReq)
3220 if (SUnpkS16(&spId, mBuf) != ROK) {
3222 #if (ERRCLASS & ERRCLS_ADD_RES)
3223 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3224 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3225 (ErrVal)ETFU102, (ErrVal)0, "Packing failed");
3229 if (pst->selector != ODU_SELECTOR_LWLC) {
3231 sMem.region = pst->region;
3232 sMem.pool = pst->pool;
3233 if ((cmAllocEvnt(sizeof(TfuCntrlReqInfo), TFU_BLKSZ, &sMem, (Ptr *)&cntrlReq)) != ROK) {
3234 #if (ERRCLASS & ERRCLS_ADD_RES)
3235 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3236 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3237 (ErrVal)ETFU103, (ErrVal)0, "Packing failed");
3245 if (pst->selector == ODU_SELECTOR_LC)
3247 if (cmUnpkTfuCntrlReqInfo(cntrlReq, (Ptr)&cntrlReq->memCp, mBuf) != ROK) {
3248 TFU_FREE_MEM(cntrlReq);
3250 #if (ERRCLASS & ERRCLS_ADD_RES)
3251 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3252 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3253 (ErrVal)ETFU104, (ErrVal)0, "Packing failed");
3258 else if(pst->selector == ODU_SELECTOR_LWLC)
3260 if (oduUnpackPointer((PTR *)&cntrlReq, mBuf) != ROK)
3262 #if (ERRCLASS & ERRCLS_ADD_RES)
3263 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3264 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3265 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
3267 TFU_FREE_MEM(cntrlReq);
3273 return ((*func)(pst, spId, cntrlReq));
3278 /***********************************************************
3280 * Func : cmPkTfuTtiInd
3283 * Desc : This API is the TTI indication from PHY to MAC .
3284 * @details This primitive provides the timing information (SFN and subframe)
3285 * which is currently running on the physical layer.
3286 * @param pst Pointer to the post structure.
3287 * @param suId SAP ID of the service user.
3288 * @param ttiInd Pointer to the TfuTtiIndInfo.
3289 * @return ROK/RFAILED
3298 **********************************************************/
3304 TfuTtiIndInfo * ttiInd
3307 S16 cmPkTfuTtiInd(pst, suId, ttiInd)
3310 TfuTtiIndInfo * ttiInd;
3313 Buffer *mBuf = NULLP;
3316 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3317 #if (ERRCLASS & ERRCLS_ADD_RES)
3318 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3319 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3320 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
3322 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3325 if (pst->selector == ODU_SELECTOR_LC) {
3326 if (cmPkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
3327 #if (ERRCLASS & ERRCLS_ADD_RES)
3328 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3329 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3330 (ErrVal)ETFU106, (ErrVal)0, "Packing failed");
3332 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3337 else if(pst->selector == ODU_SELECTOR_LWLC)
3339 if (oduPackPointer((PTR)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)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3347 /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/
3348 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3354 if (SPkS16(suId, 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)ETFU107, (ErrVal)0, "Packing failed");
3360 SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
3364 if (pst->selector != ODU_SELECTOR_LWLC) {
3365 if (SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)) != ROK) {
3366 #if (ERRCLASS & ERRCLS_ADD_RES)
3367 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3368 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3369 (ErrVal)ETFU108, (ErrVal)0, "Packing failed");
3376 //pst->event = (Event) EVENT_SLOT_IND_TO_MAC;
3377 return (SPstTsk(pst,mBuf));
3380 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
3381 /***********************************************************
3383 * Func : cmPkTfuNonRtInd
3386 * Desc : This API is the Non-Rt indication from CL to MAC .
3387 * @param pst Pointer to the post structure.
3388 * @param suId SAP ID of the service user.
3389 * @return ROK/RFAILED
3398 **********************************************************/
3406 S16 cmPkTfuNonRtInd(pst, suId)
3411 Buffer *mBuf = NULLP;
3412 TRC3(cmPkTfuNonRtInd)
3414 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3415 #if (ERRCLASS & ERRCLS_ADD_RES)
3416 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3417 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3418 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
3422 if (SPkS16(suId, mBuf) != ROK) {
3423 #if (ERRCLASS & ERRCLS_ADD_RES)
3424 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3425 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3426 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
3431 pst->event = (Event) EVTTFUNONRTIND;
3432 return (SPstTsk(pst,mBuf));
3435 /***********************************************************
3437 * Func : cmUnpkTfuNonRtInd
3440 * Desc : This API is the Non Rt indication from PHY to MAC .
3441 * @param pst Pointer to the post structure.
3442 * @param suId SAP ID of the service user.
3443 * @return ROK/RFAILED
3452 **********************************************************/
3454 S16 cmUnpkTfuNonRtInd
3461 S16 cmUnpkTfuNonRtInd(func, pst, mBuf)
3468 TRC3(cmUnpkTfuNonRtInd)
3470 if (SUnpkS16(&suId, mBuf) != ROK) {
3472 #if (ERRCLASS & ERRCLS_ADD_RES)
3473 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3474 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3475 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
3480 return ((*func)(pst, suId));
3486 /***********************************************************
3488 * Func : cmPkTfuPucchDeltaPwr
3491 * Desc : This Primitive is used to convey PUCCH Delta power calculated by the
3493 * This information is utilized by Scheduler for power control.
3494 * @param pst Pointer to the post structure.
3495 * @param suId SAP ID of the service user.
3496 * @param Pointer to the TfuPucchDeltaPwrIndInfo structure.
3497 * @return ROK/RFAILED
3506 **********************************************************/
3508 S16 cmPkTfuPucchDeltaPwr
3512 TfuPucchDeltaPwrIndInfo * pucchDeltaPwr
3515 S16 cmPkTfuPucchDeltaPwr(pst, suId, pucchDeltaPwr)
3518 TfuPucchDeltaPwrIndInfo * pucchDeltaPwr;
3521 Buffer *mBuf = NULLP;
3522 TRC3(cmPkTfuPucchDeltaPwr)
3524 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3525 #if (ERRCLASS & ERRCLS_ADD_RES)
3526 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3527 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3528 (ErrVal)ETFU119, (ErrVal)0, "Packing failed");
3530 SPutSBuf(pst->region, pst->pool, (Data *)pucchDeltaPwr, sizeof(TfuPucchDeltaPwrIndInfo));
3533 if (pst->selector == ODU_SELECTOR_LC) {
3534 if (cmPkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, mBuf) != ROK) {
3535 #if (ERRCLASS & ERRCLS_ADD_RES)
3536 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3537 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3538 (ErrVal)ETFU120, (ErrVal)0, "Packing failed");
3540 TFU_FREE_MEM(pucchDeltaPwr);
3545 else if(pst->selector == ODU_SELECTOR_LWLC)
3547 if (oduPackPointer((PTR)pucchDeltaPwr, mBuf) != ROK)
3549 #if (ERRCLASS & ERRCLS_ADD_RES)
3550 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3551 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3552 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
3554 TFU_FREE_MEM(pucchDeltaPwr);
3560 if (SPkS16(suId, mBuf) != ROK) {
3561 #if (ERRCLASS & ERRCLS_ADD_RES)
3562 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3563 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3564 (ErrVal)ETFU121, (ErrVal)0, "Packing failed");
3566 TFU_FREE_MEM(pucchDeltaPwr);
3570 if (pst->selector != ODU_SELECTOR_LWLC) {
3571 TFU_FREE_MEM(pucchDeltaPwr);
3573 pst->event = (Event) EVTTFUPUCCHDELPWR;
3574 return (SPstTsk(pst,mBuf));
3578 /***********************************************************
3580 * Func : cmUnpkTfuPucchDeltaPwr
3583 * Desc : This Primitive is used to convey PUCCH Delta power calculated by the
3585 * This information is utilized by Scheduler for power control.
3586 * @param pst Pointer to the post structure.
3587 * @param suId SAP ID of the service user.
3588 * @param Pointer to the TfuPucchDeltaPwrIndInfo structure.
3589 * @return ROK/RFAILED
3598 **********************************************************/
3600 S16 cmUnpkTfuPucchDeltaPwr
3602 TfuPucchDeltaPwrInd func,
3607 S16 cmUnpkTfuPucchDeltaPwr(func, pst, mBuf)
3608 TfuPucchDeltaPwrInd func;
3614 TfuPucchDeltaPwrIndInfo *pucchDeltaPwr;
3616 TRC3(cmUnpkTfuPucchDeltaPwr)
3618 if (SUnpkS16(&suId, mBuf) != ROK) {
3620 #if (ERRCLASS & ERRCLS_ADD_RES)
3621 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3622 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3623 (ErrVal)ETFU122, (ErrVal)0, "Packing failed");
3627 if (pst->selector != ODU_SELECTOR_LWLC) {
3629 sMem.region = pst->region;
3630 sMem.pool = pst->pool;
3631 if ((cmAllocEvnt(sizeof(TfuPucchDeltaPwrIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&pucchDeltaPwr)) != ROK) {
3632 #if (ERRCLASS & ERRCLS_ADD_RES)
3633 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3634 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3635 (ErrVal)ETFU123, (ErrVal)0, "Packing failed");
3642 if (pst->selector == ODU_SELECTOR_LC)
3644 if (cmUnpkTfuPucchDeltaPwrIndInfo(pucchDeltaPwr, (Ptr)&pucchDeltaPwr->memCp, mBuf) != ROK) {
3645 TFU_FREE_MEM(pucchDeltaPwr);
3647 #if (ERRCLASS & ERRCLS_ADD_RES)
3648 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3649 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3650 (ErrVal)ETFU124, (ErrVal)0, "Packing failed");
3655 else if(pst->selector == ODU_SELECTOR_LWLC)
3657 if (oduUnpackPointer((PTR *)&pucchDeltaPwr, 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 un-Packing failed");
3664 TFU_FREE_MEM(pucchDeltaPwr);
3670 return ((*func)(pst, suId, pucchDeltaPwr));
3675 /***********************************************************
3677 * Func : cmPkTfuRbAssignA1Val324
3680 * Desc : This structure contains the information needed to convey RIV value 324.
3689 **********************************************************/
3691 S16 cmPkTfuRbAssignA1Val324
3693 TfuRbAssignA1Val324 *param,
3697 S16 cmPkTfuRbAssignA1Val324(param, mBuf)
3698 TfuRbAssignA1Val324 *param;
3703 TRC3(cmPkTfuRbAssignA1Val324)
3705 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
3706 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
3707 CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf);
3709 printf("cmPkTfuRbAssignA1Val324 param->ndi %d mcs %d param->hqProcId %d \n",param->ndi,param->mcs,param->hqProcId);
3715 /***********************************************************
3717 * Func : cmPkTfuRbAssignB1Val324
3720 * Desc : This structure contains the information needed to convey RIV value 324.
3729 **********************************************************/
3731 S16 cmPkTfuRbAssignB1Val324
3733 TfuRbAssignB1Val324 *param,
3737 S16 cmPkTfuRbAssignB1Val324(param, mBuf)
3738 TfuRbAssignB1Val324 *param;
3743 TRC3(cmPkTfuRbAssignB1Val324)
3745 CMCHKPK(oduUnpackUInt8, param->bmiHqAckNack, mBuf);
3746 CMCHKPK(oduUnpackUInt8, param->RV, mBuf);
3747 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
3748 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
3749 CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf);
3754 /***********************************************************
3756 * Func : cmPkTfuRbAssignVal326
3759 * Desc : This structure contains the information needed to convey RIV value 326.
3768 **********************************************************/
3770 S16 cmPkTfuRbAssignVal326
3772 TfuRbAssignVal326 *param,
3776 S16 cmPkTfuRbAssignVal326(param, mBuf)
3777 TfuRbAssignVal326 *param;
3782 TRC3(cmPkTfuRbAssignVal326)
3784 CMCHKPK(oduUnpackUInt8, param->CyclicShiftInd, mBuf);
3785 CMCHKPK(oduUnpackUInt8, param->OCCInd, mBuf);
3786 CMCHKPK(oduUnpackUInt8, param->FreqBandIdx, mBuf);
3791 /***********************************************************
3793 * Func : cmUnpkTfuRbAssignA1Val324
3796 * Desc : This structure contains the information needed to convey RIV value 324.
3805 **********************************************************/
3807 S16 cmUnpkTfuRbAssignA1Val324
3809 TfuRbAssignA1Val324 *param,
3813 S16 cmUnpkTfuRbAssignA1Val324(param, mBuf)
3814 TfuRbAssignA1Val324 *param;
3819 TRC3(cmUnpkTfuRbAssignA1Val324)
3821 CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf);
3822 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
3823 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
3828 /***********************************************************
3830 * Func : cmUnpkTfuRbAssignB1Val324
3833 * Desc : This structure contains the information needed to convey RIV value 324.
3842 **********************************************************/
3844 S16 cmUnpkTfuRbAssignB1Val324
3846 TfuRbAssignB1Val324 *param,
3850 S16 cmUnpkTfuRbAssignB1Val324(param, mBuf)
3851 TfuRbAssignB1Val324 *param;
3856 TRC3(cmUnpkTfuRbAssignB1Val324)
3858 CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf);
3859 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
3860 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
3861 CMCHKUNPK(oduPackUInt8, ¶m->RV, mBuf);
3862 CMCHKUNPK(oduPackUInt8, ¶m->bmiHqAckNack, mBuf);
3867 /***********************************************************
3869 * Func : cmUnpkTfuRbAssignVal326
3872 * Desc : This structure contains the information needed to convey RIV value 326.
3881 **********************************************************/
3883 S16 cmUnpkTfuRbAssignVal326
3885 TfuRbAssignVal326 *param,
3889 S16 cmUnpkTfuRbAssignVal326(param, mBuf)
3890 TfuRbAssignVal326 *param;
3895 TRC3(cmUnpkTfuRbAssignVal326)
3897 CMCHKUNPK(oduPackUInt8, ¶m->FreqBandIdx, mBuf);
3898 CMCHKUNPK(oduPackUInt8, ¶m->OCCInd, mBuf);
3899 CMCHKUNPK(oduPackUInt8, ¶m->CyclicShiftInd, mBuf);
3905 /***********************************************************
3907 * Func : cmPkTfuDciFormatA1A2Info
3910 * Desc : This structure contains the information needed to convey DCI format A1/A2.
3919 **********************************************************/
3921 S16 cmPkTfuDciFormatA1A2Info
3923 TfuDciFormatA1Info *param,
3927 S16 cmPkTfuDciFormatA1A2Info(param, mBuf)
3928 TfuDciFormatA1Info *param;
3933 TRC3(cmPkTfuDciFormatA1A2Info)
3935 //printf("5GTF_DBG: cmPkTfuDciFormatA1Info() called by eNB\n");
3936 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
3937 CMCHKPK(oduUnpackUInt8, param->UL_PCRS, mBuf);
3938 CMCHKPK(oduUnpackUInt8, param->PMI, mBuf);
3939 CMCHKPK(oduUnpackUInt8, param->SCID, mBuf);
3941 CMCHKPK(oduUnpackUInt8, param->REMapIdx_DMRS_PCRS_numLayers, mBuf);
3942 CMCHKPK(oduUnpackUInt8, param->SRS_Symbol, mBuf);
3943 CMCHKPK(oduUnpackUInt8, param->SRS_Config, mBuf);
3944 CMCHKPK(oduUnpackUInt8, param->beamSwitch, mBuf);
3945 CMCHKPK(oduUnpackUInt8, param->uciOnxPUSCH, mBuf);
3947 CMCHKPK(oduUnpackUInt8, param->numBSI_Reports, mBuf);
3948 CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_ProcInd, mBuf);
3949 CMCHKPK(oduUnpackUInt8, param->CSI_BRRS_Indicator, mBuf);
3950 CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_SymbIdx, mBuf);
3951 CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_TxTiming, mBuf);
3952 CMCHKPK(oduUnpackUInt8, param->CSI_BSI_BRI_Req, mBuf);
3954 if(param->RBAssign <= TFU_RIV_324)
3956 CMCHKPK(cmPkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf);
3958 else if (param->RBAssign == TFU_RIV_326)
3960 CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
3963 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
3964 CMCHKPK(oduUnpackUInt8, param->symbIdx, mBuf);
3965 CMCHKPK(oduUnpackUInt8, param->beamIndex, mBuf);
3966 CMCHKPK(oduUnpackUInt16, param->RBAssign, mBuf);
3967 CMCHKPK(oduUnpackUInt8, param->xPUSCH_TxTiming, mBuf);
3968 CMCHKPK(oduUnpackUInt8, param->xPUSCHRange, mBuf);
3969 CMCHKPK(oduUnpackUInt8, param->formatType, mBuf);
3974 /***********************************************************
3976 * Func : cmPkTfuDciFormatB1B2Info
3979 * Desc : This structure contains the information needed to convey DCI format B1/B2.
3988 **********************************************************/
3990 S16 cmPkTfuDciFormatB1B2Info
3992 TfuDciFormatB1Info *param,
3996 S16 cmPkTfuDciFormatB1B2Info(param, mBuf)
3997 TfuDciFormatB1Info *param;
4002 TRC3(cmPkTfuDciFormatB1B2Info)
4004 CMCHKPK(oduUnpackUInt8, param->DL_PCRS, mBuf);
4005 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
4006 CMCHKPK(oduUnpackUInt8, param->SCID, mBuf);
4008 CMCHKPK(oduUnpackUInt8, param->AntPorts_numLayers, mBuf);
4009 CMCHKPK(oduUnpackUInt8, param->SRS_Symbol, mBuf);
4010 CMCHKPK(oduUnpackUInt8, param->SRS_Config, mBuf);
4011 CMCHKPK(oduUnpackUInt8, param->beamSwitch, mBuf);
4012 CMCHKPK(oduUnpackUInt8, param->freqResIdx_xPUCCH, mBuf);
4014 CMCHKPK(oduUnpackUInt8, param->xPUCCH_TxTiming, mBuf);
4016 CMCHKPK(oduUnpackUInt8, param->numBSI_Reports, mBuf);
4017 CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_ProcInd, mBuf);
4018 CMCHKPK(oduUnpackUInt8, param->CSI_BRRS_Indicator, mBuf);
4019 CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_SymbIdx, mBuf);
4020 CMCHKPK(oduUnpackUInt8, param->CSIRS_BRRS_TxTiming, mBuf);
4021 CMCHKPK(oduUnpackUInt8, param->CSI_BSI_BRI_Req, mBuf);
4023 if(param->RBAssign <= TFU_RIV_324)
4025 CMCHKPK(cmPkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf);
4027 else if (param->RBAssign == TFU_RIV_326)
4029 CMCHKPK(cmPkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4032 CMCHKPK(oduUnpackUInt8, param->symbIdx, mBuf);
4033 CMCHKPK(oduUnpackUInt8, param->beamIndex, mBuf);
4034 CMCHKPK(oduUnpackUInt16, param->RBAssign, mBuf);
4035 CMCHKPK(oduUnpackUInt8, param->xPDSCHRange, mBuf);
4036 CMCHKPK(oduUnpackUInt8, param->formatType, mBuf);
4042 /***********************************************************
4044 * Func : cmUnpkTfuDciFormatA1A2Info
4047 * Desc : This structure contains the information needed to convey DCI format A1/A2.
4056 **********************************************************/
4058 S16 cmUnpkTfuDciFormatA1A2Info
4060 TfuDciFormatA1Info *param,
4064 S16 cmUnpkTfuDciFormatA1A2Info(param, mBuf)
4065 TfuDciFormatA1Info *param;
4070 TRC3(cmUnpkTfuDciFormatA1A2Info)
4072 CMCHKUNPK(oduPackUInt8, ¶m->formatType, mBuf);
4073 CMCHKUNPK(oduPackUInt8, ¶m->xPUSCHRange, mBuf);
4074 CMCHKUNPK(oduPackUInt8, ¶m->xPUSCH_TxTiming, mBuf);
4075 CMCHKUNPK(oduPackUInt16, ¶m->RBAssign, mBuf);
4076 CMCHKUNPK(oduPackUInt8, ¶m->beamIndex, mBuf);
4077 CMCHKUNPK(oduPackUInt8, ¶m->symbIdx, mBuf);
4078 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
4080 if(param->RBAssign <= TFU_RIV_324)
4082 CMCHKUNPK(cmUnpkTfuRbAssignA1Val324, ¶m->u.rbAssignA1Val324, mBuf);
4084 else if(param->RBAssign == TFU_RIV_326)
4086 CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4089 CMCHKUNPK(oduPackUInt8, ¶m->CSI_BSI_BRI_Req, mBuf);
4090 CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_TxTiming, mBuf);
4091 CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_SymbIdx, mBuf);
4092 CMCHKUNPK(oduPackUInt8, ¶m->CSI_BRRS_Indicator, mBuf);
4093 CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_ProcInd, mBuf);
4094 CMCHKUNPK(oduPackUInt8, ¶m->numBSI_Reports, mBuf);
4096 CMCHKUNPK(oduPackUInt8, ¶m->uciOnxPUSCH, mBuf);
4097 CMCHKUNPK(oduPackUInt8, ¶m->beamSwitch, mBuf);
4098 CMCHKUNPK(oduPackUInt8, ¶m->SRS_Config, mBuf);
4099 CMCHKUNPK(oduPackUInt8, ¶m->SRS_Symbol, mBuf);
4100 CMCHKUNPK(oduPackUInt8, ¶m->REMapIdx_DMRS_PCRS_numLayers, mBuf);
4102 CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf);
4103 CMCHKUNPK(oduPackUInt8, ¶m->PMI, mBuf);
4104 CMCHKUNPK(oduPackUInt8, ¶m->UL_PCRS, mBuf);
4105 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
4111 /***********************************************************
4113 * Func : cmUnpkTfuDciFormatB1B2Info
4116 * Desc : This structure contains the information needed to convey DCI format B1/B2.
4125 **********************************************************/
4127 S16 cmUnpkTfuDciFormatB1B2Info
4129 TfuDciFormatB1Info *param,
4133 S16 cmUnpkTfuDciFormatB1B2Info(param, mBuf)
4134 TfuDciFormatB1Info *param;
4139 TRC3(cmUnpkTfuDciFormatB1B2Info)
4141 CMCHKUNPK(oduPackUInt8, ¶m->formatType, mBuf);
4142 CMCHKUNPK(oduPackUInt8, ¶m->xPDSCHRange, mBuf);
4143 CMCHKUNPK(oduPackUInt16, ¶m->RBAssign, mBuf);
4144 CMCHKUNPK(oduPackUInt8, ¶m->beamIndex, mBuf);
4145 CMCHKUNPK(oduPackUInt8, ¶m->symbIdx, mBuf);
4147 if(param->RBAssign <= TFU_RIV_324)
4149 CMCHKUNPK(cmUnpkTfuRbAssignB1Val324, ¶m->u.rbAssignB1Val324, mBuf);
4151 else if (param->RBAssign == TFU_RIV_326)
4153 CMCHKUNPK(cmUnpkTfuRbAssignVal326, ¶m->u.rbAssignVal326, mBuf);
4156 CMCHKUNPK(oduPackUInt8, ¶m->CSI_BSI_BRI_Req, mBuf);
4157 CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_TxTiming, mBuf);
4158 CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_SymbIdx, mBuf);
4159 CMCHKUNPK(oduPackUInt8, ¶m->CSI_BRRS_Indicator, mBuf);
4160 CMCHKUNPK(oduPackUInt8, ¶m->CSIRS_BRRS_ProcInd, mBuf);
4161 CMCHKUNPK(oduPackUInt8, ¶m->numBSI_Reports, mBuf);
4163 CMCHKUNPK(oduPackUInt8, ¶m->xPUCCH_TxTiming, mBuf);
4164 CMCHKUNPK(oduPackUInt8, ¶m->freqResIdx_xPUCCH, mBuf);
4165 CMCHKUNPK(oduPackUInt8, ¶m->beamSwitch, mBuf);
4166 CMCHKUNPK(oduPackUInt8, ¶m->SRS_Config, mBuf);
4167 CMCHKUNPK(oduPackUInt8, ¶m->SRS_Symbol, mBuf);
4168 CMCHKUNPK(oduPackUInt8, ¶m->AntPorts_numLayers, mBuf);
4169 CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf);
4170 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
4171 CMCHKUNPK(oduPackUInt8, ¶m->DL_PCRS, mBuf);
4177 #endif /* TFU_5GTF */
4180 /***********************************************************
4182 * Func : cmPkTfuDciFormat0Info
4185 * Desc : This structure contains the information needed to convey DCI format 0.
4194 **********************************************************/
4196 S16 cmPkTfuDciFormat0Info
4198 TfuDciFormat0Info *param,
4202 S16 cmPkTfuDciFormat0Info(param, mBuf)
4203 TfuDciFormat0Info *param;
4208 TRC3(cmPkTfuDciFormat0Info)
4210 /* tfu_c_001.main_3: Adding pack for hqProcId */
4211 CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf);
4212 CMCHKPK(oduUnpackUInt8, param->txAntenna, mBuf);
4213 CMCHKPK(oduUnpackUInt8, param->numCqiBit, mBuf);
4214 CMCHKPK(oduUnpackUInt8, param->cqiReq, mBuf);
4215 CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf);
4218 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
4219 CMCHKPK(oduUnpackUInt8, param->ulIdx, mBuf);
4222 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
4223 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
4224 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
4225 CMCHKPK(oduUnpackUInt8, param->hoppingBits, mBuf);
4226 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
4228 CMCHKPK(oduUnpackUInt32, param->riv, mBuf);
4230 CMCHKPK(oduUnpackUInt8, param->numRb, mBuf);
4231 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
4232 CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf);
4238 /***********************************************************
4240 * Func : cmUnpkTfuDciFormat0Info
4243 * Desc : This structure contains the information needed to convey DCI format 0.
4252 **********************************************************/
4254 S16 cmUnpkTfuDciFormat0Info
4256 TfuDciFormat0Info *param,
4260 S16 cmUnpkTfuDciFormat0Info(param, mBuf)
4261 TfuDciFormat0Info *param;
4266 TRC3(cmUnpkTfuDciFormat0Info)
4268 CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf);
4269 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
4270 CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf);
4272 CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf);
4273 #endif /* TFU_UPGRADE */
4274 CMCHKUNPK(oduPackUInt8, ¶m->hoppingBits, mBuf);
4275 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
4276 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
4277 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
4280 CMCHKUNPK(oduPackUInt8, ¶m->ulIdx, mBuf);
4281 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
4284 CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf);
4285 CMCHKUNPK(oduPackUInt8, ¶m->cqiReq, mBuf);
4286 CMCHKUNPK(oduPackUInt8, ¶m->numCqiBit, mBuf);
4287 CMCHKUNPK(oduPackUInt8, ¶m->txAntenna, mBuf);
4288 /* tfu_c_001.main_3: Adding unpack for hqProcId */
4289 CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf);
4296 /***********************************************************
4298 * Func : cmPkTfuAllocMapOrRiv
4301 * Desc : This Structure could either contain a resource allocation bit map OR a
4302 * RIV Value as defined in 213 - 7.1.6.
4311 **********************************************************/
4313 S16 cmPkTfuAllocMapOrRiv
4315 TfuAllocMapOrRiv *param,
4319 S16 cmPkTfuAllocMapOrRiv(param, mBuf)
4320 TfuAllocMapOrRiv *param;
4326 TRC3(cmPkTfuAllocMapOrRiv)
4328 switch(param->type) {
4329 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4330 #ifdef TFU_RESMAP_CHANGE
4332 CMCHKPK(cmPkTfuAllocMap, ¶m->u.allocMap, mBuf);
4337 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4338 #ifndef TFU_RESMAP_CHANGE
4339 case TFU_ALLOC_TYPE_MAP:
4340 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4341 CMCHKPK(oduUnpackUInt8, param->u.resAllocMap[i], mBuf);
4346 case TFU_ALLOC_TYPE_RIV:
4347 CMCHKPK(oduUnpackUInt32, param->u.riv, mBuf);
4352 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
4358 /***********************************************************
4360 * Func : cmUnpkTfuAllocMapOrRiv
4363 * Desc : This Structure could either contain a resource allocation bit map OR a
4364 * RIV Value as defined in 213 - 7.1.6.
4373 **********************************************************/
4375 S16 cmUnpkTfuAllocMapOrRiv
4377 TfuAllocMapOrRiv *param,
4381 S16 cmUnpkTfuAllocMapOrRiv(param, mBuf)
4382 TfuAllocMapOrRiv *param;
4388 TRC3(cmUnpkTfuAllocMapOrRiv)
4390 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
4391 switch(param->type) {
4392 case TFU_ALLOC_TYPE_RIV:
4393 CMCHKUNPK(oduPackUInt32, ¶m->u.riv, mBuf);
4396 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4397 #ifndef TFU_RESMAP_CHANGE
4398 case TFU_ALLOC_TYPE_MAP:
4399 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4400 CMCHKUNPK(oduPackUInt8, ¶m->u.resAllocMap[i], mBuf);
4406 /*tfu_c_001.main_7 - ADD - TFU_RESMAP_CHANGE support */
4407 #ifdef TFU_RESMAP_CHANGE
4409 CMCHKUNPK(cmUnpkTfuAllocMap, ¶m->u.allocMap, mBuf);
4421 /***********************************************************
4423 * Func : cmPkTfuDciFormat1AllocInfo
4426 * Desc : This structure contains only the allocation information, thats part
4428 * @details Allocation information also contains parameters necessary
4429 * for Physical layer to process Downlink Data. This structure accompanies the
4430 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4431 * @sa TfuDciFormat1Info
4440 **********************************************************/
4442 S16 cmPkTfuDciFormat1AllocInfo
4444 TfuDciFormat1AllocInfo *param,
4448 S16 cmPkTfuDciFormat1AllocInfo(param, mBuf)
4449 TfuDciFormat1AllocInfo *param;
4455 TRC3(cmPkTfuDciFormat1AllocInfo)
4457 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
4458 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
4459 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
4460 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
4461 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4462 CMCHKPK(oduUnpackUInt8, param->resAllocMap[i], mBuf);
4464 CMCHKPK(oduUnpackUInt8, param->isAllocType0, mBuf);
4470 /***********************************************************
4472 * Func : cmUnpkTfuDciFormat1AllocInfo
4475 * Desc : This structure contains only the allocation information, thats part
4477 * @details Allocation information also contains parameters necessary
4478 * for Physical layer to process Downlink Data. This structure accompanies the
4479 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4480 * @sa TfuDciFormat1Info
4489 **********************************************************/
4491 S16 cmUnpkTfuDciFormat1AllocInfo
4493 TfuDciFormat1AllocInfo *param,
4497 S16 cmUnpkTfuDciFormat1AllocInfo(param, mBuf)
4498 TfuDciFormat1AllocInfo *param;
4504 TRC3(cmUnpkTfuDciFormat1AllocInfo)
4506 CMCHKUNPK(oduPackUInt8, ¶m->isAllocType0, mBuf);
4507 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4508 CMCHKUNPK(oduPackUInt8, ¶m->resAllocMap[i], mBuf);
4510 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
4511 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
4512 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
4513 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
4518 /***********************************************************
4520 * Func : cmPkTfuDciFormat1Info
4523 * Desc : This structure contains the information needed to convey DCI format 1.
4524 * @details Allocation information is separated from the other control
4525 * information carried in this format. This separation is needed as Data shall
4526 * also carry some control information, essentially allocation information,
4527 * along with it, in order to aid physical layer processing of the data.
4536 **********************************************************/
4538 S16 cmPkTfuDciFormat1Info
4540 TfuDciFormat1Info *param,
4544 S16 cmPkTfuDciFormat1Info(param, mBuf)
4545 TfuDciFormat1Info *param;
4550 TRC3(cmPkTfuDciFormat1Info)
4552 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
4555 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
4558 CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf);
4564 /***********************************************************
4566 * Func : cmUnpkTfuDciFormat1Info
4569 * Desc : This structure contains the information needed to convey DCI format 1.
4570 * @details Allocation information is separated from the other control
4571 * information carried in this format. This separation is needed as Data shall
4572 * also carry some control information, essentially allocation information,
4573 * along with it, in order to aid physical layer processing of the data.
4582 **********************************************************/
4584 S16 cmUnpkTfuDciFormat1Info
4586 TfuDciFormat1Info *param,
4590 S16 cmUnpkTfuDciFormat1Info(param, mBuf)
4591 TfuDciFormat1Info *param;
4596 TRC3(cmUnpkTfuDciFormat1Info)
4598 CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->allocInfo, mBuf);
4601 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
4604 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
4610 /***********************************************************
4612 * Func : cmPkTfuDciFormat2AAllocInfo
4615 * Desc : This structure contains only the allocation information, that is part
4617 * @details Allocation information also contains parameters necessary
4618 * for Physical layer to process Downlink data. This structure accompanies the
4619 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4620 * @sa TfuDciFormat2AInfo
4629 **********************************************************/
4631 S16 cmPkTfuDciFormat2AAllocInfo
4633 TfuDciFormat2AAllocInfo *param,
4637 S16 cmPkTfuDciFormat2AAllocInfo(param, mBuf)
4638 TfuDciFormat2AAllocInfo *param;
4644 TRC3(cmPkTfuDciFormat2AAllocInfo)
4646 CMCHKPK(oduUnpackUInt8, param->transSwap, mBuf);
4647 CMCHKPK(oduUnpackUInt8, param->precoding, mBuf);
4649 for (i=1; i >= 0; i--) {
4650 CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
4653 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
4654 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4655 CMCHKPK(oduUnpackUInt8, param->resAllocMap[i], mBuf);
4658 CMCHKPK(oduUnpackUInt8, param->isAllocType0, mBuf);
4665 /***********************************************************
4667 * Func : cmUnpkTfuDciFormat2AAllocInfo
4670 * Desc : This structure contains only the allocation information, that is part
4672 * @details Allocation information also contains parameters necessary
4673 * for Physical layer to process Downlink data. This structure accompanies the
4674 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4675 * @sa TfuDciFormat2AInfo
4684 **********************************************************/
4686 S16 cmUnpkTfuDciFormat2AAllocInfo
4688 TfuDciFormat2AAllocInfo *param,
4692 S16 cmUnpkTfuDciFormat2AAllocInfo(param, mBuf)
4693 TfuDciFormat2AAllocInfo *param;
4699 TRC3(cmUnpkTfuDciFormat2AAllocInfo)
4702 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4703 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4704 CMCHKUNPK(oduPackUInt8, ¶m->isAllocType0, mBuf);
4707 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4708 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4709 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
4710 CMCHKUNPK(oduPackUInt8, ¶m->resAllocMap[i], mBuf);
4712 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
4714 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4715 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4717 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4718 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4719 for (i=0; i<=1; i++) {
4720 CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
4723 CMCHKUNPK(oduPackUInt8, ¶m->precoding, mBuf);
4724 CMCHKUNPK(oduPackUInt8, ¶m->transSwap, mBuf);
4729 /***********************************************************
4731 * Func : cmPkTfuDciFormat6AAllocInfo
4734 * Desc : This structure contains only the allocation information, that is part
4735 * of DCI format 6-1A.
4736 * @details Allocation information also contains parameters necessary
4737 * for Physical layer to process Downlink data. This structure accompanies the
4738 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4739 * @sa TfuDciFormat61aInfo
4748 **********************************************************/
4750 S16 cmPkTfuDciFormat6AAllocInfo
4752 TfuDciFormat61AllocInfo *param,
4756 S16 cmPkTfuDciFormat6AAllocInfo(param, mBuf)
4757 TfuDciFormat61AllocInfo *param;
4762 TRC3(cmPkTfuDciFormat6AAllocInfo)
4764 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
4765 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
4766 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
4767 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
4768 CMCHKPK(oduUnpackUInt32, param->riv, mBuf);
4775 /***********************************************************
4777 * Func : cmUnpkTfuDciFormat6AAllocInfo
4780 * Desc : This structure contains only the allocation information, that is part
4781 * of DCI format 6-1A.
4782 * @details Allocation information also contains parameters necessary
4783 * for Physical layer to process Downlink data. This structure accompanies the
4784 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4785 * @sa TfuDciFormat61aInfo
4794 **********************************************************/
4796 S16 cmUnpkTfuDciFormat6AAllocInfo
4798 TfuDciFormat61AllocInfo *param,
4802 S16 cmUnpkTfuDciFormat6AAllocInfo(param, mBuf)
4803 TfuDciFormat61AllocInfo *param;
4808 TRC3(cmUnpkTfuDciFormat6AAllocInfo)
4810 CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf);
4811 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
4812 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
4813 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
4814 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
4815 printf("In cmUnpkTfuDciFormat6AAllocInfo :: Passed \n");
4822 /***********************************************************
4824 * Func : cmPkTfuDciFormat2AInfo
4827 * Desc : This structure contains the information carried by DCI format 2A.
4828 * @details It carries the allocation information and other control information.
4837 **********************************************************/
4839 S16 cmPkTfuDciFormat2AInfo
4841 TfuDciFormat2AInfo *param,
4845 S16 cmPkTfuDciFormat2AInfo(param, mBuf)
4846 TfuDciFormat2AInfo *param;
4851 TRC3(cmPkTfuDciFormat2AInfo)
4853 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
4856 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
4859 CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf);
4865 /***********************************************************
4867 * Func : cmUnpkTfuDciFormat2AInfo
4870 * Desc : This structure contains the information carried by DCI format 2A.
4871 * @details It carries the allocation information and other control information.
4880 **********************************************************/
4882 S16 cmUnpkTfuDciFormat2AInfo
4884 TfuDciFormat2AInfo *param,
4888 S16 cmUnpkTfuDciFormat2AInfo(param, mBuf)
4889 TfuDciFormat2AInfo *param;
4894 TRC3(cmUnpkTfuDciFormat2AInfo)
4896 CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->allocInfo, mBuf);
4899 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
4902 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
4908 /***********************************************************
4910 * Func : cmPkTfuDciFormat2AllocInfo
4913 * Desc : This structure contains only the allocation information, that is part
4915 * @details Allocation information also contains parameters necessary
4916 * for Physical layer to process Downlink data. This structure accompanies the
4917 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4918 * @sa TfuDciFormat2Info
4927 **********************************************************/
4929 S16 cmPkTfuDciFormat2AllocInfo
4931 TfuDciFormat2AllocInfo *param,
4935 S16 cmPkTfuDciFormat2AllocInfo(param, mBuf)
4936 TfuDciFormat2AllocInfo *param;
4942 TRC3(cmPkTfuDciFormat2AllocInfo)
4945 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4946 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4947 for (i=1; i >= 0; i--) {
4948 CMCHKPK(cmPkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
4950 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
4952 CMCHKPK(oduUnpackUInt8, param->precoding, mBuf);
4953 CMCHKPK(oduUnpackUInt8, param->transSwap, mBuf);
4955 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4956 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4959 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
4962 for (i=TFU_MAX_ALLOC_BYTES-1; i >= 0; i--) {
4963 CMCHKPK(oduUnpackUInt8, param->resAllocMap[i], mBuf);
4966 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4967 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4969 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
4970 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
4971 CMCHKPK(oduUnpackUInt8, param->isAllocType0, mBuf);
4978 /***********************************************************
4980 * Func : cmUnpkTfuDciFormat2AllocInfo
4983 * Desc : This structure contains only the allocation information, that is part
4985 * @details Allocation information also contains parameters necessary
4986 * for Physical layer to process Downlink data. This structure accompanies the
4987 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
4988 * @sa TfuDciFormat2Info
4997 **********************************************************/
4999 S16 cmUnpkTfuDciFormat2AllocInfo
5001 TfuDciFormat2AllocInfo *param,
5005 S16 cmUnpkTfuDciFormat2AllocInfo(param, mBuf)
5006 TfuDciFormat2AllocInfo *param;
5012 TRC3(cmUnpkTfuDciFormat2AllocInfo)
5015 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5016 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5017 CMCHKUNPK(oduPackUInt8, ¶m->isAllocType0, mBuf);
5020 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5021 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5022 for (i=0; i<TFU_MAX_ALLOC_BYTES; i++) {
5023 CMCHKUNPK(oduPackUInt8, ¶m->resAllocMap[i], mBuf);
5027 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
5031 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5032 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5033 CMCHKUNPK(oduPackUInt8, ¶m->transSwap, mBuf);
5034 CMCHKUNPK(oduPackUInt8, ¶m->precoding, mBuf);
5036 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5037 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5038 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
5039 for (i=0; i<=1; i++) {
5040 CMCHKUNPK(cmUnpkTfuDciFormatTbInfo, ¶m->tbInfo[i], mBuf);
5048 /***********************************************************
5050 * Func : cmPkTfuDciFormat2Info
5053 * Desc : This structure contains the information carried by DCI format 2.
5054 * @details Allocation information is separated from the other control
5055 * information carried in this format. This separation is needed as Data must
5056 * also carry some control information, essentially, allocation information
5057 * along with it, in order to aid physical layer processing of the data.
5066 **********************************************************/
5068 S16 cmPkTfuDciFormat2Info
5070 TfuDciFormat2Info *param,
5074 S16 cmPkTfuDciFormat2Info(param, mBuf)
5075 TfuDciFormat2Info *param;
5080 TRC3(cmPkTfuDciFormat2Info)
5083 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5084 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5087 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
5091 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
5093 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5094 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5095 CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf);
5101 /***********************************************************
5103 * Func : cmUnpkTfuDciFormat2Info
5106 * Desc : This structure contains the information carried by DCI format 2.
5107 * @details Allocation information is separated from the other control
5108 * information carried in this format. This separation is needed as Data must
5109 * also carry some control information, essentially, allocation information
5110 * along with it, in order to aid physical layer processing of the data.
5119 **********************************************************/
5121 S16 cmUnpkTfuDciFormat2Info
5123 TfuDciFormat2Info *param,
5127 S16 cmUnpkTfuDciFormat2Info(param, mBuf)
5128 TfuDciFormat2Info *param;
5133 TRC3(cmUnpkTfuDciFormat2Info)
5135 CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->allocInfo, mBuf);
5137 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5138 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5139 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
5141 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
5142 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
5145 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
5154 /***********************************************************
5156 * Func : cmPkTfuDciFormat3Info
5159 * Desc : This structure contains the information carried in DCI format 3.
5168 **********************************************************/
5170 S16 cmPkTfuDciFormat3Info
5172 TfuDciFormat3Info *param,
5176 S16 cmPkTfuDciFormat3Info(param, mBuf)
5177 TfuDciFormat3Info *param;
5183 TRC3(cmPkTfuDciFormat3Info)
5185 CMCHKPK(oduUnpackUInt8, param->isPucch, mBuf);
5186 for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) {
5187 CMCHKPK(oduUnpackUInt8, param->tpcCmd[i], mBuf);
5194 /***********************************************************
5196 * Func : cmUnpkTfuDciFormat3Info
5199 * Desc : This structure contains the information carried in DCI format 3.
5208 **********************************************************/
5210 S16 cmUnpkTfuDciFormat3Info
5212 TfuDciFormat3Info *param,
5216 S16 cmUnpkTfuDciFormat3Info(param, mBuf)
5217 TfuDciFormat3Info *param;
5223 TRC3(cmUnpkTfuDciFormat3Info)
5225 for (i=0; i<TFU_MAX_2BIT_TPC; i++) {
5226 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd[i], mBuf);
5228 CMCHKUNPK(oduPackUInt8, ¶m->isPucch, mBuf);
5234 /***********************************************************
5236 * Func : cmPkTfuDciFormat3AInfo
5239 * Desc : This structure contains the information carried by DCI format 3A.
5248 **********************************************************/
5250 S16 cmPkTfuDciFormat3AInfo
5252 TfuDciFormat3AInfo *param,
5256 S16 cmPkTfuDciFormat3AInfo(param, mBuf)
5257 TfuDciFormat3AInfo *param;
5263 TRC3(cmPkTfuDciFormat3AInfo)
5264 CMCHKPK(oduUnpackUInt8, param->isPucch, mBuf);
5265 for (i=TFU_MAX_2BIT_TPC-1; i >= 0; i--) {
5266 CMCHKPK(oduUnpackUInt8, param->tpcCmd[i], mBuf);
5273 /***********************************************************
5275 * Func : cmUnpkTfuDciFormat3AInfo
5278 * Desc : This structure contains the information carried by DCI format 3A.
5287 **********************************************************/
5289 S16 cmUnpkTfuDciFormat3AInfo
5291 TfuDciFormat3AInfo *param,
5295 S16 cmUnpkTfuDciFormat3AInfo(param, mBuf)
5296 TfuDciFormat3AInfo *param;
5302 TRC3(cmUnpkTfuDciFormat3AInfo)
5304 for (i=0; i<TFU_MAX_2BIT_TPC; i++) {
5305 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd[i], mBuf);
5307 CMCHKUNPK(oduPackUInt8, ¶m->isPucch, mBuf);
5314 /***********************************************************
5316 * Func : cmPkTfuDciFormat60aInfo
5319 * Desc : This structure contains the information that is carried in DCI
5329 ************************************************************/
5332 PRIVATE S16 cmPkTfuDciFormat60aInfo
5334 TfuDciFormat60aInfo *param,
5338 PRIVATE S16 cmPkTfuDciFormat60aInfo(param, mBuf)
5339 TfuDciFormat60aInfo *param;
5344 TRC3(cmPkTfuDciFormat60aInfo)
5346 CMCHKPK(oduUnpackUInt8, param->dciRep, mBuf);
5347 CMCHKPK(oduUnpackUInt8, param->isSrs, mBuf);
5348 CMCHKPK(oduUnpackUInt8, param->cqiReq, mBuf);
5350 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
5351 CMCHKPK(oduUnpackUInt8, param->ulIdx, mBuf);
5353 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
5354 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
5355 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
5356 CMCHKPK(oduUnpackUInt8, param->hqProcId, mBuf);
5357 CMCHKPK(oduUnpackUInt8, param->rep, mBuf);
5358 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
5359 CMCHKPK(oduUnpackUInt32, param->riv, mBuf);
5360 CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf);
5363 /***********************************************************
5365 * Func : cmPkTfuPdcchOrderInfoEmtc
5368 * Desc : This structure contains the information that is carried in DCI
5369 * format 6-1A in the case of a PDCCH order.
5378 **********************************************************/
5380 PRIVATE S16 cmPkTfuPdcchOrderInfoEmtc
5382 TfuPdcchOrderInfoEmtc *param,
5386 PRIVATE S16 cmPkTfuPdcchOrderInfoEmtc(param, mBuf)
5387 TfuPdcchOrderInfoEmtc *param;
5392 TRC3(cmPkTfuPdcchOrderInfoEmtc)
5394 CMCHKPK(oduUnpackUInt8, param->ceLevel, mBuf);
5395 CMCHKPK(oduUnpackUInt8, param->prachMaskIdx, mBuf);
5396 CMCHKPK(oduUnpackUInt8, param->preambleIdx, mBuf);
5397 CMCHKPK(oduUnpackUInt32, param->riv, mBuf);
5401 /***********************************************************
5403 * Func : cmPkTfudciformat61aPdsch
5406 * Desc : This structure contains the information carried in DCI format 6-1A
5407 * when it is NOT used for a PDCCH order.
5416 **********************************************************/
5418 PRIVATE S16 cmPkTfudciformat61aPdsch
5420 Tfudciformat61aPdsch *param,
5424 PRIVATE S16 cmPkTfudciformat61aPdsch(param, mBuf)
5425 Tfudciformat61aPdsch *param;
5430 TRC3(cmPkTfudciformat61aPdsch)
5432 CMCHKPK(oduUnpackUInt8, param->isTBMsg4, mBuf);
5433 CMCHKPK(oduUnpackUInt8, param->dciRep, mBuf);
5434 CMCHKPK(oduUnpackUInt8, param->harqAckOffst, mBuf);
5435 CMCHKPK(oduUnpackUInt8, param->pmiCfm, mBuf);
5436 CMCHKPK(oduUnpackUInt8, param->tPmi, mBuf);
5437 CMCHKPK(oduUnpackUInt8, param->isSrs, mBuf);
5438 CMCHKPK(oduUnpackUInt8, param->antPortAndScrId, mBuf);
5441 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
5443 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
5444 CMCHKPK(oduUnpackUInt8, param->rep, mBuf);
5445 CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf);
5446 CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf);
5451 /***********************************************************
5453 * Func : cmPkTfuDciFormat61aInfo
5456 * Desc : This structure contains the information needed to convey DCI format 6-1A.
5457 * @details Format can possibly carry PDSCH allocation or information needed for
5458 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
5468 **********************************************************/
5470 S16 cmPkTfuDciFormat61aInfo
5472 TfuDciFormat61aInfo *param,
5476 S16 cmPkTfuDciFormat61aInfo(param, mBuf)
5477 TfuDciFormat61aInfo *param;
5482 TRC3(cmPkTfuDciFormat61aInfo)
5484 switch(param->isPdcchOrder) {
5486 CMCHKPK(cmPkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf);
5489 CMCHKPK(cmPkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf);
5494 CMCHKPK(oduUnpackUInt8, param->isPdcchOrder, mBuf);
5499 /***********************************************************
5501 * Func : cmUnpkTfuDciFormat60aInfo
5504 * Desc : This structure contains the information that is carried in DCI
5514 * **********************************************************/
5517 PRIVATE S16 cmUnpkTfuDciFormat60aInfo
5519 TfuDciFormat60aInfo *param,
5523 PRIVATE S16 cmUnpkTfuDciFormat60aInfo(param, mBuf)
5524 TfuDciFormat60aInfo *param;
5529 TRC3(cmUnpkTfuDciFormat60aInfo)
5531 printf("In cmUnpkTfuDciFormat60aInfo :: Entry \n");
5532 CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf);
5533 CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf);
5534 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
5535 CMCHKUNPK(oduPackUInt8, ¶m->rep, mBuf);
5536 CMCHKUNPK(oduPackUInt8, ¶m->hqProcId, mBuf);
5537 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
5538 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
5539 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
5541 CMCHKUNPK(oduPackUInt8, ¶m->ulIdx, mBuf);
5542 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
5544 CMCHKUNPK(oduPackUInt8, ¶m->cqiReq, mBuf);
5545 CMCHKUNPK(oduPackUInt8, ¶m->isSrs, mBuf);
5546 CMCHKUNPK(oduPackUInt8, ¶m->dciRep, mBuf);
5547 printf("In cmUnpkTfuDciFormat60aInfo :: Exit \n");
5550 /***********************************************************
5552 * Func : cmUnpkTfuPdcchOrderInfoEmtc
5555 * Desc : This structure contains the information that is carried in DCI
5556 * format 6-1A in the case of a PDCCH order.
5565 **********************************************************/
5567 PRIVATE S16 cmUnpkTfuPdcchOrderInfoEmtc
5569 TfuPdcchOrderInfoEmtc *param,
5573 PRIVATE S16 cmUnpkTfuPdcchOrderInfoEmtc(param, mBuf)
5574 TfuPdcchOrderInfoEmtc *param;
5579 TRC3(cmUnpkTfuPdcchOrderInfoEmtc)
5581 printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Entry \n");
5582 CMCHKUNPK(oduPackUInt32, ¶m->riv, mBuf);
5583 CMCHKUNPK(oduPackUInt8, ¶m->preambleIdx, mBuf);
5584 CMCHKUNPK(oduPackUInt8, ¶m->prachMaskIdx, mBuf);
5585 CMCHKUNPK(oduPackUInt8, ¶m->ceLevel, mBuf);
5586 printf("In cmUnpkTfuPdcchOrderInfoEmtc :: Passed \n");
5590 /***********************************************************
5592 * Func : cmUnpkTfuDciFormat61aInfo
5595 * Desc : This structure contains the information carried by DCI format 6-1A.
5604 **********************************************************/
5606 S16 cmUnpkTfuDciFormat61aInfo
5608 TfuDciFormat61aInfo *param,
5612 S16 cmUnpkTfuDciFormat61aInfo(param, mBuf)
5613 TfuDciFormat61aInfo *param;
5618 TRC3(cmUnpkTfuDciFormat61aInfo)
5620 CMCHKUNPK(oduPackUInt8, ¶m->isPdcchOrder, mBuf);
5621 printf("1. cmUnpkTfuDciFormat61aInfo :: isPdcchOrder %d \n", param->isPdcchOrder);
5622 switch(param->isPdcchOrder) {
5624 CMCHKUNPK(cmUnpkTfuPdcchOrderInfoEmtc, ¶m->t.pdcchOrder, mBuf);
5627 CMCHKUNPK(cmUnpkTfudciformat61aPdsch, ¶m->t.pdschInfo, mBuf);
5636 /***********************************************************
5638 * Func : cmPkTfuDciFormat1dAllocInfo
5641 * Desc : This structure contains only the allocation information, thats part
5643 * @details Allocation information also contains parameters necessary
5644 * for Physical layer to process Downlink Data. This structure accompanies the
5645 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5646 * @sa TfuDciFormat1dInfo
5655 **********************************************************/
5657 S16 cmPkTfuDciFormat1dAllocInfo
5659 TfuDciFormat1dAllocInfo *param,
5663 S16 cmPkTfuDciFormat1dAllocInfo(param, mBuf)
5664 TfuDciFormat1dAllocInfo *param;
5669 TRC3(cmPkTfuDciFormat1dAllocInfo)
5671 CMCHKPK(oduUnpackUInt8, param->tPmi, mBuf);
5672 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
5673 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
5674 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5675 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
5676 CMCHKPK(oduUnpackUInt8, param->isLocal, mBuf);
5682 /***********************************************************
5684 * Func : cmUnpkTfuDciFormat1dAllocInfo
5687 * Desc : This structure contains only the allocation information, thats part
5689 * @details Allocation information also contains parameters necessary
5690 * for Physical layer to process Downlink Data. This structure accompanies the
5691 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5692 * @sa TfuDciFormat1dInfo
5701 **********************************************************/
5703 S16 cmUnpkTfuDciFormat1dAllocInfo
5705 TfuDciFormat1dAllocInfo *param,
5709 S16 cmUnpkTfuDciFormat1dAllocInfo(param, mBuf)
5710 TfuDciFormat1dAllocInfo *param;
5715 TRC3(cmUnpkTfuDciFormat1dAllocInfo)
5717 CMCHKUNPK(oduPackUInt8, ¶m->isLocal, mBuf);
5718 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
5719 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5720 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
5721 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
5722 CMCHKUNPK(oduPackUInt8, ¶m->tPmi, mBuf);
5728 /***********************************************************
5730 * Func : cmPkTfuDciFormat1dInfo
5733 * Desc : This structure contains the information carried by DCI format 1D.
5734 * @details Allocation information is separated from the other control
5735 * information carried in this format. This separation is needed as Data shall
5736 * also carry some control information, essentially allocation information,
5737 * along with it, in order to aid physical layer processing of the data.
5746 **********************************************************/
5748 S16 cmPkTfuDciFormat1dInfo
5750 TfuDciFormat1dInfo *param,
5754 S16 cmPkTfuDciFormat1dInfo(param, mBuf)
5755 TfuDciFormat1dInfo *param;
5760 TRC3(cmPkTfuDciFormat1dInfo)
5762 CMCHKPK(oduUnpackUInt8, param->dlPwrOffset, mBuf);
5765 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
5768 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
5769 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
5770 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
5771 CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf);
5777 /***********************************************************
5779 * Func : cmUnpkTfuDciFormat1dInfo
5782 * Desc : This structure contains the information carried by DCI format 1D.
5783 * @details Allocation information is separated from the other control
5784 * information carried in this format. This separation is needed as Data shall
5785 * also carry some control information, essentially allocation information,
5786 * along with it, in order to aid physical layer processing of the data.
5795 **********************************************************/
5797 S16 cmUnpkTfuDciFormat1dInfo
5799 TfuDciFormat1dInfo *param,
5803 S16 cmUnpkTfuDciFormat1dInfo(param, mBuf)
5804 TfuDciFormat1dInfo *param;
5809 TRC3(cmUnpkTfuDciFormat1dInfo)
5811 CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->allocInfo, mBuf);
5812 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
5813 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
5814 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
5817 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
5820 CMCHKUNPK(oduPackUInt8, ¶m->dlPwrOffset, mBuf);
5826 /***********************************************************
5828 * Func : cmPkTfuDciFormat1cInfo
5831 * Desc : This structure contains only the allocation information, thats part
5833 * @details Allocation information also contains parameters necessary
5834 * for Physical layer to process Downlink Data. This structure accompanies the
5835 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5836 * @sa TfuDciFormat1CInfo
5845 **********************************************************/
5847 S16 cmPkTfuDciFormat1cInfo
5849 TfuDciFormat1cInfo *param,
5853 S16 cmPkTfuDciFormat1cInfo(param, mBuf)
5854 TfuDciFormat1cInfo *param;
5859 TRC3(cmPkTfuDciFormat1cInfo)
5861 CMCHKPK(oduUnpackUInt8, param->iTbs, mBuf);
5862 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5863 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
5869 /***********************************************************
5871 * Func : cmUnpkTfuDciFormat1cInfo
5874 * Desc : This structure contains only the allocation information, thats part
5876 * @details Allocation information also contains parameters necessary
5877 * for Physical layer to process Downlink Data. This structure accompanies the
5878 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5879 * @sa TfuDciFormat1CInfo
5888 **********************************************************/
5890 S16 cmUnpkTfuDciFormat1cInfo
5892 TfuDciFormat1cInfo *param,
5896 S16 cmUnpkTfuDciFormat1cInfo(param, mBuf)
5897 TfuDciFormat1cInfo *param;
5902 TRC3(cmUnpkTfuDciFormat1cInfo)
5904 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
5905 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5906 CMCHKUNPK(oduPackUInt8, ¶m->iTbs, mBuf);
5912 /***********************************************************
5914 * Func : cmPkTfuDciFormat1bAllocInfo
5917 * Desc : This structure contains only the allocation information, thats part
5918 * of DCI format 1 B.
5919 * @details Allocation information also contains parameters necessary
5920 * for Physical layer to process Downlink Data. This structure accompanies the
5921 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5922 * @sa TfuDciFormat1BInfo
5931 **********************************************************/
5933 S16 cmPkTfuDciFormat1bAllocInfo
5935 TfuDciFormat1bAllocInfo *param,
5939 S16 cmPkTfuDciFormat1bAllocInfo(param, mBuf)
5940 TfuDciFormat1bAllocInfo *param;
5945 TRC3(cmPkTfuDciFormat1bAllocInfo)
5947 CMCHKPK(oduUnpackUInt8, param->pmiCfm, mBuf);
5948 CMCHKPK(oduUnpackUInt8, param->tPmi, mBuf);
5949 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
5950 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
5951 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
5952 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
5953 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5954 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
5955 CMCHKPK(oduUnpackUInt8, param->isLocal, mBuf);
5961 /***********************************************************
5963 * Func : cmUnpkTfuDciFormat1bAllocInfo
5966 * Desc : This structure contains only the allocation information, thats part
5967 * of DCI format 1 B.
5968 * @details Allocation information also contains parameters necessary
5969 * for Physical layer to process Downlink Data. This structure accompanies the
5970 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
5971 * @sa TfuDciFormat1BInfo
5980 **********************************************************/
5982 S16 cmUnpkTfuDciFormat1bAllocInfo
5984 TfuDciFormat1bAllocInfo *param,
5988 S16 cmUnpkTfuDciFormat1bAllocInfo(param, mBuf)
5989 TfuDciFormat1bAllocInfo *param;
5994 TRC3(cmUnpkTfuDciFormat1bAllocInfo)
5996 CMCHKUNPK(oduPackUInt8, ¶m->isLocal, mBuf);
5997 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
5998 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
5999 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
6000 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
6001 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
6002 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
6003 CMCHKUNPK(oduPackUInt8, ¶m->tPmi, mBuf);
6004 CMCHKUNPK(oduPackUInt8, ¶m->pmiCfm, mBuf);
6010 /***********************************************************
6012 * Func : cmPkTfuPdcchOrderInfo
6015 * Desc : This structure contains the information that is carried in DCI
6016 * format 1A in the case of a PDCCH order.
6025 **********************************************************/
6027 S16 cmPkTfuPdcchOrderInfo
6029 TfuPdcchOrderInfo *param,
6033 S16 cmPkTfuPdcchOrderInfo(param, mBuf)
6034 TfuPdcchOrderInfo *param;
6039 TRC3(cmPkTfuPdcchOrderInfo)
6041 CMCHKPK(oduUnpackUInt8, param->prachMaskIdx, mBuf);
6042 CMCHKPK(oduUnpackUInt8, param->preambleIdx, mBuf);
6048 /***********************************************************
6050 * Func : cmUnpkTfuPdcchOrderInfo
6053 * Desc : This structure contains the information that is carried in DCI
6054 * format 1A in the case of a PDCCH order.
6063 **********************************************************/
6065 S16 cmUnpkTfuPdcchOrderInfo
6067 TfuPdcchOrderInfo *param,
6071 S16 cmUnpkTfuPdcchOrderInfo(param, mBuf)
6072 TfuPdcchOrderInfo *param;
6077 TRC3(cmUnpkTfuPdcchOrderInfo)
6079 CMCHKUNPK(oduPackUInt8, ¶m->preambleIdx, mBuf);
6080 CMCHKUNPK(oduPackUInt8, ¶m->prachMaskIdx, mBuf);
6086 /***********************************************************
6088 * Func : cmPkTfuDciFormat1aAllocInfo
6091 * Desc : This structure contains only the allocation information, thats part
6093 * @details Allocation information also contains parameters necessary
6094 * for Physical layer to process Downlink Data. This structure accompanies the
6095 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6096 * @sa TfuDciFormat1AInfo
6105 **********************************************************/
6107 S16 cmPkTfuDciFormat1aAllocInfo
6109 TfuDciFormat1aAllocInfo *param,
6113 S16 cmPkTfuDciFormat1aAllocInfo(param, mBuf)
6114 TfuDciFormat1aAllocInfo *param;
6119 TRC3(cmPkTfuDciFormat1aAllocInfo)
6121 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
6122 CMCHKPK(cmPkTknU8, ¶m->harqProcId, mBuf);
6123 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
6124 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
6125 CMCHKPK(cmPkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6126 CMCHKPK(cmPkTknU8, ¶m->nGap2, mBuf);
6127 CMCHKPK(oduUnpackUInt8, param->isLocal, mBuf);
6133 /***********************************************************
6135 * Func : cmUnpkTfuDciFormat1aAllocInfo
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 TfuDciFormat1AInfo
6152 **********************************************************/
6154 S16 cmUnpkTfuDciFormat1aAllocInfo
6156 TfuDciFormat1aAllocInfo *param,
6160 S16 cmUnpkTfuDciFormat1aAllocInfo(param, mBuf)
6161 TfuDciFormat1aAllocInfo *param;
6166 TRC3(cmUnpkTfuDciFormat1aAllocInfo)
6168 CMCHKUNPK(oduPackUInt8, ¶m->isLocal, mBuf);
6169 CMCHKUNPK(cmUnpkTknU8, ¶m->nGap2, mBuf);
6170 CMCHKUNPK(cmUnpkTfuAllocMapOrRiv, ¶m->alloc, mBuf);
6171 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
6172 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
6173 CMCHKUNPK(cmUnpkTknU8, ¶m->harqProcId, mBuf);
6174 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
6180 /***********************************************************
6182 * Func : cmPkTfudciformat1aPdsch
6185 * Desc : This structure contains the information carried in DCI format 1A
6186 * when it is NOT used for a PDCCH order.
6195 **********************************************************/
6197 S16 cmPkTfudciformat1aPdsch
6199 Tfudciformat1aPdsch *param,
6203 S16 cmPkTfudciformat1aPdsch(param, mBuf)
6204 Tfudciformat1aPdsch *param;
6209 TRC3(cmPkTfudciformat1aPdsch)
6211 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
6214 CMCHKPK(cmPkTknU8, ¶m->dai, mBuf);
6217 CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf);
6223 /***********************************************************
6225 * Func : cmUnpkTfudciformat1aPdsch
6228 * Desc : This structure contains the information carried in DCI format 1A
6229 * when it is NOT used for a PDCCH order.
6238 **********************************************************/
6240 S16 cmUnpkTfudciformat1aPdsch
6242 Tfudciformat1aPdsch *param,
6246 S16 cmUnpkTfudciformat1aPdsch(param, mBuf)
6247 Tfudciformat1aPdsch *param;
6252 TRC3(cmUnpkTfudciformat1aPdsch)
6254 CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->allocInfo, mBuf);
6257 CMCHKUNPK(cmUnpkTknU8, ¶m->dai, mBuf);
6260 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
6267 /***********************************************************
6269 * Func : cmUnpkTfudciformat61aPdsch
6272 * Desc : This structure contains the information carried in DCI format 6-1A
6273 * when it is NOT used for a PDCCH order.
6282 **********************************************************/
6284 S16 cmUnpkTfudciformat61aPdsch
6286 Tfudciformat61aPdsch *param,
6290 S16 cmUnpkTfudciformat61aPdsch(param, mBuf)
6291 Tfudciformat61aPdsch *param;
6296 TRC3(cmUnpkTfudciformat61aPdsch)
6298 printf("1. cmUnpkTfudciformat61aPdsch :: Entry \n");
6299 CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->allocInfo, mBuf);
6300 printf("2. cmUnpkTfudciformat61aPdsch :: Entry \n");
6301 CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf);
6302 printf("3. cmUnpkTfudciformat61aPdsch :: Entry \n");
6303 CMCHKUNPK(oduPackUInt8, ¶m->rep, mBuf);
6304 printf("4. cmUnpkTfudciformat61aPdsch :: Entry \n");
6305 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
6306 printf("5. cmUnpkTfudciformat61aPdsch :: Entry \n");
6308 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
6309 printf("6. cmUnpkTfudciformat61aPdsch :: Entry \n");
6311 CMCHKUNPK(oduPackUInt8, ¶m->antPortAndScrId, mBuf);
6312 printf("7. cmUnpkTfudciformat61aPdsch :: Entry \n");
6313 CMCHKUNPK(oduPackUInt8, ¶m->isSrs, mBuf);
6314 printf("8. cmUnpkTfudciformat61aPdsch :: Entry \n");
6315 CMCHKUNPK(oduPackUInt8, ¶m->tPmi, mBuf);
6316 printf("9. cmUnpkTfudciformat61aPdsch :: Entry \n");
6317 CMCHKUNPK(oduPackUInt8, ¶m->pmiCfm, mBuf);
6318 printf("10. cmUnpkTfudciformat61aPdsch :: Entry \n");
6319 CMCHKUNPK(oduPackUInt8, ¶m->harqAckOffst, mBuf);
6320 printf("11. cmUnpkTfudciformat61aPdsch :: Entry \n");
6321 CMCHKUNPK(oduPackUInt8, ¶m->dciRep, mBuf);
6322 printf("12. cmUnpkTfudciformat61aPdsch :: Entry \n");
6323 CMCHKUNPK(oduPackUInt8, ¶m->isTBMsg4, mBuf);
6324 printf("1. cmUnpkTfudciformat61aPdsch :: Passed \n");
6327 /***********************************************************
6329 * Func : cmUnpkTfuDirectIndication
6332 * Desc : This structure contains the information that is carried in DCI
6333 * format 6-2 in the case of a Direct information indication.
6342 **********************************************************/
6344 PRIVATE S16 cmUnpkTfuDirectIndication
6346 TfuDirectIndication *param,
6350 PRIVATE S16 cmUnpkTfuDirectIndication(param, mBuf)
6351 TfuDirectIndication *param;
6356 TRC3(cmUnpkTfuDirectIndication)
6357 CMCHKUNPK(oduPackUInt8, ¶m->directInd, mBuf);
6363 /***********************************************************
6365 * Func : cmUnpkTfuDciFormat62AllocInfo
6368 * Desc : This structure contains only the allocation information, that is part
6369 * of DCI format 6-2.
6370 * @details Allocation information also contains parameters necessary
6371 * for Physical layer to process Downlink data. This structure accompanies the
6372 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6373 * @sa TfuDciFormat62Info
6382 **********************************************************/
6384 S16 cmUnpkTfuDciFormat62AllocInfo
6386 TfuDciFormat62AllocInfo *param,
6390 S16 cmUnpkTfuDciFormat62AllocInfo(param, mBuf)
6391 TfuDciFormat62AllocInfo *param;
6395 TRC3(cmUnpkTfuDciFormat62AllocInfo)
6396 CMCHKUNPK(oduPackUInt8, ¶m->riv, mBuf);
6397 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
6398 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
6403 /***********************************************************
6405 * Func : cmUnpkTfudciformat62Pdsch
6408 * Desc : This structure contains the information carried in DCI format 6-2
6409 * when It is used for Paging message.
6418 **********************************************************/
6420 PRIVATE S16 cmUnpkTfudciformat62Pdsch
6422 Tfudciformat62Pdsch *param,
6426 PRIVATE S16 cmUnpkTfudciformat62Pdsch(param, mBuf)
6427 Tfudciformat62Pdsch *param;
6432 TRC3(cmUnpkTfudciformat62Pdsch)
6435 CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf);
6436 CMCHKUNPK(oduPackUInt8, ¶m->repNum, mBuf);
6437 CMCHKUNPK(oduPackUInt8, ¶m->dciSubRepNum, mBuf);
6442 /***********************************************************
6444 * Func : cmUnpkTfuDciFormat62Info
6447 * Desc : This structure contains the information needed to convey DCI format 6-2.
6448 * @details Format can possibly carry PDSCH allocation or information needed for
6449 * a Direct information Indication.
6459 **********************************************************/
6461 S16 cmUnpkTfuDciFormat62Info
6463 TfuDciFormat62Info *param,
6467 S16 cmUnpkTfuDciFormat62Info(param, mBuf)
6468 TfuDciFormat62Info *param;
6473 TRC3(cmUnpkTfuDciFormat62Info)
6474 CMCHKUNPK(oduPackUInt8, ¶m->isPaging, mBuf);
6475 switch(param->isPaging) {
6477 CMCHKUNPK(cmUnpkTfuDirectIndication, ¶m->t.directIndication, mBuf);
6480 CMCHKUNPK(cmUnpkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf);
6501 /***********************************************************
6503 * Func : cmPkTfuDirectIndication
6506 * Desc : This structure contains the information that is carried in DCI
6507 * format 6-2 in the case of a Direct information indication.
6516 **********************************************************/
6518 PRIVATE S16 cmPkTfuDirectIndication
6520 TfuDirectIndication *param,
6524 PRIVATE S16 cmPkTfuDirectIndication(param, mBuf)
6525 TfuDirectIndication *param;
6530 TRC3(cmPkTfuDirectIndication)
6531 CMCHKPK(oduUnpackUInt8, param->directInd, mBuf);
6539 /***********************************************************
6541 * Func : cmPkTfuDciFormat62AllocInfo
6544 * Desc : This structure contains only the allocation information, that is part
6545 * of DCI format 6-2.
6546 * @details Allocation information also contains parameters necessary
6547 * for Physical layer to process Downlink data. This structure accompanies the
6548 * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
6549 * @sa TfuDciFormat62Info
6558 **********************************************************/
6560 S16 cmPkTfuDciFormat62AllocInfo
6562 TfuDciFormat62AllocInfo *param,
6566 S16 cmPkTfuDciFormat62AllocInfo(param, mBuf)
6567 TfuDciFormat62AllocInfo *param;
6572 TRC3(cmPkTfuDciFormat6AAllocInfo)
6574 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
6575 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
6576 CMCHKPK(oduUnpackUInt8, param->riv, mBuf);
6583 /***********************************************************
6585 * Func : cmPkTfudciformat62Pdsch
6588 * Desc : This structure contains the information carried in DCI format 6-2
6589 * when It is used for Paging message.
6598 **********************************************************/
6600 PRIVATE S16 cmPkTfudciformat62Pdsch
6602 Tfudciformat62Pdsch *param,
6606 PRIVATE S16 cmPkTfudciformat62Pdsch(param, mBuf)
6607 Tfudciformat62Pdsch *param;
6612 TRC3(cmPkTfudciformat62Pdsch)
6613 CMCHKPK(oduUnpackUInt8, param->dciSubRepNum, mBuf);
6614 CMCHKPK(oduUnpackUInt8, param->repNum, mBuf);
6615 CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->format62AllocInfo, mBuf);
6622 /***********************************************************
6624 * Func : cmPkTfuDciFormat62Info
6627 * Desc : This structure contains the information needed to convey DCI format 6-2.
6628 * @details Format can possibly carry PDSCH allocation or information needed for
6629 * a Direct information Indication.
6639 **********************************************************/
6641 S16 cmPkTfuDciFormat62Info
6643 TfuDciFormat62Info *param,
6647 S16 cmPkTfuDciFormat62Info(param, mBuf)
6648 TfuDciFormat62Info *param;
6653 TRC3(cmPkTfuDciFormat62Info)
6655 switch(param->isPaging) {
6657 CMCHKPK(cmPkTfudciformat62Pdsch, ¶m->t.pdschInfo, mBuf);
6660 CMCHKPK(cmPkTfuDirectIndication, ¶m->t.directIndication, mBuf);
6665 CMCHKPK(oduUnpackUInt8, param->isPaging, mBuf);
6678 /***********************************************************
6680 * Func : cmPkTfuDciFormat1aInfo
6683 * Desc : This structure contains the information needed to convey DCI format 1A.
6684 * @details Format can possibly carry PDSCH allocation or information needed for
6685 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
6695 **********************************************************/
6697 S16 cmPkTfuDciFormat1aInfo
6699 TfuDciFormat1aInfo *param,
6703 S16 cmPkTfuDciFormat1aInfo(param, mBuf)
6704 TfuDciFormat1aInfo *param;
6709 TRC3(cmPkTfuDciFormat1aInfo)
6711 switch(param->isPdcchOrder) {
6713 CMCHKPK(cmPkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf);
6716 CMCHKPK(cmPkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf);
6721 CMCHKPK(oduUnpackUInt8, param->isPdcchOrder, mBuf);
6728 /***********************************************************
6730 * Func : cmUnpkTfuDciFormat1aInfo
6733 * Desc : This structure contains the information needed to convey DCI format 1A.
6734 * @details Format can possibly carry PDSCH allocation or information needed for
6735 * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
6745 **********************************************************/
6747 S16 cmUnpkTfuDciFormat1aInfo
6749 TfuDciFormat1aInfo *param,
6753 S16 cmUnpkTfuDciFormat1aInfo(param, mBuf)
6754 TfuDciFormat1aInfo *param;
6759 TRC3(cmUnpkTfuDciFormat1aInfo)
6761 CMCHKUNPK(oduPackUInt8, ¶m->isPdcchOrder, mBuf);
6762 switch(param->isPdcchOrder) {
6764 CMCHKUNPK(cmUnpkTfuPdcchOrderInfo, ¶m->t.pdcchOrder, mBuf);
6767 CMCHKUNPK(cmUnpkTfudciformat1aPdsch, ¶m->t.pdschInfo, mBuf);
6777 /***********************************************************
6779 * Func : cmPkTfuDciFormat1bInfo
6782 * Desc : This structure contains the information needed to convey DCI format 1A.
6783 * @details Allocation information is separated from the other control
6784 * information carried in this format. This separation is needed as Data shall
6785 * also carry some control information, essentially allocation information,
6786 * along with it, in order to aid physical layer processing of the data.
6795 **********************************************************/
6797 S16 cmPkTfuDciFormat1bInfo
6799 TfuDciFormat1bInfo *param,
6803 S16 cmPkTfuDciFormat1bInfo(param, mBuf)
6804 TfuDciFormat1bInfo *param;
6809 TRC3(cmPkTfuDciFormat1bInfo)
6811 CMCHKPK(oduUnpackUInt8, param->tpcCmd, mBuf);
6814 CMCHKPK(oduUnpackUInt8, param->dai, mBuf);
6817 CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf);
6823 /***********************************************************
6825 * Func : cmUnpkTfuDciFormat1bInfo
6828 * Desc : This structure contains the information needed to convey DCI format 1A.
6829 * @details Allocation information is separated from the other control
6830 * information carried in this format. This separation is needed as Data shall
6831 * also carry some control information, essentially allocation information,
6832 * along with it, in order to aid physical layer processing of the data.
6841 **********************************************************/
6843 S16 cmUnpkTfuDciFormat1bInfo
6845 TfuDciFormat1bInfo *param,
6849 S16 cmUnpkTfuDciFormat1bInfo(param, mBuf)
6850 TfuDciFormat1bInfo *param;
6855 TRC3(cmUnpkTfuDciFormat1bInfo)
6857 CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->allocInfo, mBuf);
6860 CMCHKUNPK(oduPackUInt8, ¶m->dai, mBuf);
6863 CMCHKUNPK(oduPackUInt8, ¶m->tpcCmd, mBuf);
6869 /***********************************************************
6871 * Func : cmPkTfuDciInfo
6874 * Desc : This structure contains the information needed to convey the possible DCI
6875 * formats. The following are the supported formats -
6876 * -# Format 0 - used for PUSCH scheduling
6877 * -# Format 1 - used for PDSCH scheduling
6878 * -# Format 1A - used for compact scheduling of PDSCH or RA procedure
6879 * intitiated by a PDCCH order.
6880 * -# Format 1B - used for compact scheduling of PDSCH with precoding
6882 * -# Format 1C - used for very compact scheduling of PDSCH.
6883 * -# Format 1D - used for compact scheduling for PDSCH with precoding
6884 * information with power offset.
6885 * -# Format 2 - used for PDSCH Scheduling
6886 * -# Format 2A - used for PDSCH Scheduling
6887 * -# Format 3 - used for power control
6888 * -# Format 3A - used for power control
6897 **********************************************************/
6905 S16 cmPkTfuDciInfo(param, mBuf)
6911 TRC3(cmPkTfuDciInfo)
6913 switch(param->dciFormat) {
6915 case TFU_DCI_FORMAT_B1:
6916 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
6918 case TFU_DCI_FORMAT_B2:
6919 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
6921 case TFU_DCI_FORMAT_A1:
6922 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
6924 case TFU_DCI_FORMAT_A2:
6925 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
6929 case TFU_DCI_FORMAT_6_2:
6930 CMCHKPK(cmPkTfuDciFormat62Info, ¶m->u.format62Info, mBuf);
6932 case TFU_DCI_FORMAT_6_1A:
6933 CMCHKPK(cmPkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf);
6935 case TFU_DCI_FORMAT_6_0A:
6936 CMCHKPK(cmPkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf);
6939 case TFU_DCI_FORMAT_3A:
6940 CMCHKPK(cmPkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf);
6942 case TFU_DCI_FORMAT_3:
6943 CMCHKPK(cmPkTfuDciFormat3Info, ¶m->u.format3Info, mBuf);
6945 case TFU_DCI_FORMAT_2A:
6946 CMCHKPK(cmPkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf);
6948 case TFU_DCI_FORMAT_2:
6949 CMCHKPK(cmPkTfuDciFormat2Info, ¶m->u.format2Info, mBuf);
6951 case TFU_DCI_FORMAT_1D:
6952 CMCHKPK(cmPkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf);
6954 case TFU_DCI_FORMAT_1C:
6955 CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf);
6957 case TFU_DCI_FORMAT_1B:
6958 CMCHKPK(cmPkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf);
6960 case TFU_DCI_FORMAT_1A:
6961 CMCHKPK(cmPkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf);
6963 case TFU_DCI_FORMAT_1:
6964 CMCHKPK(cmPkTfuDciFormat1Info, ¶m->u.format1Info, mBuf);
6966 case TFU_DCI_FORMAT_0:
6967 CMCHKPK(cmPkTfuDciFormat0Info, ¶m->u.format0Info, mBuf);
6972 CMCHKPK(oduUnpackUInt32, param->dciFormat, mBuf);
6978 /***********************************************************
6980 * Func : cmUnpkTfuDciInfo
6983 * Desc : This structure contains the information needed to convey the possible DCI
6984 * formats. The following are the supported formats -
6985 * -# Format 0 - used for PUSCH scheduling
6986 * -# Format 1 - used for PDSCH scheduling
6987 * -# Format 1A - used for compact scheduling of PDSCH or RA procedure
6988 * intitiated by a PDCCH order.
6989 * -# Format 1B - used for compact scheduling of PDSCH with precoding
6991 * -# Format 1C - used for very compact scheduling of PDSCH.
6992 * -# Format 1D - used for compact scheduling for PDSCH with precoding
6993 * information with power offset.
6994 * -# Format 2 - used for PDSCH Scheduling
6995 * -# Format 2A - used for PDSCH Scheduling
6996 * -# Format 3 - used for power control
6997 * -# Format 3A - used for power control
7006 **********************************************************/
7008 S16 cmUnpkTfuDciInfo
7014 S16 cmUnpkTfuDciInfo(param, mBuf)
7020 TRC3(cmUnpkTfuDciInfo)
7023 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->dciFormat, mBuf);
7024 switch(param->dciFormat) {
7025 case TFU_DCI_FORMAT_0:
7026 CMCHKUNPK(cmUnpkTfuDciFormat0Info, ¶m->u.format0Info, mBuf);
7028 case TFU_DCI_FORMAT_1:
7029 CMCHKUNPK(cmUnpkTfuDciFormat1Info, ¶m->u.format1Info, mBuf);
7031 case TFU_DCI_FORMAT_1A:
7032 CMCHKUNPK(cmUnpkTfuDciFormat1aInfo, ¶m->u.format1aInfo, mBuf);
7034 case TFU_DCI_FORMAT_1B:
7035 CMCHKUNPK(cmUnpkTfuDciFormat1bInfo, ¶m->u.format1bInfo, mBuf);
7037 case TFU_DCI_FORMAT_1C:
7038 CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cInfo, mBuf);
7040 case TFU_DCI_FORMAT_1D:
7041 CMCHKUNPK(cmUnpkTfuDciFormat1dInfo, ¶m->u.format1dInfo, mBuf);
7043 case TFU_DCI_FORMAT_2:
7044 CMCHKUNPK(cmUnpkTfuDciFormat2Info, ¶m->u.format2Info, mBuf);
7046 case TFU_DCI_FORMAT_2A:
7047 CMCHKUNPK(cmUnpkTfuDciFormat2AInfo, ¶m->u.format2AInfo, mBuf);
7049 case TFU_DCI_FORMAT_3:
7050 CMCHKUNPK(cmUnpkTfuDciFormat3Info, ¶m->u.format3Info, mBuf);
7052 case TFU_DCI_FORMAT_3A:
7053 CMCHKUNPK(cmUnpkTfuDciFormat3AInfo, ¶m->u.format3AInfo, mBuf);
7056 case TFU_DCI_FORMAT_6_0A:
7057 CMCHKUNPK(cmUnpkTfuDciFormat60aInfo, ¶m->u.format60aInfo, mBuf);
7058 printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat);
7060 case TFU_DCI_FORMAT_6_1A:
7061 CMCHKUNPK(cmUnpkTfuDciFormat61aInfo, ¶m->u.format61aInfo, mBuf);
7062 printf("2. cmUnpkTfuDciInfo :: dciFormat %d \n", param->dciFormat);
7064 case TFU_DCI_FORMAT_6_2:
7065 CMCHKUNPK(cmUnpkTfuDciFormat62Info, ¶m->u.format62Info, mBuf);
7070 case TFU_DCI_FORMAT_A1:
7071 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
7073 case TFU_DCI_FORMAT_A2:
7074 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
7076 case TFU_DCI_FORMAT_B1:
7077 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
7079 case TFU_DCI_FORMAT_B2:
7080 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
7091 /***********************************************************
7093 * Func : cmPkTfuSubbandInfo
7096 * Desc : This structure contains the information needed to convey the start and size
7097 * of the subband in the CQI report.
7106 **********************************************************/
7108 S16 cmPkTfuSubbandInfo
7110 TfuSubbandInfo *param,
7114 S16 cmPkTfuSubbandInfo(param, mBuf)
7115 TfuSubbandInfo *param;
7120 TRC3(cmPkTfuSubbandInfo)
7122 CMCHKPK(oduUnpackUInt8, param->numRb, mBuf);
7123 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
7129 /***********************************************************
7131 * Func : cmUnpkTfuSubbandInfo
7134 * Desc : This structure contains the information needed to convey the start and size
7135 * of the subband in the CQI report.
7144 **********************************************************/
7146 S16 cmUnpkTfuSubbandInfo
7148 TfuSubbandInfo *param,
7152 S16 cmUnpkTfuSubbandInfo(param, mBuf)
7153 TfuSubbandInfo *param;
7158 TRC3(cmUnpkTfuSubbandInfo)
7160 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
7161 CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf);
7168 /***********************************************************
7170 * Func : cmPkTfuSubbandCqiInfo
7173 * Desc : This structure is used to convey the subbannd CQI reported.
7182 **********************************************************/
7184 S16 cmPkTfuSubbandCqiInfo
7186 TfuSubbandCqiInfo *param,
7190 S16 cmPkTfuSubbandCqiInfo(param, mBuf)
7191 TfuSubbandCqiInfo *param;
7196 TRC3(cmPkTfuSubbandCqiInfo)
7198 CMCHKPK(oduUnpackUInt8, param->cqiIdx, mBuf);
7199 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf);
7205 /***********************************************************
7207 * Func : cmUnpkTfuSubbandCqiInfo
7210 * Desc : This structure is used to convey the subbannd CQI reported.
7219 **********************************************************/
7221 S16 cmUnpkTfuSubbandCqiInfo
7223 TfuSubbandCqiInfo *param,
7227 S16 cmUnpkTfuSubbandCqiInfo(param, mBuf)
7228 TfuSubbandCqiInfo *param;
7233 TRC3(cmUnpkTfuSubbandCqiInfo)
7235 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf);
7236 CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx, mBuf);
7242 /***********************************************************
7244 * Func : cmPkTfuPdcchCceInfo
7247 * Desc : This structure conveys the CCE information.
7256 **********************************************************/
7258 S16 cmPkTfuPdcchCceInfo
7260 TfuPdcchCceInfo *param,
7264 S16 cmPkTfuPdcchCceInfo(param, mBuf)
7265 TfuPdcchCceInfo *param;
7270 TRC3(cmPkTfuPdcchCceInfo)
7272 CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf);
7273 CMCHKPK(oduUnpackUInt8, param->cceIdx, mBuf);
7279 /***********************************************************
7281 * Func : cmUnpkTfuPdcchCceInfo
7284 * Desc : This structure conveys the CCE information.
7293 **********************************************************/
7295 S16 cmUnpkTfuPdcchCceInfo
7297 TfuPdcchCceInfo *param,
7301 S16 cmUnpkTfuPdcchCceInfo(param, mBuf)
7302 TfuPdcchCceInfo *param;
7307 TRC3(cmUnpkTfuPdcchCceInfo)
7309 CMCHKUNPK(oduPackUInt8, ¶m->cceIdx, mBuf);
7310 CMCHKUNPK(cmUnpkLteAggrLvl,(U32 *)¶m->aggrLvl, mBuf);
7316 /***********************************************************
7318 * Func : cmPkTfuCqiPucchMode10
7321 * Desc : This structure maps to the CQI mode 10. The report could either
7322 * convey a Rank index or a wideband CQI.
7331 **********************************************************/
7333 S16 cmPkTfuCqiPucchMode10
7335 TfuCqiPucchMode10 *param,
7339 S16 cmPkTfuCqiPucchMode10(param, mBuf)
7340 TfuCqiPucchMode10 *param;
7345 TRC3(cmPkTfuCqiPucchMode10)
7347 switch(param->type) {
7349 CMCHKPK(oduUnpackUInt8, param->u.cqi, mBuf);
7352 CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf);
7357 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
7363 /***********************************************************
7365 * Func : cmUnpkTfuCqiPucchMode10
7368 * Desc : This structure maps to the CQI mode 10. The report could either
7369 * convey a Rank index or a wideband CQI.
7378 **********************************************************/
7380 S16 cmUnpkTfuCqiPucchMode10
7382 TfuCqiPucchMode10 *param,
7386 S16 cmUnpkTfuCqiPucchMode10(param, mBuf)
7387 TfuCqiPucchMode10 *param;
7392 TRC3(cmUnpkTfuCqiPucchMode10)
7394 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
7395 switch(param->type) {
7397 CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf);
7400 CMCHKUNPK(oduPackUInt8, ¶m->u.cqi, mBuf);
7410 /***********************************************************
7412 * Func : cmPkTfuCqiMode11Cqi
7415 * Desc : This structure contains a wideband CQI, PMI and optionally a
7416 * wideband differential CQI.
7425 **********************************************************/
7427 S16 cmPkTfuCqiMode11Cqi
7429 TfuCqiMode11Cqi *param,
7433 S16 cmPkTfuCqiMode11Cqi(param, mBuf)
7434 TfuCqiMode11Cqi *param;
7439 TRC3(cmPkTfuCqiMode11Cqi)
7441 CMCHKPK(cmPkTknU8, ¶m->wideDiffCqi, mBuf);
7442 CMCHKPK(oduUnpackUInt8, param->pmi, mBuf);
7443 CMCHKPK(oduUnpackUInt8, param->cqi, mBuf);
7449 /***********************************************************
7451 * Func : cmUnpkTfuCqiMode11Cqi
7454 * Desc : This structure contains a wideband CQI, PMI and optionally a
7455 * wideband differential CQI.
7464 **********************************************************/
7466 S16 cmUnpkTfuCqiMode11Cqi
7468 TfuCqiMode11Cqi *param,
7472 S16 cmUnpkTfuCqiMode11Cqi(param, mBuf)
7473 TfuCqiMode11Cqi *param;
7478 TRC3(cmUnpkTfuCqiMode11Cqi)
7480 CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf);
7481 CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf);
7482 CMCHKUNPK(cmUnpkTknU8, ¶m->wideDiffCqi, mBuf);
7488 /***********************************************************
7490 * Func : cmPkTfuCqiPucchMode11
7493 * Desc : This structure maps to the CQI mode 11. The report could either
7494 * convey a Rank index or a CQI report.
7503 **********************************************************/
7505 S16 cmPkTfuCqiPucchMode11
7507 TfuCqiPucchMode11 *param,
7511 S16 cmPkTfuCqiPucchMode11(param, mBuf)
7512 TfuCqiPucchMode11 *param;
7517 TRC3(cmPkTfuCqiPucchMode11)
7519 switch(param->type) {
7521 CMCHKPK(cmPkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf);
7524 CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf);
7529 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
7535 /***********************************************************
7537 * Func : cmUnpkTfuCqiPucchMode11
7540 * Desc : This structure maps to the CQI mode 11. The report could either
7541 * convey a Rank index or a CQI report.
7550 **********************************************************/
7552 S16 cmUnpkTfuCqiPucchMode11
7554 TfuCqiPucchMode11 *param,
7558 S16 cmUnpkTfuCqiPucchMode11(param, mBuf)
7559 TfuCqiPucchMode11 *param;
7564 TRC3(cmUnpkTfuCqiPucchMode11)
7566 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
7567 switch(param->type) {
7569 CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf);
7572 CMCHKUNPK(cmUnpkTfuCqiMode11Cqi, ¶m->u.cqi, mBuf);
7582 /***********************************************************
7584 * Func : cmPkTfuCqiMode20SubCqi
7587 * Desc : This structure contains the SubBand CQI for mode 2-0.
7596 **********************************************************/
7598 S16 cmPkTfuCqiMode20SubCqi
7600 TfuCqiMode20SubCqi *param,
7604 S16 cmPkTfuCqiMode20SubCqi(param, mBuf)
7605 TfuCqiMode20SubCqi *param;
7610 TRC3(cmPkTfuCqiMode20SubCqi)
7612 CMCHKPK(oduUnpackUInt8, param->l, mBuf);
7613 CMCHKPK(oduUnpackUInt8, param->cqi, mBuf);
7619 /***********************************************************
7621 * Func : cmUnpkTfuCqiMode20SubCqi
7624 * Desc : This structure contains the SubBand CQI for mode 2-0.
7633 **********************************************************/
7635 S16 cmUnpkTfuCqiMode20SubCqi
7637 TfuCqiMode20SubCqi *param,
7641 S16 cmUnpkTfuCqiMode20SubCqi(param, mBuf)
7642 TfuCqiMode20SubCqi *param;
7647 TRC3(cmUnpkTfuCqiMode20SubCqi)
7649 CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf);
7650 CMCHKUNPK(oduPackUInt8, ¶m->l, mBuf);
7656 /***********************************************************
7658 * Func : cmPkTfuCqiMode20Cqi
7661 * Desc : This structure contains Mode20 CQI report. It could either be a
7662 * wideband CQI or a sub-band CQI.
7671 **********************************************************/
7673 S16 cmPkTfuCqiMode20Cqi
7675 TfuCqiMode20Cqi *param,
7679 S16 cmPkTfuCqiMode20Cqi(param, mBuf)
7680 TfuCqiMode20Cqi *param;
7685 TRC3(cmPkTfuCqiMode20Cqi)
7687 switch(param->isWideband) {
7689 CMCHKPK(cmPkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf);
7692 CMCHKPK(oduUnpackUInt8, param->u.wideCqi, mBuf);
7697 CMCHKPK(oduUnpackUInt8, param->isWideband, mBuf);
7703 /***********************************************************
7705 * Func : cmUnpkTfuCqiMode20Cqi
7708 * Desc : This structure contains Mode20 CQI report. It could either be a
7709 * wideband CQI or a sub-band CQI.
7718 **********************************************************/
7720 S16 cmUnpkTfuCqiMode20Cqi
7722 TfuCqiMode20Cqi *param,
7726 S16 cmUnpkTfuCqiMode20Cqi(param, mBuf)
7727 TfuCqiMode20Cqi *param;
7732 TRC3(cmUnpkTfuCqiMode20Cqi)
7734 CMCHKUNPK(oduPackUInt8, ¶m->isWideband, mBuf);
7735 switch(param->isWideband) {
7737 CMCHKUNPK(oduPackUInt8, ¶m->u.wideCqi, mBuf);
7740 CMCHKUNPK(cmUnpkTfuCqiMode20SubCqi, ¶m->u.subCqi, mBuf);
7750 /***********************************************************
7752 * Func : cmPkTfuCqiPucchMode20
7755 * Desc : This structure maps to CQI mode 20. The report either contains a
7756 * Rank Index or a CQI report.
7765 **********************************************************/
7767 S16 cmPkTfuCqiPucchMode20
7769 TfuCqiPucchMode20 *param,
7773 S16 cmPkTfuCqiPucchMode20(param, mBuf)
7774 TfuCqiPucchMode20 *param;
7779 TRC3(cmPkTfuCqiPucchMode20)
7781 switch(param->type) {
7783 CMCHKPK(cmPkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf);
7786 CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf);
7791 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
7797 /***********************************************************
7799 * Func : cmUnpkTfuCqiPucchMode20
7802 * Desc : This structure maps to CQI mode 20. The report either contains a
7803 * Rank Index or a CQI report.
7812 **********************************************************/
7814 S16 cmUnpkTfuCqiPucchMode20
7816 TfuCqiPucchMode20 *param,
7820 S16 cmUnpkTfuCqiPucchMode20(param, mBuf)
7821 TfuCqiPucchMode20 *param;
7826 TRC3(cmUnpkTfuCqiPucchMode20)
7828 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
7829 switch(param->type) {
7831 CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf);
7834 CMCHKUNPK(cmUnpkTfuCqiMode20Cqi, ¶m->u.cqi, mBuf);
7844 /***********************************************************
7846 * Func : cmPkTfuCqiMode21SubCqi
7849 * Desc : This structure contains the sub-band CQI report for mode 2-1.
7850 * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
7859 **********************************************************/
7861 S16 cmPkTfuCqiMode21SubCqi
7863 TfuCqiMode21SubCqi *param,
7867 S16 cmPkTfuCqiMode21SubCqi(param, mBuf)
7868 TfuCqiMode21SubCqi *param;
7873 TRC3(cmPkTfuCqiMode21SubCqi)
7875 CMCHKPK(cmPkTknU8, ¶m->diffCqi, mBuf);
7876 CMCHKPK(oduUnpackUInt8, param->l, mBuf);
7877 CMCHKPK(oduUnpackUInt8, param->cqi, mBuf);
7883 /***********************************************************
7885 * Func : cmUnpkTfuCqiMode21SubCqi
7888 * Desc : This structure contains the sub-band CQI report for mode 2-1.
7889 * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
7898 **********************************************************/
7900 S16 cmUnpkTfuCqiMode21SubCqi
7902 TfuCqiMode21SubCqi *param,
7906 S16 cmUnpkTfuCqiMode21SubCqi(param, mBuf)
7907 TfuCqiMode21SubCqi *param;
7912 TRC3(cmUnpkTfuCqiMode21SubCqi)
7914 CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf);
7915 CMCHKUNPK(oduPackUInt8, ¶m->l, mBuf);
7916 CMCHKUNPK(cmUnpkTknU8, ¶m->diffCqi, mBuf);
7922 /***********************************************************
7924 * Func : cmPkTfuCqiMode21WideCqi
7927 * Desc : This structure contains the wideband CQI report for mode 2-1.
7928 * It carries a wideband CQI, PMI and optionally a differential CQI.
7937 **********************************************************/
7939 S16 cmPkTfuCqiMode21WideCqi
7941 TfuCqiMode21WideCqi *param,
7945 S16 cmPkTfuCqiMode21WideCqi(param, mBuf)
7946 TfuCqiMode21WideCqi *param;
7951 TRC3(cmPkTfuCqiMode21WideCqi)
7953 CMCHKPK(cmPkTknU8, ¶m->diffCqi, mBuf);
7954 CMCHKPK(oduUnpackUInt8, param->pmi, mBuf);
7955 CMCHKPK(oduUnpackUInt8, param->cqi, mBuf);
7961 /***********************************************************
7963 * Func : cmUnpkTfuCqiMode21WideCqi
7966 * Desc : This structure contains the wideband CQI report for mode 2-1.
7967 * It carries a wideband CQI, PMI and optionally a differential CQI.
7976 **********************************************************/
7978 S16 cmUnpkTfuCqiMode21WideCqi
7980 TfuCqiMode21WideCqi *param,
7984 S16 cmUnpkTfuCqiMode21WideCqi(param, mBuf)
7985 TfuCqiMode21WideCqi *param;
7990 TRC3(cmUnpkTfuCqiMode21WideCqi)
7992 CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf);
7993 CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf);
7994 CMCHKUNPK(cmUnpkTknU8, ¶m->diffCqi, mBuf);
8000 /***********************************************************
8002 * Func : cmPkTfuCqiMode21Cqi
8005 * Desc : This structure conveys CQI report for mode 2-1. The reported value
8006 * could either be wideband or sub-band.
8015 **********************************************************/
8017 S16 cmPkTfuCqiMode21Cqi
8019 TfuCqiMode21Cqi *param,
8023 S16 cmPkTfuCqiMode21Cqi(param, mBuf)
8024 TfuCqiMode21Cqi *param;
8029 TRC3(cmPkTfuCqiMode21Cqi)
8031 switch(param->isWideband) {
8033 CMCHKPK(cmPkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf);
8036 CMCHKPK(cmPkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf);
8041 CMCHKPK(oduUnpackUInt8, param->isWideband, mBuf);
8047 /***********************************************************
8049 * Func : cmUnpkTfuCqiMode21Cqi
8052 * Desc : This structure conveys CQI report for mode 2-1. The reported value
8053 * could either be wideband or sub-band.
8062 **********************************************************/
8064 S16 cmUnpkTfuCqiMode21Cqi
8066 TfuCqiMode21Cqi *param,
8070 S16 cmUnpkTfuCqiMode21Cqi(param, mBuf)
8071 TfuCqiMode21Cqi *param;
8076 TRC3(cmUnpkTfuCqiMode21Cqi)
8078 CMCHKUNPK(oduPackUInt8, ¶m->isWideband, mBuf);
8079 switch(param->isWideband) {
8081 CMCHKUNPK(cmUnpkTfuCqiMode21WideCqi, ¶m->u.wideCqi, mBuf);
8084 CMCHKUNPK(cmUnpkTfuCqiMode21SubCqi, ¶m->u.subCqi, mBuf);
8094 /***********************************************************
8096 * Func : cmPkTfuCqiPucchMode21
8099 * Desc : This structure maps to the CQI reporting mode 2-1. The report either
8100 * conveys a Rank Indicator or a CQI report.
8109 **********************************************************/
8111 S16 cmPkTfuCqiPucchMode21
8113 TfuCqiPucchMode21 *param,
8117 S16 cmPkTfuCqiPucchMode21(param, mBuf)
8118 TfuCqiPucchMode21 *param;
8123 TRC3(cmPkTfuCqiPucchMode21)
8125 switch(param->type) {
8127 CMCHKPK(cmPkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf);
8130 CMCHKPK(oduUnpackUInt8, param->u.ri, mBuf);
8135 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
8141 /***********************************************************
8143 * Func : cmUnpkTfuCqiPucchMode21
8146 * Desc : This structure maps to the CQI reporting mode 2-1. The report either
8147 * conveys a Rank Indicator or a CQI report.
8156 **********************************************************/
8158 S16 cmUnpkTfuCqiPucchMode21
8160 TfuCqiPucchMode21 *param,
8164 S16 cmUnpkTfuCqiPucchMode21(param, mBuf)
8165 TfuCqiPucchMode21 *param;
8170 TRC3(cmUnpkTfuCqiPucchMode21)
8172 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
8173 switch(param->type) {
8175 CMCHKUNPK(oduPackUInt8, ¶m->u.ri, mBuf);
8178 CMCHKUNPK(cmUnpkTfuCqiMode21Cqi, ¶m->u.cqi, mBuf);
8188 /***********************************************************
8190 * Func : cmPkTfuDlCqiPucch
8193 * Desc : This structure conveys the Downlink CQI reported on PUCCH.
8202 **********************************************************/
8204 S16 cmPkTfuDlCqiPucch
8206 TfuDlCqiPucch *param,
8210 S16 cmPkTfuDlCqiPucch(param, mBuf)
8211 TfuDlCqiPucch *param;
8216 TRC3(cmPkTfuDlCqiPucch)
8218 switch(param->mode) {
8219 case TFU_PUCCH_CQI_MODE21:
8220 CMCHKPK(cmPkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf);
8222 case TFU_PUCCH_CQI_MODE20:
8223 CMCHKPK(cmPkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf);
8225 case TFU_PUCCH_CQI_MODE11:
8226 CMCHKPK(cmPkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf);
8228 case TFU_PUCCH_CQI_MODE10:
8229 CMCHKPK(cmPkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf);
8234 CMCHKPK(oduUnpackUInt32, param->mode, mBuf);
8235 CMCHKPK(oduUnpackUInt8, param->cellIdx, mBuf);
8241 /***********************************************************
8243 * Func : cmUnpkTfuDlCqiPucch
8246 * Desc : This structure conveys the Downlink CQI reported on PUCCH.
8255 **********************************************************/
8257 S16 cmUnpkTfuDlCqiPucch
8259 TfuDlCqiPucch *param,
8263 S16 cmUnpkTfuDlCqiPucch(param, mBuf)
8264 TfuDlCqiPucch *param;
8269 TRC3(cmUnpkTfuDlCqiPucch)
8271 CMCHKUNPK(oduPackUInt8, ¶m->cellIdx, mBuf);
8272 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->mode, mBuf);
8273 switch(param->mode) {
8274 case TFU_PUCCH_CQI_MODE10:
8275 CMCHKUNPK(cmUnpkTfuCqiPucchMode10, ¶m->u.mode10Info, mBuf);
8277 case TFU_PUCCH_CQI_MODE11:
8278 CMCHKUNPK(cmUnpkTfuCqiPucchMode11, ¶m->u.mode11Info, mBuf);
8280 case TFU_PUCCH_CQI_MODE20:
8281 CMCHKUNPK(cmUnpkTfuCqiPucchMode20, ¶m->u.mode20Info, mBuf);
8283 case TFU_PUCCH_CQI_MODE21:
8284 CMCHKUNPK(cmUnpkTfuCqiPucchMode21, ¶m->u.mode21Info, mBuf);
8294 /***********************************************************
8296 * Func : cmPkTfuSubbandMode12
8299 * Desc : This structure carries subband information and PMI, in the CQI
8300 * reporting format 1-2.
8309 **********************************************************/
8311 S16 cmPkTfuSubbandMode12
8313 TfuSubbandMode12 *param,
8317 S16 cmPkTfuSubbandMode12(param, mBuf)
8318 TfuSubbandMode12 *param;
8323 TRC3(cmPkTfuSubbandMode12)
8325 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8326 CMCHKPK(oduUnpackUInt8, param->pmi, mBuf);
8332 /***********************************************************
8334 * Func : cmUnpkTfuSubbandMode12
8337 * Desc : This structure carries subband information and PMI, in the CQI
8338 * reporting format 1-2.
8347 **********************************************************/
8349 S16 cmUnpkTfuSubbandMode12
8351 TfuSubbandMode12 *param,
8355 S16 cmUnpkTfuSubbandMode12(param, mBuf)
8356 TfuSubbandMode12 *param;
8361 TRC3(cmUnpkTfuSubbandMode12)
8363 CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf);
8364 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8370 /***********************************************************
8372 * Func : cmPkTfuCqiPuschMode12
8375 * Desc : This structure conveys information present in CQI reporting mode 1-2 received
8385 **********************************************************/
8387 S16 cmPkTfuCqiPuschMode12
8389 TfuCqiPuschMode12 *param,
8393 S16 cmPkTfuCqiPuschMode12(param, mBuf)
8394 TfuCqiPuschMode12 *param;
8400 TRC3(cmPkTfuCqiPuschMode12)
8402 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8403 CMCHKPK(cmPkTfuSubbandMode12, ¶m->subbandArr[i], mBuf);
8405 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8406 CMCHKPK(oduUnpackUInt8, param->cqiIdx[i], mBuf);
8408 CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf);
8414 /***********************************************************
8416 * Func : cmUnpkTfuCqiPuschMode12
8419 * Desc : This structure conveys information present in CQI reporting mode 1-2 received
8429 **********************************************************/
8431 S16 cmUnpkTfuCqiPuschMode12
8433 TfuCqiPuschMode12 *param,
8437 S16 cmUnpkTfuCqiPuschMode12(param, mBuf)
8438 TfuCqiPuschMode12 *param;
8444 TRC3(cmUnpkTfuCqiPuschMode12)
8446 CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf);
8447 for (i=0; i<TFU_MAX_TB; i++) {
8448 CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx[i], mBuf);
8450 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8451 CMCHKUNPK(cmUnpkTfuSubbandMode12, ¶m->subbandArr[i], mBuf);
8458 /***********************************************************
8460 * Func : cmPkTfuCqiPuschMode20
8463 * Desc : This structure conveys information present in CQI reporting mode 2-0 received
8464 * over PUSCH. This mode is for UE selected sub-band feedback.
8473 **********************************************************/
8475 S16 cmPkTfuCqiPuschMode20
8477 TfuCqiPuschMode20 *param,
8481 S16 cmPkTfuCqiPuschMode20(param, mBuf)
8482 TfuCqiPuschMode20 *param;
8488 TRC3(cmPkTfuCqiPuschMode20)
8490 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8491 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8493 CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf);
8494 CMCHKPK(oduUnpackUInt8, param->wideBandCqi, mBuf);
8495 CMCHKPK(oduUnpackUInt8, param->cqiIdx, mBuf);
8501 /***********************************************************
8503 * Func : cmUnpkTfuCqiPuschMode20
8506 * Desc : This structure conveys information present in CQI reporting mode 2-0 received
8507 * over PUSCH. This mode is for UE selected sub-band feedback.
8516 **********************************************************/
8518 S16 cmUnpkTfuCqiPuschMode20
8520 TfuCqiPuschMode20 *param,
8524 S16 cmUnpkTfuCqiPuschMode20(param, mBuf)
8525 TfuCqiPuschMode20 *param;
8531 TRC3(cmUnpkTfuCqiPuschMode20)
8533 CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx, mBuf);
8534 CMCHKUNPK(oduPackUInt8, ¶m->wideBandCqi, mBuf);
8535 CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf);
8536 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8537 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8543 /***********************************************************
8545 * Func : cmPkTfuCqiPuschMode22
8548 * Desc : This structure conveys information present in CQI reporting mode 2-2 received
8558 **********************************************************/
8560 S16 cmPkTfuCqiPuschMode22
8562 TfuCqiPuschMode22 *param,
8566 S16 cmPkTfuCqiPuschMode22(param, mBuf)
8567 TfuCqiPuschMode22 *param;
8573 TRC3(cmPkTfuCqiPuschMode22)
8576 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8577 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8580 CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf);
8581 CMCHKPK(oduUnpackUInt8, param->wideBandPmi, mBuf);
8582 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8583 CMCHKPK(oduUnpackUInt8, param->wideBandCqi[i], mBuf);
8585 CMCHKPK(oduUnpackUInt8, param->pmi, mBuf);
8586 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8587 CMCHKPK(oduUnpackUInt8, param->cqi[i], mBuf);
8594 /***********************************************************
8596 * Func : cmUnpkTfuCqiPuschMode22
8599 * Desc : This structure conveys information present in CQI reporting mode 2-2 received
8609 **********************************************************/
8611 S16 cmUnpkTfuCqiPuschMode22
8613 TfuCqiPuschMode22 *param,
8617 S16 cmUnpkTfuCqiPuschMode22(param, mBuf)
8618 TfuCqiPuschMode22 *param;
8624 TRC3(cmUnpkTfuCqiPuschMode22)
8626 for (i=0; i<TFU_MAX_TB; i++) {
8627 CMCHKUNPK(oduPackUInt8, ¶m->cqi[i], mBuf);
8629 CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf);
8630 for (i=0; i<TFU_MAX_TB; i++) {
8631 CMCHKUNPK(oduPackUInt8, ¶m->wideBandCqi[i], mBuf);
8633 CMCHKUNPK(oduPackUInt8, ¶m->wideBandPmi, mBuf);
8634 CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf);
8636 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8637 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subbandArr[i], mBuf);
8645 S16 cmPkTfuSubbandMode30
8647 TfuSubbandMode30 *param,
8651 S16 cmPkTfuSubbandMode30(param, mBuf)
8652 TfuSubbandMode30 *param;
8657 TRC3(cmPkTfuSubbandMode30)
8659 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8660 CMCHKPK(oduUnpackUInt8, param->cqi, mBuf);
8666 S16 cmUnpkTfuSubbandMode30
8668 TfuSubbandMode30 *param,
8672 S16 cmUnpkTfuSubbandMode30(param, mBuf)
8673 TfuSubbandMode30 *param;
8678 TRC3(cmUnpkTfuSubbandMode30)
8680 CMCHKUNPK(oduPackUInt8, ¶m->cqi, mBuf);
8681 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8687 /***********************************************************
8689 * Func : cmPkTfuCqiPuschMode30
8692 * Desc : This structure conveys information present in CQI reporting mode 3-0
8693 * received over PUSCH.
8702 **********************************************************/
8704 S16 cmPkTfuCqiPuschMode30
8706 TfuCqiPuschMode30 *param,
8710 S16 cmPkTfuCqiPuschMode30(param, mBuf)
8711 TfuCqiPuschMode30 *param;
8717 TRC3(cmPkTfuCqiPuschMode30)
8719 for (i=TFU_MAX_DL_SUBBAND-1; i >= 0; i--) {
8720 CMCHKPK(cmPkTfuSubbandMode30, ¶m->subbandArr[i], mBuf);
8722 CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf);
8723 CMCHKPK(oduUnpackUInt8, param->wideBandCqi, mBuf);
8729 /***********************************************************
8731 * Func : cmUnpkTfuCqiPuschMode30
8734 * Desc : This structure conveys information present in CQI reporting mode 3-0
8735 * received over PUSCH.
8744 **********************************************************/
8746 S16 cmUnpkTfuCqiPuschMode30
8748 TfuCqiPuschMode30 *param,
8752 S16 cmUnpkTfuCqiPuschMode30(param, mBuf)
8753 TfuCqiPuschMode30 *param;
8759 TRC3(cmUnpkTfuCqiPuschMode30)
8761 CMCHKUNPK(oduPackUInt8, ¶m->wideBandCqi, mBuf);
8762 CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf);
8763 for (i=0; i<TFU_MAX_DL_SUBBAND; i++) {
8764 CMCHKUNPK(cmUnpkTfuSubbandMode30, ¶m->subbandArr[i], mBuf);
8771 S16 cmPkTfuSubbandMode31
8773 TfuSubbandMode31 *param,
8777 S16 cmPkTfuSubbandMode31(param, mBuf)
8778 TfuSubbandMode31 *param;
8784 TRC3(cmPkTfuSubbandMode31)
8786 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subBand, mBuf);
8787 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8788 CMCHKPK(oduUnpackUInt8, param->cqi[i], mBuf);
8795 S16 cmUnpkTfuSubbandMode31
8797 TfuSubbandMode31 *param,
8801 S16 cmUnpkTfuSubbandMode31(param, mBuf)
8802 TfuSubbandMode31 *param;
8808 TRC3(cmUnpkTfuSubbandMode31)
8810 for (i=0; i<TFU_MAX_TB; i++) {
8811 CMCHKUNPK(oduPackUInt8, ¶m->cqi[i], mBuf);
8813 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subBand, mBuf);
8819 /***********************************************************
8821 * Func : cmPkTfuCqiPuschMode31
8824 * Desc : This structure conveys information present in CQI reporting mode 3-1
8825 * received over PUSCH.
8834 **********************************************************/
8836 S16 cmPkTfuCqiPuschMode31
8838 TfuCqiPuschMode31 *param,
8842 S16 cmPkTfuCqiPuschMode31(param, mBuf)
8843 TfuCqiPuschMode31 *param;
8849 TRC3(cmPkTfuCqiPuschMode31)
8852 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
8853 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
8855 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
8856 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
8857 for (i=param->numSubband-1; i >= 0; i--) {
8858 CMCHKPK(cmPkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf);
8861 CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf);
8862 for (i=TFU_MAX_TB-1; i >= 0; i--) {
8863 CMCHKPK(oduUnpackUInt8, param->wideBandCqi[i], mBuf);
8865 CMCHKPK(oduUnpackUInt8, param->pmi, mBuf);
8871 /***********************************************************
8873 * Func : cmUnpkTfuCqiPuschMode31
8876 * Desc : This structure conveys information present in CQI reporting mode 3-1
8877 * received over PUSCH.
8886 **********************************************************/
8888 S16 cmUnpkTfuCqiPuschMode31
8890 TfuCqiPuschMode31 *param,
8894 S16 cmUnpkTfuCqiPuschMode31(param, mBuf)
8895 TfuCqiPuschMode31 *param;
8901 TRC3(cmUnpkTfuCqiPuschMode31)
8903 CMCHKUNPK(oduPackUInt8, ¶m->pmi, mBuf);
8904 for (i=0; i<TFU_MAX_TB; i++) {
8905 CMCHKUNPK(oduPackUInt8, ¶m->wideBandCqi[i], mBuf);
8907 CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf);
8909 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
8910 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
8911 for (i=0; i<param->numSubband; i++) {
8912 CMCHKUNPK(cmUnpkTfuSubbandDlCqiInfo, ¶m->subbandCqiArr[i], mBuf);
8916 /* tfu_c_001.main_4 - Changes for MIMO feature addition */
8917 /* tfu_c_001.main_5 - Removed dependency on MIMO compile-time flag */
8924 /***********************************************************
8926 * Func : cmPkTfuDlCqiPusch
8929 * Desc : This structure conveys Downlink CQI information (mode and corresponding
8930 * CQI) received over PUSCH.
8939 **********************************************************/
8941 S16 cmPkTfuDlCqiPusch
8943 TfuDlCqiPusch *param,
8947 S16 cmPkTfuDlCqiPusch(param, mBuf)
8948 TfuDlCqiPusch *param;
8953 TRC3(cmPkTfuDlCqiPusch)
8955 switch(param->mode) {
8956 case TFU_PUSCH_CQI_MODE_31:
8957 CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
8959 case TFU_PUSCH_CQI_MODE_30:
8960 CMCHKPK(cmPkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf);
8962 case TFU_PUSCH_CQI_MODE_22:
8963 CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
8965 case TFU_PUSCH_CQI_MODE_20:
8966 CMCHKPK(cmPkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf);
8968 case TFU_PUSCH_CQI_MODE_12:
8969 CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
8975 CMCHKPK(cmPkTknU8, ¶m->ri, mBuf);
8976 CMCHKPK(oduUnpackUInt32, param->mode, mBuf);
8978 CMCHKPK(oduUnpackUInt8, param->cellIdx, mBuf);
8984 /***********************************************************
8986 * Func : cmUnpkTfuDlCqiPusch
8989 * Desc : This structure conveys Downlink CQI information (mode and corresponding
8990 * CQI) received over PUSCH.
8999 **********************************************************/
9001 S16 cmUnpkTfuDlCqiPusch
9003 TfuDlCqiPusch *param,
9007 S16 cmUnpkTfuDlCqiPusch(param, mBuf)
9008 TfuDlCqiPusch *param;
9013 TRC3(cmUnpkTfuDlCqiPusch)
9015 CMCHKUNPK(oduPackUInt8, ¶m->cellIdx, mBuf);
9016 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->mode, mBuf);
9017 CMCHKUNPK(cmUnpkTknU8, ¶m->ri, mBuf);
9018 switch(param->mode) {
9019 case TFU_PUSCH_CQI_MODE_12:
9020 CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
9022 case TFU_PUSCH_CQI_MODE_20:
9023 CMCHKUNPK(cmUnpkTfuCqiPuschMode20, ¶m->u.mode20Info, mBuf);
9025 case TFU_PUSCH_CQI_MODE_22:
9026 CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
9028 case TFU_PUSCH_CQI_MODE_30:
9029 CMCHKUNPK(cmUnpkTfuCqiPuschMode30, ¶m->u.mode30Info, mBuf);
9031 case TFU_PUSCH_CQI_MODE_31:
9032 CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
9041 /***********************************************************
9043 * Func : cmPkTfuDlCqiInfo
9046 * Desc : This structure contains CQI information received over PUCCH or PUSCH.
9055 **********************************************************/
9057 S16 cmPkTfuDlCqiInfo
9060 TfuDlCqiInfo *param,
9064 S16 cmPkTfuDlCqiInfo(selector, param, mBuf)
9066 TfuDlCqiInfo *param;
9072 TRC3(cmPkTfuDlCqiInfo)
9076 for (idx = 0; idx < param->pusch.numOfCells; idx++)
9078 CMCHKPK(cmPkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx], mBuf);
9080 CMCHKPK(oduUnpackUInt8, param->pusch.numOfCells, mBuf);
9083 CMCHKPK(cmPkTfuDlCqiPucch, ¶m->pucchCqi, mBuf);
9093 /***********************************************************
9095 * Func : cmUnpkTfuDlCqiInfo
9098 * Desc : This structure contains CQI information received over PUCCH or PUSCH.
9107 **********************************************************/
9109 S16 cmUnpkTfuDlCqiInfo
9112 TfuDlCqiInfo *param,
9116 S16 cmUnpkTfuDlCqiInfo(selector, param, mBuf)
9118 TfuDlCqiInfo *param;
9124 TRC3(cmUnpkTfuDlCqiInfo)
9128 CMCHKUNPK(cmUnpkTfuDlCqiPucch, ¶m->pucchCqi, mBuf);
9131 CMCHKUNPK(oduPackUInt8, ¶m->pusch.numOfCells, mBuf);
9132 for (idx = param->pusch.numOfCells; idx > 0; idx--)
9134 CMCHKUNPK(cmUnpkTfuDlCqiPusch, ¶m->pusch.puschCqi[idx-1], mBuf);
9145 /***********************************************************
9147 * Func : cmPkTfuRecpReqInfo
9150 * Desc : This structure is sent from Scheduler to PHY. This includes params
9151 * needed by PHY to decode the following
9153 * 2. HARQ Feedback on PUCCH
9156 * 5. SR Indications.
9157 * This structure carries the reception information for all the scheduled UE.
9166 **********************************************************/
9168 S16 cmPkTfuRecpReqInfo
9170 TfuRecpReqInfo *param,
9174 S16 cmPkTfuRecpReqInfo(param, mBuf)
9175 TfuRecpReqInfo *param;
9181 TfuUeRecpReqInfo *tfuUeRecpReqInfo;
9183 TRC3(cmPkTfuRecpReqInfo)
9185 /*ccpu00116923 - ADD - SRS present support*/
9186 /*tfu_c_001.main_7 - ADD - SRS present field inclusion */
9188 CMCHKPK(oduUnpackUInt8, param->srsPres, mBuf);
9190 count = param->ueRecpReqLst.count;
9191 node = param->ueRecpReqLst.last;
9193 tfuUeRecpReqInfo = (TfuUeRecpReqInfo *)node->node;
9195 CMCHKPK(cmPkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf);
9196 cmLListDelFrm(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk);
9197 tfuUeRecpReqInfo->lnk.node = (PTR)NULLP;
9199 CMCHKPK(oduUnpackUInt32, count, mBuf);
9200 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
9201 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
9207 /***********************************************************
9209 * Func : cmUnpkTfuRecpReqInfo
9212 * Desc : This structure is sent from Scheduler to PHY. This includes params
9213 * needed by PHY to decode the following
9215 * 2. HARQ Feedback on PUCCH
9218 * 5. SR Indications.
9219 * This structure carries the reception information for all the scheduled UE.
9228 **********************************************************/
9230 S16 cmUnpkTfuRecpReqInfo
9232 TfuRecpReqInfo *param,
9237 S16 cmUnpkTfuRecpReqInfo(param, memCp, mBuf)
9238 TfuRecpReqInfo *param;
9245 TfuUeRecpReqInfo *tfuUeRecpReqInfo;
9247 TRC3(cmUnpkTfuRecpReqInfo)
9249 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
9250 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
9251 cmLListInit(¶m->ueRecpReqLst);
9252 CMCHKUNPK(oduPackUInt32, &count, mBuf);
9253 for (loopCnt=0; loopCnt<count; loopCnt++) {
9254 cmGetMem((Ptr)memCp, sizeof(*tfuUeRecpReqInfo), (Ptr *)&tfuUeRecpReqInfo);
9255 CMCHKUNPK(cmUnpkTfuUeRecpReqInfo, tfuUeRecpReqInfo, mBuf);
9256 cmLListAdd2Tail(¶m->ueRecpReqLst, &tfuUeRecpReqInfo->lnk);
9257 tfuUeRecpReqInfo->lnk.node = (PTR)tfuUeRecpReqInfo;
9259 /*ccpu00116923 - ADD - SRS present support*/
9260 /*tfu_c_001.main_7 - ADD - SRS present field inclusion */
9262 CMCHKUNPK(oduPackUInt8, ¶m->srsPres, mBuf);
9269 /***********************************************************
9271 * Func : cmPkTfuPdcchInfo
9274 * Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI
9275 * formats. This information is associated with an RNTI.
9284 **********************************************************/
9286 S16 cmPkTfuPdcchInfo
9288 TfuPdcchInfo *param,
9292 S16 cmPkTfuPdcchInfo(param, mBuf)
9293 TfuPdcchInfo *param;
9298 TRC3(cmPkTfuPdcchInfo)
9300 CMCHKPK(oduUnpackUInt8, param->grpId, mBuf);
9301 CMCHKPK(oduUnpackUInt8, param->sccIdx, mBuf);
9302 CMCHKPK(oduUnpackUInt8, param->sectorId, mBuf);
9303 #endif /* TFU_5GTF */
9304 CMCHKPK(cmPkTfuDciInfo, ¶m->dci, mBuf);
9305 CMCHKPK(oduUnpackUInt8, param->dciNumOfBits, mBuf);
9306 CMCHKPK(cmPkLteAggrLvl, param->aggrLvl, mBuf);
9307 CMCHKPK(oduUnpackUInt16, param->nCce, mBuf);
9309 CMCHKPK(cmPkLteRnti, param->crnti, mBuf);
9310 CMCHKPK(oduUnpackUInt8, param->isSpsRnti, mBuf);
9312 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
9318 /***********************************************************
9320 * Func : cmUnpkTfuPdcchInfo
9323 * Desc : This structure contains the PDCCH to be sent on PHY i.e. DCI
9324 * formats. This information is associated with an RNTI.
9333 **********************************************************/
9335 S16 cmUnpkTfuPdcchInfo
9337 TfuPdcchInfo *param,
9341 S16 cmUnpkTfuPdcchInfo(param, mBuf)
9342 TfuPdcchInfo *param;
9347 TRC3(cmUnpkTfuPdcchInfo)
9349 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
9351 CMCHKUNPK(oduPackUInt8, ¶m->isSpsRnti, mBuf);
9352 CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf);
9354 CMCHKUNPK(oduPackUInt16, ¶m->nCce, mBuf);
9355 CMCHKUNPK(cmUnpkLteAggrLvl, (U32*)¶m->aggrLvl, mBuf);
9356 CMCHKUNPK(oduPackUInt8, ¶m->dciNumOfBits, mBuf);
9357 CMCHKUNPK(cmUnpkTfuDciInfo, ¶m->dci, mBuf);
9359 CMCHKUNPK(oduPackUInt8, ¶m->sectorId, mBuf);
9360 CMCHKUNPK(oduPackUInt8, ¶m->sccIdx, mBuf);
9361 CMCHKUNPK(oduPackUInt8, ¶m->grpId, mBuf);
9362 #endif /* TFU_5GTF */
9368 /***********************************************************
9370 * Func : cmPkTfuPhichInfo
9373 * Desc : This structure contains one PHICH information. In order to locate the
9374 * resources to be used for PHICH the following information is provided along
9375 * with the feedback -
9386 **********************************************************/
9388 S16 cmPkTfuPhichInfo
9390 TfuPhichInfo *param,
9394 S16 cmPkTfuPhichInfo(param, mBuf)
9395 TfuPhichInfo *param;
9400 TRC3(cmPkTfuPhichInfo)
9401 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9403 CMCHKPK(oduUnpackUInt16, param->txPower, mBuf);
9406 CMCHKPK(oduUnpackUInt8, param->iPhich, mBuf);
9408 CMCHKPK(oduUnpackUInt8, param->isAck, mBuf);
9409 CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf);
9410 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
9416 /***********************************************************
9418 * Func : cmUnpkTfuPhichInfo
9421 * Desc : This structure contains one PHICH information. In order to locate the
9422 * resources to be used for PHICH the following information is provided along
9423 * with the feedback -
9434 **********************************************************/
9436 S16 cmUnpkTfuPhichInfo
9438 TfuPhichInfo *param,
9442 S16 cmUnpkTfuPhichInfo(param, mBuf)
9443 TfuPhichInfo *param;
9448 TRC3(cmUnpkTfuPhichInfo)
9450 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
9451 CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf);
9452 CMCHKUNPK(oduPackUInt8, ¶m->isAck, mBuf);
9453 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9455 CMCHKUNPK(oduPackUInt8, ¶m->iPhich, mBuf);
9458 CMCHKUNPK(oduPackUInt16, ¶m->txPower, mBuf);
9465 /***********************************************************
9467 * Func : cmPkTfuCntrlReqInfo
9470 * Desc : This structure is sent from Scheduler to PHY. This includes all the
9471 * control information to be sent to the UE.
9472 * -# PDCCH Physical Downlink Control Channel
9473 * -# PHICH Physical HARQ Indicator Channel
9474 * -# PCFICH Physical Control Format Indicator Channel
9483 **********************************************************/
9485 S16 cmPkTfuCntrlReqInfo
9487 TfuCntrlReqInfo *param,
9491 S16 cmPkTfuCntrlReqInfo(param, mBuf)
9492 TfuCntrlReqInfo *param;
9497 TfuPdcchInfo *tfuPdcchInfo;
9498 TfuPhichInfo *tfuPhichInfo;
9502 TRC3(cmPkTfuCntrlReqInfo)
9504 count = param->dlMpdcchLst.count;
9505 node = param->dlMpdcchLst.last;
9507 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9509 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9510 cmLListDelFrm(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk);
9511 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9513 CMCHKPK(oduUnpackUInt32, count, mBuf);
9514 count = param->ulMpdcchLst.count;
9515 node = param->ulMpdcchLst.last;
9517 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9519 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9520 cmLListDelFrm(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk);
9521 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9523 CMCHKPK(oduUnpackUInt32, count, mBuf);
9525 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
9526 CMCHKPK(oduPackBool, param->isSPSOcc, mBuf);
9528 count = param->phichLst.count;
9529 node = param->phichLst.last;
9531 tfuPhichInfo = (TfuPhichInfo *)node->node;
9533 CMCHKPK(cmPkTfuPhichInfo, tfuPhichInfo, mBuf);
9534 cmLListDelFrm(¶m->phichLst, &tfuPhichInfo->lnk);
9535 tfuPhichInfo->lnk.node = (PTR)NULLP;
9537 CMCHKPK(oduUnpackUInt32, count, mBuf);
9538 count = param->dlPdcchLst.count;
9539 node = param->dlPdcchLst.last;
9541 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9543 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9544 cmLListDelFrm(¶m->dlPdcchLst, &tfuPdcchInfo->lnk);
9545 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9547 CMCHKPK(oduUnpackUInt32, count, mBuf);
9548 count = param->ulPdcchLst.count;
9549 node = param->ulPdcchLst.last;
9551 tfuPdcchInfo = (TfuPdcchInfo *)node->node;
9554 printf("ulPdcchLst count %d time[ %d %d] \n",count,param->ulTiming.sfn,param->ulTiming.subframe);
9556 CMCHKPK(cmPkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9557 cmLListDelFrm(¶m->ulPdcchLst, &tfuPdcchInfo->lnk);
9558 tfuPdcchInfo->lnk.node = (PTR)NULLP;
9560 CMCHKPK(oduUnpackUInt32, count, mBuf);
9561 CMCHKPK(oduUnpackUInt8, param->cfi, mBuf);
9562 CMCHKPK(cmPkLteTimingInfo, ¶m->dlTiming, mBuf);
9563 CMCHKPK(cmPkLteTimingInfo, ¶m->ulTiming, mBuf);
9564 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
9570 /***********************************************************
9572 * Func : cmUnpkTfuCntrlReqInfo
9575 * Desc : This structure is sent from Scheduler to PHY. This includes all the
9576 * control information to be sent to the UE.
9577 * -# PDCCH Physical Downlink Control Channel
9578 * -# PHICH Physical HARQ Indicator Channel
9579 * -# PCFICH Physical Control Format Indicator Channel
9588 **********************************************************/
9590 S16 cmUnpkTfuCntrlReqInfo
9592 TfuCntrlReqInfo *param,
9597 S16 cmUnpkTfuCntrlReqInfo(param, memCp, mBuf)
9598 TfuCntrlReqInfo *param;
9604 TfuPdcchInfo *tfuPdcchInfo;
9606 TfuPhichInfo *tfuPhichInfo;
9608 TRC3(cmUnpkTfuCntrlReqInfo)
9610 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
9611 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->ulTiming, mBuf);
9612 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->dlTiming, mBuf);
9613 CMCHKUNPK(oduPackUInt8, ¶m->cfi, mBuf);
9614 cmLListInit(¶m->ulPdcchLst);
9615 CMCHKUNPK(oduPackUInt32, &count, mBuf);
9616 for (loopCnt=0; loopCnt<count; loopCnt++) {
9617 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9618 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9619 cmLListAdd2Tail(¶m->ulPdcchLst, &tfuPdcchInfo->lnk);
9620 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9622 cmLListInit(¶m->dlPdcchLst);
9623 CMCHKUNPK(oduPackUInt32, &count, mBuf);
9624 for (loopCnt=0; loopCnt<count; loopCnt++) {
9625 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9626 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9627 cmLListAdd2Tail(¶m->dlPdcchLst, &tfuPdcchInfo->lnk);
9628 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9630 cmLListInit(¶m->phichLst);
9631 CMCHKUNPK(oduPackUInt32, &count, mBuf);
9632 for (loopCnt=0; loopCnt<count; loopCnt++) {
9633 cmGetMem((Ptr)memCp, sizeof(*tfuPhichInfo), (Ptr *)&tfuPhichInfo);
9634 CMCHKUNPK(cmUnpkTfuPhichInfo, tfuPhichInfo, mBuf);
9635 cmLListAdd2Tail(¶m->phichLst, &tfuPhichInfo->lnk);
9636 tfuPhichInfo->lnk.node = (PTR)tfuPhichInfo;
9639 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
9640 CMCHKUNPK(oduUnpackBool, ¶m->isSPSOcc, mBuf);
9643 cmLListInit(¶m->ulMpdcchLst);
9644 CMCHKUNPK(oduPackUInt32, &count, mBuf);
9645 for (loopCnt=0; loopCnt<count; loopCnt++) {
9646 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9647 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9648 cmLListAdd2Tail(¶m->ulMpdcchLst, &tfuPdcchInfo->lnk);
9649 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9651 cmLListInit(¶m->dlMpdcchLst);
9652 CMCHKUNPK(oduPackUInt32, &count, mBuf);
9653 printf("4. cmUnpkTfuCntrlReqInfo :: count %ld \n", count);
9654 for (loopCnt=0; loopCnt<count; loopCnt++) {
9655 cmGetMem((Ptr)memCp, sizeof(*tfuPdcchInfo), (Ptr *)&tfuPdcchInfo);
9656 CMCHKUNPK(cmUnpkTfuPdcchInfo, tfuPdcchInfo, mBuf);
9657 cmLListAdd2Tail(¶m->dlMpdcchLst, &tfuPdcchInfo->lnk);
9658 tfuPdcchInfo->lnk.node = (PTR)tfuPdcchInfo;
9659 printf("5. cmUnpkTfuCntrlReqInfo :: Failed \n");
9667 /***********************************************************
9669 * Func : cmPkTfuPdschDciInfo
9672 * Desc : This structure Carries the control information that would be needed
9673 * by the Physical layer to process the data to be sent on PDSCH.
9682 **********************************************************/
9684 S16 cmPkTfuPdschDciInfo
9686 TfuPdschDciInfo *param,
9690 S16 cmPkTfuPdschDciInfo(param, mBuf)
9691 TfuPdschDciInfo *param;
9696 TRC3(cmPkTfuPdschDciInfo)
9698 switch(param->format) {
9700 case TFU_DCI_FORMAT_B1:
9702 if (param->u.formatB1Info.RBAssign <= 324)
9704 printf("DCI Format: [B1] RBAssign: [%d] MCS: [%d]",
9705 param->u.formatB1Info.RBAssign,
9706 param->u.formatB1Info.u.rbAssignB1Val324.mcs);
9709 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
9711 case TFU_DCI_FORMAT_B2:
9713 if (param->u.formatB2Info.RBAssign <= 324)
9715 printf("DCI Format: [B2] RBAssign: [%d] MCS: [%d]",
9716 param->u.formatB2Info.RBAssign,
9717 param->u.formatB2Info.u.rbAssignB1Val324.mcs);
9720 CMCHKPK(cmPkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
9722 case TFU_DCI_FORMAT_A1:
9723 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
9725 case TFU_DCI_FORMAT_A2:
9726 CMCHKPK(cmPkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
9730 case TFU_DCI_FORMAT_6_2:
9731 CMCHKPK(cmPkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf);
9733 case TFU_DCI_FORMAT_6_1A:
9734 CMCHKPK(cmPkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf);
9737 case TFU_DCI_FORMAT_2A:
9738 CMCHKPK(cmPkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf);
9740 case TFU_DCI_FORMAT_2:
9741 CMCHKPK(cmPkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf);
9743 case TFU_DCI_FORMAT_1D:
9744 CMCHKPK(cmPkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf);
9746 case TFU_DCI_FORMAT_1C:
9747 CMCHKPK(cmPkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf);
9749 case TFU_DCI_FORMAT_1B:
9750 CMCHKPK(cmPkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf);
9752 case TFU_DCI_FORMAT_1A:
9753 CMCHKPK(cmPkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf);
9755 case TFU_DCI_FORMAT_1:
9756 CMCHKPK(cmPkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf);
9761 CMCHKPK(oduUnpackUInt32, param->format, mBuf);
9767 /***********************************************************
9769 * Func : cmUnpkTfuPdschDciInfo
9772 * Desc : This structure Carries the control information that would be needed
9773 * by the Physical layer to process the data to be sent on PDSCH.
9782 **********************************************************/
9784 S16 cmUnpkTfuPdschDciInfo
9786 TfuPdschDciInfo *param,
9790 S16 cmUnpkTfuPdschDciInfo(param, mBuf)
9791 TfuPdschDciInfo *param;
9796 TRC3(cmUnpkTfuPdschDciInfo)
9798 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->format, mBuf);
9799 switch(param->format) {
9800 case TFU_DCI_FORMAT_1:
9801 CMCHKUNPK(cmUnpkTfuDciFormat1AllocInfo, ¶m->u.format1AllocInfo, mBuf);
9803 case TFU_DCI_FORMAT_1A:
9804 CMCHKUNPK(cmUnpkTfuDciFormat1aAllocInfo, ¶m->u.format1aAllocInfo, mBuf);
9806 case TFU_DCI_FORMAT_1B:
9807 CMCHKUNPK(cmUnpkTfuDciFormat1bAllocInfo, ¶m->u.format1bAllocInfo, mBuf);
9809 case TFU_DCI_FORMAT_1C:
9810 CMCHKUNPK(cmUnpkTfuDciFormat1cInfo, ¶m->u.format1cAllocInfo, mBuf);
9812 case TFU_DCI_FORMAT_1D:
9813 CMCHKUNPK(cmUnpkTfuDciFormat1dAllocInfo, ¶m->u.format1dAllocInfo, mBuf);
9815 case TFU_DCI_FORMAT_2:
9816 CMCHKUNPK(cmUnpkTfuDciFormat2AllocInfo, ¶m->u.format2AllocInfo, mBuf);
9818 case TFU_DCI_FORMAT_2A:
9819 CMCHKUNPK(cmUnpkTfuDciFormat2AAllocInfo, ¶m->u.format2AAllocInfo, mBuf);
9822 case TFU_DCI_FORMAT_6_1A:
9823 CMCHKUNPK(cmUnpkTfuDciFormat6AAllocInfo, ¶m->u.format61AllocInfo, mBuf);
9825 case TFU_DCI_FORMAT_6_2:
9826 CMCHKUNPK(cmUnpkTfuDciFormat62AllocInfo, ¶m->u.format62AllocInfo, mBuf);
9830 case TFU_DCI_FORMAT_A1:
9831 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA1Info, mBuf);
9833 case TFU_DCI_FORMAT_A2:
9834 CMCHKUNPK(cmUnpkTfuDciFormatA1A2Info, ¶m->u.formatA2Info, mBuf);
9836 case TFU_DCI_FORMAT_B1:
9837 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB1Info, mBuf);
9839 case TFU_DCI_FORMAT_B2:
9840 CMCHKUNPK(cmUnpkTfuDciFormatB1B2Info, ¶m->u.formatB2Info, mBuf);
9848 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9850 /***********************************************************
9852 * Func : cmPkTfuBfVectorInfo
9855 * Desc : This structure conveys the BeamForming Vector
9856 * Information that hold relevance to Tx Mode 7
9865 **********************************************************/
9867 S16 cmPkTfuBfVectorInfo
9869 TfuBfVectorInfo *param,
9873 S16 cmPkTfuBfVectorInfo(param, mBuf)
9874 TfuBfVectorInfo *param;
9879 TRC3(cmPkTfuBfVectorInfo)
9880 for(idx=TFU_MAX_DL_SUBBAND-1;idx>=0; idx--)
9882 for (idx2=param->numPhyAnt -1; idx2 >= 0; idx2--) {
9883 CMCHKPK(oduUnpackUInt16, param->bfValue[idx2], mBuf);}
9884 CMCHKPK(oduUnpackUInt8, param->numPhyAnt, mBuf);
9885 CMCHKPK(oduUnpackUInt8, param->sbIndex, mBuf);
9890 /***********************************************************
9892 * Func : cmUnpkTfuBfVectorInfo
9895 * Desc : This structure conveys the BeamForming Vector
9896 * Information that hold relevance to Tx Mode 7
9905 **********************************************************/
9907 S16 cmUnpkTfuBfVectorInfo
9909 TfuBfVectorInfo *param,
9913 S16 cmUnpkTfuBfVectorInfo(param, mBuf)
9914 TfuBfVectorInfo *param;
9919 TRC3(cmUnpkTfuBfVectorInfo)
9920 for(idx=0;idx<TFU_MAX_DL_SUBBAND; idx++)
9922 CMCHKUNPK(oduPackUInt8, ¶m->sbIndex, mBuf);
9923 CMCHKUNPK(oduPackUInt8, ¶m->numPhyAnt, mBuf);
9924 for (idx2=0; idx2 <param->numPhyAnt; idx2++) {
9925 CMCHKUNPK(oduPackUInt16, ¶m->bfValue[idx2], mBuf);}
9932 /***********************************************************
9934 * Func : cmPkTfuDatReqPduInfo
9937 * Desc : Pack Function for Tfu Dat Req PDU.
9946 **********************************************************/
9948 S16 cmPkTfuDatReqPduInfo
9950 TfuDatReqPduInfo *param,
9954 S16 cmPkTfuDatReqPduInfo(param, mBuf)
9955 TfuDatReqPduInfo *param;
9966 TRC3(cmPkTfuDatReqPduInfo)
9968 /* LTE_ADV_FLAG_REMOVED_START */
9969 CMCHKPK(oduUnpackUInt8, param->isEnbSFR, mBuf);
9970 /* LTE_ADV_FLAG_REMOVED_END */
9972 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
9974 CMCHKPK(oduUnpackUInt16, param->txPwrOffset, mBuf);
9975 if(param->transMode == TFU_UE_TM_7)
9977 CMCHKPK(cmPkTfuBfVectorInfo, param->bfVector, mBuf);
9978 CMCHKPK(oduUnpackUInt8, param->numBfVectors, mBuf);
9979 CMCHKPK(oduUnpackUInt8, param->numBfPrbPerSb, mBuf);
9981 CMCHKPK(oduUnpackUInt8, param->deltaPowOffIdx, mBuf);
9982 /* LTE_ADV_FLAG_REMOVED_START */
9983 CMCHKPK(oduUnpackUInt8, param->pa, mBuf);
9984 /* LTE_ADV_FLAG_REMOVED_END */
9985 CMCHKPK(oduUnpackUInt8, param->numLayers, mBuf);
9987 CMCHKPK(oduPackBool, param->isTApres, mBuf);
9988 CMCHKPK(cmPkTknU32, ¶m->doa, mBuf);
9989 CMCHKPK(oduUnpackUInt32, param->transMode, mBuf);
9990 CMCHKPK(cmPkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf);
9991 CMCHKPK(oduUnpackUInt8, param->puschRptUsd, mBuf);
9992 for (i = 0; i < TFU_MAX_TB; i++)
9995 if (param->mBuf[i] != NULLP)
9997 tbMask = tbMask | (1 << i);
9999 #else /* L2_OPTMZ */
10000 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10002 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10005 if (param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] != NULLP)
10007 tbMask = tbMask | (1 << i);
10011 #endif /* L2_OPTMZ */
10013 /* tfu_c_001.main_2: Packing should consider nmbOfTBs.*/
10014 for (i=TFU_MAX_TB - 1; i >= 0; i--) {
10016 if (param->mBuf[i] != NULLP)
10018 CMCHKPK(cmPkBuffer, ¶m->mBuf[i], mBuf);
10021 // CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macPad, mBuf);
10022 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10024 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10027 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx],
10031 CMCHKPK(oduUnpackUInt32, param->tbInfo[i].lchInfo[lchIdx].numPdu, mBuf);
10033 CMCHKPK(oduUnpackUInt32, param->tbInfo[i].numLch, mBuf);
10034 CMCHKPK(oduUnpackUInt32, param->tbInfo[i].padSize, mBuf);
10035 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macCes, mBuf);
10036 CMCHKPK(cmPkBuffer, ¶m->tbInfo[i].macHdr, mBuf);
10037 CMCHKPK(cmPkMsgLen, param->tbInfo[i].tbSize, mBuf);
10038 CMCHKPK(oduPackBool, param->tbInfo[i].tbPres, mBuf);
10041 CMCHKPK(oduUnpackUInt8, tbMask, mBuf);
10042 CMCHKPK(oduUnpackUInt8, param->nmbOfTBs, mBuf);
10043 CMCHKPK(cmPkTfuPdschDciInfo, ¶m->dciInfo, mBuf);
10044 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10050 /***********************************************************
10052 * Func : cmUnpkTfuDatReqPduInfo
10055 * Desc : UnPack function for Tfu Dat req pdu .
10064 **********************************************************/
10066 S16 cmUnpkTfuDatReqPduInfo
10068 TfuDatReqPduInfo *param,
10072 S16 cmUnpkTfuDatReqPduInfo(param, mBuf)
10073 TfuDatReqPduInfo *param;
10081 U32 lchIdx, pduIdx;
10083 TRC3(cmUnpkTfuDatReqPduInfo)
10085 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10086 CMCHKUNPK(cmUnpkTfuPdschDciInfo, ¶m->dciInfo, mBuf);
10087 CMCHKUNPK(oduPackUInt8, ¶m->nmbOfTBs, mBuf);
10089 CMCHKUNPK(oduPackUInt8, &tbMask, mBuf);
10090 for (i=0; i<TFU_MAX_TB; i++) {
10092 if (tbMask & (1<<i))
10094 CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf[i], mBuf);
10098 param->mBuf[i] = NULLP;
10100 #else /* L2_OPTMZ*/
10101 CMCHKUNPK(oduUnpackBool, ¶m->tbInfo[i].tbPres, mBuf);
10102 CMCHKUNPK(cmUnpkMsgLen, ¶m->tbInfo[i].tbSize, mBuf);
10103 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macHdr, mBuf);
10104 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macCes, mBuf);
10105 CMCHKUNPK(oduPackUInt32, ¶m->tbInfo[i].padSize, mBuf);
10106 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->tbInfo[i].numLch, mBuf);
10107 for(lchIdx = 0; lchIdx < param->tbInfo[i].numLch; lchIdx++)
10109 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->tbInfo[i].lchInfo[lchIdx].numPdu,
10111 for(pduIdx = 0; pduIdx < param->tbInfo[i].lchInfo[lchIdx].numPdu;
10114 if (tbMask & (1<<i))
10116 CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].lchInfo[lchIdx].\
10117 mBuf[pduIdx], mBuf);
10121 param->tbInfo[i].lchInfo[lchIdx].mBuf[pduIdx] = NULLP;
10125 //CMCHKUNPK(cmUnpkBuffer, ¶m->tbInfo[i].macPad, mBuf);
10126 #endif /* L2_OPTMZ*/
10129 CMCHKUNPK(oduPackUInt8, ¶m->puschRptUsd, mBuf);
10130 CMCHKUNPK(cmUnpkTfuDlCqiPuschInfo, ¶m->puschPmiInfo, mBuf);
10131 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->transMode, mBuf);
10132 CMCHKUNPK(cmUnpkTknU32, ¶m->doa, mBuf);
10133 CMCHKUNPK(oduUnpackBool, ¶m->isTApres, mBuf);
10134 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10136 CMCHKUNPK(oduPackUInt8, ¶m->numLayers, mBuf);
10137 /* LTE_ADV_FLAG_REMOVED_START */
10138 CMCHKUNPK(oduPackUInt8, ¶m->pa, mBuf);
10139 /* LTE_ADV_FLAG_REMOVED_END */
10140 CMCHKUNPK(oduPackUInt8, ¶m->deltaPowOffIdx, mBuf);
10141 if(param->transMode == TFU_UE_TM_7)
10143 CMCHKUNPK(oduPackUInt8, ¶m->numBfPrbPerSb, mBuf);
10144 CMCHKUNPK(oduPackUInt8, ¶m->numBfVectors, mBuf);
10145 CMCHKUNPK(cmUnpkTfuBfVectorInfo, param->bfVector, mBuf);
10147 CMCHKUNPK(oduPackUInt16, ¶m->txPwrOffset, mBuf);
10150 /* LTE_ADV_FLAG_REMOVED_START */
10151 CMCHKUNPK(oduPackUInt8, ¶m->isEnbSFR, mBuf);
10152 /* LTE_ADV_FLAG_REMOVED_END */
10159 /***********************************************************
10161 * Func : cmPkTfuDatReqInfo
10164 * Desc : This structure contains the Data PDUs
10165 * @details This structure contains Data meant to be sent on both PBCH and
10166 * PDSCH. Control information necessary for processing of the data is sent along
10176 **********************************************************/
10178 S16 cmPkTfuDatReqInfo
10180 TfuDatReqInfo *param,
10184 S16 cmPkTfuDatReqInfo(param, mBuf)
10185 TfuDatReqInfo *param;
10192 TfuDatReqPduInfo *tfuDatReqPduInfo;
10194 TRC3(cmPkTfuDatReqInfo)
10196 count = param->pdus.count;
10197 node = param->pdus.last;
10199 tfuDatReqPduInfo = (TfuDatReqPduInfo *)node->node;
10201 CMCHKPK(cmPkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf);
10202 cmLListDelFrm(¶m->pdus, &tfuDatReqPduInfo->lnk);
10203 tfuDatReqPduInfo->lnk.node = (PTR)NULLP;
10205 CMCHKPK(oduUnpackUInt32, count, mBuf);
10206 CMCHKPK(cmPkTknBuf, ¶m->bchDat, mBuf);
10207 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10208 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10214 /***********************************************************
10216 * Func : cmUnpkTfuDatReqInfo
10219 * Desc : This structure contains the Data PDUs
10220 * @details This structure contains Data meant to be sent on both PBCH and
10221 * PDSCH. Control information necessary for processing of the data is sent along
10231 **********************************************************/
10233 S16 cmUnpkTfuDatReqInfo
10235 TfuDatReqInfo *param,
10240 S16 cmUnpkTfuDatReqInfo(param, memCp, mBuf)
10241 TfuDatReqInfo *param;
10247 U32 count, loopCnt;
10248 TfuDatReqPduInfo *tfuDatReqPduInfo;
10250 TRC3(cmUnpkTfuDatReqInfo)
10252 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10253 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10254 CMCHKUNPK(cmUnpkTknBuf, ¶m->bchDat, &mBuf);
10255 cmLListInit(¶m->pdus);
10256 CMCHKUNPK(oduPackUInt32, &count, mBuf);
10257 for (loopCnt=0; loopCnt<count; loopCnt++) {
10258 cmGetMem((Ptr)memCp, sizeof(*tfuDatReqPduInfo), (Ptr *)&tfuDatReqPduInfo);
10259 CMCHKUNPK(cmUnpkTfuDatReqPduInfo, tfuDatReqPduInfo, mBuf);
10260 cmLListAdd2Tail(¶m->pdus, &tfuDatReqPduInfo->lnk);
10261 tfuDatReqPduInfo->lnk.node = (PTR)tfuDatReqPduInfo;
10268 /***********************************************************
10270 * Func : cmPkTfuDatInfo
10273 * Desc : This structure contains the Data PDU and the RNTI of the UE.
10282 **********************************************************/
10290 S16 cmPkTfuDatInfo(param, mBuf)
10296 TRC3(cmPkTfuDatInfo)
10298 CMCHKPK(cmPkBuffer, ¶m->mBuf, mBuf);
10299 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10305 /***********************************************************
10307 * Func : cmUnpkTfuDatInfo
10310 * Desc : This structure contains the Data PDU and the RNTI of the UE.
10319 **********************************************************/
10321 S16 cmUnpkTfuDatInfo
10327 S16 cmUnpkTfuDatInfo(param, mBuf)
10333 TRC3(cmUnpkTfuDatInfo)
10335 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10336 CMCHKUNPK(cmUnpkBuffer, ¶m->mBuf, mBuf);
10342 /***********************************************************
10344 * Func : cmPkTfuDatIndInfo
10347 * Desc : This structure contains the Data PDUs received at Physical Layer.
10348 * @details All the PDUs received by Physical layer in one subframe are clubbed
10349 * together into a single data structure and sent to MAC for processing.
10358 **********************************************************/
10360 S16 cmPkTfuDatIndInfo
10362 TfuDatIndInfo *param,
10366 S16 cmPkTfuDatIndInfo(param, mBuf)
10367 TfuDatIndInfo *param;
10374 TfuDatInfo *tfuDatInfo;
10376 TRC3(cmPkTfuDatIndInfo)
10379 CMCHKPK(oduUnpackUInt8, param->sccIdx, mBuf);
10380 CMCHKPK(oduUnpackUInt8, param->sectorId, mBuf);
10381 #endif /* TFU_5GTF */
10382 count = param->datIndLst.count;
10383 node = param->datIndLst.last;
10385 tfuDatInfo = (TfuDatInfo *)node->node;
10387 CMCHKPK(cmPkTfuDatInfo, tfuDatInfo, mBuf);
10388 cmLListDelFrm(¶m->datIndLst, &tfuDatInfo->lnk);
10389 tfuDatInfo->lnk.node = (PTR)NULLP;
10391 CMCHKPK(oduUnpackUInt32, count, mBuf);
10392 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10393 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10399 /***********************************************************
10401 * Func : cmUnpkTfuDatIndInfo
10404 * Desc : This structure contains the Data PDUs received at Physical Layer.
10405 * @details All the PDUs received by Physical layer in one subframe are clubbed
10406 * together into a single data structure and sent to MAC for processing.
10415 **********************************************************/
10417 S16 cmUnpkTfuDatIndInfo
10419 TfuDatIndInfo *param,
10424 S16 cmUnpkTfuDatIndInfo(param, memCp, mBuf)
10425 TfuDatIndInfo *param;
10431 U32 count, loopCnt;
10432 TfuDatInfo *tfuDatInfo;
10434 TRC3(cmUnpkTfuDatIndInfo)
10436 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10437 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10438 cmLListInit(¶m->datIndLst);
10439 CMCHKUNPK(oduPackUInt32, &count, mBuf);
10440 for (loopCnt=0; loopCnt<count; loopCnt++) {
10441 cmGetMem((Ptr)memCp, sizeof(*tfuDatInfo), (Ptr *)&tfuDatInfo);
10442 CMCHKUNPK(cmUnpkTfuDatInfo, tfuDatInfo, mBuf);
10443 cmLListAdd2Tail(¶m->datIndLst, &tfuDatInfo->lnk);
10444 tfuDatInfo->lnk.node = (PTR)tfuDatInfo;
10447 CMCHKUNPK(oduPackUInt8, ¶m->sectorId, mBuf);
10448 CMCHKUNPK(oduPackUInt8, ¶m->sccIdx, mBuf);
10449 #endif /* TFU_5GTF */
10455 /***********************************************************
10457 * Func : cmPkTfuSrInfo
10460 * Desc : This structure contains the SR indication for a UE, identified by
10461 * the given RNTI. The structure also contains a PUCCH Delta power, that is
10462 * calculated by the physical layer, and is used by the scheduler for Power
10463 * control of the UE.
10472 **********************************************************/
10480 S16 cmPkTfuSrInfo(param, mBuf)
10486 TRC3(cmPkTfuSrInfo)
10488 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10494 /***********************************************************
10496 * Func : cmUnpkTfuSrInfo
10499 * Desc : This structure contains the SR indication for a UE, identified by
10500 * the given RNTI. The structure also contains a PUCCH Delta power, that is
10501 * calculated by the physical layer, and is used by the scheduler for Power
10502 * control of the UE.
10511 **********************************************************/
10513 S16 cmUnpkTfuSrInfo
10519 S16 cmUnpkTfuSrInfo(param, mBuf)
10525 TRC3(cmUnpkTfuSrInfo)
10527 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10533 /***********************************************************
10535 * Func : cmPkTfuSrIndInfo
10538 * Desc : This structure contains all the Scheduling Requests (SR) indications
10539 * received in a subframe.
10548 **********************************************************/
10550 S16 cmPkTfuSrIndInfo
10552 TfuSrIndInfo *param,
10556 S16 cmPkTfuSrIndInfo(param, mBuf)
10557 TfuSrIndInfo *param;
10564 TfuSrInfo *tfuSrInfo;
10566 TRC3(cmPkTfuSrIndInfo)
10568 count = param->srLst.count;
10569 node = param->srLst.last;
10571 tfuSrInfo = (TfuSrInfo *)node->node;
10573 CMCHKPK(cmPkTfuSrInfo, tfuSrInfo, mBuf);
10574 cmLListDelFrm(¶m->srLst, &tfuSrInfo->lnk);
10575 tfuSrInfo->lnk.node = (PTR)NULLP;
10577 CMCHKPK(oduUnpackUInt32, count, mBuf);
10578 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10579 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10585 /***********************************************************
10587 * Func : cmUnpkTfuSrIndInfo
10590 * Desc : This structure contains all the Scheduling Requests (SR) indications
10591 * received in a subframe.
10600 **********************************************************/
10602 S16 cmUnpkTfuSrIndInfo
10604 TfuSrIndInfo *param,
10609 S16 cmUnpkTfuSrIndInfo(param, memCp, mBuf)
10610 TfuSrIndInfo *param;
10616 U32 count, loopCnt;
10617 TfuSrInfo *tfuSrInfo;
10619 TRC3(cmUnpkTfuSrIndInfo)
10621 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10622 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10623 cmLListInit(¶m->srLst);
10624 CMCHKUNPK(oduPackUInt32, &count, mBuf);
10625 for (loopCnt=0; loopCnt<count; loopCnt++) {
10626 cmGetMem((Ptr)memCp, sizeof(*tfuSrInfo), (Ptr *)&tfuSrInfo);
10627 CMCHKUNPK(cmUnpkTfuSrInfo, tfuSrInfo, mBuf);
10628 cmLListAdd2Tail(¶m->srLst, &tfuSrInfo->lnk);
10629 tfuSrInfo->lnk.node = (PTR)tfuSrInfo;
10634 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10635 /***********************************************************
10637 * Func : cmPkTfuHqInfo
10640 * Desc : This structure contains the HARQ feedback for a single UE.
10641 * @details RNTI is present to identify the UE.
10642 * For FDD a single feedback is present.
10643 * For TDD HARQ multiplexing a list of HARQ feedbacks is present.
10652 **********************************************************/
10660 S16 cmPkTfuHqInfo(param, mBuf)
10667 TRC3(cmPkTfuHqInfo)
10669 CMCHKPK(oduUnpackUInt8, param->isPusch, mBuf);
10670 for (i=TFU_MAX_HARQ_FDBKS-1; i >= 0; i--) {
10671 CMCHKPK(oduUnpackUInt32, param->isAck[i], mBuf);
10674 CMCHKPK(oduUnpackUInt8, param->M, mBuf);
10676 CMCHKPK(oduUnpackUInt8, param->noOfTbs, mBuf);
10677 /* ACC-TDD ccpu00130520 */
10678 CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf);
10679 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10683 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
10684 /***********************************************************
10686 * Func : cmUnpkTfuHqInfo
10689 * Desc : This structure contains the HARQ feedback for a single UE.
10690 * @details RNTI is present to identify the UE.
10691 * For FDD a single feedback is present.
10692 * For TDD HARQ multiplexing a list of HARQ feedbacks is present.
10701 **********************************************************/
10703 S16 cmUnpkTfuHqInfo
10709 S16 cmUnpkTfuHqInfo(param, mBuf)
10715 TRC3(cmUnpkTfuHqInfo)
10717 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10718 /* ACC-TDD ccpu00130520 */
10719 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->hqFdbkMode, mBuf);
10720 CMCHKUNPK(oduPackUInt8, ¶m->noOfTbs, mBuf);
10722 CMCHKUNPK(oduPackUInt8, ¶m->M, mBuf);
10724 for (i=0; i<TFU_MAX_HARQ_FDBKS; i++) {
10725 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->isAck[i], mBuf);
10727 CMCHKUNPK(oduPackUInt8, ¶m->isPusch, mBuf);
10735 /***********************************************************
10737 * Func : cmPkTfuHqIndInfo
10740 * Desc : This structure contains a list of HARQ feedback for a number of UEs.
10741 * @details All the HARQ feedback received in the subframe are clubbed together
10742 * in this data structure and given to the scheduler for processing.
10751 **********************************************************/
10753 S16 cmPkTfuHqIndInfo
10755 TfuHqIndInfo *param,
10759 S16 cmPkTfuHqIndInfo(param, mBuf)
10760 TfuHqIndInfo *param;
10767 TfuHqInfo *tfuHqInfo;
10769 TRC3(cmPkTfuHqIndInfo)
10771 count = param->hqIndLst.count;
10772 node = param->hqIndLst.last;
10774 tfuHqInfo = (TfuHqInfo *)node->node;
10776 CMCHKPK(cmPkTfuHqInfo, tfuHqInfo, mBuf);
10777 cmLListDelFrm(¶m->hqIndLst, &tfuHqInfo->lnk);
10778 tfuHqInfo->lnk.node = (PTR)NULLP;
10780 CMCHKPK(oduUnpackUInt32, count, mBuf);
10781 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
10782 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
10788 /***********************************************************
10790 * Func : cmUnpkTfuHqIndInfo
10793 * Desc : This structure contains a list of HARQ feedback for a number of UEs.
10794 * @details All the HARQ feedback received in the subframe are clubbed together
10795 * in this data structure and given to the scheduler for processing.
10804 **********************************************************/
10806 S16 cmUnpkTfuHqIndInfo
10808 TfuHqIndInfo *param,
10813 S16 cmUnpkTfuHqIndInfo(param, memCp, mBuf)
10814 TfuHqIndInfo *param;
10820 U32 count, loopCnt;
10821 TfuHqInfo *tfuHqInfo;
10823 TRC3(cmUnpkTfuHqIndInfo)
10825 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
10826 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
10827 cmLListInit(¶m->hqIndLst);
10828 CMCHKUNPK(oduPackUInt32, &count, mBuf);
10829 for (loopCnt=0; loopCnt<count; loopCnt++) {
10830 cmGetMem((Ptr)memCp, sizeof(*tfuHqInfo), (Ptr *)&tfuHqInfo);
10831 CMCHKUNPK(cmUnpkTfuHqInfo, tfuHqInfo, mBuf);
10832 cmLListAdd2Tail(¶m->hqIndLst, &tfuHqInfo->lnk);
10833 tfuHqInfo->lnk.node = (PTR)tfuHqInfo;
10840 /***********************************************************
10842 * Func : cmPkTfuUlCqiInfo
10845 * Desc : This structure conveys the Uplink CQI information for a single subband.
10854 **********************************************************/
10856 S16 cmPkTfuUlCqiInfo
10858 TfuUlCqiInfo *param,
10862 S16 cmPkTfuUlCqiInfo(param, mBuf)
10863 TfuUlCqiInfo *param;
10868 TRC3(cmPkTfuUlCqiInfo)
10870 CMCHKPK(cmPkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf);
10876 /***********************************************************
10878 * Func : cmUnpkTfuUlCqiInfo
10881 * Desc : This structure conveys the Uplink CQI information for a single subband.
10890 **********************************************************/
10892 S16 cmUnpkTfuUlCqiInfo
10894 TfuUlCqiInfo *param,
10898 S16 cmUnpkTfuUlCqiInfo(param, mBuf)
10899 TfuUlCqiInfo *param;
10904 TRC3(cmUnpkTfuUlCqiInfo)
10906 CMCHKUNPK(cmUnpkTfuSubbandCqiInfo, ¶m->subbandCqi, mBuf);
10912 /***********************************************************
10914 * Func : cmPkTfuUlCqiRpt
10917 * Desc : This structure contains the UL CQI estimated by the physical layer.
10918 * @details The report could be wideband CQI or subBand CQI or both.
10927 **********************************************************/
10929 S16 cmPkTfuUlCqiRpt
10931 TfuUlCqiRpt *param,
10935 S16 cmPkTfuUlCqiRpt(param, mBuf)
10936 TfuUlCqiRpt *param;
10942 TRC3(cmPkTfuUlCqiRpt)
10944 for (i=TFU_MAX_UL_SUBBAND-1; i >= 0; i--) {
10945 CMCHKPK(cmPkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf);
10947 CMCHKPK(oduUnpackUInt8, param->numSubband, mBuf);
10948 CMCHKPK(oduUnpackUInt8, param->wideCqi, mBuf);
10949 CMCHKPK(oduUnpackUInt8, param->isTxPort0, mBuf);
10950 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
10956 /***********************************************************
10958 * Func : cmUnpkTfuUlCqiRpt
10961 * Desc : This structure contains the UL CQI estimated by the physical layer.
10962 * @details The report could be wideband CQI or subBand CQI or both.
10971 **********************************************************/
10973 S16 cmUnpkTfuUlCqiRpt
10975 TfuUlCqiRpt *param,
10979 S16 cmUnpkTfuUlCqiRpt(param, mBuf)
10980 TfuUlCqiRpt *param;
10986 TRC3(cmUnpkTfuUlCqiRpt)
10988 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
10989 CMCHKUNPK(oduPackUInt8, ¶m->isTxPort0, mBuf);
10990 CMCHKUNPK(oduPackUInt8, ¶m->wideCqi, mBuf);
10991 CMCHKUNPK(oduPackUInt8, ¶m->numSubband, mBuf);
10992 for (i=0; i<TFU_MAX_UL_SUBBAND; i++) {
10993 CMCHKUNPK(cmUnpkTfuUlCqiInfo, ¶m->ulCqiInfoArr[i], mBuf);
11000 /***********************************************************
11002 * Func : cmPkTfuUlCqiIndInfo
11005 * Desc : This structure conveys the Uplink CQI information.
11006 * @details Uplink CQI is calculated by the physical layer, and is this
11007 * information is provided to the scheduler.
11008 * This data structure clubs together the UL CQI estimates for all the UEs that
11009 * have been scheduled in the subframe for uplink transmission.
11018 **********************************************************/
11020 S16 cmPkTfuUlCqiIndInfo
11022 TfuUlCqiIndInfo *param,
11026 S16 cmPkTfuUlCqiIndInfo(param, mBuf)
11027 TfuUlCqiIndInfo *param;
11034 TfuUlCqiRpt *tfuUlCqiRpt;
11036 TRC3(cmPkTfuUlCqiIndInfo)
11038 count = param->ulCqiRpt.count;
11039 node = param->ulCqiRpt.last;
11041 tfuUlCqiRpt = (TfuUlCqiRpt *)node->node;
11043 CMCHKPK(cmPkTfuUlCqiRpt, tfuUlCqiRpt, mBuf);
11044 cmLListDelFrm(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk);
11045 tfuUlCqiRpt->lnk.node = (PTR)NULLP;
11047 CMCHKPK(oduUnpackUInt32, count, mBuf);
11048 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11049 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11055 /***********************************************************
11057 * Func : cmUnpkTfuUlCqiIndInfo
11060 * Desc : This structure conveys the Uplink CQI information.
11061 * @details Uplink CQI is calculated by the physical layer, and is this
11062 * information is provided to the scheduler.
11063 * This data structure clubs together the UL CQI estimates for all the UEs that
11064 * have been scheduled in the subframe for uplink transmission.
11073 **********************************************************/
11075 S16 cmUnpkTfuUlCqiIndInfo
11077 TfuUlCqiIndInfo *param,
11082 S16 cmUnpkTfuUlCqiIndInfo(param, memCp, mBuf)
11083 TfuUlCqiIndInfo *param;
11089 U32 count, loopCnt;
11090 TfuUlCqiRpt *tfuUlCqiRpt;
11092 TRC3(cmUnpkTfuUlCqiIndInfo)
11094 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11095 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11096 cmLListInit(¶m->ulCqiRpt);
11097 CMCHKUNPK(oduPackUInt32, &count, mBuf);
11098 for (loopCnt=0; loopCnt<count; loopCnt++) {
11099 cmGetMem((Ptr)memCp, sizeof(*tfuUlCqiRpt), (Ptr *)&tfuUlCqiRpt);
11100 CMCHKUNPK(cmUnpkTfuUlCqiRpt, tfuUlCqiRpt, mBuf);
11101 cmLListAdd2Tail(¶m->ulCqiRpt, &tfuUlCqiRpt->lnk);
11102 tfuUlCqiRpt->lnk.node = (PTR)tfuUlCqiRpt;
11110 /***********************************************************
11112 * Func : cmPkTfuDlCqiRpt
11115 * Desc : This structure contains the DL CQI report for a single UE.
11116 * @details The report could either be reported on PUCCH or PUSCH, a flag
11117 * conveys this information.
11126 **********************************************************/
11128 S16 cmPkTfuDlCqiRpt
11130 TfuDlCqiRpt *param,
11134 S16 cmPkTfuDlCqiRpt(param, mBuf)
11135 TfuDlCqiRpt *param;
11140 TRC3(cmPkTfuDlCqiRpt)
11142 if (cmPkTfuDlCqiInfo(param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK)
11144 CMCHKPK(oduUnpackUInt8, param->isPucchInfo, mBuf);
11145 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11151 /***********************************************************
11153 * Func : cmUnpkTfuDlCqiRpt
11156 * Desc : This structure contains the DL CQI report for a single UE.
11157 * @details The report could either be reported on PUCCH or PUSCH, a flag
11158 * conveys this information.
11167 **********************************************************/
11169 S16 cmUnpkTfuDlCqiRpt
11171 TfuDlCqiRpt *param,
11175 S16 cmUnpkTfuDlCqiRpt(param, mBuf)
11176 TfuDlCqiRpt *param;
11181 TRC3(cmUnpkTfuDlCqiRpt)
11183 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11184 CMCHKUNPK(oduPackUInt8, ¶m->isPucchInfo, mBuf);
11185 if (cmUnpkTfuDlCqiInfo (param->isPucchInfo, ¶m->dlCqiInfo, mBuf) != ROK)
11192 /***********************************************************
11194 * Func : cmPkTfuDlCqiIndInfo
11197 * Desc : This structure contains a list of Downlink CQI reports transmitted by
11199 * @details This structure clubs together DL CQI reports for a number of UEs.
11208 **********************************************************/
11210 S16 cmPkTfuDlCqiIndInfo
11212 TfuDlCqiIndInfo *param,
11216 S16 cmPkTfuDlCqiIndInfo(param, mBuf)
11217 TfuDlCqiIndInfo *param;
11224 TfuDlCqiRpt *tfuDlCqiRpt;
11226 TRC3(cmPkTfuDlCqiIndInfo)
11228 count = param->dlCqiRptsLst.count;
11229 node = param->dlCqiRptsLst.last;
11231 tfuDlCqiRpt = (TfuDlCqiRpt *)node->node;
11233 CMCHKPK(cmPkTfuDlCqiRpt, tfuDlCqiRpt, mBuf);
11234 cmLListDelFrm(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk);
11235 tfuDlCqiRpt->lnk.node = (PTR)NULLP;
11237 CMCHKPK(oduUnpackUInt32, count, mBuf);
11238 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11239 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11245 /***********************************************************
11247 * Func : cmUnpkTfuDlCqiIndInfo
11250 * Desc : This structure contains a list of Downlink CQI reports transmitted by
11252 * @details This structure clubs together DL CQI reports for a number of UEs.
11261 **********************************************************/
11263 S16 cmUnpkTfuDlCqiIndInfo
11265 TfuDlCqiIndInfo *param,
11270 S16 cmUnpkTfuDlCqiIndInfo(param, memCp, mBuf)
11271 TfuDlCqiIndInfo *param;
11277 U32 count, loopCnt;
11278 TfuDlCqiRpt *tfuDlCqiRpt;
11280 TRC3(cmUnpkTfuDlCqiIndInfo)
11282 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11283 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11284 cmLListInit(¶m->dlCqiRptsLst);
11285 CMCHKUNPK(oduPackUInt32, &count, mBuf);
11286 for (loopCnt=0; loopCnt<count; loopCnt++) {
11287 cmGetMem((Ptr)memCp, sizeof(*tfuDlCqiRpt), (Ptr *)&tfuDlCqiRpt);
11288 CMCHKUNPK(cmUnpkTfuDlCqiRpt, tfuDlCqiRpt, mBuf);
11289 cmLListAdd2Tail(¶m->dlCqiRptsLst, &tfuDlCqiRpt->lnk);
11290 tfuDlCqiRpt->lnk.node = (PTR)tfuDlCqiRpt;
11297 /***********************************************************
11299 * Func : cmPkTfuCrcInfo
11302 * Desc : This structure contains the CRC indication for a single
11312 **********************************************************/
11320 S16 cmPkTfuCrcInfo(param, mBuf)
11326 TRC3(cmPkTfuCrcInfo)
11328 CMCHKPK(cmPkTknU8, ¶m->rv, mBuf);
11329 CMCHKPK(oduUnpackUInt8, param->isFailure, mBuf);
11330 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11336 /***********************************************************
11338 * Func : cmUnpkTfuCrcInfo
11341 * Desc : This structure contains the CRC indication for a single
11351 **********************************************************/
11353 S16 cmUnpkTfuCrcInfo
11359 S16 cmUnpkTfuCrcInfo(param, mBuf)
11365 TRC3(cmUnpkTfuCrcInfo)
11367 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11368 CMCHKUNPK(oduPackUInt8, ¶m->isFailure, mBuf);
11369 CMCHKUNPK(cmUnpkTknU8, ¶m->rv, mBuf);
11375 /***********************************************************
11377 * Func : cmPkTfuCrcIndInfo
11380 * Desc : This structure contains information that is passed as a part of the
11381 * CRC Indication from PHY to MAC.
11382 * @details This structure clubs together all the CRC indications for
11383 * a single subframe and conveys this information to the scheduler.
11392 **********************************************************/
11394 S16 cmPkTfuCrcIndInfo
11396 TfuCrcIndInfo *param,
11400 S16 cmPkTfuCrcIndInfo(param, mBuf)
11401 TfuCrcIndInfo *param;
11408 TfuCrcInfo *tfuCrcIndInfo;
11410 TRC3(cmPkTfuCrcIndInfo)
11413 CMCHKPK(oduUnpackUInt8, param->sccIdx, mBuf);
11414 CMCHKPK(oduUnpackUInt8, param->sectorId, mBuf);
11415 #endif /* TFU_5GTF */
11416 count = param->crcLst.count;
11417 node = param->crcLst.last;
11419 tfuCrcIndInfo = (TfuCrcInfo *)node->node;
11421 CMCHKPK(cmPkTfuCrcInfo, tfuCrcIndInfo, mBuf);
11422 cmLListDelFrm(¶m->crcLst, &tfuCrcIndInfo->lnk);
11423 tfuCrcIndInfo->lnk.node = (PTR)NULLP;
11425 CMCHKPK(oduUnpackUInt32, count, mBuf);
11426 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11427 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11433 /***********************************************************
11435 * Func : cmUnpkTfuCrcIndInfo
11438 * Desc : This structure contains information that is passed as a part of the
11439 * CRC Indication from PHY to MAC.
11440 * @details This structure clubs together all the CRC indications for
11441 * a single subframe and conveys this information to the scheduler.
11450 **********************************************************/
11452 S16 cmUnpkTfuCrcIndInfo
11454 TfuCrcIndInfo *param,
11459 S16 cmUnpkTfuCrcIndInfo(param, memCp, mBuf)
11460 TfuCrcIndInfo *param;
11466 U32 count, loopCnt;
11467 TfuCrcInfo *tfuCrcIndInfo;
11469 TRC3(cmUnpkTfuCrcIndInfo)
11471 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11472 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11473 cmLListInit(¶m->crcLst);
11474 CMCHKUNPK(oduPackUInt32, &count, mBuf);
11475 for (loopCnt=0; loopCnt<count; loopCnt++) {
11476 cmGetMem((Ptr)memCp, sizeof(*tfuCrcIndInfo), (Ptr *)&tfuCrcIndInfo);
11477 CMCHKUNPK(cmUnpkTfuCrcInfo, tfuCrcIndInfo, mBuf);
11478 cmLListAdd2Tail(¶m->crcLst, &tfuCrcIndInfo->lnk);
11479 tfuCrcIndInfo->lnk.node = (PTR)tfuCrcIndInfo;
11482 CMCHKUNPK(oduPackUInt8, ¶m->sectorId, mBuf);
11483 CMCHKUNPK(oduPackUInt8, ¶m->sccIdx, mBuf);
11484 #endif /* TFU_5GTF */
11490 /***********************************************************
11492 * Func : cmPkTfuTimingAdvInfo
11495 * Desc : This structure contains the timing advance information for a single
11505 **********************************************************/
11507 S16 cmPkTfuTimingAdvInfo
11509 TfuTimingAdvInfo *param,
11513 S16 cmPkTfuTimingAdvInfo(param, mBuf)
11514 TfuTimingAdvInfo *param;
11519 TRC3(cmPkTfuTimingAdvInfo)
11521 CMCHKPK(oduUnpackUInt8, param->timingAdv, mBuf);
11522 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
11528 /***********************************************************
11530 * Func : cmUnpkTfuTimingAdvInfo
11533 * Desc : This structure contains the timing advance information for a single
11543 **********************************************************/
11545 S16 cmUnpkTfuTimingAdvInfo
11547 TfuTimingAdvInfo *param,
11551 S16 cmUnpkTfuTimingAdvInfo(param, mBuf)
11552 TfuTimingAdvInfo *param;
11557 TRC3(cmUnpkTfuTimingAdvInfo)
11559 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
11560 CMCHKUNPK(oduPackUInt8, ¶m->timingAdv, mBuf);
11566 /***********************************************************
11568 * Func : cmPkTfuTimingAdvIndInfo
11571 * Desc : This structure contains information that is passed as part of the Timing
11572 * Advance indication from PHY to MAC.
11573 * @details This structure clubs together timing advances for a number of UEs.
11582 **********************************************************/
11584 S16 cmPkTfuTimingAdvIndInfo
11586 TfuTimingAdvIndInfo *param,
11590 S16 cmPkTfuTimingAdvIndInfo(param, mBuf)
11591 TfuTimingAdvIndInfo *param;
11598 TfuTimingAdvInfo *tfuTimingAdvInfo;
11600 TRC3(cmPkTfuTimingAdvIndInfo)
11602 count = param->timingAdvLst.count;
11603 node = param->timingAdvLst.last;
11605 tfuTimingAdvInfo = (TfuTimingAdvInfo *)node->node;
11607 CMCHKPK(cmPkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf);
11608 cmLListDelFrm(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk);
11609 tfuTimingAdvInfo->lnk.node = (PTR)NULLP;
11611 CMCHKPK(oduUnpackUInt32, count, mBuf);
11612 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11613 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11619 /***********************************************************
11621 * Func : cmUnpkTfuTimingAdvIndInfo
11624 * Desc : This structure contains information that is passed as part of the Timing
11625 * Advance indication from PHY to MAC.
11626 * @details This structure clubs together timing advances for a number of UEs.
11635 **********************************************************/
11637 S16 cmUnpkTfuTimingAdvIndInfo
11639 TfuTimingAdvIndInfo *param,
11644 S16 cmUnpkTfuTimingAdvIndInfo(param, memCp, mBuf)
11645 TfuTimingAdvIndInfo *param;
11651 U32 count, loopCnt;
11652 TfuTimingAdvInfo *tfuTimingAdvInfo;
11654 TRC3(cmUnpkTfuTimingAdvIndInfo)
11656 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11657 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11658 cmLListInit(¶m->timingAdvLst);
11659 CMCHKUNPK(oduPackUInt32, &count, mBuf);
11660 for (loopCnt=0; loopCnt<count; loopCnt++) {
11661 cmGetMem((Ptr)memCp, sizeof(*tfuTimingAdvInfo), (Ptr *)&tfuTimingAdvInfo);
11662 CMCHKUNPK(cmUnpkTfuTimingAdvInfo, tfuTimingAdvInfo, mBuf);
11663 cmLListAdd2Tail(¶m->timingAdvLst, &tfuTimingAdvInfo->lnk);
11664 tfuTimingAdvInfo->lnk.node = (PTR)tfuTimingAdvInfo;
11670 /***********************************************************
11672 * Func : cmPkTfuTtiCellInfo
11675 * Desc : This structure contains information that is
11676 * passed as a part of the TTI indication sent
11677 * from CL to MAC and SCH
11686 **********************************************************/
11688 S16 cmPkTfuTtiCellInfo
11690 TfuTtiCellInfo *param,
11694 S16 cmPkTfuTtiCellInfo(param, mBuf)
11695 TfuTtiCellInfo *param;
11700 TRC3(cmPkTfuTtiCellInfo)
11702 CMCHKPK(oduUnpackUInt8, param->ulBlankSf, mBuf);
11703 CMCHKPK(oduUnpackUInt8, param->dlBlankSf, mBuf);
11704 CMCHKPK(oduUnpackUInt8, param->schTickDelta, mBuf);
11705 CMCHKPK(oduPackBool, param->isDummyTti, mBuf);
11706 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
11707 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
11712 /***********************************************************
11714 * Func : cmPkTfuTtiIndInfo
11717 * Desc : This structure contains information that is passed as a part of the TTI
11718 * indication sent from PHY to MAC.
11727 **********************************************************/
11729 S16 cmPkTfuTtiIndInfo
11731 TfuTtiIndInfo *param,
11735 S16 cmPkTfuTtiIndInfo(param, mBuf)
11736 TfuTtiIndInfo *param;
11742 TRC3(cmPkTfuTtiIndInfo)
11745 for (i=(param->numCells-1); i >= 0; i--) {
11746 CMCHKPK(cmPkTfuTtiCellInfo, ¶m->cells[i], mBuf);
11748 CMCHKPK(oduUnpackUInt8, param->numCells, mBuf);
11754 /***********************************************************
11756 * Func : cmUnpkTfuTtiCellInfo
11759 * Desc : This structure contains information that is
11760 * passed as a part of the TTI indication sent
11761 * from CL to MAC and SCH
11770 **********************************************************/
11772 S16 cmUnpkTfuTtiCellInfo
11774 TfuTtiCellInfo *param,
11778 S16 cmUnpkTfuTtiCellInfo(param, mBuf)
11779 TfuTtiCellInfo *param;
11784 TRC3(cmUnpkTfuTtiCellInfo)
11786 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
11787 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
11788 CMCHKUNPK(oduUnpackBool, ¶m->isDummyTti, mBuf);
11789 CMCHKUNPK(oduPackUInt8, ¶m->schTickDelta, mBuf);
11790 CMCHKUNPK(oduPackUInt8, ¶m->dlBlankSf, mBuf);
11791 CMCHKUNPK(oduPackUInt8, ¶m->ulBlankSf, mBuf);
11797 /***********************************************************
11799 * Func : cmPkTfuRaReqInfo
11802 * Desc : This structure contains the information for a single Random Access Request.
11803 * @details The information present in this structure is for a single preamble.
11804 * Associated with each preamble are fields that the physical layer calculates
11805 * based on the reception of the Random Access Request. These are the following
11806 * -# Timing Advance
11808 * -# CQI (optional).
11817 **********************************************************/
11819 S16 cmPkTfuRaReqInfo
11821 TfuRaReqInfo *param,
11825 S16 cmPkTfuRaReqInfo(param, mBuf)
11826 TfuRaReqInfo *param;
11831 TRC3(cmPkTfuRaReqInfo)
11833 CMCHKPK(oduUnpackUInt8, param->cqiIdx, mBuf);
11834 CMCHKPK(oduUnpackUInt8, param->cqiPres, mBuf);
11835 CMCHKPK(oduUnpackUInt8, param->tpc, mBuf);
11836 CMCHKPK(oduUnpackUInt16, param->ta, mBuf);
11837 CMCHKPK(oduUnpackUInt8, param->rapId, mBuf);
11843 /***********************************************************
11845 * Func : cmUnpkTfuRaReqInfo
11848 * Desc : This structure contains the information for a single Random Access Request.
11849 * @details The information present in this structure is for a single preamble.
11850 * Associated with each preamble are fields that the physical layer calculates
11851 * based on the reception of the Random Access Request. These are the following
11852 * -# Timing Advance
11854 * -# CQI (optional).
11863 **********************************************************/
11865 S16 cmUnpkTfuRaReqInfo
11867 TfuRaReqInfo *param,
11871 S16 cmUnpkTfuRaReqInfo(param, mBuf)
11872 TfuRaReqInfo *param;
11877 TRC3(cmUnpkTfuRaReqInfo)
11879 CMCHKUNPK(oduPackUInt8, ¶m->rapId, mBuf);
11880 CMCHKUNPK(oduPackUInt16, ¶m->ta, mBuf);
11881 CMCHKUNPK(oduPackUInt8, ¶m->tpc, mBuf);
11882 CMCHKUNPK(oduPackUInt8, ¶m->cqiPres, mBuf);
11883 CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx, mBuf);
11889 /***********************************************************
11891 * Func : cmPkTfuRachInfo
11894 * Desc : This structure contains RACH request information for a single
11904 **********************************************************/
11906 S16 cmPkTfuRachInfo
11909 TfuRachInfo *param,
11913 S16 cmPkTfuRachInfo(memCp, param, mBuf)
11915 TfuRachInfo *param;
11921 TRC3(cmPkTfuRachInfo)
11923 for (i= (param->numRaReqInfo - 1); i >= 0; i--) {
11924 CMCHKPK(cmPkTfuRaReqInfo, &(param->raReqInfoArr[i]), mBuf);
11927 CMCHKPK(oduUnpackUInt16, param->nPwrFactor, mBuf);
11928 CMCHKPK(oduUnpackUInt8, param->nPRACHSymbIndex, mBuf);
11929 CMCHKPK(oduUnpackUInt8, param->nf1Value, mBuf);
11930 CMCHKPK(oduUnpackUInt8, param->nCyclicShift, mBuf);
11931 CMCHKPK(oduUnpackUInt8, param->nRootSeq, mBuf);
11932 CMCHKPK(oduUnpackUInt8, param->nPRACHConfiguration, mBuf);
11933 CMCHKPK(oduUnpackUInt8, param->nPreambleFormat, mBuf);
11935 CMCHKPK(oduUnpackUInt8, param->numRaReqInfo, mBuf);
11936 CMCHKPK(cmPkLteRnti, param->raRnti, mBuf);
11942 /***********************************************************
11944 * Func : cmUnpkTfuRachInfo
11947 * Desc : This structure contains RACH request information for a single
11957 **********************************************************/
11959 S16 cmUnpkTfuRachInfo
11962 TfuRachInfo *param,
11966 S16 cmUnpkTfuRachInfo(memCp, param, mBuf)
11968 TfuRachInfo *param;
11974 TRC3(cmUnpkTfuRachInfo)
11976 CMCHKUNPK(cmUnpkLteRnti, ¶m->raRnti, mBuf);
11977 CMCHKUNPK(oduPackUInt8, ¶m->numRaReqInfo, mBuf);
11979 CMCHKUNPK(oduUnpackUInt8, param->nPreambleFormat, mBuf);
11980 CMCHKUNPK(oduUnpackUInt8, param->nPRACHConfiguration, mBuf);
11981 CMCHKUNPK(oduUnpackUInt8, param->nRootSeq, mBuf);
11982 CMCHKUNPK(oduUnpackUInt8, param->nCyclicShift, mBuf);
11983 CMCHKUNPK(oduUnpackUInt8, param->nf1Value, mBuf);
11984 CMCHKUNPK(oduUnpackUInt8, param->nPRACHSymbIndex, mBuf);
11985 CMCHKUNPK(oduUnpackUInt16, param->nPwrFactor, mBuf);
11987 if (cmGetMem (&(memCp), (sizeof(TfuRaReqInfo) * param->numRaReqInfo),
11988 (Ptr *)¶m->raReqInfoArr) != ROK)
11992 for (i=0; i<param->numRaReqInfo; i++) {
11993 CMCHKUNPK(cmUnpkTfuRaReqInfo, ¶m->raReqInfoArr[i], mBuf);
12000 /***********************************************************
12002 * Func : cmPkTfuRaReqIndInfo
12005 * Desc : This structure contains the list of Random Access Requests received in a
12007 * @details Random Access Request is associated with a RA-RNTI, which remains
12008 * common for all the Random access requests within a subframe. This structure
12009 * thus carries the RA-RNTI and a list of Random Access Request information.
12010 * This information consists of the following
12011 * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
12013 * -# Timing Advance - this corresponds to the timing adjustment that the UE
12014 * needs to be uplink synchronized. This value is calculated by physical layer.
12015 * -# tpc - this is the power control command that the physical layer calculates
12016 * from the received RA request. This value is transmitted in the RA Response
12018 * -# CQI - this is the Channel quality index of the UL channel estimated by the
12019 * physical layer. This aids MAC in the scheduling of this UE.
12028 **********************************************************/
12030 S16 cmPkTfuRaReqIndInfo
12032 TfuRaReqIndInfo *param,
12036 S16 cmPkTfuRaReqIndInfo(param, mBuf)
12037 TfuRaReqIndInfo *param;
12043 TRC3(cmPkTfuRaReqIndInfo)
12045 for (i= (param->nmbOfRaRnti-1); i >= 0; i--)
12047 if (ROK != cmPkTfuRachInfo(param->memCp,
12048 &(param->rachInfoArr[i]), mBuf))
12053 CMCHKPK(oduUnpackUInt8, param->nmbOfRaRnti, mBuf);
12054 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12055 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12061 /***********************************************************
12063 * Func : cmUnpkTfuRaReqIndInfo
12066 * Desc : This structure contains the list of Random Access Requests received in a
12068 * @details Random Access Request is associated with a RA-RNTI, which remains
12069 * common for all the Random access requests within a subframe. This structure
12070 * thus carries the RA-RNTI and a list of Random Access Request information.
12071 * This information consists of the following
12072 * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
12074 * -# Timing Advance - this corresponds to the timing adjustment that the UE
12075 * needs to be uplink synchronized. This value is calculated by physical layer.
12076 * -# tpc - this is the power control command that the physical layer calculates
12077 * from the received RA request. This value is transmitted in the RA Response
12079 * -# CQI - this is the Channel quality index of the UL channel estimated by the
12080 * physical layer. This aids MAC in the scheduling of this UE.
12089 **********************************************************/
12091 S16 cmUnpkTfuRaReqIndInfo
12093 TfuRaReqIndInfo *param,
12097 S16 cmUnpkTfuRaReqIndInfo(param, mBuf)
12098 TfuRaReqIndInfo *param;
12104 TRC3(cmUnpkTfuRaReqIndInfo)
12106 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12107 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12108 CMCHKUNPK(oduPackUInt8, ¶m->nmbOfRaRnti, mBuf);
12109 if (cmGetMem (&(param->memCp), (sizeof(TfuRachInfo) * param->nmbOfRaRnti),
12110 (Ptr *)¶m->rachInfoArr) != ROK)
12114 for (i=0; i<param->nmbOfRaRnti; i++)
12116 if (ROK != cmUnpkTfuRachInfo(param->memCp, ¶m->rachInfoArr[i], mBuf))
12126 /***********************************************************
12128 * Func : cmPkTfuPucchDeltaPwr
12131 * Desc : This structure contains PUCCH Delta power for a single UE.
12140 **********************************************************/
12142 S16 cmPkTfuPucchDeltaPwrInfo
12144 TfuPucchDeltaPwr *param,
12148 S16 cmPkTfuPucchDeltaPwrInfo(param, mBuf)
12149 TfuPucchDeltaPwr *param;
12154 TRC3(cmPkTfuPucchDeltaPwrInfo)
12156 CMCHKPK(SPkS8, param->pucchDeltaPwr, mBuf);
12157 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
12163 /***********************************************************
12165 * Func : cmUnpkTfuPucchDeltaPwr
12168 * Desc : This structure contains PUCCH Delta power for a single UE.
12177 **********************************************************/
12179 S16 cmUnpkTfuPucchDeltaPwrInfo
12181 TfuPucchDeltaPwr *param,
12185 S16 cmUnpkTfuPucchDeltaPwrInfo(param, mBuf)
12186 TfuPucchDeltaPwr *param;
12191 TRC3(cmUnpkTfuPucchDeltaPwrInfo)
12193 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
12194 CMCHKUNPK(SUnpkS8, ¶m->pucchDeltaPwr, mBuf);
12200 /***********************************************************
12202 * Func : cmPkTfuPucchDeltaPwrIndInfo
12205 * Desc : This structure contains information that is passed as a part of the
12206 * PUCCH Delta power indication from PHY to SCH.
12207 * @details This structure clubs together PUCCH Delta power values for a number
12217 **********************************************************/
12219 S16 cmPkTfuPucchDeltaPwrIndInfo
12221 TfuPucchDeltaPwrIndInfo *param,
12225 S16 cmPkTfuPucchDeltaPwrIndInfo(param, mBuf)
12226 TfuPucchDeltaPwrIndInfo *param;
12233 TfuPucchDeltaPwr *tfuPucchDeltaPwr;
12235 TRC3(cmPkTfuPucchDeltaPwrIndInfo)
12237 count = param->pucchDeltaPwrLst.count;
12238 node = param->pucchDeltaPwrLst.last;
12240 tfuPucchDeltaPwr = (TfuPucchDeltaPwr *)node->node;
12242 CMCHKPK(cmPkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf);
12243 cmLListDelFrm(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk);
12244 tfuPucchDeltaPwr->lnk.node = (PTR)NULLP;
12246 CMCHKPK(oduUnpackUInt32, count, mBuf);
12247 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
12248 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12254 /***********************************************************
12256 * Func : cmUnpkTfuPucchDeltaPwrIndInfo
12259 * Desc : This structure contains information that is passed as a part of the
12260 * PUCCH Delta power indication from PHY to SCH.
12261 * @details This structure clubs together PUCCH Delta power values for a number
12271 **********************************************************/
12273 S16 cmUnpkTfuPucchDeltaPwrIndInfo
12275 TfuPucchDeltaPwrIndInfo *param,
12280 S16 cmUnpkTfuPucchDeltaPwrIndInfo(param, memCp, mBuf)
12281 TfuPucchDeltaPwrIndInfo *param;
12287 U32 count, loopCnt;
12288 TfuPucchDeltaPwr *tfuPucchDeltaPwr;
12290 TRC3(cmUnpkTfuPucchDeltaPwrIndInfo)
12292 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12293 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
12294 cmLListInit(¶m->pucchDeltaPwrLst);
12295 CMCHKUNPK(oduPackUInt32, &count, mBuf);
12296 for (loopCnt=0; loopCnt<count; loopCnt++) {
12297 cmGetMem((Ptr)memCp, sizeof(*tfuPucchDeltaPwr), (Ptr *)&tfuPucchDeltaPwr);
12298 CMCHKUNPK(cmUnpkTfuPucchDeltaPwrInfo, tfuPucchDeltaPwr, mBuf);
12299 cmLListAdd2Tail(¶m->pucchDeltaPwrLst, &tfuPucchDeltaPwr->lnk);
12300 tfuPucchDeltaPwr->lnk.node = (PTR)tfuPucchDeltaPwr;
12312 S16 cmPkBuffer(param, mBuf)
12319 if (SFndLenMsg(*param, &msgLen) != ROK)
12321 if (SCatMsg(mBuf, *param, M1M2) != ROK)
12323 TFU_FREE_MSG(*param);
12325 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
12335 S16 cmUnpkBuffer(param, mBuf)
12340 MsgLen msgLen=0, totalMsgLen=0;
12342 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
12343 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
12345 if (SSegMsg(mBuf, totalMsgLen-msgLen, param) != ROK)
12351 /***********************************************************
12353 * Func : cmPkTfuDoaInd
12356 * Desc : This API is used to indicate DOA(Direction Of Arrival)
12357 * identifier for one or more UEs.
12358 * It carries a DOA for each UE.
12359 * @param pst Pointer to the post structure.
12360 * @param suId SAP ID of the service user.
12361 * @param doaInd Pointer to the TfuDoaIndInfo structure.
12362 * @return ROK/RFAILED
12371 **********************************************************/
12377 TfuDoaIndInfo * doaInd
12380 S16 cmPkTfuDoaInd(pst, suId, doaInd)
12383 TfuDoaIndInfo * doaInd;
12386 Buffer *mBuf = NULLP;
12387 TRC3(cmPkTfuDoaInd)
12389 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
12390 #if (ERRCLASS & ERRCLS_ADD_RES)
12391 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12392 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12393 (ErrVal)ETFU125, (ErrVal)0, "Packing failed");
12395 SPutSBuf(pst->region, pst->pool, (Data *)doaInd, sizeof(TfuDoaIndInfo));
12398 cmPkTfuDoaIndInfo(doaInd, mBuf);
12399 if (SPkS16(suId, mBuf) != ROK) {
12400 #if (ERRCLASS & ERRCLS_ADD_RES)
12401 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12402 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12403 (ErrVal)ETFU126, (ErrVal)0, "Packing failed");
12405 TFU_FREE_MEM(doaInd);
12406 TFU_FREE_MSG(mBuf);
12409 TFU_FREE_MEM(doaInd);
12410 pst->event = (Event) EVTTFUDOAIND;
12411 return (SPstTsk(pst,mBuf));
12415 /***********************************************************
12417 * Func : cmUnpkTfuDoaInd
12420 * Desc : This API is used to indicate DOA(Direction Of Arrival)
12421 * identifier for one or more UEs.
12422 * It carries a DOA for each UE.
12423 * @param pst Pointer to the post structure.
12424 * @param suId SAP ID of the service user.
12425 * @param doaInd Pointer to the TfuDoaIndInfo structure.
12426 * @return ROK/RFAILED
12435 **********************************************************/
12437 S16 cmUnpkTfuDoaInd
12444 S16 cmUnpkTfuDoaInd(func, pst, mBuf)
12451 TfuDoaIndInfo *doaInd;
12453 TRC3(cmUnpkTfuDoaInd)
12455 if (SUnpkS16(&suId, mBuf) != ROK) {
12456 TFU_FREE_MSG(mBuf);
12457 #if (ERRCLASS & ERRCLS_ADD_RES)
12458 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12459 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12460 (ErrVal)ETFU127, (ErrVal)0, "Packing failed");
12466 sMem.region = pst->region;
12467 sMem.pool = pst->pool;
12468 if ((cmAllocEvnt(sizeof(TfuDoaIndInfo), TFU_BLKSZ, &sMem, (Ptr *)&doaInd)) != ROK) {
12469 #if (ERRCLASS & ERRCLS_ADD_RES)
12470 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
12471 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
12472 (ErrVal)ETFU128, (ErrVal)0, "Packing failed");
12474 TFU_FREE_MSG(mBuf);
12479 cmUnpkTfuDoaIndInfo(doaInd, (Ptr)&doaInd->memCp, mBuf);
12480 TFU_FREE_MSG(mBuf);
12481 return ((*func)(pst, suId, doaInd));
12486 /***********************************************************
12488 * Func : cmPkTfuDciFormatTbInfo
12491 * Desc : This structure contains the TB level DCI signalling
12492 * parameters in case of DCI formats 2 and 2A
12501 **********************************************************/
12503 S16 cmPkTfuDciFormatTbInfo
12505 TfuDciFormatTbInfo *param,
12509 S16 cmPkTfuDciFormatTbInfo(param, mBuf)
12510 TfuDciFormatTbInfo *param;
12515 TRC3(cmPkTfuDciFormatTbInfo)
12517 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
12518 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
12519 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
12525 /***********************************************************
12527 * Func : cmUnpkTfuDciFormatTbInfo
12530 * Desc : This structure contains the TB level DCI signalling
12531 * parameters in case of DCI formats 2 and 2A
12540 **********************************************************/
12542 S16 cmUnpkTfuDciFormatTbInfo
12544 TfuDciFormatTbInfo *param,
12548 S16 cmUnpkTfuDciFormatTbInfo(param, mBuf)
12549 TfuDciFormatTbInfo *param;
12554 TRC3(cmUnpkTfuDciFormatTbInfo)
12556 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
12557 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
12558 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
12564 /***********************************************************
12566 * Func : cmPkTfuSubbandDlCqiInfo
12569 * Desc : This structure is used to convey the subbannd CQI reported.
12578 **********************************************************/
12580 S16 cmPkTfuSubbandDlCqiInfo
12582 TfuSubbandDlCqiInfo *param,
12586 S16 cmPkTfuSubbandDlCqiInfo(param, mBuf)
12587 TfuSubbandDlCqiInfo *param;
12593 TRC3(cmPkTfuSubbandDlCqiInfo)
12595 for (i=TFU_MAX_TB-1; i >= 0; i--) {
12596 CMCHKPK(oduUnpackUInt8, param->cqiIdx[i], mBuf);
12598 CMCHKPK(cmPkTfuSubbandInfo, ¶m->subband, mBuf);
12604 /***********************************************************
12606 * Func : cmUnpkTfuSubbandDlCqiInfo
12609 * Desc : This structure is used to convey the subbannd CQI reported.
12618 **********************************************************/
12620 S16 cmUnpkTfuSubbandDlCqiInfo
12622 TfuSubbandDlCqiInfo *param,
12626 S16 cmUnpkTfuSubbandDlCqiInfo(param, mBuf)
12627 TfuSubbandDlCqiInfo *param;
12633 TRC3(cmUnpkTfuSubbandDlCqiInfo)
12635 CMCHKUNPK(cmUnpkTfuSubbandInfo, ¶m->subband, mBuf);
12636 for (i=0; i<TFU_MAX_TB; i++) {
12637 CMCHKUNPK(oduPackUInt8, ¶m->cqiIdx[i], mBuf);
12642 /***********************************************************
12644 * Func : cmPkTfuDlCqiPuschInfo
12647 * Desc : This structure conveys explicitly the PMI information in case
12648 * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6.
12657 **********************************************************/
12659 S16 cmPkTfuDlCqiPuschInfo
12661 TfuDlCqiPuschInfo *param,
12665 S16 cmPkTfuDlCqiPuschInfo(param, mBuf)
12666 TfuDlCqiPuschInfo *param;
12671 TRC3(cmPkTfuDlCqiPuschInfo)
12673 switch(param->mode) {
12674 case TFU_PUSCH_CQI_MODE_31:
12675 CMCHKPK(cmPkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
12677 case TFU_PUSCH_CQI_MODE_22:
12678 CMCHKPK(cmPkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
12680 case TFU_PUSCH_CQI_MODE_12:
12681 CMCHKPK(cmPkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
12686 CMCHKPK(oduUnpackUInt32, param->mode, mBuf);
12692 /***********************************************************
12694 * Func : cmUnpkTfuDlCqiPuschInfo
12697 * Desc : This structure conveys explicitly the PMI information in case
12698 * of PUSCH feedback usage in scheduling. Applicable for TM 4,5,6.
12707 **********************************************************/
12709 S16 cmUnpkTfuDlCqiPuschInfo
12711 TfuDlCqiPuschInfo *param,
12715 S16 cmUnpkTfuDlCqiPuschInfo(param, mBuf)
12716 TfuDlCqiPuschInfo *param;
12721 TRC3(cmUnpkTfuDlCqiPuschInfo)
12723 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->mode, mBuf);
12724 switch(param->mode) {
12725 case TFU_PUSCH_CQI_MODE_12:
12726 CMCHKUNPK(cmUnpkTfuCqiPuschMode12, ¶m->u.mode12Info, mBuf);
12728 case TFU_PUSCH_CQI_MODE_22:
12729 CMCHKUNPK(cmUnpkTfuCqiPuschMode22, ¶m->u.mode22Info, mBuf);
12731 case TFU_PUSCH_CQI_MODE_31:
12732 CMCHKUNPK(cmUnpkTfuCqiPuschMode31, ¶m->u.mode31Info, mBuf);
12740 /***********************************************************
12742 * Func : cmPkTfuDoaRpt
12745 * Desc : This structure contains the DOA estimated by the physical layer.
12746 * @details DOA for a given UE.
12755 **********************************************************/
12763 S16 cmPkTfuDoaRpt(param, mBuf)
12769 TRC3(cmPkTfuDoaRpt)
12771 CMCHKPK(oduUnpackUInt32, param->doa, mBuf);
12772 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
12778 /***********************************************************
12780 * Func : cmUnpkTfuDoaRpt
12783 * Desc : This structure contains the DOA estimated by the physical layer.
12784 * @details DOA for a given UE.
12793 **********************************************************/
12795 S16 cmUnpkTfuDoaRpt
12801 S16 cmUnpkTfuDoaRpt(param, mBuf)
12807 TRC3(cmUnpkTfuDoaRpt)
12809 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
12810 CMCHKUNPK(oduPackUInt32, ¶m->doa, mBuf);
12816 /***********************************************************
12818 * Func : cmPkTfuDoaIndInfo
12821 * Desc : This structure conveys the DOA(Direction Of Arrival) indicator.
12822 * @details DOA is calculated by the physical layer, and this
12823 * information is provided to the scheduler.
12824 * This data structure clubs together the DOAs for all the UEs
12825 * calculated by PHY in this subframe.
12834 **********************************************************/
12836 S16 cmPkTfuDoaIndInfo
12838 TfuDoaIndInfo *param,
12842 S16 cmPkTfuDoaIndInfo(param, mBuf)
12843 TfuDoaIndInfo *param;
12850 TfuDoaRpt *tfuDoaRpt;
12851 TRC3(cmPkTfuDoaIndInfo)
12853 count = param->doaRpt.count;
12854 node = param->doaRpt.last;
12856 tfuDoaRpt = (TfuDoaRpt *)node->node;
12858 CMCHKPK(cmPkTfuDoaRpt, tfuDoaRpt, mBuf);
12859 cmLListDelFrm(¶m->doaRpt, &tfuDoaRpt->lnk);
12860 tfuDoaRpt->lnk.node = (PTR)NULLP;
12862 CMCHKPK(oduUnpackUInt32, count, mBuf);
12863 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
12869 /***********************************************************
12871 * Func : cmUnpkTfuDoaIndInfo
12874 * Desc : This structure conveys the DOA(Direction Of Arrival) indicator.
12875 * @details DOA is calculated by the physical layer, and this
12876 * information is provided to the scheduler.
12877 * This data structure clubs together the DOAs for all the UEs
12878 * calculated by PHY in this subframe.
12887 **********************************************************/
12889 S16 cmUnpkTfuDoaIndInfo
12891 TfuDoaIndInfo *param,
12896 S16 cmUnpkTfuDoaIndInfo(param, memCp, mBuf)
12897 TfuDoaIndInfo *param;
12903 U32 count, loopCnt;
12904 TfuDoaRpt *tfuDoaRpt;
12905 TRC3(cmUnpkTfuDoaIndInfo)
12907 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
12908 cmLListInit(¶m->doaRpt);
12909 CMCHKUNPK(oduPackUInt32, &count, mBuf);
12910 for (loopCnt=0; loopCnt<count; loopCnt++) {
12911 cmGetMem((Ptr)memCp, sizeof(*tfuDoaRpt), (Ptr *)&tfuDoaRpt);
12912 CMCHKUNPK(cmUnpkTfuDoaRpt, tfuDoaRpt, mBuf);
12913 cmLListAdd2Tail(¶m->doaRpt, &tfuDoaRpt->lnk);
12914 tfuDoaRpt->lnk.node = (PTR)tfuDoaRpt;
12920 /* tfu_c_001.main_7. Added changes of TFU_UPGRADE */
12924 /***********************************************************
12926 * Func : cmPkTfuSrsRpt
12929 * Desc : This structure conveys the Uplink SRS indication of a UE.
12930 * @details Uplink SRS from each UE is received by the physical layer, and this
12931 * information is provided to the scheduler.
12940 **********************************************************/
12948 S16 cmPkTfuSrsRpt(param, mBuf)
12955 TRC3(cmPkTfuSrsRpt)
12957 CMCHKPK(oduUnpackUInt8, param->wideCqi, mBuf);
12958 CMCHKPK(oduUnpackUInt8, param->wideCqiPres, mBuf);
12959 for (i=TFU_MAX_UL_RB-1; i >= 0; i--) {
12960 CMCHKPK(oduUnpackUInt8, param->snr[i], mBuf);
12962 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
12963 CMCHKPK(oduUnpackUInt8, param->numRbs, mBuf);
12964 CMCHKPK(oduUnpackUInt16, param->ta, mBuf);
12965 CMCHKPK(oduUnpackUInt16, param->dopEst, mBuf);
12966 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
12972 /***********************************************************
12974 * Func : cmUnpkTfuSrsRpt
12977 * Desc : This structure conveys the Uplink SRS indication of a UE.
12978 * @details Uplink SRS from each UE is received by the physical layer, and this
12979 * information is provided to the scheduler.
12988 **********************************************************/
12990 S16 cmUnpkTfuSrsRpt
12996 S16 cmUnpkTfuSrsRpt(param, mBuf)
13003 TRC3(cmUnpkTfuSrsRpt)
13005 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
13006 CMCHKUNPK(oduPackUInt16, ¶m->dopEst, mBuf);
13007 CMCHKUNPK(oduPackUInt16, ¶m->ta, mBuf);
13008 CMCHKUNPK(oduPackUInt8, ¶m->numRbs, mBuf);
13009 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
13010 for (i=0; i<TFU_MAX_UL_RB; i++) {
13011 CMCHKUNPK(oduPackUInt8, ¶m->snr[i], mBuf);
13013 CMCHKUNPK(oduPackUInt8, ¶m->wideCqiPres, mBuf);
13014 CMCHKUNPK(oduPackUInt8, ¶m->wideCqi, mBuf);
13020 /***********************************************************
13022 * Func : cmPkTfuSrsIndInfo
13025 * Desc : This structure conveys the Uplink SRS indication.
13026 * @details Uplink SRS is received by the physical layer, and this
13027 * information is provided to the scheduler.
13028 * This data structure clubs together the UL SRS indications of all the UEs
13038 **********************************************************/
13040 S16 cmPkTfuSrsIndInfo
13042 TfuSrsIndInfo *param,
13046 S16 cmPkTfuSrsIndInfo(param, mBuf)
13047 TfuSrsIndInfo *param;
13054 TfuSrsRpt *tfuSrsRpt;
13056 TRC3(cmPkTfuSrsIndInfo)
13058 count = param->srsRpt.count;
13059 node = param->srsRpt.last;
13061 tfuSrsRpt = (TfuSrsRpt *)node->node;
13063 CMCHKPK(cmPkTfuSrsRpt, tfuSrsRpt, mBuf);
13064 cmLListDelFrm(¶m->srsRpt, &tfuSrsRpt->lnk);
13065 tfuSrsRpt->lnk.node = (PTR)NULLP;
13067 CMCHKPK(oduUnpackUInt32, count, mBuf);
13068 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
13069 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13075 /***********************************************************
13077 * Func : cmUnpkTfuSrsIndInfo
13080 * Desc : This structure conveys the Uplink SRS indication.
13081 * @details Uplink SRS is received by the physical layer, and this
13082 * information is provided to the scheduler.
13083 * This data structure clubs together the UL SRS indications of all the UEs
13093 **********************************************************/
13095 S16 cmUnpkTfuSrsIndInfo
13097 TfuSrsIndInfo *param,
13102 S16 cmUnpkTfuSrsIndInfo(param, memCp, mBuf)
13103 TfuSrsIndInfo *param;
13109 U32 count, loopCnt;
13110 TfuSrsRpt *tfuSrsRpt;
13112 TRC3(cmUnpkTfuSrsIndInfo)
13114 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13115 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
13116 cmLListInit(¶m->srsRpt);
13117 CMCHKUNPK(oduPackUInt32, &count, mBuf);
13118 for (loopCnt=0; loopCnt<count; loopCnt++) {
13119 cmGetMem((Ptr)memCp, sizeof(*tfuSrsRpt), (Ptr *)&tfuSrsRpt);
13120 CMCHKUNPK(cmUnpkTfuSrsRpt, tfuSrsRpt, mBuf);
13121 cmLListAdd2Tail(¶m->srsRpt, &tfuSrsRpt->lnk);
13122 tfuSrsRpt->lnk.node = (PTR)tfuSrsRpt;
13129 /***********************************************************
13131 * Func : cmPkTfuRawCqiRpt
13134 * Desc : This structure contains the Raw CQI information i.e. the CQI report
13135 * as transmitted by the UE.
13136 * @details These bits shall be interpretted by MAC to derive the following
13149 **********************************************************/
13151 S16 cmPkTfuRawCqiRpt
13153 TfuRawCqiRpt *param,
13157 S16 cmPkTfuRawCqiRpt(param, mBuf)
13158 TfuRawCqiRpt *param;
13163 TRC3(cmPkTfuRawCqiRpt)
13165 CMCHKPK(oduUnpackUInt32, param->uciPayload, mBuf);
13168 for (i=CM_LTE_MAX_CELLS-1; i >= 0; i--) {
13169 CMCHKPK(oduUnpackUInt8, param->ri[i], mBuf);
13171 for (i=TFU_MAX_CQI_BYTES-1; i >= 0; i--) {
13172 CMCHKPK(oduUnpackUInt8, param->cqiBits[i], mBuf);
13175 CMCHKPK(oduUnpackUInt8, param->numBits, mBuf);
13176 CMCHKPK(cmPkLteRnti, param->crnti, mBuf);
13182 /***********************************************************
13184 * Func : cmUnpkTfuRawCqiRpt
13187 * Desc : This structure contains the Raw CQI information i.e. the CQI report
13188 * as transmitted by the UE.
13189 * @details These bits shall be interpretted by MAC to derive the following
13202 **********************************************************/
13204 S16 cmUnpkTfuRawCqiRpt
13206 TfuRawCqiRpt *param,
13210 S16 cmUnpkTfuRawCqiRpt(param, mBuf)
13211 TfuRawCqiRpt *param;
13216 TRC3(cmUnpkTfuRawCqiRpt)
13218 CMCHKUNPK(cmUnpkLteRnti, ¶m->crnti, mBuf);
13219 CMCHKUNPK(oduPackUInt8, ¶m->numBits, mBuf);
13222 for (i=0; i<TFU_MAX_CQI_BYTES; i++) {
13223 CMCHKUNPK(oduPackUInt8, ¶m->cqiBits[i], mBuf);
13225 for (i=0; i<CM_LTE_MAX_CELLS; i++) {
13226 CMCHKUNPK(oduPackUInt8, ¶m->ri[i], mBuf);
13229 CMCHKUNPK(oduPackUInt32, ¶m->uciPayload, mBuf);
13236 /***********************************************************
13238 * Func : cmPkTfuRawCqiIndInfo
13241 * Desc : This structure contains the Raw CQI reports received for the
13242 * transmitting UEs in a single subframe.
13243 * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
13244 * interpretation is upto the MAC layer.
13253 **********************************************************/
13255 S16 cmPkTfuRawCqiIndInfo
13257 TfuRawCqiIndInfo *param,
13261 S16 cmPkTfuRawCqiIndInfo(param, mBuf)
13262 TfuRawCqiIndInfo *param;
13268 TfuRawCqiRpt *tfuRawCqiRpt;
13271 TRC3(cmPkTfuRawCqiIndInfo)
13273 count = param->rawCqiRpt.count;
13274 node = param->rawCqiRpt.last;
13276 tfuRawCqiRpt = (TfuRawCqiRpt *)node->node;
13278 CMCHKPK(cmPkTfuRawCqiRpt, tfuRawCqiRpt, mBuf);
13279 cmLListDelFrm(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk);
13280 tfuRawCqiRpt->lnk.node = (PTR)NULLP;
13282 CMCHKPK(oduUnpackUInt32, count, mBuf);
13283 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
13284 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
13290 /***********************************************************
13292 * Func : cmUnpkTfuRawCqiIndInfo
13295 * Desc : This structure contains the Raw CQI reports received for the
13296 * transmitting UEs in a single subframe.
13297 * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
13298 * interpretation is upto the MAC layer.
13307 **********************************************************/
13309 S16 cmUnpkTfuRawCqiIndInfo
13311 TfuRawCqiIndInfo *param,
13316 S16 cmUnpkTfuRawCqiIndInfo(param, memCp, mBuf)
13317 TfuRawCqiIndInfo *param;
13323 U32 count, loopCnt;
13324 TfuRawCqiRpt *tfuRawCqiRpt;
13326 TRC3(cmUnpkTfuRawCqiIndInfo)
13328 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
13329 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
13330 cmLListInit(¶m->rawCqiRpt);
13331 CMCHKUNPK(oduPackUInt32, &count, mBuf);
13332 for (loopCnt=0; loopCnt<count; loopCnt++) {
13333 cmGetMem((Ptr)memCp, sizeof(*tfuRawCqiRpt), (Ptr *)&tfuRawCqiRpt);
13334 CMCHKUNPK(cmUnpkTfuRawCqiRpt, tfuRawCqiRpt, mBuf);
13335 cmLListAdd2Tail(¶m->rawCqiRpt, &tfuRawCqiRpt->lnk);
13336 tfuRawCqiRpt->lnk.node = (PTR)tfuRawCqiRpt;
13347 /***********************************************************
13349 * Func : cmPkTfuUePucchHqRecpInfo
13352 * Desc : This structure is sent from scheduler to PHY in order to request the
13353 * reception of harq information on PUCCH.
13362 **********************************************************/
13364 S16 cmPkTfuUePucchHqRecpInfo
13366 TfuUePucchHqRecpInfo *param,
13370 S16 cmPkTfuUePucchHqRecpInfo(param, mBuf)
13371 TfuUePucchHqRecpInfo *param;
13377 TRC3(cmPkTfuUePucchHqRecpInfo)
13379 CMCHKPK(oduUnpackUInt8, param->a, mBuf);
13380 for (i=TFU_MAX_HQ_RES-1; i >= 0; i--) {
13381 CMCHKPK(oduUnpackUInt16, param->hqRes[i], mBuf);
13383 CMCHKPK(oduUnpackUInt8, param->pucchResCnt, mBuf);
13384 CMCHKPK(oduUnpackUInt8, param->hqSz, mBuf);
13385 CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf);
13391 /***********************************************************
13393 * Func : cmUnpkTfuUePucchHqRecpInfo
13396 * Desc : This structure is sent from scheduler to PHY in order to request the
13397 * reception of harq information on PUCCH.
13406 **********************************************************/
13408 S16 cmUnpkTfuUePucchHqRecpInfo
13410 TfuUePucchHqRecpInfo *param,
13414 S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf)
13415 TfuUePucchHqRecpInfo *param;
13421 TRC3(cmUnpkTfuUePucchHqRecpInfo)
13423 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->hqFdbkMode, mBuf);
13424 CMCHKUNPK(oduPackUInt8, ¶m->hqSz, mBuf);
13425 CMCHKUNPK(oduPackUInt8, ¶m->pucchResCnt, mBuf);
13426 for (i=0; i<TFU_MAX_HQ_RES; i++) {
13427 CMCHKUNPK(oduPackUInt16, ¶m->hqRes[i], mBuf);
13429 CMCHKUNPK(oduPackUInt8, ¶m->a, mBuf);
13438 #ifndef TFU_TDD /* else of TFU_TDD */
13440 #ifndef TFU_TDD /* else of TFU_TDD */
13443 /***********************************************************
13445 * Func : cmPkTfuUePucchHqRecpInfo
13448 * Desc : This structure is sent from scheduler to PHY in order to request the
13449 * reception of harq information on PUCCH.
13458 **********************************************************/
13460 S16 cmPkTfuUePucchHqRecpInfo
13462 TfuUePucchHqRecpInfo *param,
13466 S16 cmPkTfuUePucchHqRecpInfo(param, mBuf)
13467 TfuUePucchHqRecpInfo *param;
13472 TRC3(cmPkTfuUePucchHqRecpInfo)
13475 for (idx=(TFU_MAX_HQ_RES-1); idx >= 0; idx--) {
13476 CMCHKPK(oduUnpackUInt16, param->hqRes[idx], mBuf);
13479 CMCHKPK(oduUnpackUInt16, param->hqRes[0], mBuf);
13481 CMCHKPK(oduUnpackUInt8, param->pucchResCnt, mBuf);
13482 CMCHKPK(oduUnpackUInt8, param->hqSz, mBuf);
13483 CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf);
13490 /***********************************************************
13492 * Func : cmUnpkTfuUePucchHqRecpInfo
13495 * Desc : This structure is sent from scheduler to PHY in order to request the
13496 * reception of harq information on PUCCH.
13505 **********************************************************/
13507 S16 cmUnpkTfuUePucchHqRecpInfo
13509 TfuUePucchHqRecpInfo *param,
13513 S16 cmUnpkTfuUePucchHqRecpInfo(param, mBuf)
13514 TfuUePucchHqRecpInfo *param;
13518 TRC3(cmUnpkTfuUePucchHqRecpInfo)
13520 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->hqFdbkMode, mBuf);
13521 CMCHKUNPK(oduPackUInt8, ¶m->hqSz, mBuf);
13522 CMCHKUNPK(oduPackUInt8, ¶m->pucchResCnt, mBuf);
13525 for (idx=0; idx<TFU_MAX_HQ_RES; idx++) {
13526 CMCHKUNPK(oduPackUInt16, ¶m->hqRes[idx], mBuf);
13529 CMCHKUNPK(oduPackUInt16, ¶m->hqRes[0], mBuf);
13541 /***********************************************************
13543 * Func : cmPkTfuUePucchSrRecpInfo
13546 * Desc : This structure is sent from scheduler to PHY in order to request the
13547 * reception of SR information on PUCCH.
13556 **********************************************************/
13558 S16 cmPkTfuUePucchSrRecpInfo
13560 TfuUePucchSrRecpInfo *param,
13564 S16 cmPkTfuUePucchSrRecpInfo(param, mBuf)
13565 TfuUePucchSrRecpInfo *param;
13570 TRC3(cmPkTfuUePucchSrRecpInfo)
13572 CMCHKPK(oduUnpackUInt16, param->n1PucchIdx, mBuf);
13578 /***********************************************************
13580 * Func : cmUnpkTfuUePucchSrRecpInfo
13583 * Desc : This structure is sent from scheduler to PHY in order to request the
13584 * reception of SR information on PUCCH.
13593 **********************************************************/
13595 S16 cmUnpkTfuUePucchSrRecpInfo
13597 TfuUePucchSrRecpInfo *param,
13601 S16 cmUnpkTfuUePucchSrRecpInfo(param, mBuf)
13602 TfuUePucchSrRecpInfo *param;
13607 TRC3(cmUnpkTfuUePucchSrRecpInfo)
13609 CMCHKUNPK(oduPackUInt16, ¶m->n1PucchIdx, mBuf);
13615 /***********************************************************
13617 * Func : cmPkTfuUePucchCqiRecpInfo
13620 * Desc : This structure is sent from scheduler to PHY in order to request the
13621 * reception of CQI information on PUCCH.
13630 **********************************************************/
13632 S16 cmPkTfuUePucchCqiRecpInfo
13634 TfuUePucchCqiRecpInfo *param,
13638 S16 cmPkTfuUePucchCqiRecpInfo(param, mBuf)
13639 TfuUePucchCqiRecpInfo *param;
13644 TRC3(cmPkTfuUePucchCqiRecpInfo)
13646 CMCHKPK(oduUnpackUInt8, param->cqiPmiSz, mBuf);
13647 CMCHKPK(oduUnpackUInt16, param->n2PucchIdx, mBuf);
13653 /***********************************************************
13655 * Func : cmUnpkTfuUePucchCqiRecpInfo
13658 * Desc : This structure is sent from scheduler to PHY in order to request the
13659 * reception of CQI information on PUCCH.
13668 **********************************************************/
13670 S16 cmUnpkTfuUePucchCqiRecpInfo
13672 TfuUePucchCqiRecpInfo *param,
13676 S16 cmUnpkTfuUePucchCqiRecpInfo(param, mBuf)
13677 TfuUePucchCqiRecpInfo *param;
13682 TRC3(cmUnpkTfuUePucchCqiRecpInfo)
13684 CMCHKUNPK(oduPackUInt16, ¶m->n2PucchIdx, mBuf);
13685 CMCHKUNPK(oduPackUInt8, ¶m->cqiPmiSz, mBuf);
13691 /***********************************************************
13693 * Func : cmPkTfuUePucchSrsRecpInfo
13696 * Desc : This structure is sent from scheduler to PHY in order to request the
13697 * reception of SRS information on PUCCH.
13706 **********************************************************/
13708 S16 cmPkTfuUePucchSrsRecpInfo
13710 TfuUePucchSrsRecpInfo *param,
13714 S16 cmPkTfuUePucchSrsRecpInfo(param, mBuf)
13715 TfuUePucchSrsRecpInfo *param;
13720 TRC3(cmPkTfuUePucchSrsRecpInfo)
13722 CMCHKPK(oduUnpackUInt32, param->srsCyclicShft, mBuf);
13723 CMCHKPK(oduUnpackUInt16, param->srsCfgIdx, mBuf);
13724 CMCHKPK(oduUnpackUInt8, param->transComb, mBuf);
13725 CMCHKPK(oduUnpackUInt32, param->srsHopBw, mBuf);
13726 CMCHKPK(oduUnpackUInt8, param->nRrc, mBuf);
13727 CMCHKPK(oduUnpackUInt32, param->srsBw, mBuf);
13733 S16 cmPkTfuUePucchUciRecpInfo
13735 TfuUePucchUciRecpInfo *param,
13739 S16 cmPkTfuUePucchUciRecpInfo(param, mBuf)
13740 TfuUePucchUciRecpInfo *param;
13745 TRC3(cmPkTfuUePucchUciRecpInfo)
13747 CMCHKPK(oduUnpackUInt8, param->SCID, mBuf);
13748 CMCHKPK(oduUnpackUInt8, param->pucchIndex, mBuf);
13749 CMCHKPK(oduUnpackUInt8, param->numBits, mBuf);
13755 /***********************************************************
13757 * Func : cmUnpkTfuUePucchSrsRecpInfo
13760 * Desc : This structure is sent from scheduler to PHY in order to request the
13761 * reception of SRS information on PUCCH.
13770 **********************************************************/
13772 S16 cmUnpkTfuUePucchSrsRecpInfo
13774 TfuUePucchSrsRecpInfo *param,
13778 S16 cmUnpkTfuUePucchSrsRecpInfo(param, mBuf)
13779 TfuUePucchSrsRecpInfo *param;
13784 TRC3(cmUnpkTfuUePucchSrsRecpInfo)
13786 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->srsBw, mBuf);
13787 CMCHKUNPK(oduPackUInt8, ¶m->nRrc, mBuf);
13788 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->srsHopBw, mBuf);
13789 CMCHKUNPK(oduPackUInt8, ¶m->transComb, mBuf);
13790 CMCHKUNPK(oduPackUInt16, ¶m->srsCfgIdx, mBuf);
13791 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->srsCyclicShft, mBuf);
13796 /***********************************************************
13798 * Func : cmPkTfuUePucchBsiBriRecpInfo
13801 * Desc : This structure is sent from scheduler to PHY in order to request the
13802 * reception of BSI_BRI information on PUCCH.
13811 **********************************************************/
13813 S16 cmPkTfuUePucchBsiBriRecpInfo
13815 TfuUePucchBsiBriRecpInfo *param,
13819 S16 cmPkTfuUePucchBsiBriRecpInfo(param, mBuf)
13820 TfuUePucchBsiBriRecpInfo *param;
13825 TRC3(cmPkTfuUePucchBsiBriRecpInfo)
13827 CMCHKPK(oduUnpackUInt8, param->briRpt, mBuf);
13828 CMCHKPK(oduUnpackUInt8, param->bsiRpt, mBuf);
13829 CMCHKPK(oduUnpackUInt8, param->SCID, mBuf);
13830 CMCHKPK(oduUnpackUInt8, param->pucchIndex, mBuf);
13831 CMCHKPK(oduUnpackUInt8, param->puschFlag, mBuf);
13835 /***********************************************************
13837 * Func : cmUnpkTfuUePucchBsiBriRecpInfo
13840 * Desc : This structure is sent from scheduler to PHY in order to request the
13841 * reception of BSI_BRI information on PUCCH.
13850 **********************************************************/
13852 S16 cmUnpkTfuUePucchBsiBriRecpInfo
13854 TfuUePucchBsiBriRecpInfo *param,
13858 S16 cmUnpkTfuUePucchBsiBriRecpInfo(param, mBuf)
13859 TfuUePucchBsiBriRecpInfo *param;
13864 TRC3(cmUnpkTfuUePucchBsiBriRecpInfo)
13866 CMCHKUNPK(oduPackUInt8, ¶m->puschFlag, mBuf);
13867 CMCHKUNPK(oduPackUInt8, ¶m->pucchIndex, mBuf);
13868 CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf);
13869 CMCHKUNPK(oduPackUInt8, ¶m->bsiRpt, mBuf);
13870 CMCHKUNPK(oduPackUInt8, ¶m->briRpt, mBuf);
13877 S16 cmUnpkTfuUePucchUciRecpInfo
13879 TfuUePucchUciRecpInfo *param,
13883 S16 cmUnpkTfuUePucchUciRecpInfo(param, mBuf)
13884 TfuUePucchUciRecpInfo *param;
13889 TRC3(cmUnpkTfuUePucchUciRecpInfo)
13891 CMCHKUNPK(oduPackUInt8, ¶m->numBits, mBuf);
13892 CMCHKUNPK(oduPackUInt8, ¶m->pucchIndex, mBuf);
13893 CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf);
13900 /***********************************************************
13902 * Func : cmPkTfuUePucchRecpReq
13905 * Desc : This structure is sent from scheduler to PHY in order to request the
13906 * reception of UCI on PUCCH. This may contain the following:
13926 **********************************************************/
13928 S16 cmPkTfuUePucchRecpReq
13930 TfuUePucchRecpReq *param,
13934 S16 cmPkTfuUePucchRecpReq(param, mBuf)
13935 TfuUePucchRecpReq *param;
13940 TRC3(cmPkTfuUePucchRecpReq)
13943 CMCHKPK(cmPkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf);
13944 CMCHKPK(cmPkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf);
13945 #endif /* TFU_5GTF */
13946 CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
13947 CMCHKPK(cmPkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf);
13948 CMCHKPK(cmPkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf);
13949 CMCHKPK(cmPkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf);
13950 CMCHKPK(oduUnpackUInt32, param->uciInfo, mBuf);
13956 /***********************************************************
13958 * Func : cmUnpkTfuUePucchRecpReq
13961 * Desc : This structure is sent from scheduler to PHY in order to request the
13962 * reception of UCI on PUCCH. This may contain the following:
13982 **********************************************************/
13984 S16 cmUnpkTfuUePucchRecpReq
13986 TfuUePucchRecpReq *param,
13990 S16 cmUnpkTfuUePucchRecpReq(param, mBuf)
13991 TfuUePucchRecpReq *param;
13996 TRC3(cmUnpkTfuUePucchRecpReq)
13998 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->uciInfo, mBuf);
13999 CMCHKUNPK(cmUnpkTfuUePucchCqiRecpInfo, ¶m->cqiInfo, mBuf);
14000 CMCHKUNPK(cmUnpkTfuUePucchSrRecpInfo, ¶m->srInfo, mBuf);
14001 CMCHKUNPK(cmUnpkTfuUePucchHqRecpInfo, ¶m->hqInfo, mBuf);
14002 CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14004 CMCHKUNPK(cmUnpkTfuUePucchUciRecpInfo, ¶m->uciPduInfo, mBuf);
14005 CMCHKUNPK(cmUnpkTfuUePucchBsiBriRecpInfo, ¶m->bsiBriInfo, mBuf);
14006 #endif /* TFU_5GTF */
14012 /***********************************************************
14014 * Func : cmPkTfuUeUlSchRecpInfo
14017 * Desc : This structure is sent from scheduler to PHY in order to request the
14018 * reception of UEs data on ULSCH.
14027 **********************************************************/
14029 S16 cmPkTfuUeUlSchRecpInfo
14031 TfuUeUlSchRecpInfo *param,
14035 S16 cmPkTfuUeUlSchRecpInfo(param, mBuf)
14036 TfuUeUlSchRecpInfo *param;
14041 TRC3(cmPkTfuUeUlSchRecpInfo)
14043 CMCHKPK(oduUnpackUInt8, param->beamIndex, mBuf);
14044 CMCHKPK(oduUnpackUInt8, param->uciWoTBFlag, mBuf);
14045 CMCHKPK(oduUnpackUInt8, param->PMI, mBuf);
14046 CMCHKPK(oduUnpackUInt8, param->SCID, mBuf);
14047 CMCHKPK(oduUnpackUInt8, param->nAntPortLayer, mBuf);
14048 CMCHKPK(oduUnpackUInt8, param->xPUSCHRange, mBuf);
14049 CMCHKPK(oduUnpackUInt8, param->numRbg, mBuf);
14050 CMCHKPK(oduUnpackUInt8, param->rbgStart, mBuf);
14052 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
14053 CMCHKPK(oduUnpackUInt8, param->nSrs, mBuf);
14054 CMCHKPK(oduUnpackUInt8, param->crntTxNb, mBuf);
14055 CMCHKPK(oduUnpackUInt8, param->txMode, mBuf);
14056 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
14057 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
14058 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
14059 CMCHKPK(oduUnpackUInt8, param->isRtx, mBuf);
14060 CMCHKPK(oduUnpackUInt8, param->hoppingBits, mBuf);
14061 CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf);
14062 CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf);
14063 CMCHKPK(oduUnpackUInt32, param->modType, mBuf);
14064 CMCHKPK(oduUnpackUInt8, param->numRb, mBuf);
14065 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
14066 CMCHKPK(oduUnpackUInt16, param->size, mBuf);
14073 /***********************************************************
14075 * Func : cmUnpkTfuUeUlSchRecpInfo
14078 * Desc : This structure is sent from scheduler to PHY in order to request the
14079 * reception of UEs data on ULSCH.
14088 **********************************************************/
14090 S16 cmUnpkTfuUeUlSchRecpInfo
14092 TfuUeUlSchRecpInfo *param,
14096 S16 cmUnpkTfuUeUlSchRecpInfo(param, mBuf)
14097 TfuUeUlSchRecpInfo *param;
14102 TRC3(cmUnpkTfuUeUlSchRecpInfo)
14104 CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf);
14105 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
14106 CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf);
14107 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->modType, mBuf);
14108 CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf);
14109 CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf);
14110 CMCHKUNPK(oduPackUInt8, ¶m->hoppingBits, mBuf);
14111 CMCHKUNPK(oduPackUInt8, ¶m->isRtx, mBuf);
14112 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
14113 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
14114 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
14115 CMCHKUNPK(oduPackUInt8, ¶m->txMode, mBuf);
14116 CMCHKUNPK(oduPackUInt8, ¶m->crntTxNb, mBuf);
14117 CMCHKUNPK(oduPackUInt8, ¶m->nSrs, mBuf);
14118 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
14120 CMCHKUNPK(oduPackUInt8, ¶m->rbgStart, mBuf);
14121 CMCHKUNPK(oduPackUInt8, ¶m->numRbg, mBuf);
14122 CMCHKUNPK(oduPackUInt8, ¶m->xPUSCHRange, mBuf);
14123 CMCHKUNPK(oduPackUInt8, ¶m->nAntPortLayer, mBuf);
14124 CMCHKUNPK(oduPackUInt8, ¶m->SCID, mBuf);
14125 CMCHKUNPK(oduPackUInt8, ¶m->PMI, mBuf);
14126 CMCHKUNPK(oduPackUInt8, ¶m->uciWoTBFlag, mBuf);
14127 CMCHKUNPK(oduPackUInt8, ¶m->beamIndex, mBuf);
14134 /***********************************************************
14136 * Func : cmPkTfuUePuschCqiRecpInfo
14139 * Desc : This structure is sent from scheduler to PHY in order to request the
14140 * reception of CQI_RI info on PUSCH.
14149 **********************************************************/
14151 S16 cmPkTfuUePuschCqiRecpInfo
14153 TfuUePuschCqiRecpInfo *param,
14157 S16 cmPkTfuUePuschCqiRecpInfo(param, mBuf)
14158 TfuUePuschCqiRecpInfo *param;
14164 TRC3(cmPkTfuUePuschCqiRecpInfo)
14166 CMCHKPK(oduUnpackUInt8, param->riBetaOff, mBuf);
14167 CMCHKPK(oduUnpackUInt8, param->cqiBetaOff, mBuf);
14168 for (idx = 0; idx < param->cCNum; idx++)
14170 CMCHKPK(cmPkTknU8, ¶m->riSz[idx], mBuf);
14171 CMCHKPK(oduUnpackUInt8, param->cqiPmiSzRn1[idx], mBuf);
14172 CMCHKPK(oduUnpackUInt8, param->cqiPmiSzR1[idx], mBuf);
14174 CMCHKPK(oduUnpackUInt8, param->cCNum, mBuf);
14175 CMCHKPK(oduUnpackUInt8, param->reportType, mBuf);
14181 /***********************************************************
14183 * Func : cmUnpkTfuUePuschCqiRecpInfo
14186 * Desc : This structure is sent from scheduler to PHY in order to request the
14187 * reception of CQI_RI info on PUSCH.
14196 **********************************************************/
14198 S16 cmUnpkTfuUePuschCqiRecpInfo
14200 TfuUePuschCqiRecpInfo *param,
14204 S16 cmUnpkTfuUePuschCqiRecpInfo(param, mBuf)
14205 TfuUePuschCqiRecpInfo *param;
14211 TRC3(cmUnpkTfuUePuschCqiRecpInfo)
14213 CMCHKUNPK(oduPackUInt8, ¶m->reportType, mBuf);
14214 CMCHKUNPK(oduPackUInt8, ¶m->cCNum, mBuf);
14215 for (idx = param->cCNum; idx > 0; idx--)
14217 CMCHKUNPK(oduPackUInt8, ¶m->cqiPmiSzR1[idx-1], mBuf);
14218 CMCHKUNPK(oduPackUInt8, ¶m->cqiPmiSzRn1[idx-1], mBuf);
14219 CMCHKUNPK(cmUnpkTknU8, ¶m->riSz[idx-1], mBuf);
14221 CMCHKUNPK(oduPackUInt8, ¶m->cqiBetaOff, mBuf);
14222 CMCHKUNPK(oduPackUInt8, ¶m->riBetaOff, mBuf);
14228 /***********************************************************
14230 * Func : cmPkTfuUePuschHqRecpInfo
14233 * Desc : This structure is sent from scheduler to PHY in order to request the
14234 * reception of Harq info on PUSCH.
14243 **********************************************************/
14245 S16 cmPkTfuUePuschHqRecpInfo
14247 TfuUePuschHqRecpInfo *param,
14251 S16 cmPkTfuUePuschHqRecpInfo(param, mBuf)
14252 TfuUePuschHqRecpInfo *param;
14257 TRC3(cmPkTfuUePuschHqRecpInfo)
14261 CMCHKPK(oduUnpackUInt8, param->ulDai, mBuf);
14262 CMCHKPK(oduUnpackUInt8, param->nBundled, mBuf);
14263 CMCHKPK(oduUnpackUInt32, param->hqFdbkMode, mBuf);
14265 CMCHKPK(oduUnpackUInt8, param->hqBetaOff, mBuf);
14266 CMCHKPK(oduUnpackUInt8, param->hqSz, mBuf);
14272 /***********************************************************
14274 * Func : cmUnpkTfuUePuschHqRecpInfo
14277 * Desc : This structure is sent from scheduler to PHY in order to request the
14278 * reception of Harq info on PUSCH.
14287 **********************************************************/
14289 S16 cmUnpkTfuUePuschHqRecpInfo
14291 TfuUePuschHqRecpInfo *param,
14295 S16 cmUnpkTfuUePuschHqRecpInfo(param, mBuf)
14296 TfuUePuschHqRecpInfo *param;
14301 TRC3(cmUnpkTfuUePuschHqRecpInfo)
14303 CMCHKUNPK(oduPackUInt8, ¶m->hqSz, mBuf);
14304 CMCHKUNPK(oduPackUInt8, ¶m->hqBetaOff, mBuf);
14307 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->hqFdbkMode, mBuf);
14308 CMCHKUNPK(oduPackUInt8, ¶m->nBundled, mBuf);
14309 CMCHKUNPK(oduPackUInt8, ¶m->ulDai, mBuf);
14316 /***********************************************************
14318 * Func : cmPkTfuUePuschRecpReq
14321 * Desc : This structure is sent from scheduler to PHY in order to request the
14322 * reception of UEs data on PUSCH. This may contain the following:
14326 * -# Data + HARQ + SRS
14328 * -# Data + CQI/RI + SRS
14329 * -# Data + CQI/RI + HARQ
14330 * -# Data + CQI/RI + HARQ + SRS
14339 **********************************************************/
14341 S16 cmPkTfuUePuschRecpReq
14343 TfuUePuschRecpReq *param,
14347 S16 cmPkTfuUePuschRecpReq(param, mBuf)
14348 TfuUePuschRecpReq *param;
14353 TRC3(cmPkTfuUePuschRecpReq)
14355 CMCHKPK(cmPkTknU8, ¶m->initialNumRbs, mBuf);
14356 CMCHKPK(cmPkTknU8, ¶m->initialNSrs, mBuf);
14357 CMCHKPK(cmPkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14358 CMCHKPK(cmPkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf);
14359 CMCHKPK(cmPkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf);
14360 CMCHKPK(cmPkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf);
14361 CMCHKPK(oduUnpackUInt32, param->rcpInfo, mBuf);
14367 /***********************************************************
14369 * Func : cmUnpkTfuUePuschRecpReq
14372 * Desc : This structure is sent from scheduler to PHY in order to request the
14373 * reception of UEs data on PUSCH. This may contain the following:
14377 * -# Data + HARQ + SRS
14379 * -# Data + CQI/RI + SRS
14380 * -# Data + CQI/RI + HARQ
14381 * -# Data + CQI/RI + HARQ + SRS
14390 **********************************************************/
14392 S16 cmUnpkTfuUePuschRecpReq
14394 TfuUePuschRecpReq *param,
14398 S16 cmUnpkTfuUePuschRecpReq(param, mBuf)
14399 TfuUePuschRecpReq *param;
14404 TRC3(cmUnpkTfuUePuschRecpReq)
14406 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->rcpInfo, mBuf);
14407 CMCHKUNPK(cmUnpkTfuUeUlSchRecpInfo, ¶m->ulSchInfo, mBuf);
14408 CMCHKUNPK(cmUnpkTfuUePuschCqiRecpInfo, ¶m->cqiRiInfo, mBuf);
14409 CMCHKUNPK(cmUnpkTfuUePuschHqRecpInfo, ¶m->hqInfo, mBuf);
14410 CMCHKUNPK(cmUnpkTfuUePucchSrsRecpInfo, ¶m->srsInfo, mBuf);
14411 CMCHKUNPK(cmUnpkTknU8, ¶m->initialNSrs, mBuf);
14412 CMCHKUNPK(cmUnpkTknU8, ¶m->initialNumRbs, mBuf);
14418 /***********************************************************
14420 * Func : cmPkTfuUeRecpReqInfo
14423 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14424 * data. This contains information needed by PHY to decode the data sent by the
14434 **********************************************************/
14436 S16 cmPkTfuUeRecpReqInfo
14438 TfuUeRecpReqInfo *param,
14442 S16 cmPkTfuUeRecpReqInfo(param, mBuf)
14443 TfuUeRecpReqInfo *param;
14448 TRC3(cmPkTfuUeRecpReqInfo)
14450 switch(param->type) {
14451 case TFU_RECP_REQ_PUSCH:
14452 CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14454 case TFU_RECP_REQ_PUCCH:
14455 CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14460 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
14462 CMCHKPK(oduUnpackUInt8, param->groupId, mBuf);
14463 #endif /* TFU_5GTF */
14464 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
14470 /***********************************************************
14472 * Func : cmUnpkTfuUeRecpReqInfo
14475 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14476 * data. This contains information needed by PHY to decode the data sent by the
14486 **********************************************************/
14488 S16 cmUnpkTfuUeRecpReqInfo
14490 TfuUeRecpReqInfo *param,
14494 S16 cmUnpkTfuUeRecpReqInfo(param, mBuf)
14495 TfuUeRecpReqInfo *param;
14500 TRC3(cmUnpkTfuUeRecpReqInfo)
14502 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
14504 CMCHKUNPK(oduPackUInt8, ¶m->groupId, mBuf);
14505 #endif /* TFU_5GTF */
14506 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
14507 switch(param->type) {
14508 case TFU_RECP_REQ_PUCCH:
14509 CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14511 case TFU_RECP_REQ_PUSCH:
14512 CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14519 #endif /* TFU_UPGRADE */
14520 #ifndef TFU_UPGRADE /* TFU_UPGRADE */
14521 /***********************************************************
14523 * Func : cmPkTfuUePucchRecpReq
14526 * Desc : This structure is sent from Scheduler to PHY in order to request the
14527 * reception of an UEs data on PUCCH. This may contain the following:
14529 * -# Scheduling Request (SR)
14530 * -# HARQ-ACK and SR
14532 * -# CQI and HARQ-ACK
14541 **********************************************************/
14543 S16 cmPkTfuUePucchRecpReq
14545 TfuUePucchRecpReq *param,
14549 S16 cmPkTfuUePucchRecpReq(param, mBuf)
14550 TfuUePucchRecpReq *param;
14558 TRC3(cmPkTfuUePucchRecpReq)
14562 for (i=TFU_MAX_M-1; i >= 0; i--) {
14563 CMCHKPK(oduUnpackUInt8, param->p[i], mBuf);
14565 for (i=TFU_MAX_M-1; i >= 0; i--) {
14566 CMCHKPK(oduUnpackUInt8, param->m[i], mBuf);
14568 CMCHKPK(oduUnpackUInt8, param->M, mBuf);
14569 CMCHKPK(oduUnpackUInt8, param->multCnt, mBuf);
14572 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
14573 switch(param->hqType) {
14574 case TFU_HQ_RECP_REQ_N1PUCCH:
14575 CMCHKPK(oduUnpackUInt16, param->t.n1Pucch, mBuf);
14579 case TFU_HQ_RECP_REQ_NORMAL:
14580 for (i=TFU_MAX_M-1; i >= 0; i--) {
14581 CMCHKPK(oduUnpackUInt16, param->t.nCce[i], mBuf);
14588 case TFU_HQ_RECP_REQ_NORMAL:
14589 CMCHKPK(oduUnpackUInt16, param->t.nCce, mBuf);
14596 CMCHKPK(oduUnpackUInt32, param->hqType, mBuf);
14602 /***********************************************************
14604 * Func : cmUnpkTfuUePucchRecpReq
14607 * Desc : This structure is sent from Scheduler to PHY in order to request the
14608 * reception of an UEs data on PUCCH. This may contain the following:
14610 * -# Scheduling Request (SR)
14611 * -# HARQ-ACK and SR
14613 * -# CQI and HARQ-ACK
14622 **********************************************************/
14624 S16 cmUnpkTfuUePucchRecpReq
14626 TfuUePucchRecpReq *param,
14630 S16 cmUnpkTfuUePucchRecpReq(param, mBuf)
14631 TfuUePucchRecpReq *param;
14639 TRC3(cmUnpkTfuUePucchRecpReq)
14641 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->hqType, mBuf);
14642 switch(param->hqType) {
14645 case TFU_HQ_RECP_REQ_NORMAL:
14646 CMCHKUNPK(oduPackUInt16, ¶m->t.nCce, mBuf);
14652 case TFU_HQ_RECP_REQ_NORMAL:
14653 for (i=0; i<TFU_MAX_M; i++) {
14654 CMCHKUNPK(oduPackUInt16, ¶m->t.nCce[i], mBuf);
14659 case TFU_HQ_RECP_REQ_N1PUCCH:
14660 CMCHKUNPK(oduPackUInt16, ¶m->t.n1Pucch, mBuf);
14665 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
14668 CMCHKUNPK(oduPackUInt8, ¶m->multCnt, mBuf);
14669 CMCHKUNPK(oduPackUInt8, ¶m->M, mBuf);
14670 for (i=0; i<TFU_MAX_M; i++) {
14671 CMCHKUNPK(oduPackUInt8, ¶m->m[i], mBuf);
14673 for (i=0; i<TFU_MAX_M; i++) {
14674 CMCHKUNPK(oduPackUInt8, ¶m->p[i], mBuf);
14683 /***********************************************************
14685 * Func : cmPkTfuUeMsg3RecpReq
14688 * Desc : This structure is sent from scheduler to PHY in order to request the
14689 * reception of UEs data sent as MSG3 for Random access.
14698 **********************************************************/
14700 S16 cmPkTfuUeMsg3RecpReq
14702 TfuUeMsg3RecpReq *param,
14706 S16 cmPkTfuUeMsg3RecpReq(param, mBuf)
14707 TfuUeMsg3RecpReq *param;
14712 TRC3(cmPkTfuUeMsg3RecpReq)
14714 CMCHKPK(oduUnpackUInt32, param->modType, mBuf);
14715 CMCHKPK(oduUnpackUInt16, param->size, mBuf);
14716 /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
14717 CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf);
14718 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
14719 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
14720 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
14721 CMCHKPK(oduUnpackUInt8, param->isRtx, mBuf);
14722 CMCHKPK(oduUnpackUInt8, param->ulDelay, mBuf);
14723 CMCHKPK(oduUnpackUInt8, param->expCqi, mBuf);
14724 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
14725 CMCHKPK(oduUnpackUInt8, param->numRb, mBuf);
14726 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
14727 CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf);
14733 /***********************************************************
14735 * Func : cmUnpkTfuUeMsg3RecpReq
14738 * Desc : This structure is sent from scheduler to PHY in order to request the
14739 * reception of UEs data sent as MSG3 for Random access.
14748 **********************************************************/
14750 S16 cmUnpkTfuUeMsg3RecpReq
14752 TfuUeMsg3RecpReq *param,
14756 S16 cmUnpkTfuUeMsg3RecpReq(param, mBuf)
14757 TfuUeMsg3RecpReq *param;
14762 TRC3(cmUnpkTfuUeMsg3RecpReq)
14764 CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf);
14765 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
14766 CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf);
14767 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
14768 CMCHKUNPK(oduPackUInt8, ¶m->expCqi, mBuf);
14769 CMCHKUNPK(oduPackUInt8, ¶m->ulDelay, mBuf);
14770 CMCHKUNPK(oduPackUInt8, ¶m->isRtx, mBuf);
14771 /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
14772 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
14773 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
14774 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
14775 CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf);
14776 CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf);
14777 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->modType, mBuf);
14783 /***********************************************************
14785 * Func : cmPkTfuUePuschRecpReq
14788 * Desc : This structure is sent from scheduler to PHY in order to request the
14789 * reception of UEs data on PUSCH. This may contain the following:
14791 * -# Data + CQI and RI
14792 * -# Data + CQI and HARQ
14801 **********************************************************/
14803 S16 cmPkTfuUePuschRecpReq
14805 TfuUePuschRecpReq *param,
14809 S16 cmPkTfuUePuschRecpReq(param, mBuf)
14810 TfuUePuschRecpReq *param;
14815 TRC3(cmPkTfuUePuschRecpReq)
14817 CMCHKPK(oduUnpackUInt32, param->modType, mBuf);
14818 CMCHKPK(oduUnpackUInt16, param->size, mBuf);
14819 CMCHKPK(oduUnpackUInt32, param->mode, mBuf);
14820 CMCHKPK(oduUnpackUInt8, param->expHarq, mBuf);
14821 CMCHKPK(oduUnpackUInt8, param->expCqi, mBuf);
14822 CMCHKPK(oduUnpackUInt8, param->nDmrs, mBuf);
14823 CMCHKPK(oduUnpackUInt8, param->rv, mBuf);
14824 CMCHKPK(oduUnpackUInt8, param->isRtx, mBuf);
14825 CMCHKPK(oduUnpackUInt8, param->ndi, mBuf);
14826 CMCHKPK(oduUnpackUInt8, param->harqProcId, mBuf);
14827 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
14828 CMCHKPK(oduUnpackUInt8, param->numRb, mBuf);
14829 CMCHKPK(oduUnpackUInt8, param->rbStart, mBuf);
14830 CMCHKPK(oduUnpackUInt8, param->hoppingBits, mBuf);
14831 CMCHKPK(oduUnpackUInt8, param->hoppingEnbld, mBuf);
14837 /***********************************************************
14839 * Func : cmUnpkTfuUePuschRecpReq
14842 * Desc : This structure is sent from scheduler to PHY in order to request the
14843 * reception of UEs data on PUSCH. This may contain the following:
14845 * -# Data + CQI and RI
14846 * -# Data + CQI and HARQ
14855 **********************************************************/
14857 S16 cmUnpkTfuUePuschRecpReq
14859 TfuUePuschRecpReq *param,
14863 S16 cmUnpkTfuUePuschRecpReq(param, mBuf)
14864 TfuUePuschRecpReq *param;
14869 TRC3(cmUnpkTfuUePuschRecpReq)
14871 CMCHKUNPK(oduPackUInt8, ¶m->hoppingEnbld, mBuf);
14872 CMCHKUNPK(oduPackUInt8, ¶m->hoppingBits, mBuf);
14873 CMCHKUNPK(oduPackUInt8, ¶m->rbStart, mBuf);
14874 CMCHKUNPK(oduPackUInt8, ¶m->numRb, mBuf);
14875 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
14876 CMCHKUNPK(oduPackUInt8, ¶m->harqProcId, mBuf);
14877 CMCHKUNPK(oduPackUInt8, ¶m->ndi, mBuf);
14878 CMCHKUNPK(oduPackUInt8, ¶m->isRtx, mBuf);
14879 CMCHKUNPK(oduPackUInt8, ¶m->rv, mBuf);
14880 CMCHKUNPK(oduPackUInt8, ¶m->nDmrs, mBuf);
14881 CMCHKUNPK(oduPackUInt8, ¶m->expCqi, mBuf);
14882 CMCHKUNPK(oduPackUInt8, ¶m->expHarq, mBuf);
14883 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->mode, mBuf);
14884 CMCHKUNPK(oduPackUInt16, ¶m->size, mBuf);
14885 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->modType, mBuf);
14891 /***********************************************************
14893 * Func : cmPkTfuUeRecpReqInfo
14896 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14897 * data. This contains information needed by PHY to decode the data sent by the
14907 **********************************************************/
14909 S16 cmPkTfuUeRecpReqInfo
14911 TfuUeRecpReqInfo *param,
14915 S16 cmPkTfuUeRecpReqInfo(param, mBuf)
14916 TfuUeRecpReqInfo *param;
14921 TRC3(cmPkTfuUeRecpReqInfo)
14923 switch(param->type) {
14924 case TFU_RECP_REQ_PUSCH:
14925 CMCHKPK(cmPkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14927 case TFU_RECP_REQ_MSG3:
14928 CMCHKPK(cmPkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf);
14930 case TFU_RECP_REQ_PUCCH:
14931 CMCHKPK(cmPkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14936 CMCHKPK(oduUnpackUInt32, param->type, mBuf);
14937 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
14943 /***********************************************************
14945 * Func : cmUnpkTfuUeRecpReqInfo
14948 * Desc : This structure is a Per UE reception request for either PUCCH or PUSCH
14949 * data. This contains information needed by PHY to decode the data sent by the
14959 **********************************************************/
14961 S16 cmUnpkTfuUeRecpReqInfo
14963 TfuUeRecpReqInfo *param,
14967 S16 cmUnpkTfuUeRecpReqInfo(param, mBuf)
14968 TfuUeRecpReqInfo *param;
14973 TRC3(cmUnpkTfuUeRecpReqInfo)
14975 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
14976 CMCHKUNPK(oduPackUInt32, (U32 *)¶m->type, mBuf);
14977 switch(param->type) {
14978 case TFU_RECP_REQ_PUCCH:
14979 CMCHKUNPK(cmUnpkTfuUePucchRecpReq, ¶m->t.pucchRecpReq, mBuf);
14981 case TFU_RECP_REQ_MSG3:
14982 CMCHKUNPK(cmUnpkTfuUeMsg3RecpReq, ¶m->t.msg3RecpReq, mBuf);
14984 case TFU_RECP_REQ_PUSCH:
14985 CMCHKUNPK(cmUnpkTfuUePuschRecpReq, ¶m->t.puschRecpReq, mBuf);
14994 #endif /* ifndef TFU_UPGRADE */
14995 /*LAA: Packing and Unpacking*/
14997 /***********************************************************
14999 * Func : cmPkTfuErrIndInfo
15002 * Desc : This structure contains information that is passed as a part of
15003 * the ERR indication sent from PHY to MAC.
15012 **********************************************************/
15014 PRIVATE S16 cmPkTfuErrIndInfo
15016 TfuErrIndInfo *param,
15020 PRIVATE S16 cmPkTfuErrIndInfo(param, mBuf)
15021 TfuErrIndInfo *param;
15026 TRC3(cmPkTfuErrIndInfo)
15028 CMCHKPK(cmPkLteTimingInfo, ¶m->timingInfo, mBuf);
15029 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
15032 /***********************************************************
15034 * Func : cmUnpkTfuErrIndInfo
15037 * Desc : This structure contains information that is passed as a part of the ERR
15038 * indication sent from PHY to MAC.
15047 **********************************************************/
15049 PRIVATE S16 cmUnpkTfuErrIndInfo
15051 TfuErrIndInfo *param,
15055 PRIVATE S16 cmUnpkTfuErrIndInfo(param, mBuf)
15056 TfuErrIndInfo *param;
15061 TRC3(cmUnpkTfuErrIndInfo)
15063 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
15064 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timingInfo, mBuf);
15068 /***********************************************************
15070 * Func : cmPkTfuErrInd
15073 * This API is invoked by PHY to send ERROR INDICATION to scheduler
15074 * Currently invoked in the cases when the Unlicensed SCell transmission
15076 * This API contains the Cell and subframe information for which the
15077 * transmission failed.
15079 * @param[in] Pst *pst
15080 * @param[in] SuId suId
15081 * @param[in] TfuErrIndInfo *errIndInfo
15093 **********************************************************/
15099 TfuErrIndInfo * errInd
15102 S16 cmPkTfuErrInd(pst, suId, errInd)
15105 TfuErrIndInfo * errInd;
15108 Buffer *mBuf = NULLP;
15109 TRC3(cmPkTfuErrInd)
15111 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
15112 #if (ERRCLASS & ERRCLS_ADD_RES)
15113 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15114 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15115 (ErrVal)ETFU105, (ErrVal)0, "Packing failed");
15117 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15120 if (pst->selector == ODU_SELECTOR_LC) {
15121 if (cmPkTfuErrIndInfo(errInd, mBuf) != ROK) {
15122 #if (ERRCLASS & ERRCLS_ADD_RES)
15123 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15124 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15125 (ErrVal)ETFU106, (ErrVal)0, "Packing failed");
15127 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15128 TFU_FREE_MSG(mBuf);
15132 else if(pst->selector == ODU_SELECTOR_LWLC)
15134 if (oduPackPointer((PTR)errInd, mBuf) != ROK)
15136 #if (ERRCLASS & ERRCLS_ADD_RES)
15137 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15138 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15139 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
15142 /*MS_FIX:71858:Changed to SPutSBuf as being allocated with SGetSBuf*/
15143 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15144 TFU_FREE_MSG(mBuf);
15149 if (SPkS16(suId, mBuf) != ROK) {
15150 #if (ERRCLASS & ERRCLS_ADD_RES)
15151 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15152 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15153 (ErrVal)ETFU107, (ErrVal)0, "Packing failed");
15155 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15156 TFU_FREE_MSG(mBuf);
15159 if (pst->selector != ODU_SELECTOR_LWLC) {
15160 if (SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo)) != ROK) {
15161 #if (ERRCLASS & ERRCLS_ADD_RES)
15162 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15163 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15164 (ErrVal)ETFU108, (ErrVal)0, "Packing failed");
15166 TFU_FREE_MSG(mBuf);
15171 pst->event = (Event) EVTTFUERRIND;
15172 return (SPstTsk(pst,mBuf));
15176 /***********************************************************
15178 * Func : cmUnpkTfuErrInd
15181 * This API is invoked by PHY to send ERROR INDICATION to scheduler
15182 * Currently invoked in the cases when the Unlicensed SCell transmission
15184 * This API contains the Cell and subframe information for which the
15185 * transmission failed.
15186 * @param pst Pointer to the post structure.
15187 * @param suId SAP ID of the service user.
15188 * @param errInd Pointer to the TfuErrIndInfo.
15189 * @return ROK/RFAILED
15198 **********************************************************/
15200 S16 cmUnpkTfuErrInd
15207 S16 cmUnpkTfuErrInd(func, pst, mBuf)
15214 TfuErrIndInfo *errInd;
15216 TRC3(cmUnpkTfuErrInd)
15218 if (SUnpkS16(&suId, mBuf) != ROK) {
15219 TFU_FREE_MSG(mBuf);
15220 #if (ERRCLASS & ERRCLS_ADD_RES)
15221 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15222 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15223 (ErrVal)ETFU109, (ErrVal)0, "Packing failed");
15227 if (pst->selector != ODU_SELECTOR_LWLC) {
15228 if ((SGetSBuf(pst->region, pst->pool, (Data **)&errInd, sizeof(TfuErrIndInfo))) != ROK) {
15229 #if (ERRCLASS & ERRCLS_ADD_RES)
15230 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15231 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15232 (ErrVal)ETFU110, (ErrVal)0, "Packing failed");
15234 TFU_FREE_MSG(mBuf);
15239 if (pst->selector == ODU_SELECTOR_LC)
15241 if (cmUnpkTfuErrIndInfo(errInd, mBuf) != ROK) {
15242 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15243 TFU_FREE_MSG(mBuf);
15244 #if (ERRCLASS & ERRCLS_ADD_RES)
15245 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15246 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15247 (ErrVal)ETFU111, (ErrVal)0, "Packing failed");
15252 else if(pst->selector == ODU_SELECTOR_LWLC)
15254 if (oduUnpackPointer((PTR *)&errInd, mBuf) != ROK)
15256 #if (ERRCLASS & ERRCLS_ADD_RES)
15257 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
15258 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
15259 (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
15261 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15262 TFU_FREE_MSG(mBuf);
15266 TFU_FREE_MSG(mBuf);
15267 /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
15268 (*func)(pst, suId, errInd);
15269 SPutSBuf(pst->region, pst->pool, (Data *)errInd, sizeof(TfuErrIndInfo));
15273 #endif /* if defined(LCTFU) */
15275 /**********************************************************************
15277 **********************************************************************/