U8, U16, U32 data type changes
[o-du/l2.git] / src / 5gnrrlc / kw_lmm.c
index 2772e41..7011841 100755 (executable)
@@ -81,7 +81,7 @@ RLCStats gRlcStats;
 RlcCb *rlcCb[MAX_RLC_INSTANCES];
 EXTERN S16 rlcActvTmr ARGS ((Ent ent, Inst inst));
 
-PRIVATE Void rlcLmmSendCfm ARGS ((RlcCb *gCb,Pst *pst,RlcMngmt *cfm,U8 type,
+PRIVATE Void rlcLmmSendCfm ARGS ((RlcCb *gCb,Pst *pst,RlcMngmt *cfm,uint8_t type,
                                  Header *hdr));
 PRIVATE S16 rlcLmmGenCfg ARGS ((RlcCb *gCb, RlcGenCfg *cfg));
 PRIVATE S16 rlcLmmCfgKwuSap ARGS ((RlcCb *gCb,RlcSapCfg *cfg));
@@ -140,8 +140,6 @@ RlcGenCfg   *cfg;
    CmTqCp   *rlcTqCp;
    Size     rguSapSize;
 
-   TRC2(rlcLmmGenCfg)
-
    if(cfg->maxUe > RLC_MAX_UE) 
    {
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -262,7 +260,7 @@ RlcGenCfg   *cfg;
 #if 0
       /* Register the timer */
 /*Pradeep: changing the SRegTmrMt() to SRegTmr()*/
-      if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (U16)cfg->timeRes,
+      if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (uint16_t)cfg->timeRes,
               rlcActvTmr) != ROK)
       {
          RLC_FREE(gCb,gCb->u.dlCb->udxDlSap, rlcUdxSapSize);
@@ -364,7 +362,7 @@ RlcGenCfg   *cfg;
 
       /* Register the timer */
 #if 0
-      if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (U16)cfg->timeRes,
+      if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (uint16_t)cfg->timeRes,
               rlcActvTmr) != ROK)
       {
          RLC_FREE(gCb,gCb->u.ulCb->udxUlSap, rlcUdxSapSize);
@@ -390,7 +388,7 @@ RlcGenCfg   *cfg;
    /* Timer Initialization  */
    gCb->rlcTqCp.tmrLen = RLC_TMR_LEN;
 
-   cmMemset((U8*)gCb->rlcTq, NULLP, sizeof(CmTqType) * RLC_TMR_LEN);
+   memset(gCb->rlcTq, NULLP, sizeof(CmTqType) * RLC_TMR_LEN);
 
    RLC_MEM_CPY(&(gCb->init.lmPst), &cfg->lmPst, sizeof(Pst));
 
@@ -428,24 +426,22 @@ RlcGenCfg   *cfg;
 PRIVATE Void rlcLmmSendCfm
 (
 RlcCb      *gCb,
-Pst       *pst,                
+Pst        *pst,                
 RlcMngmt   *cfm,               
-U8        type,              
-Header    *hdr              
+uint8_t    type,              
+Header     *hdr              
 )
 #else
 PRIVATE Void rlcLmmSendCfm(gCb,pst, cfm, type, hdr)
 RlcCb      gCb;
-Pst       *pst;            
+Pst        *pst;            
 RlcMngmt   *cfm;           
-U8        type;          
-Header    *hdr;         
+uint8_t    type;          
+Header     *hdr;         
 #endif
 {
    Pst   rPst;   /* Reply post structure */
 
-   TRC2(rlcLmmSendCfm);
-
    RLC_MEM_SET(&rPst, 0, sizeof(Pst));   
  
    /* reply post structure for confirmation */
@@ -505,7 +501,7 @@ Header    *hdr;
          break;
    }
 
-   RETVOID
+   return
 } 
 
 
@@ -580,8 +576,6 @@ RlcMngmt   *cfg;
    Reason   reason;   /* failure reason */
    RlcCb     *tRlcCb=NULLP;
 
-   TRC3(RlcMiRlcConfigReq);
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Check if the instance is configured */
    if (pst->dstInst >= MAX_RLC_INSTANCES)
