Merge "Added a new Flag ODU_LWR_MAC_DEBUG in the code"
[o-du/l2.git] / src / 5gnrsch / rg_sch_drx.c
index 5b44497..0b2dc16 100755 (executable)
@@ -37,15 +37,7 @@ static int RLOG_MODULE_ID=4096;
 static int RLOG_FILE_ID=163;
 
 /* header include files -- defines (.h) */
-#include "envopt.h"        /* environment options */
-#include "envdep.h"        /* environment dependent */
-#include "envind.h"        /* environment independent */
-#include "gen.h"           /* general layer */
-#include "ssi.h"           /* system service interface */
-#include "cm_hash.h"       /* common hash list */
-#include "cm_llist.h"      /* common linked list library */
-#include "cm_err.h"        /* common error */
-#include "cm_lte.h"        /* common LTE */
+#include "common_def.h"
 #include "lrg.h"
 #include "rgr.h"
 #include "rgm.h"
@@ -62,15 +54,6 @@ static int RLOG_FILE_ID=163;
 #include "rl_common.h"
 
 /* header/extern include files (.x) */
-#include "gen.x"           /* general layer typedefs */
-#include "ssi.x"           /* system services typedefs */
-#include "cm5.x"           /* common timers */
-#include "cm_hash.x"       /* common hash list */
-#include "cm_lib.x"        /* common library */
-#include "cm_llist.x"      /* common linked list */
-#include "cm_mblk.x"       /* memory management */
-#include "cm_tkns.x"       /* common tokens */
-#include "cm_lte.x"       /* common tokens */
 #include "tfu.x"           /* TFU types */
 #include "lrg.x"           /* layer management typedefs for MAC */
 #include "rgr.x"           /* layer management typedefs for MAC */
@@ -320,21 +303,18 @@ RgUeUlHqCb   *hqE
  * @return 
  */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxTtiInd 
+Void rgSCHDrxTtiInd 
 (
 RgSchCellCb  *cell
 )
 #else
-PUBLIC Void rgSCHDrxTtiInd (cell)
+Void rgSCHDrxTtiInd (cell)
 RgSchCellCb  *cell;
 #endif
 {
    U16 dlIndex;
    U16 ulIndex;
 
-   TRC2(rgSCHDrxTtiInd );
-
-
    dlIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot +
          RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
 
@@ -417,12 +397,10 @@ U16           ulIndex;
 #endif
 {
 
-   TRC2(rgSCHDrxTtiHdlOnDur);
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    if ( cell == (RgSchCellCb* )NULLP )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -430,7 +408,7 @@ U16           ulIndex;
   
    rgSCHDrxTtiHdlOnDurUl(cell, ulIndex);
 
-   RETVALUE(ROK);
+   return ROK;
 
 }/*rgSCHDrxTtiHdlOnDur*/
 
@@ -462,14 +440,14 @@ U16           ulIndex;
  */
 
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxTtiHdlInActv
+S16 rgSCHDrxTtiHdlInActv
 (
 RgSchCellCb  *cell,
 U16 dlIndex,
 U16 ulIndex
 )
 #else
-PUBLIC S16 rgSCHDrxTtiHdlInActv(cell, dlIndex, ulIndex)
+S16 rgSCHDrxTtiHdlInActv(cell, dlIndex, ulIndex)
 RgSchCellCb  *cell;
 U16 dlIndex;
 U16 ulIndex;
@@ -485,12 +463,10 @@ U16 ulIndex;
    RgSchCmnCell      *cellSch = NULLP;
    Bool              delInUlScan = FALSE;
 
-   TRC2(rgSCHDrxTtiHdlInActv);
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )   
    if ( cell == (RgSchCellCb* )NULLP) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -678,7 +654,7 @@ U16 ulIndex;
    cellSch = RG_SCH_CMN_GET_CELL(cell);
    cellSch->apisDl->rgSCHDlInactvtUes(cell,&dlInactvLst);
 
