UL data path changes at Phy stub, RLC UL UM and DU APP [Issue-ID: ODUHIGH-262]
[o-du/l2.git] / src / 5gnrrlc / kw_ul.x
index 4474eb2..daed3ed 100755 (executable)
@@ -42,8 +42,26 @@ extern "C" {
 
 typedef struct rlcUlUeCb RlcUlUeCb;
 
-/** @defgroup um_uplink UM Uplink Module
+/** 
+ * @brief  Structure to hold a RLC UM PDU segment
+ *
+ * @details
+ *    - lstEnt : This is required for the linked list in which the segments
+ *               are stored
+ *    - seg    : Holds the segment data
+ *    - segSz  : The length of the segment in bytes
+ *    - soEnd  : SOEnd
+ *    - umHdr  : The UM Header for the PDU segment
+ *
 */
+typedef struct rlcUmSeg
+{
+   CmLList   lstEnt;   /*!< List entry for PDU segment */
+   Buffer    *seg;     /*!< PDU segment */
+   MsgLen    segSz;    /*!< Buffer Size */
+   uint16_t  soEnd;    /*!< Segment Offset End */
+   RlcUmHdr  umHdr;    /*!<Um Header */
+}RlcUmSeg;
 
 /** 
  * @brief  Structure to hold a  UM PDU
@@ -55,9 +73,17 @@ typedef struct rlcUlUeCb RlcUlUeCb;
 */
 typedef struct rlcUmRecBuf
 {
-   Buffer    *pdu;    /**< Buffer holding the UM PDU */
-   RlcUmHdr   umHdr;   /**< UM PDU Header Information */
-   MsgLen    pduSz;   /**< PDU Size */
+   RlcSn       sn;            /*!< Sequence Number */
+   CmLList     lnk;           /*!< Link to the receive buffer list */
+   Bool        allSegRcvd;    /*!< Flag to check whether all seg are received */
+   Bool        noMissingSeg;  /*!< Flag to check all the bytes are received before the last byte of segment */
+   CmLListCp   segLst;        /*!< PDU Segments list */
+   uint16_t    expSo;         /*!< Next expected seg offset */
+   Bool        allRcvd;       /*!< All bytes received or not */
+   RlcUmSeg    *expByteSeg;   /*!< Next expected byte segment */
+   Buffer      *pdu;          /**< Buffer holding the UM PDU */
+   RlcUmHdr    umHdr;         /**< UM PDU Header Information */
+   MsgLen      pduSz;         /**< PDU Size */
 }RlcUmRecBuf;
 
 /** 
@@ -75,18 +101,19 @@ typedef struct rlcUmRecBuf
 */
 typedef struct rlcUmUl
 {
-   U8           snLen;         /**< Sequence number length */
-   U8           reOrdTmrInt;   /**< Timer Interval */
-   RlcUmRecBuf   **recBuf;      /**< Reception buffer */
+   uint8_t       snLen;         /**< Sequence number length */
+   uint8_t       reAsmblTmrInt; /**< Timer Interval */
+   CmLListCp     *recBufLst;    /**!<Reception Buffer List */
    RlcSn         umWinSz;       /**< UM window size */
-   U16          modBitMask;    /**< Bitmask for modulus to wrap around variables */
+   uint16_t      modBitMask;    /**< Bitmask for modulus to wrap around variables */
    RlcSn         sn;            /**< Sequence number */
    RlcSn         vrUr;          /**< VR(UR) - Receive state variable */
    RlcSn         vrUh;          /**< VR(UH) - Highest received state variable */
    RlcSn         vrUx;          /**< VR(UX) - Reordering state variable */
-   CmTimer      reOrdTmr;      /**< Reordering Timer */
-   Buffer       *partialSdu;   /**< Partial SDU - Remains till the complete SDU
-                                                               is received */
+   CmTimer       reAsmblTmr;    /**< Reordering Timer */
+   Buffer        *assembleSdu;  /**< Assemble Sdu - Remains till the complete SDU is received */
+   uint16_t      expSo;         /*!< Expected SO for reassembly */
+   RlcSn         expSn;         /*!< Expected Sn */
 }RlcUmUl;
 /*@}*/
 
@@ -107,8 +134,8 @@ typedef struct rlcSeg
    CmLList   lstEnt;   /**< List entry for PDU segment */
    Buffer    *seg;     /**< PDU segment */
    MsgLen    segSz;    /**< Buffer Size */
-   U16       soEnd;    /**< Segment Offset End */
-   RlcAmHdr   amHdr;    /**< AM header */
+   uint16_t  soEnd;    /**< Segment Offset End */
+   RlcAmHdr  amHdr;    /**< AM header */
 }RlcSeg;
 
 /*@}*/
