f00d4454715f8d40f1a2c7975b15ab5c5ba1db60
[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 uplink information about the Cells
300  *
301  * @details
302  *    - cellHlEnt : Information about cells are stored in a hash table. This is
303  *                  required for that.
304  *    - cellId    : Identity of the cell
305  *    - rbCb      : Radio Bearers in the cell
306  *    - lCh       : Logical Channels in the cell
307  *    - selfPstUl : Pst structure for sending messages to self
308 */
309 typedef struct rlcUlCellCb
310 {
311    CmHashListEnt   cellHlEnt;                 /**< Hash list entry for CellCb */
312    CmLteCellId     cellId;                    /**< Cell Id */
313    RlcUlRbCb        *rbCb[RLC_MAX_RB_PER_CELL]; /**< RbCbs within a Cell */
314    RlcUlLch         lCh[RLC_MAX_LCH_PER_CELL];  /**< Logical channels in a cell */
315    Pst             selfPstUl;
316 }RlcUlCellCb;
317
318 /** 
319  * @brief  Structure to hold uplink information about the UEs
320  *
321  * @details
322  *    - ueHlEnt : Information about cells are stored in a hash table. This is
323  *                required for that.
324  *    - key     : Key to store/find the UE in the hashtable
325  *    - srbCb   : Signaling Radio Bearers configured for the UE
326  *    - drbCb   : Data Radio Bearers configured for the UE
327  *    - lCh     : Logical Channels in the UE
328 */
329 struct rlcUlUeCb
330 {
331    CmHashListEnt   ueHlEnt;                   /**< Hash list entry for UeCb */
332    CmLteRnti     ueId;     /*!< UE Id */
333    CmLteCellId   cellId;   /*!< Cell Id */
334    RlcUlRbCb        *srbCb[RLC_MAX_SRB_PER_UE]; /**< SRB RbCbs within an UE */ 
335    RlcUlRbCb        *drbCb[RLC_MAX_DRB_PER_UE]; /**< DRB RbCbs within an UE */ 
336    RlcUlLch         lCh[RLC_MAX_LCH_PER_UE];    /**< Logical channels of an UE*/
337 /* kw005.201 added support for L2 Measurement */
338 #ifdef LTE_L2_MEAS
339    uint32_t             firstPacketTTI;            /*!< is first packet of the burst */
340    uint16_t             numActRb[LKW_MAX_QCI];     /**< number of RBs Active */
341    Bool              isUlBurstActive;   /*!<Has the Burst started for UL IP Thrpt meas */
342 #endif /* LTE_L2_MEAS */
343 };
344
345 /** 
346  * @brief  Structure to hold temporary data of configuration 
347  *
348  * @details
349  *    - entUlCfgCfm      :  Holds the UL configuration status  
350  *    - rbCb             :  Rb Block
351  */
352 typedef struct rlcUlEntTmpData
353 {
354    RlcEntCfgCfmInfo   entUlCfgCfm; /**< Ul Configuration status*/ 
355    RlcUlRbCb           *rbCb;       /**< Rb Block */
356 }RlcUlEntTmpData;
357
358 /** 
359  * @brief  Structure to hold transaction information in configuration request 
360  *
361  * @details
362  *    - transHlEnt   : List entry for transaction block. 
363  *    - transId      : Transaction Id
364  *    - ueId         : ue Id
365  *    - cellId       : cell Id
366  *    - ueCb         : Ue Block
367  *    - cellCb       : Cell Block
368  *    - cfgInfo      : Configuration Information 
369  *    - ueInfo       : UE Information
370  *    - newUeInfo    : New Ue Information
371  *    - cfgTmpData   : Temporary data per Configuration entity
372 */
373 typedef struct rlcUlCfgTmpData
374 {
375    CmHashListEnt    transHlEnt;                  /**< List Entry of 
376                                                    Transaction*/
377    uint32_t              transId;                     /**< Locally generated Transaction Id */
378    uint32_t              uprLyrTransId;               /**< Transaction Id generated by upper layer. 
379                                                       This is used while sending confirm to the User Layer */
380    CmLteCellId      cellId;                      /**< Cell Id */
381    CmLteRnti        ueId;                        /**< Ue Id */
382    RlcUlUeCb         *ueCb;                       /**< Ue Block */
383    RlcUlCellCb       *cellCb;                     /**< Cell Block */
384    RlcCfgInfo       *cfgInfo;                    /**< Config Information*/
385    CkwUeInfo        *ueInfo;                     /**< Ue Information */
386    CkwUeInfo        *newUeInfo;                  /**< New Ue Information */
387    RlcUlEntTmpData   cfgEntData[CKW_MAX_ENT_CFG]; /**< Entity Data */
388 } RlcUlCfgTmpData;
389 /****************************************************************************
390  *                      Declarations
391  ***************************************************************************/
392 /****************************************************************************
393  *                    Configuration Functions 
394  ***************************************************************************/
395
396 S16 rlcValidateRbCfgParams ARGS ((RlcCb *gCb,
397                                         CmLteRnti   ueId,
398                                         CmLteCellId cellId,
399                                         RlcEntCfgInfo  *cfgToValidate,
400                                         CmStatus        *status));
401 S16 rlcCfgValidateUlRb ARGS (( RlcCb *gCb,
402                                     RlcEntCfgInfo *cfgToValidate,
403                                     RlcUlEntTmpData *cfgInfo, 
404                                     RlcUlCfgTmpData *cfg));
405
406 S16 rlcCfgRollBackUlRb ARGS ((RlcCb *gCb,
407                                     CmLteRnti ueId,
408                                     RlcEntCfgInfo *cfgToValidate,
409                                     RlcUlEntTmpData *cfgTempData));
410
411 Void rlcCfgApplyUlRb ARGS ((RlcCb *gCb,
412                                   RlcEntCfgInfo *cfgToAply,
413                                   RlcUlEntTmpData *cfgTmpData,
414                                   RlcUlCfgTmpData *cfgTmpInfo));
415
416 S16 rlcCfgValidateReEstRb ARGS ((RlcCb *gCb,
417                                        CmLteRnti  ueId,
418                                        CmLteCellId cellId,
419                                        RlcEntCfgInfo *cfgToValidate,
420                                        RlcUlEntTmpData   *cfgTmpData));
421
422 Void rlcCfgApplyReEstUlRb ARGS ((RlcCb *gCb,
423                                       CmLteRnti ueId,
424                                       CmLteCellId cellId,
425                                       Bool sndReEstInd,
426                                       RlcUlEntTmpData *cfgTmpData));
427
428 Void rlcCfgApplyDelUlCell ARGS ((RlcCb *gCb,
429                                       RlcUlCfgTmpData *cfgTmpData));
430
431 S16 rlcCfgValidateDelUlCell ARGS ((RlcCb *gCb,
432                                          CmLteCellId cellId,
433                                          RlcEntCfgInfo *cfgToValidate,
434                                          RlcUlEntTmpData   *cfgTmpData,
435                                          RlcUlCfgTmpData *cfgInfo));
436
437 S16 rlcCfgValidateDelUlUe ARGS ((RlcCb *gCb,
438                                        RlcEntCfgInfo *cfgToValidate,
439                                        RlcUlEntTmpData *cfgTmpData,
440                                        RlcUlCfgTmpData *cfgInfo));
441
442 Void rlcCfgApplyDelUlUe ARGS ((RlcCb *gCb,
443                                     RlcUlCfgTmpData *cfgTmpData));
444
445 Void rlcUlHdlCfgReq ARGS ((RlcCb *gCb,
446                                      RlcUlCfgTmpData *cfgInfo,
447                                      RlcCfgInfo *cfg));
448
449 Void rlcCfgApplyUlUeIdChng ARGS ((RlcCb *gCb,
450                                         CkwUeInfo *ueInfo,
451                                         CkwUeInfo *newUeInfo,
452                                         RlcUlCfgTmpData *cfgTmpInfo));
453
454 S16 rlcCfgValidateUeIdChng ARGS ((RlcCb *gCb,
455                                         CkwUeInfo *ueInfo,
456                                         CkwUeInfo *newUeInfo,
457                                         RlcUlCfgTmpData *cfgTmpInfo));
458
459 /****************************************************************************
460  *                    DBM module Functions 
461  ***************************************************************************/
462 S16 rlcDbmUlInit ARGS ((RlcCb *gCb));
463
464 Void rlcDbmUlDeInit ARGS ((RlcCb *gCb));
465
466 S16 rlcDbmAddUlUeCb ARGS ((RlcCb *gCb,
467                                     CmLteRnti ueId,
468                                     CmLteCellId cellId,
469                                     RlcUlUeCb *ueCb));
470
471 uint8_t rlcDbmFetchUlUeCb ARGS ((RlcCb *gCb,
472                                    CmLteRnti ueId,
473                                    CmLteCellId cellId,
474                                    RlcUlUeCb **ueCb));
475
476 Void rlcDbmDelUlUeCb ARGS ((RlcCb *gCb,   
477                                   RlcUlUeCb *ueCb,
478                                   Bool abortFlag));
479
480 Void rlcDbmDelAllUlUe ARGS ((RlcCb *gCb));
481
482 S16 rlcDbmAddUlCellCb ARGS ((RlcCb *gCb,
483                                       CmLteCellId cellId,
484                                       RlcUlCellCb *cellCb));
485
486 Void rlcDbmFetchUlCellCb ARGS ((RlcCb *gCb, 
487                                       CmLteCellId cellId,
488                                       RlcUlCellCb **cellCb));
489
490 Void rlcDbmDelUlCellCb ARGS ((RlcCb *gCb,  
491                                    RlcUlCellCb *cellCb));
492
493 Void rlcDbmDelAllUlCell ARGS ((RlcCb *gCb));
494
495 Void rlcDbmFetchUlRbCbByRbId ARGS ((RlcCb *gCb, 
496                                           CmLteRlcId *rlcId, 
497                                           RlcUlRbCb **rbCb));
498
499 Void rlcDbmFetchUlRbCbFromLchId ARGS ((RlcCb *gCb, 
500                                              CmLteRnti ueId, 
501                                              CmLteCellId cellId, 
502                                              CmLteLcId lcId,  
503                                              RlcUlRbCb **rbCb));
504
505 Void rlcDbmDelAllUlRb ARGS ((RlcCb *gCb, 
506                                    RlcUlRbCb **rbCbLst, 
507                                    uint8_t numRbCb));
508
509 S16 rlcDbmAddUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
510
511 S16 rlcDbmFindUlTransaction ARGS((RlcCb *gCb, 
512                                         uint32_t transId, 
513                                         RlcUlCfgTmpData **cfg));
514
515 S16 rlcDbmDelUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
516
517 S16 rlcDbmDelAllUlTransactions ARGS((RlcCb *gCb));
518
519 Void rlcDbmUlShutdown ARGS ((RlcCb *gCb));
520
521 /****************************************************************************
522  *                    Transparent Mode Functions 
523  ***************************************************************************/
524 #ifdef CCPU_OPT
525 void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
526                             RlcUlRbCb *rbCb,
527                             CmLteRnti   tCrnti,
528                             Buffer *pdu));
529
530 #else
531 void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
532                             RlcUlRbCb *rbCb,
533                             Buffer *pdu));
534 #endif                                 
535
536 Void rlcTmmUlReEstablish ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
537
538 /****************************************************************************
539  *                    Unacknowledged Mode Functions 
540  ***************************************************************************/
541 #ifdef LTE_L2_MEAS
542 Void rlcUmmProcessPdus ARGS((RlcCb *gCb,
543                                   RlcUlRbCb *rbCb, 
544                                   KwPduInfo *pduInfo,
545                                   uint32_t ttiCnt));
546 #else 
547 Void rlcUmmProcessPdus ARGS ((RlcCb *gCb, 
548                                     RlcUlRbCb *rbCb,
549                                     KwPduInfo *pduInfo));
550 #endif 
551 Void rlcUmmUlReEstablish ARGS ((RlcCb *gCb, 
552                                      CmLteRlcId *rlcId, 
553                                      RlcUlRbCb *rbCb));
554
555 Void rlcUmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb  *rbCb));
556
557
558 Void rlcUmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb)); 
559
560 /****************************************************************************
561  *                    Acknowledged Mode Functions 
562  ***************************************************************************/
563 Void rlcAmmUlReEstablish ARGS((RlcCb *gCb, 
564                                      CmLteRlcId rlcId, 
565                                      Bool sndReEst,
566                                      RlcUlRbCb *rbCb));
567 #ifdef LTE_L2_MEAS
568 Void rlcAmmProcessPdus ARGS((RlcCb *gCb,
569                                   RlcUlRbCb *rbCb, 
570                                   KwPduInfo *pduInfo,
571                                   uint32_t ttiCnt));
572 #else
573 Void rlcAmmProcessPdus ARGS((RlcCb *gCb, 
574                                   RlcUlRbCb *rbCb,
575                                   KwPduInfo *pduInfo));
576 #endif 
577
578 Void rlcAmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
579
580 Void rlcAmmStaProTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
581
582 Void rlcAmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
583
584 /****************************************************************************
585  *                    Utility Functions 
586  ***************************************************************************/
587
588 void rlcUtlStoreUmRecBuf ARGS ((CmLListCp   *recBufLst,
589                                 RlcUmRecBuf *recBuf,
590                                 RlcSn        sn
591                               ));
592 RlcUmRecBuf* rlcUtlGetUmRecBuf ARGS ((CmLListCp        *recBufLst,
593                                       RlcSn              sn
594                                     ));
595 void rlcUtlDelUmRecBuf(RlcCb *gCb, CmLListCp *recBufLst, RlcUmRecBuf  *recBuf);
596
597 Void rlcUtlStoreRecBuf ARGS ((CmLListCp        *recBufLst,
598                                     RlcAmRecBuf       *recBuf,
599                                     RlcSn              sn
600                                    ));
601 RlcAmRecBuf* rlcUtlGetRecBuf ARGS ((CmLListCp        *recBufLst,
602                                   RlcSn              sn
603                                   ));
604 Void rlcUtlDelRecBuf ARGS ((CmLListCp        *recBufLst,
605                                   RlcAmRecBuf       *recBuf,
606                                   RlcCb              *gCb
607                                   ));
608
609 uint8_t rlcUtlRcvFrmMac ARGS ((RlcCb *gCb, KwDatIndInfo *datIndInfo));
610
611 uint8_t rlcUtlSendUlDataToDu ARGS ((RlcCb *gCb,RlcUlRbCb *rbCb, Buffer *sdu));
612
613 #ifdef LTE_L2_MEAS
614 S16 rlcUtlHdlL2TmrExp   ARGS (( RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
615
616 Void rlcUtlCalUlIpThrPutIncTTI ARGS ((RlcCb *gCb, 
617                                              RlcUlRbCb  *rbCb,
618                                              uint32_t ttiCnt));
619
620 Void rlcUtlCalUlIpThrPut ARGS((RlcCb *gCb, 
621                                      RlcUlRbCb *rbCb, 
622                                      Buffer *pdu, 
623                                      uint32_t ttiCnt));
624
625 S16 rlcUtlSndUlL2MeasCfm  ARGS ((RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
626
627 S16 rlcUtlSndUlL2MeasNCfm ARGS ((RlcCb *gCb, 
628                                        RlcL2MeasReqEvt *measReqEvt,
629                                        RlcL2MeasCfmEvt *measCfmEvt));
630
631 S16 rlcUtlL2MeasUlInit ARGS((RlcCb *gCb));
632
633 Void rlcUtlResetUlL2MeasInRlcRb ARGS((RlcCb *gCb,
634                                            RlcL2MeasCb *measCb,
635                                            uint8_t measType));
636
637 S16 rlcUtlValidateIpThL2Meas ARGS ((RlcL2MeasReqEvt *measReqEvt,
638          RlcL2MeasCfmEvt *measCfmEvt));
639
640 #endif /*  LTE_L2_MEAS */
641 /****************************************************************************
642  *                    Activation Functions 
643  ***************************************************************************/
644 S16 rlcUlActvInit ARGS ((Ent ent, 
645                                Inst inst, 
646                                Region region, 
647                                Reason reason));
648
649 S16 rlcUlActvTsk ARGS ((Pst *pst, Buffer *mBuf));
650
651 /****************************************************************************
652  *                    Debug Functions 
653  ***************************************************************************/
654 Void DumpRLCUlDebugInformation ARGS((Void));
655
656 uint8_t rlcProcCommLcUlData(Pst *pst, SuId suId, RguCDatIndInfo  *datInd);
657 uint8_t rlcProcDedLcUlData(Pst *pst, SuId suId, RguDDatIndInfo  *datInd);
658
659 #ifdef __cplusplus
660 }
661 #endif /* __cplusplus */
662
663
664 #endif /* __RLC_ULH__ */
665 /**********************************************************************
666   
667          End of file
668 **********************************************************************/