@@ -736,8 +730,6 @@ RlcMngmt   *cntrl;
    Reason   reason;   /* failure reason */
    RlcCb     *tRlcCb=NULLP;
 
-   TRC3(RlcMiLkwCntrlReq)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Check if the instance is configured */
    if (pst->dstInst >= MAX_RLC_INSTANCES)
@@ -845,8 +837,6 @@ RlcMngmt   *sta;
    Reason    reason;   /* Failure reason */
    RlcCb      *tRlcCb=NULLP;
 
-   TRC3(RlcMiLkwStaReq);
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Check if the instance is configured */
    if (pst->dstInst >= MAX_RLC_INSTANCES)
@@ -981,8 +971,6 @@ RlcMngmt   *sts;
    Reason    reason;   /* Reason for failure */
    RlcCb     *tRlcCb=NULLP;
 
-   TRC3(RlcMiLkwStsReq);
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Check if the instance is configured */
    if (pst->dstInst >= MAX_RLC_INSTANCES)
@@ -1094,14 +1082,12 @@ RlcL2MeasReqEvt *measReqEvt;
 #endif
 {
    S16            ret = ROK;
-   U16            cntr;
-   U8             measType;
+   uint16_t       cntr;
+   uint8_t        measType;
    RlcL2MeasCfmEvt measCfmEvt;
 
    RlcCb     *tRlcCb;
 
-   TRC3(RlcMiLkwL2MeasReq);
-
    tRlcCb =  RLC_GET_RLCCB(pst->dstInst);
 
    /* Initialize measCfmEvt */
@@ -1175,7 +1161,7 @@ RlcL2MeasReqEvt *measReqEvt;
          return RFAILED;
       }   
 #endif      
-      cmMemcpy((Void*)measEvt, (Void*)measReqEvt, sizeof(RlcL2MeasReqEvt));
+      memcpy(measEvt, measReqEvt, sizeof(RlcL2MeasReqEvt));
       /*Redirect the request to DL task */
       /* NOTE:As of today, there are no cases where the Req will fail at DL
          as long as it reached the DL, so we don't wait for a confirmation from
@@ -1214,23 +1200,21 @@ After receving this request, RLC stops L2 Measurement
 S16 RlcMiLkwL2MeasStopReq
 (
 Pst            *pst,
-U8             measType
+uint8_t             measType
 )
 #else
 S16 RlcMiLkwL2MeasStopReq (pst, measType)
 Pst            *pst;
-U8             measType;
+uint8_t             measType;
 #endif
 {
    S16 ret = ROK;
    RlcL2MeasEvtCb *measEvtCb = NULLP;
 
-   U16            cntr;
-   U8             status = ROK;
+   uint16_t            cntr;
+   uint8_t             status = ROK;
    RlcCb     *tRlcCb;
 
-   TRC3(RlcMiLkwL2MeasStopReq);
-
    tRlcCb =  RLC_GET_RLCCB(pst->dstInst);
 
    /* reset the counter values for the measurement that is stopped */
@@ -1260,7 +1244,7 @@ U8             measType;
       rlcUlUdxL2MeasStopReq(&(RLC_GET_UDX_SAP(tRlcCb)->pst),measType);
       /*return ROK;*/
    }
-   /*cmMemset((U8*)&measCfmEvt, 0, sizeof(RlcL2MeasCfmEvt)); */
+   /*memset(&measCfmEvt, 0, sizeof(RlcL2MeasCfmEvt)); */
 
    status = LCM_PRIM_OK; 
    RlcMiLkwL2MeasStopCfm(&tRlcCb->genCfg.lmPst, measType,status); 
@@ -1282,19 +1266,18 @@ After receving this request, RLC sends L2 Measurement
 S16 RlcMiLkwL2MeasSendReq
 (
 Pst            *pst,
-U8             measType
+uint8_t             measType
 )
 #else
 S16 RlcMiLkwL2MeasSendReq (pst, measType)
 Pst            *pst;