@@ -131,10 +158,10 @@ typedef struct rlcAmRecBuf
    CmLList     lnk;           /**< Link to the receive buffer list */
    Buffer      *pdu;          /**< PDU buffer */
    MsgLen      pduSz;         /**< Buffer Size */
-   RlcAmHdr     amHdr;         /**< AM header Info */
+   RlcAmHdr    amHdr;         /**< AM header Info */
    CmLListCp   segLst;        /**< PDU Segments list */
-   RlcSeg       *expByteSeg;   /**< Next expected byte segment */
-   U16         expSo;         /**< Next expected seg offset */
+   RlcSeg      *expByteSeg;   /**< Next expected byte segment */
+   uint16_t    expSo;         /**< Next expected seg offset */
    Bool        allRcvd;       /**< All bytes received or not */
    Bool        isDelvUpperLayer; /**< Is it sent to upper layer */ 
 }RlcAmRecBuf;
@@ -180,15 +207,15 @@ typedef struct rlcAmUl
    Bool         staTrg;                /**< Whether status trigger occured */
    Buffer       *partialSdu;           /**< Partially received SDU */
    RlcSn         expSn;                 /**< Expected SN for reassembly */
-   U16          expSo;                 /**< Expected SO for reassembly */
+   uint16_t          expSo;                 /**< Expected SO for reassembly */
    CmTimer      staProhTmr;            /**< T_status_prohibit Timer */
-   U16          staProhTmrInt;         /**< Timer Interval */
+   uint16_t          staProhTmrInt;         /**< Timer Interval */
    CmTimer      reOrdTmr;              /**< T_reordering Timer */
-   U8           reOrdTmrInt;           /**< Timer Interval */
+   uint8_t           reOrdTmrInt;           /**< Timer Interval */
    Bool         gatherStaPduInfo;      /**< Gather STATUS PDU creation info*/
    Bool         isOutOfSeq;            /**< To identify whether packets are Out-Of-Seq or not */
-   U8           snLen;                 /*!< Sequence number length:12 bit or 18 bit : 5GNR RLC */
-   U32          snModMask;             /*!< (2 Pwr SnLen - 1): 5GNR RLC */
+   uint8_t           snLen;                 /*!< Sequence number length:12 bit or 18 bit : 5GNR RLC */
+   uint32_t          snModMask;             /*!< (2 Pwr SnLen - 1): 5GNR RLC */
 }RlcAmUl;
 
 /*@}*/
@@ -220,18 +247,18 @@ typedef struct _rlcUlRbCb
 #ifdef LTE_L2_MEAS
    RlcL2MeasRbCb    rbL2Cb;              /**< RB measurement L2 Cb */
    RlcUlUeCb        *ueCb;              /*!< Pointer to UeCb  */
-   U8              qci;                 /**< qci of the RB */
+   uint8_t              qci;                 /**< qci of the RB */
    RlcL2MeasIpThruput l2MeasIpThruput;   /**< Holds related parameter for
                                              DL/Ul ip throughput>*/
 #endif /* LTE_L2_MEAS */
    CmLteRlcId     rlcId;      /**< RLC Identifier */
    RlcLchInfo      lch;        /**< Logical Channel Info */
    CmLteRlcMode   mode;       /**< Entity Mode */
-   U8             dir;        /**< Direction for UL/DL */
+   uint8_t             dir;        /**< Direction for UL/DL */
    Inst           inst;       /**< Tapa where Rb created Instance id */
    SpId           k1wuSapId;   /**< KWU sap Id, to get the KwuSapCb */
    SpId           udxSapId;   /**< KWU sap Id, to get the KwuSapCb */
