CRC and Rx Data Indication
[o-du/l2.git] / src / cm / tfu.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /**********************************************************************
20      Name:    Lower layer interface - TFU
21
22      Type:    C header file
23
24      Desc:    Structures, variables and typedefs required by 
25               TFU interface
26
27      File:    tfu.x
28
29 *********************************************************************21*/
30
31 /**
32   @file tfu.x
33   @brief Structure declarations and definitions for TFU interface.
34   */
35
36 \f
37 #ifndef __TFUX__
38 #define __TFUX__
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 /***********************************************************************
44                           typedefs and data structures
45  ***********************************************************************/
46 /** @enum TfuDciFormat
47  * This Enum has values for the DCI format types.
48  */
49 typedef enum
50 {
51    TFU_DCI_FORMAT_0,       /*!< DCI format 0 */
52    TFU_DCI_FORMAT_1,       /*!< DCI format 1 */
53    TFU_DCI_FORMAT_1A,      /*!< DCI format 1A */
54    TFU_DCI_FORMAT_1B,      /*!< DCI format 1B */
55    TFU_DCI_FORMAT_1C,      /*!< DCI format 1C */
56    TFU_DCI_FORMAT_1D,      /*!< DCI format 1D */
57    TFU_DCI_FORMAT_2,       /*!< DCI format 2 */
58    TFU_DCI_FORMAT_2A,      /*!< DCI format 2A */
59    TFU_DCI_FORMAT_3,       /*!< DCI format 3 */
60    TFU_DCI_FORMAT_3A       /*!< DCI format 3A */
61 #ifdef TFU_5GTF
62    ,TFU_DCI_FORMAT_A1,      /*!< 5GTF: DCI format A1 */
63    TFU_DCI_FORMAT_A2,       /*!< 5GTF: DCI format A2 */
64    TFU_DCI_FORMAT_B1,       /*!< 5GTF: DCI format B1 */
65    TFU_DCI_FORMAT_B2        /*!< 5GTF: DCI format B2 */
66 #endif
67 #ifdef EMTC_ENABLE
68    ,TFU_DCI_FORMAT_6_0A,    /*!< DCI format 6-0 A */
69    TFU_DCI_FORMAT_6_0B,    /*!< DCI format 6-0 B */
70    TFU_DCI_FORMAT_6_1A,    /*!< DCI format 6-1 A */
71    TFU_DCI_FORMAT_6_1B,    /*!< DCI format 6-1 B */
72    TFU_DCI_FORMAT_6_2      /*!< DCI format 6-2 */
73 #endif   
74       /*tfu_x_001.main_6 - Added support for SPS*/
75 #ifdef LTEMAC_SPS
76    ,TFU_DCI_FORMAT_INVALID  /*!< Invalid DCI format value */
77 #endif
78 } TfuDciFormat;
79
80 /** @enum TfuModScheme
81  * This enum contains the values for the modulation schemes possible. 
82  */
83 typedef enum
84 {
85    TFU_MOD_BPSK  = 1,
86    TFU_MOD_QPSK  = 2,
87    TFU_MOD_16QAM = 4,
88    TFU_MOD_64QAM = 6
89 } TfuModScheme;
90
91
92 /** @enum TfuDlCqiPucchMode
93  * This enum contains values for the CQI reporting modes. 
94  */
95 typedef enum
96 {
97    TFU_PUCCH_CQI_MODE10,
98    TFU_PUCCH_CQI_MODE11,
99    TFU_PUCCH_CQI_MODE20,
100    TFU_PUCCH_CQI_MODE21
101 } TfuDlCqiPucchMode;
102
103 /** @enum TfuRptType
104  * This enum contains values for Type of UEs CQI reporting. 
105  */
106 typedef enum
107 {
108    TFU_RPT_CQI,
109    TFU_RPT_RI
110 } TfuRptType;
111
112
113 #ifdef PHY_ERROR_LOGING
114 typedef struct _rgSchUlAllocCntr RgSchUlAllocCntr;
115
116 struct _rgSchUlAllocCntr
117 {
118    U8  mcs;
119    U16 numOfRb;
120    U16 rbStart;
121    Bool testStart;
122    Bool enaLog;
123    U16  logTime;
124    U32  crcOk;
125    U32  crcErr;
126    U32  numUlPackets;
127    U32  numPrach;
128    U32  taZero;
129 };
130
131 EXTERN RgSchUlAllocCntr rgSchUlAllocCntr;
132
133 #endif
134 //Chandan
135 #ifdef DLHQ_STATS
136 typedef struct rgSchDlHqStats
137 {
138    U16   sfn;
139    U8    sf;
140    U8    ack;
141    U8    cellId;
142    U8    ulDai;
143    U8    dlDai;
144    U8    fdbkIdx;
145    U8    ue;
146    U8    ack0;
147    U8    ack1;
148    U8    ack2;
149    U8    ack3;
150    U8    ack4;
151    U8    ack5;
152    U8    ack6;
153    U8    ack7;
154 }RgSchDlHqStats;
155 typedef struct ysMsDlHqStats
156 {
157    U16   sfn;
158    U8    sf;
159    U8    mode; /*1 = PUCCH 2= PUSCH*/
160    U8    M;
161    U8    o0; /*For PUCCH n1PUCCH*/
162    U8    o1; /*For PUCCH Invalid*/
163    U8    o2;
164    U8    o3;
165    U8    ack0;
166    U8    ack1;
167    U8    ack2;
168    U8    ack3;
169    U8    ack4;
170    U8    ack5;
171    U8    ack6;
172    U8    ack7;
173 }YsMsDlHqStats;
174 #define MAX_STATS_CNT
175 #endif
176
177 #ifdef TFU_5GTF
178 /* Considers case where RIV is <= 324 for DCI format A1 */
179 typedef struct tfuRbAssignA1Val324
180 {
181    U8         hqProcId;   /*!< HARQ process ID */
182    U8                mcs;                 /*!< 4 bits for MCS */
183    Bool           ndi;            /*!< 1 bit for new data indicator */
184 } TfuRbAssignA1Val324;
185
186 /* Considers case where RIV is <= 324 for DCI format B1 */
187 typedef struct tfuRbAssignB1Val324
188 {
189    U8         hqProcId;   /*!< HARQ process ID */
190    U8                mcs;                 /*!< 4 bits for MCS */
191    Bool           ndi;            /*!< 1 bit for new data indicator */
192    U8         RV;         /*!< 2 bits Redundancy version */
193    U8         bmiHqAckNack; /* BMI: Bit Mapping Index for Harq-Ack
194                                 Refer sec 8.5 of 213 spec */ 
195 } TfuRbAssignB1Val324;
196
197 /* Considers case where RIV is == 326 */
198 typedef struct tfuRbAssignVal326
199 {
200    U8          FreqBandIdx;  /* nRACH: Frequency band index Value:0 -> 7 */
201    Bool        OCCInd;       /* nOCC: OCC indicator Value:0 -> 1 */
202    U8          CyclicShiftInd; /* nNcs: Cyclic shift indicator Value:0 -> 3 */
203 } TfuRbAssignVal326;
204
205
206 /* DCI format A1: UL xPDCCH */
207 typedef struct tfuDciFormatA1Info
208 {
209    Bool        formatType;    /* Format Descriminator 00: A1, 01:A2 */
210    U8          xPUSCHRange;  /* 0 : the stopping of xPUSCH is the 12th symbol, 
211                                                     1 : the stopping of xPUSCH is the 13th symbol,
212                                                     2 : the stopping of xPUSCH is the final (14th) symbol */
213    U8          xPUSCH_TxTiming; /* Transmission timing of xPUSCH Value: 0->7 
214                                    l E {0,1,...,7}*/
215    U16         RBAssign;        /*!< same as phy i/f RBAssign: RIV as defined in V5G.213
216                                      Value <= 324: this field assigns morethan zero RB.
217                                      Value ==325: this format assigns zero RB.
218                                      Value ==326: this format assigns zero RB and used 
219                                      for Randon Access procedure initiated by xPDCCH order. */
220    U8          beamIndex;       /*!< transmit beam index: Value: 0->7 */
221    U8          symbIdx;         /*!< OFDM symbol index for the xPDCCH: Value: 0->1 */
222    U8          rv;              /*!< HARQ redundancy version,  Value: 0 -> 3 */
223
224    /* Based on RBAssign/RIV value*/
225    union
226    {
227       TfuRbAssignA1Val324 rbAssignA1Val324;
228       TfuRbAssignVal326   rbAssignVal326;
229    }u;
230
231    U8          CSI_BSI_BRI_Req; /* CSI / BSI / BRI request Value:0 -> 7 */
232    U8          CSIRS_BRRS_TxTiming; /* Transmission timing of CSI-RS / BRRS, Value:0 -> 3
233                                         m E {0,1,2,3} */
234 #ifdef FIVEGTF_PHY_API
235    U16         rbgStart;
236    U16         rbgSize;
237 #endif
238
239    /* ToDo: following 4 fields can be made as union with an indicator type*/
240    U8          CSIRS_BRRS_SymbIdx; /* Indication of OFDM symbol index for CSI-RS / BRRS allocations
241                                                          Value:0 -> 3 */
242    U8          CSI_BRRS_Indicator; /* If this DCI format allocates either of 
243                                       CSI-RS or BRRS transmission Value:0 -> 3 */
244    U8          CSIRS_BRRS_ProcInd; /* Process indicator : Value:0 -> 3 */
245    U8          numBSI_Reports;  /* Number of BSI reports Value:0 -> 3 */
246
247    Bool        uciOnxPUSCH;   /* "UCI on xPUSCH w/o xUL-SCH data" indicator. Value:0 -> 1 */
248    Bool        beamSwitch;    /* beam switch indication. Value:0 -> 1 */
249
250    U8          SRS_Config; /* Indication of SRS configurations Value:0 -> 3
251                               00 : {No SRS request}, 01 : {Config. #0},
252                               10 : {Config. #1}, 11 : {Config. #2} */
253    Bool        SRS_Symbol;  /* If SRS is requested, 0: SRS transmission on the 13th OFDM symbol
254                               and 1: SRS transmission on the 14th OFDM symbol */   
255
256    U8          REMapIdx_DMRS_PCRS_numLayers; /* RE Mapping index, Ki for DMRS/PCRS and number of layers
257                                                 Value: 0 -> 7 
258                                                 0: 1 Layer, k0 = 0, 1: 1 Layer, k0 = 1
259                                                 2: 1 Layer, k0 = 2, 3: 1 Layer, k0 = 3
260                                                 4: 2 Layers, k0 = 0 and k1 = 1
261                                                 5: 2 Layers, k0 = 2 and k1 = 3
262                                                 6,7: Reserved */
263    Bool        SCID;         /* nSCID is applied for both DMRS in subframe n and
264                                   CSI-RS in subframe n+m Value: 0 -> 1 */
265    U8          PMI;          /* Precoding matrix indicator Value:0 -> 7 */
266 #ifdef FIVEGTF_PHY_API
267    U8          AntPorts_numLayers;
268    U8          TransmissionScheme;
269 #endif
270    Bool       UL_PCRS;      /* UL dual PCRS     Value: 0 -> 1 */
271    U8          tpcCmd;       /*!< 2 bits for TPC command for xPUSCH, Values: 0->3  */                                                                                                     
272 } TfuDciFormatA1Info;
273
274 /* DCI format A2: UL xPDCCH */
275 typedef TfuDciFormatA1Info TfuDciFormatA2Info;
276
277 /* DCI format B1: DL xPDCCH */
278 typedef struct tfuDciFormatB1Info
279 {
280    Bool        formatType;    /* Format Descriminator 2: B1, 3:B2 */
281    U8          xPDSCHRange;  /* MSB (starting of xPDSCH including DMRS symbol) :
282                                 0 is the second symbol, 1 is the third symbol.
283                                 LSB (stopping of xPDSCH): 0 is the 12th symbol,
284                                 1 is the 14th symbol */
285    U16         RBAssign;        /*!< same as phy i/f RBAssign: RIV as defined in V5G.213
286                                      Value <= 324: this field assigns morethan zero RB.
287                                      Value ==325: this format assigns zero RB.
288                                      Value ==326: this format assigns zero RB and used 
289                                      for Randon Access procedure initiated by xPDCCH order. */
290    U8          beamIndex;       /*!< transmit beam index: Value: 0->7 */
291    U8          symbIdx;         /*!< OFDM symbol index for the xPDCCH: Value: 0->1 */
292    /* Based on RBAssign/RIV value*/
293    union
294    {
295       TfuRbAssignB1Val324 rbAssignB1Val324;
296       TfuRbAssignVal326   rbAssignVal326;
297    }u;
298
299    U8          CSI_BSI_BRI_Req; /* CSI / BSI / BRI request Value:0 -> 7 */
300    U8          CSIRS_BRRS_TxTiming; /* Transmission timing of CSI-RS / BRRS, Value:0 -> 3
301                                         m E {0,1,2,3} */
302    /* ToDo: following 4 fields can be made as union with an indicator type*/
303    U8          CSIRS_BRRS_SymbIdx; /* Indication of OFDM symbol index for CSI-RS / BRRS allocations
304                                                          Value:0 -> 3 */
305    U8          CSI_BRRS_Indicator; /* If this DCI format allocates either of 
306                                       CSI-RS or BRRS transmission Value:0 -> 3 */
307    U8          CSIRS_BRRS_ProcInd; /* Process indicator : Value:0 -> 3 */
308    U8          numBSI_Reports;  /* Number of BSI reports Value:0 -> 3 */
309
310    Bool        xPUCCH_TxTiming;   /*  field indicates transmission time offset value k.{0, 1, ., 7} */
311    U8          freqResIdx_xPUCCH; /* Frequency resource index of xPUCCH for UCI report */
312    Bool        beamSwitch;    /* beam switch indication. Value:0 -> 1 */
313
314    U8          SRS_Config; /* Indication of SRS configurations Value:0 -> 3
315                               00 : {No SRS request}, 01 : {Config. #0},
316                               10 : {Config. #1}, 11 : {Config. #2} */
317    Bool        SRS_Symbol;  /* If SRS is requested, 0: SRS transmission on the 13th OFDM symbol
318                               and 1: SRS transmission on the 14th OFDM symbol */   
319
320    U8          AntPorts_numLayers; 
321
322    Bool        SCID;         /* nSCID is applied for both DMRS in subframe n and
323                                   CSI-RS in subframe n+m Value: 0 -> 1 */
324    U8          tpcCmd;       /*!< 2 bits for TPC command for xPUCCH, Values: 0->3  */                                                                                                     
325    Bool       DL_PCRS;      /* DL PCRS  Value: 0 -> 3 
326                                 00 : {No PCRS }, 01 : {PCRS on AP 60},
327                                 10 : {PCRS on AP 61}, 11 : {PCRS on AP 60 and 61}*/
328
329 } TfuDciFormatB1Info;
330
331 /* DCI format B2: DL xPDCCH */
332 typedef TfuDciFormatB1Info TfuDciFormatB2Info;
333 #endif  /* TFU_5GTF */
334
335 /** @brief This structure contains the information needed to convey DCI format 0.
336  */
337 typedef struct tfuDciFormat0Info
338 {
339    Bool          isSrGrant;    /*!< This is to aid a counter which prints num successful SR Grants SR_RACH_STATS */
340    Bool        isMsg4PdcchWithCrnti; /* This is to aid rgNumMsg4PdcchWithCrnti counter which counts
341                                        num of PDCCH scrambled with CRNTI for CRNTI Based contention resolution */
342    Bool        hoppingEnbld;  /*!< TRUE, if hopping is enabled */
343    U8          rbStart;       /*!< Starting RB */
344    U8          numRb;         /*!< Number of RBs */
345 #ifdef TFU_UPGRADE
346    U32         riv;           /*!< RIV as defined in 213 
347                                section 7.1.6.3 - used only for
348                                SPS release */
349 #endif 
350    U8          hoppingBits;   /*!< Hopping bits as mentioned in 213 section 8.4 */
351    U8          mcs;           /*!< 5 bits for MCS and RV */
352    Bool        ndi;           /*!< 1 bit for new data indicator */
353    U8          tpcCmd;        /*!< 2 bits for TPC command */
354 /** @name TFU_TDD  */
355 /** @{ */
356 #ifdef TFU_TDD
357    U8          ulIdx;         /*!< UL index applicable only for TDD */
358    U8          dai;           /*!< The downlink assignement index */
359 #endif
360 /** @} */
361    U8          nDmrs;         /*!< 3 bits for DMRS cyclic shift */
362    U8          cqiReq;        /*!< 1 bit for CQI non-CA while value 00, 01, 10 and 11 for CA */
363    U8          numCqiBit;     /*!< Number of CsiReq Bit(s) Values : 1 or 2(CA)*/
364    U8          txAntenna;     /*!< Antenna selection - 213 section 8.7 */
365
366    /* tfu_x_001.main_4: Adding hqProcId */
367    U8          hqProcId;    /*!< HARQ process ID */
368 } TfuDciFormat0Info;
369
370 /** @enum TfuAllocType
371  * This enum contains the values for the allocation types.
372  */
373 typedef enum
374 {
375    TFU_ALLOC_TYPE_MAP= 1,
376    TFU_ALLOC_TYPE_RIV 
377 } TfuAllocType;
378
379 /** @brief This Structure contains either a resource allocation bit map OR a
380  * RIV Value as defined in 213 section 7.1.6.
381  */
382 typedef struct tfuAllocMapOrRiv
383 {
384    TfuAllocType      type;   /*!< Allocation type RIV or resAllocMap */
385    union
386    {
387
388       U32                 riv;   /*!< RIV as defined in 213 section 7.1.6.3. */
389       /*tfu_x_001.main_8 - ADD - TFU_RESMAP_CHANGE support */
390 #ifndef TFU_RESMAP_CHANGE
391       U8                  resAllocMap[TFU_MAX_ALLOC_BYTES]; /*!< Resource 
392                                       allocation bitmap. LSB aligns with the
393                                       LSB of the allocation bits.*/
394 #else /* TFU_RESMAP_CHANGE */
395       TfuAllocMap         allocMap;   /*!< Allocation Map. */
396 #endif
397    }u;
398 } TfuAllocMapOrRiv;
399
400 /** @enum TfuAllocSubType
401  * This enum contains the values for the allocation types.
402  */
403 typedef enum
404 {
405    TFU_ALLOC_TYPE_0= 1,
406    TFU_ALLOC_TYPE_1 
407 } TfuAllocSubType;
408
409
410 #ifdef LTEMAC_SPS
411 /** @brief This Structure contains either a resource allocation bitmap for
412  * for resource allocation type 0/1. 
413  * TODO: This structure can be made part of all DCI format having alloction
414  * type 0/1.
415  */
416 typedef struct tfuAllocMap
417 {
418    TfuAllocSubType           type;       /*!< Allocation type: 0/1 */
419   union
420   {
421      struct 
422      {
423         U32               allocMask;  /*!< Allocation Mask for RBGs */
424      } allocType0;
425      struct
426      {
427         U8                rbgSubset;  /*!< RBG Subset number: Value in set
428                                            {0,1,2,3} */
429         U8                shift;      /*!< Shift value for RBG mask: Value in 
430                                            set {0,1} */
431         U32               allocMask;  /*!< Allocation bitmask */
432      } allocType1;
433   } u; 
434 } TfuAllocMap;
435 #endif
436
437 /** @brief This structure contains only the allocation information, that is part
438  * of DCI format 1. 
439  * @details Allocation information also contains parameters necessary
440  * for Physical layer to process Downlink data. This structure accompanies the
441  * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
442  * @sa TfuDciFormat1Info
443  */
444 typedef struct tfuDciFormat1AllocInfo
445 {
446    Bool        isAllocType0;  /*!< TRUE, if allocation type is 0 */
447    U8          resAllocMap[TFU_MAX_ALLOC_BYTES];   /*!< Resource allocation bitmap.
448                                                 LSB aligns with the LSB of the
449                                                 allocation bits.*/
450    U8          harqProcId;    /*!< HARQ process ID */
451    Bool        ndi;           /*!< 1 bit for new data indicator */
452    U8          mcs;           /*!< 5 bits for MCS */
453    U8          rv;            /*!< Redundancy version */
454 } TfuDciFormat1AllocInfo;
455
456 /** @brief This structure contains the information needed to convey DCI format 1.
457  * @details Allocation information is separated from the other control
458  * information carried in this format. This separation is needed as Data must
459  * also carry some control information, essentially, allocation information
460  * along with it, in order to aid physical layer processing of the data. 
461  */
462 typedef struct tfuDciFormat1Info
463 {
464    TfuDciFormat1AllocInfo  allocInfo;     /*!< Allocation Information to map data on PDSCH */
465 /** @name TFU_TDD  */
466 /** @{ */
467 #ifdef TFU_TDD
468    U8                      dai;           /*!< The downlink assignement index */
469 #endif
470 /** @} */
471    U8                      tpcCmd;        /*!< 2 bits for TPC command */
472 } TfuDciFormat1Info;
473
474 /** @brief This structure contains the TB level DCI signalling
475   * parameters in case of DCI formats 2 and 2A */
476 typedef struct tfuDciFormatTbInfo
477 {
478    Bool                   ndi; /*!< New data indicator */
479    U8                     rv;  /*!< Redundancy version Indicator */
480    U8                     mcs; /*!< 5 bits for MCS */
481 }TfuDciFormatTbInfo;
482 /** @} */
483 /** @brief This structure contains only the allocation information, that is part
484   * of DCI format 2A. 
485   * @details Allocation information also contains parameters necessary
486   * for Physical layer to process Downlink data. This structure accompanies the
487   * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
488   * @sa TfuDciFormat2AInfo
489   */
490 typedef struct tfuDciFormat2AAllocInfo
491 {
492    Bool        isAllocType0;  /*!< TRUE, if allocation type is 0 */
493       /*tfu_x_001.main_8 - ADD - TFU_RESMAP_CHANGE support */
494 #ifndef TFU_RESMAP_CHANGE
495    U8          resAllocMap[TFU_MAX_ALLOC_BYTES];   /*!< Resource allocation bitmap.
496                                                 LSB aligns with the LSB of the
497                                                 allocation bits.*/
498 #else
499    TfuAllocMap allocMap;   /*!< Allocation Map */
500 #endif /* TFU_RESMAP_CHANGE */
501    U8          harqProcId;    /*!< HARQ process ID */
502    TfuDciFormatTbInfo tbInfo[2]; /*!< DCI Format 2/2A info per TB */
503    U8          precoding;     /*!< Precoding information bit */
504    Bool        transSwap;     /*!< Transport block to codeword swap flag */
505 } TfuDciFormat2AAllocInfo;
506
507
508 /** @brief This structure contains the information carried by DCI format 2A. 
509  * @details It carries the allocation information and other control information.
510  */
511 typedef struct tfuDciFormat2AInfo
512 {
513    TfuDciFormat2AAllocInfo  allocInfo;     /*!< Allocation Information to map data on PDSCH */
514 /** @name TFU_TDD  */
515 /** @{ */
516 #ifdef TFU_TDD
517    U8                       dai;           /*!< The downlink assignement index */
518 #endif
519 /** @} */
520    U8                       tpcCmd;        /*!< 2 bits for TPC command */
521 } TfuDciFormat2AInfo;
522
523 /** @brief This structure contains only the allocation information, that is part
524   * of DCI format 2. 
525   * @details Allocation information also contains parameters necessary
526   * for Physical layer to process Downlink data. This structure accompanies the
527   * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
528   * @sa TfuDciFormat2Info
529   */
530 typedef struct tfuDciFormat2AllocInfo
531 {
532    Bool                   isAllocType0;  /*!< TRUE, if allocation type is 0 */
533 #ifndef TFU_RESMAP_CHANGE
534    U8                     resAllocMap[TFU_MAX_ALLOC_BYTES]; /*!< Resource 
535                                               allocation bitmap. LSB aligns
536                                               with the LSB of the allocation
537                                               bits.*/
538 #else
539    TfuAllocMap             allocMap;   /*!< Allocation Map.*/
540 #endif
541 /** @} */
542 /** @name TFU_TDD  */
543 /** @{ */
544 #ifdef TFU_TDD
545    U8                     dai;           /*!< The downlink assignement index */
546 #endif
547 /** @} */
548    Bool                   transSwap;     /*!< Transport block to codeword swap
549                                               flag */
550    U8                     precoding;     /*!< Precoding information bit */
551    U8                     harqProcId;    /*!< HARQ process ID */
552    TfuDciFormatTbInfo     tbInfo[2];     /*!< DCI Format 2/2A info per TB */
553 } TfuDciFormat2AllocInfo;
554
555
556  /** @brief This structure contains the information carried by DCI format 2.
557  * @details Allocation information is separated from the other control
558  * information carried in this format. This separation is needed as Data must
559  * also carry some control information, essentially, allocation information
560  * along with it, in order to aid physical layer processing of the data. 
561   */
562 typedef struct tfuDciFormat2Info
563 {
564    TfuDciFormat2AllocInfo  allocInfo;     /*!< Allocation Information to map 
565                                                data on PDSCH */
566    U8                      tpcCmd;        /*!< 2 bits for TPC command */
567 /** @{ */
568 /** @name TFU_TDD  */
569 /** @{ */
570 #ifdef TFU_TDD
571    U8                      dai;            /*!< The downlink assignment index */
572 #endif
573 /** @} */
574 /** @} */
575 } TfuDciFormat2Info;
576
577  /** @brief This structure contains the information carried in DCI format 3.
578   */
579 typedef struct tfuDciFormat3Info
580 {
581    U8          tpcCmd[TFU_MAX_2BIT_TPC]; /*!< 2 bits for TPC command. 
582                                            LSB corresponds to the 1st bit of the 1st
583                                           byte.*/
584    U8          isPucch;                  /*!< 1 if the TPC meant for PUCCH, 0 if the TPC meant for PUSCH */                                          
585
586 } TfuDciFormat3Info;
587
588  /** @brief This structure contains the information carried by DCI format 3A.
589   */
590 typedef struct tfuDciFormat3AInfo
591 {
592    U8          tpcCmd[TFU_MAX_1BIT_TPC]; /*!< 1 bit for TPC command. 
593                                            LSB corresponds to the 1st bit of the
594                                           1st byte.*/
595    U8          isPucch;                  /*!< 1 if the TPC meant for PUCCH, 0 if the TPC meant for PUSCH */                                          
596 } TfuDciFormat3AInfo;
597
598
599
600  /** @brief This structure contains only the allocation information that is part
601   * of DCI format 1D. 
602   * @details Allocation information also contains parameters necessary
603   * for Physical layer to process Downlink data. This structure accompanies the
604   * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
605   * @sa TfuDciFormat1dInfo
606   */
607 typedef struct tfuDciFormat1dAllocInfo
608 {
609    Bool              isLocal;       /*!< TRUE, if localised VRB */
610    TknU8             nGap2;         /*!< 1 indicates Ngap=Ngap,1 and 2 indicates Ngap,2 */
611    TfuAllocMapOrRiv  alloc;         /*!< Allocation represented as a bit-map or RIV */   
612    U8                mcs;           /*!< 5 bits for MCS */
613    U8                rv;            /*!< Redundancy version */
614    U8                tPmi;          /*!< PMI */
615 } TfuDciFormat1dAllocInfo;
616
617  /** @brief This structure contains the information carried by DCI format 1D.
618  * @details Allocation information is separated from the other control
619  * information carried in this format. This separation is needed as Data must
620  * also carry some control information, essentially, allocation information
621  * along with it, in order to aid physical layer processing of the data. 
622   */
623 typedef struct tfuDciFormat1dInfo
624 {
625    TfuDciFormat1dAllocInfo allocInfo;     /*!< Allocation information */
626    U8                      harqProcId;    /*!< HARQ process ID */
627    Bool                    ndi;           /*!< 1 bit for new data indicator */
628    U8                      tpcCmd;        /*!< 2 bits for TPC command */
629 /** @name TFU_TDD  */
630 /** @{ */
631 #ifdef TFU_TDD
632    U8                      dai;           /*!< The downlink assignement index */
633 #endif
634 /** @} */
635    U8                      dlPwrOffset;   /*!< Downlink power offset */
636 } TfuDciFormat1dInfo;
637
638
639  /** @brief This structure contains only the allocation information, that is part
640   * of DCI format 1C. 
641   * @details Allocation information also contains parameters necessary
642   * for Physical layer to process Downlink data. This structure accompanies the
643   * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
644   * @sa TfuDciFormat1CInfo
645   */
646 typedef struct tfuDciFormat1cInfo
647 {
648    TknU8             nGap2;         /*!< 1 indicates Ngap=Ngap,1 and 2 indicates Ngap,2 */
649    TfuAllocMapOrRiv  alloc;         /*!< Allocation represented as a bit-map or RIV */   
650    U8                iTbs;          /*!< 5 bits for I-tbs */
651 } TfuDciFormat1cInfo;
652
653
654  /** @brief This structure contains only the allocation information, that is part
655   * of DCI format 1 B. 
656   * @details Allocation information also contains parameters necessary
657   * for Physical layer to process Downlink data. This structure accompanies the
658   * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
659   * @sa TfuDciFormat1BInfo
660   */
661 typedef struct tfuDciFormat1bAllocInfo
662 {
663    Bool              isLocal;       /*!< TRUE, if localised VRB */
664    TknU8             nGap2;         /*!< 1 indicates Ngap=Ngap,1 and 2 indicates Ngap,2 */
665    TfuAllocMapOrRiv  alloc;         /*!< Allocation represented as a bit-map or RIV */
666    U8                mcs;           /*!< 5 bits for MCS */
667    U8                rv;            /*!< Redundancy version */
668    U8                harqProcId;    /*!< HARQ process ID */
669    Bool              ndi;           /*!< 1 bit for new data indicator */
670    U8                tPmi;          /*!< PMI */
671    Bool              pmiCfm;        /*!< PMI confirmation bit */
672 } TfuDciFormat1bAllocInfo;
673
674
675  /** @brief This structure contains the information that is carried in DCI
676   * format 1A for a PDCCH order. 
677   */
678 typedef struct tfuPdcchOrderInfo
679 {
680    U8          preambleIdx;    /*!< Dedicated preamble index */
681    U8          prachMaskIdx;   /*!< PRACH Mask index used to determine the
682                                     subframe to be used for RACH */
683 } TfuPdcchOrderInfo;
684
685  /** @brief This structure contains only the allocation information that is part
686   * of DCI format 1A. 
687   * @details Allocation information also contains parameters necessary
688   * for Physical layer to process Downlink data. This structure accompanies the
689   * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
690   * @sa TfuDciFormat1AInfo
691   */
692 typedef struct tfuDciFormat1aAllocInfo
693 {
694    Bool              isLocal;       /*!< TRUE, if localised VRB */
695    TknU8             nGap2;         /*!< 1 indicates Ngap=Ngap,1 and 2 indicates Ngap,2 */
696    TfuAllocMapOrRiv  alloc;         /*!< Allocation carries RIV or a bitmap */
697    U8                mcs;           /*!< 5 bits for MCS */
698    U8                rv;            /*!< Redundancy version */
699    TknU8             harqProcId;    /*!< HARQ process ID. Reserved
700                                          if RA-RNTI, P-RNTI, SI-RNTI is used */
701    Bool              ndi;           /*!< 1 bit for new data indicator */
702 } TfuDciFormat1aAllocInfo;
703
704  /** @brief This structure contains the information carried in DCI format 1A
705   * when it is NOT used for a PDCCH order. 
706   */
707 typedef struct tfudciformat1aPdsch
708 {
709    TfuDciFormat1aAllocInfo allocInfo;     /*!< Allocation information. */
710 /** @name TFU_TDD  */
711 /** @{ */
712 #ifdef TFU_TDD
713    TknU8                   dai;   /*!< The downlink assignement index. Reserved
714                                    if RA-RNTI, P-RNTI, SI-RNTI is used. */
715 #endif
716 /** @} */
717    U8                      tpcCmd;        /*!< 2 bits for TPC command. */
718    Bool                 isTBMsg4; /*!< This field is added to help counting num of Msg4 Tx failures */
719 } Tfudciformat1aPdsch;
720 /*tfu_x_001.main_6 - Added for SPS support*/
721 /** @brief This structure contains the information needed to convey DCI format 1A.
722  * @details Format can possibly carry PDSCH allocation or information needed for
723  * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
724  * synchronization with eNodeB.
725  */
726 typedef struct tfuDciFormat1aInfo
727 {
728    /*tfu_x_001.main_6- Added for SPS support*/
729    Bool                 isPdcchOrder;
730    union
731    {
732       TfuPdcchOrderInfo       pdcchOrder;    /*!< PDDCH order information */
733       Tfudciformat1aPdsch     pdschInfo;     /*!< PDSCH allocation information */
734       /*tfu_x_001.main_6 - Added for SPS support*/
735    }t;
736 } TfuDciFormat1aInfo;
737
738 /** @brief This structure contains the information needed to convey DCI format 1A.
739  * @details Allocation information is separated from the other control
740  * information carried in this format. This separation is needed as Data must
741  * also carry some control information, essentially, allocation information
742  * along with it, in order to aid physical layer processing of the data. 
743  */
744 typedef struct tfuDciFormat1bInfo
745 {
746    TfuDciFormat1bAllocInfo allocInfo;     /*!< Allocation information */
747 /** @name TFU_TDD  */
748 /** @{ */
749 #ifdef TFU_TDD
750    U8          dai;                       /*!< The downlink assignement index */
751 #endif
752 /** @} */
753    U8                      tpcCmd;        /*!< 2 bits for TPC command */
754 } TfuDciFormat1bInfo;
755 #ifdef EMTC_ENABLE
756 /** @brief This structure contains the information needed to convey DCI format 6-0A.
757  */
758 typedef struct tfuDciFormat60aInfo
759 {
760    Bool              hoppingEnbld;  /*!< TRUE, if hopping is enabled */
761    U32               riv;           /*!<9 bits, type2 allocation, RIV as defined in 213 section 7.1.6.3. */
762    U8                mcs;           /*!< 4 bits for MCS and RV */
763    U8                rep;           /*!< 2 bits, repetion number */
764    U8                hqProcId;    /*!< HARQ process ID */
765    Bool              ndi;           /*!< 1 bit for new data indicator */
766    U8                rv;            /*!< 2 bits - Redundancy version */
767    U8                tpcCmd;        /*!< 2 bits for TPC command */
768 #ifdef TFU_TDD
769 /* TODO_Mavericks: Check if DAI is required for FDD also */
770    U8               ulIdx;         /*!< UL index applicable only for TDD */
771    U8               dai;           /*!< The downlink assignement index */
772 #endif
773    Bool            cqiReq;        /*!< 1 bit for CQI */
774    Bool            isSrs;         /*!< 1 bit for SRS */
775    U8              dciRep;        /*!< 2 bits for DCI Subframe repetition */      
776 } TfuDciFormat60aInfo;
777 /** @brief This structure contains only the allocation information, that is part
778  * of DCI format 6-1A. 
779  * @details Allocation information also contains parameters necessary
780  * for Physical layer to process Downlink data. This structure accompanies the
781  * Data that is sent from MAC to PHY in the TfUiTfuDatReq primitive.
782  * @sa TfuDciFormat61AInfo
783  */
784 typedef struct tfuDciFormat61AllocInfo
785 {
786    U32         riv;           /*!<9 bits, type2 allocation, RIV as defined in 213 section 7.1.6.3. */
787 /* TODO_EMTC: Add start RB, number of RB, Narrow band if required */
788    U8          harqProcId;    /*!< HARQ process ID */
789    Bool        ndi;           /*!< 1 bit for new data indicator */
790    U8          mcs;           /*!< 4 bits for MCS and RV */
791    U8          rv;            /*!< 2 bits - Redundancy version */
792         U32                scramblerInitValue; /*!< Scrambler init(Cinit) value as per 36.211 */
793 } TfuDciFormat61AllocInfo;
794
795  /** @brief This structure contains the information carried in DCI format 6-1A
796   * when it is NOT used for a PDCCH order. 
797   */
798 typedef struct tfudciformat61aPdsch
799 {
800    TfuDciFormat61AllocInfo allocInfo;   /* Allocation info for 6-1A */
801    Bool                hoppingEnbld;  /*!< TRUE, if hopping is enabled */
802    U8                  rep;           /*!< 2 bits, repetion number */
803    U8                  tpcCmd;        /*!< 2 bits for TPC command */
804 #ifdef TFU_TDD
805 /* TODO_Maveri: Check if DAI is required for FDD also */
806    U8                  dai;           /*!< The downlink assignement index */
807 #endif
808    U8                  antPortAndScrId; /*!< 2 bits - Antenna port(s) and scrambling identity  */
809    Bool                isSrs;           /*!< 1 bit for SRS */
810    U8                  tPmi;            /*!< 2 0r 4 bits:  TPMI information for precoding  */
811    U8                  pmiCfm;          /*!<  1 bit, PMI confirmation for precoding  */
812    U8                  harqAckOffst;    /*!< 2 bits, HARQ-ACK resource offset */ 
813    U8                  dciRep;          /*!< 2 bits for DCI Subframe repetition */   
814    Bool                isTBMsg4;        /*!< This field is added to help counting num of Msg4 Tx failures */
815 } Tfudciformat61aPdsch;
816 typedef struct tfuPdcchOrderInfoEmtc
817 {
818    U32         riv;             /*!<9 bits, type2 allocation, RIV as defined in 213 section 7.1.6.3. */
819    U8          preambleIdx;    /*!< Dedicated preamble index */
820    U8          prachMaskIdx;   /*!< PRACH Mask index used to determine the
821                                     subframe to be used for RACH */
822    U8          ceLevel;        /*!< 2 bits, Starting CE level */
823 } TfuPdcchOrderInfoEmtc;
824
825 /** @brief This structure contains the information needed to convey DCI format 6-1A.
826  * @details Format can possibly carry PDSCH allocation or information needed for
827  * a PDCCH order, used to initiate a RACH procedure in cases where UE looses
828  * synchronization with eNodeB.
829  */
830 typedef struct tfuDciFormat61aInfo
831 {
832    Bool                 isPdcchOrder;
833    union
834    {
835       TfuPdcchOrderInfoEmtc   pdcchOrder;    /*!< PDDCH order information */
836       Tfudciformat61aPdsch     pdschInfo;     /*!< PDSCH allocation information */
837       /*tfu_x_001.main_6 - Added for SPS support*/
838    }t;
839 } TfuDciFormat61aInfo;
840
841
842 typedef struct tfuDciFormatForEmtcBcch
843 {
844    U8  mcs;
845    U16 numOfRb;
846    U16 rbStart;
847 }TfuDciFormatForEmtcBcch;
848
849 typedef struct tfuDirectIndication
850 {
851    U8  directInd; /*!< 8 bit direct Indication Information*/
852 }TfuDirectIndication;
853
854 typedef struct tfuDciFormat62AllocInfo
855 {
856   U8 riv;                         /*!< Narrow Band Index*/ 
857   U8 mcs;                         /*!<MCS */
858   U32         scramblerInitValue; /*!< Scrambler init(Cinit) value as per 36.211 */
859   U8          rv;                  /*!<Redundancy version */ 
860 }TfuDciFormat62AllocInfo;
861
862 typedef struct tfudciformat62Pdsch
863 {
864     TfuDciFormat62AllocInfo format62AllocInfo;
865     U8 repNum;                       /*!< 3 bits, repetion number */
866     U8 dciSubRepNum;                 /*!< 2 bits for DCI Subframe repetition */
867      
868
869 }Tfudciformat62Pdsch;
870
871 typedef struct tfuDciFormat62Info
872 {
873    Bool                 isPaging;   
874    union
875    {
876       TfuDirectIndication   directIndication;    /*!< Direct Indication information */
877       Tfudciformat62Pdsch   pdschInfo;           /*!< Paging information */
878    }t;
879 } TfuDciFormat62Info;
880
881 #endif /* EMTC_ENABLE */
882
883
884
885
886 /** @brief This structure contains the information needed to convey the possible DCI
887  * formats. The following are the supported formats: 
888  * -# Format 0    - used for PUSCH scheduling
889  * -# Format 1    - used for PDSCH scheduling
890  * -# Format 1A   - used for compact scheduling of PDSCH or RA procedure
891  *                   intitiated by a PDCCH order.
892  * -# Format 1B   - used for compact scheduling of PDSCH with precoding
893  *                   information.
894  * -# Format 1C   - used for very compact scheduling of PDSCH.
895  * -# Format 1D   - used for compact scheduling for PDSCH with precoding
896  *                   information with power offset.
897  * -# Format 2    - used for PDSCH scheduling
898  * -# Format 2A   - used for PDSCH scheduling
899  * -# Format 3    - used for power control 
900  * -# Format 3A   - used for power control 
901  */
902 typedef struct tfuDciInfo
903 {
904    TfuDciFormat       dciFormat;       /*!< DCI format */
905    union
906    {
907       TfuDciFormat0Info  format0Info;  /*!< Format 0 information */
908       TfuDciFormat1Info  format1Info;  /*!< Format 1 information */
909       TfuDciFormat1aInfo format1aInfo; /*!< Format 1A information */
910       TfuDciFormat1bInfo format1bInfo; /*!< Format 1B information */
911       TfuDciFormat1cInfo format1cInfo; /*!< Format 1C information */
912       TfuDciFormat1dInfo format1dInfo; /*!< Format 1D information */
913       TfuDciFormat2Info  format2Info;  /*!< Format 2 information */
914       TfuDciFormat2AInfo format2AInfo; /*!< Format 2A information */
915       TfuDciFormat3Info  format3Info;  /*!< Format 3 information */
916       TfuDciFormat3AInfo format3AInfo; /*!< Format 3A information */
917 #ifdef EMTC_ENABLE
918       TfuDciFormat60aInfo format60aInfo; /*!< Format 60a Information */
919       TfuDciFormat61aInfo format61aInfo; /*!< Format 61a Information */
920       TfuDciFormat62Info  format62Info;  /*!< Formra 62  Information */
921 #endif /* EMTC_ENABLE */
922 #ifdef TFU_5GTF
923           TfuDciFormatA1Info  formatA1Info;  /*!< 5GTF: Format A1 information */
924           TfuDciFormatA2Info  formatA2Info;  /*!< 5GTF: Format A1 information */
925           TfuDciFormatB1Info  formatB1Info;  /*!< 5GTF: Format B1 information */
926           TfuDciFormatB2Info  formatB2Info;  /*!< 5GTF: Format B2 information */
927 #endif
928    } u;
929 } TfuDciInfo;
930
931 /** @brief This structure contains the information needed to convey the start and size
932  * of the sub-band in the CQI report. 
933  */
934 typedef struct tfuSubbandInfo
935 {
936    U8          rbStart;       /*!< Starting RB */
937    U8          numRb;         /*!< Number of RBs */
938 } TfuSubbandInfo;
939
940 /** @brief This structure is used to convey the sub-band CQI reported. 
941  */
942 typedef struct tfuSubbandDlCqiInfo
943 {
944    TfuSubbandInfo         subband;             /*!< Sub-band information */
945    U8                     cqiIdx[TFU_MAX_TB];  /*!< Sub-band CQI index per CW */
946 } TfuSubbandDlCqiInfo;
947 /** @} */
948
949
950 /** @brief This structure is used to convey the subbannd CQI reported. 
951  */
952 typedef struct tfuSubbandCqiInfo
953 {
954    TfuSubbandInfo subband;    /*!< Sub-band information */
955    U8             cqiIdx;     /*!< CQI index */
956 } TfuSubbandCqiInfo;
957 /** @brief This structure conveys the CCE information.
958  */
959 typedef struct tfuPdcchCceInfo
960 {
961    U8             cceIdx;   /*!< CCE index */
962    CmLteAggrLvl   aggrLvl;  /*!< Aggregation level */
963 } TfuPdcchCceInfo;
964
965  /** @brief This structure maps to the CQI mode 10. The report can either
966   * convey a Rank index or a wide-band CQI. 
967   */
968 typedef struct tfuCqiPucchMode10
969 {
970    TfuRptType       type;   /*!< Either RI or CQI reported */
971    union
972    {
973       U8        ri;    /*!< One RI assuming transmission on S sub-bands */
974       U8        cqi;   /*!< Wide-band CQI assuming transmission on S sub-bands */
975    }u;
976 } TfuCqiPucchMode10;
977
978
979  /** @brief This structure contains a wide-band CQI, PMI, and optionally a
980   * wide-band differential CQI. 
981   */
982 typedef struct tfuCqiMode11Cqi
983 {
984    U8       cqi;           /*!< Wide-band CQI */
985    U8       pmi;           /*!< PMI */
986    TknU8    wideDiffCqi;   /*!< Wide-band differential CQI */
987 } TfuCqiMode11Cqi;
988
989  /** @brief This structure maps to the CQI mode 11. The report can either
990   * convey a Rank index or a CQI report. 
991   */
992 typedef struct tfuCqiPucchMode11
993 {
994    TfuRptType       type;   /*!< Either RI or CQI reported */
995    union
996    {
997       U8                ri;    /*!< One RI assuming transmission on S sub-bands */
998       TfuCqiMode11Cqi   cqi;   /*!< CQI assuming transmission on S sub-bands */
999    }u;
1000 } TfuCqiPucchMode11;
1001
1002  /** @brief This structure contains the sub-band CQI for mode 2-0. 
1003   */
1004 typedef struct tfuCqiMode20SubCqi
1005 {
1006    U8      cqi;      /*!< CQI value */
1007    U8       l;       /*!< L bit sub-band label */
1008 } TfuCqiMode20SubCqi;
1009
1010  /** @brief This structure contains Mode 20 CQI report. It can either be a
1011   * wide-band CQI or a sub-band CQI. 
1012   */
1013 typedef struct tfuCqiMode20Cqi
1014 {
1015    Bool     isWideband;             /*!< TRUE, if wide-band CQI is reported */
1016    union
1017    {
1018       U8                 wideCqi;   /*!< Single Wide-band CQI */
1019       TfuCqiMode20SubCqi subCqi;    /*!< Sub-band CQI */
1020    }u;
1021 } TfuCqiMode20Cqi;
1022
1023
1024  /** @brief This structure maps to CQI mode 20. The report either contains a
1025   * Rank Index or a CQI report. 
1026   */
1027 typedef struct tfuCqiPucchMode20
1028 {
1029    TfuRptType       type;   /*!< Either RI or CQI reported */
1030    union
1031    {
1032       U8                ri;   /*!< One RI assuming transmission on S sub-bands */
1033       TfuCqiMode20Cqi   cqi;  /*!< CQI assuming transmission on S sub-bands */
1034    }u;
1035 } TfuCqiPucchMode20;
1036
1037  /** @brief This structure contains the sub-band CQI report for mode 2-1. 
1038   * It carries a CQI, 'L' bit sub-band label, and optionally a differential CQI.
1039   */
1040 typedef struct tfuCqiMode21SubCqi
1041 {
1042    U8       cqi;     /*!< CQI */
1043    U8       l;       /*!< L bit sub-band label */
1044    TknU8    diffCqi; /*!< Optional Differential CQI */
1045 } TfuCqiMode21SubCqi;
1046
1047
1048  /** @brief This structure contains the wide-band CQI report for mode 2-1.
1049   * It carries a wide-band CQI, PMI and optionally a differential CQI. 
1050   */
1051 typedef struct tfuCqiMode21WideCqi
1052 {
1053    U8       cqi;        /*!< CQI */
1054    U8       pmi;        /*!< PMI */
1055    TknU8    diffCqi;    /*!< Optional Differential CQI */
1056 } TfuCqiMode21WideCqi;
1057
1058
1059  /** @brief This structure conveys CQI report for mode 2-1. The reported value
1060   * can either be wide-band or sub-band. 
1061   */
1062 typedef struct tfuCqiMode21Cqi
1063 {
1064    Bool     isWideband;             /*!< TRUE, if wide-band CQI is reported. */
1065    union
1066    {
1067       TfuCqiMode21WideCqi wideCqi;  /*!< Single Wide-band CQI */
1068       TfuCqiMode21SubCqi  subCqi;   /*!< Sub-band CQI. */
1069    }u;
1070 } TfuCqiMode21Cqi;
1071
1072
1073  /** @brief This structure maps to the CQI reporting mode 2-1. The report either
1074   * conveys a Rank Indicator or a CQI report. 
1075   */
1076 typedef struct tfuCqiPucchMode21
1077 {
1078    TfuRptType       type;   /*!< Either RI or CQI reported */
1079    union
1080    {
1081       U8                ri;   /*!< One RI assuming transmission on S sub-bands */
1082       TfuCqiMode21Cqi   cqi;  /*!< CQI assuming transmission on S sub-bands */
1083    }u;
1084 } TfuCqiPucchMode21;
1085
1086
1087 /** @brief This structure conveys the Downlink CQI reported on PUCCH.
1088  */
1089 typedef struct tfuDlCqiPucch
1090 {
1091    U8                cellIdx;
1092    TfuDlCqiPucchMode mode;          /*!< PUSCH CQI mode */
1093    union
1094    {
1095       TfuCqiPucchMode10 mode10Info; /*!< Mode 1-0 information */
1096       TfuCqiPucchMode11 mode11Info; /*!< Mode 1-1 information */
1097       TfuCqiPucchMode20 mode20Info; /*!< Mode 2-0 information */
1098       TfuCqiPucchMode21 mode21Info; /*!< Mode 2-1 information */
1099    }u;
1100 } TfuDlCqiPucch;
1101
1102
1103  /** @brief This structure carries sub-band information and PMI, in the CQI
1104   * reporting format 1-2. 
1105   */
1106 typedef struct tfuSubbandMode12
1107 {
1108    U8             pmi;             /*!< PMI for this sub-band */
1109    TfuSubbandInfo subBand;   /*!< Sub-band information start and length */
1110 } TfuSubbandMode12;
1111
1112 /** @brief This structure conveys information present in CQI reporting mode 1-2 received
1113  * over PUSCH. 
1114  */
1115 typedef struct tfuCqiPuschMode12
1116 {
1117    U8               numSubband;                     /*!< Number of sub-bands */
1118    U8               cqiIdx[TFU_MAX_TB];             /*!< Single Wide-band CQI per
1119                                                      codeword */
1120    TfuSubbandMode12 subbandArr[TFU_MAX_DL_SUBBAND]; /*!< Sub-band information array */
1121 } TfuCqiPuschMode12;
1122
1123
1124 /** @brief This structure conveys information present in CQI reporting mode 2-0 received
1125  * over PUSCH. This mode is for UE selected sub-band feedback. 
1126  */
1127 typedef struct tfuCqiPuschMode20
1128 {
1129    U8             cqiIdx;                         /*!< CQI index transmission
1130                                                     over M sub-bands */
1131    U8             wideBandCqi;                    /*!< Wide-band CQI index, that is,
1132                                                     transmission over S sub-bands */
1133    U8             numSubband;                     /*!< Number of sub-bands */
1134    TfuSubbandInfo subbandArr[TFU_MAX_DL_SUBBAND]; /*!< Sub-band information array */
1135 } TfuCqiPuschMode20;
1136
1137 /** @brief This structure conveys information present in CQI reporting mode 2-2 received
1138  * over PUSCH.
1139  */
1140 typedef struct tfuCqiPuschMode22
1141 {
1142    U8                cqi[TFU_MAX_TB];                 /*!< CQI index over M preferred
1143                                                          Sub-bands */
1144    U8                pmi;                             /*!< PMI preferred PMI over M
1145                                                          sub-bands */
1146    U8                wideBandCqi[TFU_MAX_TB];         /*!< Wide-band CQI */
1147    U8                wideBandPmi;                     /*!< PMI */
1148    U8                numSubband;                      /*!< Number of sub-bands, that is, M mentioned in 213, each of size k */
1149    TfuSubbandInfo    subbandArr[TFU_MAX_DL_SUBBAND];  /*!< Sub-band information array */
1150 } TfuCqiPuschMode22;
1151
1152
1153 /** @brief This structure holds CQI report information in mode 3-0
1154  */
1155 typedef struct tfuSubbandMode30
1156 {
1157    U8             cqi;       /*!< CQI for this sub-band */
1158    TfuSubbandInfo subBand;   /*!< Sub-band information start and length. */
1159 } TfuSubbandMode30;
1160
1161
1162 /** @brief This structure conveys information present in CQI reporting mode 3-0
1163  * received over PUSCH.
1164  */
1165 typedef struct tfuCqiPuschMode30
1166 {
1167    U8                wideBandCqi;                     /*!< Wide-band CQI */
1168    U8                numSubband;                      /*!< Number of sub-bands */
1169    TfuSubbandMode30  subbandArr[TFU_MAX_DL_SUBBAND];  /*!< Sub-band information array */
1170 } TfuCqiPuschMode30;
1171
1172 /** @brief This structure holds CQI report information in mode 3-1
1173  */
1174 typedef struct tfuSubbandMode31
1175 {
1176    U8             cqi[TFU_MAX_TB];  /*!< CQI for this sub-band */
1177    TfuSubbandInfo subBand;          /*!< Sub-band information start and length */
1178 } TfuSubbandMode31;
1179
1180
1181 /** @brief This structure conveys information present in CQI reporting mode 3-1
1182  * received over PUSCH.
1183  */
1184 typedef struct tfuCqiPuschMode31
1185 {
1186    U8                     pmi;                      /*!< PMI */
1187    U8                     wideBandCqi[TFU_MAX_TB];  /*!< Wide-band CQI per CW */
1188    U8                     numSubband;               /*!< Number of sub-bands */
1189    TfuSubbandDlCqiInfo    subbandCqiArr[TFU_MAX_DL_SUBBAND];  /*!< Array of 
1190                                                          sub-bands and CQI for
1191                                                          each of them */
1192 } TfuCqiPuschMode31;
1193
1194 /** @enum TfuDlCqiPuschMode
1195  * This enum contains values for the CQI reporting modes. 
1196  */
1197 typedef enum
1198 {
1199    TFU_PUSCH_CQI_MODE_12,
1200    TFU_PUSCH_CQI_MODE_20,
1201    TFU_PUSCH_CQI_MODE_22,
1202    TFU_PUSCH_CQI_MODE_30,
1203    TFU_PUSCH_CQI_MODE_31
1204 } TfuDlCqiPuschMode;
1205
1206
1207 /** @brief This structure conveys Downlink CQI information (mode and corresponding
1208  * CQI) received over PUSCH. 
1209  */
1210 typedef struct tfuDlCqiPusch
1211 {
1212    U8                cellIdx;
1213    TfuDlCqiPuschMode mode;         /*!< PUSCH CQI mode */
1214    TknU8                  ri;            /*!< Rank Indicator for TM 3,4 */
1215    union
1216    {
1217       TfuCqiPuschMode12 mode12Info; /*!< Mode 1-2 information */
1218       TfuCqiPuschMode20 mode20Info; /*!< Mode 2-0 information */
1219       TfuCqiPuschMode22 mode22Info; /*!< Mode 2-2 information */
1220       TfuCqiPuschMode30 mode30Info; /*!< Mode 3-0 information */
1221       TfuCqiPuschMode31 mode31Info; /*!< Mode 3-1 information */
1222    }u;
1223 } TfuDlCqiPusch;
1224
1225 /** @brief This structure conveys explicitly the PMI information in case
1226  *  of PUSCH feedback usage in scheduling. Applicable for TM 4, 5, 6. 
1227  */
1228 typedef struct tfuDlCqiPuschInfo
1229 {
1230    TfuDlCqiPuschMode      mode;          /*!< PUSCH CQI mode */
1231    union
1232    {
1233       TfuCqiPuschMode12   mode12Info;    /*!< Mode 1-2 information */
1234       TfuCqiPuschMode22   mode22Info;    /*!< Mode 2-2 information */
1235       TfuCqiPuschMode31   mode31Info;    /*!< Mode 3-1 information */
1236    }u;
1237 } TfuDlCqiPuschInfo;
1238
1239 #ifdef TFU_TDD
1240 /** @enum TfuAckNackMode
1241  * This enum contains values for modes of HARQ feedback in TDD
1242  */
1243 typedef enum
1244 {
1245    TFU_ACK_NACK_BUNDLING,
1246    TFU_ACK_NACK_MULTIPLEXING,
1247    TFU_ACK_NACK_SPECIAL_BUNDLING,
1248    TFU_ACK_NACK_CHANNEL_SELECTION =TFU_ACK_NACK_SPECIAL_BUNDLING,
1249    TFU_ACK_NACK_FORMAT_3
1250 } TfuAckNackMode;
1251
1252 #else /* else of TFU_TDD */
1253 /** @enum TfuAckNackMode
1254  * This enum contains values for modes of HARQ feedback in FDD
1255  */
1256 typedef enum
1257 {
1258    TFU_UCI_FORMAT_1A_1B,
1259    TFU_UCI_FORMAT_1B_CS,
1260    TFU_UCI_FORMAT_3
1261 } TfuAckNackMode;
1262 #endif
1263
1264 #ifdef TFU_UPGRADE
1265
1266 /** @brief This structure conveys the Uplink SRS indication of an UE.
1267  * @details Uplink SRS from each UE is received by the physical layer and this
1268  * information is provided to the scheduler.
1269  */
1270 typedef struct tfuSrsRpt
1271 {
1272    CmLList                lnk;           /*!< Link to the list of rerports */
1273    CmLteRnti              ueId;          /*!< CRNTI */
1274    U16                    dopEst;        /*!< Doppler estimation [0-255] */
1275    U16                    ta;            /*!< Timing advance for the UE */
1276    U8                     numRbs;        /*!< Number of RBs to be reported for this UE */
1277    U8                     rbStart;       /*!< Starting RB to be reported */
1278    U8                     snr[TFU_MAX_UL_RB]; /*!< snr for each RB */
1279    Bool                   wideCqiPres;   /*!< Flag to indicate Wide-band CQI */
1280    U8                     wideCqi;       /*!< Wide-band CQI for an UL channel */
1281 } TfuSrsRpt;
1282
1283
1284 /** @brief This structure conveys the Uplink SRS indication.
1285  * @details Uplink SRS is received by the physical layer and this
1286  * information is provided to the scheduler. 
1287  * This data structure clubs together the UL SRS indications of all the UEs 
1288  * in the subframe. 
1289  */
1290 typedef struct tfuSrsIndInfo
1291 {
1292    CmMemListCp            memCp;         /*!< Memory control point */
1293    CmLteCellId            cellId;        /*!< Cell ID */
1294    CmLteTimingInfo        timingInfo;    /*!< Timing information */
1295    CmLListCp              srsRpt;        /*!< List of SRS indications - TfuSrsRpt */
1296 } TfuSrsIndInfo;
1297
1298 /** @brief This structure contains the Raw CQI information, that is, the CQI report
1299  * as transmitted by the UE. 
1300  * @details These bits are interpreted by MAC to derive the following: 
1301  * -# Wide-band CQI
1302  * -# Sub-band CQI
1303  * -# PMI
1304  * -# RI
1305  */
1306 typedef struct tfuRawCqiRpt
1307 {
1308    CmLList                lnk;           /*!< Link to the list of reports */
1309    CmLteRnti              crnti;         /*!< CRNTI of the UE */
1310    U8                     numBits;       /*!< Number of valid CQI bits */
1311 #ifdef TFU_5GTF
1312    U32                    uciPayload;    /*!< Raw UCI bit payload */
1313 #else
1314    U8                     cqiConfBitMask;
1315    U8                     cqiBits[TFU_MAX_CQI_BYTES]; /*!< An array of bits
1316                                               corresponding to the Raw CQI report */
1317    U8                     ri[CM_LTE_MAX_CELLS]; /*!< Array of bits comprising of a Rank */                                              
1318 #endif
1319 } TfuRawCqiRpt;
1320
1321 /** @brief This structure contains the Raw CQI reports received for the
1322  * transmitting UEs in a single subframe. 
1323  * @details Raw CQI corresponds to the actual bits transmitted by the UE, whose
1324  * interpretation is upto the MAC layer. 
1325  */
1326 typedef struct tfuRawCqiIndInfo
1327 {
1328    CmMemListCp            memCp;       /*!< Memory control point */
1329    CmLteCellId            cellId;      /*!< Cell ID */
1330    CmLteTimingInfo        timingInfo;  /*!< Timing information */
1331    CmLListCp              rawCqiRpt;   /*!< List of HQ+CQI+RI indications - TfuRawUciRpt */
1332 } TfuRawCqiIndInfo;
1333 /* 5GTF TODO: Change Interface Structure and API name accordingly */
1334
1335
1336 typedef enum
1337 {
1338    TFU_PUCCH_HARQ,
1339    TFU_PUCCH_SR,
1340    TFU_PUCCH_SRS,
1341    TFU_PUCCH_CQI,
1342    TFU_PUCCH_HARQ_SR,
1343    TFU_PUCCH_HARQ_SRS,
1344    TFU_PUCCH_HARQ_CQI,
1345    TFU_PUCCH_HARQ_SR_SRS,
1346    TFU_PUCCH_HARQ_SR_CQI,
1347    TFU_PUCCH_SR_SRS,
1348    TFU_PUCCH_SR_CQI,
1349    /*tfu_x_001.main_8 - ADD - New Pucch RR Info Combination support */
1350    /* ccpu00116923 - New Reception Request types for CQI and SRS with SR */
1351    TFU_PUCCH_HARQ_SR_CQI_SRS,
1352    TFU_PUCCH_SR_CQI_SRS
1353 #ifdef TFU_5GTF
1354    ,
1355    /* 5GTF TODO: Order of encoding should be as per 212 5.2.3.6 */
1356    TFU_XPUCCH_UCI_INFO,   /*!< HQ+CQI+RI */
1357    TFU_PUCCH_BSI_BRI
1358 #endif
1359 } TfuUePucchRecpType;
1360
1361 /** @brief This structure is sent from scheduler to PHY in order to request the
1362  * reception of HARQ information on PUCCH.
1363  */
1364 typedef struct tfuUePucchHqRecpInfo
1365 {
1366    TfuAckNackMode         hqFdbkMode;    /*!< Feedback mode in TDD */
1367    U8                     hqSz;          /*!< Size of feedback in bits */
1368    U8                     pucchResCnt;   /*!< Number of ACK/NACK responses
1369                                               received in this subframe [0-4] */
1370    U16                    hqRes[TFU_MAX_HQ_RES]; /*!< (n^1PUCCH(0-3))
1371                                               values [0-2047] */
1372    U8                     a;             /*!< A value to interpret Hq feedback */ 
1373 } TfuUePucchHqRecpInfo;
1374
1375 /** @brief This structure is sent from scheduler to PHY in order to request the
1376  * reception of SR information on PUCCH.
1377  */
1378 typedef struct tfuUePucchSrRecpInfo
1379 {
1380    U16                    n1PucchIdx;    /*!< (n^1PUCCH) value [0-2047] */
1381 } TfuUePucchSrRecpInfo;
1382  
1383 /** @brief This structure is sent from scheduler to PHY in order to request the
1384  * reception of CQI information on PUCCH.
1385  */
1386 typedef struct tfuUePucchCqiRecpInfo
1387 {
1388    U16                    n2PucchIdx;    /*!< (n^2PUCCH) value[0-1185] */
1389    U8                     cqiPmiSz;      /*!< DL CQI/PMI size in bits [0-255] */
1390 } TfuUePucchCqiRecpInfo;
1391
1392 /** Different values for UL SRS BW information */
1393 typedef enum tfuUlSrsBwInfo
1394 {
1395    TFU_ULSRS_BW_0 = 0,   
1396    TFU_ULSRS_BW_1 = 1,   
1397    TFU_ULSRS_BW_2 = 2,   
1398    TFU_ULSRS_BW_3 = 3   
1399 } TfuUlSrsBwInfo;
1400
1401
1402 /** Different values for UL SRS Hoping BW information */
1403 typedef enum tfuUlSrsHoBwInfo
1404 {
1405    TFU_ULSRS_HOP_BW_0 = 0,   
1406    TFU_ULSRS_HOP_BW_1 = 1,   
1407    TFU_ULSRS_HOP_BW_2 = 2,   
1408    TFU_ULSRS_HOP_BW_3 = 3   
1409 } TfuUlSrsHoBwInfo;
1410
1411 /** Different values for UL SRS Cyclic Shift information */
1412 typedef enum tfuUlSrsCycShiftInfo
1413 {
1414    TFU_ULSRS_CYSHIFT_0 = 0,   
1415    TFU_ULSRS_CYSHIFT_1 = 1,   
1416    TFU_ULSRS_CYSHIFT_2 = 2,   
1417    TFU_ULSRS_CYSHIFT_3 = 3,   
1418    TFU_ULSRS_CYSHIFT_4 = 4,   
1419    TFU_ULSRS_CYSHIFT_5 = 5,   
1420    TFU_ULSRS_CYSHIFT_6 = 6,   
1421    TFU_ULSRS_CYSHIFT_7 = 7   
1422 } TfuUlSrsCycShiftInfo;
1423
1424  
1425 /** @brief This structure is sent from scheduler to PHY in order to request the
1426  * reception of SRS information on PUCCH.
1427  */
1428 typedef struct tfuUePucchSrsRecpInfo
1429 {
1430    TfuUlSrsBwInfo  srsBw;         /*!< UE specific SRS Bandwidth (B,srs)
1431                                               parameter. Given by RRC[0-3] */
1432    U8                     nRrc;          /*!< Frequency Domain position given by
1433                                               RRC per UE.[0-23]*/
1434    TfuUlSrsHoBwInfo  srsHopBw;      /*!< SRS Hopping BW given by RRC per
1435                                               UE (b,Hop)[0-3] */
1436    U8                     transComb;     /*!< Frequency location given by RRC
1437                                               per UE (k,TC) [0-1] */
1438    U16                    srsCfgIdx;     /*!< (Isrs) - defines SRS periodicity
1439                                               and subframe offset,given by RRC
1440                                               [0-1023] */
1441    TfuUlSrsCycShiftInfo   srsCyclicShft; /*!< (n^cs,srs) given by RRC [0-7] */
1442    /*Need to add U8 AntPort for Rel10 when SRS is supported */
1443 } TfuUePucchSrsRecpInfo;
1444
1445 #ifdef TFU_5GTF
1446 /** @brief This structure is sent from scheduler to PHY in order to request the
1447  * reception of BSI BRI information on PUCCH.
1448  */
1449 typedef struct tfuUePucchBsiBriRecpInfo
1450 {
1451    U8                     puschFlag;  /*!< UCI is carried in xPUSCH or not
1452                                            0 -> UCI is in xPUCCH, 
1453                                            1 -> UCI is in xPUSCH */
1454    U8                     pucchIndex; /*!< Frequency resource index of xPUCCH 
1455                                            for UCI report. [0-15] */
1456    U8                     SCID;       /*!< SCID : 0 or 1 */
1457    U8                     bsiRpt;     /*!< total num of BSI report[0,1,2,4] */
1458    U8                     briRpt;     /*!< total num of BRI report[0,1,2,4] */
1459 } TfuUePucchBsiBriRecpInfo;
1460
1461 /** @brief This structure is sent from scheduler to PHY in order to request the
1462  * reception of UCI (CQI, HQ, RI) information on PUCCH.
1463  */
1464 typedef struct tfuUePucchUciRecpInfo
1465 {
1466    U8                     numBits;       /*!< 1-22, 1-Only HQ, 5-Only CQI/RI, 6- both HQ CQI/RI */
1467    U8                     pucchIndex;    /*!< 0-15, PUCCH Freq Res Idx */
1468    U8                     SCID;          /*!< SCID : 0 or 1 */
1469 } TfuUePucchUciRecpInfo;
1470 #endif
1471
1472 /** @brief This structure is sent from scheduler to PHY in order to request the
1473   * reception of UCI on PUCCH. This may contain the following:
1474   * -# HARQ
1475   * -# SR
1476   * -# SRS
1477   * -# CQI
1478   * -# HARQ+SR
1479   * -# HARQ+SRS
1480   * -# HARQ+CQI
1481   * -# HARQ+SR+SRS
1482   * -# HARQ+SR+CQI
1483   * -# SR+SRS
1484   * -# SR+CQI  
1485   */
1486 typedef struct tfuUePucchRecpReq
1487 {
1488    TfuUePucchRecpType     uciInfo;       /*!< Bitmask for the combination of UCI
1489                                               to be received */
1490    TfuUePucchCqiRecpInfo  cqiInfo;       /*!< Info needed to receive CQI. Valid
1491                                               if CQI is included in uciInfo */
1492    TfuUePucchSrRecpInfo   srInfo;        /*!< Info needed to receive SR. Valid
1493                                               if SR is included in uciInfo */
1494    TfuUePucchHqRecpInfo   hqInfo;        /*!< Info needed to receive Harq-Valid
1495                                               if HQ is included in uciInfo */
1496    TfuUePucchSrsRecpInfo  srsInfo;       /*!< Info needed to receive SRS. Valid
1497                                               if SRS is included in uciInfo */
1498 #ifdef TFU_5GTF
1499    TfuUePucchBsiBriRecpInfo  bsiBriInfo; /*!< Info needed to receive BSI_BRI. Valid
1500                                               if BSI_BRI is included in uciInfo */
1501    TfuUePucchUciRecpInfo     uciPduInfo; /*!< Info needed to receive HQ/CQI/RI.*/
1502 #endif                                              
1503 #ifdef EMTC_ENABLE
1504         U16                                                     format1aRepNumber;
1505         U16                                                     format2aRepNumber;
1506         U32                                                     catMScramblerInitVal;
1507 #endif
1508 } TfuUePucchRecpReq;
1509
1510 typedef enum
1511 {
1512    TFU_PUSCH_DATA,
1513    TFU_PUSCH_DATA_SRS,
1514    TFU_PUSCH_DATA_HARQ,
1515    TFU_PUSCH_DATA_HARQ_SRS,
1516    TFU_PUSCH_DATA_CQI,
1517    TFU_PUSCH_DATA_CQI_SRS,
1518    TFU_PUSCH_DATA_CQI_HARQ,
1519    TFU_PUSCH_DATA_CQI_HARQ_SRS
1520 #ifdef TFU_5GTF
1521    /* Message types possible on xPUCCH and xPUSCH : UL Data, UCIs: HARQ-ACK, SR, BSI, BRI, CQI/PMI/RI etc  */
1522    /* for now only TFU_PUSCH_DATA can be considered */ 
1523 #endif
1524 } TfuUePuschRecpType;
1525
1526  /** @brief This structure is sent from scheduler to PHY in order to request the
1527   * reception of UEs data on ULSCH.
1528   */
1529 typedef struct tfuUeUlSchRecpInfo
1530 {
1531    U16                    size;         /*!< Length of the Data in bytes*/
1532    /* ToDo : rbStart and numRb is kept for legacy, need to remove later */
1533    U8                     rbStart;      /*!< Start of Resource Block of 
1534                                              allocation */
1535    U8                     numRb;        /*!< Number of RBs allocated */
1536    TfuModScheme           modType;      /*!< Modulation order */
1537    U8                     nDmrs;        /*!< 3 bits for DMRS cyclic shift */
1538    Bool                   hoppingEnbld; /*!< TRUE, if hopping is enabled */
1539    U8                     hoppingBits;  /*!< Hopping bits as mentioned in 
1540                                              213 8.4 */
1541    Bool                   isRtx;        /*!< TRUE, if this is a retx */
1542    Bool                   ndi;          /*!< New Data Indication */   
1543    U8                     rv;           /*!< Redundancy version */
1544    U8                     harqProcId;   /*!< HARQ process ID */
1545    U8                     txMode;       /*!< UE's UL transmission mode: 
1546                                              0 = SISO/SIMO, 1 = MIMO */
1547    U8                     crntTxNb;     /*!< Current Harq Tx Cntr of this TB.
1548                                              Valid if frequency hopping is 
1549                                              enabled */
1550    Bool                   nSrs;         /*!< Indicates if RBs for this TB
1551                                              overlap with SRS configuration. 
1552                                              FALSE = No overlap,TRUE=overlap */
1553    U8                     mcs;          /*!< MCS */
1554 #ifdef EMTC_ENABLE
1555    U32                    repetitionNumber;
1556    U32                    scramblerInitValue;
1557 #endif
1558 #ifdef TFU_5GTF
1559    U8                     rbgStart; /* The starting resource block group for
1560                                        this xPUSCH allocation.*/
1561    U8                     numRbg; /* The number of resource block groups
1562                                        allocated to this ULSCH grant.*/
1563    U8                     xPUSCHRange; /* 0 : the stopping of xPUSCH is the 12th symbol,
1564                                                                     1 : the stopping of xPUSCH is the 13th symbol
1565                                                                     2 : the stopping of xPUSCH is the final (14th) symbol */
1566    U8                     nAntPortLayer;/* 0:1 Layer, port 40 1:1 Layer, port 41 2:1 Layer, port 42
1567                                            3:1 Layer, port 43 4:2 Layers, ports {40, 41} 
1568                                            5:2 Layers, ports {42, 43} */
1569    U8                     SCID;        /*SCID : 0 or 1 */
1570    U8                     PMI;         /* Precoding matrix indicator, see V5G.211 section Table 5.3.3A.2-1 */
1571    Bool                   uciWoTBFlag;      /* 0: UCI without transmit block
1572                                                1: with transmit block */
1573    U8                     beamIndex;   /* Receiving beam index Value: 0->7 */
1574 #endif
1575 } TfuUeUlSchRecpInfo;
1576
1577 /** @brief This structure is sent from scheduler to PHY in order to request the
1578   * reception of CQI_RI information on PUSCH.
1579   */
1580 typedef struct tfuUePuschCqiRecpInfo
1581 {
1582    U8                     reportType;      /*! Type of CSI report.
1583                                             0 = periodic report.
1584                                             1 = aperiodic report */
1585    U8                     cCNum;           /*! The number of CC in the aperiodic report.
1586                                               Value: 1->5 */
1587    U8                     cqiPmiSzR1[CM_LTE_MAX_CELLS];   /*!< Size of DL CQI/PMI in bits for
1588                                              rank 1 report[0-255] */
1589    U8                     cqiPmiSzRn1[CM_LTE_MAX_CELLS];  /*!< Size of DL CQI/PMI in bits for 
1590                                              rank > 1 report[0-255] */
1591    TknU8                  riSz[CM_LTE_MAX_CELLS];         /*!< Size of RI in bits[1-2]. Value will
1592                                          be 0 (present flag-false) in frames
1593                                          with no RI Occasion*/
1594    U8                     cqiBetaOff;    /*!< Beta offset for CQI[0-15]. Given  
1595                                              by RRC */
1596    U8                     riBetaOff;     /*!< Beta offset for RI[0-15]. Given 
1597                                              by RRC */
1598 } TfuUePuschCqiRecpInfo;
1599
1600 /** @brief This structure is sent from scheduler to PHY in order to request the
1601   * reception of HARQ information on PUSCH.
1602   */
1603 typedef struct tfuUePuschHqRecpInfo
1604 {
1605    U8                     hqSz;         /*!< Number of feedback bits: 
1606                                          FDD- 1 or 2 TDD- 1 to 4*/
1607    U8                     hqBetaOff;     /*!< Beta offset for Harq[0-15]. Given
1608                                              by RRC */
1609 #ifdef TFU_TDD
1610    TfuAckNackMode         hqFdbkMode;   /*!< Feedback mode in TDD */
1611    U8                     nBundled;     /*!< nBundled value intended for PHY */
1612    U8                     ulDai;        /*!< Ul Dai */
1613 #endif
1614 } TfuUePuschHqRecpInfo;
1615
1616 typedef TfuUePucchSrsRecpInfo TfuUePuschSrsRecpInfo;
1617  /** @brief This structure is sent from scheduler to PHY in order to request the
1618   * reception of UEs data on PUSCH. This may contain the following: 
1619   * -# Data
1620   * -# Data + SRS
1621   * -# Data + HARQ
1622   * -# Data + HARQ + SRS
1623   * -# Data + CQI/RI
1624   * -# Data + CQI/RI + SRS
1625   * -# Data + CQI/RI + HARQ
1626   * -# Data + CQI/RI + HARQ + SRS
1627   */
1628 typedef struct tfuUePuschRecpReq
1629
1630    TfuUePuschRecpType     rcpInfo;      /*!< Bitmask for the combination of
1631                                              information to be received */ 
1632    TfuUeUlSchRecpInfo     ulSchInfo;    /*!< Info needed to receive data pdu
1633                                              on PUSCH. Valid if data is included
1634                                              in rcpInfo */
1635    TfuUePuschCqiRecpInfo  cqiRiInfo;    /*!< Info needed to receive CQI/RI on
1636                                              PUSCH. Valid if CQI is included
1637                                              in rcpInfo */
1638    TfuUePuschHqRecpInfo   hqInfo;       /*!< Info needed to receive Harq on
1639                                              PUSCH. Valid if HARQ is included
1640                                              in rcpInfo */
1641    TfuUePuschSrsRecpInfo  srsInfo;      /*!< Info needed to receive SRS. Valid
1642                                              if SRS is included in rcpInfo */
1643    TknU8                  initialNSrs;  /*!< Not present in case of only data
1644                                              [0/1]. 0 = last OFDM symbol is 
1645                                              not punctured. 1 = last OFDM
1646                                              symbol is punctured */
1647    TknU8                  initialNumRbs; /*!< Number of RBs for initial
1648                                               transmission of this TB. Not  
1649                                               present in case of only data */
1650 } TfuUePuschRecpReq;
1651
1652 /** @enum TfuRecpReqType
1653  * This enum contains values for types of Reception Request.
1654  */
1655 typedef enum
1656 {
1657    TFU_RECP_REQ_PUCCH,
1658    TFU_RECP_REQ_PUSCH,
1659    TFU_RECP_REQ_INVLD
1660 } TfuRecpReqType;
1661
1662 /** @brief This structure is a Per UE reception request for either PUCCH or PUSCH
1663  * data. This contains information needed by PHY to decode the data sent by the
1664  * UE. 
1665  */
1666 typedef struct tfuUeRecpReqInfo
1667 {
1668    CmLList                lnk;           /*!< Link of Linked List */
1669    CmLteRnti              rnti;          /*!< RNTI of the scheduled UE */
1670 #ifdef TFU_5GTF   
1671    U8                     groupId;       /*!< UE Group ID */
1672 #endif
1673    TfuRecpReqType         type;          /*!< Type indicating PUCCH or PUSCH */
1674    union 
1675    {
1676       TfuUePucchRecpReq   pucchRecpReq;  /*!< Reception request for PUCCH */
1677       TfuUePuschRecpReq   puschRecpReq;  /*!< Reception request for PUSCH */
1678    }t;
1679 } TfuUeRecpReqInfo;
1680
1681 #else /* TFU_UPGRADE */
1682
1683 /** @enum TfuUciType
1684  * This enum has values for the various types of UCI information present.
1685  */
1686 typedef enum
1687 {
1688    TFU_UCI_SR,       /*!< Only a scheduling request */
1689    TFU_UCI_HARQ,     /*!< Only HARQ-ACK feedback */
1690    TFU_UCI_CQI,      /*!< Only CQI (periodic) report */
1691    TFU_UCI_HARQ_CQI, /*!< HARQ and CQI together */
1692    TFU_UCI_HARQ_SR   /*!< HARQ and SR together */
1693 } TfuUciType;
1694
1695 /** @enum TfuHqRecpReqType
1696  * This enum contains values for types of HARQ Reception Request.
1697  */
1698 typedef enum
1699 {
1700    TFU_HQ_RECP_REQ_NORMAL,
1701    TFU_HQ_RECP_REQ_N1PUCCH
1702 } TfuHqRecpReqType;
1703
1704
1705
1706  /** @brief This structure is sent from Scheduler to PHY in order to request the
1707   * reception of an UE's data on PUCCH. This may contain the following: 
1708   * -# HARQ-ACK 
1709   * -# Scheduling Request (SR)
1710   * -# HARQ-ACK and SR
1711   * -# CQI
1712   * -# CQI and HARQ-ACK
1713   */
1714 typedef struct tfuUePucchRecpReq
1715 {
1716     
1717    TfuHqRecpReqType   hqType;   /*!< Type of HARQ Reception Request */
1718    union
1719    {
1720 /** @name TFU_TDD */
1721 /** @{ */
1722 #ifndef TFU_TDD
1723       U16    nCce;            /*!< Number of first CCE used for transmission of
1724                                 the corresponding DCI assignment. Used to decode
1725                                 HARQ-ACK. */
1726 #else
1727       U16             nCce[TFU_MAX_M];   /*!< nCCE is an array in the case of TDD
1728                                            HARQ ACK multiplexing. This value is
1729                                            needed for the calculation of 
1730                                            (n^1 PUCCH,i) for i = {0,1,2,3} */
1731 #endif
1732 /** @} */
1733       U16                 n1Pucch;  /*!< n1 PUCCH for ACK NACK repetition. 
1734                                               This is the resource that UE must
1735                                               transmit the HARQ Feedback except
1736                                               the first one. */
1737    }t;
1738   TfuUciType      type;      /*!< Type of Uplink control information - value
1739                                 must be one of the following: 
1740                                  -# TFU_UCI_SR
1741                                  -# TFU_UCI_HARQ
1742                                  -# TFU_UCI_CQI
1743                                  -# TFU_UCI_HARQ_CQI
1744                                  -# TFU_UCI_HARQ_SR
1745                                 */
1746 /** @name TFU_TDD  */
1747 /** @{ */
1748 #ifdef TFU_TDD
1749    U8             multCnt;       /*!< Number of ACK/NACK resources present */
1750    U8             M;             /*!< Number of elements in the set K - tb.
1751                                    10.1-1 213 */
1752    U8             m[TFU_MAX_M];  /*!< Values utilized for TDD HARQ-ACK bundling
1753                                    mode */
1754    U8             p[TFU_MAX_M];  /*!< "p" from 10.1 in 213 */
1755 #endif
1756 /** @} */
1757 } TfuUePucchRecpReq;
1758
1759
1760 /** @enum TfuRecpReqType
1761  * This enum contains values for types of Reception Request.
1762  */
1763 typedef enum
1764 {
1765    TFU_RECP_REQ_PUCCH,
1766    TFU_RECP_REQ_MSG3,
1767    TFU_RECP_REQ_PUSCH
1768 } TfuRecpReqType;
1769
1770
1771  /** @brief This structure is sent from scheduler to PHY in order to request the
1772   * reception of UEs data sent as MSG3 for Random access.
1773   */
1774 typedef struct tfuUeMsg3RecpReq
1775 {  
1776    Bool                 hoppingEnbld; /*!< TRUE, if hopping is enabled */
1777    U8                   rbStart;      /*!< Start of Resource Block of allocation */
1778    U8                   numRb;        /*!< Number of RBs allocated */
1779    U8                   mcs;          /*!< 3 bits for MCS */
1780    Bool                 expCqi;       /*!< TRUE, if CQI report along
1781                                         with PUSCH data is expected */
1782    Bool                 ulDelay;      /*!< UL Delay bit 6.2 of 213 */
1783    /* tfu_x_001.main_2: Presently not used, it is useful when
1784     * Non-adaptive retransmission is implemented */
1785    Bool                 isRtx;        /*!< TRUE, if this is a Msg3 retransmission */
1786    /*ccpu00128993 - ADD - fix for msg3 softcombining bug*/
1787    U8                   harqProcId;   /*!< HARQ process ID */
1788    Bool                 ndi;          /*!< 1 bit for new data indicator */
1789    U8                   rv;           /*!< Redundancy version */
1790    U8                   nDmrs;        /*!< 3 bits for DMRS cyclic shift */   
1791    /* tfu_x_001.main_2:107387:To include the size and ModOrder in DataRecp Request */
1792    U16                  size;         /*!< Length of the Data in bytes */
1793    TfuModScheme         modType;      /*!< Modulation order */
1794 } TfuUeMsg3RecpReq;
1795
1796  /** @brief This structure is sent from scheduler to PHY in order to request the
1797   * reception of UEs data on PUSCH. This may contain the following: 
1798   * -# Data
1799   * -# Data + CQI and RI
1800   * -# Data + CQI and HARQ
1801   */
1802 typedef struct tfuUePuschRecpReq
1803 {  
1804    Bool                 hoppingEnbld; /*!< TRUE, if hopping is enabled */
1805    U8                   hoppingBits;  /*!< Hopping bits as mentioned in 213 8.4 */
1806    U8                   rbStart;      /*!< Start of Resource Block of allocation */
1807    U8                   numRb;        /*!< Number of RBs allocated */
1808    U8                   mcs;          /*!< 5 bits for MCS and RV */
1809    U8                   harqProcId;   /*!< HARQ process ID */
1810    Bool                 ndi;          /*!< 1 bit for new data indicator */
1811    Bool                 isRtx;        /*!< TRUE, if this is a retransmission */
1812    U8                   rv;           /*!< Redundancy version */
1813    U8                   nDmrs;        /*!< 3 bits for DMRS cyclic shift */
1814    Bool                 expCqi;       /*!< TRUE, if CQI report along
1815                                         with PUSCH data is expected */
1816    Bool                 expHarq;      /*!< TRUE, if HARQ feedback along
1817                                         with PUSCH data is expected */
1818    TfuDlCqiPuschMode    mode;         /*!< CQI reporting mode configured. Note
1819                                         this value is valid, only if expCqi is
1820                                         TRUE. */
1821    /* tfu_x_001.main_2:107387:To include the size and ModOrder in DataRecp Req.*/
1822    U16                  size;         /*!< Length of the Data in bytes*/
1823    TfuModScheme         modType;      /*!< Modulation order */
1824 } TfuUePuschRecpReq;
1825
1826 /** @brief This structure is a Per UE reception request for either PUCCH or PUSCH
1827  * data. This contains information needed by PHY to decode the data sent by the
1828  * UE. 
1829  */
1830 typedef struct tfuUeRecpReqInfo
1831 {
1832    CmLList         lnk;                /*!< Link of Linked List */
1833    CmLteRnti       rnti;               /*!< RNTI of the scheduled UE */
1834    TfuRecpReqType  type;               /*!< Type indicating PUCCH or MSG3 or PUSCH */
1835    union 
1836    {
1837       TfuUePucchRecpReq    pucchRecpReq;  /*!< Reception request for PUCCH Data */
1838       TfuUeMsg3RecpReq     msg3RecpReq;   /*!< Reception request for PUCCH Data */
1839       TfuUePuschRecpReq    puschRecpReq;  /*!< Reception request for PUSCH Data */
1840    }t;
1841 } TfuUeRecpReqInfo;
1842
1843 #endif /* TFU_UPGRADE */
1844
1845 /** @brief This structure contains CQI information received over PUCCH or PUSCH.
1846  */
1847 typedef union tfuDlCqiInfo
1848 {
1849    TfuDlCqiPucch          pucchCqi;      /*!< PUCCH CQI information */
1850    struct {
1851       U8                  numOfCells;
1852       TfuDlCqiPusch       puschCqi[CM_LTE_MAX_CELLS]; /*!< PUSCH CQI information */
1853    }pusch;
1854 } TfuDlCqiInfo;
1855
1856 /** @brief This structure is sent from Scheduler to PHY. This includes parameters
1857  * needed by PHY to decode the following: 
1858  * -# DATA on PUSCH
1859  * -# HARQ Feedback on PUCCH
1860  * -# CQI Report 
1861  * -# RI Report
1862  * -# SR Indications
1863  * This structure carries the reception information for all the scheduled UEs.
1864  */
1865 typedef struct tfuRecpReqInfo
1866 {
1867    CmMemListCp       memCp;         /*!< Memory control point */
1868    CmLteCellId       cellId;        /*!< Cell ID */
1869    CmLteTimingInfo   timingInfo;    /*!< Timing information */
1870    CmLListCp         ueRecpReqLst;  /*!< Linked List of reception requests
1871                                       TfuUeRecpReqInfo */
1872 #ifdef EMTC_ENABLE
1873    CmLListCp         emtcUeRecpReqLst;  /*!< Linked List of reception requests
1874                                       TfuUeRecpReqInfo */
1875 #endif
1876    /*tfu_x_001.main_8 - ADD - New Pucch RR Info Combination support */
1877    /*ccpu00116923 - ADD - SRS present support*/
1878 #ifdef TFU_UPGRADE   
1879    Bool                srsPres;       /*!< SRS present information (For Cell
1880                                         Specific SRS notification)
1881                                       0: No SRS in this subframe
1882                                       1: SRS present in this subframe */
1883 #endif
1884 } TfuRecpReqInfo;
1885
1886  /** @brief This structure contains the PDCCH to be sent on PHY, that is, DCI
1887   * formats. This information is associated with an RNTI. 
1888   */
1889  typedef struct tfuPdcchInfo
1890 {
1891    CmLList           lnk;             /*!< Link of Linked List */
1892    CmLteRnti         rnti;            /*!< RNTI of the allocation */
1893 #ifdef LTEMAC_SPS
1894    Bool              isSpsRnti;       /*!< TRUE if rnti is SPS RNTI */
1895    CmLteRnti         crnti;           /*!< crnti in case rnti is SPS RNTI */
1896 #endif
1897    U16               nCce;            /*!< CCE index */
1898    CmLteAggrLvl      aggrLvl;         /*!< Aggregation level possible values are
1899                                         {1, 2, ...,8}. */
1900    U8                dciNumOfBits;    /*!< The size of DCI in bits */
1901    TfuDciInfo        dci;             /*!< PDCCH DCI format */
1902 #ifdef EMTC_ENABLE
1903         U8                                      distributedAlloc;
1904         U8                                              localizedAntPortIndex;
1905         U16                                     dmrs_txpowerControl; 
1906         U8                                              nRBxm;
1907         U8                                      startRB;
1908         U32                                     scramblerInit;
1909         U32                                     demodRSInitValue;
1910 #endif
1911 #ifdef TFU_5GTF
1912    U8               sectorId;        /* Sector index of the 5GNB. Value: 0->2 */
1913    U8               sccIdx;          /* Serving Cell index in the given sector. Value: 0->7 */
1914    U8               grpId;           /* Ue group Id */
1915 #endif
1916 } TfuPdcchInfo;
1917
1918 /** @brief This structure contains one PHICH information. In order to locate the
1919  * resources to be used for PHICH, the following information is provided along
1920  * with the feedback:
1921  * -# rbStart
1922  * -# nDmrs
1923  * -# iPhich
1924  * -# txPower
1925  * */
1926 typedef struct tfuPhichInfo
1927 {
1928    CmLList           lnk;          /*!< Link of Linked List */
1929    U8                rbStart;      /*!< Starting RB */
1930    U8                nDmrs;        /*!< DMRS offset index */
1931    Bool              isAck;        /*!< TRUE, if ACK, else NACK */
1932    Bool              isForMsg3;
1933 #ifdef TFU_TDD
1934    U8                     iPhich;        /*!< Needed to Calculate PHICH
1935                                            location. For TDD only */
1936 #endif
1937 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
1938 #ifdef TFU_UPGRADE
1939    U16                    txPower;        /*!< Offset to the ref. signal power */
1940 #endif
1941 } TfuPhichInfo;
1942
1943 /** @brief This structure is sent from Scheduler to PHY. This includes all the
1944  * control information to be sent to the UE. 
1945  * -# PDCCH Physical Downlink Control Channel
1946  * -# PHICH Physical HARQ Indicator Channel
1947  * -# PCFICH Physical Control Format Indicator Channel
1948  */
1949 typedef struct tfuCntrlReqInfo
1950 {
1951    CmMemListCp       memCp;         /*!< Memory control point */
1952    CmLteCellId       cellId;        /*!< Cell ID */
1953    CmLteTimingInfo   ulTiming;      /*!< Timing information for UL PDCCHs and PHICH */
1954    CmLteTimingInfo   dlTiming;      /*!< Timing information for DL PDCCHs and CFI */
1955    U8                cfi;           /*!< CFI value that goes on the PCFICH control channel */
1956    U32               numDlActvUes;  /*!< Active Ues reqrd for rgu dyna delta*/
1957    CmLListCp         ulPdcchLst;    /*!< List of Uplink PDCCHs (DCI format 0) for the TfuPdcchInfo subframe */
1958    CmLListCp         dlPdcchLst;    /*!< List of Downlink PDCCHs for the TfuPdcchInfo subframe */
1959    CmLListCp         phichLst;      /*!< List of PHICHs for the TfuPhichInfo subframe */
1960 #ifdef LTEMAC_SPS /* SPS_NEW_CHGS */
1961    Bool              isSPSOcc;      /*!< TRUE if this is an SPS Occasion */
1962 #endif
1963 #ifdef EMTC_ENABLE
1964    CmLListCp         ulMpdcchLst;    /*!< List of Uplink PDCCHs (DCI format 0) for the TfuPdcchInfo subframe */
1965    CmLListCp         dlMpdcchLst;    /*!< List of Downlink PDCCHs for the TfuPdcchInfo subframe */
1966 #endif
1967
1968 } TfuCntrlReqInfo;
1969
1970  /** @brief This structure carries the control information that is needed
1971   * by the Physical layer to process the data to be sent on PDSCH. 
1972   */
1973 typedef struct tfuPdschDciInfo
1974 {   
1975    TfuDciFormat               format;            /*!< Selector for the union*/   
1976    union
1977    {
1978       TfuDciFormat1AllocInfo  format1AllocInfo;  /*!< Format 1 allocation information.*/
1979       TfuDciFormat1aAllocInfo format1aAllocInfo; /*!< Format 1A allocation information.*/
1980       TfuDciFormat1bAllocInfo format1bAllocInfo; /*!< Format 1B allocation information.*/
1981       TfuDciFormat1cInfo      format1cAllocInfo; /*!< Format 1C allocation information.*/
1982       TfuDciFormat1dAllocInfo format1dAllocInfo; /*!< Format 1D allocation information.*/
1983       TfuDciFormat2AllocInfo  format2AllocInfo;  /*!< Format 2A allocation information.*/
1984       TfuDciFormat2AAllocInfo format2AAllocInfo; /*!< Format 2AA allocation information.*/
1985 #ifdef EMTC_ENABLE
1986       TfuDciFormat61AllocInfo format61AllocInfo;  /*!< Format 6-1A allocation information.*/
1987       TfuDciFormat62AllocInfo format62AllocInfo;  /*!< Formtat 6-2 allocation information */
1988 #endif
1989 #ifdef TFU_5GTF
1990            TfuDciFormatA1Info      formatA1Info;  /*!< 5GTF: Format A1 information */
1991            TfuDciFormatA2Info      formatA2Info;  /*!< 5GTF: Format A1 information */
1992            TfuDciFormatB1Info      formatB1Info;  /*!< 5GTF: Format B1 information */
1993            TfuDciFormatB2Info      formatB2Info;  /*!< 5GTF: Format B2 information */
1994 #endif
1995    } u;
1996 } TfuPdschDciInfo;
1997
1998 /** 
1999  * UE Transmission Modes */
2000 typedef enum tfuTxMode
2001 {
2002    TFU_UE_TM_1 = 1,    /** Transmission Mode 1 */
2003    TFU_UE_TM_2,        /** Transmission Mode 2 */
2004    TFU_UE_TM_3,        /** Transmission Mode 3 */
2005    TFU_UE_TM_4,        /** Transmission Mode 4 */
2006    TFU_UE_TM_5,        /** Transmission Mode 5 */
2007    TFU_UE_TM_6,        /** Transmission Mode 6 */
2008    TFU_UE_TM_7         /** Transmission Mode 7 */
2009 } TfuTxMode;
2010
2011 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
2012 #ifdef TFU_UPGRADE
2013  /** @brief This structure carries the Beam Forming Vector Information
2014    * needed by the Physical layer to process the data to be sent on PDSCH. 
2015    */
2016  typedef struct tfuBfVectorInfo
2017  {
2018    U8             sbIndex;    /** Subband Index */
2019    U8             numPhyAnt;  /** Number of Physical Antennas */
2020    U16            bfValue[TFU_MAX_PHY_ANTENNA];  /** Beam forming vector element for 
2021                                       physical antenna #i real 8 bits followed by imaginary 8 bits */ 
2022  }TfuBfVectorInfo;
2023  #endif
2024
2025 #ifdef L2_OPTMZ
2026 /**
2027  * @brief DatReq Information of a logical channel.
2028  */
2029 typedef struct tfuDatReqLchInfo
2030 {
2031    Bool              freeBuff; /* !< If TRUE, the buffer is to be freed by MAC */
2032    U32               numPdu;  /*!< No of PDUs */
2033    Buffer           *mBuf[TFU_MAX_PDU]; /*!<SIncMsgRef in MAC. 
2034                                            Freed by CL as well*/
2035 }TfuDatReqLchInfo;
2036
2037 /** @brief This structure contains a single MAC TB Headers and RLC PDU
2038  *  @details It contains preallocated MAC Header,MAC CEs,logical channel info
2039  *   RLC PDU and pre-allocated padding 
2040  */  
2041 typedef struct tfuDatReqTbInfo
2042 {
2043    Bool             tbPres;
2044    MsgLen           tbSize;
2045    Buffer           *macHdr;  /*!< Pre allocated. CL shall not free this*/
2046    Buffer           *macCes;  /*!< Pre-allocated. CL shall not free this */
2047    U32               padSize;
2048    U32               numLch;  /*!< No of logical channels associated to TB*/ 
2049    TfuDatReqLchInfo  lchInfo[TFU_MAX_LC]; /*!< Array of logical channels */
2050 }TfuDatReqTbInfo;
2051 #endif
2052
2053  /** @brief This structure contains a single MAC TB.
2054   * @details Data is accompanied with control information pertaining to the
2055   * allocation and what is required by physical layer for its processing. 
2056   */
2057 typedef struct tfuDatReqPduInfo
2058 {
2059    CmLList              lnk;                 /*!< Link of Linked List */
2060    CmLteRnti            rnti;                /*!< RNTI of the UE */
2061    TfuPdschDciInfo      dciInfo;             /*!< Carries the control data
2062                                                   needed for processing PDSCH data */
2063    U8                   nmbOfTBs;            /*!< Number of TBs, in cases where
2064                                                   one TB is disabled */
2065 #ifdef FIVEGTF_PHY_API
2066    U16                  crcResult;
2067 #endif
2068 #ifndef L2_OPTMZ
2069    Buffer               *mBuf[TFU_MAX_TB];   /*!< MAC PDUs buffer */
2070 #else
2071    TfuDatReqTbInfo      tbInfo[TFU_MAX_TB];  /*!< Array of TfuDatReqTbInfo*/
2072 #endif
2073    Bool                 puschRptUsd;         /*!< If PUSCH Rpt used for scheduling */
2074    TfuDlCqiPuschInfo    puschPmiInfo;        /*!< Explicitly inform PHY of the
2075                                                   PMI details for the entire 
2076                                                   DL BW */
2077    TfuTxMode            transMode;           /*!< Transmission Mode of this UE */                        
2078    TknU32               doa;                 /*!< DOA indicator for this UE */
2079    Bool                 isTApres;
2080 #ifdef TFU_UPGRADE
2081    /*tfu_x_001.main_8 - ADD - Detailed comments for fields */
2082    U8                   numLayers;           /*!< Number of Layers. Note: Field
2083                                                specified at Interface. Value
2084                                                not set from LTE MAC */
2085    U8                   deltaPowOffIdx;      /*!< Delta power offset. Note:
2086                                                Field specified at Interface. Value
2087                                               not set from LTE MAC */
2088    U8                   numBfPrbPerSb;       /*!< Number of PRBs that are
2089                                                treated as one Subband. Note:
2090                                                Field specified at interface.
2091                                                Value not set from LTE MAC */
2092    U8                   numBfVectors;        /*!< Number of Beam Forming
2093                                                vectors. Note: Field specified at
2094                                               Interface. Value not set from LTE
2095                                               MAC */
2096    TfuBfVectorInfo      bfVector[TFU_MAX_DL_SUBBAND]; /*!< BeamForming vector
2097                                                         information. Note: Field
2098                                                        specified at Interface.
2099                                                        Value not set from LTE
2100                                                        MAC */
2101    U16                  txPwrOffset;          /*!< Offset to the reference 
2102                                                   signal power. Value 0->10000,
2103                                                   representing -6 dB to 4 dB in
2104                                                   0.001 dB steps */      
2105 /* LTE_ADV_FLAG_REMOVED_START */
2106         U8                   pa;                  /*!< ratio of PDSCH EPRE to cell-specific RS 
2107                                                       EPRE among PDSCH REs */
2108 #endif
2109    U8 isEnbSFR;             /*to tell if SFR is enabled*/
2110 } TfuDatReqPduInfo;
2111
2112
2113 /** @brief This structure contains the Data PDUs. 
2114  * @details This structure contains Data meant to be sent on both PBCH and
2115  * PDSCH. Control information necessary for processing of the data is sent along
2116  * with the Data.
2117  */
2118 typedef struct tfuDatReqInfo
2119 {
2120    CmMemListCp          memCp;         /*!< Memory control point */
2121    CmLteCellId          cellId;        /*!< Cell ID */
2122    CmLteTimingInfo      timingInfo;    /*!< Timing information */
2123    TknBuf               bchDat;        /*!< BCCH mapped onto BCH Buffer, if
2124                                             present */
2125 #ifdef EMTC_ENABLE
2126    TknBuf               emtcBcchDat;  /*!< BCCH mapped onto BCH Buffer, if
2127                                             present */
2128 #endif
2129    CmLListCp            pdus;          /*!< Linked List of TfuDatReqPduInfo PDUs */
2130 } TfuDatReqInfo;
2131
2132  /** @brief This structure contains the Data PDU and the RNTI of the UE.
2133   */
2134 typedef struct tfuDatInfo
2135 {
2136    CmLList        lnk;    /*!< Link of Linked List */
2137    CmLteRnti      rnti;   /*!< RNTI of the UE */
2138 #ifdef FIVEGTF_PHY_API
2139    TfuPdcchInfo   *grantInfo; /*!< UL Grant Info */
2140 #endif
2141    Buffer         *mBuf;  /*!< Data PDU */
2142 } TfuDatInfo;
2143
2144 /** @brief This structure contains the Data PDUs received at Physical layer.
2145  * @details All the PDUs received by Physical layer in one subframe are clubbed
2146  * together into a single data structure and sent to MAC for processing. 
2147  */
2148 typedef struct tfuDatIndInfo
2149 {
2150    CmMemListCp          memCp;         /*!< Memory control point */
2151    CmLteCellId          cellId;        /*!< Cell ID */
2152    CmLteTimingInfo      timingInfo;    /*!< Timing information */
2153    CmLListCp            datIndLst;     /*!< List of data PDUs - TfuDatInfo */
2154 #ifdef TFU_5GTF
2155    U8               sectorId;        /* Sector index of the 5GNB. Value: 0->2 */
2156    U8               sccIdx;          /* Serving Cell index in the given sector. Value: 0->7 */
2157 #endif
2158 } TfuDatIndInfo;
2159
2160  /** @brief This structure contains the SR indication for an UE, identified by
2161   * the given RNTI. The structure also contains a PUCCH Delta power, that is
2162   * calculated by the physical layer, and is used by the scheduler for Power
2163   * control of the UE. 
2164   */
2165 typedef struct tfuSrInfo
2166 {
2167    CmLList        lnk;             /*!< Link of Linked List */
2168    CmLteRnti      rnti;            /*!< UEs RNTI */
2169 } TfuSrInfo;
2170
2171  /** @brief This structure contains all the Scheduling Requests (SR) indications
2172   * received in a subframe. 
2173   */
2174 typedef struct tfuSrIndInfo
2175 {
2176    CmMemListCp          memCp;      /*!< Memory control point */
2177    CmLteCellId          cellId;     /*!< Cell ID */
2178    CmLteTimingInfo      timingInfo; /*!< Timing information */
2179    CmLListCp            srLst;      /*!< List of SR indications - TfuSrInfo */
2180 } TfuSrIndInfo;
2181
2182 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
2183 //#ifdef TFU_UPGRADE
2184 /** @enum TfuHqFdbk
2185  * This enum contains the possible values for the HARQ feedback.
2186  */
2187 typedef enum
2188 {  
2189    TFU_HQ_ACK=1,
2190    TFU_HQ_NACK,
2191    TFU_HQ_ACK_OR_NACK,
2192    TFU_HQ_DTX,
2193    TFU_HQ_ACK_OR_DTX,
2194    TFU_HQ_NACK_OR_DTX,
2195    TFU_HQ_ACK_OR_NACK_OR_DTX,
2196    TFU_HQ_INVALID = 255  
2197 } TfuHqFdbk;
2198 //#endif
2199
2200  /** @brief This structure contains the HARQ feedback for a single UE. 
2201   * @details RNTI is present to identify the UE. 
2202   * For FDD, a single feedback is present. 
2203   * For TDD HARQ multiplexing, a list of HARQ feedbacks is present.
2204   */
2205 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
2206 typedef struct tfuHqInfo
2207 {
2208    CmLList                lnk;           /*!< Link of Linked List */
2209    CmLteRnti              rnti;          /*!< RNTI of the UE */
2210    TfuAckNackMode         hqFdbkMode;    /*!< Feedback mode */  
2211    U8                     noOfTbs;       /*!< Number of TBs */
2212 #ifdef TFU_TDD
2213    U8                     M;             /*!< Number of feedbacks multiplexed */
2214 #endif /* TFU_TDD */
2215    TfuHqFdbk              isAck[TFU_MAX_HARQ_FDBKS];  /*!< Harq feedbacks */ 
2216    Bool                   isPusch;       /*!< Indicates if this HARQ feedback is
2217                                               received on PUSCH */
2218                                          /* Note: isPusch is not a field
2219                                           * specified by Femto Forum. */
2220 } TfuHqInfo;
2221
2222  /** @brief This structure contains a list of HARQ feedbacks for a number of UEs.
2223   * @details All the HARQ feedback received in the subframe are clubbed together
2224   * in this data structure and given to the scheduler for processing. 
2225   */
2226 typedef struct tfuHqIndInfo
2227 {
2228    CmMemListCp          memCp;         /*!< Memory control point */
2229    CmLteCellId          cellId;        /*!< Cell ID */
2230    CmLteTimingInfo      timingInfo;    /*!< Timing information */
2231    CmLListCp            hqIndLst;      /*!< List of HARQ feedback - TfuHqInfo */
2232 } TfuHqIndInfo;
2233
2234
2235 /** @brief This structure conveys the Uplink CQI information for a single sub-band. 
2236  */
2237 typedef struct tfuUlCqiInfo
2238 {
2239    TfuSubbandCqiInfo subbandCqi; /*!< CQI associated with a sub-band */
2240 } TfuUlCqiInfo;
2241
2242  /** @brief This structure contains the UL CQI estimated by the physical layer. 
2243   * @details The report can be wide-band CQI or sub-band CQI or both. 
2244   */
2245 typedef struct tfuUlCqiRpt
2246 {
2247    CmLList           lnk;                              /*!< Link of Linked List */
2248    CmLteRnti         rnti;                             /*!< RNTI */
2249    Bool              isTxPort0;                        /*!< TRUE, if TX port is
2250                                                          0, else TX port is 1  */
2251    U8                wideCqi;                          /*!< Wide-band CQI*/
2252    U8                numSubband;                       /*!< Number of sub-bands */
2253    TfuUlCqiInfo      ulCqiInfoArr[TFU_MAX_UL_SUBBAND]; /*!< UL CQI information array */
2254 } TfuUlCqiRpt;
2255
2256 /** @brief This structure conveys the Uplink CQI information.
2257  * @details Uplink CQI is calculated by the physical layer, and this
2258  * information is provided to the scheduler. 
2259  * This data structure clubs together the UL CQI estimates for all the UEs that
2260  * are scheduled in the subframe for uplink transmission. 
2261  */
2262 typedef struct tfuUlCqiIndInfo
2263 {
2264    CmMemListCp       memCp;         /*!< Memory control point */
2265    CmLteCellId       cellId;        /*!< Cell ID */
2266    CmLteTimingInfo   timingInfo;    /*!< Timing information */
2267    CmLListCp         ulCqiRpt;      /*!< List of UL CQI reports - TfuUlCqiRpt */
2268 } TfuUlCqiIndInfo;
2269
2270  /** @brief This structure contains the DOA estimated by the physical layer. 
2271   * @details DOA for a given UE. 
2272   */
2273 typedef struct tfuDoaRpt
2274 {
2275    CmLList                lnk;           /*!< Link of Linked List */
2276    CmLteRnti              rnti;          /*!< RNTI */
2277    U32                    doa;           /*!< DOA for rnti */
2278 } TfuDoaRpt;
2279
2280 /** @brief This structure conveys the DOA (Direction Of Arrival) indicator.
2281  * @details DOA is calculated by the physical layer, and this
2282  * information is provided to the scheduler. 
2283  * This data structure clubs together the DOAs for all the UEs
2284  * calculated by PHY in this subframe. 
2285  */
2286 typedef struct tfuDoaIndInfo
2287 {
2288    CmMemListCp            memCp;         /*!< Memory control point */
2289    CmLteCellId            cellId;        /*!< Cell ID */
2290    CmLListCp              doaRpt;        /*!< List of DOA reports - TfuDoaRpt */
2291 } TfuDoaIndInfo;
2292 /** @} */
2293  /** @brief This structure contains the DL CQI report for a single UE. 
2294   * @details The report can either be described on PUCCH or PUSCH, a flag
2295   * conveys this information. 
2296   */
2297 typedef struct tfuDlCqiRpt
2298 {
2299    CmLList           lnk;         /*!< Link of Linked List */
2300    CmLteRnti         rnti;        /*!< RNTI */
2301    Bool              isPucchInfo; /*!< Indicates whether PUCCH or PUSCH information */
2302    TfuDlCqiInfo      dlCqiInfo;   /*!< DL CQI information */
2303 } TfuDlCqiRpt;
2304
2305 /** @brief This structure contains a list of Downlink CQI reports transmitted by
2306  * UEs. 
2307  * @details This structure clubs together DL CQI reports for a number of UEs. 
2308  */
2309 typedef struct tfuDlCqiIndInfo
2310 {
2311    CmMemListCp       memCp;            /*!< Memory control point */
2312    CmLteCellId       cellId;           /*!< Cell ID */
2313    CmLteTimingInfo   timingInfo;       /*!< Timing information */
2314    CmLListCp         dlCqiRptsLst;     /*!< List of DL CQI reports TfuDlCqiRpt */
2315 } TfuDlCqiIndInfo;
2316
2317  /** @brief This structure contains the CRC indication for a single
2318   * UE. 
2319   */
2320 typedef struct tfuCrcInfo
2321 {
2322    CmLList           lnk;         /*!< Link of Linked List */
2323    CmLteRnti         rnti;        /*!< RNTI of the UE */
2324    Bool              isFailure;   /*!< TRUE, if CRC check fails */
2325    TknU8             rv;          /*!< Redundancy version provided by PHY */
2326    Bool              isDtx;       /*! If SNR < 0 , set to TRUE */
2327 } TfuCrcInfo;
2328
2329 /** @brief This structure contains information that is passed as a part of the
2330  * CRC Indication from PHY to MAC.
2331  * @details This structure clubs together all the CRC indications for
2332  * a single subframe and conveys this information to the scheduler. 
2333  */
2334 typedef struct tfuCrcIndInfo
2335 {
2336    CmMemListCp       memCp;         /*!< Memory control point */
2337    CmLteCellId       cellId;        /*!< Cell ID */
2338    CmLteTimingInfo   timingInfo;    /*!< Timing information */
2339    CmLListCp         crcLst;        /*!< List of CRC indications - TfuCrcInfo */
2340 #ifdef TFU_5GTF
2341    U8               sectorId;        /* Sector index of the 5GNB. Value: 0->2 */
2342    U8               sccIdx;          /* Serving Cell index in the given sector. Value: 0->7 */
2343 #endif
2344 } TfuCrcIndInfo;
2345
2346  /** @brief This structure contains the timing advance information for a single
2347   * UE. 
2348   */
2349  typedef struct tfuTimingAdvInfo
2350 {
2351    CmLList           lnk;         /*!< Link of Linked List */
2352    CmLteRnti         rnti;        /*!< RNTI */
2353    U8                timingAdv;   /*!< Value of the Timing advance */
2354 } TfuTimingAdvInfo;
2355
2356
2357 /** @brief This structure contains information that is passed as part of the Timing
2358  * Advance indication from PHY to MAC.
2359  * @details This structure clubs together timing advances for a number of UEs.
2360  * 
2361  */
2362 typedef struct tfuTimingAdvIndInfo
2363 {
2364    CmMemListCp       memCp;         /*!< Memory control point */
2365    CmLteCellId       cellId;        /*!< Cell ID */
2366    CmLteTimingInfo   timingInfo;    /*!< Timing information */
2367    CmLListCp         timingAdvLst;  /*!< List of timing advances - TfuTimingAdvInfo */
2368 } TfuTimingAdvIndInfo;
2369
2370 /** @brief This structure contains information that is passed as part of the TTI
2371  * indication sent from CL to MAC and SCH.
2372  */
2373 typedef struct tfuTtiCellInfo
2374 {
2375    CmLteCellId      cellId;       /*!< Cell ID */
2376    CmLteTimingInfo  timingInfo;   /*!< SFN, SF for each cell */
2377    Bool             isDummyTti;   /*!< Flag to indicate dummy TTI */                       
2378    /* 4UE_TTI_DELTA */             
2379    U8               schTickDelta; /*!< Dynamic Delta for SCH. Value will vary
2380                                        according to num of active UEs */                
2381    U8               dlBlankSf;    /*!< TODO */  
2382    U8               ulBlankSf;    /*!< TODO */        
2383
2384 } TfuTtiCellInfo;
2385
2386 /** @brief This structure contains information that is passed as part of the TTI
2387  * indication sent from CL to MAC and SCH.
2388  */
2389 typedef struct tfuTtiIndInfo
2390 {
2391    U8             numCells;                /*!< Num of Cells */
2392    TfuTtiCellInfo cells[CM_LTE_MAX_CELLS]; /*!< Array of Cell timing info */ 
2393
2394 } TfuTtiIndInfo;
2395
2396 /** @brief This structure contains the information for a single Random Access Request.
2397  * @details The information present in this structure is for a single preamble.
2398  * Associated with each preamble are fields that the physical layer calculates
2399  * based on the reception of the Random Access Request. These are the following:
2400  * -# Timing Advance
2401  * -# TPC
2402  * -# CQI (optional)
2403  */
2404 typedef struct tfuRaReqInfo
2405 {
2406    U8           rapId;     /*!< ID of the preamble choosen by the UE for Random Acess.*/
2407    U16          ta;        /*!< Amount of Timing advance needed by the UE for it
2408                              to be uplink synchronized, this is calculated by Physical layer. */
2409    U8           tpc;       /*!< Transmit power control command that the physical
2410                             layer calculates from the RA request received.*/ 
2411    Bool         cqiPres;   /*!< TRUE, if CQI present. */
2412    U8           cqiIdx;    /*!< This is the Channel Quality Index of the UL channel estimated by the
2413                               physical layer. This aids MAC in the scheduling of this UE. */
2414
2415 } TfuRaReqInfo;
2416
2417  /** @brief This structure contains RACH request information for a single RA-RNTI.
2418   */
2419 typedef struct tfuRachInfo
2420 {
2421    CmLteRnti       raRnti;       /*!< RA-RNTI */
2422    U8              numRaReqInfo; /*!< Number of RA requests */
2423 #ifdef PRACH_5GTF
2424    U8              nPreambleFormat;
2425    U8              nPRACHConfiguration;
2426    U8              nRootSeq;
2427    U8              nCyclicShift;
2428    U8              nf1Value;
2429    U8              nPRACHSymbIndex;
2430    U16             nPwrFactor;
2431 #endif
2432    TfuRaReqInfo    *raReqInfoArr; /*!< RA requests */
2433 } TfuRachInfo;
2434
2435 /** @brief This structure contains the list of Random Access Requests received in a single TTI.
2436  * @details Random Access Request is associated with a RA-RNTI, which remains
2437  * common for all the random access requests within a subframe. This structure
2438  * thus carries the RA-RNTI and a list of Random Access Request information.
2439  * This information consists of the following: 
2440  * -# preamble-id - this corresponds to the Index of the Preamble choosen by the
2441  * UE.
2442  * -# Timing Advance - this corresponds to the timing adjustment that the UE
2443  * needs to be uplink synchronized. This value is calculated by physical layer. 
2444  * -# tpc - this is the power control command that the physical layer calculates
2445  * from the received RA request. This value is transmitted in the RA Response
2446  * sent out by MAC.
2447  * -# CQI - this is the Channel Quality Index of the UL channel estimated by the
2448  * physical layer. This aids MAC in the scheduling of this UE.
2449  */
2450 typedef struct tfuRaReqIndInfo
2451 {
2452    CmMemListCp     memCp;         /*!< Memory control point */
2453    CmLteCellId     cellId;        /*!< Cell ID */
2454    CmLteTimingInfo timingInfo;    /*!< Timing information */
2455    U8              nmbOfRaRnti;   /*!< Number of RA-RNTIs present for FDD this
2456                                     must be 1 for TDD, it can be a max of 6.  */
2457    TfuRachInfo     *rachInfoArr;   /*!< Array of
2458                                          RACH information per
2459                                          RA-RNTI */
2460 } TfuRaReqIndInfo;
2461
2462 /** @brief This structure contains PUCCH Delta power for a single UE.
2463  */
2464 typedef struct tfuPucchDeltaPwr
2465 {
2466    CmLList         lnk;           /*!< Link of Linked List */
2467    CmLteRnti       rnti;          /*!< Memory control */
2468    S8              pucchDeltaPwr; /*!< PUCCH delta power to be sent by PHY. */
2469 } TfuPucchDeltaPwr;
2470
2471 /** @brief This structure contains information that is passed as part of the
2472  * PUCCH Delta power indication from PHY to SCH.
2473  * @details This structure clubs together PUCCH Delta power values for a number
2474  * of UEs.
2475  */
2476 typedef struct tfuPucchDeltaPwrIndInfo
2477 {
2478    CmMemListCp       memCp;         /*!< Memory control point */
2479    CmLteCellId       cellId;        /*!< Cell ID */
2480    CmLteTimingInfo   timingInfo;    /*!< Timing information */
2481    CmLListCp         pucchDeltaPwrLst;  /*!< List of PUCCH Delta power
2482                                         TfuPucchDeltaPwr */
2483 } TfuPucchDeltaPwrIndInfo; /* TODO renamed this from Del -> Delta. not changed tfu.c */
2484
2485  /** @brief LAA:This structure contains the cell Id and subframe information for
2486   * which the transmission failed. 
2487   */
2488 typedef struct tfuErrIndInfo
2489 {
2490    CmLteCellId          cellId;        /*!< Cell ID */
2491    CmLteTimingInfo      timingInfo;    /*!< Timing information */
2492 } TfuErrIndInfo;
2493
2494 #ifdef L2_OPTMZ
2495 /** @brief :This structure contains the cell Id and UeId to inform CL
2496   * to delete datReq if it exists in CL but UeId got changed or similar other
2497   * scenarios.These scenarios are possible only when L2_OPTMZ flag is enabled.
2498   */
2499 typedef struct tfuDelDatReqInfo
2500 {
2501    CmLteCellId          cellId;        /*!< Cell ID */
2502    CmLteRnti            ueId;         /*!< CRNTI of the UE */
2503 } TfuDelDatReqInfo;
2504 #endif
2505
2506 typedef struct slotIndInfo
2507 {
2508    U16 sfn;
2509    U16 slot;
2510 }SlotIndInfo;
2511
2512 typedef struct rachPreamInfo
2513 {
2514    uint8_t   preamIdx;
2515    uint16_t  timingAdv;
2516 }RachPreamInfo;
2517
2518 typedef struct rachPduInfo
2519 {
2520    uint16_t   pci;
2521    uint8_t    symbolIdx;
2522    uint8_t    slotIdx;
2523    uint8_t    freqIdx;
2524    uint8_t    numPream;
2525    RachPreamInfo   preamInfo[MAX_PREAM_PER_SLOT];
2526 }RachPduInfo;
2527
2528 typedef struct rachInd
2529 {
2530   SlotIndInfo   timingInfo;
2531   uint8_t       numPdu;
2532   RachPduInfo   rachPdu[MAX_RACH_PDU_PER_SLOT];
2533 }RachInd;
2534
2535 typedef struct crcInfo
2536 {
2537     uint32_t   handle;
2538     uint16_t   rnti;
2539     uint8_t    harqId;
2540     uint8_t    tbCrcStatus;
2541     uint16_t   numCb;
2542     uint8_t    cbCrcStatus[MAX_CB_PER_TTI_IN_BYTES];
2543     uint8_t    ul_cqi;
2544     uint16_t   timingAdvance;
2545     uint16_t   rssi;
2546 }CrcInfo;
2547
2548 typedef struct crcInd
2549 {
2550    SlotIndInfo   timingInfo;
2551    uint16_t      numCrc;
2552    CrcInfo       crcInfo[MAX_CRCS_PER_SLOT];
2553 }CrcInd;
2554
2555 typedef struct 
2556 {
2557    uint32_t      handle;
2558    uint16_t      rnti;
2559    uint8_t       harqId;
2560    uint16_t      pduLength;
2561    uint8_t       ul_cqi;
2562    uint16_t      timingAdvance;
2563    uint16_t      rssi;
2564    uint8_t       *pduData;
2565 }RxDataIndPdu;
2566  
2567 typedef struct 
2568 {
2569    SlotIndInfo   timingInfo;
2570    uint16_t      numPdus;
2571    RxDataIndPdu  pdus[MAX_ULSCH_PDUS_PER_TTI];
2572 }RxDataInd;
2573
2574
2575 typedef S16 (*TfuBndReq) ARGS((
2576    Pst*                 pst,
2577    SuId                 suId,
2578    SpId                 spId));
2579 typedef S16 (*TfuBndCfm) ARGS((
2580    Pst*                 pst,
2581    SuId                 suId,
2582    U8                   status));
2583 typedef S16 (*TfuUbndReq) ARGS((
2584    Pst*                 pst,
2585    SpId                 spId,
2586    Reason               reason));
2587
2588 typedef S16 (*TfuSchBndReq) ARGS((
2589    Pst*                 pst,
2590    SuId                 suId,
2591    SpId                 spId));
2592 typedef S16 (*TfuSchBndCfm) ARGS((
2593    Pst*                 pst,
2594    SuId                 suId,
2595    U8                   status));
2596 typedef S16 (*TfuSchUbndReq) ARGS((
2597    Pst*                 pst,
2598    SpId                 spId,
2599    Reason               reason));
2600
2601 typedef S16 (*TfuRaReqInd) ARGS((
2602    Pst *                pst,
2603    SuId                 suId,
2604    TfuRaReqIndInfo      *raReqInd));
2605
2606 typedef S16 (*TfuRecpReq) ARGS((
2607    Pst *                pst,
2608    SpId                 spId,
2609    TfuRecpReqInfo   *recpReq));
2610
2611 typedef S16 (*TfuUlCqiInd) ARGS((
2612    Pst *                pst,
2613    SuId                 suId,
2614    TfuUlCqiIndInfo *    ulCqiInd));
2615
2616 typedef S16 (*TfuDoaInd) ARGS((
2617    Pst *                pst,
2618    SuId                 suId,
2619    TfuDoaIndInfo *      doaInd));
2620 typedef S16 (*TfuHqInd) ARGS((
2621    Pst *                pst,
2622    SuId                 suId,
2623    TfuHqIndInfo *  hqInd));
2624
2625 typedef S16 (*TfuSrInd) ARGS((
2626    Pst *                pst,
2627    SuId                 suId,
2628    TfuSrIndInfo *       srInd));
2629
2630 typedef S16 (*TfuDlCqiInd) ARGS((
2631    Pst *                pst,
2632    SuId                 suId,
2633    TfuDlCqiIndInfo *    dlCqiInd));
2634 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
2635 #ifdef TFU_UPGRADE
2636 typedef S16 (*TfuRawCqiInd) ARGS((
2637          Pst               *pst,
2638          SuId              suId,
2639          TfuRawCqiIndInfo  *rawCqiInd));
2640          
2641 typedef S16 (*TfuSrsInd) ARGS((
2642          Pst               *pst,
2643          SuId              suId,
2644          TfuSrsIndInfo     *srsInd));
2645 #endif /* TFU_UPGRADE */ 
2646
2647 typedef S16 (*TfuDatInd) ARGS((
2648    Pst *                pst,
2649    SuId                 suId,
2650    TfuDatIndInfo *      datInd));
2651
2652 typedef S16 (*TfuCrcInd) ARGS((
2653    Pst *                pst,
2654    SuId                 suId,
2655    TfuCrcIndInfo *  crcInd));
2656
2657 typedef S16 (*TfuTimingAdvInd) ARGS((
2658    Pst *                pst,
2659    SuId                 suId,
2660    TfuTimingAdvIndInfo * timingAdvInd));
2661
2662 typedef S16 (*TfuDatReq) ARGS((
2663    Pst *                pst,
2664    SpId                 spId,
2665    TfuDatReqInfo *      datReq));
2666
2667 #ifdef L2_OPTMZ   
2668 typedef S16 (*TfuDelDatReq) ARGS((
2669    Pst *                pst,
2670    SpId                 spId,
2671    TfuDelDatReqInfo *      datReq));
2672 #endif
2673
2674 typedef S16 (*TfuCntrlReq) ARGS((
2675          Pst                  *pst,
2676          SpId                 spId,
2677          TfuCntrlReqInfo      *cntrlReq));
2678 /* CA dev Start */
2679 typedef S16 (*TfuTtiCell) ARGS((
2680    Pst *                pst,
2681    SuId                 suId,
2682    TfuTtiCellInfo *      ttiInd));
2683 /* CA dev End */
2684 typedef S16 (*TfuTtiInd) ARGS((
2685    Pst *                pst,
2686    SlotIndInfo *      slotInd));
2687
2688 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
2689 typedef S16 (*TfuNonRtInd) ARGS((
2690    Pst *                pst,
2691    SuId                 suId));
2692 #endif
2693
2694 typedef S16 (*TfuSchTtiInd) ARGS((
2695    Pst *                pst,
2696 //   SuId                 suId,
2697    SlotIndInfo*         slotInd));
2698
2699 typedef S16 (*TfuPucchDeltaPwrInd) ARGS((
2700    Pst *                pst,
2701    SuId                 suId,
2702    TfuPucchDeltaPwrIndInfo *  pucchDeltaPwr));
2703
2704 /*LAA: Error Indication on LAA SCell*/
2705 typedef S16 (*TfuErrInd) ARGS((
2706    Pst *                pst,
2707    SuId                 suId,
2708    TfuErrIndInfo *  errInd));
2709
2710 /** @brief This API is used to send a Bind Request from MAC to PHY.
2711  * @param pst Pointer to the post structure.
2712  * @param suId SAP ID of the service user.
2713  * @param spId SAP ID of the service provider.
2714  * @return ROK/RFAILED
2715  */
2716 EXTERN S16 TfUiTfuBndReq ARGS((Pst *pst, SuId suId, SpId spId));
2717
2718 /** @brief This API is used to send a Bind Request from Scheduler to PHY.
2719  * @param pst Pointer to the post structure.
2720  * @param suId SAP ID of the service user.
2721  * @param spId SAP ID of the service provider.
2722  * @return ROK/RFAILED
2723  */
2724 EXTERN S16 TfUiTfuSchBndReq ARGS((Pst *pst, SuId suId, SpId spId));
2725
2726
2727 /** @brief This API is used to receive a Bind Confirm from PHY to MAC.
2728  * @param pst Pointer to the post structure.
2729  * @param suId SAP ID of the service user.
2730  * @param status Status of the bind request.
2731  * @return ROK/RFAILED
2732  */
2733 EXTERN S16 TfUiTfuBndCfm ARGS((Pst *pst, SuId suId, U8 status));
2734
2735 /** @brief This API is used to receive a Bind Confirm from PHY to Scheduler.
2736  * @param pst Pointer to the post structure.
2737  * @param suId SAP ID of the service user.
2738  * @param status Status of the bind request.
2739  * @return ROK/RFAILED
2740  */
2741 EXTERN S16 TfUiTfuSchBndCfm ARGS((Pst *pst, SuId suId, U8 status));
2742
2743
2744 /** @brief This API is used to send an Unbind Request from MAC to PHY.
2745  * @param pst Pointer to the post structure.
2746  * @param spId SAP ID of the service provider.
2747  * @param reason Reason for Unbind request.
2748  * @return ROK/RFAILED
2749  */
2750 EXTERN S16 TfUiTfuUbndReq ARGS((Pst *pst, SpId spId, Reason reason));
2751
2752 /** @brief This API is used to send an Unbind Request from Scheduler to PHY.
2753  * @param pst Pointer to the post structure.
2754  * @param spId SAP ID of the service provider.
2755  * @param reason Reason for Unbind request.
2756  * @return ROK/RFAILED
2757  */
2758 EXTERN S16 TfUiTfuSchUbndReq ARGS((Pst *pst, SpId spId, Reason reason));
2759
2760
2761 /** @brief This API is used to indication Random Access Request reception from
2762  * PHY to Scheduler.
2763  * @details This primitive is used by physical layer to indicate the reception
2764  * of a Random Access Request from a set of UEs. The information passed consists
2765  * of the RA-RNTI and the list of preambles received. 
2766  * @param pst Pointer to the post structure.
2767  * @param suId SAP ID of the service user.
2768  * @param raReqInd Pointer to the TfuRaReqIndInfo structure.
2769  * @return ROK/RFAILED
2770  */
2771 EXTERN S16 TfUiTfuRaReqInd ARGS((Pst *pst, SuId suId, TfuRaReqIndInfo 
2772          *raReqInd));
2773
2774
2775 /** @brief This primitive is sent from Scheduler to PHY.
2776  * @details This primitive provides PHY with all the information required by 
2777  * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
2778  * -# On PUCCH, UE can transmit the following:
2779  *    -# SR
2780  *    -# HARQ feedback
2781  *    -# CQI report
2782  *    -# HARQ + CQI
2783  *    -# HARQ + SR
2784  * -# On PUSCH, UE can transmit the following:
2785  *    -# Data
2786  *    -# Data + CQI
2787  *    -# Data + HARQ Feedback
2788  * This primitive carries all the information for the expected subframe for all
2789  * the UEs that are scheduled to transmit.
2790  * @param pst Pointer to the post structure.
2791  * @param spId SAP ID of the service provider.
2792  * @param recpReq Pointer to the TfuRecpReqInfo structure.
2793  * @return ROK/RFAILED
2794  */
2795 EXTERN S16 TfUiTfuRecpReq ARGS((Pst *pst, SpId spId, TfuRecpReqInfo *recpReq));
2796
2797  /** @brief This primitive is sent from Scheduler to PHY. It provides PHY with
2798   * all the control information.
2799   * @details This primitive carries the information sent on the following
2800   * channels: 
2801   * -# PDCCH
2802   * -# PHICH
2803   * -# PCFICH
2804   * 
2805   * @param pst
2806   * @param spId
2807   * @param cntrlReq pointer to TfuCntrlReqInfo
2808   * @return ROK/RFAILED
2809   */
2810 EXTERN S16 TfUiTfuCntrlReq ARGS((Pst *pst, SpId spId, TfuCntrlReqInfo *cntrlReq));
2811
2812  /** @brief This primitive carries the Data PDUs from MAC to PHY for transmission. 
2813   * @details The data being sent in this primitive is meant to be transmitted on
2814   * the downlink channel PDSCH and PBCH (if present). To facilitate physical
2815   * layer processing, requisite control information is also sent along with the
2816   * data. 
2817   * @sa TfUiTfuCntrlReq
2818   * @param pst 
2819   * @param spId
2820   * @param datReq pointer to TfuDatReqInfo
2821   * @return 
2822   */
2823 EXTERN S16 TfUiTfuDatReq ARGS((Pst *pst, SpId spId, TfuDatReqInfo *datReq));
2824
2825 #ifdef L2_OPTMZ
2826 /** @brief This primitive carries the cellId and UeId for which datReq need to
2827   * deleted in CL. 
2828   * @details This primitive is used to delete datReq PDUs present in CL for
2829   * which got changed or similar other scenarios. These scenarios are possible
2830   * only when L2_OPTMZ flag is enabled.
2831   * @sa TfUiTfuDelDatReq
2832   * @param pst 
2833   * @param spId
2834   * @param datReq pointer to TfuDelDatReqInfo
2835   * @return 
2836   */
2837
2838 EXTERN S16 TfUiTfuDelDatReq ARGS((Pst *pst, SpId spId, TfuDelDatReqInfo *datReq));
2839 #endif
2840
2841 /** @brief This Primitive carries the Data PDUs from PHY to MAC.
2842  * @details The Uplink Data, that is, the data transmitted by the UEs received by the
2843  * physical layer at the eNodeB in the subframe (indicated by the timingInfo),
2844  * is relayed to MAC using this primitive. 
2845  * @param pst 
2846  * @param suId
2847  * @param datInd pointer to TfuDatIndInfo
2848  * @return 
2849  */
2850 EXTERN S16 TfUiTfuDatInd ARGS((Pst *pst, SuId suId, TfuDatIndInfo *datInd));
2851
2852 /** @brief This primitive carries the HARQ Feedback from PHY to Scheduler.
2853  * @details HARQ feedback is sent by the UE to the eNodeB, an ACK is sent if UE
2854  * can successfully recieve the data transmitted by the eNodeB, else a NACK is
2855  * sent. This feedback is utilized by MAC for further scheduling, for instance
2856  * it can schedule an adaptive retransmission of the same data. 
2857  * @param pst 
2858  * @param suId
2859  * @param hqInd pointer to TfuHqIndInfo
2860  * @return 
2861  */
2862 EXTERN S16 TfUiTfuHqInd ARGS((Pst *pst, SuId suId, TfuHqIndInfo *hqInd));
2863
2864 /** @brief This primitive carries the SR Indication from PHY to Scheduler. 
2865  * @details Scheduling Request (SR) is sent by the UE to the eNodeB to request
2866  * for Uplink (UL) grant. This primitive carries a list of SRs for a number of
2867  * UEs received in the indicated subframe. 
2868  * @param pst 
2869  * @param suId
2870  * @param srInd pointer to TfuSrIndInfo
2871  * @return 
2872  */
2873 EXTERN S16 TfUiTfuSrInd ARGS((Pst *pst, SuId suId, TfuSrIndInfo *srInd));
2874
2875 /** @brief This API is used to indicate CQI reporting from PHY to Scheduler.
2876  * @details This primitive carries an estimate of the Uplink Channel Quality
2877  * Index (CQI) for a list of UEs. This is an estimate of the uplink channel
2878  * quality, that is, the transmission from UE as calculated at the Physical layer at
2879  * the eNodeB. 
2880  * It carries a list of sub-band CQIs for each UE. 
2881  * @param pst Pointer to the post structure.
2882  * @param suId SAP ID of the service user.
2883  * @param ulCqiInd Pointer to the TfuUlCqiIndInfo structure.
2884  * @return ROK/RFAILED
2885  */
2886 EXTERN S16 TfUiTfuUlCqiInd ARGS((Pst *pst, SuId suId, 
2887          TfuUlCqiIndInfo *ulCqiInd));
2888
2889 /** @brief This API is used by the Physical layer to indicate if the CRC Check
2890  * on the PUSCH Data is successful or not.
2891  * @details This primitive carries CRC indication for a list of UEs. This
2892  * is utilized in the scenario where MAC requested the reception of Uplink data
2893  * for a particular UE. On reception of the PUSCH data, the CRC check on it
2894  * failed. This CRC failure is indicated to MAC, which utillizes this
2895  * information for further scheduling. 
2896  * Physical layer indicates failure or success for each PUSCH transmission.
2897  * @param pst Pointer to the post structure.
2898  * @param suId SAP ID of the service user.
2899  * @param crcIndInfo Pointer to the TfuCrcIndInfo.
2900  * @return ROK/RFAILED
2901  */
2902 EXTERN S16 TfUiTfuCrcInd ARGS((Pst *pst, SuId suId, 
2903          TfuCrcIndInfo *crcIndInfo));
2904
2905 /** @brief This API is used to indicate a Timing Advance from PHY to Scheduler.
2906  * @details This primitive carries timing advance information for a number of
2907  * UEs that may need timing advance. Timing advance information is an estimate
2908  * of the timing adjustment that an UE needs to apply in order to be
2909  * synchronized in Uplink. This estimate is to be calculated by physical layer. 
2910  * @param pst Pointer to the post structure.
2911  * @param suId SAP ID of the service user.
2912  * @param timingAdvInd Pointer to the TfuTimingAdvIndInfo structure.
2913  * @return ROK/RFAILED
2914  */
2915 EXTERN S16 TfUiTfuTimingAdvInd ARGS((Pst *pst, SuId suId, 
2916          TfuTimingAdvIndInfo *timingAdvInd));
2917
2918 /* CA dev Start */
2919 /** @brief This API is the TTI indication from CL to MAC and SCH 
2920  * @details This primitive provides the timing information (SFN and subframe)
2921  * which is currently running on the physical layer. 
2922  * @param pst Pointer to the post structure.
2923  * @param suId SAP ID of the service user.
2924  * @param ttiInd Pointer to the TfuTtiCellInfo structure.
2925  * @return ROK/RFAILED
2926  */
2927 EXTERN S16 TfUiTfuTtiCell ARGS((Pst *pst, SuId suId, 
2928          TfuTtiCellInfo *ttiInd));
2929 /* CA dev End */
2930
2931 /** @brief This API is the TTI indication from CL to MAC and SCH 
2932  * @details This primitive provides the timing information (SFN and subframe)
2933  * which is currently running on the physical layer. 
2934  * @param pst Pointer to the post structure.
2935  * @param suId SAP ID of the service user.
2936  * @param ttiInd Pointer to the TfuTtiIndInfo structure.
2937  * @return ROK/RFAILED
2938  */
2939 EXTERN S16 TfUiTfuTtiInd ARGS((Pst *pst, SuId suId, 
2940          TfuTtiIndInfo *ttiInd));
2941
2942 /** @brief This API is the TTI indication from PHY to Scheduler. 
2943  * @details This primitive provides the timing information (SFN and subframe)
2944  * which is currently running on the physical layer. 
2945  * @param pst Pointer to the post structure.
2946  * @param suId SAP ID of the service user.
2947  * @param ttiInd Pointer to the TfuTtiIndInfo structure.
2948  * @return ROK/RFAILED
2949  */
2950 EXTERN S16 TfUiTfuSchTtiInd ARGS((Pst *pst, SuId suId, 
2951          TfuTtiIndInfo *ttiInd));
2952
2953
2954 /** @brief This API is used to indicate the reception of CQI report from PHY to
2955  * Scheduler and also carries the Rank Index information.
2956  * @details This primitive carries the CQI (Channel Quality Index) report
2957  * for the downlink channel, sent by the UE. It is also used to report RI and
2958  * PMI.
2959  * @param pst Pointer to the post structure.
2960  * @param suId SAP ID of the service user.
2961  * @param dlCqiInd Pointer to the TfuDlCqiIndInfo structure.
2962  * @return ROK/RFAILED
2963  */
2964 EXTERN S16 TfUiTfuDlCqiInd ARGS((Pst *pst, SuId suId, 
2965          TfuDlCqiIndInfo *dlCqiInd));
2966 /** @brief This API is used to indicate the calculated DOA value report from PHY to
2967  * Scheduler.
2968  * @details This primitive carries the DOA(Direction of arrival) report
2969  * calculated at PHYSICAL LAYER, for an UE.
2970  * @param pst Pointer to the post structure.
2971  * @param suId SAP ID of the service user.
2972  * @param doaInd Pointer to the TfuDoaIndInfo structure.
2973  * @return ROK/RFAILED
2974  */
2975 EXTERN S16 TfUiTfuDoaInd ARGS((Pst *pst, SuId suId, 
2976          TfuDoaIndInfo *doaInd));
2977
2978
2979 /** @brief This primitive is used to convey PUCCH Delta Power calculated by the
2980  * Physical layer.
2981  * @details This primitive is used to convey PUCCH Delta Power calculated by the
2982  * Physical layer. This information is utilized by the scheduler to perform
2983  * power control for the UEs.
2984  * @param pst Pointer to the post structure.
2985  * @param suId SAP ID of the service user.
2986  * @param pucchDeltaPwr Pointer to the TfuPucchDeltaPwrIndInfo structure.
2987  * @return ROK/RFAILED
2988  */
2989 EXTERN S16 TfUiTfuPucchDeltaPwrInd ARGS((Pst *pst, SuId suId, 
2990          TfuPucchDeltaPwrIndInfo *pucchDeltaPwr));
2991
2992 /** @brief LAA:This primitive carries the Error Indication from PHY to Scheduler.
2993  * This primitive is invoked when the transmission on the unlicensed Scell
2994  * fails. 
2995  * @param pst 
2996  * @param suId
2997  * @param errInd pointer to TfuErrIndInfo
2998  * @return 
2999  */
3000
3001 EXTERN S16 TfUiTfuErrInd ARGS((Pst *pst, SuId suId, 
3002          TfuErrIndInfo *errInd));
3003 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
3004 #ifdef TFU_UPGRADE
3005
3006 /** @brief This primitive is used to convey the information derived by the
3007  * physical layer from the SRS transmission from the UE.
3008  * @details This primitive carries information derived from the SRS transmission
3009  * from the UE. 
3010  * 
3011  * @param pst Pointer to the post structure.
3012  * @param suId SAP ID of the service user.
3013  * @param  srsInd Pointer to the TfuSrIndInfo structure.
3014  * @return ROK/RFAILED
3015  */
3016 EXTERN S16 TfUiTfuSrsInd ARGS((Pst *pst, SuId suId, 
3017          TfuSrsIndInfo *srsInd));
3018
3019
3020 /** @brief This primitive is used to convey the Raw CQI information 
3021  * transmitted by the UE.
3022  * @details Raw CQI report is the actual bits transmitted by the UE when
3023  * reporting CQI/PMI/RI. The interpretation of these bits to CQI/sub-band CQI
3024  * and so on, are done by MAC.
3025  * 
3026  * @param pst Pointer to the post structure.
3027  * @param suId SAP ID of the service user.
3028  * @param  cqiInd Pointer to the TfuRawCqiIndInfo structure.
3029  * @return ROK/RFAILED
3030  */
3031 EXTERN S16 TfUiTfuRawCqiInd ARGS((Pst *pst, SuId suId, 
3032          TfuRawCqiIndInfo *cqiInd));
3033
3034 #endif /* TFU_UPGRADE */
3035
3036 #ifdef RG
3037 EXTERN S16 RgLiTfuBndReq ARGS((
3038    Pst*                 pst,
3039    SuId                 suId,
3040    SpId                 spId
3041 ));
3042 EXTERN S16 RgLiTfuBndCfm ARGS((
3043    Pst*                 pst,
3044    SuId                 suId,
3045    U8                   status
3046 ));
3047 EXTERN S16 RgLiTfuUbndReq ARGS((
3048    Pst*                 pst,
3049    SpId                 spId,
3050    Reason               reason
3051 ));
3052
3053 EXTERN S16 RgLiTfuSchBndReq ARGS((
3054    Pst*                 pst,
3055    SuId                 suId,
3056    SpId                 spId
3057 ));
3058 EXTERN S16 RgLiTfuSchBndCfm ARGS((
3059    Pst*                 pst,
3060    SuId                 suId,
3061    U8                   status
3062 ));
3063 EXTERN S16 RgLiTfuSchUbndReq ARGS((
3064    Pst*                 pst,
3065    SpId                 spId,
3066    Reason               reason
3067 ));
3068
3069 EXTERN S16 RgLiTfuRaReqInd ARGS((
3070    Pst *                pst,
3071    SpId                 spId,
3072    TfuRaReqIndInfo *  raReq
3073 ));
3074
3075
3076 EXTERN S16 RgLiTfuRecpReq ARGS((
3077    Pst *                pst,
3078    SpId                 spId,
3079    TfuRecpReqInfo *  recpReq
3080 ));
3081
3082 EXTERN S16 RgLiTfuUlCqiInd ARGS((
3083    Pst *                pst,
3084    SuId                 suId,
3085    TfuUlCqiIndInfo *    ulCqiInd
3086 ));
3087
3088 EXTERN S16 RgLiTfuDoaInd ARGS((
3089    Pst *                pst,
3090    SuId                 suId,
3091    TfuDoaIndInfo *      doaInd
3092 ));
3093
3094 EXTERN S16 RgLiTfuHqInd ARGS((
3095    Pst *                pst,
3096    SuId                 suId,
3097    TfuHqIndInfo *  hqInd
3098 ));
3099
3100 EXTERN S16 RgLiTfuSrInd ARGS((
3101    Pst *                pst,
3102    SuId                 suId,
3103    TfuSrIndInfo *       srInd
3104 ));
3105
3106 EXTERN S16 RgLiTfuDlCqiInd ARGS((
3107    Pst *                pst,
3108    SuId                 suId,
3109    TfuDlCqiIndInfo *    dlCqiInd
3110 ));
3111
3112 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
3113 #ifdef TFU_UPGRADE
3114 EXTERN S16 RgLiTfuRawCqiInd ARGS((
3115          Pst            *pst,
3116          SuId           suId,
3117          TfuRawCqiIndInfo  *rawCqiInd
3118          ));  
3119 EXTERN S16 RgLiTfuSrsInd ARGS((
3120          Pst            *pst,
3121          SuId           suId,
3122          TfuSrsIndInfo  *srsIndInfo
3123          ));  
3124 #endif
3125 EXTERN S16 RgLiTfuDatInd ARGS((
3126    Pst *                pst,
3127    SuId                 suId,
3128    TfuDatIndInfo *      datInd
3129 ));
3130
3131 EXTERN S16 fapiMacSlotInd 
3132 (
3133 Pst                 *pst, 
3134 SlotIndInfo         *slotInd
3135 );
3136
3137 EXTERN S16 RgLiTfuCrcInd ARGS((
3138    Pst *                pst,
3139    SuId                 suId,
3140    TfuCrcIndInfo *  crcInd
3141 ));
3142
3143 EXTERN S16 RgLiTfuTimingAdvInd ARGS((
3144    Pst *                pst,
3145    SuId                 suId,
3146    TfuTimingAdvIndInfo * timingAdvInd
3147 ));
3148
3149 EXTERN S16 RgLiTfuDatReq ARGS((
3150    Pst *                pst,
3151    SpId                 spId,
3152    TfuDatReqInfo *      datReq
3153 ));
3154
3155 EXTERN S16 RgLiTfuCntrlReq ARGS((
3156    Pst *                pst,
3157    SpId                 spId,
3158    TfuCntrlReqInfo *    cntrlReq
3159 ));
3160
3161 EXTERN S16 RgLiTfuTtiInd ARGS((
3162    Pst *                pst,
3163    SuId                 suId,
3164    TfuTtiIndInfo *      ttiInd
3165 ));
3166
3167 EXTERN int macSchSlotInd ARGS((
3168    Pst *                pst,
3169    SlotIndInfo *        slotInd
3170 ));
3171
3172 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
3173 EXTERN S16 RgLiTfuNonRtInd ARGS((
3174    Pst *                pst,
3175    SuId                 suId
3176 ));
3177 #endif
3178
3179 EXTERN S16 RgLiTfuPucchDeltaPwrInd ARGS((
3180    Pst *                   pst,
3181    SuId                    suId,
3182    TfuPucchDeltaPwrIndInfo   *pucchDeltaPwr
3183    ));
3184 #endif
3185
3186 /** @brief LAA:This primitive carries the Error Indication from PHY to Scheduler.
3187  * This primitive is invoked when the transmission on the unlicensed Scell
3188  * fails. 
3189  * @param pst 
3190  * @param suId
3191  * @param errInd pointer to TfuErrIndInfo
3192  * @return 
3193  */
3194 EXTERN S16 RgLiTfuErrInd ARGS((Pst *pst, SuId suId, TfuErrIndInfo *errInd));
3195
3196 #ifdef L2_OPTMZ
3197 /** @brief This primitive carries the cellId and UeId for which datReq need to
3198   * deleted in CL. 
3199   * @details This primitive is used to delete datReq PDUs present in CL for
3200   * which got changed or similar other scenarios. These scenarios are possible
3201   * only when L2_OPTMZ flag is enabled.
3202   * @sa TfUiTfuDelDatReq
3203   * @param pst 
3204   * @param spId
3205   * @param datReq pointer to TfuDelDatReqInfo
3206   * @return 
3207   */
3208 EXTERN S16 RgLiTfuDelDatReq ARGS((Pst *pst, SuId suId, TfuDelDatReqInfo *delDatReq));
3209 #endif
3210
3211 #if (defined(LCTFU))
3212 /** @brief This API is used to send a Bind Request from MAC to PHY.
3213  */
3214 #ifdef TFU_5GTF
3215 EXTERN S16 cmPkTfuRbAssignA1Val324 ARGS((
3216 TfuRbAssignA1Val324 *param,
3217 Buffer *mBuf
3218 ));
3219 EXTERN S16 cmPkTfuRbAssignB1Val324 ARGS((
3220 TfuRbAssignB1Val324 *param,
3221 Buffer *mBuf
3222 ));
3223 EXTERN S16 cmPkTfuRbAssignVal326 ARGS((
3224 TfuRbAssignVal326 *param,
3225 Buffer *mBuf
3226 ));
3227 EXTERN S16 cmUnpkTfuRbAssignA1Val324 ARGS((
3228 TfuRbAssignA1Val324 *param,
3229 Buffer *mBuf
3230 ));
3231 EXTERN S16 cmUnpkTfuRbAssignB1Val324 ARGS((
3232 TfuRbAssignB1Val324 *param,
3233 Buffer *mBuf
3234 ));
3235 EXTERN S16 cmUnpkTfuRbAssignVal326 ARGS((
3236 TfuRbAssignVal326 *param,
3237 Buffer *mBuf
3238 ));
3239 EXTERN S16 cmPkTfuDciFormatA1A2Info ARGS((
3240 TfuDciFormatA1Info *param,
3241 Buffer *mBuf
3242 ));
3243 EXTERN S16 cmPkTfuDciFormatB1B2Info ARGS((
3244 TfuDciFormatB1Info *param,
3245 Buffer *mBuf
3246 ));
3247 EXTERN S16 cmUnpkTfuDciFormatA1A2Info ARGS((
3248 TfuDciFormatA1Info *param,
3249 Buffer *mBuf
3250 ));
3251 EXTERN S16 cmUnpkTfuDciFormatB1B2Info ARGS((
3252 TfuDciFormatB1Info *param,
3253 Buffer *mBuf
3254 ));
3255 #endif /* TFU_5GTF */
3256
3257 EXTERN S16 cmPkTfuBndReq ARGS((
3258    Pst*                 pst,
3259    SuId                 suId,
3260    SpId                 spId
3261 ));
3262 /** @brief This API is used to send a Bind Request from MAC to PHY.
3263  */
3264 EXTERN S16 cmUnpkTfuBndReq ARGS((
3265    TfuBndReq            func,
3266    Pst*                 pst,
3267    Buffer               *mBuf
3268 ));
3269 /** @brief This API is used to receive a Bind Confirm from PHY to MAC.
3270  */
3271 EXTERN S16 cmPkTfuBndCfm ARGS((
3272    Pst*                 pst,
3273    SuId                 suId,
3274    U8                   status
3275 ));
3276 /** @brief This API is used to receive a Bind Confirm from PHY to MAC.
3277  */
3278 EXTERN S16 cmUnpkTfuBndCfm ARGS((
3279    TfuBndCfm            func,
3280    Pst*                 pst,
3281    Buffer               *mBuf
3282 ));
3283 /** @brief This API is used to send an Unbind Request from MAC to PHY.
3284  */
3285 EXTERN S16 cmPkTfuUbndReq ARGS((
3286    Pst*                 pst,
3287    SpId                 spId,
3288    Reason               reason
3289 ));
3290 /** @brief This API is used to send an Unbind Request from MAC to PHY.
3291  */
3292 EXTERN S16 cmUnpkTfuUbndReq ARGS((
3293    TfuUbndReq           func,
3294    Pst*                 pst,
3295    Buffer               *mBuf
3296 ));
3297 /** @brief This API is used to send a Bind Request from SCH to PHY.
3298  */
3299 EXTERN S16 cmPkTfuSchBndReq ARGS((
3300    Pst*                 pst,
3301    SuId                 suId,
3302    SpId                 spId
3303 ));
3304 /** @brief This API is used to send a Bind Request from SCH to PHY.
3305  */
3306 EXTERN S16 cmUnpkTfuSchBndReq ARGS((
3307    TfuSchBndReq         func,
3308    Pst*                 pst,
3309    Buffer               *mBuf
3310 ));
3311 /** @brief This API is used to receive a Bind Confirm from PHY to SCH.
3312  */
3313 EXTERN S16 cmPkTfuSchBndCfm ARGS((
3314    Pst*                 pst,
3315    SuId                 suId,
3316    U8                   status
3317 ));
3318 /** @brief This API is used to receive a Bind Confirm from PHY to SCH.
3319  */
3320 EXTERN S16 cmUnpkTfuSchBndCfm ARGS((
3321    TfuSchBndCfm         func,
3322    Pst*                 pst,
3323    Buffer               *mBuf
3324 ));
3325 /** @brief This API is used to send an Unbind Request from SCH to PHY.
3326  */
3327 EXTERN S16 cmPkTfuSchUbndReq ARGS((
3328    Pst*                 pst,
3329    SpId                 spId,
3330    Reason               reason
3331 ));
3332 /** @brief This API is used to send an Unbind Request from SCH to PHY.
3333  */
3334 EXTERN S16 cmUnpkTfuSchUbndReq ARGS((
3335    TfuSchUbndReq        func,
3336    Pst*                 pst,
3337    Buffer               *mBuf
3338 ));
3339 /** @brief This API is used to indication Random Access Request reception from
3340  * PHY to MAC.
3341  */
3342 EXTERN S16 cmPkTfuRaReqInd ARGS((
3343    Pst *                pst,
3344    SuId                 suId,
3345    TfuRaReqIndInfo *    raReqInd
3346 ));
3347 /** @brief This API is used to indication Random Access Request reception from
3348  * PHY to MAC.
3349  */
3350 EXTERN S16 cmUnpkTfuRaReqInd ARGS((
3351    TfuRaReqInd          func,
3352    Pst *                pst,
3353    Buffer               *mBuf
3354 ));
3355 /** @brief This API is used to indication Random Access Request reception from
3356  * PHY to MAC.
3357  */
3358 EXTERN S16 cmPkTfuRecpReq ARGS((
3359    Pst *                pst,
3360    SpId                 spId,
3361    TfuRecpReqInfo *     recpReq
3362 ));
3363 /** @brief This API is used to indication Random Access Request reception from
3364  * PHY to MAC.
3365  */
3366 EXTERN S16 cmUnpkTfuRecpReq ARGS((
3367    TfuRecpReq           func,
3368    Pst *                pst,
3369    Buffer               *mBuf
3370 ));
3371 /** @brief This API is used to indicate CQI reporting from PHY to MAC.
3372  */
3373 EXTERN S16 cmPkTfuUlCqiInd ARGS((
3374    Pst *                pst,
3375    SuId                 suId,
3376    TfuUlCqiIndInfo *    ulCqiInd
3377 ));
3378 /** @brief This API is used to indicate CQI reporting from PHY to MAC.
3379  */
3380 EXTERN S16 cmUnpkTfuUlCqiInd ARGS((
3381    TfuUlCqiInd          func,
3382    Pst *                pst,
3383    Buffer               *mBuf
3384 ));
3385
3386 EXTERN S16 cmPkTfuHqInd ARGS((
3387    Pst *                pst,
3388    SuId                 suId,
3389    TfuHqIndInfo *       hqInd
3390 ));
3391
3392 EXTERN S16 cmUnpkTfuHqInd ARGS((
3393    TfuHqInd             func,
3394    Pst *                pst,
3395    Buffer               *mBuf
3396 ));
3397 /** @brief This API is used to indicate a SR reception from PHY to MAC.
3398  */
3399 EXTERN S16 cmPkTfuSrInd ARGS((
3400    Pst *                pst,
3401    SuId                 suId,
3402    TfuSrIndInfo *       srInd
3403 ));
3404 /** @brief This API is used to indicate a SR reception from PHY to MAC.
3405  */
3406 EXTERN S16 cmUnpkTfuSrInd ARGS((
3407    TfuSrInd             func,
3408    Pst *                pst,
3409    Buffer               *mBuf
3410 ));
3411 /** @brief This API is used to indicate the reception of CQI report from PHY to
3412  * MAC.
3413  */
3414 EXTERN S16 cmPkTfuDlCqiInd ARGS((
3415    Pst *                pst,
3416    SuId                 suId,
3417    TfuDlCqiIndInfo *    dlCqiInd
3418 ));
3419 /** @brief This API is used to indicate the reception of CQI report from PHY to
3420  * MAC.
3421  */
3422 EXTERN S16 cmUnpkTfuDlCqiInd ARGS((
3423    TfuDlCqiInd          func,
3424    Pst *                pst,
3425    Buffer               *mBuf
3426 ));
3427
3428 /** @brief This API is used to indicate the Calculated DOA value report from PHY to
3429  * MAC.*/
3430 EXTERN S16 cmUnpkTfuDoaInd ARGS((
3431    TfuDoaInd            func,
3432    Pst *                pst,
3433    Buffer               *mBuf
3434 ));
3435 /** @brief This API is used to indicate the calculated DOA Value report from PHY to
3436  * MAC.
3437  */
3438 EXTERN S16 cmPkTfuDoaInd ARGS((
3439    Pst *                pst,
3440    SuId                 suId,
3441    TfuDoaIndInfo *      doaInd
3442    ));
3443
3444 /** @brief This API is used to indicate Data Reception from PHY to MAC.
3445  */
3446 EXTERN S16 cmPkTfuDatInd ARGS((
3447    Pst *                pst,
3448    SuId                 suId,
3449    TfuDatIndInfo *      datInd
3450 ));
3451 /** @brief This API is used to indicate Data Reception from PHY to MAC.
3452  */
3453 EXTERN S16 cmUnpkTfuDatInd ARGS((
3454    TfuDatInd            func,
3455    Pst *                pst,
3456    Buffer               *mBuf
3457 ));
3458 /** @brief This API is used to indicate Decode failure from PHY to MAC.
3459  */
3460 EXTERN S16 cmPkTfuCrcInd ARGS((
3461    Pst *                pst,
3462    SuId                 suId,
3463    TfuCrcIndInfo *  crcInd
3464 ));
3465 /** @brief This API is used to indicate Decode failure from PHY to MAC.
3466  */
3467 EXTERN S16 cmUnpkTfuCrcInd ARGS((
3468    TfuCrcInd        func,
3469    Pst *                pst,
3470    Buffer               *mBuf
3471 ));
3472
3473 EXTERN S16 cmPkTfuCntrlReq ARGS((
3474    Pst *                pst,
3475    SpId                 spId,
3476    TfuCntrlReqInfo *    cntrlReq
3477 ));
3478
3479 EXTERN S16 cmUnpkTfuCntrlReq ARGS((
3480    TfuCntrlReq          func,
3481    Pst *                pst,
3482    Buffer               *mBuf
3483 ));
3484 /** @brief This API is used to indicate a Timing Advance from PHY to MAC.
3485  */
3486 EXTERN S16 cmPkTfuTimingAdvInd ARGS((
3487    Pst *                pst,
3488    SuId                 suId,
3489    TfuTimingAdvIndInfo * timingAdvInd
3490 ));
3491 /** @brief This API is used to indicate a Timing Advance from PHY to MAC.
3492  */
3493 EXTERN S16 cmUnpkTfuTimingAdvInd ARGS((
3494    TfuTimingAdvInd      func,
3495    Pst *                pst,
3496    Buffer               *mBuf
3497 ));
3498 /** @brief This API is used to send Data Request from MAC to PHY.
3499  */
3500 EXTERN S16 cmPkTfuDatReq ARGS((
3501    Pst *                pst,
3502    SpId                 spId,
3503    TfuDatReqInfo *      datReq
3504 ));
3505 /** @brief This API is used to send Data Request from MAC to PHY.
3506  */
3507 EXTERN S16 cmUnpkTfuDatReq ARGS((
3508    TfuDatReq            func,
3509    Pst *                pst,
3510    Buffer               *mBuf
3511 ));
3512 /* CA dev Start */
3513 /** @brief This API is the TTI indication from CL to MAC and SCH.
3514  */
3515 EXTERN S16 cmPkTfuTtiCell ARGS((
3516    Pst *                pst,
3517    SuId                 suId,
3518    TfuTtiCellInfo *      ttiInd
3519 ));
3520 /** @brief This API is the TTI indication from CL to MAC and SCH.
3521  */
3522 EXTERN S16 cmUnpkTfuTtiCell ARGS((
3523    TfuTtiCell            func,
3524    Pst *                pst,
3525    Buffer               *mBuf
3526 ));
3527 /* CA dev End */
3528
3529 /** @brief This API is the TTI indication from PHY to MAC.
3530  */
3531 EXTERN S16 cmPkTfuTtiInd ARGS((
3532    Pst *                pst,
3533    SuId                 suId,
3534    TfuTtiIndInfo *      ttiInd
3535 ));
3536 /** @brief This API is the TTI indication from PHY to MAC.
3537  */
3538 EXTERN S16 cmUnpackSlotInd ARGS((
3539    TfuTtiInd            func,
3540    Pst *                pst,
3541    Buffer               *mBuf
3542 ));
3543
3544 typedef int (*MacSchSlotIndFunc)     ARGS((                     
3545    Pst         *pst,        /* Post Structure */                         
3546    SlotIndInfo *slotInd     /* slot ind Info */                      
3547 ));
3548
3549 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
3550 /** @brief This API is the non-rt indication from PHY to MAC.
3551   */
3552 EXTERN S16 cmPkTfuNonRtInd ARGS((
3553    Pst *                pst,
3554    SuId                 suId
3555 ));
3556
3557 /** @brief This API is the non-rt indication from PHY to MAC.
3558   */
3559 EXTERN S16 cmUnpkTfuNonRtInd ARGS((
3560    TfuNonRtInd          func,
3561    Pst *                pst,
3562    Buffer               *mBuf
3563 ));
3564 #endif
3565
3566 /** @brief This API is the TTI indication from PHY to SCH.
3567  */
3568 EXTERN S16 cmPkTfuSchTtiInd ARGS((
3569    Pst *                pst,
3570    SuId                 suId,
3571    TfuTtiIndInfo *      ttiInd
3572 ));
3573 /** @brief This API is the TTI indication from PHY to SCH.
3574  */
3575 EXTERN S16 cmUnpackMacSchSlotInd ARGS((
3576    MacSchSlotIndFunc    func,
3577    Pst *                pst,
3578    Buffer               *mBuf
3579 ));
3580
3581 /** @brief This API is used to convey the PUCCH delta power from PHY to SCH.
3582  */
3583 EXTERN S16 cmPkTfuPucchDeltaPwrInd ARGS((
3584    Pst *                pst,
3585    SuId                 suId,
3586    TfuPucchDeltaPwrIndInfo *  pucchDeltaPwr
3587 ));
3588 /** @brief This API is used to indicate Decode failure from PHY to MAC.
3589  */
3590 EXTERN S16 cmUnpkTfuPucchDeltaPwrInd ARGS((
3591    TfuPucchDeltaPwrInd       func,
3592    Pst *                   pst,
3593    Buffer                  *mBuf
3594 ));
3595
3596
3597 #ifdef TFU_PHASE_2
3598 /** @brief This API is used to send Group Power Control Request from MAC to PHY.
3599  */
3600 EXTERN S16 cmPkTfuGrpPwrCntrlReq ARGS((
3601    Pst *                pst,
3602    SpId                 spId,
3603    TfuGrpPwrCntrlReqInfo * grpPwrCntrlReq
3604 ));
3605 /** @brief This API is used to send Group Power Control Request from MAC to PHY.
3606  */
3607 EXTERN S16 cmUnpkTfuGrpPwrCntrlReq ARGS((
3608    TfuGrpPwrCntrlReq    func,
3609    Pst *                pst,
3610    Buffer               *mBuf
3611 ));
3612 #endif
3613 EXTERN S16 cmPkTfuDciFormat0Info ARGS((
3614    TfuDciFormat0Info    *param,
3615    Buffer               *mBuf
3616 ));
3617 EXTERN S16 cmUnpkTfuDciFormat0Info ARGS((
3618    TfuDciFormat0Info    *param,
3619    Buffer               *mBuf
3620 ));
3621 EXTERN S16 cmPkTfuAllocMapOrRiv ARGS((
3622    TfuAllocMapOrRiv     *param,
3623    Buffer               *mBuf
3624 ));
3625 EXTERN S16 cmUnpkTfuAllocMapOrRiv ARGS((
3626    TfuAllocMapOrRiv     *param,
3627    Buffer               *mBuf
3628 ));
3629 EXTERN S16 cmPkTfuDciFormat1AllocInfo ARGS((
3630    TfuDciFormat1AllocInfo *param,
3631    Buffer               *mBuf
3632 ));
3633 EXTERN S16 cmUnpkTfuDciFormat1AllocInfo ARGS((
3634    TfuDciFormat1AllocInfo *param,
3635    Buffer               *mBuf
3636 ));
3637 EXTERN S16 cmPkTfuDciFormat1Info ARGS((
3638    TfuDciFormat1Info    *param,
3639    Buffer               *mBuf
3640 ));
3641 EXTERN S16 cmUnpkTfuDciFormat1Info ARGS((
3642    TfuDciFormat1Info    *param,
3643    Buffer               *mBuf
3644 ));
3645
3646 EXTERN S16 cmPkTfuDciFormatTbInfo ARGS((
3647    TfuDciFormatTbInfo   *param,
3648    Buffer               *mBuf
3649 ));
3650 EXTERN S16 cmUnpkTfuDciFormatTbInfo ARGS((
3651    TfuDciFormatTbInfo   *param,
3652    Buffer               *mBuf
3653 ));
3654 /** @} */
3655 EXTERN S16 cmPkTfuDciFormat2AAllocInfo ARGS((
3656    TfuDciFormat2AAllocInfo *param,
3657    Buffer               *mBuf
3658 ));
3659 EXTERN S16 cmUnpkTfuDciFormat2AAllocInfo ARGS((
3660    TfuDciFormat2AAllocInfo *param,
3661    Buffer               *mBuf
3662 ));
3663 EXTERN S16 cmPkTfuDciFormat2AInfo ARGS((
3664    TfuDciFormat2AInfo   *param,
3665    Buffer               *mBuf
3666 ));
3667 EXTERN S16 cmUnpkTfuDciFormat2AInfo ARGS((
3668    TfuDciFormat2AInfo   *param,
3669    Buffer               *mBuf
3670 ));
3671 EXTERN S16 cmPkTfuDciFormat2AllocInfo ARGS((
3672    TfuDciFormat2AllocInfo *param,
3673    Buffer               *mBuf
3674 ));
3675 EXTERN S16 cmUnpkTfuDciFormat2AllocInfo ARGS((
3676    TfuDciFormat2AllocInfo *param,
3677    Buffer               *mBuf
3678 ));
3679 EXTERN S16 cmPkTfuDciFormat2Info ARGS((
3680    TfuDciFormat2Info    *param,
3681    Buffer               *mBuf
3682 ));
3683 EXTERN S16 cmUnpkTfuDciFormat2Info ARGS((
3684    TfuDciFormat2Info    *param,
3685    Buffer               *mBuf
3686 ));
3687 EXTERN S16 cmPkTfuDciFormat3Info ARGS((
3688    TfuDciFormat3Info    *param,
3689    Buffer               *mBuf
3690 ));
3691 EXTERN S16 cmUnpkTfuDciFormat3Info ARGS((
3692    TfuDciFormat3Info    *param,
3693    Buffer               *mBuf
3694 ));
3695 EXTERN S16 cmPkTfuDciFormat3AInfo ARGS((
3696    TfuDciFormat3AInfo   *param,
3697    Buffer               *mBuf
3698 ));
3699 EXTERN S16 cmUnpkTfuDciFormat3AInfo ARGS((
3700    TfuDciFormat3AInfo   *param,
3701    Buffer               *mBuf
3702 ));
3703 EXTERN S16 cmPkTfuDciFormat1dAllocInfo ARGS((
3704    TfuDciFormat1dAllocInfo *param,
3705    Buffer               *mBuf
3706 ));
3707 EXTERN S16 cmUnpkTfuDciFormat1dAllocInfo ARGS((
3708    TfuDciFormat1dAllocInfo *param,
3709    Buffer               *mBuf
3710 ));
3711 EXTERN S16 cmPkTfuDciFormat1dInfo ARGS((
3712    TfuDciFormat1dInfo   *param,
3713    Buffer               *mBuf
3714 ));
3715 EXTERN S16 cmUnpkTfuDciFormat1dInfo ARGS((
3716    TfuDciFormat1dInfo   *param,
3717    Buffer               *mBuf
3718 ));
3719 EXTERN S16 cmPkTfuDciFormat1cInfo ARGS((
3720    TfuDciFormat1cInfo   *param,
3721    Buffer               *mBuf
3722 ));
3723 EXTERN S16 cmUnpkTfuDciFormat1cInfo ARGS((
3724    TfuDciFormat1cInfo   *param,
3725    Buffer               *mBuf
3726 ));
3727 EXTERN S16 cmPkTfuDciFormat1bAllocInfo ARGS((
3728    TfuDciFormat1bAllocInfo *param,
3729    Buffer               *mBuf
3730 ));
3731 EXTERN S16 cmUnpkTfuDciFormat1bAllocInfo ARGS((
3732    TfuDciFormat1bAllocInfo *param,
3733    Buffer               *mBuf
3734 ));
3735 EXTERN S16 cmPkTfuPdcchOrderInfo ARGS((
3736    TfuPdcchOrderInfo    *param,
3737    Buffer               *mBuf
3738 ));
3739 EXTERN S16 cmUnpkTfuPdcchOrderInfo ARGS((
3740    TfuPdcchOrderInfo    *param,
3741    Buffer               *mBuf
3742 ));
3743 EXTERN S16 cmPkTfuDciFormat1aAllocInfo ARGS((
3744    TfuDciFormat1aAllocInfo *param,
3745    Buffer               *mBuf
3746 ));
3747 EXTERN S16 cmUnpkTfuDciFormat1aAllocInfo ARGS((
3748    TfuDciFormat1aAllocInfo *param,
3749    Buffer               *mBuf
3750 ));
3751 /*tfu_x_001.main_6 - Added for SPS support*/
3752 EXTERN S16 cmPkTfudciformat1aPdsch ARGS((
3753    Tfudciformat1aPdsch  *param,
3754    Buffer               *mBuf
3755 ));
3756 EXTERN S16 cmUnpkTfudciformat1aPdsch ARGS((
3757    Tfudciformat1aPdsch  *param,
3758    Buffer               *mBuf
3759 ));
3760 EXTERN S16 cmPkTfuDciFormat1aInfo ARGS((
3761    TfuDciFormat1aInfo   *param,
3762    Buffer               *mBuf
3763 ));
3764 EXTERN S16 cmUnpkTfuDciFormat1aInfo ARGS((
3765    TfuDciFormat1aInfo   *param,
3766    Buffer               *mBuf
3767 ));
3768 EXTERN S16 cmPkTfuDciFormat1bInfo ARGS((
3769    TfuDciFormat1bInfo   *param,
3770    Buffer               *mBuf
3771 ));
3772 EXTERN S16 cmUnpkTfuDciFormat1bInfo ARGS((
3773    TfuDciFormat1bInfo   *param,
3774    Buffer               *mBuf
3775 ));
3776 EXTERN S16 cmPkTfuDciInfo ARGS((
3777    TfuDciInfo           *param,
3778    Buffer               *mBuf
3779 ));
3780 EXTERN S16 cmUnpkTfuDciInfo ARGS((
3781    TfuDciInfo           *param,
3782    Buffer               *mBuf
3783 ));
3784 EXTERN S16 cmPkTfuSubbandInfo ARGS((
3785    TfuSubbandInfo       *param,
3786    Buffer               *mBuf
3787 ));
3788 EXTERN S16 cmUnpkTfuSubbandInfo ARGS((
3789    TfuSubbandInfo       *param,
3790    Buffer               *mBuf
3791 ));
3792 EXTERN S16 cmPkTfuSubbandDlCqiInfo ARGS((
3793    TfuSubbandDlCqiInfo    *param,
3794    Buffer                 *mBuf
3795 ));
3796 EXTERN S16 cmUnpkTfuSubbandDlCqiInfo ARGS((
3797    TfuSubbandDlCqiInfo    *param,
3798    Buffer                 *mBuf
3799 ));
3800 /** @} */
3801 EXTERN S16 cmPkTfuSubbandCqiInfo ARGS((
3802    TfuSubbandCqiInfo    *param,
3803    Buffer               *mBuf
3804 ));
3805 EXTERN S16 cmUnpkTfuSubbandCqiInfo ARGS((
3806    TfuSubbandCqiInfo    *param,
3807    Buffer               *mBuf
3808 ));
3809 EXTERN S16 cmPkTfuPdcchCceInfo ARGS((
3810    TfuPdcchCceInfo      *param,
3811    Buffer               *mBuf
3812 ));
3813 EXTERN S16 cmUnpkTfuPdcchCceInfo ARGS((
3814    TfuPdcchCceInfo      *param,
3815    Buffer               *mBuf
3816 ));
3817 EXTERN S16 cmPkTfuCqiPucchMode10 ARGS((
3818    TfuCqiPucchMode10    *param,
3819    Buffer               *mBuf
3820 ));
3821 EXTERN S16 cmUnpkTfuCqiPucchMode10 ARGS((
3822    TfuCqiPucchMode10    *param,
3823    Buffer               *mBuf
3824 ));
3825 EXTERN S16 cmPkTfuCqiMode11Cqi ARGS((
3826    TfuCqiMode11Cqi      *param,
3827    Buffer               *mBuf
3828 ));
3829 EXTERN S16 cmUnpkTfuCqiMode11Cqi ARGS((
3830    TfuCqiMode11Cqi      *param,
3831    Buffer               *mBuf
3832 ));
3833 EXTERN S16 cmPkTfuCqiPucchMode11 ARGS((
3834    TfuCqiPucchMode11    *param,
3835    Buffer               *mBuf
3836 ));
3837 EXTERN S16 cmUnpkTfuCqiPucchMode11 ARGS((
3838    TfuCqiPucchMode11    *param,
3839    Buffer               *mBuf
3840 ));
3841 EXTERN S16 cmPkTfuCqiMode20SubCqi ARGS((
3842    TfuCqiMode20SubCqi   *param,
3843    Buffer               *mBuf
3844 ));
3845 EXTERN S16 cmUnpkTfuCqiMode20SubCqi ARGS((
3846    TfuCqiMode20SubCqi   *param,
3847    Buffer               *mBuf
3848 ));
3849 EXTERN S16 cmPkTfuCqiMode20Cqi ARGS((
3850    TfuCqiMode20Cqi      *param,
3851    Buffer               *mBuf
3852 ));
3853 EXTERN S16 cmUnpkTfuCqiMode20Cqi ARGS((
3854    TfuCqiMode20Cqi      *param,
3855    Buffer               *mBuf
3856 ));
3857 EXTERN S16 cmPkTfuCqiPucchMode20 ARGS((
3858    TfuCqiPucchMode20    *param,
3859    Buffer               *mBuf
3860 ));
3861 EXTERN S16 cmUnpkTfuCqiPucchMode20 ARGS((
3862    TfuCqiPucchMode20    *param,
3863    Buffer               *mBuf
3864 ));
3865 EXTERN S16 cmPkTfuCqiMode21SubCqi ARGS((
3866    TfuCqiMode21SubCqi   *param,
3867    Buffer               *mBuf
3868 ));
3869 EXTERN S16 cmUnpkTfuCqiMode21SubCqi ARGS((
3870    TfuCqiMode21SubCqi   *param,
3871    Buffer               *mBuf
3872 ));
3873 EXTERN S16 cmPkTfuCqiMode21WideCqi ARGS((
3874    TfuCqiMode21WideCqi  *param,
3875    Buffer               *mBuf
3876 ));
3877 EXTERN S16 cmUnpkTfuCqiMode21WideCqi ARGS((
3878    TfuCqiMode21WideCqi  *param,
3879    Buffer               *mBuf
3880 ));
3881 EXTERN S16 cmPkTfuCqiMode21Cqi ARGS((
3882    TfuCqiMode21Cqi      *param,
3883    Buffer               *mBuf
3884 ));
3885 EXTERN S16 cmUnpkTfuCqiMode21Cqi ARGS((
3886    TfuCqiMode21Cqi      *param,
3887    Buffer               *mBuf
3888 ));
3889 EXTERN S16 cmPkTfuCqiPucchMode21 ARGS((
3890    TfuCqiPucchMode21    *param,
3891    Buffer               *mBuf
3892 ));
3893 EXTERN S16 cmUnpkTfuCqiPucchMode21 ARGS((
3894    TfuCqiPucchMode21    *param,
3895    Buffer               *mBuf
3896 ));
3897 EXTERN S16 cmPkTfuDlCqiPucch ARGS((
3898    TfuDlCqiPucch        *param,
3899    Buffer               *mBuf
3900 ));
3901 EXTERN S16 cmUnpkTfuDlCqiPucch ARGS((
3902    TfuDlCqiPucch        *param,
3903    Buffer               *mBuf
3904 ));
3905 EXTERN S16 cmPkTfuSubbandMode12 ARGS((
3906    TfuSubbandMode12     *param,
3907    Buffer               *mBuf
3908 ));
3909 EXTERN S16 cmUnpkTfuSubbandMode12 ARGS((
3910    TfuSubbandMode12     *param,
3911    Buffer               *mBuf
3912 ));
3913 EXTERN S16 cmPkTfuCqiPuschMode12 ARGS((
3914    TfuCqiPuschMode12    *param,
3915    Buffer               *mBuf
3916 ));
3917 EXTERN S16 cmUnpkTfuCqiPuschMode12 ARGS((
3918    TfuCqiPuschMode12    *param,
3919    Buffer               *mBuf
3920 ));
3921 EXTERN S16 cmPkTfuCqiPuschMode20 ARGS((
3922    TfuCqiPuschMode20    *param,
3923    Buffer               *mBuf
3924 ));
3925 EXTERN S16 cmUnpkTfuCqiPuschMode20 ARGS((
3926    TfuCqiPuschMode20    *param,
3927    Buffer               *mBuf
3928 ));
3929 EXTERN S16 cmPkTfuCqiPuschMode22 ARGS((
3930    TfuCqiPuschMode22    *param,
3931    Buffer               *mBuf
3932 ));
3933 EXTERN S16 cmUnpkTfuCqiPuschMode22 ARGS((
3934    TfuCqiPuschMode22    *param,
3935    Buffer               *mBuf
3936 ));
3937 EXTERN S16 cmPkTfuSubbandMode30 ARGS((
3938    TfuSubbandMode30     *param,
3939    Buffer               *mBuf
3940 ));
3941 EXTERN S16 cmUnpkTfuSubbandMode30 ARGS((
3942    TfuSubbandMode30     *param,
3943    Buffer               *mBuf
3944 ));
3945 EXTERN S16 cmPkTfuCqiPuschMode30 ARGS((
3946    TfuCqiPuschMode30    *param,
3947    Buffer               *mBuf
3948 ));
3949 EXTERN S16 cmUnpkTfuCqiPuschMode30 ARGS((
3950    TfuCqiPuschMode30    *param,
3951    Buffer               *mBuf
3952 ));
3953 EXTERN S16 cmPkTfuSubbandMode31 ARGS((
3954    TfuSubbandMode31     *param,
3955    Buffer               *mBuf
3956 ));
3957 EXTERN S16 cmUnpkTfuSubbandMode31 ARGS((
3958    TfuSubbandMode31     *param,
3959    Buffer               *mBuf
3960 ));
3961 EXTERN S16 cmPkTfuCqiPuschMode31 ARGS((
3962    TfuCqiPuschMode31    *param,
3963    Buffer               *mBuf
3964 ));
3965 EXTERN S16 cmUnpkTfuCqiPuschMode31 ARGS((
3966    TfuCqiPuschMode31    *param,
3967    Buffer               *mBuf
3968 ));
3969 EXTERN S16 cmPkTfuDlCqiPusch ARGS((
3970    TfuDlCqiPusch        *param,
3971    Buffer               *mBuf
3972 ));
3973 EXTERN S16 cmUnpkTfuDlCqiPusch ARGS((
3974    TfuDlCqiPusch        *param,
3975    Buffer               *mBuf
3976 ));
3977
3978 EXTERN S16 cmPkTfuDlCqiPuschInfo ARGS((
3979    TfuDlCqiPuschInfo    *param,
3980    Buffer               *mBuf
3981 ));
3982 EXTERN S16 cmUnpkTfuDlCqiPuschInfo ARGS((
3983    TfuDlCqiPuschInfo    *param,
3984    Buffer               *mBuf
3985 ));
3986
3987 EXTERN S16 cmPkTfuDoaRpt ARGS((
3988    TfuDoaRpt            *param,
3989    Buffer               *mBuf
3990 ));
3991 EXTERN S16 cmUnpkTfuDoaRpt ARGS((
3992    TfuDoaRpt            *param,
3993    Buffer               *mBuf
3994 ));
3995 EXTERN S16 cmPkTfuDoaIndInfo ARGS((
3996    TfuDoaIndInfo        *param,
3997    Buffer               *mBuf
3998 ));
3999 EXTERN S16 cmUnpkTfuDoaIndInfo ARGS((
4000    TfuDoaIndInfo        *param,
4001    Ptr                  memCp,
4002    Buffer               *mBuf
4003 ));
4004
4005 EXTERN S16 cmPkTfuDlCqiInfo ARGS((
4006    U8                   selector,
4007    TfuDlCqiInfo         *param,
4008    Buffer               *mBuf
4009 ));
4010 EXTERN S16 cmUnpkTfuDlCqiInfo ARGS((
4011    U8                   selector,
4012    TfuDlCqiInfo         *param,
4013    Buffer               *mBuf
4014 ));
4015
4016
4017 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
4018 #ifndef TFU_UPGRADE
4019 EXTERN S16 cmPkTfuUeMsg3RecpReq ARGS((
4020    TfuUeMsg3RecpReq     *param,
4021    Buffer               *mBuf
4022 ));
4023 EXTERN S16 cmUnpkTfuUeMsg3RecpReq ARGS((
4024    TfuUeMsg3RecpReq     *param,
4025    Buffer               *mBuf
4026 ));
4027 #endif
4028
4029
4030 /*tfu_x_001.main_8 - ADD - Prototype for TfuUePuschRecpReq Pk/Unpk functions */
4031 EXTERN S16 cmPkTfuUePuschRecpReq ARGS((
4032    TfuUePuschRecpReq *param,
4033    Buffer               *mBuf
4034 ));
4035 EXTERN S16 cmUnpkTfuUePuschRecpReq ARGS((
4036    TfuUePuschRecpReq *param,
4037    Buffer               *mBuf
4038 ));
4039 EXTERN S16 cmPkTfuUePucchRecpReq ARGS((
4040    TfuUePucchRecpReq *param,
4041    Buffer               *mBuf
4042 ));
4043 EXTERN S16 cmUnpkTfuUePucchRecpReq ARGS((
4044    TfuUePucchRecpReq *param,
4045    Buffer               *mBuf
4046 ));
4047
4048 EXTERN S16 cmPkTfuRecpReqInfo ARGS((
4049    TfuRecpReqInfo       *param,
4050    Buffer               *mBuf
4051 ));
4052 EXTERN S16 cmUnpkTfuRecpReqInfo ARGS((
4053    TfuRecpReqInfo       *param,
4054    Ptr                   memCp,
4055    Buffer               *mBuf
4056 ));
4057 EXTERN S16 cmPkTfuPdcchInfo ARGS((
4058    TfuPdcchInfo         *param,
4059    Buffer               *mBuf
4060 ));
4061 EXTERN S16 cmUnpkTfuPdcchInfo ARGS((
4062    TfuPdcchInfo         *param,
4063    Buffer               *mBuf
4064 ));
4065 EXTERN S16 cmPkTfuPhichInfo ARGS((
4066    TfuPhichInfo         *param,
4067    Buffer               *mBuf
4068 ));
4069 EXTERN S16 cmUnpkTfuPhichInfo ARGS((
4070    TfuPhichInfo         *param,
4071    Buffer               *mBuf
4072 ));
4073 EXTERN S16 cmPkTfuCntrlReqInfo ARGS((
4074    TfuCntrlReqInfo      *param,
4075    Buffer               *mBuf
4076 ));
4077 EXTERN S16 cmUnpkTfuCntrlReqInfo ARGS((
4078    TfuCntrlReqInfo      *param,
4079    Ptr                   memCp,
4080    Buffer               *mBuf
4081 ));
4082 EXTERN S16 cmPkTfuPdschDciInfo ARGS((
4083    TfuPdschDciInfo      *param,
4084    Buffer               *mBuf
4085 ));
4086 EXTERN S16 cmUnpkTfuPdschDciInfo ARGS((
4087    TfuPdschDciInfo      *param,
4088    Buffer               *mBuf
4089 ));
4090 EXTERN S16 cmPkTfuDatReqPduInfo ARGS((
4091    TfuDatReqPduInfo     *param,
4092    Buffer               *mBuf
4093 ));
4094 EXTERN S16 cmUnpkTfuDatReqPduInfo ARGS((
4095    TfuDatReqPduInfo     *param,
4096    Buffer               *mBuf
4097 ));
4098 EXTERN S16 cmPkTfuDatReqInfo ARGS((
4099    TfuDatReqInfo        *param,
4100    Buffer               *mBuf
4101 ));
4102 EXTERN S16 cmUnpkTfuDatReqInfo ARGS((
4103    TfuDatReqInfo        *param,
4104    Ptr                   memCp,
4105    Buffer               *mBuf
4106 ));
4107 EXTERN S16 cmPkTfuDatInfo ARGS((
4108    TfuDatInfo           *param,
4109    Buffer               *mBuf
4110 ));
4111 EXTERN S16 cmUnpkTfuDatInfo ARGS((
4112    TfuDatInfo           *param,
4113    Buffer               *mBuf
4114 ));
4115 EXTERN S16 cmPkTfuDatIndInfo ARGS((
4116    TfuDatIndInfo        *param,
4117    Buffer               *mBuf
4118 ));
4119 EXTERN S16 cmUnpkTfuDatIndInfo ARGS((
4120    TfuDatIndInfo        *param,
4121    Ptr                  memCp,
4122    Buffer               *mBuf
4123 ));
4124 EXTERN S16 cmPkTfuSrInfo ARGS((
4125    TfuSrInfo            *param,
4126    Buffer               *mBuf
4127 ));
4128 EXTERN S16 cmUnpkTfuSrInfo ARGS((
4129    TfuSrInfo            *param,
4130    Buffer               *mBuf
4131 ));
4132 EXTERN S16 cmPkTfuSrIndInfo ARGS((
4133    TfuSrIndInfo         *param,
4134    Buffer               *mBuf
4135 ));
4136 EXTERN S16 cmUnpkTfuSrIndInfo ARGS((
4137    TfuSrIndInfo         *param,
4138    Ptr                  memCp,
4139    Buffer               *mBuf
4140 ));
4141 EXTERN S16 cmPkTfuHqInfo ARGS((
4142    TfuHqInfo            *param,
4143    Buffer               *mBuf
4144 ));
4145 EXTERN S16 cmUnpkTfuHqInfo ARGS((
4146    TfuHqInfo            *param,
4147    Buffer               *mBuf
4148 ));
4149 EXTERN S16 cmPkTfuHqIndInfo ARGS((
4150    TfuHqIndInfo         *param,
4151    Buffer               *mBuf
4152 ));
4153 EXTERN S16 cmUnpkTfuHqIndInfo ARGS((
4154    TfuHqIndInfo         *param,
4155    Ptr                  memCpm,
4156    Buffer               *mBuf
4157 ));
4158 EXTERN S16 cmPkTfuUlCqiInfo ARGS((
4159    TfuUlCqiInfo         *param,
4160    Buffer               *mBuf
4161 ));
4162 EXTERN S16 cmUnpkTfuUlCqiInfo ARGS((
4163    TfuUlCqiInfo         *param,
4164    Buffer               *mBuf
4165 ));
4166 EXTERN S16 cmPkTfuUlCqiRpt ARGS((
4167    TfuUlCqiRpt          *param,
4168    Buffer               *mBuf
4169 ));
4170 EXTERN S16 cmUnpkTfuUlCqiRpt ARGS((
4171    TfuUlCqiRpt          *param,
4172    Buffer               *mBuf
4173 ));
4174 EXTERN S16 cmPkTfuUlCqiIndInfo ARGS((
4175    TfuUlCqiIndInfo      *param,
4176    Buffer               *mBuf
4177 ));
4178 EXTERN S16 cmUnpkTfuUlCqiIndInfo ARGS((
4179    TfuUlCqiIndInfo      *param,
4180    Ptr                  memCp,
4181    Buffer               *mBuf
4182 ));
4183 EXTERN S16 cmPkTfuDlCqiRpt ARGS((
4184    TfuDlCqiRpt          *param,
4185    Buffer               *mBuf
4186 ));
4187 EXTERN S16 cmUnpkTfuDlCqiRpt ARGS((
4188    TfuDlCqiRpt          *param,
4189    Buffer               *mBuf
4190 ));
4191 EXTERN S16 cmPkTfuDlCqiIndInfo ARGS((
4192    TfuDlCqiIndInfo      *param,
4193    Buffer               *mBuf
4194 ));
4195 EXTERN S16 cmUnpkTfuDlCqiIndInfo ARGS((
4196    TfuDlCqiIndInfo      *param,
4197    Ptr                  memCp,
4198    Buffer               *mBuf
4199 ));
4200 EXTERN S16 cmPkTfuPucchDeltaPwr ARGS((
4201    Pst *                pst,
4202    SuId                 suId,
4203    TfuPucchDeltaPwrIndInfo * pucchDeltaPwr));
4204
4205 EXTERN S16 cmPkTfuPucchDeltaPwrInfo ARGS((
4206    TfuPucchDeltaPwr       *param,
4207    Buffer               *mBuf
4208 ));
4209
4210 EXTERN S16 cmUnpkTfuPucchDeltaPwr ARGS((
4211    TfuPucchDeltaPwrInd     func,
4212    Pst *                pst,
4213    Buffer               *mBuf
4214 ));
4215 EXTERN S16 cmUnpkTfuPucchDeltaPwrInfo ARGS((
4216    TfuPucchDeltaPwr     *param,
4217    Buffer               *mBuf
4218 ));
4219
4220 EXTERN S16 cmPkTfuCrcInfo ARGS((
4221    TfuCrcInfo       *param,
4222    Buffer               *mBuf
4223 ));
4224 EXTERN S16 cmUnpkTfuCrcInfo ARGS((
4225    TfuCrcInfo       *param,
4226    Buffer               *mBuf
4227 ));
4228 EXTERN S16 cmPkTfuCrcIndInfo ARGS((
4229    TfuCrcIndInfo    *param,
4230    Buffer               *mBuf
4231 ));
4232 EXTERN S16 cmUnpkTfuCrcIndInfo ARGS((
4233    TfuCrcIndInfo    *param,
4234    Ptr                  memCp,
4235    Buffer               *mBuf
4236 ));
4237
4238 EXTERN S16 cmPkTfuPucchDeltaPwrIndInfo ARGS((
4239    TfuPucchDeltaPwrIndInfo    *param,
4240    Buffer               *mBuf
4241 ));
4242 EXTERN S16 cmUnpkTfuPucchDeltaPwrIndInfo ARGS((
4243    TfuPucchDeltaPwrIndInfo    *param,
4244    Ptr                  memCp,
4245    Buffer               *mBuf
4246 ));
4247 EXTERN S16 cmPkTfuTimingAdvInfo ARGS((
4248    TfuTimingAdvInfo     *param,
4249    Buffer               *mBuf
4250 ));
4251 EXTERN S16 cmUnpkTfuTimingAdvInfo ARGS((
4252    TfuTimingAdvInfo     *param,
4253    Buffer               *mBuf
4254 ));
4255 EXTERN S16 cmPkTfuTimingAdvIndInfo ARGS((
4256    TfuTimingAdvIndInfo  *param,
4257    Buffer               *mBuf
4258 ));
4259 EXTERN S16 cmUnpkTfuTimingAdvIndInfo ARGS((
4260    TfuTimingAdvIndInfo  *param,
4261    Ptr                   memCp,
4262    Buffer               *mBuf
4263 ));
4264 /* CA dev Start */
4265 EXTERN S16 cmPkTfuTtiCellInfo ARGS((
4266    TfuTtiCellInfo       *param,
4267    Buffer               *mBuf
4268 ));
4269 EXTERN S16 cmUnpkTfuTtiCellInfo ARGS((
4270    TfuTtiCellInfo       *param,
4271    Buffer               *mBuf
4272 ));
4273 /* CA dev End */
4274 EXTERN S16 cmPkTfuTtiIndInfo ARGS((
4275    TfuTtiIndInfo        *param,
4276    Buffer               *mBuf
4277 ));
4278 EXTERN S16 cmUnpackSlotIndInfo ARGS((
4279    SlotIndInfo          *param,
4280    Buffer               *mBuf
4281 ));
4282 EXTERN S16 cmPkTfuRaReqInfo ARGS((
4283    TfuRaReqInfo         *param,
4284    Buffer               *mBuf
4285 ));
4286 EXTERN S16 cmUnpkTfuRaReqInfo ARGS((
4287    TfuRaReqInfo         *param,
4288    Buffer               *mBuf
4289 ));
4290 EXTERN S16 cmPkTfuRachInfo ARGS((
4291    CmMemListCp          memCp,
4292    TfuRachInfo          *param,
4293    Buffer               *mBuf
4294 ));
4295 EXTERN S16 cmUnpkTfuRachInfo ARGS((
4296    CmMemListCp          memCp,
4297    TfuRachInfo          *param,
4298    Buffer               *mBuf
4299 ));
4300 EXTERN S16 cmPkTfuRaReqIndInfo ARGS((
4301    TfuRaReqIndInfo      *param,
4302    Buffer               *mBuf
4303 ));
4304 EXTERN S16 cmUnpkTfuRaReqIndInfo ARGS((
4305    TfuRaReqIndInfo      *param,
4306    Buffer               *mBuf
4307 ));
4308 EXTERN S16 cmPkBuffer ARGS((
4309    Buffer **param,
4310    Buffer *mBuf
4311 ));
4312 EXTERN S16 cmUnpkBuffer ARGS((
4313    Buffer **param,
4314    Buffer *mBuf
4315 ));
4316
4317 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
4318 #ifdef TFU_UPGRADE
4319 EXTERN S16 cmPkTfuSrsRpt ARGS((
4320    TfuSrsRpt            *param,
4321    Buffer               *mBuf
4322 ));
4323 EXTERN S16 cmUnpkTfuSrsRpt ARGS((
4324    TfuSrsRpt            *param,
4325    Buffer               *mBuf
4326 ));
4327 EXTERN S16 cmPkTfuSrsIndInfo ARGS((
4328    TfuSrsIndInfo        *param,
4329    Buffer               *mBuf
4330 ));
4331 EXTERN S16 cmUnpkTfuSrsIndInfo ARGS((
4332    TfuSrsIndInfo        *param,
4333    Ptr                  memCp,
4334    Buffer               *mBuf
4335 ));
4336 EXTERN S16 cmPkTfuRawCqiRpt ARGS((
4337    TfuRawCqiRpt         *param,
4338    Buffer               *mBuf
4339 ));
4340 EXTERN S16 cmUnpkTfuRawCqiRpt ARGS((
4341    TfuRawCqiRpt         *param,
4342    Buffer               *mBuf
4343 ));
4344 EXTERN S16 cmPkTfuRawCqiIndInfo ARGS((
4345    TfuRawCqiIndInfo     *param,
4346    Buffer               *mBuf
4347 ));
4348 EXTERN S16 cmUnpkTfuRawCqiIndInfo ARGS((
4349    TfuRawCqiIndInfo     *param,
4350    Ptr                  memCp,
4351    Buffer               *mBuf
4352 ));
4353
4354 #ifdef TFU_TDD
4355
4356 EXTERN S16 cmPkTfuUePucchHqRecpInfo ARGS((
4357    TfuUePucchHqRecpInfo *param,
4358    Buffer               *mBuf
4359 ));
4360 EXTERN S16 cmUnpkTfuUePucchHqRecpInfo ARGS((
4361    TfuUePucchHqRecpInfo *param,
4362    Buffer               *mBuf
4363 ));
4364
4365 #endif
4366
4367 #ifndef TFU_TDD  /* else of TFU_TDD */
4368
4369 EXTERN S16 cmPkTfuUePucchHqRecpInfo ARGS((
4370    TfuUePucchHqRecpInfo *param,
4371    Buffer               *mBuf
4372 ));
4373 EXTERN S16 cmUnpkTfuUePucchHqRecpInfo ARGS((
4374    TfuUePucchHqRecpInfo *param,
4375    Buffer               *mBuf
4376 ));
4377
4378
4379 #endif
4380 EXTERN S16 cmPkTfuUePucchSrRecpInfo ARGS((
4381    TfuUePucchSrRecpInfo *param,
4382    Buffer               *mBuf
4383 ));
4384 EXTERN S16 cmUnpkTfuUePucchSrRecpInfo ARGS((
4385    TfuUePucchSrRecpInfo *param,
4386    Buffer               *mBuf
4387 ));
4388 EXTERN S16 cmPkTfuUePucchCqiRecpInfo ARGS((
4389    TfuUePucchCqiRecpInfo *param,
4390    Buffer               *mBuf
4391 ));
4392 EXTERN S16 cmUnpkTfuUePucchCqiRecpInfo ARGS((
4393    TfuUePucchCqiRecpInfo *param,
4394    Buffer               *mBuf
4395 ));
4396 EXTERN S16 cmPkTfuUePucchSrsRecpInfo ARGS((
4397    TfuUePucchSrsRecpInfo *param,
4398    Buffer               *mBuf
4399 ));
4400 EXTERN S16 cmUnpkTfuUePucchSrsRecpInfo ARGS((
4401    TfuUePucchSrsRecpInfo *param,
4402    Buffer               *mBuf
4403 ));
4404 EXTERN S16 cmPkTfuUeUlSchRecpInfo ARGS((
4405    TfuUeUlSchRecpInfo   *param,
4406    Buffer               *mBuf
4407 ));
4408 EXTERN S16 cmUnpkTfuUeUlSchRecpInfo ARGS((
4409    TfuUeUlSchRecpInfo   *param,
4410    Buffer               *mBuf
4411 ));
4412 EXTERN S16 cmPkTfuUePuschCqiRecpInfo ARGS((
4413    TfuUePuschCqiRecpInfo *param,
4414    Buffer               *mBuf
4415 ));
4416 EXTERN S16 cmUnpkTfuUePuschCqiRecpInfo ARGS((
4417    TfuUePuschCqiRecpInfo *param,
4418    Buffer               *mBuf
4419 ));
4420 EXTERN S16 cmPkTfuUePuschHqRecpInfo ARGS((
4421    TfuUePuschHqRecpInfo *param,
4422    Buffer               *mBuf
4423 ));
4424 EXTERN S16 cmUnpkTfuUePuschHqRecpInfo ARGS((
4425    TfuUePuschHqRecpInfo *param,
4426    Buffer               *mBuf
4427 ));
4428
4429 EXTERN S16 cmPkTfuBfVectorInfo ARGS ((
4430 TfuBfVectorInfo *param,
4431 Buffer *mBuf
4432 ));
4433
4434 EXTERN S16 cmUnpkTfuBfVectorInfo ARGS ((
4435    TfuBfVectorInfo *param,
4436    Buffer *mBuf
4437 ));
4438 #endif /* TFU_UPGRADE */
4439 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
4440 EXTERN S16 cmPkTfuUeRecpReqInfo ARGS((
4441    TfuUeRecpReqInfo *param,
4442    Buffer               *mBuf
4443 ));
4444 EXTERN S16 cmUnpkTfuUeRecpReqInfo ARGS((
4445    TfuUeRecpReqInfo *param,
4446    Buffer               *mBuf
4447 ));
4448
4449 /* tfu_x_001.main_8. Added changes of TFU_UPGRADE */
4450 #ifdef TFU_UPGRADE
4451 /** @brief This primitive is used to convey the Raw CQI information 
4452  * transmitted by the UE.
4453  * @details Raw CQI report is the actual bits transmitted by the UE when
4454  * reporting CQI/PMI/RI. The interpretation of these bits to CQI/sub-band CQI
4455  * and so on, are done by MAC.
4456  * 
4457  * @param pst Pointer to the post structure.
4458  * @param suId SAP ID of the service user.
4459  * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
4460  * @return ROK/RFAILED
4461  */
4462 EXTERN S16 cmPkTfuRawCqiInd ARGS((
4463    Pst *                pst,
4464    SuId                 suId,
4465    TfuRawCqiIndInfo *   rawCqiInd
4466 ));
4467 /** @brief This primitive is used to convey the Raw CQI information 
4468  * transmitted by the UE.
4469  * @details Raw CQI report is the actual bits transmitted by the UE when
4470  * reporting CQI/PMI/RI. The interpretation of these bits to CQI/sub-band CQI
4471  * an so on, are done by MAC.
4472  * 
4473  * @param pst Pointer to the post structure.
4474  * @param suId SAP ID of the service user.
4475  * @param cqiInd Pointer to the TfuRawCqiIndInfo structure.
4476  * @return ROK/RFAILED
4477  */
4478 EXTERN S16 cmUnpkTfuRawCqiInd ARGS((
4479    TfuRawCqiInd         func,
4480    Pst *                pst,
4481    Buffer               *mBuf
4482 ));
4483 /** @brief This primitive is used to convey the information derived by the
4484  * physical layer from the SRS transmission from the UE.
4485  * @details This primitive carries information derived from the SRS transmission
4486  * from the UE. 
4487  * 
4488  * @param pst Pointer to the post structure.
4489  * @param suId SAP ID of the service user.
4490  * @param srsInd Pointer to the TfuSrIndInfo structure.
4491  * @return ROK/RFAILED
4492  */
4493 EXTERN S16 cmPkTfuSrsInd ARGS((
4494    Pst *                pst,
4495    SuId                 suId,
4496    TfuSrsIndInfo *      srsInd
4497 ));
4498 /** @brief This primitive is used to convey the information derived by the
4499  * physical layer from the SRS transmission from the UE.
4500  * @details This primitive carries information derived from the SRS transmission
4501  * from the UE. 
4502  * 
4503  * @param pst Pointer to the post structure.
4504  * @param suId SAP ID of the service user.
4505  * @param srsInd Pointer to the TfuSrIndInfo structure.
4506  * @return ROK/RFAILED
4507  */
4508 EXTERN S16 cmUnpkTfuSrsInd ARGS((
4509    TfuSrsInd            func,
4510    Pst *                pst,
4511    Buffer               *mBuf
4512 ));
4513 #endif
4514
4515 /*tfu_x_001.main_6 - Added for SPS support*/
4516 #ifdef LTEMAC_SPS
4517 EXTERN S16 cmPkTfuAllocMap ARGS((
4518    TfuAllocMap          *param,
4519    Buffer               *mBuf
4520 ));
4521 EXTERN S16 cmUnpkTfuAllocMap ARGS((
4522          TfuAllocMap          *param,
4523          Buffer               *mBuf
4524          ));
4525 #ifdef EMTC_ENABLE
4526 EXTERN S16 cmPkTfuDciFormat6AAllocInfo ARGS((
4527          TfuDciFormat61AllocInfo *param,
4528          Buffer *mBuf
4529          ));
4530 EXTERN S16 cmUnpkTfuDciFormat6AAllocInfo ARGS((
4531          TfuDciFormat61AllocInfo *param,
4532          Buffer *mBuf
4533          ));
4534 EXTERN S16 cmUnpkTfuDciFormat61aInfo ARGS((
4535          TfuDciFormat61aInfo *param,
4536          Buffer *mBuf
4537          ));
4538 EXTERN S16 cmUnpkTfuDciFormat62Info ARGS((
4539          TfuDciFormat62Info *param,
4540          Buffer *mBuf
4541          ));
4542
4543 EXTERN S16 cmUnpkTfudciformat61aPdsch ARGS((
4544          Tfudciformat61aPdsch *param,
4545          Buffer *mBuf
4546          ));
4547 EXTERN S16 cmPkTfuDciFormat61aInfo ARGS((
4548          TfuDciFormat61aInfo *param,
4549          Buffer *mBuf
4550          ));
4551
4552 #endif
4553
4554 #endif
4555
4556 /* LTE_UNLICENSED */
4557 EXTERN S16 cmPkTfuErrInd ARGS((
4558    Pst *                pst,
4559    SuId                 suId,
4560    TfuErrIndInfo *       errInd
4561 ));
4562
4563 EXTERN S16 cmUnpkTfuErrInd ARGS((
4564    TfuErrInd             func,
4565    Pst *                pst,
4566    Buffer               *mBuf
4567 ));
4568 #endif /*LCTFU*/
4569
4570
4571 #ifdef __cplusplus
4572 }
4573 #endif
4574 #endif /* __TFUX__ */
4575
4576 /********************************************************************30**
4577
4578          End of file
4579 **********************************************************************/