-      RETVALUE(ROK);
+      return ROK;
 }/*rgSCHDrxTtiHdlInActv*/
 
  /** @brief This function handles the per TTI processing for DRX short cycle
@@ -703,14 +679,14 @@ U16 ulIndex;
  */
 
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxTtiHdlShortCycle 
+S16 rgSCHDrxTtiHdlShortCycle 
 (
 RgSchCellCb  *cell,
 U16           dlIndex,
 U16           ulIndex
 )
 #else
-PUBLIC S16 rgSCHDrxTtiHdlShortCycle (cell, dlIndex, ulIndex)
+S16 rgSCHDrxTtiHdlShortCycle (cell, dlIndex, ulIndex)
 RgSchCellCb  *cell;
 U16           dlIndex;
 U16           ulIndex;
@@ -721,12 +697,10 @@ U16           ulIndex;
    RgSchUeCb         *ue=NULLP;
    RgSchDrxUeCb      *drxUe=NULLP;
 
-   TRC2(rgSCHDrxTtiHdlShortCycle );
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    if ( cell == (RgSchCellCb* )NULLP )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -762,7 +736,7 @@ U16           ulIndex;
       rgSCHDrxMvToNxtOnDurOcc(cell,ue,RG_SCH_DRX_DL_DELTA,TRUE);
    }/*while(node)...*/
 
-   RETVALUE(ROK);
+   return ROK;
 }/*rgSCHDrxTtiHdlShortCycle*/
 
 
@@ -812,18 +786,16 @@ U16                   ulIndex;
 #if ( ERRCLASS & ERRCLS_INT_PAR)
    if ( cell == (RgSchCellCb *)NULLP )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /*ERRCLASS & ERRCLS_INT_PAR*/
 
 
-   TRC2(rgSCHDrxTtiHdlDlHarq );
-   
    rgSCHDrxTtiHdlDlHarqRTT(cell, dlIndex);
 
    rgSCHDrxTtiHdlUlHarqRTT(cell, ulIndex);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
  /** @brief This function is called by the common scheduler as part of
@@ -846,14 +818,14 @@ U16                   ulIndex;
   */
 
 #ifdef ANSI
-PUBLIC Void rgSCHDrxStrtInActvTmr
+Void rgSCHDrxStrtInActvTmr
 (
 RgSchCellCb  *cell,
 CmLListCp    *ueLst,
 U8            direction
 )
 #else
-PUBLIC Void rgSCHDrxStrtInActvTmr(cell, ueLst, direction)
+Void rgSCHDrxStrtInActvTmr(cell, ueLst, direction)
 RgSchCellCb  *cell;
 CmLListCp    *ueLst;
 U8            direction;
@@ -878,10 +850,6 @@ U8            direction;
    RgSchCmnCell      *cellSch = NULLP;
    Bool              delInUlScan = FALSE;
 
-
-   TRC2(rgSCHDrxStrtInActvTmr);
-
-
    if ( direction == RG_SCH_DRX_UL)
    {
 #ifndef LTE_TDD
@@ -1045,14 +1013,14 @@ U8            direction;
   * @return Void 
   */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxStartHarqRTTTmr
+Void rgSCHDrxStartHarqRTTTmr
 (
 RgSchCellCb            *cell,
 RgSchDlHqProcCb        *hqP,
 U8                     tbCnt
 )
 #else
-PUBLIC Void rgSCHDrxStartHarqRTTTmr(cell, hqP, tbCnt)
+Void rgSCHDrxStartHarqRTTTmr(cell, hqP, tbCnt)
 RgSchCellCb             *cell;
 RgSchDlHqProcCb         *hqP;
 U8                      tbCnt;
@@ -1066,8 +1034,6 @@ U8                      tbCnt;
    U8                   firstDlTxOcassion;
    U8                   drxRetxTmrStartSf;
 #endif    
-   TRC2(rgSCHDrxStartHarqRTTTmr);
-
 
    drxCell = RG_SCH_DRX_GET_CELL(cell);
    drxHq   = RG_SCH_DRX_GET_DL_HQ(hqP);
@@ -1174,14 +1140,14 @@ U8                      tbCnt;
  * -# RFAILED
  */
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxUeCfg 
+S16 rgSCHDrxUeCfg 
 (
  RgSchCellCb *cell,
  RgSchUeCb   *ue,
  RgrUeCfg    *ueCfg
  )
 #else
-PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
+S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
  RgSchCellCb *cell;
  RgSchUeCb   *ue;
  RgrUeCfg    *ueCfg;
@@ -1196,13 +1162,10 @@ PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
    U8                cellIdx;
 
 
-   TRC2(rgSCHDrxUeCfg);
-
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )   
    if ( cell == (RgSchCellCb* )NULLP) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if ((ue == (RgSchUeCb* )NULLP)
@@ -1211,7 +1174,7 @@ PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "rgSCHDrxUeCfg():"
                "Invalid params.cell or ue or ueCfg is NULL ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1224,7 +1187,7 @@ PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
    {
       RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
                "Memory allocation FAILED for DRX UECB CRBTI:%d",ue->ueId);
-      RETVALUE(ret);
+      return (ret);
    }
 
    ueDrxCb = ue->drxCb;