-   U32            transId;    /**< Transaction Id for RLC */
+   uint32_t            transId;    /**< Transaction Id for RLC */
    union          
    {
       RlcUmUl   umUl;   /**< UM  mode Ul elements */
@@ -291,8 +318,8 @@ struct rlcUlUeCb
    RlcUlLch         lCh[RLC_MAX_LCH_PER_UE];    /**< Logical channels of an UE*/
 /* kw005.201 added support for L2 Measurement */
 #ifdef LTE_L2_MEAS
-   U32             firstPacketTTI;            /*!< is first packet of the burst */
-   U16             numActRb[LKW_MAX_QCI];     /**< number of RBs Active */
+   uint32_t             firstPacketTTI;            /*!< is first packet of the burst */
+   uint16_t             numActRb[LKW_MAX_QCI];     /**< number of RBs Active */
    Bool              isUlBurstActive;   /*!<Has the Burst started for UL IP Thrpt meas */
 #endif /* LTE_L2_MEAS */
 };
@@ -329,8 +356,8 @@ typedef struct rlcUlCfgTmpData
 {
    CmHashListEnt    transHlEnt;                  /**< List Entry of 
                                                    Transaction*/
-   U32              transId;                     /**< Locally generated Transaction Id */
-   U32              uprLyrTransId;               /**< Transaction Id generated by upper layer. 
+   uint32_t              transId;                     /**< Locally generated Transaction Id */
+   uint32_t              uprLyrTransId;               /**< Transaction Id generated by upper layer. 
                                                       This is used while sending confirm to the User Layer */
    CmLteCellId      cellId;                      /**< Cell Id */
    CmLteRnti        ueId;                        /**< Ue Id */
@@ -342,71 +369,71 @@ typedef struct rlcUlCfgTmpData
    RlcUlEntTmpData   cfgEntData[CKW_MAX_ENT_CFG]; /**< Entity Data */
 } RlcUlCfgTmpData;
 /****************************************************************************
- *                      EXTERN Declarations
+ *                      Declarations
  ***************************************************************************/
 /****************************************************************************
  *                    Configuration Functions 
  ***************************************************************************/
 
