00c3797ecea263acdf6c00bda920cf755bd43794
[o-du/l2.git] / src / 5gnrrlc / kw.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**
20   
21         Name:    LTE RLC file 
22     
23         Type:    C include file
24   
25         Desc:    This file contains all the data structures and 
26                  prototypes for LTE RLC.
27  
28         File:    kw.x
29
30 *********************************************************************21*/
31 /** @file kw.x
32 @brief RLC Product Structures, prototypes
33 */
34
35 #ifndef __KWX__
36 #define __KWX__
37  
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41
42 /** @brief Local typedefs */
43 typedef uint32_t    RlcSn;   /*!< Sequence Number length */
44
45 typedef RguDDatIndInfo KwDatIndInfo;
46
47 typedef RguDStaIndInfo KwDStaIndInfo;
48
49 typedef RguPduInfo KwPduInfo; /* kw002.201 : Aligning the structure with RGU */
50
51 typedef struct _amRlcStats
52 {
53    uint32_t   numDLStaPduSent;
54    uint32_t   numDLNacksInStaPdu;
55    uint32_t   numDLBytesUnused;
56    uint32_t   numDLPollTimerExpiresSrb;
57    uint32_t   numDLPollTimerExpiresDrb;
58    uint32_t   numDLMaxRetx;
59    uint32_t   numDLRetransPdus;
60    uint32_t   numULPdusDiscarded;
61    uint32_t   numULReOrdTimerExpires;
62    uint32_t   numULStaPduRcvd;
63    uint32_t   numULNackInStaPduRcvd;
64    uint32_t   numRlcAmCellSduTx; /* Count of SDUs transmitted in DL for all UEs */
65    uint32_t   numRlcAmCellSduBytesTx; /*Total number of bytes transmitted in DL for all Ues */
66    uint32_t   numRlcAmCellRetxPdu; /*Count of PDUs retransmitted for all Ues */
67    uint32_t   numRlcAmMaxRetx; /*Total number of Max-RLC retransmissions hit for all the Ues */
68    uint32_t   numRlcAmCellDupPduRx; /*Count of Duplicate PDUs detected for a UE in UL for all Ues */
69    uint32_t   numRlcAmCellDropOutWinRx; /*Count of PDUs dropped due to Out of Window reception for all Ues */
70    uint32_t   numRlcAmCellSduRx; /* Count of SDUs received in UL for all UEs*/
71    uint32_t   numRlcAmCellSduBytesRx;/*Total number of bytes received in UL for all Ues*/
72    uint32_t   numRlcAmCellNackRx; /*Total number of UL PDUs nacked for all the Ues*/
73    uint32_t   numRlcAmCellWinStall; /*Number of window stalls detected for all the Ues */
74 }AMRLCStats;
75
76 typedef struct _umRlcStats
77 {
78    uint32_t   numDLBytesUnused;
79    uint32_t   numDLMaxRetx;
80    uint32_t   numULPdusDiscarded;
81    uint32_t   numULReOrdTimerExpires;
82    uint32_t   numULPdusOutsideWindow;
83 }UMRLCStats;
84
85 typedef struct _rlcStats
86 {
87    AMRLCStats   amRlcStats;
88    UMRLCStats   umRlcStats;
89 }RLCStats;
90
91 RLCStats gRlcStats;
92
93 /* kw005.201 added support for L2 Measurement */
94 #ifdef LTE_L2_MEAS
95 typedef struct rlcSduSnMap RlcSduSnMap;
96 typedef RguLchMapInfo KwLchMapInfo;
97 #endif /*  LTE_L2_MEAS */
98
99
100 /** @defgroup ummode UM Module Info 
101 */
102 /** 
103  * @brief  Structure to hold an Unacknowledged Mode header
104  *
105  * @details
106  *    - fi    : Framing Info
107  *    - sn    : Sequence number
108  *    - numLi : Number of length indicators in the following array (li)
109  *    - li    : Length indicators
110 */
111 typedef struct rlcUmHdr
112 {
113 #ifdef NR_RLC_UL
114    uint8_t  si;              /*!< Segmentation Info */
115    uint16_t so;              /*!< Segment offset 5G NR */
116 #endif
117    uint8_t     fi;              /*!< Framing Info */
118    RlcSn       sn;              /*!< Sequence number */
119    uint16_t    numLi;           /*!< Number of LIs */
120    uint16_t    li[RLC_MAX_UL_LI];   /*!< Array of LIs */
121 }RlcUmHdr;
122
123
124 /** 
125  * @brief  Structure to hold an Acknowledged Mode header
126  *
127  * @details
128  *    - dc    : Data/Control PDU
129  *    - rf    : Resegmentation flag
130  *    - p     : Poll bit
131  *    - fi    : Framing Info
132  *    - e     : Extension bit
133  *    - lsf   : Last segment flat
134  *    - sn    : Sequence number
135  *    - so    : Segment offset
136  *    - numLi : Number of length indicators in the following array (li)
137  *    - li    : Length indicators
138 */
139 typedef struct rlcAmHdr
140 {
141    uint8_t     dc;              /*!< Data/Control PDU */
142    uint8_t     p;               /*!< Poll bit */
143    uint8_t     si;              /*!< Segmentation Info: 5GNR */ 
144    RlcSn       sn;              /*!< Sequence number */
145    uint32_t    so;              /*!< Segment offset */
146 }RlcAmHdr;
147
148 /* structures used for encoding/decoding the headers */
149 typedef struct rlcCntrlInfo
150 {
151    uint16_t  val;
152    uint8_t   len;
153    uint16_t  idx;
154    uint8_t   emtBits;
155    uint16_t  e1Idx;
156    uint16_t  e2Idx;   
157    uint8_t   e1eb;
158 }RlcCntrlInfo;
159
160 typedef struct rlcHdrInfo
161 {
162    uint32_t  val;
163    uint8_t   len;
164    uint8_t   eb;
165    uint8_t   *hdr;
166    uint16_t  idx;
167    uint8_t   pEb;
168    uint8_t   pLen;
169 }RlcHdrInfo;
170
171 typedef struct rlcExtHdr
172 {
173    uint32_t val;
174    uint16_t len;
175    uint8_t  hdr;
176    uint8_t  pLen;
177 }RlcExtHdr;
178
179 /** 
180  * @brief  Structure to hold information about a Logical channel
181  *
182  * @details
183  *    - lChId    : Logical channel Id
184  *    - lChType  : Logical channel type 
185 */ 
186 typedef struct rlcLchInfo
187 {
188    CmLteLcId     lChId;     /*!< Logical channel Id */
189    CmLteLcType   lChType;   /*!< Logical channel type */
190 }RlcLchInfo;
191
192 /* kw005.201 added support for L2 Measurement */
193 #ifdef LTE_L2_MEAS
194
195 /** @struct RlcL2Cntr
196  * RLC L2 Counter  */
197 typedef struct rlcL2Cntr
198 {
199    struct
200    {
201       uint32_t  numActvUe;        /*!< number of active Ue */
202       uint32_t  sampOc;           /*!< Total number of sampling occasion */
203    }actUe;
204    struct
205    {
206       uint32_t  dLoss;            /*!< Total number of lost packets */  
207       uint32_t  posPkts;          /*!< Total number of positively acknowlegded 
208                                   packets */
209    }uuLoss;
210    struct                    /*!< For DL IP throughput */
211    {
212       uint32_t volSummation;      /*!< Sum of data in bytes */
213       uint32_t timeSummation;     /*!< Sum of time difference in milli sec*/
214    }dlIpThruput;
215    struct                    /*!< For UL IP throughput */
216    {
217       uint32_t volSummation;      /*!< Sum of data in bytes */
218       uint32_t timeSummation;     /*!< Sum of time difference in milli sec*/
219    }ulIpThruput;
220    /* Discard new changes starts */
221    struct                    /*!< For UL IP throughput */
222    {
223       uint32_t discSdus;          /*!< Total RLC SDUs discarded */
224       uint32_t totSdus;           /*!< Total RLC SDUs received */
225    }dlDisc;
226    struct                    /*!< For UL IP throughput */
227    {
228       uint64_t sduDelay;          /*!< Total SDUs delay */
229       uint32_t numSdus;
230    }dlPjSduDelay;
231    uint32_t    totDrbsPerQci;     /*!< Total Count of DRB's for this QCI */
232 }RlcL2Cntr;
233
234 struct rlcSduSnMap
235 {
236    CmLList     lstEnt;
237    Bool        failMarked;
238    Bool        fullySent;
239    uint32_t    sduId;
240    uint16_t    numSn;
241    uint16_t    snList[RLC_MAX_PDU_MAP];
242    uint16_t    harqAck;
243    uint16_t    reqSent;
244    uint16_t    rspRcvd;
245 };
246
247 typedef struct rlcSnSduMap
248 {
249    uint16_t         sn;
250    CmLteLcId        lChId;              /*!< Logical channel Id */
251    uint16_t         numSdu;
252 #ifdef LTE_RLC_R9
253    Bool        isBurstSplitted;    /*!< true: burst for this LCH is splitted */
254 #endif /* LTE_RLC_R9 */
255    RlcSduSnMap  *sduList[RLC_MAX_DL_LI];
256 }RlcSnSduMap;
257
258 typedef struct rlcTbSnMap
259 {
260    CmHashListEnt  hlTbEnt;
261    uint32_t       tbId;
262    uint16_t       prevNumSn;
263    uint16_t       numSn;
264    RlcSnSduMap    snSduMap[RGU_MAX_PDU * RGU_MAX_LC];
265 }RlcTbSnMap;
266
267 typedef struct rlcL2MeasCbUeMeasInfo
268 {
269    CmLteRnti   ueId;                    /*!< UE ID (Used only for IP Throughput
270                                              in UL/DL */
271    CmLteCellId cellId;                  /*!< UE ID (Used only for IP Throughput
272                                              in UL/DL */
273    Bool        isValid;                 /*! < is this UE entry valid */
274    uint8_t     numLcId;                 /*!< Holds the number of LCh for which Ul Ip
275                                              measurement is ON */
276    uint8_t     lcId[RLC_MAX_LCH_PER_UE]; /*!< Holds the list of LCh for which Ul ip
277                                              measurement is ON */
278    RlcL2Cntr    measData[LKW_MAX_QCI];
279    uint16_t     numQci;                  /*!< number of valid qcI */
280    uint8_t      qci[LKW_MAX_QCI];        /*!< list of valid qcI */
281 }RlcL2MeasCbUeMeasInfo;
282
283 typedef struct rlcL2MeasCbIpThMeas
284 {
285    uint8_t                   numUes;
286    uint8_t                   totNumQci;
287    uint8_t                   totQci[LKW_MAX_QCI];
288    RlcL2MeasCbUeMeasInfo ueInfoLst[LKW_MAX_UE]; /*Added for handling meas for multiple ues*/ 
289 }RlcL2MeasCbIpThMeas;
290
291 typedef struct rlcL2MeasCbNonIpThMeas
292 {
293    uint16_t    numSamples;              /*!< Number of samples to take on numActUe */
294    uint16_t    numQci;                  /*!< number of valid qcI */
295    uint8_t     qci[LKW_MAX_QCI];        /*!< list of valid qcI */
296    RlcL2Cntr   measData[LKW_MAX_QCI];   /*!< Measurement CB */
297 }RlcL2MeasCbNonIpThMeas;
298
299 typedef union rlcL2MeasCbIpNonIpThMeasVal
300 {
301    RlcL2MeasCbIpThMeas    ipThMeas;
302    RlcL2MeasCbNonIpThMeas nonIpThMeas;
303 }RlcL2MeasCbIpNonIpThMeasVal;
304
305 /** @struct RlcL2MeasCb
306  * RLC L2 Measurement CB */
307 typedef struct rlcL2MeasCb
308 {
309    uint8_t        measType;        /*!< Bit-wise set measurement types */
310    RlcL2MeasCbIpNonIpThMeasVal val;   /* Union of IP tpt or non-ip tpt */
311 }RlcL2MeasCb;
312
313 /** @struct RlcL2MeasEvtCb
314  * RLC L2 Measurement Evt CB */
315 typedef struct rlcL2MeasEvtCb
316 {
317    uint32_t      transId;                /*!< TransId of Measurement Req */
318    uint32_t      cbIdx;                  /*!< TransId of Measurement Req */
319    CmTimer       l2Tmr; /* NOT USED */                 /*!< L2 Timer per request */
320    TmrCfg        l2TmrCfg; /* NOT USED */               /*!< Time period of measurement */
321    RlcL2MeasCb   measCb;                 /*!< Measurement CB */ 
322    EpcTime       startTime; /* NOT USED */            /*!<  start time when meas starts*/ 
323 }RlcL2MeasEvtCb;
324
325 /** @struct RlcL2MeasRbCb
326  * RLC L2 Measurement Rb CB */
327 typedef struct rlcL2MeasRbCb
328 {
329    uint8_t        measOn;                      /*!< Measurements that are running */ 
330    RlcL2Cntr      *l2Sts[RLC_MAX_L2MEAS_EVT];  /*!< L2 Mesurement statistics */     
331 }RlcL2MeasRbCb;
332
333 /** @struct RlcL2Cb
334  * RLC L2  CB */
335 typedef struct rlcL2Cb
336 {
337    uint16_t        rlcNumMeas;                   /*!< Number of measurements going on */
338    RlcL2MeasEvtCb  rlcL2EvtCb[LKW_MAX_L2MEAS];  /*!< Pointers to Measurement Cb */
339    uint8_t         measOn[LKW_MAX_QCI];          /*!< Measurement on */
340    uint32_t        numActUe[LKW_MAX_QCI];       /*!< Measurement on */
341 }RlcL2Cb;
342
343
344 typedef enum _dlIpThrputState
345 {
346    KW_DL_IPTHRU_RESET = 0,
347    KW_DL_IPTHRU_BURST_STARTED,
348    KW_DL_IPTHRU_BURST_CONTINUE,
349    KW_DL_IPTHRU_BURST_COMPLETED
350 }DlIpThrputState;
351
352 /** 
353 * @struct rlcL2MeasSduLst
354 * Structure to hold parameters of 
355 * burst sdus in DL for a RB */
356 typedef struct rlcOutStngSduInfo
357 {
358    uint32_t  sduId;            /*!< SDU Id of sdu */
359    MsgLen    sduLen;           /*!< Size of sdu */
360    uint32_t  numTb;            /*!< Hold the number of TBs for this sdu in DL */
361 }RlcOutStngSduInfo;
362
363 /** 
364 * @struct rlcL2MeasDlIpTh
365 * Structure to hold parameters for DL ip 
366 * throughput for a RB */
367 typedef struct rlcL2MeasDlIpTh
368 {
369    Bool               isBurstAct;            /*!< Set to TRUE when burst is active in DL */
370    uint64_t           burstStartTime;        /*!< Holds the starting time of the burst */
371    uint32_t           burstEndSduId;         /*!< Sdu ID when burst ends */
372    uint8_t            lastSduIdx;            /*!< Holds the index of last outStanding sdu */
373    RlcOutStngSduInfo  outStngSduArr[RLC_L2MEAS_MAX_OUTSTNGSDU];/*!< Hold the burst sdu information */
374 }RlcL2MeasDlIpTh;
375
376 /** 
377 * @struct rlcL2MeasIpThruput
378 * Structure to hold parameters for UL/DL ip 
379 * throughput for a RB */
380 typedef struct rlcL2MeasIpThruput
381 {
382    uint32_t         dataVol;                 /*!< Holds volume of new data in bytes
383                                               for UL IP throughput */
384    uint32_t         ttiCnt;                  /*!< Holds ttiCnt received from MAC in UL */
385    uint32_t         prevTtiCnt;        /*!< Holds previous ttiCnt received from MAC in UL */
386    RlcL2MeasDlIpTh  dlIpTh;
387 }RlcL2MeasIpThruput;
388
389 #endif /* LTE_L2_MEAS */
390
391 /** 
392  * @brief  Structure to hold an UE key for the UE hast lists
393  *
394  * @details
395  *    - ueId    : UE Id
396  *    - cellId  : Cell Id 
397 */
398 typedef struct rlcUeKey
399 {
400    CmLteRnti     ueId;     /*!< UE Id */
401    CmLteCellId   cellId;   /*!< Cell Id */
402 }RlcUeKey;
403
404 /** 
405  * @brief  Structure to hold an information about the CKW SAP
406  *
407  * @details
408  *    - pst   : Service user post structure
409  *    - spId  : Service provider Id
410  *    - suId  : Service user Id
411  *    - state : State of the SAP
412  *    - sts   : SAP specific statistics 
413 */
414 typedef struct rlcCkwSapCb
415 {
416    Pst           pst;     /*!< Service user post structure */
417    SpId          spId;    /*!< Service provider Id */
418    SuId          suId;    /*!< Service user Id */
419    uint8_t       state;   /*!< Sap Status */
420    RlcCkwCntSts   sts;     /*!< Statistics */
421 }RlcCkwSapCb;
422
423 /** 
424  * @brief  Structure to hold an information about the KWU SAP
425  *
426  * @details
427  *    - pst   : Service user post structure
428  *    - spId  : Service provider Id
429  *    - suId  : Service user Id
430  *    - state : State of the SAP
431  *    - sts   : SAP specific statistics 
432 */
433 typedef struct rlcKwuSapCb
434 {
435    Pst           pst;     /*!< Service user post structure */
436    SpId          spId;    /*!< Service provider Id */
437    SuId          suId;    /*!< Service user Id */
438    uint8_t       state;   /*!< Sap Status */
439    RlcKwuSapSts  sts;     /*!< Statistics */
440 }RlcKwuSapCb;
441
442 /** 
443  * @brief  Structure to hold an information about the RGU SAP
444  *
445  * @details
446  *    - pst       : Service user post structure
447  *    - spId      : Service provider Id
448  *    - suId      : Service user Id
449  *    - state     : State of the SAP
450  *    - bndTmr    : Bind Timer
451  *    - bndTmrInt : Timer Interval
452  *    - retryCnt  : Bind Retry Count
453 */
454 typedef struct rlcRguSapCb
455 {
456    Pst       pst;         /*!< Service user post structure */
457    SpId      spId;        /*!< Service provider Id */
458    SuId      suId;        /*!< Service user Id */
459    uint8_t   state;       /*!< Sap Status */
460    CmTimer   bndTmr;      /*!< Bind Timer */
461    uint16_t  bndTmrInt;   /*!< Timer Interval */
462    uint8_t   retryCnt;    /*!< Bind Retry Count */
463 }RlcRguSapCb;
464
465 /** 
466  * @brief  Structure to hold an information about the UDX UL SAP
467  *
468  * @details
469  *    - pst       : Service user post structure
470  *    - spId      : Service provider Id
471  *    - suId      : Service user Id
472  *    - state     : State of the SAP
473  *    - bndTmr    : Bind Timer
474  *    - bndTmrInt : Timer Interval
475  *    - retryCnt  : Bind Retry Count
476 */
477 typedef struct rlcUdxUlSapCb
478 {
479    Pst       pst;         /*!< Service user post structure */
480    SpId      spId;        /*!< Service provider Id */
481    SuId      suId;        /*!< Service user Id */
482    uint8_t   state;       /*!< Sap Status */
483    CmTimer   bndTmr;      /*!< Bind Timer */
484    uint16_t  bndTmrInt;   /*!< Timer Interval */
485    uint8_t   retryCnt;    /*!< Bind Retry Count */
486 }RlcUdxUlSapCb;
487
488 /** 
489  * @brief  Structure to hold an information about the UDX DL SAP
490  *
491  * @details
492  *    - pst       : Service user post structure
493  *    - spId      : Service provider Id
494  *    - suId      : Service user Id
495  *    - state     : State of the SAP
496 */
497 typedef struct rlcUdxDlSapCb
498 {
499    Pst     pst;     /*!< Service user post structure */
500    SpId    spId;    /*!< Service provider Id */
501    SuId    suId;    /*!< Service user Id */
502    uint8_t state;   /*!< Sap Status */
503 }RlcUdxDlSapCb;
504
505 /** 
506  * @brief  Structure to hold info about memory to be freed
507  *
508  * @details
509  *    - sduLst  : The SDU queues are appended to this queue, used 
510  *                for the UM SDU queues
511  *    - txLst   : Stores to be released AM Mode TX PDUs
512  *    - reTxLst : Stores to be released AM Re TX PDU's
513  *    - rbLst   : List of AM DL RBs to be freed 
514 */
515 typedef struct rlcDlDataToBeFreed
516 {
517    CmLListCp   sduLst;     /*!< Queue of SDU's to be freed  */
518    CmLListCp   txLst;     /*!< Stores to be released TX PDUs */
519    CmLListCp   reTxLst;   /*!< Stores to be released ReTX PDUs */
520    CmLListCp   rbLst;     /*!< List of AM DL RBs to be freed */
521 }RlcDlDataToBeFreed;
522
523 /** 
524  * @brief  Structure to hold an information about DL RLC instance
525  *
526  * @details
527  *    - numKwuSaps        : Number of RLC KWU Saps
528  *    - numUdxSaps        : Number of RLC UDX Saps
529  *    - rlcKwuDlSap          : Pointer to the array of KWU SAPS
530  *    - udxDlSap          : Pointer to the array of UDX SAPS
531  *    - rguDlSap          : RGU Sap Control Block
532  *    - cellLstCp         : Hashlist of CellCb
533  *    - ueLstCp           : Hashlist of UeCb 
534  *    - toBeFreed         : Pointer to data to be freed
535  *    - shutdownReveived  : Request for shutdown recevied or not
536  *    - eventInQueue      : Event for cleanup exists in queue or not
537  */
538 typedef struct rlcDlCb
539 {
540    uint8_t             numKwuSaps;         /*!< Number of RLC Data Saps */
541    uint8_t             numUdxSaps;         /*!< Number of RLC Data Saps */
542    RlcKwuSapCb         *rlcKwuDlSap;          /*!< KWU Sap Control Block */
543    RlcUdxDlSapCb       *udxDlSap;          /*!< UDX DL Sap Control Block */
544    RlcRguSapCb         *rguDlSap;          /*!< RGU Sap Control Block */
545    CmHashListCp        cellLstCp;          /*!< Hashlist of CellCb */
546    CmHashListCp        ueLstCp;            /*!< Hashlist of UeCb */
547    RlcDlDataToBeFreed  toBeFreed;          /*!< Pointer to data to be freed */        
548    Pst                 selfPst;            /*!< Pst to post events to self */
549    Buffer              *selfPstMBuf;       /*!< Buffer used for self post */
550    Bool                shutdownReceived;   /*!< Request for shutdown recevied */
551    Bool                eventInQueue;       /*!< Event exists in queue or not */
552 #ifdef LTE_L2_MEAS
553    RlcL2Cb              rlcL2Cb; /*!< Control Block for L2 Measurements in RLC */
554 #endif /* LTE_L2_MEAS */
555 }RlcDlCb;
556
557 /** 
558  * @brief  Structure to hold an information about UL RLC instance
559  *
560  * @details
561  *    - ckwSap       : CKW Sap Conrol Block
562  *    - numKwuSaps   : Number of RLC KWU Saps
563  *    - numUdxSaps   : Number of RLC UDX Saps
564  *    - udxUlSap     : Pointer to the array of UDX SAPS 
565  *    - rlcKwuUlSap     : Pointer to the array of KWU SAPS
566  *    - rguUlSap     : RGU Sap Control Block
567  *    - cellLstCp    : Hashlist of CellCb
568  *    - ueLstCp      : Hashlist of UeCb 
569  *    - transIdLstCp : Hashlist of cfg trans
570  */
571 typedef struct rlcUlCb
572 {
573    RlcCkwSapCb     ckwSap;         /*!< CKW Sap Conrol Block */ 
574    uint8_t         numKwuSaps;     /*!< Number of RLC Data Saps */
575    uint8_t         numUdxSaps;     /*!< Number of RLC Data Saps */
576    RlcUdxUlSapCb   *udxUlSap;      /*!< UDX DL Sap Control Block */
577    RlcKwuSapCb     *rlcKwuUlSap;      /*!< KWU Sap Control Block */
578    RlcRguSapCb     *rguUlSap;      /*!< RGU Sap Control Block */
579    CmHashListCp   cellLstCp;      /*!< Hashlist of CellCb */
580    CmHashListCp   ueLstCp;        /*!< Hashlist of UeCb */
581    CmHashListCp   transIdLstCp;   /*!< Hashlist of cfg trans */
582    uint8_t        rlcUlUdxEventType;  /*!<Ue Create/ReConfig> */
583 /* kw005.201 added support for L2 Measurement */
584 #ifdef LTE_L2_MEAS
585    RlcL2Cb        rlcL2Cb; /*!< Control Block for L2 Measurements in RLC */
586 #endif /* LTE_L2_MEAS */
587 }RlcUlCb;
588
589
590 /** 
591  * @brief  Structure to hold an information about a RLC instance
592  *
593  * @details
594  *    - init    : Task Initialization Info
595  *    - genCfg  : General Configuration
596  *    - genSts  : General Statistics
597  *    - trcLen  : Trace Length
598  *    - trcMask : Trace Mask
599  *    - rlcTq    : Timer queue
600  *    - rlcTqCp  : Timer queue control point
601  *    - u       : Union depending on whether the instance is UL or DL
602  *      - ulCb  : UL instance Control Block
603  *      - dlCb  : DL instance Control Block
604  */
605 typedef struct rlcCb
606 {
607    TskInit    init;               /*!< Task Initialization Info */
608    RlcGenCfg   genCfg;             /*!< General Configuration Structure */
609    RlcGenSts   genSts;             /*!< General Statistics */
610    S16        trcLen;             /*!< Trace Length */
611    uint8_t         trcMask;            /*!< Trace Mask */
612    CmTqType   rlcTq[RLC_TMR_LEN];   /*!< Timer queue */
613    CmTqCp     rlcTqCp;             /*!< Timer queue control point */
614    union 
615    {
616       RlcUlCb   *ulCb;   /*!< Ul Control Block */
617       RlcDlCb   *dlCb;   /*!< Dl Control Block */
618    } u;
619    uint8_t    dlSduId;   /*!< Downlink SDU ID */
620 }RlcCb;
621
622 RlcCb *rlcCb[MAX_RLC_INSTANCES];   /*!< RLC global control block */
623
624 /****************************************************************************
625  *                      Declarations
626  ***************************************************************************/
627 S16 rlcGetSId ARGS((SystemId *s));
628
629 Void rlcTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
630
631 S16 rlcLmmSendTrc ARGS ((RlcCb *gCb, Event event, Buffer *mBuf));
632
633 void rlcStartTmr ARGS((RlcCb *gCb, PTR cb, S16 tmrEvnt));
634
635 void rlcStopTmr  ARGS((RlcCb *gCb, PTR cb, uint8_t tmrType));
636
637 bool rlcChkTmr ARGS((RlcCb *gCb,PTR cb, S16 tmrEvnt));
638
639 #ifdef LTE_L2_MEAS
640 Void rlcLmmSendAlarm ARGS (( RlcCb *gCb,
641                                    uint16_t category, 
642                                    uint16_t event, 
643                                    uint16_t cause, 
644                                    SuId suId, 
645                                    uint32_t ueId, 
646                                    uint8_t qci));
647
648 S16 RlcMiRlcDlL2MeasReq ARGS (( Pst *pst, RlcL2MeasReqEvt *measReqEvt ));
649 S16 RlcMiRlcDlL2MeasSendReq ARGS((Pst *pst,uint8_t measType));
650 S16 RlcMiRlcDlL2MeasStopReq ARGS((Pst *pst,uint8_t measType));
651 S16 RlcMiRlcUlL2MeasReq ARGS (( Pst *pst, RlcL2MeasReqEvt *measReqEvt ));
652 S16 RlcMiRlcUlL2MeasSendReq ARGS((Pst *pst,uint8_t measType));
653 S16 RlcMiRlcUlL2MeasStopReq ARGS((Pst *pst,uint8_t measType));
654 Void rlcUtlPlcMeasDatInL2Sts ARGS((RlcL2Cntr *measData, 
655                                          RlcL2MeasRbCb *rbL2Cb,
656                                          uint8_t measType));
657 #else /* LTE_L2_MEAS */
658 Void rlcLmmSendAlarm ARGS ((RlcCb *gCb,
659                                   uint16_t category, 
660                                   uint16_t event, 
661                                   uint16_t cause, 
662                                   SuId suId, 
663                                   uint32_t ueId));
664 #endif /* LTE_L2_MEAS */
665
666 #ifdef __cplusplus
667 }
668 #endif /* __cplusplus */
669
670 #endif /* __KWX__ */
671
672 \f  
673 /********************************************************************30**
674   
675          End of file
676 **********************************************************************/