@@ -1307,7 +1270,7 @@ PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
       ueDrxCb->shortCycleEnt.node = (PTR)ue;
    }
 
-   RETVALUE(ret);
+   return (ret);
 } /* end of rgSCHDrxUeCfg */
 
 /** @brief This function gets the next occurance of onDurationTimer from the
@@ -1358,12 +1321,11 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
    U32               numOfCycles;
    U32               nxtDist;
 
-   TRC3(rgSCHDrxGetNxtOnDur);
 
 #if ( ERRCLASS & ERRCLS_INT_PAR ) 
    if ( cell == (RgSchCellCb* )NULLP ) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if( (drxCb == (RgSchDrxUeCb* )NULLP)
@@ -1374,7 +1336,7 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
                         "rgSCHDrxGetNxOnDur():Invalid params."
                         "cell/drxCb/nxtOnDur is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1432,7 +1394,7 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
       nxtOnDur->sfn      = (U16)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
       nxtOnDur->slot = (U16)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
    }
-   RETVALUE(ROK);
+   return ROK;
 } /* end of rgSCHDrxGetNxtOnDur */ 
 
 /** @brief This function is a utility function to copy the UE configuration from
@@ -1462,7 +1424,6 @@ PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
  RgrUeDrxCfg   *drxCfg;
 #endif
 {
-   TRC3(rgSCHDrxCpyUeCfg);
 
 #if ( ERRCLASS & ERRCLS_INT_PAR ) 
    if ( (ueCb == (RgSchDrxUeCb* )NULLP ) 
@@ -1470,7 +1431,7 @@ PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
         (drxCfg == (RgrUeDrxCfg* )NULLP)
       )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1488,7 +1449,7 @@ PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
    ueCb->shortDrxCycle        = drxCfg->drxShortDrx.shortDrxCycle;
    ueCb->shortCycleTmrLen     = drxCfg->drxShortDrx.drxShortCycleTmr;
    
-   RETVALUE(ROK);
+   return ROK;
 } /* end of rgSCHDrxCpyUeCfg */ 
 
 #ifdef RGR_V2
@@ -1516,14 +1477,14 @@ PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
  * @return  ROK/RFAILED
  */
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxUeReCfg 
+S16 rgSCHDrxUeReCfg 
 (
  RgSchCellCb *cell, 
  RgSchUeCb   *ue, 
  RgrUeRecfg  *ueReCfg
  )
 #else
-PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
+S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
  RgSchCellCb *cell; 
  RgSchUeCb   *ue; 
  RgrUeRecfg  *ueReCfg;
@@ -1546,8 +1507,6 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
    U16               curIndx;
    U8                cellIdx;
 
-   TRC2(rgSCHDrxUeReCfg);
-
 
   /* drx was disabled but now enabled for this ue */ 
   if ( (ue->isDrxEnabled == FALSE) 
@@ -1564,7 +1523,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
         RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
            "rgSCHdrxUeReCfg():""Memory allocation FAILED for DRX UE Cb CRNTI:%d",
                   ue->ueId);
