[Epic-ID: ODUHIGH-461][Task-ID: ODUHIGH-468]Unused files and functions removed/disabled
[o-du/l2.git] / src / 5gnrsch / rg_sch_inf.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
21   Name:     LTE-MAC layer 
22   
23   Type:     C Include File 
24   
25   Desc:     Structures, variables, and typedefs required by the interface between
26             MAC and Scheduler.
27
28   File:     rg_sch_inf.x 
29
30 **********************************************************************/
31 /** 
32   @file rg_sch_inf.x 
33   @brief Structure declarations and definitions for MAC-SCH interface.
34   */
35
36 #ifndef __GKSCH_X__ 
37 #define __GKSCH_X__
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 #ifdef EMTC_ENABLE
43 /** 
44  * @brief This structure contains the uplink grant information that is sent in
45  response to the random access request from the UE for CEmodeA.
46  */
47 typedef struct rgInfEmtcCEmodeARarUlGrt
48 {
49    uint8_t msg3PUSCHNbIdx;        /*!< Indicates the Msg3 PUSCH narrowband index. */          
50    uint8_t rbStart;               /*!< Start Resource block of allocation. */
51    uint8_t numRb;                 /*!< Number of resource blocks allocated. */
52    uint8_t msg3PUSCHNumRep;       /*!< Number of repetitions for Msg3 PUSCH. */
53    uint8_t iMcsCrnt;              /*!< Current MCS index of the grant. */
54    uint8_t tpc;                   /*!< TPC command for the uplink grant. */
55    uint8_t cqiBit;                /*!< Indicates the CQI is enabled or not. */
56    uint8_t delayBit;              /*!< Indicates the Delay bit. */
57    uint8_t msg34MPDCCHNbIdx;      /*!< Indicates Msg3/4 MPDCCH narrowband index. */          
58 } RgInfEmtcCEmodeARarUlGrnt;
59
60 /** 
61  * @brief This structure contains the uplink grant information that is sent in
62  response to the random access request from the UE for CEmodeB.
63  */
64 typedef struct rgInfEmtcCEmodeBRarUlGrnt
65 {
66    uint8_t msg3PUSCHNbIdx;        /*!< Indicates the Msg3 PUSCH narrowband index. */          
67    uint8_t rbStart;               /*!< Start Resource block of allocation. */
68    uint8_t numRb;                 /*!< Number of resource blocks allocated. */
69    uint8_t msg3PUSCHNumRep;       /*!< Number of repetitions for Msg3 PUSCH. */
70    uint8_t iTbsCrnt;              /*!< Current TBS index of the grant. */
71    uint8_t msg34MPDCCHNbIdx;      /*!< Indicates Msg3/4 MPDCCH narrowband index. */          
72 }RgInfEmtcCEmodeBRarUlGrnt;
73
74 typedef enum rgEmtcCEmodeType
75 {
76    RG_EMTC_CEMODE_A,
77    RG_EMTC_CEMODE_B,
78    RG_EMTC_CEMODE_INV
79 }RgEmtcCEmodeType;
80
81 /** 
82  * @brief This structure contains the uplink grant information that is sent in
83  response to the random access request from the UE for EMTC.
84  */
85 typedef struct rgInfEmtcRarUlGrnt 
86 {
87    uint8_t rgEmtcCEmodeType;
88    union
89    {
90       RgInfEmtcCEmodeARarUlGrnt  emtcCEmodeARarUlGrnt;
91       RgInfEmtcCEmodeBRarUlGrnt  emtcCEmodeBRarUlGrnt;
92    }u;
93 }RgInfEmtcRarUlGrnt;
94
95 #endif /* EMTC_ENABLE */
96 /**
97  * @brief This structure contains common channel buffer occupancy report information.
98  */
99 typedef struct rgInfCmnBoRpt
100 {
101    S16          cellSapId;
102    CmLteCellId  cellId;         /*!< Identifies the cell. CellId value must be within the set of configured cell IDs. */
103    CmLteLcId    lcId;           /*!< Identifies the logical channel. lcId value range is defined in
104                                      Section 6.2.1 in 36.321 specification. */
105    CmLteLcType  lcType;         /*!< Identifies the Logical channel type.lcType can take the following values:
106                                       CM_LTE_LCH_BCCH
107                                       CM_LTE_LCH_PCCH
108                                       CM_LTE_LCH_CCCH
109                                       CM_LTE_LCH_DCCH
110                                       CM_LTE_LCH_DTCH */
111    S32 bo;                      /*!< Buffer occupancy reported by RLC in bytes. */
112 #ifdef EMTC_ENABLE
113    uint8_t         emtcDIReason;   /*!< Reason for DI message to send. */
114    uint8_t         pnb;            /*!< Pagging narrowBand on which Ue perfom paging reception*/
115 #endif
116    union                        /*!< lcType in the primitive is the union selector. */
117    {
118       CmLteTimingInfo timeToTx; /*!< Timing info for the BO, applicable for BCCH and PCCH. */
119       CmLteRnti       rnti;     /*!< Temporary C-RNTI, only for CCCH. RNTI range is specified 
120                                      in Section 7.1 in 36.321 specification. */
121    } u;
122 } RgInfCmnBoRpt;
123 /**
124  * @brief This structure contains dedicated channel buffer occupancy report 
125  *  information.
126  */
127 typedef struct rgInfDedBoRpt
128 {
129    S16          cellSapId;  /*!< Identifies the cell SAP. cellSapId value must be within the set of configured cell SAP IDs. */
130    CmLteCellId  cellId;     /*!< Identifies the cell. CellId value must be within the set of configured cellIds. */
131    CmLteRnti    rnti;       /*!< Identifies the UE. RNTI value range is specified in Section 7.1 in 25.321 specification. */
132    CmLteLcId    lcId;       /*!< Identifies the logical channel. lcId value range is defined in Section 6.2.1 in 36.321 specification. */
133    S32          bo;         /*!< Number of bytes reported as Buffer occupancy by RLC. */
134 #ifdef CCPU_OPT
135    Bool         staPduPrsnt;   /*!< Is status PDU present reported by RLC. */
136    uint16_t          estRlcHdrSz;/*!< Estimated hader size reported by RLC */
137 #endif
138    uint32_t          staPduBo;   /*!< Number of bytes reported as Buffer occupancy for status PDU by RLC. 
139                                  This is already included in BO.*/
140   uint32_t          oldestSduArrTime; /*!< Oldest SDU Arrival Time from Upper Layer */  
141   Bool         setMaxUlPrio; /*!< set when Pollbit is set from RLC in PDU */
142   Bool         setMaxDlPrio; /*!< Set when there is a status PDU in the DL*/                     
143 } RgInfDedBoRpt;
144
145 /*Fix: start: Indicate UE deletion from MAC to Scheduler*/
146 /**
147  * @brief This structure contains the RNTI which is deleted at MAC 
148  *  information.
149  */
150 typedef struct rgInfUeDelInd
151 {
152    S16          cellSapId;  /*!< Identifies the cell SAP. cellSapId value must be within the set of configured cell SAP IDs. */
153    CmLteCellId  cellId;     /*!< Identifies the cell. CellId value must be within the set of configured cellIds. */
154    CmLteRnti    rnti;       /*!< Identifies the UE. RNTI value range is specified in Section 7.1 in 25.321 specification. */
155 } RgInfUeDelInd;
156
157 /*Fix: end: Indicate UE deletion from MAC to Scheduler*/
158
159
160
161 /** 
162  * @brief This structure contains the uplink grant information that is sent in
163           response to the random access request from the UE.
164  */
165 typedef struct rgInfRarUlGrnt
166 {
167 #ifndef MAC_5GTF_UPDATE
168    uint8_t hop;        /*!< Indicates the hopping flag. */     
169 #else
170    uint8_t xPuschRange; /*!< xPUSCH range */
171 #endif
172    uint8_t rbStart;    /*!< Start Resource block of allocation. */
173    uint8_t numRb;      /*!< Number of resource blocks allocated. */
174    uint8_t tpc;        /*!< TPC command for the uplink grant. */
175    uint8_t iMcsCrnt;   /*!< Current MCS index of the grant. */
176    uint8_t delayBit;   /*!< Indicates the Delay bit. */
177 #ifndef MAC_5GTF_UPDATE
178    uint8_t cqiBit;     /*!< Indicates the CQI is enabled or not. */
179 #else
180    uint8_t numBsiRep;   /*!< Number of BSI reports. */
181    uint8_t bsiBetaOffIdx; /*!< Index of BSI beta offset used in Msg3 */
182    uint8_t pcrs;         /*!< UL dual PCRS */
183 #endif
184 } RgInfRarUlGrnt;
185
186 /** 
187  * @brief This structure carries timing adjustment, uplink grant information for the specific temporary C-RNTI.
188  */
189 typedef struct rgInfCrntiInfo
190 {
191     CmLteRnti       tmpCrnti;    /*!< Temporary C-RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */     
192     uint8_t              rapId;       /*!< rapId identifies the index of the Random Access Preamble. rapId ranges from 0 to 63.*/ 
193     TknUInt16          ta;          /*!< Timing Adjustment. Timing Adjustment Value range is defined in Section 6.1.3.5 in 36.321 specification. */ 
194     RgInfRarUlGrnt  grnt;        /*!< Uplink Grant to go in RAR. */ 
195     Bool            isContFree; /*!< Indicates whether the procedure is contention-free or not. */
196 #ifdef EMTC_ENABLE
197     RgInfEmtcRarUlGrnt  emtcGrnt; /*!< Uplink grant for EMTC UE to go in RAR. */
198 #endif
199 }RgInfCrntiInfo;
200
201 /** 
202  * @brief This structure carries information about downlink control format, scheduled TB size,
203           backoff indicator value, and the set of Random Access Responses within this RA-RNTI. 
204 */
205 typedef struct rgInfRaRntiInfo
206 {
207    uint16_t             raRnti;     /*!< RA-RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */
208    TfuPdschDciInfo dciInfo;    /*!< PDCCH allocated for RA-RNTI. For more information
209                                     refer to <i>TFU Interface Service Definition</i> (p/n 1100091). */
210    uint32_t             schdTbSz;   /*!< Scheduled TB size. schdTbSz value range is defined in Section 7.1.7.2.1 in 36.213
211                                     specification. */
212    TknUInt8           backOffInd; /*!< Indicates the Backoff Indicator value. backOffInd value range
213                                     is defined in Section 7.2 in 36.321 specification. */
214    uint8_t              numCrnti;   /*!< Number of valid RARs in the array. */
215    RgInfCrntiInfo  *crntiInfo; /*!< RAR information. */
216 }RgInfRaRntiInfo;
217   
218 /**
219  * @brief This structure contains information about the RA-RNTIs for which
220  *  random access responses are generated. 
221  */
222 typedef struct rgInfRarInfo
223 {
224  uint8_t              numRaRntis;    /*!< Indicates the number of valid RA-RNTIs present. */
225  RgInfRaRntiInfo *raRntiInfo;   /*!< Contains allocation information per RA-RNTI.  */
226  uint16_t             txPwrOffset;   /*!< PDSCH tx power offset for RAR transmission */ 
227 }RgInfRarInfo;
228
229 /**
230  *  @brief Logical channel allocation information. 
231  */
232 typedef struct rgInfLcDatInfo
233 {
234    CmLList  lchLstEnt;   /*!< Is not used when part of resource allocation. */
235    uint8_t       lcId;        /*!< Identifies the logical channel. lcId value range is defined
236                               in Section 6.2.1 in 36.321 specification. */
237    uint32_t      numBytes;    /*!< Number of bytes allocated/received to logical channel. */
238 } RgInfLcDatInfo; 
239
240 /**
241  * @brief This structure contains control element information received from a 
242  *  particular UE.Extended PHR information
243  */
244 typedef struct rgInfExtPhrSCellInfo
245 {
246    uint8_t    sCellIdx;      /*!< SCELL index for which PHR is reported */
247    uint8_t    phr;  /*!< PHR value. PHR value is defined in Section 6.1.3.6a in 36.321 specification. */
248    uint8_t    pCmax; /*!< PCMAX value. PCMAX value is defined in Table 6.1.3.6a-1 in 36.321 specification. */
249    uint8_t    pBackOff; /*!< If UE applied back off due to P-MPRc in 36.321 specification. */
250 }RgInfExtPhrSCellInfo;
251 typedef struct rgInfExtPhrCEInfo
252 {
253    uint8_t    type2Phr;  /*!< PHR value. PHR value is defined in Section 6.1.3.6a in 36.321 specification. */
254    uint8_t    type2PCMax; /*!< PCMAX value. PCMAX value is defined in Table 6.1.3.6a-1 in 36.321 specification. */
255    uint8_t    numServCells; /*!< Number of serving cells for which PHR is reported */
256    RgInfExtPhrSCellInfo servCellPhr[CM_LTE_MAX_CELLS];
257 }RgInfExtPhrCEInfo;  /*!< EXT PHR value. EXT PHR value is defined in Section 6.1.3.6a in 36.321 R10 specification. */
258
259 /**
260  * @brief This structure contains control element information received from a 
261  *  particular UE.
262  */
263 typedef struct rgInfCeInfo
264 {
265    uint16_t         bitMask;   /*!< Bitmask for the MAC Control elements present. */
266    struct                                                  
267    {                                                       
268       uint16_t   cRnti;        /*!< C-RNTI value. RNTI range is specified in Section 7.1 in 36.321 specification. */
269       uint8_t    phr;          /*!< PHR value. PHR value is defined in Section 6.1.3.6 in 36.321 specification. */
270       union                                                
271       {                                                    
272          uint8_t    truncBsr;  /*!< Truncated BSR value. BSR value is defined in 
273                                Section 6.1.3.1 in 36.321 specification. */
274          uint8_t    shortBsr;  /*!< Short BSR  value.BSR value is defined in 
275                                Section 6.1.3.1 in 36.321 specification. */
276          struct                                            
277          {                                                 
278             uint8_t    bs1;   /*!< Buffer size 1 of long BSR. */ 
279             uint8_t    bs2;   /*!< Buffer size 2 of long BSR. */ 
280             uint8_t    bs3;   /*!< Buffer size 3 of long BSR. */ 
281             uint8_t    bs4;   /*!< Buffer size 4 of long BSR. */ 
282          }longBsr;       /*!< BSR value is defined in Section 6.1.3.1 in 36.321 specification. */ 
283       }bsr;   
284       RgInfExtPhrCEInfo extPhr;  /*!< EXT PHR value. EXT PHR value is defined in Section 6.1.3.6a in 36.321 R10 specification. */
285 #ifdef MAC_5GTF_UPDATE
286  struct
287       {
288         uint8_t bar;         /*!< Beam Adjusment Request */
289         uint8_t numBsiFields; /*!< Number of BSI fields UE sent in BSI Feedback */
290         struct 
291         {
292            uint16_t bi;         /*!< BSI Feedback : 9 bits Beam Index */
293            uint8_t brsrp;       /*!< BSI Feedback :7 bits BRSRP */
294         }bsiFdbk[4];
295       }beam;
296 #endif
297    } ces;
298       /* L2_COUNTERS */
299 #ifdef LTE_L2_MEAS
300    uint8_t ulActLCs[RGINF_MAX_NUM_DED_LC];
301                         /*!< List of LCs for which Data is received in UL */
302 #endif
303
304
305 #ifdef LTEMAC_SPS
306    uint16_t spsSduSize;
307 #endif
308
309 } RgInfCeInfo;
310
311 typedef struct rgInfLcgInfo
312 {
313    uint8_t    lcgId;        /*!< LCGID. GBR DRB LCG */
314    uint32_t   bytesRcvd;    /*!< Contains bytes received for LCG */
315 }RgInfLcgInfo;
316
317 /** 
318  * @brief This structure contains control element information received from a 
319  *  particular UE identified by the RNTI.
320  */
321 typedef struct rgInfUeDatInd
322 {
323    CmLteRnti   rnti;      /*!< RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */
324    CmLList     ueLstEnt;  /*!< UE linked list entry. */
325    RgInfCeInfo ceInfo;    /*!< Contains the control elements received from the UE. */
326    RgInfLcgInfo lcgInfo[RGINF_MAX_LCG_PER_UE - 1];  /*!< Contains the bytes received per DRB LCG. */
327 }RgInfUeDatInd;
328
329 /** 
330  * @brief This structure carries the control element information received for a
331           set of UEs along with timing information. 
332  */
333 typedef struct rgInfSfDatInd
334 {
335    CmMemListCp       memCp;      /*!< Memory control point. */
336    CmLListCp         ueLst;      /*!< Pointer to the UE linked list. */
337    /* RRM_SP1_START */
338    uint32_t               qcisUlPrbCnt[RGINF_MAX_GBR_QCI_REPORTS];/*!< UL gbr LC's PRB count*/
339    /* RRM_SP1_END */
340    S16               cellSapId;  /*!< Cell SAP Identifier. CellSAP ID value must be within the set of configured cell SAP IDs. */
341    CmLteCellId       cellId;     /*!< Identifies the cell. CellId must be within the set of configured cell IDs. */
342    CmLteTimingInfo   timingInfo; /*!< Contains information about SFN and subframe. SFN ranges from 0 to 1023 whereas subframe ranges from 0 to 9. */
343 }RgInfSfDatInd;
344
345 /** 
346  * @brief This structure carries the information about scheduled logical 
347  *  channels within this transport block along with timing adjustment 
348  *  information. 
349  */
350 typedef struct rgInfUeTbInfo
351 {
352    Bool                 disTb;       /*!< Currently, not used, but is 
353                                           applicable in MIMO case. */
354    Bool                 isReTx;      /*!< Indicates the TB transmission type. */
355    TknUInt8                ta;          /*!< Timing Adjustment. */ 
356 #ifdef LTE_ADV
357   TknUInt8                 sCellActCe;   /* !< SCell Act values and whether
358                                           scheduled or not */
359 #endif
360
361    /* Changed as a result of CR timer implementation*/
362    uint8_t contResCe; /*!< Indicating presence of Contention Resolution CE across MAC-SCH
363                    interface to
364                   * identify CCCH SDU transmissions which need to
365                   * be done without the
366                   * contention resolution CE.*/
367
368    uint8_t                   numSchLch;   /*!< Indicates the number of logical 
369                                           channels scheduled. */    
370    uint32_t                  schdTbSz; 
371    RgInfLcDatInfo       schdDat[RGINF_MAX_NUM_DED_LC]; /*!< Contains 
372                                           information about scheduled logical
373                                           channel. */
374 } RgInfUeTbInfo;
375
376 /**
377  @brief This structure carries the information reagarding secondary MAC like its
378  instance Id and HARQ process's Id
379  */
380 typedef struct rgLaaTbReqInfo
381 {
382    uint8_t      sMacInstId;
383    uint8_t      sCellHqPId;
384    uint8_t      tbId;
385    uint16_t     hqPStamp;
386 }RgLaaTbReqInfo;
387
388 /** 
389  *  @brief This structure carries the UE-specific Resource allocation 
390  *   information like RNTI, downlink control format, HARQ process Identifier, 
391  *   scheduled TB size, and Transport Block information. 
392  */
393 typedef struct rgInfUeAlloc
394 {
395    CmLteRnti        rnti;      /*!< RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */ 
396
397 /* Added support for SPS*/
398 #ifdef LTEMAC_SPS
399    CmLteRnti            pdcchRnti;   /*!< RNTI used for PDCCH scrambling */
400 #endif
401
402
403
404    TfuPdschDciInfo  dciInfo;   /*!< Contains Downlink Control Information. For more information, 
405                                     refer to <i>TFU Interface Service Definition</i> (p/n 1100091). */
406    uint8_t               hqProcId;  /*!< HARQ process Identifier. hqProcId ranges between 1 and 8 for FDD mode and 1 and 15 for TDD mode */
407    S8                  tbStrtIdx;
408    TknUInt32              doa;
409    TfuTxMode           txMode;
410    Bool                puschRptUsd;/*!< True, if Precoding Information in PDCCH has to be
411                                    in-accordance with the latest PUSCH report */
412    TfuDlCqiPuschInfo   puschPmiInfo;/*!< PUSCH report details for explicit PMI
413                                        * information to PHY during a PDSCH */
414
415
416    uint8_t               nmbOfTBs;  /*!< Indicates the number of TBs. Currently this is set to 1. */
417    RgInfUeTbInfo    tbInfo[RGINF_MAX_TB_PER_UE]; /*!< Contains TB identifier. */
418    /* LTE_ADV_FLAG_REMOVED_START */
419 #ifdef TFU_UPGRADE
420    uint8_t                  pa;          /*!<  DL Power control paramter P_A
421                                         configured by higher layers
422                                         Ref: RRC 36.331, 6.3.2, PDSCH-Config */
423 #endif
424    uint8_t   isEnbSFR;     /*To check if SFR is enabled*/
425    /* LTE_ADV_FLAG_REMOVED_END */
426 #ifdef LTE_ADV
427    Bool                 fillCtrlPdu; /*!< Based upon this flag RLC will fill RLC Control PDU 
428                                           In a tti if P-cell is present then control PDU 
429                                           should be kept in P-cell otherwise S-cell*/
430 #endif
431    RgLaaTbReqInfo   tbReqInfo;      /*!< LAA: TB information for the TBs which
432                                      need to be fetched from the SCell*/
433 }RgInfUeAlloc;
434
435 /** 
436  * @brief This structure carries the Resource allocation information for the 
437  *  set of scheduled UEs. 
438  */
439 typedef struct rgInfUeInfo
440 {
441    uint8_t               numUes;    /*!< Number of UEs allocated. */
442    RgInfUeAlloc     *allocInfo; /*!< Allocation information per UE. */
443 }RgInfUeInfo;
444
445 /** 
446  * @brief This structure contains the RNTI and downlink control format 
447  *  information for the scheduled BCCH logical channel.  
448  */
449 typedef struct rgInfBcchInfo
450 {
451    CmLteRnti            rnti;       /*!< RNTI range is specified in Section 7.1 in 36.321 specification. */ 
452    TfuPdschDciInfo      dciInfo;    /*!< Downlink Control Information. For more information,
453                                          refer to <i>TFU Interface Service Definition</i> (p/n 1100091).*/
454 /* Modified for SI Enhancement*/
455 #ifndef RGR_SI_SCH
456    CmLteLcId            lcId;       /*!< Logical Channel Identifier.lcId value range is defined in 
457                                          Section 6.2.1 in 36.321 specification. */
458    Bool                 sndStatInd; /*!< Currently this is set to 1 for fresh transmission of BCCH data. */
459 #else
460    Buffer               *pdu;       /*!< PDU being specified for BCCH. */
461 #endif
462    uint16_t                  txPwrOffset;   /*!< PDSCH tx power offset for BCCH 
463                                             transmission */ 
464 }RgInfBcchInfo;
465
466 /** 
467  * @brief This structure contains the RNTI and the downlink control information for the scheduled PCCH logical channel. 
468  */
469 typedef struct rgInfPcchInfo
470 {
471    CmLteRnti            rnti;      /*!< RNTI range is specified in Section 7.1 in 36.321 specification. */ 
472    TfuPdschDciInfo      dciInfo;   /*!< Downlink Control Information.
473                                         For more information, refer to <i>TFU Interface Service Definition</i> (p/n 1100091). */
474    CmLteLcId            lcId;      /*!< Logical Channel Identifier. lcId value range is defined in
475                                         Section 6.2.1 in 36.321 specification. */
476                                         
477    uint16_t                  txPwrOffset;   /*!< PDSCH tx power offset for PCCH 
478                                             transmission */ 
479 }RgInfPcchInfo;
480
481 /** 
482  * @brief This structure contains the scheduled logical channel information 
483  *  mapped onto the BCH transport channel.
484  */
485 typedef struct rgInfBchInfo
486 {
487 /* Modified for SI Enhancement*/
488 #ifndef RGR_SI_SCH
489    CmLteLcId       lcId;    /*!< Logical Channel Identifier. lcId value range is defined in Section 6.2.1 in 36.321 specification. */
490 #else
491    Buffer          *pdu;    /*!< PDU being specified for BCH */
492 #endif
493 }RgInfBchInfo;
494
495 /** 
496  * @brief This structure contains the scheduling information of BCH, PCCH, and 
497  *  BCCH channel information.
498  */
499 typedef struct rgInfCmnLcInfo
500 {
501    uint16_t               bitMask;   /*!< Bitmask representing all the common channels present. */
502    RgInfBchInfo      bchInfo;   /*!< BCH channel Information. */
503    RgInfPcchInfo     pcchInfo;  /*!< Paging Logical Channel Information. */
504    RgInfBcchInfo     bcchInfo;  /*!< Broadcast Logical Channel Information. */
505 }RgInfCmnLcInfo;
506
507 #ifdef EMTC_ENABLE
508 /** 
509  * @brief This structure contains the scheduled logical channel information 
510  *  mapped onto the BCH transport channel.
511  */
512 typedef struct rgInfEmtcBcchInfo
513 {
514    CmLteRnti         rnti;    /*!< RNTI range is specified in Section 7.1 in 36.321 specification. */ 
515    TfuPdschDciInfo   dciInfo; /*!< Downlink Control Information. For more information */
516    Buffer            *pdu;    /*!< PDU being specified for BCH */
517 }RgInfEmtcBcchInfo;
518
519 /** 
520  * @brief This structure contains the scheduling information of BCH, PCCH, and 
521  *  BCCH channel information.
522  */
523 typedef struct rgInfEmtcCmnLcInfo
524 {
525    uint16_t               bitMask;   /*!< Bitmask representing all the common channels present. */
526    RgInfBchInfo      bchInfo;   /*!< BCH channel Information. */
527    RgInfPcchInfo     pcchInfo;  /*!< Paging Logical Channel Information. */
528    RgInfEmtcBcchInfo emtcBcchInfo;  /*!< Broadcast Logical Channel Information. */
529 }RgInfEmtcCmnLcInfo;
530 #endif
531
532 #ifdef LTE_L2_MEAS
533 /**
534  * @brief UE-specific allocation information needed for measurements. 
535  * */
536 typedef struct rgInfUeUlAlloc
537 {
538    CmLteRnti            rnti;        /*!< UE ID */ 
539    uint8_t                   numPrb;      /*!< Number of total PRB's allocated for this UE */
540 } RgInfUeUlAlloc;
541
542 /**
543  * @brief Allocation information of all UEs in this subframe. 
544  * */
545 typedef struct rgInfUlUeInfo
546 {
547    uint8_t                   numUes;      /*!< Number of UE's*/
548    CmLteTimingInfo      timingInfo;  /*!< Uplink timing information */
549    RgInfUeUlAlloc       *ulAllocInfo;/*!< Uplink Allocations information */
550 }RgInfUlUeInfo;
551 #endif /*LTE_L2_MEAS */
552
553 /**
554 *@brief this structure contains the lcId on which flow control need to be performed and the number of packets allowed for admission */
555 typedef struct rgInfLcInfo
556 {
557    CmLteLcId   lcId;        /*!< lcId for flow control*/
558    uint32_t         pktAdmitCnt; /*!<Pkts allowed for the LC */
559    uint32_t         maxBo4FlowCtrl; /*!< MAX BO of Queued SDUs at RLC beyond which Flow is Controlled */
560 }RgInfLcFlowCntrlInfo;
561
562
563 /** 
564  * @brief This structure contains the flow control information per UE */
565 typedef struct rgInfUeFlowCntrlInfo 
566 {
567    CmLteRnti            ueId;  /*!<ueId for flow control*/
568    uint32_t                  numLcs;/*!<numLcs in the UE*/
569    RgInfLcFlowCntrlInfo lcInfo[RGINF_MAX_NUM_DED_LC]; /*!<LC list*/
570 }RgInfUeFlowCntrlInfo;  
571 /**
572 * @brief This structure contains the flow control information to be sent to MAC */
573 typedef struct rgInfFlowCntrlInfo
574 {
575    uint32_t                   numUes;/*!<Num UEs for flow control */
576    RgInfUeFlowCntrlInfo  ueFlowCntrlInfo[RGINF_MAX_NUM_UE_PER_TTI]; /*!<Ue Info for flow control */
577 }RgInfFlowCntrlInfo;
578 #ifdef EMTC_ENABLE
579 typedef struct rgInfEmtcInfo
580 {
581    RgInfEmtcCmnLcInfo  cmnLcInfo;     /*!< Contains Information about commmon channels. */
582    RgInfRarInfo        rarInfo;       /*!< Contains Information about EMTC Random Access Responses. */
583    RgInfUeInfo         ueInfo;        /*!< Contains UE specific allocation
584                                             information for EMTC UEs. */
585 }RgInfEmtcInfo;
586 #endif
587 /** 
588  * @brief This structure contains the scheduling information of common channels, random access responses and UE specific allocations along with timing information.
589  */
590 typedef struct rgInfSfAlloc
591 {
592    CmLteCellId         cellId;        /*!< Identifies the cell. CellId value should be within the set of configured
593                                          cell IDs. */
594    CmLteTimingInfo     timingInfo;    /*!< Contains Information about SFN and subframe. SFN ranges from 0 to 1023 where as subframe is from 0 to 9. */
595    RgInfCmnLcInfo      cmnLcInfo;     /*!< Contains Information about commmon channels. */
596 #ifdef EMTC_ENABLE
597    RgInfEmtcInfo       emtcInfo;
598 #endif
599    RgInfRarInfo        rarInfo;       /*!< Contains Information about Random Access Responses. */
600    RgInfUeInfo         ueInfo;        /*!< Contains UE specific allocation information. */
601 #ifdef LTE_L2_MEAS
602    RgInfUlUeInfo       ulUeInfo;    /*!< Uplink allocation information needed at MAC */
603 #endif /* LTE_L2_MEAS */
604    RgInfFlowCntrlInfo  flowCntrlInfo; /*!<Flow Control information */
605 }RgInfSfAlloc;
606
607 /**
608 * @brief This structure contains regarding the ue for
609 *  resettng the harqentiry of a scell
610 */
611 typedef struct rgInfResetHqEnt
612 {
613    CmLteCellId cellId;        /*!< Identifies the sec cell for which harq entity reset
614                                    has to be done*/
615    CmLteRnti   crnti;          /*!< RNTI for which harq entity needs to be 
616                                             reset */
617 }RgInfResetHqEnt;
618
619 /** 
620  * @brief This structure contains the UE specific HARQ and Transport Block 
621  *  information to be released.  
622  */
623 typedef struct rgInfUeHqInfo
624 {
625    CmLteRnti   rnti;                        /*!< RNTI which uniquely identifies the UE. RNTI value range is 
626                                                  specified in Section 7.1 in 25.321 */
627    uint8_t          hqProcId;                    /*!< HARQ Process Identifier.
628                                                  hqProcId ranges between 1 and 8 for FDD mode and 1 and 15 for TDD mode. */
629    uint8_t          numOfTBs;                    /*!< Identifies the number of TBs. Currently this is set to 1. */
630    uint8_t          tbId[RGINF_MAX_TB_PER_UE];   /*!< Indicates the TB Identifier. */
631    /* MS_WORKAROUND: to increase Harq Fail Counter .
632        The status field is required for tracking the number of harq faliures at MAC.
633        As this is already present under L2_MEAS flag, we have replaced it with platform flag */
634    uint8_t                   status[RGINF_MAX_TB_PER_UE];      /*!< Indicates HARQ ACK or NACK */ 
635    uint8_t          rlsOperationType;            /*!< Decides action to be taken in MAC
636                                                  0x00 RGINF_RLS_HQ_NO_ACTION - Free Hq Procs and TBs
637                                                  0x01 RGINF_RLS_HQ_SAVE_TB - Free Hq Proc but save the TBs
638                                                  0x02 RGINF_RLS_HQ_DEL_TB - Del already saved TBs */
639    uint16_t         saveId;                     /*!< Uniquely identify an particular HqP save */                                              
640 } RgInfUeHqInfo;
641
642 /** 
643  * @brief This structure contains HARQ process information and buffer 
644  *  information for a set of UEs to be released in a cell identified by the 
645  *  cell ID. 
646  */
647 typedef struct rgInfRlsHqInfo
648 {
649    CmLteCellId   cellId;           /*!< Identifies Cell. CellId should be within
650                                         the set of configured cell IDs. */
651    uint8_t            numUes;           /*!< Indicates number of UEs present. */
652    RgInfUeHqInfo *ueHqInfo;        /*!< Contains UE specific HARQ information. */
653 }RgInfRlsHqInfo;
654
655 /** 
656  * @brief This structure contains the released RNTI in a particular cell 
657  *  identified by a cellId.
658  */
659 typedef struct rgInfRlsRnti
660 {
661    CmLteCellId   cellId;           /*!< cellId uniquely identifies the
662                                         cell. cellId value should be within the set of configured cell IDs. */
663    CmLteRnti     rnti;             /*!< RNTI which uniquely identifies the UE. 
664                                         RNTI range is specified in Section 7.1 in 25.321 specification. */
665    /* Fix : syed ueId change as part of reestablishment.
666     * Now SCH to trigger this. CRG ueRecfg for ueId change 
667     * is dummy */          
668    Bool          ueIdChng;         /*!< Indicates if there is a ueId change as part
669                                         of reestablishment */
670    CmLteRnti     newRnti;          /*!< new RNTI changed as part of reestablishment */
671 #ifdef LTE_ADV
672    Bool          isUeSCellDel;         /*!< TRUE means UeSCellDel*/
673 #endif
674 }RgInfRlsRnti;
675
676 /** 
677  * @brief This structure contains the cell information along with the 
678  *  maximum number of downlink HARQ processes configured per UE in the cell.
679  */
680 typedef struct rgInfCellReg
681 {
682    CmLteCellId cellId;            /*!< Identifies the cell. cellId value should be within the set of configured cell IDs. */
683    S16         cellSapId;         /*!< Identifies the cell SAP. cellSapId value should be within the set of configured cell SAP IDs. */
684    uint8_t          maxDlHqProcPerUe;  /*!< Indicates Maximum number of downlink HARQ processes per UE. */
685 }RgInfCellReg;
686
687 #ifdef LTE_L2_MEAS
688 /**
689  * @brief struture to hold measurement request for Uplink Average PRB usage per
690  * QCI
691  * */
692 typedef struct rgInfPrbReq
693 {
694    uint8_t                   numQci;      /*!< Number fo QCI's in Request */
695    uint8_t                   qci[LRG_MAX_QCI_PER_REQ];  /*!< QCI for which PRB has
696                                           to be measured */
697 } RgInfPrbReq;
698
699
700 typedef struct prbUsage
701 {
702    uint8_t                   qciValue;   /*!< Qci Value */
703    uint32_t                  prbUsage;   /*!<Prb Usage for this Qci */
704 }PrbUsage;
705 /**
706  * @brief struture to hold measurement confirm for Uplink Average PRB usage per
707  * QCI
708  * */
709 typedef struct rgInfPrbCfm
710 {
711    uint8_t                   numQci;      /*!< Number fo QCI's in Request */
712    PrbUsage             prbUsage[LRG_MAX_QCI_PER_REQ];  /*!< Average PRB usage
713                                           per QCI */
714 } RgInfPrbCfm;
715
716 /**
717  * @brief Structure used by Scheduler to send the measurement request to MAC 
718  * */
719 typedef struct RgInfL2MeasReq
720 {
721    uint32_t                  transId;     /*!< TransId to uniquely identify request */
722    uint16_t                  measType;    /*!< For action type Avegare PRB usage 
723                                           in Uplink */
724    uint16_t                  timePrd;     /*!< Time Period for which measurement
725                                           is done */
726    CmLteCellId          cellId;      /*!< CellId for which measurement done*/
727    union {
728       RgInfPrbReq       prbReq;      /*!< Avgerage PRB usage per QCI*/
729    } t;
730 } RgInfL2MeasReq;
731
732 /**
733  * @brief Structure used by Scheduler to send the measurement stop request to MAC 
734  * */
735 typedef struct RgInfL2MeasStopReq
736 {
737    uint32_t                  transId;     /*!< TransId to uniquely identify request */
738    uint8_t                   measType;    /*!< For action type Avegare PRB usage 
739                                           in Uplink */
740    CmLteCellId          cellId;      /*!< CellId for which measurement done*/
741 } RgInfL2MeasStopReq;
742
743
744 /**
745  * @brief Structure used by Scheduler to send the measurement send request to MAC 
746  * */
747 typedef struct RgInfL2MeasSndReq
748 {
749    uint32_t                  transId;     /*!< TransId to uniquely identify request */
750    uint8_t                   measType;    /*!< For action type Avegare PRB usage 
751                                           in Uplink */
752    uint16_t                  timePrd;     /*!< Time Period for which measurement
753                                           is done */
754    CmLteCellId          cellId;      /*!< CellId for which measurement done*/
755 } RgInfL2MeasSndReq;
756
757 /**
758  * @brief Structure used MAC to send the confirm back to scheduler 
759  * */
760 typedef struct rgInfL2MeasCfm
761 {
762    uint16_t                  transId;     /*!< transId to map to request */
763    uint8_t                   measType;    /*!< Action for which measurement done */
764    CmLteCellId          cellId;      /*!< CellId for which measurement done*/
765    CmStatus             cfm;        /*!< Confirmation possible Values when measType
766                                   is invalid status -> NOK and reason -> INVALID */
767    union {
768       RgInfPrbCfm       prbCfm;      /*!< Avgerage PRB usage per QCI*/
769    } u;
770 } RgInfL2MeasCfm;
771
772 /**
773  * @brief This API is invoked from l2 Measurements module at scheduler.
774  * When Scheduler receives a measurement request from stack manager for Average 
775  * PRB usage Per QCI in Uplink, Scheduler invokes this API towards LTE MAC 
776  * for the calculations. LTE MAC utilizes the uplink allocations information provided 
777  * by scheduler for every subframe and data indications received for this calculation.
778  * This API carries a transId to uniquely identify the confirm received for 
779  * this request from LTEMAC.
780  * */
781 S16 RgSchMacL2MeasReq ARGS((
782    Pst*                 pst,
783    RgInfL2MeasReq*      l2MeasReq
784 ));
785 /**
786  * @brief This API is invoked from l2 Measurements module at scheduler.
787  * When Scheduler receives a measurement send request from stack manager, 
788  * it sends L2 measurement to layer manager.
789  * */
790
791 S16 RgSchMacL2MeasSendReq ARGS((
792    Pst*                 pst,
793    RgInfL2MeasSndReq*      l2MeasReq
794 ));
795 /**
796  * @brief This API is invoked from l2 Measurements module at scheduler.
797  * When Scheduler receives a measurement stop request from stack manager,
798  * it stops L2 Measurement 
799  */
800 S16 RgSchMacL2MeasStopReq ARGS((
801    Pst*                 pst,
802    RgInfL2MeasStopReq*      l2MeasReq
803 ));
804
805 /**
806  * @brief This API is invoked from L2 Measurement module at LTE MAC. When LTE MAC
807  * completes calculation of Avergae PRB usage per QCI in Uplink for a given time 
808  * period, It invokes this API to indicate result back to scheduler. LTE  
809  * MAC sends the same transId received in measurement request from Scheduler.
810  * */
811 S16 RgMacSchL2MeasCfm ARGS((
812    Pst*                 pst,
813    RgInfL2MeasCfm*      l2MeasCfm
814 ));
815 /**
816  * @brief This API is invoked from L2 Measurement module at LTE MAC. When LTE MAC
817  * stops L2 measurement, it sends L2 measurement cfm.
818  * */
819
820 S16 RgMacSchL2MeasStopCfm ARGS((
821    Pst*                 pst,
822    RgInfL2MeasCfm*      l2MeasCfm
823 ));
824
825 S16 RgMacSchL2MeasStop ARGS
826 ((
827 Pst*                pst,   
828 RgInfL2MeasCfm      *measInfo
829 ));
830 #endif /* LTE_L2_MEAS */
831
832
833 /* Added support for SPS*/
834 #ifdef LTEMAC_SPS
835 /** 
836  * @brief This structure contains the logical channel information related to
837  *  uplink SPS for a particular UE identified by the CRNTI.
838  */
839 typedef struct rgInfSpsLcInfo
840 {
841    CmLteCellId          cellId;      /*!< Cell Identifier */
842    CmLteRnti            crnti;       /*!< RNTI which uniquely identifies the UE
843                                           RNTI range is specified in Section 
844                                           7.1 in 25.321 Specification. */
845    CmLteRnti            spsRnti;     /*!< SPS RNTI. RNTI range is specified in
846                                           Section 7.1 in 25.321 Specification. */
847    uint8_t                   spsLcCnt;    /*!< identifies the number of SPS
848                                           configured logical channels */ 
849    uint8_t                   spsLcId[RGINF_MAX_NUM_DED_LC]; /*!< Logical Channel
850                                           Identifier. lcId value range is 
851                                           defined in Section 6.2.1
852                                           in 36.321 Specification. */
853    uint8_t                   implRelCnt;  /*!< "implicitRelAfter" vallue */  
854    uint16_t                  spsPrd;      /*!< SPS periodicity of the UE */
855 } RgInfSpsLcInfo;
856
857 /** 
858  * @brief This structure contains the information to release UL SPS for a UE */
859 typedef struct rgInfSpsRelInfo
860 {
861    S16                  cellSapId;   /*!< identifies the cell SAP. Value range
862                                           should be within the set of 
863                                           configured cell SAP(s).*/
864    CmLteRnti            cRnti;       /*!< RNTI of the UE */
865    Bool                 isExplRel;    /*!< TRUE if explicit release needs to be
866                                           sent to UE */
867 } RgInfSpsRelInfo;
868 #endif /* LTEMAC_SPS */
869
870 /* 
871  * Function Prototypes 
872  */
873 /** 
874  * @brief Request from Scheduler to MAC to register a cell. 
875  * @details This primitive is used for light-weight loose coupling.
876  */
877 S16 cmPkSchMacCellRegReq ARGS((
878    Pst*                 pst,    
879    RgInfCellReg*        regReq  
880 ));
881
882 typedef S16 (*CellRegReq) ARGS((
883    Pst*                 pst,
884    RgInfCellReg*        regReq
885 ));
886
887 /** 
888  * @brief Request from Scheduler to MAC to register a cell. 
889  * @details The scheduler invokes this primitive after the scheduler cell
890  *  configuration is completed. Before calling this primitive, the scheduler
891  *  creates a mapping of the cell which is uniquely idetified by cell ID and 
892  *  scheduler instance that is serving the cell.
893  */
894 S16 RgSchMacCellRegReq ARGS((
895    Pst*                 pst,
896    RgInfCellReg*        regReq
897 ));
898 /** 
899  * @brief Request from Scheduler to MAC to register a cell. 
900  * @details This primitive is used for light-weight loose coupling.
901  */
902 S16 cmUnpkSchMacCellRegReq ARGS((
903    CellRegReq           func,
904    Pst*                 pst,
905    Buffer               *mBuf
906 ));
907 /** 
908  * @brief Request from MAC to scheduler to update dedicated BO.
909  * @details This primitive is used for light-weight loose coupling.
910  */
911 S16 cmPkMacSchDedBoUpdtReq ARGS((
912    Pst*                 pst,    
913    RgInfDedBoRpt*       boRpt  
914 ));
915
916 typedef S16 (*DedBoUpdtReq) ARGS((
917    Pst*                 pst,
918    RgInfDedBoRpt*       boRpt
919 ));
920
921 /** 
922  * @brief Request from MAC to scheduler to update dedicated BO.
923  * @details MAC layer invokes this primitive towards scheduler when it 
924  *  receives status response from the RLC for dedicated channels. Scheduler
925  *  takes the buffer occupancy information into consideration while taking
926  *  scheduling decisons. 
927  */
928 S16 RgMacSchDedBoUpdtReq ARGS((
929    Pst*                 pst,
930    RgInfDedBoRpt*       boRpt
931 ));
932 /** 
933  * @brief Request from MAC to scheduler to update dedicated BO.
934  * @details This primitive is used for light-weight loose coupling.
935  */
936 S16 cmUnpkMacSchDedBoUpdtReq ARGS((
937    DedBoUpdtReq         func,
938    Pst*                 pst,
939    Buffer               *mBuf
940 ));
941 /** 
942  * @brief Request from MAC to scheduler to update common channel BO.
943  * @details This primitive is used for light-weight loose coupling. 
944  */
945 S16 cmPkMacSchCmnBoUpdtReq ARGS((
946    Pst*                 pst,    
947    RgInfCmnBoRpt*       boRpt  
948 ));
949
950 typedef S16 (*CmnBoUpdtReq) ARGS((
951    Pst*                 pst,
952    RgInfCmnBoRpt*       boRpt
953 ));
954
955 /** 
956  * @brief Request from MAC to scheduler to update common channel BO.
957  * @details MAC layer invokes this primitive towards scheduler when it 
958  *  receives status response from the RLC for common channels. Scheduler
959  *  takes the buffer occupancy information into consideration while taking
960  *  scheduling decisons. 
961  */
962 S16 RgMacSchCmnBoUpdtReq ARGS((
963    Pst*                 pst,
964    RgInfCmnBoRpt*       boRpt
965 ));
966 /** 
967  * @brief Request from MAC to scheduler to update common channel BO.
968  * @details This primitive is used for light-weight loose coupling. 
969  */
970 S16 cmUnpkMacSchCmnBoUpdtReq ARGS((
971    CmnBoUpdtReq         func,
972    Pst*                 pst,
973    Buffer               *mBuf
974 ));
975
976 /*Fix: start:Indicate UE deletion at MAC to scheduler*/
977 /** 
978  * @brief UE delete indication from MAC to scheduler.
979  * @details This primitive is used for light-weight loose coupling. 
980  */
981 S16 cmPkMacSchUeDelInd ARGS((
982    Pst*                 pst,    
983    RgInfUeDelInd*       ueDelInd
984 ));
985
986 typedef S16 (*UeDelInd) ARGS((
987    Pst*                 pst,
988    RgInfUeDelInd*       ueDelInd
989 ));
990
991 /** 
992  * @brief UE deletion indication from MAC to scheduler.
993  * @details MAC layer invokes this primitive towards scheduler when it 
994  *  receives UE delete Request. As the UE is now deleted at MAC, it should 
995  *  not be scheduled.
996  */
997 S16 RgMacSchUeDelInd ARGS((
998    Pst*                 pst,
999    RgInfUeDelInd*       ueDelInd
1000 ));
1001 /** 
1002  * @brief UE delete Indication Request from MAC to scheduler.
1003  * @details This primitive is used for light-weight loose coupling. 
1004  */
1005 S16 cmUnpkMacSchUeDelInd ARGS((
1006    UeDelInd            func,
1007    Pst*                 pst,
1008    Buffer               *mBuf
1009 ));
1010 /*Fix: end:Indicate UE deletion at MAC to scheduler*/
1011 /** 
1012  * @brief Data Indication Request from MAC to scheduler.
1013  * @details This primitive is used for light-weight loose coupling. 
1014  */
1015 S16 cmPkMacSchSfRecpInd ARGS((
1016    Pst*                 pst,    
1017    RgInfSfDatInd*       datInd
1018 ));
1019
1020 typedef S16 (*SfRecpInd) ARGS((
1021    Pst*                 pst,
1022    RgInfSfDatInd*       datInd
1023 ));
1024
1025 /** 
1026  * @brief Data Indication Request from MAC to scheduler.
1027  * @details MAC layer invokes this primitive towards scheduler when it 
1028  *  receives MAC Control Elements from the data received from the UE. Scheduler
1029  *  takes these control elements into consideration while taking scheduling 
1030  *  decisons for the uplink.
1031  */
1032 S16 RgMacSchSfRecpInd ARGS((
1033    Pst*                 pst,
1034    RgInfSfDatInd*       datInd
1035 ));
1036 /** 
1037  * @brief Data Indication Request from MAC to scheduler.
1038  * @details This primitive is used for light-weight loose coupling. 
1039  */
1040 S16 cmUnpkMacSchSfRecpInd ARGS((
1041    SfRecpInd            func,
1042    Pst*                 pst,
1043    Buffer               *mBuf
1044 ));
1045 /** 
1046  * @brief Resource Allocation Request from Scheduler to MAC.
1047  * @details This primitive is used for light-weight loose coupling.
1048  */ 
1049 S16 cmPkSchMacSfAllocReq ARGS((
1050    Pst*                 pst,    
1051    RgInfSfAlloc*        resAllocReq
1052 ));
1053
1054 typedef S16 (*SfAllocReq) ARGS((
1055    Pst*                 pst,
1056    RgInfSfAlloc*        resAllocReq
1057 ));
1058
1059 /** 
1060  * @brief Resource Allocation Request from Scheduler to MAC.
1061  * @details Scheduler invokes this primitive for every TTI towards MAC to  
1062  *  inform the scheduling decisions taken for uplink grants, common channels
1063  *  and list of UEs to be scheduling during this TTI.
1064  */
1065 S16 RgSchMacSfAllocReq ARGS((
1066    Pst*                 pst,
1067    RgInfSfAlloc*        resAllocReq
1068 ));
1069 /** 
1070  * @brief Resource Allocation Request from Scheduler to MAC.
1071  * @details This primitive is used for light-weight loose coupling.
1072  */ 
1073 S16 cmUnpkSchMacSfAllocReq ARGS((
1074    SfAllocReq           func,
1075    Pst*                 pst,
1076    Buffer               *mBuf
1077 ));
1078 /** 
1079  * @brief Request from Scheduler to release HARQ processes at MAC.
1080  * @details This primitive is used for light-weight loose coupling.
1081  */
1082 S16 cmPkSchMacRlsHqReq ARGS((
1083    Pst*                 pst,    
1084    RgInfRlsHqInfo*      sfHqInfo
1085 ));
1086
1087 typedef S16 (*RlsHqReq) ARGS((
1088    Pst*                 pst,
1089    RgInfRlsHqInfo*      sfHqInfo
1090 ));
1091
1092 /** 
1093  * @brief Request from Scheduler to release HARQ processes at MAC.
1094  * @details  Scheduler calls this primitive to send the list of UEs for  
1095  *  which the HARQ buffers are released to MAC. The Scheduler invokes this
1096  *  primitive when a positive acknowledgement is received for the TB transmitted
1097  *  or a TB is retransmitted for the allowed maximum number of retransmissions. 
1098  */
1099 S16 RgSchMacRlsHqReq ARGS((
1100    Pst*                 pst,
1101    RgInfRlsHqInfo*      sfHqInfo
1102 ));
1103 /** 
1104  * @brief Request from Scheduler to release HARQ processes at MAC.
1105  * @details This primitive is used for light-weight loose coupling.
1106  */
1107
1108 S16 cmUnpkSchMacRlsHqReq ARGS((
1109    RlsHqReq             func,
1110    Pst*                 pst,
1111    Buffer               *mBuf
1112 ));
1113
1114 /** 
1115  * @brief Request from Scheduler to reset HARQ Entity at MAC.
1116  * @details This primitive is used for light-weight loose coupling.
1117  */
1118 S16 cmPkSchMacRstHqEntReq ARGS((
1119    Pst*                 pst,    
1120    RgInfResetHqEnt*     hqEntInfo
1121 ));
1122
1123 typedef S16 (*RstHqEntReq) ARGS((
1124    Pst*                 pst,    
1125    RgInfResetHqEnt*     hqEntInfo
1126 ));
1127
1128 /** 
1129  * @brief Request from Scheduler to reset HARQ entity at MAC for a scell of an ue.
1130  * This is triggered upon deactivation of a scell
1131  */
1132 S16 RgSchMacRstHqEntReq ARGS((
1133    Pst*                 pst,
1134    RgInfResetHqEnt*     hqEntInfo
1135 ));
1136 /** 
1137  * @brief Request from Scheduler to release HARQ processes at MAC.
1138  * @details This primitive is used for light-weight loose coupling.
1139  */
1140
1141 S16 cmUnpkSchMacRstHqEntReq ARGS((
1142    RstHqEntReq          func,
1143    Pst*                 pst,
1144    Buffer               *mBuf
1145 ));
1146 /** 
1147  * @brief Request from Scheduler to release RNTI at MAC.
1148  * @details  This primitive is used for light-weight loose coupling.
1149  */
1150 S16 cmPkSchMacRlsRntiReq ARGS((
1151    Pst*                 pst,    
1152    RgInfRlsRnti*        rlsRnti
1153 ));
1154
1155 typedef S16 (*RlsRntiReq) ARGS((
1156    Pst*                 pst,
1157    RgInfRlsRnti*        rlsRnti
1158 ));
1159
1160 /** 
1161  * @brief Request from Scheduler to release RNTI at MAC.
1162  * @details The Scheduler calls this primitive to send the list of RNTIs for 
1163  *  which the RRC Connection is being rejected.
1164  */
1165 S16 RgSchMacRlsRntiReq ARGS((
1166    Pst*                 pst,
1167    RgInfRlsRnti*        rlsRnt
1168 ));
1169 /** 
1170  * @brief Request from Scheduler to release RNTI at MAC.
1171  * @details  This primitive is used for light-weight loose coupling.
1172  */
1173 S16 cmUnpkSchMacRlsRntiReq ARGS((
1174    RlsRntiReq           func,
1175    Pst*                 pst,
1176    Buffer               *mBuf
1177 ));
1178 /* Added support for SPS*/
1179
1180 #ifdef LTEMAC_SPS
1181 /** 
1182  * @brief Primitive from MAC to Scheduler to indicate release of UL SPS for a UE
1183  * @details  This primitive is used for light-weight loose coupling.
1184  */
1185 S16 cmPkMacSchSpsRelInd ARGS((
1186    Pst*                 pst,    
1187    RgInfSpsRelInfo*     relInfo
1188 ));
1189
1190 typedef S16 (*SpsRelInd) ARGS((
1191    Pst*                 pst,    
1192    RgInfSpsRelInfo*     relInfo
1193 ));
1194
1195 /** 
1196  * @brief Indication from  MAC to Scheduler to release UL SPS for a UE 
1197  * @details  MAC calls this primitive to inform the scheduler that UL SPS needs
1198  * to be released for a UE
1199  */
1200 S16  RgMacSchSpsRelInd ARGS((Pst *pst, RgInfSpsRelInfo *relInfo));
1201
1202 S16 cmUnpkMacSchSpsRelInd ARGS((
1203    SpsRelInd            func,
1204    Pst*                 pst,
1205    Buffer               *mBuf
1206 ));
1207
1208 #endif
1209 #ifdef LTE_L2_MEAS
1210 S16 cmPkMacSchL2MeasCfm ARGS((
1211 Pst*                 pst,
1212 RgInfL2MeasCfm       *measCfm
1213 ));
1214
1215 S16 cmPkMacSchL2MeasStopCfm ARGS((
1216 Pst*                 pst,
1217 RgInfL2MeasCfm       *measCfm
1218 ));
1219
1220
1221 S16 cmPkSchMacL2MeasReq ARGS((
1222    Pst*                 pst,
1223    RgInfL2MeasReq      *measInfo
1224 ));
1225
1226 S16 cmPkSchMacL2MeasStopReq ARGS((
1227    Pst*                 pst,
1228    RgInfL2MeasStopReq *measInfo
1229 ));
1230
1231 S16 cmPkSchMacL2MeasSendReq ARGS((
1232    Pst*                 pst,
1233    RgInfL2MeasSndReq *measInfo
1234 ));
1235 typedef S16 (*L2MeasReq) ARGS((
1236    Pst*                 pst,    
1237    RgInfL2MeasReq       *measInfo
1238 ));
1239
1240 typedef S16 (*L2MeasStopReq) ARGS((
1241    Pst*                 pst,
1242    RgInfL2MeasStopReq *measInfo
1243 ));
1244
1245 typedef S16 (*L2MeasSendReq) ARGS((
1246    Pst*                 pst,
1247    RgInfL2MeasSndReq *measInfo
1248 ));
1249 typedef S16 (*L2MeasStopCfm) ARGS((
1250    Pst                *pst,
1251    RgInfL2MeasCfm     *measCfm
1252 ));
1253
1254 typedef S16 (*L2MeasCfm) ARGS((
1255    Pst                *pst, 
1256    RgInfL2MeasCfm     *measCfm
1257 ));
1258 S16 cmUnpkMacSchL2MeasCfm ARGS
1259 ((
1260 L2MeasCfm      func,
1261 Pst            *pst,
1262 Buffer         *mBuf
1263 ));
1264 S16 cmUnpkSchMacL2MeasReq ARGS((
1265    L2MeasReq      func,
1266    Pst            *pst,
1267    Buffer         *mBuf
1268 ));
1269 S16 cmUnpkSchMacL2MeasSendReq ARGS((
1270    L2MeasSendReq      func,
1271    Pst            *pst,
1272    Buffer         *mBuf
1273 ));
1274 S16 cmUnpkSchMacL2MeasStopReq ARGS((
1275    L2MeasStopReq      func,
1276    Pst            *pst,
1277    Buffer         *mBuf
1278 ));
1279
1280 S16 cmUnpkMacSchL2MeasStopCfm ARGS((
1281    L2MeasCfm      func,
1282    Pst            *pst,
1283    Buffer         *mBuf
1284 ));
1285 #endif
1286 S16  RgSchMacRlsRnti ARGS((Pst* pst, RgInfRlsRnti* rlsRnti));
1287 S16  RgSchMacRlsHq ARGS((Pst* pst, RgInfRlsHqInfo* sfHqInfo));
1288 S16  RgSchMacSfAlloc ARGS((Pst* pst, RgInfSfAlloc* resAllocReq));
1289 S16  RgSchMacRstHqEnt ARGS((Pst* pst, RgInfResetHqEnt* hqEntInfo));
1290 S16  RgMacSchSfRecp ARGS((Pst* pst, RgInfSfDatInd* datInd));
1291 S16  RgMacSchCmnBoUpdt ARGS(( Pst* pst, RgInfCmnBoRpt* boRpt));
1292 S16 RgMacSchDedBoUpdt ARGS(( Pst* pst, RgInfDedBoRpt* boRpt));
1293 S16  RgSchMacCellReg ARGS((Pst* pst,RgInfCellReg* regReq));
1294 #ifdef LTE_L2_MEAS
1295 S16 RgSchMacL2Meas ARGS((Pst* pst, RgInfL2MeasReq* l2MeasReq));
1296 S16 RgMacSchL2Meas ARGS((Pst* pst, RgInfL2MeasCfm* l2MeasCfm));
1297 S16 RgSchMacL2MeasStop ARGS((Pst* pst, RgInfL2MeasStopReq *measInfo));
1298 S16 RgSchMacL2MeasSend ARGS((Pst* pst, RgInfL2MeasSndReq *measInfo));
1299 #endif  /* LTE_L2_MEAS */
1300 /* Added support for SPS*/
1301 #ifdef LTEMAC_SPS
1302 S16 RgSchMacSpsLcReg ARGS((Pst *pst, RgInfSpsLcInfo *lcInfo));
1303 S16 RgSchMacSpsLcDereg ARGS((Pst *pst, CmLteCellId cellId, CmLteRnti
1304     crnti));
1305 S16 RgMacSchSpsRel ARGS((Pst *pst, RgInfSpsRelInfo* relInfo));
1306 #endif
1307 S16 RgMacSchUeDel ARGS((Pst* pst, RgInfUeDelInd*  ueDelInd));
1308 #ifdef __cplusplus
1309 }
1310 #endif
1311 #endif /* __GKSCH_X__*/
1312
1313 /**********************************************************************
1314   
1315          End of file
1316 **********************************************************************/