JIRA ID - ODUHIGH-241 Implementation of RRC DELIVERY REPORT
[o-du/l2.git] / src / 5gnrsch / rg_sch_drx.c
index 2e7107c..27efeb8 100755 (executable)
@@ -303,12 +303,12 @@ RgUeUlHqCb   *hqE
  * @return 
  */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxTtiInd 
+Void rgSCHDrxTtiInd 
 (
 RgSchCellCb  *cell
 )
 #else
-PUBLIC Void rgSCHDrxTtiInd (cell)
+Void rgSCHDrxTtiInd (cell)
 RgSchCellCb  *cell;
 #endif
 {
@@ -405,7 +405,7 @@ U16           ulIndex;
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    if ( cell == (RgSchCellCb* )NULLP )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -413,7 +413,7 @@ U16           ulIndex;
   
    rgSCHDrxTtiHdlOnDurUl(cell, ulIndex);
 
-   RETVALUE(ROK);
+   return ROK;
 
 }/*rgSCHDrxTtiHdlOnDur*/
 
@@ -445,14 +445,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;
@@ -473,7 +473,7 @@ U16 ulIndex;
 #if ( ERRCLASS & ERRCLS_INT_PAR )   
    if ( cell == (RgSchCellCb* )NULLP) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -661,7 +661,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
@@ -686,14 +686,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;
@@ -709,7 +709,7 @@ U16           ulIndex;
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    if ( cell == (RgSchCellCb* )NULLP )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -745,7 +745,7 @@ U16           ulIndex;
       rgSCHDrxMvToNxtOnDurOcc(cell,ue,RG_SCH_DRX_DL_DELTA,TRUE);
    }/*while(node)...*/
 
-   RETVALUE(ROK);
+   return ROK;
 }/*rgSCHDrxTtiHdlShortCycle*/
 
 
@@ -795,7 +795,7 @@ U16                   ulIndex;
 #if ( ERRCLASS & ERRCLS_INT_PAR)
    if ( cell == (RgSchCellCb *)NULLP )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /*ERRCLASS & ERRCLS_INT_PAR*/
 
@@ -806,7 +806,7 @@ U16                   ulIndex;
 
    rgSCHDrxTtiHdlUlHarqRTT(cell, ulIndex);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
  /** @brief This function is called by the common scheduler as part of
@@ -829,14 +829,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;
@@ -1028,14 +1028,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;
@@ -1157,14 +1157,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;
@@ -1185,7 +1185,7 @@ PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
 #if ( ERRCLASS & ERRCLS_INT_PAR )   
    if ( cell == (RgSchCellCb* )NULLP) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if ((ue == (RgSchUeCb* )NULLP)
@@ -1194,7 +1194,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
 
@@ -1207,7 +1207,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;
@@ -1290,7 +1290,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
@@ -1346,7 +1346,7 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
 #if ( ERRCLASS & ERRCLS_INT_PAR ) 
    if ( cell == (RgSchCellCb* )NULLP ) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if( (drxCb == (RgSchDrxUeCb* )NULLP)
@@ -1357,7 +1357,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
 
@@ -1415,7 +1415,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
@@ -1453,7 +1453,7 @@ PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
         (drxCfg == (RgrUeDrxCfg* )NULLP)
       )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1471,7 +1471,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
@@ -1499,14 +1499,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;
@@ -1547,7 +1547,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 */
@@ -1578,7 +1578,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
   }
   if( ue->drxCb == NULLP ) 
   { 
-     RETVALUE(RFAILED)
+     return RFAILED
   }
    ueDrxCb = ue->drxCb;
    
@@ -1730,7 +1730,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
       }   
    }
 
-   RETVALUE(ROK);
+   return ROK;
 
 } /* end of rgSCHDrxUeReCfg */
 #endif
@@ -1749,7 +1749,7 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
  * @return ROK/RFAILED
  */
 #ifdef ANSI
-PUBLIC Void rgSCHDrxUeHqReset
+Void rgSCHDrxUeHqReset
 (
  RgSchCellCb   *cell,
  RgSchUeCb     *ue,
@@ -1757,7 +1757,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;
@@ -1821,13 +1821,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
@@ -1900,7 +1900,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.
@@ -1919,13 +1919,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
@@ -1943,7 +1943,7 @@ PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
    {
       RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
                 "rgSCHDrxCellCfg():Invalid Params. cell/cellCfg is NULL");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1955,7 +1955,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.
@@ -1975,7 +1975,7 @@ PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
       cell->drxCb->delInUlScan = TRUE;
    }
 
-   RETVALUE(ret);
+   return (ret);
 } /* end of rgSchDrxCellCfg */
 
 
@@ -1996,12 +1996,12 @@ 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
 {
@@ -2047,13 +2047,13 @@ 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
@@ -2066,14 +2066,14 @@ PUBLIC S16 rgSCHDrxSrInd (cell, ue)
 #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 */
@@ -2087,7 +2087,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 */
 
 
@@ -2116,13 +2116,13 @@ 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
@@ -2313,7 +2313,7 @@ PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
          (tmrExpryIdx == (CmLteTimingInfo* )NULLP)
       )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -2411,7 +2411,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
@@ -2520,7 +2520,7 @@ PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
  *
  **********************************************************/
 #ifdef ANSI
-PUBLIC S16 rgSCHCfgVldtTddDrxCycCfg
+S16 rgSCHCfgVldtTddDrxCycCfg
 (
 RgSchCellCb  *cell,
 U16           drxCycle,
@@ -2528,7 +2528,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;
@@ -2550,7 +2550,7 @@ U16           offSet;
       if(((RGSCH_MAX_SUBFRM_5G + endTimeInSf- startTime) % RGSCH_MAX_SUBFRM_5G) >= 
           drxCycle)
       {
-          RETVALUE(RFAILED);
+          return RFAILED;
       }
       
       startTime = (startTime + drxCycle);
@@ -2562,7 +2562,7 @@ U16           offSet;
    }while((drxCycle % RGSCH_NUM_SUB_FRAMES) && 
        (startTime < (drxCycle * RGSCH_NUM_SUB_FRAMES/2)));
    
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #endif /*LTE_TDD */