-        RETVALUE(ret);
+        return (ret);
      }
 
      ue->isDrxEnabled = TRUE;    /* sachin */
@@ -1595,7 +1554,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
   }
   if( ue->drxCb == NULLP ) 
   { 
-     RETVALUE(RFAILED)
+     return RFAILED
   }
    ueDrxCb = ue->drxCb;
    
@@ -1747,7 +1706,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
       }   
    }
 
-   RETVALUE(ROK);
+   return ROK;
 
 } /* end of rgSCHDrxUeReCfg */
 #endif
@@ -1766,7 +1725,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
  * @return ROK/RFAILED
  */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxUeHqReset
+Void rgSCHDrxUeHqReset
 (
  RgSchCellCb   *cell,
  RgSchUeCb     *ue,
@@ -1774,7 +1733,7 @@ PUBLIC Void rgSCHDrxUeHqReset
  U8            cellIdx
  )
 #else
-PUBLIC Void rgSCHDrxUeHqReset(cell, ue, hqE, cellIdx)
+Void rgSCHDrxUeHqReset(cell, ue, hqE, cellIdx)
  RgSchCellCb   *cell; 
  RgSchUeCb     *ue;
  RgSchDlHqEnt  *hqE;
@@ -1785,8 +1744,6 @@ PUBLIC Void rgSCHDrxUeHqReset(cell, ue, hqE, cellIdx)
    RgSchDrxDlHqProcCb  *drxHq   =NULLP;
    U8                  i;
 
-   TRC2(rgSCHDrxUeHqReset);
-
    for(i=0; i < hqE->numHqPrcs; i++)
    {
       hqP     = &hqE->procs[i];
@@ -1838,13 +1795,13 @@ PUBLIC Void rgSCHDrxUeHqReset(cell, ue, hqE, cellIdx)
  * @return ROK/RFAILED
  */
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxUeDel
+S16 rgSCHDrxUeDel
 (
  RgSchCellCb   *cell,
  RgSchUeCb      *ue
  )
 #else
-PUBLIC S16 rgSCHDrxUeDel (cell, ue)
+S16 rgSCHDrxUeDel (cell, ue)
  RgSchCellCb   *cell; 
  RgSchUeCb     *ue;
 #endif
@@ -1856,7 +1813,6 @@ PUBLIC S16 rgSCHDrxUeDel (cell, ue)
 #ifdef EMTC_ENABLE
    RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
 #endif
-   TRC2(rgSCHDrxUeDel);
 
 
    /* ccpu00129899: Moved the drx-enabled check to the caller */   
@@ -1917,7 +1873,7 @@ PUBLIC S16 rgSCHDrxUeDel (cell, ue)
    ueDrxCb->drxDlInactvMask = DRX_UE_INACTIVE;
    ueDrxCb->drxUlInactvMask = DRX_UE_INACTIVE;
 
-   RETVALUE(ROK);
+   return ROK;
 }/*rgSCHDrxUeDel*/
 
 /** @brief This function is called at the time of RGR cell configuration.
@@ -1928,7 +1884,7 @@ PUBLIC S16 rgSCHDrxUeDel (cell, ue)
  *     Function: rgSCHDrxCellCfg 
  *
  *         Processing steps:
- *         - Initializes the following drxQ (cmMemset would do).
+ *         - Initializes the following drxQ (memset would do).
  *
  *
  * @param RgSchCellCb   *cell
@@ -1936,13 +1892,13 @@ PUBLIC S16 rgSCHDrxUeDel (cell, ue)
  * @return ROK/RFAILED
  */
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxCellCfg 
+S16 rgSCHDrxCellCfg 
 (
  RgSchCellCb   *cell,
  RgrCellCfg    *cellCfg
  )
 #else
-PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
+S16 rgSCHDrxCellCfg (cell, cellCfg)
  RgSchCellCb   *cell; 
  RgrCellCfg    *cellCfg;
 #endif
@@ -1951,16 +1907,13 @@ PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
    S16               ret       = ROK;
    Inst              instIdx   = cell->instIdx;
 
