69a4d71c59da81ccb49b1b3a0751d41a19ccde91
[o-du/l2.git] / src / 5gnrrlc / rlc_ul.h
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:     NR RLC file for uplink and non real time tasks 
22     
23         Type:     C include file
24   
25         Desc:     This file contains helper macros for RLC uplink
26                   and non real time tasks
27  
28         File:     rlc_ul.h
29
30 **********************************************************************/
31 /** 
32  * @file rlc_ul.h
33  * @brief RLC uplink helper macros
34 */
35
36 #ifndef __RLC_ULH__
37 #define __RLC_ULH__
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif /* __cplusplus */
42
43 /**
44  * @def RLC_MEAS_IS_UL_IP_MEAS_ON_FOR_RB
45  *
46  *    This macro is used to check if UL IP throughput measurement is ON
47  *    or off for the passed rb
48  *
49  *    Returns TRUE(non-zero) if measurement is ON else FALSE (zero)
50  *
51  * @param[in] _gCb     RLC UL Cb
52  * @param[in] _rbCb    RLC uplink control block
53  *
54 */ 
55 #define RLC_MEAS_IS_UL_IP_MEAS_ON_FOR_RB(_gCb, _rbCb)  \
56      ((_rbCb->rlcId.rbType == CM_LTE_DRB) && \
57      (_gCb->u.ulCb->rlcL2Cb.measOn[_rbCb->qci] & LKW_L2MEAS_UL_IP) && \
58      (_rbCb->rbL2Cb.measOn & LKW_L2MEAS_UL_IP))
59
60 typedef struct rlcUlUeCb RlcUlUeCb;
61
62 /** 
63  * @brief  Structure to hold a RLC UM PDU segment
64  *
65  * @details
66  *    - lstEnt : This is required for the linked list in which the segments
67  *               are stored
68  *    - seg    : Holds the segment data
69  *    - segSz  : The length of the segment in bytes
70  *    - soEnd  : SOEnd
71  *    - umHdr  : The UM Header for the PDU segment
72  *
73 */
74 typedef struct rlcUmSeg
75 {
76    CmLList   lstEnt;   /*!< List entry for PDU segment */
77    Buffer    *seg;     /*!< PDU segment */
78    MsgLen    segSz;    /*!< Buffer Size */
79    uint16_t  soEnd;    /*!< Segment Offset End */
80    RlcUmHdr  umHdr;    /*!<Um Header */
81 }RlcUmSeg;
82
83 /** 
84  * @brief  Structure to hold a  UM PDU
85  *
86  * @details
87  *    - pdu : Buffer holding the UM PDU data
88  *    - umHdr : UM PDU Header Information
89  *    - pduSz : Length of the PDU excluding the header
90 */
91 typedef struct rlcUmRecBuf
92 {
93    RlcSn       sn;            /*!< Sequence Number */
94    CmLList     lnk;           /*!< Link to the receive buffer list */
95    Bool        allSegRcvd;    /*!< Flag to check whether all seg are received */
96    Bool        noMissingSeg;  /*!< Flag to check all the bytes are received before the last byte of segment */
97    CmLListCp   segLst;        /*!< PDU Segments list */
98    uint16_t    expSo;         /*!< Next expected seg offset */
99    Bool        allRcvd;       /*!< All bytes received or not */
100    RlcUmSeg    *expByteSeg;   /*!< Next expected byte segment */
101    Buffer      *pdu;          /**< Buffer holding the UM PDU */
102    RlcUmHdr    umHdr;         /**< UM PDU Header Information */
103    MsgLen      pduSz;         /**< PDU Size */
104 }RlcUmRecBuf;
105
106 /** 
107  * @brief  Structure to hold uplink information in UM mode for a particular RB
108  *
109  * @details
110  *    - snLen : The sequence number length can be 5 bits or 10 bits. 
111  *              Here it is stored as 1 or 2 (as the number of bytes)
112  *    - recBuf : Holds all the received PDUs. PDU's are removed from this 
113  *               after a SDU is formed or during restablishment
114  *    - umWinSz : The window size is 512 for 10 bits sequence number and 16 
115  *                for 5 bits sequence number
116  *    - partialSdu : This is used to store the partially completed SDU. 
117  *                   It remains till complete SDU is received
118 */
119 typedef struct rlcUmUl
120 {
121    uint8_t       snLen;         /**< Sequence number length */
122    uint8_t       reAsmblTmrInt; /**< Timer Interval */
123    CmLListCp     *recBufLst;    /**!<Reception Buffer List */
124    RlcSn         umWinSz;       /**< UM window size */
125    uint16_t      modBitMask;    /**< Bitmask for modulus to wrap around variables */
126    RlcSn         sn;            /**< Sequence number */
127    RlcSn         vrUr;          /**< VR(UR) - Receive state variable */
128    RlcSn         vrUh;          /**< VR(UH) - Highest received state variable */
129    RlcSn         vrUx;          /**< VR(UX) - Reordering state variable */
130    CmTimer       reAsmblTmr;    /**< Reordering Timer */
131    Buffer        *assembleSdu;  /**< Assemble Sdu - Remains till the complete SDU is received */
132    uint16_t      expSo;         /*!< Expected SO for reassembly */
133    RlcSn         expSn;         /*!< Expected Sn */
134 }RlcUmUl;
135 /*@}*/
136
137 /** 
138  * @brief  Structure to hold a RLC AM PDU segment
139  *
140  * @details
141  *    - lstEnt : This is required for the linked list in which the segments
142  *               are stored
143  *    - seg    : Holds the segment data
144  *    - segSz  : The length of the segment in bytes
145  *    - soEnd  : SOEnd
146  *    - amHdr  : The AM Header for the PDU segment
147  *
148 */
149 typedef struct rlcSeg
150 {
151    CmLList   lstEnt;   /**< List entry for PDU segment */
152    Buffer    *seg;     /**< PDU segment */
153    MsgLen    segSz;    /**< Buffer Size */
154    uint16_t  soEnd;    /**< Segment Offset End */
155    RlcAmHdr  amHdr;    /**< AM header */
156 }RlcSeg;
157
158 /*@}*/
159
160 /** 
161  * @brief  Structure to hold a received AM PDU or segments of a PDU
162  *
163  * @details
164  *    - pdu         : Holds the PDU data
165  *    - pduSz       : Length of the PDU in bytes
166  *    - amHdr       : The AM Header for the PDU  
167  *    - segLst      : The length of the segment in bytes
168  *    - expByteSeg  : The next expected segment for re-ordering
169  *    - expSo       : The next expected SO so to be in sequence
170  *    - allRcvd     : Whether all the segments for this PDU has been recevied
171  *
172 */
173 typedef struct rlcAmRecBuf
174 {
175    CmLList     lnk;           /**< Link to the receive buffer list */
176    Buffer      *pdu;          /**< PDU buffer */
177    MsgLen      pduSz;         /**< Buffer Size */
178    RlcAmHdr    amHdr;         /**< AM header Info */
179    CmLListCp   segLst;        /**< PDU Segments list */
180    RlcSeg      *expByteSeg;   /**< Next expected byte segment */
181    uint16_t    expSo;         /**< Next expected seg offset */
182    Bool        allRcvd;       /**< All bytes received or not */
183    Bool        isDelvUpperLayer; /**< Is it sent to upper layer */ 
184    Bool        noMissingSeg;  /*!< Flag to check all the bytes are received before the last byte of segment */
185 }RlcAmRecBuf;
186
187 /** @addtogroup ammode */
188 /*@{*/
189
190 /** 
191  * @brief  Structure to hold information about an uplink AM Radio Bearer
192  *
193  * @details
194  *    - recBuf            : Reception buffer
195  *    - rxNext            : RX_Next - Receive state variable 
196  *    - rxNextHighestRcvd : RX_Next_Highest_Rcvd - Highest received state variable
197  *    - rxNextStatusTrig  : RX_Next_Status_Trigger - reorderig state variable
198  *    - vrMr              : VR(MR) - Maximum acceptable receive state variable
199  *    - rxHighestStatus   : RX_Highest_Status - Maximum STATUS transmit state variable
200  *    - staTrg           : Flag to indicate if status trigger occured
201  *    - partialSdu       : Partial SDU - Remains till the complete SDU 
202  *                         is received
203  *    - expSn            : The expected sequence number for reassembly  
204  *    - expSo            : The expected SO for reassembly
205  *    - staProhTmr       : The Status Probihit Timer
206  *    - staProhTmrInt    : Status Prohibit Timer interval (in ??)
207  *    - reAsmblTmr         : The Reordering Timer
208  *    - reAsmblTmrInt      : Re-ordering timer interval
209  *    - gatherStaPduInfo : Whether to gather information required to create 
210  *                         the STATUS PDU
211  *
212 */
213 typedef struct rlcAmUl
214 {
215 #ifndef LTE_TDD 
216    CmLListCp   *recBufLst;
217 #else
218 //   RlcAmRecBuf   *recBuf[1024];              /**< Reception buffer */
219 #endif
220    RlcSn         rxNext;                /**< RX_Next:Equvalent to VR(R) in 4G */
221    RlcSn         rxNextHighestRcvd;     /**< RX_Next_Highest_Rcvd: Equvalent to VR(H) in 4G */ 
222    RlcSn         rxNextStatusTrig;      /**< rxNextStatusTrig: Equvalent to VR(X) in 4G*/
223    RlcSn         vrMr;                  /**< VR(MR) */ 
224    RlcSn         rxHighestStatus;       /**< rxHighestStatus: Eqvalent to VR(MS) in 4G*/
225    Bool         staTrg;                /**< Whether status trigger occured */
226    Buffer       *partialSdu;           /**< Partially received SDU */
227    RlcSn         expSn;                 /**< Expected SN for reassembly */
228    uint16_t          expSo;                 /**< Expected SO for reassembly */
229    CmTimer      staProhTmr;            /**< T_status_prohibit Timer */
230    uint16_t          staProhTmrInt;         /**< Timer Interval */
231    CmTimer      reAsmblTmr;              /**< T_reordering Timer */
232    uint8_t           reAsmblTmrInt;           /**< Timer Interval */
233    Bool         gatherStaPduInfo;      /**< Gather STATUS PDU creation info*/
234    Bool         isOutOfSeq;            /**< To identify whether packets are Out-Of-Seq or not */
235    uint8_t           snLen;                 /*!< Sequence number length:12 bit or 18 bit : 5GNR RLC */
236    uint32_t          snModMask;             /*!< (2 Pwr SnLen - 1): 5GNR RLC */
237 }RlcAmUl;
238
239 /*@}*/
240
241 /** 
242  * @brief  Structure to hold uplink information about a Radio Bearer
243  *
244  * @details
245  *    - rlcId    : RLC identifier, uniquely identifies a Radio Bearer
246  *    - lch      : Information (type and id) of the logical channel associated 
247  *                 with this Radio  Bearer.
248  *    - mode     : The mode of the Radio Bearer; UM or AM
249  *    - dir      : The direction of the Radio Bearer, downlink or uplink or both
250  *    - inst     : Id of RLC instance where this Radio Bearer is present. Used
251  *                 to find the instance from the Radio Bearer for memory needs 
252  *                 as different instances might have different memory.
253  *    - k1wuSapId : KWU SAP identifier
254  *    - udxSapId : UDX SAP idenrifier
255  *    - transId  : Stores the transaction identifier used to communicate 
256  *                 with MAC, the same value as sent by MAC is passed back 
257  *                 for it to be able to corelate
258  *    - m        : Mode of the RB (TM/UM/AM)
259  *      - umDl   : Unacknowledged Mode downlink information
260  *      - amDl   : Acknowledged Mode downlink information
261 */
262 typedef struct _rlcUlRbCb
263 {
264 /* kw005.201 added support for L2 Measurement */
265 #ifdef LTE_L2_MEAS
266    RlcL2MeasRbCb    rbL2Cb;              /**< RB measurement L2 Cb */
267    RlcUlUeCb        *ueCb;              /*!< Pointer to UeCb  */
268    uint8_t              qci;                 /**< qci of the RB */
269    RlcL2MeasIpThruput l2MeasIpThruput;   /**< Holds related parameter for
270                                              DL/Ul ip throughput>*/
271 #endif /* LTE_L2_MEAS */
272    CmLteRlcId     rlcId;      /**< RLC Identifier */
273    RlcLchInfo      lch;        /**< Logical Channel Info */
274    CmLteRlcMode   mode;       /**< Entity Mode */
275    uint8_t             dir;        /**< Direction for UL/DL */
276    Inst           inst;       /**< Tapa where Rb created Instance id */
277    SpId           k1wuSapId;   /**< KWU sap Id, to get the KwuSapCb */
278    SpId           udxSapId;   /**< KWU sap Id, to get the KwuSapCb */
279    uint32_t            transId;    /**< Transaction Id for RLC */
280    union          
281    {
282       RlcUmUl   umUl;   /**< UM  mode Ul elements */
283       RlcAmUl   amUl;   /**< AM mode uplink elements */
284    }m;   /**< RLC mode specific Info */
285 }RlcUlRbCb;
286
287 /** 
288  * @brief  Structure to hold mapping between logical channel and Radio Bearer
289  *
290  * @details
291  *    - ulRbCb   : Pointer to the uplink Radio Bearer
292 */
293 typedef struct rlcUlLch
294 {
295    RlcUlRbCb *ulRbCb;   /**< Pointer to Uplink RbCb */
296 }RlcUlLch;                                  
297
298 /**
299 * @brief  Structure to hold ue delete information 
300 *
301 * @details
302 *    - pst      :  Pst 
303 *    - ueDelTmr :  Ue delete timer
304 */
305 typedef struct rlcUeDeleteInfo
306 {
307    Pst        pst;        /*Pst */ 
308    CmTimer    ueDelTmr;   /*Ue delete timer*/
309 }RlcUeDeleteInfo;
310
311 /** 
312  * @brief  Structure to hold uplink information about the Cells
313  *
314  * @details
315  *    - cellHlEnt : Information about cells are stored in a hash table. This is
316  *                  required for that.
317  *    - cellId    : Identity of the cell
318  *    - rbCb      : Radio Bearers in the cell
319  *    - lCh       : Logical Channels in the cell
320  *    - selfPstUl : Pst structure for sending messages to self
321 */
322 typedef struct rlcUlCellCb
323 {
324    CmHashListEnt   cellHlEnt;                 /**< Hash list entry for CellCb */
325    CmLteCellId     cellId;                    /**< Cell Id */
326    RlcUlRbCb        *rbCb[RLC_MAX_RB_PER_CELL]; /**< RbCbs within a Cell */
327    RlcUlLch         lCh[RLC_MAX_LCH_PER_CELL];  /**< Logical channels in a cell */
328    Pst             selfPstUl;
329 }RlcUlCellCb;
330
331 /** 
332  * @brief  Structure to hold uplink information about the UEs
333  *
334  * @details
335  *    - ueHlEnt : Information about cells are stored in a hash table. This is
336  *                required for that.
337  *    - key     : Key to store/find the UE in the hashtable
338  *    - srbCb   : Signaling Radio Bearers configured for the UE
339  *    - drbCb   : Data Radio Bearers configured for the UE
340  *    - lCh     : Logical Channels in the UE
341 */
342 struct rlcUlUeCb
343 {
344    CmHashListEnt   ueHlEnt;                   /**< Hash list entry for UeCb */
345    CmLteRnti       ueId;     /*!< UE Id */
346    CmLteCellId     cellId;   /*!< Cell Id */
347    RlcUlRbCb       *srbCb[RLC_MAX_SRB_PER_UE]; /**< SRB RbCbs within an UE */ 
348    RlcUlRbCb       *drbCb[RLC_MAX_DRB_PER_UE]; /**< DRB RbCbs within an UE */ 
349    RlcUlLch        lCh[RLC_MAX_LCH_PER_UE];    /**< Logical channels of an UE*/
350 /* kw005.201 added support for L2 Measurement */
351 #ifdef LTE_L2_MEAS
352    uint32_t        firstPacketTTI;            /*!< is first packet of the burst */
353    uint16_t        numActRb[LKW_MAX_QCI];     /**< number of RBs Active */
354    Bool            isUlBurstActive;   /*!<Has the Burst started for UL IP Thrpt meas */
355 #endif /* LTE_L2_MEAS */
356    RlcUeDeleteInfo ueDeleteInfo;    /*!<Ue Delete Info */
357 };
358
359 /** 
360  * @brief  Structure to hold temporary data of configuration 
361  *
362  * @details
363  *    - entUlCfgCfm      :  Holds the UL configuration status  
364  *    - rbCb             :  Rb Block
365  */
366 typedef struct rlcUlEntTmpData
367 {
368    RlcEntCfgCfmInfo   entUlCfgCfm; /**< Ul Configuration status*/ 
369    RlcUlRbCb           *rbCb;       /**< Rb Block */
370 }RlcUlEntTmpData;
371
372 /** 
373  * @brief  Structure to hold transaction information in configuration request 
374  *
375  * @details
376  *    - transHlEnt   : List entry for transaction block. 
377  *    - transId      : Transaction Id
378  *    - ueId         : ue Id
379  *    - cellId       : cell Id
380  *    - ueCb         : Ue Block
381  *    - cellCb       : Cell Block
382  *    - cfgInfo      : Configuration Information 
383  *    - ueInfo       : UE Information
384  *    - newUeInfo    : New Ue Information
385  *    - cfgTmpData   : Temporary data per Configuration entity
386 */
387 typedef struct rlcUlCfgTmpData
388 {
389    CmHashListEnt    transHlEnt;                  /**< List Entry of 
390                                                    Transaction*/
391    uint32_t              transId;                     /**< Locally generated Transaction Id */
392    uint32_t              uprLyrTransId;               /**< Transaction Id generated by upper layer. 
393                                                       This is used while sending confirm to the User Layer */
394    CmLteCellId      cellId;                      /**< Cell Id */
395    CmLteRnti        ueId;                        /**< Ue Id */
396    RlcUlUeCb         *ueCb;                       /**< Ue Block */
397    RlcUlCellCb       *cellCb;                     /**< Cell Block */
398    RlcCfgInfo       *cfgInfo;                    /**< Config Information*/
399    CkwUeInfo        *ueInfo;                     /**< Ue Information */
400    CkwUeInfo        *newUeInfo;                  /**< New Ue Information */
401    RlcUlEntTmpData   cfgEntData[CKW_MAX_ENT_CFG]; /**< Entity Data */
402 } RlcUlCfgTmpData;
403 /****************************************************************************
404  *                      Declarations
405  ***************************************************************************/
406 /****************************************************************************
407  *                    Configuration Functions 
408  ***************************************************************************/
409
410 S16 rlcValidateRbCfgParams ARGS ((RlcCb *gCb,
411                                         CmLteRnti   ueId,
412                                         CmLteCellId cellId,
413                                         RlcEntCfgInfo  *cfgToValidate,
414                                         CmStatus        *status));
415 S16 rlcCfgValidateUlRb ARGS (( RlcCb *gCb,
416                                     RlcEntCfgInfo *cfgToValidate,
417                                     RlcUlEntTmpData *cfgInfo, 
418                                     RlcUlCfgTmpData *cfg));
419
420 S16 rlcCfgRollBackUlRb ARGS ((RlcCb *gCb,
421                                     CmLteRnti ueId,
422                                     RlcEntCfgInfo *cfgToValidate,
423                                     RlcUlEntTmpData *cfgTempData));
424
425 Void rlcCfgApplyUlRb ARGS ((RlcCb *gCb,
426                                   RlcEntCfgInfo *cfgToAply,
427                                   RlcUlEntTmpData *cfgTmpData,
428                                   RlcUlCfgTmpData *cfgTmpInfo));
429
430 S16 rlcCfgValidateReEstRb ARGS ((RlcCb *gCb,
431                                        CmLteRnti  ueId,
432                                        CmLteCellId cellId,
433                                        RlcEntCfgInfo *cfgToValidate,
434                                        RlcUlEntTmpData   *cfgTmpData));
435
436 Void rlcCfgApplyReEstUlRb ARGS ((RlcCb *gCb,
437                                       CmLteRnti ueId,
438                                       CmLteCellId cellId,
439                                       Bool sndReEstInd,
440                                       RlcUlEntTmpData *cfgTmpData));
441
442 Void rlcCfgApplyDelUlCell ARGS ((RlcCb *gCb,
443                                       RlcUlCfgTmpData *cfgTmpData));
444
445 S16 rlcCfgValidateDelUlCell ARGS ((RlcCb *gCb,
446                                          CmLteCellId cellId,
447                                          RlcEntCfgInfo *cfgToValidate,
448                                          RlcUlEntTmpData   *cfgTmpData,
449                                          RlcUlCfgTmpData *cfgInfo));
450
451 S16 rlcCfgValidateDelUlUe ARGS ((RlcCb *gCb,
452                                        RlcEntCfgInfo *cfgToValidate,
453                                        RlcUlEntTmpData *cfgTmpData,
454                                        RlcUlCfgTmpData *cfgInfo));
455
456 Void rlcCfgApplyDelUlUe ARGS ((RlcCb *gCb,
457                                     RlcUlCfgTmpData *cfgTmpData));
458
459 Void rlcUlHdlCfgReq ARGS ((RlcCb *gCb,
460                                      RlcUlCfgTmpData *cfgInfo,
461                                      RlcCfgInfo *cfg));
462
463 Void rlcCfgApplyUlUeIdChng ARGS ((RlcCb *gCb,
464                                         CkwUeInfo *ueInfo,
465                                         CkwUeInfo *newUeInfo,
466                                         RlcUlCfgTmpData *cfgTmpInfo));
467
468 S16 rlcCfgValidateUeIdChng ARGS ((RlcCb *gCb,
469                                         CkwUeInfo *ueInfo,
470                                         CkwUeInfo *newUeInfo,
471                                         RlcUlCfgTmpData *cfgTmpInfo));
472
473 /****************************************************************************
474  *                    DBM module Functions 
475  ***************************************************************************/
476 S16 rlcDbmUlInit ARGS ((RlcCb *gCb));
477
478 Void rlcDbmUlDeInit ARGS ((RlcCb *gCb));
479
480 S16 rlcDbmAddUlUeCb ARGS ((RlcCb *gCb,
481                                     CmLteRnti ueId,
482                                     CmLteCellId cellId,
483                                     RlcUlUeCb *ueCb));
484
485 uint8_t rlcDbmFetchUlUeCb ARGS ((RlcCb *gCb,
486                                    CmLteRnti ueId,
487                                    CmLteCellId cellId,
488                                    RlcUlUeCb **ueCb));
489
490 Void rlcDbmDelUlUeCb ARGS ((RlcCb *gCb,   
491                                   RlcUlUeCb *ueCb,
492                                   Bool abortFlag));
493
494 Void rlcDbmDelAllUlUe ARGS ((RlcCb *gCb));
495
496 S16 rlcDbmAddUlCellCb ARGS ((RlcCb *gCb,
497                                       CmLteCellId cellId,
498                                       RlcUlCellCb *cellCb));
499
500 Void rlcDbmFetchUlCellCb ARGS ((RlcCb *gCb, 
501                                       CmLteCellId cellId,
502                                       RlcUlCellCb **cellCb));
503
504 Void rlcDbmDelUlCellCb ARGS ((RlcCb *gCb,  
505                                    RlcUlCellCb *cellCb));
506
507 Void rlcDbmDelAllUlCell ARGS ((RlcCb *gCb));
508
509 Void rlcDbmFetchUlRbCbByRbId ARGS ((RlcCb *gCb, 
510                                           CmLteRlcId *rlcId, 
511                                           RlcUlRbCb **rbCb));
512
513 Void rlcDbmFetchUlRbCbFromLchId ARGS ((RlcCb *gCb, 
514                                              CmLteRnti ueId, 
515                                              CmLteCellId cellId, 
516                                              CmLteLcId lcId,  
517                                              RlcUlRbCb **rbCb));
518
519 Void rlcDbmDelAllUlRb ARGS ((RlcCb *gCb, 
520                                    RlcUlRbCb **rbCbLst, 
521                                    uint8_t numRbCb));
522
523 S16 rlcDbmAddUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
524
525 S16 rlcDbmFindUlTransaction ARGS((RlcCb *gCb, 
526                                         uint32_t transId, 
527                                         RlcUlCfgTmpData **cfg));
528
529 S16 rlcDbmDelUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
530
531 S16 rlcDbmDelAllUlTransactions ARGS((RlcCb *gCb));
532
533 Void rlcDbmUlShutdown ARGS ((RlcCb *gCb));
534
535 /****************************************************************************
536  *                    Transparent Mode Functions 
537  ***************************************************************************/
538 #ifdef CCPU_OPT
539 void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
540                             RlcUlRbCb *rbCb,
541                             CmLteRnti   tCrnti,
542                             Buffer *pdu));
543
544 #else
545 void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
546                             RlcUlRbCb *rbCb,
547                             Buffer *pdu));
548 #endif                                 
549
550 Void rlcTmmUlReEstablish ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
551
552 /****************************************************************************
553  *                    Unacknowledged Mode Functions 
554  ***************************************************************************/
555 #ifdef LTE_L2_MEAS
556 Void rlcUmmProcessPdus ARGS((RlcCb *gCb,
557                                   RlcUlRbCb *rbCb, 
558                                   KwPduInfo *pduInfo,
559                                   uint32_t ttiCnt));
560 #else 
561 Void rlcUmmProcessPdus ARGS ((RlcCb *gCb, 
562                                     RlcUlRbCb *rbCb,
563                                     KwPduInfo *pduInfo));
564 #endif 
565 Void rlcUmmUlReEstablish ARGS ((RlcCb *gCb, 
566                                      CmLteRlcId *rlcId, 
567                                      RlcUlRbCb *rbCb));
568
569 Void rlcUmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb  *rbCb));
570
571
572 Void rlcUmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb)); 
573
574 /****************************************************************************
575  *                    Acknowledged Mode Functions 
576  ***************************************************************************/
577 Void rlcAmmUlReEstablish ARGS((RlcCb *gCb, 
578                                      CmLteRlcId rlcId, 
579                                      Bool sndReEst,
580                                      RlcUlRbCb *rbCb));
581 #ifdef LTE_L2_MEAS
582 Void rlcAmmProcessPdus ARGS((RlcCb *gCb,
583                                   RlcUlRbCb *rbCb, 
584                                   KwPduInfo *pduInfo,
585                                   uint32_t ttiCnt));
586 #else
587 Void rlcAmmProcessPdus ARGS((RlcCb *gCb, 
588                                   RlcUlRbCb *rbCb,
589                                   KwPduInfo *pduInfo));
590 #endif 
591
592 Void rlcAmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
593
594 Void rlcAmmStaProTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
595
596 Void rlcAmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
597
598 /****************************************************************************
599  *                    Utility Functions 
600  ***************************************************************************/
601
602 void rlcUtlStoreUmRecBuf ARGS ((CmLListCp   *recBufLst,
603                                 RlcUmRecBuf *recBuf,
604                                 RlcSn        sn
605                               ));
606 RlcUmRecBuf* rlcUtlGetUmRecBuf ARGS ((CmLListCp        *recBufLst,
607                                       RlcSn              sn
608                                     ));
609 void rlcUtlDelUmRecBuf(RlcCb *gCb, CmLListCp *recBufLst, RlcUmRecBuf  *recBuf);
610
611 Void rlcUtlStoreRecBuf ARGS ((CmLListCp        *recBufLst,
612                                     RlcAmRecBuf       *recBuf,
613                                     RlcSn              sn
614                                    ));
615 RlcAmRecBuf* rlcUtlGetRecBuf ARGS ((CmLListCp        *recBufLst,
616                                   RlcSn              sn
617                                   ));
618 Void rlcUtlDelRecBuf ARGS ((CmLListCp        *recBufLst,
619                                   RlcAmRecBuf       *recBuf,
620                                   RlcCb              *gCb
621                                   ));
622
623 uint8_t rlcUtlRcvFrmMac ARGS ((RlcCb *gCb, KwDatIndInfo *datIndInfo));
624
625 uint8_t rlcUtlSendUlDataToDu ARGS ((RlcCb *gCb,RlcUlRbCb *rbCb, Buffer *sdu));
626
627 #ifdef LTE_L2_MEAS
628 S16 rlcUtlHdlL2TmrExp   ARGS (( RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
629
630 Void rlcUtlCalUlIpThrPutIncTTI ARGS ((RlcCb *gCb, 
631                                              RlcUlRbCb  *rbCb,
632                                              uint32_t ttiCnt));
633
634 Void rlcUtlCalUlIpThrPut ARGS((RlcCb *gCb, 
635                                      RlcUlRbCb *rbCb, 
636                                      Buffer *pdu, 
637                                      uint32_t ttiCnt));
638
639 S16 rlcUtlSndUlL2MeasCfm  ARGS ((RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
640
641 S16 rlcUtlSndUlL2MeasNCfm ARGS ((RlcCb *gCb, 
642                                        RlcL2MeasReqEvt *measReqEvt,
643                                        RlcL2MeasCfmEvt *measCfmEvt));
644
645 S16 rlcUtlL2MeasUlInit ARGS((RlcCb *gCb));
646
647 Void rlcUtlResetUlL2MeasInRlcRb ARGS((RlcCb *gCb,
648                                            RlcL2MeasCb *measCb,
649                                            uint8_t measType));
650
651 S16 rlcUtlValidateIpThL2Meas ARGS ((RlcL2MeasReqEvt *measReqEvt,
652          RlcL2MeasCfmEvt *measCfmEvt));
653
654 #endif /*  LTE_L2_MEAS */
655 /****************************************************************************
656  *                    Activation Functions 
657  ***************************************************************************/
658 S16 rlcUlActvInit ARGS ((Ent ent, 
659                                Inst inst, 
660                                Region region, 
661                                Reason reason));
662
663 S16 rlcUlActvTsk ARGS ((Pst *pst, Buffer *mBuf));
664
665 /****************************************************************************
666  *                    Debug Functions 
667  ***************************************************************************/
668 Void DumpRLCUlDebugInformation ARGS((Void));
669
670 uint8_t rlcProcCommLcUlData(Pst *pst, SuId suId, RguCDatIndInfo  *datInd);
671 uint8_t rlcProcDedLcUlData(Pst *pst, SuId suId, RguDDatIndInfo  *datInd);
672
673 #ifdef __cplusplus
674 }
675 #endif /* __cplusplus */
676
677
678 #endif /* __RLC_ULH__ */
679 /**********************************************************************
680   
681          End of file
682 **********************************************************************/