-EXTERN S16 rlcValidateRbCfgParams ARGS ((RlcCb *gCb,
+S16 rlcValidateRbCfgParams ARGS ((RlcCb *gCb,
                                         CmLteRnti   ueId,
                                         CmLteCellId cellId,
                                         RlcEntCfgInfo  *cfgToValidate,
                                         CmStatus        *status));
-EXTERN S16 rlcCfgValidateUlRb ARGS (( RlcCb *gCb,
+S16 rlcCfgValidateUlRb ARGS (( RlcCb *gCb,
                                     RlcEntCfgInfo *cfgToValidate,
                                     RlcUlEntTmpData *cfgInfo, 
                                     RlcUlCfgTmpData *cfg));
 
-EXTERN S16 rlcCfgRollBackUlRb ARGS ((RlcCb *gCb,
+S16 rlcCfgRollBackUlRb ARGS ((RlcCb *gCb,
                                     CmLteRnti ueId,
                                     RlcEntCfgInfo *cfgToValidate,
                                     RlcUlEntTmpData *cfgTempData));
 
-EXTERN Void rlcCfgApplyUlRb ARGS ((RlcCb *gCb,
+Void rlcCfgApplyUlRb ARGS ((RlcCb *gCb,
                                   RlcEntCfgInfo *cfgToAply,
                                   RlcUlEntTmpData *cfgTmpData,
                                   RlcUlCfgTmpData *cfgTmpInfo));
 
-EXTERN S16 rlcCfgValidateReEstRb ARGS ((RlcCb *gCb,
+S16 rlcCfgValidateReEstRb ARGS ((RlcCb *gCb,
                                        CmLteRnti  ueId,
                                        CmLteCellId cellId,
                                        RlcEntCfgInfo *cfgToValidate,
                                        RlcUlEntTmpData   *cfgTmpData));
 
-EXTERN Void rlcCfgApplyReEstUlRb ARGS ((RlcCb *gCb,
+Void rlcCfgApplyReEstUlRb ARGS ((RlcCb *gCb,
                                       CmLteRnti ueId,
                                       CmLteCellId cellId,
                                       Bool sndReEstInd,
                                       RlcUlEntTmpData *cfgTmpData));
 
-EXTERN Void rlcCfgApplyDelUlCell ARGS ((RlcCb *gCb,
+Void rlcCfgApplyDelUlCell ARGS ((RlcCb *gCb,
                                       RlcUlCfgTmpData *cfgTmpData));
 
-EXTERN S16 rlcCfgValidateDelUlCell ARGS ((RlcCb *gCb,
+S16 rlcCfgValidateDelUlCell ARGS ((RlcCb *gCb,
                                          CmLteCellId cellId,
                                          RlcEntCfgInfo *cfgToValidate,
                                          RlcUlEntTmpData   *cfgTmpData,
                                          RlcUlCfgTmpData *cfgInfo));
 
-EXTERN S16 rlcCfgValidateDelUlUe ARGS ((RlcCb *gCb,
+S16 rlcCfgValidateDelUlUe ARGS ((RlcCb *gCb,
                                        RlcEntCfgInfo *cfgToValidate,
                                        RlcUlEntTmpData *cfgTmpData,
                                        RlcUlCfgTmpData *cfgInfo));
 
-EXTERN Void rlcCfgApplyDelUlUe ARGS ((RlcCb *gCb,
+Void rlcCfgApplyDelUlUe ARGS ((RlcCb *gCb,
                                     RlcUlCfgTmpData *cfgTmpData));
 
-EXTERN Void rlcUlHdlCfgReq ARGS ((RlcCb *gCb,
+Void rlcUlHdlCfgReq ARGS ((RlcCb *gCb,
                                      RlcUlCfgTmpData *cfgInfo,
                                      RlcCfgInfo *cfg));
 
-EXTERN Void rlcCfgApplyUlUeIdChng ARGS ((RlcCb *gCb,
+Void rlcCfgApplyUlUeIdChng ARGS ((RlcCb *gCb,
                                         CkwUeInfo *ueInfo,
                                         CkwUeInfo *newUeInfo,
                                         RlcUlCfgTmpData *cfgTmpInfo));
 
-EXTERN S16 rlcCfgValidateUeIdChng ARGS ((RlcCb *gCb,
+S16 rlcCfgValidateUeIdChng ARGS ((RlcCb *gCb,
                                         CkwUeInfo *ueInfo,
                                         CkwUeInfo *newUeInfo,
                                         RlcUlCfgTmpData *cfgTmpInfo));
@@ -414,188 +441,202 @@ EXTERN S16 rlcCfgValidateUeIdChng ARGS ((RlcCb *gCb,
 /****************************************************************************
  *                    DBM module Functions 
  ***************************************************************************/
-EXTERN S16 rlcDbmUlInit ARGS ((RlcCb *gCb));
+S16 rlcDbmUlInit ARGS ((RlcCb *gCb));
 
-EXTERN Void rlcDbmUlDeInit ARGS ((RlcCb *gCb));
+Void rlcDbmUlDeInit ARGS ((RlcCb *gCb));
 
-EXTERN S16 rlcDbmAddUlUeCb ARGS ((RlcCb *gCb,
+S16 rlcDbmAddUlUeCb ARGS ((RlcCb *gCb,
                                     CmLteRnti ueId,
                                     CmLteCellId cellId,
                                     RlcUlUeCb *ueCb));
 
-EXTERN S16 rlcDbmFetchUlUeCb ARGS ((RlcCb *gCb,
+uint8_t rlcDbmFetchUlUeCb ARGS ((RlcCb *gCb,
                                    CmLteRnti ueId,
                                    CmLteCellId cellId,
                                    RlcUlUeCb **ueCb));
 
-EXTERN Void rlcDbmDelUlUeCb ARGS ((RlcCb *gCb,   
+Void rlcDbmDelUlUeCb ARGS ((RlcCb *gCb,   
                                   RlcUlUeCb *ueCb,
                                   Bool abortFlag));
 
-EXTERN Void rlcDbmDelAllUlUe ARGS ((RlcCb *gCb));
+Void rlcDbmDelAllUlUe ARGS ((RlcCb *gCb));
 
-EXTERN S16 rlcDbmAddUlCellCb ARGS ((RlcCb *gCb,
+S16 rlcDbmAddUlCellCb ARGS ((RlcCb *gCb,
                                       CmLteCellId cellId,
                                       RlcUlCellCb *cellCb));
 
-EXTERN Void rlcDbmFetchUlCellCb ARGS ((RlcCb *gCb, 
+Void rlcDbmFetchUlCellCb ARGS ((RlcCb *gCb, 
                                       CmLteCellId cellId,
                                       RlcUlCellCb **cellCb));
 
-EXTERN Void rlcDbmDelUlCellCb ARGS ((RlcCb *gCb,  
+Void rlcDbmDelUlCellCb ARGS ((RlcCb *gCb,  
                                    RlcUlCellCb *cellCb));
 
-EXTERN Void rlcDbmDelAllUlCell ARGS ((RlcCb *gCb));
+Void rlcDbmDelAllUlCell ARGS ((RlcCb *gCb));
 
-EXTERN Void rlcDbmFetchUlRbCbByRbId ARGS ((RlcCb *gCb, 
+Void rlcDbmFetchUlRbCbByRbId ARGS ((RlcCb *gCb, 
                                           CmLteRlcId *rlcId, 
                                           RlcUlRbCb **rbCb));
 
-EXTERN Void rlcDbmFetchUlRbCbFromLchId ARGS ((RlcCb *gCb, 
+Void rlcDbmFetchUlRbCbFromLchId ARGS ((RlcCb *gCb, 
                                              CmLteRnti ueId, 
                                              CmLteCellId cellId, 
                                              CmLteLcId lcId,  
                                              RlcUlRbCb **rbCb));
 
-EXTERN Void rlcDbmDelAllUlRb ARGS ((RlcCb *gCb, 
+Void rlcDbmDelAllUlRb ARGS ((RlcCb *gCb, 
                                    RlcUlRbCb **rbCbLst, 
-                                   U8 numRbCb));
+                                   uint8_t numRbCb));
 
-EXTERN S16 rlcDbmAddUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
+S16 rlcDbmAddUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
 
-EXTERN S16 rlcDbmFindUlTransaction ARGS((RlcCb *gCb, 
-                                        U32 transId, 
+S16 rlcDbmFindUlTransaction ARGS((RlcCb *gCb, 
+                                        uint32_t transId, 
                                         RlcUlCfgTmpData **cfg));
 
-EXTERN S16 rlcDbmDelUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
+S16 rlcDbmDelUlTransaction ARGS((RlcCb *gCb, RlcUlCfgTmpData *cfg));
 
-EXTERN S16 rlcDbmDelAllUlTransactions ARGS((RlcCb *gCb));
+S16 rlcDbmDelAllUlTransactions ARGS((RlcCb *gCb));
 
-EXTERN Void rlcDbmUlShutdown ARGS ((RlcCb *gCb));
+Void rlcDbmUlShutdown ARGS ((RlcCb *gCb));
 
 /****************************************************************************
  *                    Transparent Mode Functions 
  ***************************************************************************/
 #ifdef CCPU_OPT
-EXTERN Void rlcTmmRcvFrmLi ARGS ((RlcCb *gCb, 
-                                       RlcUlRbCb *rbCb,
-                                       CmLteRnti tCrnti, 
-                                       Buffer *pdu));
-#else /* CCPU_OPT */
-EXTERN Void rlcTmmRcvFrmLi ARGS ((RlcCb *gCb,
-                                       RlcUlRbCb *rbCb,
-                                       Buffer *pdu));
-#endif /* CCPU_OPT */
-
-EXTERN Void rlcTmmUlReEstablish ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
+void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
+                            RlcUlRbCb *rbCb,
+                           CmLteRnti   tCrnti,
+                            Buffer *pdu));
+
+#else
+void rlcTmmRcvFrmMac ARGS ((RlcCb *gCb,
+                            RlcUlRbCb *rbCb,
+                            Buffer *pdu));
+#endif                                
+
+Void rlcTmmUlReEstablish ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
 
 /****************************************************************************
  *                    Unacknowledged Mode Functions 
  ***************************************************************************/
 #ifdef LTE_L2_MEAS
-EXTERN Void rlcUmmProcessPdus ARGS((RlcCb *gCb,
+Void rlcUmmProcessPdus ARGS((RlcCb *gCb,
                                   RlcUlRbCb *rbCb, 
                                   KwPduInfo *pduInfo,
-                                  U32 ttiCnt));
+                                  uint32_t ttiCnt));
 #else 
-EXTERN Void rlcUmmProcessPdus ARGS ((RlcCb *gCb, 
+Void rlcUmmProcessPdus ARGS ((RlcCb *gCb, 
                                     RlcUlRbCb *rbCb,
                                     KwPduInfo *pduInfo));
 #endif 
-EXTERN Void rlcUmmUlReEstablish ARGS ((RlcCb *gCb, 
+Void rlcUmmUlReEstablish ARGS ((RlcCb *gCb, 
                                      CmLteRlcId *rlcId, 
                                      RlcUlRbCb *rbCb));
 
-EXTERN Void rlcUmmReOrdTmrExp ARGS((RlcCb *gCb, RlcUlRbCb  *rbCb));
+Void rlcUmmReAsmblTmrExp ARGS((RlcCb *gCb, RlcUlRbCb  *rbCb));
 
 
-EXTERN Void rlcUmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb)); 
+Void rlcUmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb)); 
 
 /****************************************************************************
  *                    Acknowledged Mode Functions 
  ***************************************************************************/
-EXTERN Void rlcAmmUlReEstablish ARGS((RlcCb *gCb, 
+Void rlcAmmUlReEstablish ARGS((RlcCb *gCb, 
                                      CmLteRlcId rlcId, 
                                      Bool sndReEst,
                                      RlcUlRbCb *rbCb));
 #ifdef LTE_L2_MEAS
-EXTERN Void rlcAmmProcessPdus ARGS((RlcCb *gCb,
+Void rlcAmmProcessPdus ARGS((RlcCb *gCb,
                                   RlcUlRbCb *rbCb, 
                                   KwPduInfo *pduInfo,
-                                  U32 ttiCnt));
+                                  uint32_t ttiCnt));
 #else
-EXTERN Void rlcAmmProcessPdus ARGS((RlcCb *gCb, 
+Void rlcAmmProcessPdus ARGS((RlcCb *gCb, 
                                   RlcUlRbCb *rbCb,
                                   KwPduInfo *pduInfo));
 #endif 
 
-EXTERN Void rlcAmmReOrdTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
+Void rlcAmmReOrdTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
 
-EXTERN Void rlcAmmStaProTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
+Void rlcAmmStaProTmrExp ARGS((RlcCb *gCb, RlcUlRbCb *rbCb));
 
-EXTERN Void rlcAmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
+Void rlcAmmFreeUlRbCb ARGS ((RlcCb *gCb, RlcUlRbCb *rbCb));
 
 /****************************************************************************
  *                    Utility Functions 
  ***************************************************************************/
-EXTERN Void rlcUtlStoreRecBuf ARGS ((CmLListCp        *recBufLst,
+
+void rlcUtlStoreUmRecBuf ARGS ((CmLListCp   *recBufLst,
+                                RlcUmRecBuf *recBuf,
+                                RlcSn        sn
+                              ));
+RlcUmRecBuf* rlcUtlGetUmRecBuf ARGS ((CmLListCp        *recBufLst,
+                                      RlcSn              sn
+                                    ));
+void rlcUtlDelUmRecBuf(RlcCb *gCb, CmLListCp *recBufLst, RlcUmRecBuf  *recBuf);
+
+Void rlcUtlStoreRecBuf ARGS ((CmLListCp        *recBufLst,
                                     RlcAmRecBuf       *recBuf,
                                     RlcSn              sn
                                    ));
-EXTERN RlcAmRecBuf* rlcUtlGetRecBuf ARGS ((CmLListCp        *recBufLst,
+RlcAmRecBuf* rlcUtlGetRecBuf ARGS ((CmLListCp        *recBufLst,
                                   RlcSn              sn
                                   ));
-EXTERN Void rlcUtlDelRecBuf ARGS ((CmLListCp        *recBufLst,
+Void rlcUtlDelRecBuf ARGS ((CmLListCp        *recBufLst,
                                   RlcAmRecBuf       *recBuf,
                                   RlcCb              *gCb
                                   ));
 
-EXTERN S16 rlcUtlRcvFrmLi ARGS ((RlcCb *gCb, KwDatIndInfo *datIndInfo));
+uint8_t rlcUtlRcvFrmMac ARGS ((RlcCb *gCb, KwDatIndInfo *datIndInfo));
 
-EXTERN S16 rlcUtlSndDatInd ARGS ((RlcCb *gCb,RlcUlRbCb *rbCb, Buffer *sdu));
+uint8_t rlcUtlSendUlDataToDu ARGS ((RlcCb *gCb,RlcUlRbCb *rbCb, Buffer *sdu));
 
 #ifdef LTE_L2_MEAS
-EXTERN S16 rlcUtlHdlL2TmrExp   ARGS (( RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
+S16 rlcUtlHdlL2TmrExp   ARGS (( RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
 
-EXTERN  Void rlcUtlCalUlIpThrPutIncTTI ARGS ((RlcCb *gCb, 
+Void rlcUtlCalUlIpThrPutIncTTI ARGS ((RlcCb *gCb, 
                                              RlcUlRbCb  *rbCb,
-                                             U32 ttiCnt));
+                                             uint32_t ttiCnt));
 
-EXTERN Void rlcUtlCalUlIpThrPut ARGS((RlcCb *gCb, 
+Void rlcUtlCalUlIpThrPut ARGS((RlcCb *gCb, 
                                      RlcUlRbCb *rbCb, 
                                      Buffer *pdu, 
-                                     U32 ttiCnt));
+                                     uint32_t ttiCnt));
 
-EXTERN S16 rlcUtlSndUlL2MeasCfm  ARGS ((RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
+S16 rlcUtlSndUlL2MeasCfm  ARGS ((RlcCb *gCb, RlcL2MeasEvtCb *measEvtCb));
 
-EXTERN S16 rlcUtlSndUlL2MeasNCfm ARGS ((RlcCb *gCb, 
+S16 rlcUtlSndUlL2MeasNCfm ARGS ((RlcCb *gCb, 
                                        RlcL2MeasReqEvt *measReqEvt,
                                        RlcL2MeasCfmEvt *measCfmEvt));
 
-EXTERN S16 rlcUtlL2MeasUlInit ARGS((RlcCb *gCb));
+S16 rlcUtlL2MeasUlInit ARGS((RlcCb *gCb));
 
-EXTERN Void rlcUtlResetUlL2MeasInRlcRb ARGS((RlcCb *gCb,
+Void rlcUtlResetUlL2MeasInRlcRb ARGS((RlcCb *gCb,
                                            RlcL2MeasCb *measCb,
-                                           U8 measType));
+                                           uint8_t measType));
 
-EXTERN S16 rlcUtlValidateIpThL2Meas ARGS ((RlcL2MeasReqEvt *measReqEvt,
+S16 rlcUtlValidateIpThL2Meas ARGS ((RlcL2MeasReqEvt *measReqEvt,
          RlcL2MeasCfmEvt *measCfmEvt));
 
 #endif /*  LTE_L2_MEAS */
 /****************************************************************************
  *                    Activation Functions 
  ***************************************************************************/
-EXTERN S16 rlcUlActvInit ARGS ((Ent ent, 
+S16 rlcUlActvInit ARGS ((Ent ent, 
                                Inst inst, 
                                Region region, 
                                Reason reason));
 
-EXTERN S16 rlcUlActvTsk ARGS ((Pst *pst, Buffer *mBuf));
+S16 rlcUlActvTsk ARGS ((Pst *pst, Buffer *mBuf));
 
 /****************************************************************************
  *                    Debug Functions 
  ***************************************************************************/
-EXTERN Void DumpRLCUlDebugInformation ARGS((Void));
+Void DumpRLCUlDebugInformation ARGS((Void));
+
+uint8_t rlcProcCommLcUlData(Pst *pst, SuId suId, RguCDatIndInfo  *datInd);
+uint8_t rlcProcDedLcUlData(Pst *pst, SuId suId, RguDDatIndInfo  *datInd);
 
 #ifdef __cplusplus
 }