-   TRC2(rgSCHDrxCellCfg);
-
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )
   /*KWORK_FIX :Removed check for cell being NULL*/ 
    if( (cellCfg == (RgrCellCfg* )NULLP))
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
                 "rgSCHDrxCellCfg():Invalid Params. cell/cellCfg is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1972,7 +1925,7 @@ PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"rgSCHDrxCellCfg():"
                "Memory allocation FAILED for DRX cell Cb");
-      RETVALUE(ret);
+      return (ret);
    }
 
    /* delInUlScan determines which index scans the queue last.
@@ -1992,7 +1945,7 @@ PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
       cell->drxCb->delInUlScan = TRUE;
    }
 
-   RETVALUE(ret);
+   return (ret);
 } /* end of rgSchDrxCellCfg */
 
 
@@ -2013,20 +1966,17 @@ PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
  * @return Void
  */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxCellDel 
+Void rgSCHDrxCellDel 
 (
  RgSchCellCb *cell
  )
 #else
-PUBLIC Void rgSCHDrxCellDel (cell)
+Void rgSCHDrxCellDel (cell)
  RgSchCellCb *cell;
 #endif
 {
    Inst              instIdx      = cell->instIdx;
 
-   TRC2(rgSCHCfgRgrCellDel);
-
-   
    if (cell->drxCb)
    {
       /* ccpu00117052 - MOD - Passing double pointer
@@ -2064,33 +2014,30 @@ PUBLIC Void rgSCHDrxCellDel (cell)
  * @return  ROK/RFAILED
  */
 #ifdef ANSI
-PUBLIC S16 rgSCHDrxSrInd 
+S16 rgSCHDrxSrInd 
 (
  RgSchCellCb   *cell, 
  RgSchUeCb     *ue
  )
 #else
-PUBLIC S16 rgSCHDrxSrInd (cell, ue)
+S16 rgSCHDrxSrInd (cell, ue)
  RgSchCellCb   *cell; 
  RgSchUeCb     *ue;
 #endif
 {
    RgSchDrxUeCb      *drxCb;
 
-   TRC2(rgSCHDrxSrInd);
-
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    if ( cell == (RgSchCellCb* )NULLP)
    {
-      RETVALUE(ROK);
+      return ROK;
    }
 
    if( (ue == (RgSchUeCb* )NULLP))
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
                  "rgSCHDrxSrInd():Invalid Params. cell/ue is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  #endif
    /* KWork fix - shifted this down */
@@ -2104,7 +2051,7 @@ PUBLIC S16 rgSCHDrxSrInd (cell, ue)
    /* Update UE's inactive mask and if required move UE to ACTIVE state */
    RG_SCH_CMN_UL_UPDT_INACTV_MASK( cell, ue, RG_DRX_INACTIVE);
 
-   RETVALUE(ROK);
+   return ROK;
 } /* rgSCHDrxSrInd */
 
 
@@ -2133,22 +2080,19 @@ PUBLIC S16 rgSCHDrxSrInd (cell, ue)
  * @return Void 
  */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxDedRa 
+Void rgSCHDrxDedRa 
 (
 RgSchCellCb   *cellCb, 
 RgSchUeCb     *ueCb
  )
 #else
-PUBLIC Void rgSCHDrxDedRa (cellCb, ueCb)
+Void rgSCHDrxDedRa (cellCb, ueCb)
 RgSchCellCb   *cellCb; 
 RgSchUeCb     *ueCb;
 #endif
 {
    RgSchDrxUeCb      *drxCb;
 
-   TRC2(rgSCHDrxDedRa);
-
-
    drxCb = RG_SCH_DRX_GET_UE(ueCb);
 
    /* Mark the UE as active for UL & DL */
@@ -2210,7 +2154,6 @@ Bool              calcFrmOffst;
    drxCell = cell->drxCb;
    drxUe   = ueCb->drxCb;
 
-   TRC2(rgSCHDrxMvToNxtOnDurOcc)
 
    if(calcFrmOffst == FALSE)
    {
@@ -2322,15 +2265,13 @@ PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
    CmLteTimingInfo crntTime;        /*!< current SFN & sf */
 
 
-   TRC2(rgSCHDrxGetNxtTmrExpry);
-
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    if ( (cell == (RgSchCellCb* )NULLP) 
          ||
          (tmrExpryIdx == (CmLteTimingInfo* )NULLP)
       )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -2428,7 +2369,7 @@ PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
       tmrExpryIdx->sfn = tmrExpryIdx->sfn - (RG_SCH_CMN_MAX_SFN_NUM + 1);
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }/*rgSCHDrxGetNxtTmrExpry*/
 
 /** @brief This function calculates the next onDuration Occurence
@@ -2473,8 +2414,6 @@ PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
    CmLteTimingInfo tmrExpry;
    U16             tmrExpryInSf; /*timer expry in no of subframes*/
 
-   TRC2(rgSCHDrxCalcNxtTmrExpry)
-   
    curTimeInSf = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G +
                    cell->crntTime.slot;
 
@@ -2537,7 +2476,7 @@ PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
  *
  **********************************************************/
 #ifdef ANSI
-PUBLIC S16 rgSCHCfgVldtTddDrxCycCfg
+S16 rgSCHCfgVldtTddDrxCycCfg
 (
 RgSchCellCb  *cell,
 U16           drxCycle,
@@ -2545,7 +2484,7 @@ U8            onDurTmr,
 U16           offSet
 )
 #else
-PUBLIC S16 rgSCHCfgVldtTddDrxCycCfg(cell, drxCycle, onDurTmr, offSet)
+S16 rgSCHCfgVldtTddDrxCycCfg(cell, drxCycle, onDurTmr, offSet)
 RgSchCellCb  *cell;
 U16           drxCycle;
 U8            onDurTmr;
@@ -2555,7 +2494,6 @@ U16           offSet;
    U16             startTime;
    U16             endTimeInSf;
    CmLteTimingInfo endTime; 
-   TRC2(rgSCHCfgVldtTddDrxCycCfg)
 
    startTime = offSet;
    do
@@ -2567,7 +2505,7 @@ U16           offSet;
       if(((RGSCH_MAX_SUBFRM_5G + endTimeInSf- startTime) % RGSCH_MAX_SUBFRM_5G) >= 
           drxCycle)
       {
-          RETVALUE(RFAILED);
+          return RFAILED;
       }
       
       startTime = (startTime + drxCycle);
@@ -2579,7 +2517,7 @@ U16           offSet;
    }while((drxCycle % RGSCH_NUM_SUB_FRAMES) && 
        (startTime < (drxCycle * RGSCH_NUM_SUB_FRAMES/2)));
    
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #endif /*LTE_TDD */
@@ -2625,8 +2563,6 @@ U16           ulIndex;
    RgSchCmnCell      *cellSch = NULLP;
    Bool              delInUlScan = FALSE;
    
-   TRC2(rgSCHDrxTtiHdlOnDurUl)
-  
    drxCell     = (cell->drxCb);
    delInUlScan = drxCell->delInUlScan;
    /***********************************************************
@@ -2772,7 +2708,6 @@ U16           dlIndex;
     * in the onDurationTmrExprQ. If !delInUlScan, then calculate the next
     * OnDuration occurence, q it there and remove it from the current location.
     */
-   TRC2(rgSCHDrxTtiHdlOnDurDl)
    /***********************************************************
     *    Scanning OnDurationQ in DL
     ***********************************************************/
@@ -2959,8 +2894,6 @@ U16                   dlIndex;
    U8                  cellIdx;
    U32                 dlInactvMask;
 
-   TRC2(rgSCHDrxTtiHdlDlHarqRTT);
-
    drxCell     = cell->drxCb;
    delInUlScan = drxCell->delInUlScan;
 
@@ -3148,8 +3081,6 @@ U16                   ulIndex;
    U32               ulInactvMask;
 
 
-   TRC2(rgSCHDrxTtiHdlUlHarqRTT);
-   
    drxCell     = cell->drxCb;
    delInUlScan = drxCell->delInUlScan;