macCellCfg
[o-du/l2.git] / src / 5gnrmac / rg.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:   X include file
24  
25     Desc:   Defines required by LTE MAC
26  
27     File:  rg.x 
28  
29 **********************************************************************/
30  
31 /** @file rg.x
32 @brief This file contains basic data structures for the Mac.
33 */
34  
35 #ifndef __RGX__
36 #define __RGX__
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41
42 #ifdef EMTC_ENABLE
43 #include "rg_emtc.x"            /* typedefs for MAC */
44 #endif
45
46 /** @brief Logical Channel Id */
47 typedef RgPrgLteLcgId      LteLcgId;        
48 typedef RguDDatReqInfo     RgRguDedDatReq;
49 typedef RguCDatReqInfo     RgRguCmnDatReq;
50 typedef RguDStaRspInfo     RgRguDedStaRsp;
51 typedef RguCStaRspInfo     RgRguCmnStaRsp;
52 typedef RguDStaIndInfo     RgRguDedStaInd;
53 typedef RguCStaIndInfo     RgRguCmnStaInd;
54 typedef RguDDatIndInfo     RgRguDedDatInd;
55 typedef RguCDatIndInfo     RgRguCmnDatInd;
56 typedef RguLchStaInd       RgRguLcStaInd;
57 typedef TfuPdschDciInfo    RgTfuPdschDciInfo;
58 typedef TfuDatReqInfo      RgTfuDatReqInfo;
59 typedef TfuDatReqPduInfo   RgTfuDatReqPduInfo;
60 typedef RguDDatReqPerUe    RgRguDDatReqPerUe;
61 #ifdef L2_OPTMZ
62 typedef TfuDatReqTbInfo    RgTfuDatReqTbInfo;
63 #endif
64
65 #ifdef LTE_L2_MEAS
66 typedef struct rgL2MeasCb     RgL2MeasCb;
67 typedef struct rgQciCb        RgQciCb;
68
69 typedef RguL2MUlThrpMeasReqInfo RgRguL2MUlThrpMeasReq;
70
71 #endif /* LTE_L2_MEAS */
72 /* Forward declarations for some structures */
73 typedef struct rgUeCb         RgUeCb;
74 typedef struct rgErrInfo      RgErrInfo;
75 typedef struct rgCellCb       RgCellCb;
76 typedef struct rgUlHqProcCb   RgUlHqProcCb;
77 typedef struct rgDlHqProcCb   RgDlHqProcCb;
78 typedef struct rgLcgCb        RgLcgCb;
79 typedef struct rgDlHqEnt      RgDlHqEnt;
80 typedef struct _rgCb          RgCb;
81 typedef RgPrgUlLcInfo         RgUlLcCb;
82 typedef RgPrgDlLcInfo         RgDlLcCb;
83
84
85 #ifdef LTE_L2_MEAS
86 /* @brief UE Specific Uplink allocation info needed for measurements */
87 typedef struct rgUeUlAlloc
88 {
89    CmLteRnti        rnti;      /*!< Ue Id */ 
90    U8               numPrb;    /*!< Number of total PRB's allocated for this UE */
91 } RgUeUlAlloc;
92 /**
93  * @brief Structure hold uplink allocation information for sub frames.
94  * */
95 typedef struct rgUlSf
96 {
97    CmLteTimingInfo schdTime;       /*!< scheduled frame and subframe number */
98    U8              numUe;          /*!< Number of UE's allocated in this uplink
99                                       subframe */
100    RgUeUlAlloc     *ueUlAllocInfo; /*!< Uplink alloc infor for this subframe */
101 } RgUlSf;
102
103 /** @brief
104  *  L2 measurement control block.
105  *  */
106 struct rgL2MeasCb
107 {
108    CmLList            measLnk;        /*!< MeasCb node */
109    RgInfL2MeasReq     measReq;        /*!< Request received for measurement */
110    CmLteTimingInfo    startTime;      /*!< Time at which measurement started */
111    U32                sfnCycle;       /*!< Count of Num of SFN wraps */ 
112 };
113 /** @brief
114  *  Control block to store Logical Channels with Qci.
115  *  */
116 struct rgQciCb
117 {
118    U8               qci;      /*< QCI for measurement */
119    U32              prbCount; /*!< Cummulative PRB count */
120    U8               mask;     /*!< Measurement Active or Not*/
121    CmLteTimingInfo  startTime;/*!< Time at which measurement started */
122 };
123 #endif /* LTE_L2_MEAS */
124 /**
125   * @brief
126   * Information about one PDCCH.
127   */
128 typedef struct rgPdcch {
129    CmLteRnti         rnti;    /*!< RNTI to who the PDCCH is allocated */
130    RgTfuPdschDciInfo dci;     /*!< PDCCH format */
131 } RgPdcch;
132
133 typedef struct rgBcchTb
134 {
135    RgPdcch        pdcch;
136    Buffer         *tb;
137    U16            txPwrOffset; /*!< PDSCH Tx Pwr offset */
138 } RgBcchTb;
139
140 typedef struct rgPcchTb
141 {
142    RgPdcch        pdcch;
143    Buffer         *tb;
144    U16            txPwrOffset; /*!< PDSCH Tx Pwr offset */
145 } RgPcchTb;
146
147 typedef struct rgRaRspAlloc
148 {
149    RgPdcch        pdcch;     /*!< NULLP if no Rsp allocation done for raRnti*/
150    Buffer         *rar;
151    U16            txPwrOffset; /*!< PDSCH Tx Pwr offset */
152 }RgRaRspAlloc;
153
154 typedef struct rgBchTb
155 {
156    Buffer         *tb;    /*!< BCH data for this frame */
157 }RgBchTb;
158
159
160 typedef struct rgDlSf
161 {
162    CmLteTimingInfo schdTime;  /*!< scheduled frame and subframe number */
163    Bool           txDone;     /*!< Flag to indicate transmission done */
164 /* ADD Changes for Downlink UE Timing Optimization */
165 #ifdef LTEMAC_DLUE_TMGOPTMZ  
166    U8            remDatReqCnt; /*!< Counter to maintain count of Ded data received.*/  
167    /* Fix [ccpu00126310]: Tracks Data Requests from RLC for both loosely and tight coupled 
168       RLC-MAC */
169    Bool           statIndDone; /*!< Marks sending of all status indication done */
170 #endif
171    RgBchTb        bch;        /*!< BCH data for this frame */
172    RgBcchTb       bcch;       /*!< BCCH allocation for this frame */
173 #ifdef EMTC_ENABLE
174    RgEmtcBcchTb   emtcBcch;   /*!< EMTC BCCH allocation for this frame */
175 #endif
176    RgPcchTb       pcch;       /*!< PCCH allocation for this frame */
177    CmLListCp      tbs;        /*!< TBs or DL HARQ processes */
178    U8             numRaRsp;   /*!< No.of RaRsp */
179    RgRaRspAlloc   raRsp[RG_MAX_RA_RNTI]; /* Array of list of Ra Rsp 
180                                        Allocations for each rarnti */
181    U8    numTbReqsSent;        /*!< Number of TB requests sent towards SMAC.
182    Total numTbReqsSent will be equal to maximum secondary cells */                               
183 } RgDlSf;
184
185 /** 
186   * @brief
187   * Logical channel control block for BCCH and PCCH channels. 
188   */
189 typedef struct rgBcchDlschLcCb
190 {
191    CmLteLcId       lcId;                     /*!< Logical channel ID */
192    Buffer          *tb;
193 } RgBcchDlschLcCb;
194
195 typedef struct rgBcchBchLcCb
196 {
197    CmLteLcId       lcId;                     /*!< Logical channel ID */
198 } RgBcchBchLcCb;
199
200 typedef struct rgPcchLcCb
201 {
202    CmLteLcId       lcId;                     /*!< Logical channel ID */
203 } RgPcchLcCb;
204
205 /** 
206   * @brief
207   * Random access information per cell. 
208   */
209 typedef struct rgRaInfoCb
210 {
211    CmLListCp       ueRachLst;                   /*!< List of RaCbs */
212 } RgRaInfoCb;
213
214 typedef struct rgSchInstMap
215 {
216    S16          cellSapId; /*!< SAP ID of the cell in scheduler instance */
217    Inst          schInst;  /*!< Scheduler instance that is serving this cell*/
218 } RgSchInstMap;
219
220 /** 
221   * @brief
222   * Configuration Information for Upper SAPs at RGU,CRG and RGR interfaces.
223   */
224 typedef struct rgUpSapCfgInfo
225 {
226    Pst  sapPst;              /*!< Post information associated with SAP */
227    SpId spId;                /*!< SpId associated with SAP */
228    SuId suId;                /*!< SuId associated with SAP */
229 }RgUpSapCfgInfo;
230
231 /** 
232   * @brief
233   * Configuration Information for Lower SAP at TFU interface
234   */
235 typedef struct rgLowSapCfgInfo
236 {
237    Pst    sapPst;            /*!< Post information associated with SAP */
238    SpId   spId;              /*!< SpId associated with SAP */
239    SuId   suId;              /*!< SuId associated with SAP */
240    TmrCfg bndTmr;            /*!< Bind Timer Value */
241 }RgLowSapCfgInfo;
242
243 /** 
244   * @brief
245   * Control Block structure for Upper SAPs at RGU,CRG and RGR interfaces.
246   */
247 typedef struct rgUpSapCb
248 {
249    RgUpSapCfgInfo sapCfg;    /*!< Configuration information */
250    RgSapSts     sapSts;      /*!< Statistics related to SAP */
251    RgSapSta     sapSta;      /*!< SAP Status */
252 }RgUpSapCb;
253
254 /** 
255   * @brief
256   * Control Block structure for Lower SAP at TFU interface.
257   */
258 typedef struct rgLowSapCb
259 {
260    RgLowSapCfgInfo sapCfg;          /*!< SAP configuration information */
261    RgSapSts        sapSts;          /*!< Statistics related to SAP */
262    RgSapSta        sapSta;          /*!< SAP Status */
263    U8              numBndRetries;   /*!< Number of Bind Retries */
264 }RgLowSapCb;
265
266 /**
267   * @brief
268   * MAC sub-header control block for 5G-NR MAC
269   * sub-hdr for fixed size MAC CE - 1 octat(R/R/LCID)
270   * sub-hdr for variable size MAC CE or MAC SDU -2/3 octat(R/F/LCID/L(8/16 bits))
271   * 
272   */
273 typedef struct RgMUXSubHdr
274 {
275    U8 shLen;  
276    U8 shData[RG_MAX_SDU_SUB_HDR_LEN]; /* RRLCID/RFLCID + F-L (O) + L (O) */
277 } RgMUXSubHdr;
278
279
280 /** 
281   * @brief
282   * Cell Control block per cell 
283   */
284 struct rgCellCb
285 {
286    CmHashListEnt  cellLstEnt;       /*!< Hash list Entity for cell list */
287    RgSchInstMap   schInstMap;      /*!< Sch Inst Info */
288    CmLteCellId    cellId;           /*!< Cell ID */
289    CmLteTimingInfo crntTime;
290    U8             maxDlHqProcPerUe;  /*!< Store based on FDD/TDD(UL/DL Index) */
291    CrgBwCfg        bwCfg;            /*!< Bandwidth Configuration */
292    CrgRachCfg      rachCfg;          /*!< RACH Configuration */
293
294    RgUpSapCb    *rguDlSap;            /*!< RGU SAP Control Block for RLC DL  */
295    RgUpSapCb    *rguUlSap;           /*!< RGU SAP Control Block  for RLC UL*/
296    Inst         macInst;            /*!< MAC Instance id for this cell */
297    U8           cellActvState;      /*!< Bitmask indicating if cell is active:
298                                        Cell is active only after BCCH, PCCH, DL
299                                        CCCH, UL CCCH and scheduler config */
300    CmLteLcId       ulCcchId;         /*!< LcId for uplink CCCH */
301    CmLteLcId       dlCcchId;         /*!< LcId for downlink CCCH */ 
302    RgBcchBchLcCb  bcchBchInfo;      /*!< BCCH mapped on BCH 
303                                        logical channel control block */
304    RgPcchLcCb      pcchInfo;        /*!< PCCH logical channel control block */
305    U8              numBcchDlschInfo;
306    RgBcchDlschLcCb bcchDlschInfo[RG_MAX_BCCH_DLSCH]; /*!< BCCH mapped on DLSCH 
307                                              logical channel control block */
308    CmHashListCp    ueLst;            /*!< Hash list of UE control 
309                                                    blocks: RgUeCb */
310    /*Added support for SPS*/
311 #ifdef LTEMAC_SPS
312    CmHashListCp    spsUeLst;         /*!< Hash list of UECbs with SPS-Rnti
313                                                   : Element is RgUeCb */
314 #endif
315    RgRaInfoCb      raInfo;           /*!< Random access related information for
316                                           cell */
317    RgDlSf          subFrms[RG_NUM_SUB_FRAMES];
318 #ifdef LTE_L2_MEAS
319    CmLListCp         l2mList;                     /*!< List of all L2M requests
320                                                      rgSchL2MeasCb */
321    RgQciCb           qciArray[LRG_MAX_QCI];       /*!< List of all qci's configured
322                                                       rgQciCb */
323    RgUlSf            ulSf[RG_NUM_UL_SUB_FRAMES];  /*!< UL Sub frame */
324    Bool              sndL2Meas;                   /*!< Send L2 Meas when No L2 Measuremnt timer is running*/
325
326    U32               ttiCycle;             /*!< Count of Number of 10240 Cycles
327                                              completed */
328
329 #endif /* LTE_L2_MEAS */
330    RguFlowCntrlInd  *flowCntrlInd;        /*!<Pre Alloced buffer for flow control */
331    /* RRM_SP1_START */
332    U32             qcisUlPrbCnt[RG_MAX_QCI_REPORTS];         /*!< GBR Lc PRB count */
333    /* RRM_SP1_END */
334 #ifdef LTE_ADV
335   //RgLaaTbReq  *laaCellHqPLst[RG_MAX_SCELL_PER_UE]; /*!< LAA: List containing of TBs requested per
336                                             //SCELL*/
337   Void * laaCb;
338 #endif
339 #ifdef EMTC_ENABLE
340     U8               emtcEnable;
341 #endif
342 };
343
344 /**
345   * @brief
346   * Uplink HARQ entity information per UE.
347   */
348 typedef struct rgUlHqEnt
349 {
350    U8           maxHqRetx;        /*!< Maximum number of harq
351                                    * re-transmissions */ 
352 } RgUlHqEnt;
353 #ifdef LTE_L2_MEAS
354
355 /**
356   * @brief Structure to hold Uplink throughtput info for L2 measurement.
357   *
358   * @details
359   *   - outStndngBs     : outstanding buffer status
360   *   - firstDatSegRcvd : first dat req seg recvd
361   *   - frstSegTimInfo  : fisrt seg time information
362   *   - nextSegTimInfo  : next seg time information
363   *   - segInd          : UL thrgouthput indication
364   *   - fSegTtiCycNum   : First Seg tti cycles
365   *   - nSegTtiCycNum   : next seg tti cycles
366   */
367 typedef struct rgL2MeasUlThrP
368
369    S32 outStndngBs;                 /*!< outstanding buffer status*/
370    Bool firstDatSegRcvd;            /*!< first dat req seg recvd*/
371    CmLteTimingInfo frstSegTimInfo;  /*!< fisrt seg time information*/
372    CmLteTimingInfo nextSegTimInfo;  /*!< next seg time information*/
373    RguL2MUlThrpSegInd segInd;       /*!< UL thrgouthput indication*/
374    U32 fSegTtiCycNum;               /*!< First Seg tti cycles*/
375    U32 nSegTtiCycNum;               /*!< next seg tti cycles*/
376 } RgL2MeasUlThrP;
377 #endif
378
379 /** 
380   * @brief
381   * Logical channel group
382   */
383 struct rgLcgCb
384 {
385    /* Right now not keeping associated logical channels, searching for
386     * associated channels needed only during config */
387    LteLcgId    lcgId;  /*!< Group ID */
388    U8          lcCount;
389 #ifdef LTE_L2_MEAS
390
391    RgL2MeasUlThrP lcgBsInfo;
392
393 #endif
394    Bool        isGbr;  /*!< Indicate if LCG is GBR LCG */
395 };
396
397
398
399
400 /**
401   * @brief
402   * Uplink control block for UE specific information
403   */
404 typedef struct rgUeUlCb
405 {
406    RgUlHqEnt  hqEnt;      /*!< Uplink HARQ information for the UE */
407    RgUlLcCb   lcCb[RG_MAX_LC_PER_UE]; /*!< Dedicated Uplink logical channel 
408                                            information */
409    RgLcgCb    lcgArr[RG_MAX_LCG_PER_UE]; /*!< Logical channel groups */
410    /* Added support for SPS*/
411 #ifdef LTEMAC_SPS
412    Bool            spsLcId[RG_MAX_LC_PER_UE];  /*!< Set to TRUE for SPS LCs */ 
413    U8              implRelCntr;    /*!< Number of empty sps transmissions for
414                                     implicit(?) release */
415    U8              implRelCnt; /*!< Configured value of implicitRelAfter +
416                                     RG_ADDL_SPS_OCC_FOR_EXP_REL */
417    U8              explRelCntr;/*!< Counter to track explicit release */
418    U8              explRelCnt; /*!< Count to trigger explicit release */
419 /*Added for explicit release - start*/
420    U8              spsDatRcvd; /*!< Count to track SPS data for explicit 
421                      release*/
422    U32             totSpsDatRcvd; /*!< total number of SPS data recieved
423                      from activation*/
424 #endif
425 } RgUeUlCb;
426
427 /** 
428   * @brief
429   * Logical channel data as being scheduled by the scheduler.
430   */
431 typedef struct rgLchSchdData
432 {
433    CmLteLcId       lcId;       /*!< Logical channel ID */
434    U32             schdSz;   /*!< Scheduled logical channel data */
435 } RgLchSchdData;
436
437 /** 
438   * @brief
439   * Contention Resolution ID. 
440   */
441 typedef struct RgContResId
442 {
443    U8        resId[RG_CRES_LEN];
444 }RgContResId;
445
446 /** 
447   * @brief
448   * Used to keep sf and SfLnk in Tb. 
449   */
450 typedef struct rgTbSfLnkInfo
451 {
452    RgDlSf          *sf;   /*!< Sf pointer to check if SfAlloc came for Tb in a SF */
453    CmLList         sfLnk; /*!< Used to queue it up on a subfrm */
454 }RgTbSfLnkInfo;
455
456 /** 
457   * @brief
458   * Transport Block Info scheduled by the scheduler.
459   */
460 typedef struct rgTbInfo{
461    U8              numSchLch;
462    RgLchSchdData   schdData[RG_MAX_NUM_DED_LC];
463    TknU8           schdTa;  /*!< TA scheduled to be sent */
464    /* Changed as a result of CR timer implementation*/
465    U8              contResCe;   /*!< Contention Resolution CE scheduled 
466                                    to be sent */
467    RgContResId     *contResId;  /*!< Contention Resolution Identity */
468 #ifndef L2_OPTMZ
469    Buffer          *tb;    /*!< Multiplexed Pdu */
470 #else
471    /* L2 Optimization for mUe/Tti:Pre-allocated MAC Hdr, MAC CEs and padding
472     * will be used to store and send to CL. These pointer will be allocated
473     * during Harq Proc creation. CL shall not free these pointers.
474     * These pointers will be freed duing harq proc deletion
475     */
476     RgTfuDatReqTbInfo     tb;   /* TB to be sent to CL/PHY*/
477 #endif
478 /* Changes for MIMO feature addition */
479 /* Removed dependency on MIMO compile-time flag */
480    U32             tbSz;   /*!< TB size scheduled for the hqP */    
481    RgPdcch         pdcch;  /*!< PDCCH allocated for this HQ Proc */
482    /* Adding Array of sfLnk in case of repetitions because same lnk in mutiple
483     * list causing issues*/
484    RgTbSfLnkInfo   sfLnkInfo[2]; /*!< Used to queue it up on a subfrm */
485    RgDlSf          *sf;
486    CmLteTimingInfo timingInfo; /*!<This field holds the scheduled time */
487    TknU32           doa;
488    TfuTxMode        txMode;
489    Bool              puschRptUsd; /*!< True if Precoding Info in PDCCH has to be
490                                    in-accordance with the latest PUSCH report */
491    TfuDlCqiPuschInfo puschPmiInfo;/*!< PUSCH report details for explicit PMI
492                                        * information to PHY during a PDSCH */
493    /* LTE_ADV_FLAG_REMOVED_START */
494 #ifdef TFU_UPGRADE
495    U8            pa;                 /* DL Power control paramter P_A
496                                      configured by higher layers
497                                      Ref: RRC 36.331, 6.3.2,
498                                      PDSCH-Config*/
499 #endif
500    U8 isEnbSFR;
501 #ifdef LTE_ADV
502    TknU8           sCellActCe;     /*!< SCell Act ce scheduled to be sent */
503 #endif
504    /* LTE_ADV_FLAG_REMOVED_END */
505 }RgTbInfo;
506
507 /** 
508   * @brief
509   * Downlink HARQ process information per UE.
510   */
511 struct rgDlHqProcCb
512 {
513    U8              procId;    /*!< HARQ process ID */
514 /* Changes for MIMO feature addition */
515 /* Removed dependency on MIMO compile-time flag */
516    U8              numOfTBs;
517    RgTbInfo        tbInfo[RG_MAX_TB_PER_UE];
518    U16             saveId; // laa
519 #ifdef LTE_L2_MEAS
520
521    U32           tbId[RGU_MAX_TB];          /*!< RLC's internal tbId */                                    
522    U16           status[RGU_MAX_TB];        /*!< Status back to RLC ACK/NACK*/
523 #endif /* LTE_L2_MEAS */
524 /* Changes for MIMO feature addition */
525 /* Removed dependency on MIMO compile-time flag */
526 };
527
528
529 /** 
530   * @brief
531   * Downlink HARQ entity information per UE.
532   */
533 struct rgDlHqEnt
534 {
535    U8           numHqProcs;
536    RgDlHqProcCb *procs[RG_MAX_DL_HARQ_NUM]; /*!< Downlink harq processes */
537    CmLListCp    savedProcLst[RG_MAX_DL_HARQ_NUM]; /*!< laa: Saved TBs for the release Hq Procs*/
538 };
539
540
541
542 /**
543   * @brief
544   * Downlink control block for UE specific information.
545   */
546 typedef struct rgUeDlCb
547 {
548    RgDlHqEnt  hqEnt;        /*!< Downlink HARQ information for the UE */          
549    RgDlLcCb   lcCb[RG_MAX_LC_PER_UE];/*!< Dedicated Downlink logical channels in
550 UE */ 
551 } RgUeDlCb;                   
552
553 #ifdef LTE_ADV
554 typedef struct rgSCellAddCfgCfmInfo
555 {
556    CrgCfgTransId   transId;   /*!< Scell add transaction id*/
557    U8              numSCells; /*!< Used to check if config cfm rcvd from all Scells*/ 
558    U8              cfgCfgCount; /*!< Keep count of cfg confirms recvd */
559    U8              mask; /*!< Cfg cfm mask */
560 }RgSCellAddCfgCfmInfo;
561
562 typedef struct rgSCelInfo
563 {
564    Bool           isSCellAdded;     /*!< is Cell Added TRUE/FALSE */
565    Inst           macInst;          /*!< MAC Instance of that 
566                                          Cell Added */
567    CmLteCellId    sCellId;          /*!< Secondary Cell ID */
568 }RgSCelInfo;
569
570 #endif
571
572 /** 
573   * @brief
574   * UE control block for UE specific information
575   */
576 struct rgUeCb
577 {
578    CmHashListEnt     ueLstEnt;   /*!< Hash List entity for UE List */
579    /* Added suport for SPS*/
580 #ifdef LTEMAC_SPS
581    CmHashListEnt     spsUeLstEnt;/*!< Hash List entity for SPS Rnti */
582 #endif
583    CmLList           rachLstEnt; /*!< Link List entity for RACH UE List*/ 
584    CmLteRnti         ueId;       /*!< UE identifier */
585    /* Added suport for SPS*/
586 #ifdef LTEMAC_SPS
587    CmLteRnti         spsRnti;    /*!< SPS-Rnti for the UE */
588 #endif
589    RgContResId       contResId;  /*!< Contention Resolution Identity */
590    RgUeUlCb          ul;        /*!< UE Specific Uplink information */
591    RgUeDlCb          dl;        /*!< UE Specific Downlink information */
592 /* Changes for MIMO feature addition */
593 /* Removed dependency on MIMO compile-time flag */
594    CrgTxMode         txMode;      /*!< UE Transmission mode Cfg */
595    RgUpSapCb        *rguDlSap;    /*!< RGU SAP Control Block for RLC DL  */
596    RgUpSapCb        *rguUlSap;    /*!< RGU SAP Control Block  for RLC UL*/
597 #ifdef LTE_ADV
598    RgSCelInfo        sCelInfo[RG_MAX_SCELL_PER_UE]; /*!<sCell Information */
599    RgSCellAddCfgCfmInfo cfgCfmInfo; /*!< Scell add cfg cfm info*/
600 #endif /* LTE_ADV */
601 };
602
603 /** 
604   * @brief
605   * structure holding Layer Manager Response information cached from control
606   * request.
607   */
608 typedef struct rgLmResponse
609 {
610    TranId transId;           /*!< Transaction ID */
611    Resp   response;          /*!< Response */
612 }RgLmResponse;
613
614 /** 
615   * @brief
616   * Structure holding LTE MAC's General Configuration Information.
617   */
618 typedef struct rgGenCb
619 {
620    U8           tmrRes;           /*!< Timer resolution */
621    RgLmResponse trcResp;          /*!< Response value for Trace Indication */
622    RgLmResponse ustaResp;         /*!< Respones value for Alarms */
623    RgLmResponse bndCfmResp;       /*!< Respones value for Bind Confirm */
624    Status       memUpperThr;      /*!< upper threshold of the memory pool */
625    Status       memLowerThr;      /*!< lower threshold of the memory pool */
626 }RgGenCb;
627
628
629
630 /** 
631   * @brief
632   * Global Control block for LTE-MAC.
633   */
634 struct _rgCb
635 {
636    TskInit      rgInit;                    /*!< Task Init information */
637    S16          trcLen;                    /*!< trace length */
638    RgGenCb      genCfg;                    /*!< General Config information */
639    U8           numRguSaps;                /*!< Numb of RGU SAP Control Block */
640    RgUpSapCb    *rguSap;                     /*!< RGU SAP Control Block */
641    RgUpSapCb    crgSap;                    /*!< CRG SAP Control Block */
642    RgLowSapCb   tfuSap;                    /*!< TFU SAP Control Block */
643    RgGenSts     genSts;                    /*!< General Statistics */
644    CmTqCp       tmrTqCp;                   /*!< Timer Task Queue Cntrl Point */
645    CmTqType     tmrTq[RG_TQ_SIZE];         /*!< Timer Task Queue */
646    CmTimer      tmrBlk[RG_MAX_TIMER];      /*!< Timer Block */
647    RgCellCb *inactiveCell;                     /*!< Reference of last accessed cellCb*/
648    RgCellCb *cell;                     /*!< Reference of last accessed cellCb*/
649    RgCellCb *prevCell;                     /*!< Reference of last accessed cellCb*/
650    U8 bufCnt;                              /*!< Count of buffers in buffersToFree[] */
651    Buffer *bufToFree[RG_MAX_DFRD_FREE_BUFS];/*!< List of Shared Buffers to be freed */
652    MacCellCfg macCellCfg;   /* MAC cell config paramters */
653 };
654
655 /* Declaration for RgCb */
656 EXTERN RgCb rgCb[RG_MAX_INST];
657
658 /** 
659   * @brief
660   * Subheader of MAC SDU.
661   */
662 typedef struct rgMacSdu
663 {
664    CmLList  sduLstEnt;  /*!< List entry for MAC SDU subheader */
665    CmLteLcId       lcId;       /*!< Logical channel ID */
666    U16      len;        /*!< Length of the SDU */
667    Buffer   *mBuf;      /*!< SDU Buffer */
668 } RgMacSdu;
669
670 /** 
671   * @brief
672   * MAC PDU Contents.
673   */
674 typedef struct rgMacPdu
675 {
676    CmMemListCp memCp;     /*!< Memory control point */
677    CmLListCp   sduLst;    /*!< List of SDUs */
678 } RgMacPdu;
679
680 /** 
681   * @brief
682   * Carries the Error Information.
683   */
684 struct rgErrInfo
685 {
686    U8    errType;    /*!< Error Type */
687    U16   errCause;   /*!< Cause of Error */
688 };
689
690 /** 
691   * @brief
692   * Carries the Information to build PDU.
693   */
694 typedef struct rgBldPduInfo
695 {
696    Void           *datReq;    /*!< Common/Dedicated Dat Request */
697    U8             reqType;    /*!< EVTRGUCDATREQ/EVTRGUDDATREQ */
698    MsgLen         schdTbSz;   /*!< Schedule TB size */
699    U8             tbIndex;    /*!< Transport Block Index */
700    TknU8          ta;         /*!< Timing Advance */
701    RgContResId    *contResId; /*!< Contention Resolution ID */
702 #ifdef LTE_ADV
703    TknU8          sCellActCe; /*!< SCell Act CE info */
704 #endif
705 } RgBldPduInfo;
706
707
708
709 /* APIs exposed by LIM */
710
711 #ifdef LTE_L2_MEAS /*LTE_L2_MEAS_PHASE2*/
712 EXTERN S16 rgAddToL2MeasPerQci ARGS ((RgCellCb  *cell,U8 qci));
713 #endif
714 EXTERN S16 rgLIMTfuBndReq ARGS((
715          Inst                 inst,
716          SuId                 suId,
717          SpId                 spId));
718
719 EXTERN S16 rgLIMTfuUbndReq ARGS((
720          Inst                 inst,
721          SuId                 suId,
722          Reason               reason));
723
724 EXTERN S16 rgLIMTfuDatReq ARGS((
725          Inst          inst,
726          TfuDatReqInfo *datReq));
727 #ifdef L2_OPTMZ
728 EXTERN S16 rgLIMTfuDelDatReq ARGS((
729          Inst          inst,
730          TfuDelDatReqInfo *datReq));
731 #endif /*L2_OPTMZ */
732 /* APIs exposed by TOM */
733
734 EXTERN S16 rgTOMDatInd ARGS((
735          Inst          inst,
736          TfuDatIndInfo *datInd));
737
738 EXTERN S16 rgTOMTtiInd ARGS((
739          Inst          inst,
740          TfuTtiIndInfo *ttiInd));
741 EXTERN Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
742
743 EXTERN S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
744
745 /*
746  * APIs exposed by LMM
747  */
748 EXTERN S16 rgLMMStartTmr ARGS((Inst inst,S16 tmrEvnt, U32 tmrVal, PTR cb));
749 EXTERN S16 rgLMMStopTmr ARGS((Inst inst,S16 tmrEvnt, PTR cb));
750 EXTERN S16 rgLMMTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
751 /* To send a Unsolicited Status Indication to Layer Manager */
752 EXTERN S16 rgLMMStaInd ARGS((Inst inst,U16 category, U16 event, U16 cause, RgUstaDgn *dgn));
753 /* To send a Trace Indication to Layer Manager.
754  * srcMbuf is not freed. caller has to take care. */
755 EXTERN Void rgLMMTrcInd ARGS((Inst inst,Buffer *srcMbuf, U8 event));
756 /* LIM uses this to forward the BndCfm to LMM. This function invokes a
757  * Control Confirmation to the LM. */
758 EXTERN S16 rgLMMBndCfm ARGS((Pst *pst, SuId suId, U8 status));
759 EXTERN S16 rgActvTmr ARGS((Ent ent, Inst inst ));
760 EXTERN S16 rgActvInit ARGS((Ent entity, Inst inst, Region 
761        region, Reason reason));
762 EXTERN S16 rgActvTsk ARGS((Pst *pst, Buffer *mBuf));
763
764 /* 
765  * APIs exposed by CFG module
766  */
767 EXTERN S16 rgCFGVldtCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
768 EXTERN S16 rgCFGVldtCrgUeCfg ARGS((Inst inst,CrgUeCfg  *ueCfg, RgCellCb  **cell, RgErrInfo
769       *errInfo));
770 EXTERN S16 rgCFGVldtCrgLcCfg ARGS((Inst inst,CrgLchCfg *lcCfg, RgCellCb **cell, RgUeCb
771       **ue, RgErrInfo  *errInfo));
772 EXTERN S16 rgCFGVldtCrgCellRecfg ARGS((Inst inst,CrgCellRecfg *cellRecfg, RgCellCb **cell,
773       RgErrInfo *errInfo));
774 EXTERN S16 rgCFGVldtCrgUeRecfg ARGS((Inst inst,CrgUeRecfg *ueRecfg, RgCellCb **cell,
775       RgUeCb **ue, RgErrInfo *errInfo));
776 EXTERN S16 rgCFGVldtCrgLcRecfg ARGS((Inst inst,CrgLchRecfg *lcRecfg, RgCellCb **cell,
777       RgUeCb **ue, RgUlLcCb **ulLc, RgErrInfo *errInfo));
778 EXTERN S16 rgCFGVldtCrgUeReset ARGS ((Inst inst,CrgRst *reset,RgCellCb **cell,RgUeCb **ue,
779          RgErrInfo   *errInfo));
780
781 EXTERN S16 rgCFGCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
782 EXTERN S16 rgCFGCrgUeCfg ARGS((Inst inst,RgCellCb  *cell, CrgUeCfg  *ueCfg, RgErrInfo
783       *errInfo));
784
785 #ifdef LTE_ADV
786 EXTERN S16 rgFillAndAddSCellCfg ARGS((Inst inst, RgCellCb  *cell, 
787          CrgUeRecfg *ueRecfg, CrgCfgTransId transId, Bool *isCfmRqrd));
788 EXTERN S16 rgDelUeFrmAllSCell ARGS(( RgCellCb       *cell, RgUeCb         *ue));
789 EXTERN S16 rgUtlVltdAddSCellCfg ARGS ((RgPrgUeSCellCfgInfo *ueSCellCb,
790                                        RgCellCb    *cell,
791                                        Inst        inst
792                                      ));
793 EXTERN S16 rgCfgAddUeSCellCfg ARGS ((Inst        dstMacInst,
794                                     RgPrgUeSCellCfgInfo *ueSCellCb,
795                                     RgCellCb    *cell
796                                   ));
797 #endif /* LTE_ADV */
798
799 EXTERN S16 rgCFGCrgLcCfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgLchCfg
800       *lcCfg, RgErrInfo *errInfo,Bool *isCfmRqrd,CrgCfgTransId   transId));
801 EXTERN S16 rgCFGCrgCellRecfg ARGS((Inst inst,RgCellCb *cell, CrgCellRecfg *cellRecfg,
802       RgErrInfo *errInfo));
803 EXTERN S16 rgCFGCrgUeRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgUeRecfg
804       *ueRecfg, RgErrInfo *errInfo));
805 EXTERN S16 rgCFGCrgLcRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, RgUlLcCb
806       *ulLc, CrgLchRecfg *lcRecfg, RgErrInfo *errInfo, Bool *isCfmRqrd));
807 EXTERN S16 rgCFGCrgCellDel ARGS((Inst inst,CrgDel *cellDelInfo, RgErrInfo *errInfo));
808 EXTERN S16 rgCFGCrgUeDel ARGS((Inst inst,CrgDel *ueDelInfo, RgErrInfo *errInfo));
809 EXTERN S16 rgCFGCrgLcDel ARGS((Inst inst,CrgDel *lcDelInfo, RgErrInfo
810          *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
811 EXTERN Void rgCFGFreeCellCb ARGS((RgCellCb *cell));
812 EXTERN Void rgCFGFreeInactvCellCb ARGS((RgCellCb *cell));
813 EXTERN S16 rgSchMacCellRegReq ARGS((Pst* pst,RgInfCellReg* regReq));
814 EXTERN S16 rgCFGCrgUeReset ARGS((RgCellCb *cell,RgUeCb *ue,CrgRst *reset,
815          RgErrInfo *errInfo));
816
817 /* 
818  * APIs exposed by COM module
819  */
820 EXTERN S16 rgCOMCfgReq ARGS((Inst inst,CrgCfgTransId transId, CrgCfgReqInfo
821          *cfgReqInfo));
822
823 /* APIs Exposed by UIM */
824 EXTERN S16 rgUIMRguBndCfm ARGS ((Inst inst,SuId suId, U8 status));
825 EXTERN S16 rgUIMSndDedStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedStaInd  *staInd));
826 EXTERN S16 rgUIMSndCmnStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguCmnStaInd  *staInd));
827 EXTERN S16 rgUIMSndDedDatInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedDatInd  *datInd));
828 #ifdef LTE_L2_MEAS
829 EXTERN S16 rgL2mCreateMeasCb ARGS((
830          RgCellCb       *cell,
831          RgInfL2MeasReq *measInfo, 
832          U8              measType,
833          RgErrInfo      *err
834 ));
835 EXTERN  S16 rgL2mMeasReq ARGS((
836          RgCellCb       *cell,
837          RgInfL2MeasReq *measInfo,
838          RgErrInfo      *err
839 ));
840 EXTERN S16 rgL2Meas ARGS ((
841          RgCellCb  *cell
842 ));
843 #endif /* LTE_L2_MEAS */
844 EXTERN S16 rgUIMSndCmnDatInd ARGS ((Inst inst,RgUpSapCb *rguSap,RgRguCmnDatInd  *datInd));
845 EXTERN S16 rgUIMCrgBndCfm ARGS ((Inst inst,SuId suId,U8 status));
846 EXTERN S16 rgUIMCrgCfgCfm ARGS ((Inst inst,CrgCfgTransId transId,U8 status));
847
848
849 /* 
850  * APIs exposed by ROM module
851  */
852 EXTERN S16 rgROMDedDatReq ARGS((Inst inst,RgRguDedDatReq *datReq));
853 EXTERN S16 rgROMCmnDatReq ARGS((Inst inst,RgRguCmnDatReq *datReq));
854 EXTERN S16 rgROMDedStaRsp ARGS((Inst inst,RgRguDedStaRsp *staRsp));
855 EXTERN S16 rgROMCmnStaRsp ARGS((Inst inst,RgRguCmnStaRsp *staRsp));
856 #ifdef LTE_L2_MEAS
857
858 EXTERN S16 rgROML2MUlThrpMeasReq ARGS((Inst inst,RgRguL2MUlThrpMeasReq *measReq));
859
860 #endif
861
862 /* 
863  * APIs exposed by RAM module
864  */
865 EXTERN RgUeCb* rgRAMCreateUeCb ARGS((RgCellCb *cell,
866                      CmLteRnti tmpCrnti,Bool insert, RgErrInfo *err));
867 EXTERN S16 rgRAMFreeCell ARGS((RgCellCb    *cell));
868 EXTERN Void rgRAMFreeUeCb ARGS((Inst inst,RgUeCb *ueCb));
869 EXTERN S16 rgHndlRaResp ARGS((RgCellCb *cell,CmLteTimingInfo timingInfo,
870             RgInfRarInfo  *rarInfo,RgErrInfo *err));
871 EXTERN S16 rgSchMacRlsRntiReq ARGS((Pst *pst,RgInfRlsRnti* rlsRnti));
872 /* 
873  * APIs exposed by UHM module
874  */
875 EXTERN Void rgUHMCrgUeCfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb, 
876                                  CrgUeCfg *ueCfg));
877 EXTERN Void rgUHMCrgUeRecfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb, 
878                               CrgUeRecfg *ueRecfg));
879 /* 
880  * APIs exposed by DUX module
881  */
882 EXTERN S16 rgDUXDemuxData ARGS((Inst inst,RgMacPdu *pdu, RgInfCeInfo   *ceInfo,
883                                 Buffer **mBuf, RgErrInfo *err)); 
884 EXTERN S16 rgDUXExtSduLen ARGS
885 ((
886 Inst        inst,
887 Buffer      *mBuf,
888 U16         *sduLen,
889 RgErrInfo   *err
890 ));
891
892 /* 
893  * APIs exposed by DBM module
894  */
895
896 EXTERN S16 rgDBMInitInactvCellLst ARGS((U16 numBins));
897 EXTERN S16 rgDBMDeInitInactvCellLst ARGS((Void));
898 EXTERN S16 rgDBMInsInactvCellCb ARGS(( RgCellCb *cellCb));
899 EXTERN RgCellCb* rgDBMGetInactvCellCb ARGS(( CmLteCellId cellId));
900 EXTERN S16 rgDBMDelInactvCellCb ARGS(( RgCellCb *cellCb));
901 EXTERN RgCellCb* rgDBMGetNextInactvCellCb ARGS((RgCellCb *cellCb));
902
903 EXTERN S16 rgDBMInitCellLst ARGS(( U16 numBins));
904 EXTERN S16 rgDBMDeInitCellLst ARGS((Void));
905 EXTERN S16 rgDBMInsCellCb ARGS(( RgCellCb *cellCb));
906 EXTERN RgCellCb* rgDBMGetCellCb ARGS(( CmLteCellId cellId));
907 EXTERN S16 rgDBMDelCellCb ARGS(( RgCellCb *cellCb));
908 EXTERN RgCellCb* rgDBMGetNextCellCb ARGS((RgCellCb *cellCb));
909 EXTERN S16 rgDBMInitCell ARGS((RgCellCb *cellCb));
910
911 EXTERN S16 rgDBMDeInitUeCbLst ARGS(( RgCellCb *cellCb));
912 EXTERN S16 rgDBMInsUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
913 EXTERN RgUeCb* rgDBMGetUeCb ARGS(( RgCellCb *cellCb, CmLteRnti ueId));
914 EXTERN RgUeCb* rgDBMGetNextUeCb ( RgCellCb *cellCb, RgUeCb *ueCb);
915 EXTERN S16 rgDBMDelUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
916 EXTERN Void rgDBMInitUe ARGS((RgUeCb *ueCb));
917
918 #ifdef LTE_L2_MEAS
919 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx, LteLcgId  gId,
920                         U8  qci));
921 #else
922 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb, 
923                   CmLteLcId idx, LteLcgId gId));
924 #endif
925 EXTERN Void rgDBMUpdUlDedLcCb ARGS((RgUeCb *ueCb, 
926                RgUlLcCb *ulLcCb, LteLcgId gId));
927
928 EXTERN Void rgDBMInsDlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx));
929 EXTERN Void rgDBMDelUlDedLcCb ARGS((RgUeCb *ueCb, RgUlLcCb *ulLcCb));
930 EXTERN Void rgDBMDelDlDedLcCb ARGS((RgUeCb *ueCb, RgDlLcCb *dlLcCb));
931 EXTERN RgDlLcCb* rgDBMGetDlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
932 EXTERN RgUlLcCb* rgDBMGetUlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
933 EXTERN Void rgDBMFreeCmnLcLst ARGS((RgCellCb *cellCb));
934 EXTERN S16 rgDBMChkCmnLcCb ARGS(( RgCellCb *cellCb, CmLteLcId lcId));
935 EXTERN RgBcchBchLcCb* rgDBMGetBcchOnBch ARGS(( RgCellCb *cellCb ));
936 EXTERN RgBcchDlschLcCb* rgDBMGetBcchOnDlsch ARGS(( RgCellCb *cellCb, 
937                                                    CmLteLcId lcId));
938 EXTERN RgPcchLcCb* rgDBMGetPcch ARGS(( RgCellCb *cellCb));
939 EXTERN Void rgDBMInsBcchOnBch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
940 EXTERN Void rgDBMInsBcchOnDlsch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
941 EXTERN Void rgDBMInsPcch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
942
943 EXTERN Void rgDBMInsUeCbInRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
944 EXTERN RgUeCb* rgDBMGetUeCbFromRachLst ARGS((RgCellCb *cellCb,CmLteRnti key));
945 EXTERN RgUeCb* rgDBMGetNextUeCbFromRachLst ARGS((RgCellCb *cellCb,
946                                                       RgUeCb *ueCb));
947 EXTERN Void rgDBMDelUeCbFromRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
948 /* Added support for SPS*/
949 #ifdef LTEMAC_SPS
950 EXTERN S16 rgDBMDeInitSpsUeCbLst ARGS((RgCellCb *cellCb));
951 EXTERN S16 rgDBMInsSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
952 EXTERN RgUeCb* rgDBMGetSpsUeCb ARGS((RgCellCb *cellCb, CmLteRnti ueId));
953 EXTERN RgUeCb* rgDBMGetNextSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
954 EXTERN S16 rgDBMDelSpsUeCb ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
955 #endif /* LTEMAC_SPS */
956                         
957 /* 
958  * APIs exposed by DHM module
959  */
960 EXTERN Void rgCFGFreeUeCb ARGS((RgCellCb *cell, RgUeCb *ue));
961 EXTERN S16 rgDHMHqEntInit ARGS((Inst inst,RgDlHqEnt *hqE, U8 maxHqProcs));
962 EXTERN Void rgDHMRlsHqProc ARGS((RgDlHqProcCb *hqP));
963 EXTERN Void rgDHMUeReset ARGS ((RgCellCb *cell, RgDlHqEnt *hqE));
964 EXTERN Void rgDHMHdlBufFree ARGS((Inst inst, Buffer **mBuf));
965 EXTERN Void rgDHMFreeTbBufs ARGS((Inst inst));
966 EXTERN S16 rgDHMRlsHqProcTB ARGS((RgCellCb *cell, RgDlHqProcCb *hqP,U8 tbIndex));
967 EXTERN S16 rgDHMGetHqProcFrmId ARGS((RgUeCb *ue, U8 idx, RgDlHqProcCb **hqP));
968 /* Changes for MIMO feature addition */
969 /* Removed dependency on MIMO compile-time flag */
970 EXTERN S16 rgDHMSndDatReq ARGS((RgCellCb *cellCb, RgDlSf *dlSf, RgTfuDatReqInfo *datInfo, 
971                                 RgDlHqProcCb *hqProc, RgErrInfo *err));
972 EXTERN S16 rgDHMHndlDedDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc, 
973                               RgRguDDatReqPerUe *datReq, RgDlSf *dlSf, RgErrInfo *err));
974 /* Changed for contention resolution timer implementation*/
975 EXTERN S16 rgDHMHndlCmnDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc, 
976                 RgRguCmnDatReq *datReq, RgErrInfo *err));
977 /* Changes for MIMO feature addition */
978 /* Removed dependency on MIMO compile-time flag */
979
980 EXTERN S16 rgDHMSndConsolidatedStaInd ARGS ((RgCellCb *cell,RgInfUeInfo *ueInfo,
981       CmLteTimingInfo timingInfo, RgErrInfo *err));
982
983 EXTERN Void rgDHMFreeUe ARGS((Inst inst,RgDlHqEnt *hqE));
984 EXTERN S16 rgSchMacRlsHqReq ARGS((Pst *pst, RgInfRlsHqInfo *rlshqUeInfo));
985
986 /* 
987  * APIs exposed by MUX module
988  */
989 #ifndef L2_OPTMZ
990 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, Buffer **txPdu, 
991          RgErrInfo *err));
992 #else
993 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, RgTfuDatReqTbInfo *tb, 
994          RgErrInfo *err));
995 EXTERN Bool RgUtlIsTbMuxed ARGS((TfuDatReqTbInfo *tb));
996 #endif
997 EXTERN S16 rgMUXBldRarPdu ARGS((RgCellCb *cell, RgInfRaRntiInfo *alloc,
998          Buffer **txPdu, RgErrInfo *err));
999
1000 /*
1001  * Utility APIs
1002  */
1003 EXTERN S16  rgAllocSBuf     ARGS((Inst inst,Data **pData, Size size));
1004 EXTERN S16  rgGetMsg        ARGS((Inst inst,Buffer **mBuf));
1005 /*ccpu00117052 - MOD  Passing double pointer for proper NULLP
1006                       assignment */
1007 EXTERN Void rgFreeSBuf      ARGS((Inst inst,Data **data, Size size));
1008 EXTERN Void rgFillDgnParams ARGS((Inst inst,RgUstaDgn *dgn,U8 dgnType));
1009 EXTERN Void rgUpdtRguDedSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType, RgRguDedDatReq *datReq));
1010 EXTERN Void rgUpdtRguCmnSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType));
1011 EXTERN Void rgUpdtCellCnt   ARGS((Inst inst,U8 updtType));
1012 EXTERN Void rgUpdtUeCnt     ARGS((Inst inst,U8 updtType));
1013 EXTERN Void rgGetPstToInst ARGS((Pst *pst,Inst srcInst, Inst dstInst));
1014 EXTERN S16 rgAllocEventMem ARGS((Inst inst,Ptr *memPtr,Size memSize));
1015 EXTERN S16 rgGetEventMem ARGS((Inst inst,Ptr *ptr,Size len,Ptr memCp));
1016 EXTERN S16 rgAllocShrablSBuf ARGS((Inst inst,Data **pData, Size size));
1017 EXTERN Void rgPrintfSubFrameInfo ARGS((RgDlSf *dlSf));
1018 EXTERN Void printMacCellInfo ARGS((Void));
1019 EXTERN Void rgFreeSharableSBuf ARGS((Inst inst,Data **data, Size size)); 
1020
1021
1022 EXTERN Void rgDHMFreeAllTbBufs ARGS
1023 ((
1024 Inst inst
1025 ));
1026
1027 EXTERN S16 rgMUXAddPadd ARGS((
1028 Inst           inst,
1029 MsgLen         *schdTbSz,
1030 Buffer         *sduBuf,
1031 Bool           isRar,
1032 RgErrInfo      *err
1033 ));
1034 EXTERN U16 rgMUXCalcRiv ARGS
1035 ((
1036 U8           bw,
1037 U8           rbStart,
1038 U8           numRb
1039 ));
1040
1041
1042
1043 #ifdef __cplusplus
1044 }
1045 #endif /* __cplusplus */
1046 #endif /* __RGX__ */
1047
1048
1049 /**********************************************************************
1050          End of file
1051 **********************************************************************/