-U8             measType;
+uint8_t             measType;
 #endif
 {
    /*S16 ret = ROK;*/
    RlcL2MeasEvtCb *measEvtCb = NULLP;
-   U16            cntr;
+   uint16_t            cntr;
    RlcCb     *tRlcCb;
-   TRC3(RlcMiLkwL2MeasSendReq);
 
    tRlcCb =  RLC_GET_RLCCB(pst->dstInst);
    
@@ -1350,7 +1333,6 @@ RlcSapCfg   *cfg;
 #endif
 {
    RlcKwuSapCb   *rlcKwuSapCb;
-   TRC2(rlcLmmCfgKwuSap)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate the protocol parameters */
@@ -1408,8 +1390,6 @@ RlcSapCfg   *cfg;
 {
    RlcCkwSapCb  *ckwSap;
    
-   TRC2(rlcLmmCfgCkwSap)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate config parameters */
    if ((cfg->sapId >= RLC_MAX_CKWSAPS) || (cfg->sapId < 0) )
@@ -1469,8 +1449,6 @@ RlcSapCfg   *cfg;
    RlcUdxDlSapCb   *udxDlSap;
    RlcUdxUlSapCb   *udxUlSap;
 
-   TRC2(rlcLmmCfgUdxSap);
-   
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate the protocol parameters */
    if((cfg->sapId >= RLC_MAX_UDXSAPS) || (cfg->sapId < 0))
@@ -1544,8 +1522,6 @@ RlcSapCfg   *cfg;
 {
    RlcRguSapCb   *rguSap;
 
-   TRC2(rlcLmmCfgRguSap);
-   
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate the protocol parameters */
    if((cfg->sapId >= gCb->genCfg.maxRguSaps) || \
@@ -1603,10 +1579,8 @@ PRIVATE S16 rlcLmmValidateGenCntrl(cntrl)
 RlcMngmt   *cntrl;                
 #endif
 {
-   S16   reason;    /* reason for failure */
-   U8    sAction;   /* subaction field */
-
-   TRC2(rlcLmmValidateGenCntrl);
+   S16     reason;    /* reason for failure */
+   uint8_t sAction;   /* subaction field */
 
    reason = LCM_REASON_NOT_APPL;
    sAction = cntrl->t.cntrl.subAction;
@@ -1653,8 +1627,6 @@ RlcCb   *gCb;
    Size   rlcSapSize;
    Size   rlcUdxSapSize;
  
-   TRC2(rlcLmmCleanGblRsrcs)   
    if (gCb->init.cfgDone)
    {
       /* Deregister the timers */
@@ -1731,7 +1703,7 @@ RlcCb   *gCb;
       gCb->init.usta = FALSE;
    }
 
-   RETVOID;
+   return;
 }
 
 /**
@@ -1760,9 +1732,7 @@ RlcCb   *gCb;
 #endif
 {
    RlcRguSapCb   *rguSap;
-   U32          idx;
-
-   TRC2(rlcLmmShutdown)
+   uint32_t          idx;
 
    if (gCb->genCfg.rlcMode == LKW_RLC_MODE_DL)
    {
@@ -1833,8 +1803,6 @@ RlcMngmt *cntrl;
 #endif /* DEBUGP */
    S16   reason;         /* reason for failure */
    
-   TRC2(rlcLmmGenCntrl);
-
    /* Validate control parameters */
    reason = rlcLmmValidateGenCntrl (cntrl);
 
@@ -1934,7 +1902,6 @@ RlcCb      *gCb;
 RlcMngmt   *cntrl;               
 #endif
 {
-   TRC2(rlcLmmUdxSapCntrl)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (gCb->genCfg.rlcMode == LKW_RLC_MODE_DL)
@@ -2018,8 +1985,6 @@ RlcMngmt   *cntrl;
 {
    RlcRguSapCb   *rguSap;   /* rgu sap pointer */
 
-   TRC2(rlcLmmLSapCntrl)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* validate SuId */
    if((cntrl->t.cntrl.s.sapCntrl.suId < 0) || 
@@ -2103,8 +2068,6 @@ RlcKwuSapSta   *sta;
 {
    RlcKwuSapCb   *rlcKwSapCb;
    
-   TRC2(rlcLmmGetKwuSapSta);
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate the protocol parameters */
    if ((sta->spId >= (S16)gCb->genCfg.maxKwuSaps)||
@@ -2146,7 +2109,6 @@ RlcCb          *gCb;
 RlcRguSapSta   *sta;       
 #endif
 {
-   TRC2(rlcLmmGetRguSapSta);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate the protocol parameters */
@@ -2185,7 +2147,6 @@ rlcCb             *gCb,
 RlcCkwCntSapSta   *sta;   
 #endif
 {
-   TRC2(rlcLmmGetCkwCntSapSta);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate config parameters */
@@ -2227,7 +2188,6 @@ RlcGenSts   *sts;
 Action     action;         
 #endif
 {
-   TRC2(rlcLmmGetGenSts);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* Validate protocol parameters */
@@ -2276,7 +2236,6 @@ Elmnt     elmnt;
 Action    action;         
 #endif
 {
-   TRC2(rlcLmmGetSapSts);
 
    /* Validate protocol parameters */
    if (action != LKW_ZEROSTS && action != LKW_NOZEROSTS)
@@ -2351,53 +2310,51 @@ Action    action;
 #ifdef ANSI
 Void rlcLmmSendAlarm
 (
-RlcCb   *gCb,
-U16    category,  
-U16    event,    
-U16    cause,   
-SuId   suId,   
-U32    ueId,  
-U8     qci   
+RlcCb      *gCb,
+uint16_t    category,  
+uint16_t    event,    
+uint16_t    cause,   
+SuId        suId,   
+uint32_t    ueId,  
+uint8_t     qci   
 )
 #else
 Void rlcLmmSendAlarm(category, event, cause, suId, ueId, qci)
 RlcCb   *gCb;
-U16    category; 
-U16    event;   
-U16    cause;  
-SuId   suId;  
-U32    ueId; 
-U8     qci;    
+uint16_t    category; 
+uint16_t    event;   
+uint16_t    cause;  
+SuId        suId;  
+uint32_t    ueId; 
+uint8_t     qci;    
 #endif
 #else /* LTE_L2_MEAS */
 #ifdef ANSI
 Void rlcLmmSendAlarm
 (
-RlcCb   *gCb,
-U16    category, 
-U16    event,   
-U16    cause,  
-SuId   suId,  
-U32    ueId  
+RlcCb       *gCb,
+uint16_t    category, 
+uint16_t    event,   
+uint16_t    cause,  
+SuId        suId,  
+uint32_t    ueId  
 )
 #else
 Void rlcLmmSendAlarm(category, event, cause, suId, ueId)
-RlcCb   *gCb;
-U16    category; 
-U16    event;   
-U16    cause;  
-SuId   suId;  
-U32    ueId; 
+RlcCb       *gCb;
+uint16_t    category; 
+uint16_t    event;   
+uint16_t    cause;  
+SuId        suId;  
+uint32_t    ueId; 
 #endif
 #endif /* LTE_L2_MEAS */
 {
    RlcMngmt   usta;   /* Rlc Management Structure */
 
-   TRC2(rlcLmmSendAlarm);
-
    if(gCb->init.usta == FALSE)
    {
-      RETVOID;
+      return;
    }
 
    usta.hdr.elmId.elmnt = STGEN;
@@ -2424,7 +2381,7 @@ U32    ueId;
 
    RlcMiLkwStaInd(&(gCb->init.lmPst), &usta);
 
-   RETVOID;
+   return;
 
 } 
 
@@ -2461,13 +2418,11 @@ Buffer   *mBuf;
    MsgLen    tempCnt;
    Pst       pst;
 
-   TRC2(rlcLmmSendTrc)
-
    RLOG2(L_DEBUG, "rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d",
                      event,
                      gCb->trcLen);
 
-   cmMemset((U8 *)&trc, 0, sizeof(RlcMngmt));
+   memset(&trc, 0, sizeof(RlcMngmt));
 
    pst = gCb->init.lmPst;
 
@@ -2595,7 +2550,6 @@ Inst   inst;
 #endif
 {
    RlcCb   *gCb; 
-   TRC2(rlcActvTmr)
 
    if (inst >= MAX_RLC_INSTANCES)
    {