Replaced old SSI function with new macros jira id - ODUHIGH-212
[o-du/l2.git] / src / 5gnrsch / rg_sch_scell.c
index ffa51ba..38c6ad9 100755 (executable)
 */
 
 /* 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 "cm5.h"           /* common timers */
-#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"
 #include "rg_sch_cmn.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"           /* RGU types */
 #include "lrg.x"           /* layer management typedefs for MAC */
 #include "rgr.x"           /* layer management typedefs for MAC */
@@ -371,7 +353,7 @@ RgSchUeCellInfo  *sCellInfo
 #ifdef TFU_UPGRADE
    /* Start receiving CQI for this SCell for this UE */
    crntTime = (ueCb->cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)+
-                  (ueCb->cell->crntTime.subframe);
+                  (ueCb->cell->crntTime.slot);
 
    cqiCb = &sCellInfo->cqiCb;
    cqiCfg = &cqiCb->cqiCfg;
@@ -389,7 +371,7 @@ RgSchUeCellInfo  *sCellInfo
       }
 
       timingInfo.sfn =  cqiCb->nCqiTrIdx/RGSCH_NUM_SUB_FRAMES_5G;
-      timingInfo.subframe =  cqiCb->nCqiTrIdx%RGSCH_NUM_SUB_FRAMES_5G;
+      timingInfo.slot =  cqiCb->nCqiTrIdx%RGSCH_NUM_SUB_FRAMES_5G;
       if(cqiCb->cqiCfg.cqiSetup.cqiRepType == RGR_UE_PCQI_SB_REP)
       {
          rgSCHTomUtlPcqiSbCalcBpIdx(timingInfo,ueCb,cqiCb); 
@@ -610,7 +592,7 @@ PRIVATE S16 rgSCHSCellDeActivation(sCellInfo)
 RgSchUeCellInfo *sCellInfo
 #endif
 {
-   RETVALUE(ROK);
+   return ROK;
    RgSchCmnCell *cellSch;
    Inst inst = sCellInfo->cell->instIdx;
 
@@ -661,7 +643,7 @@ RgSchUeCellInfo *sCellInfo
    printf("SCELL DEATIVATED  sCellInfo->ue->ueId =%d, sCellInfo->sCellId =%d\n", sCellInfo->ue->ueId, sCellInfo->sCellId);
    //MSPD_DBG("SCELL DEATIVATED  sCellInfo->ue->ueId =%d, sCellInfo->sCellId =%d\n", sCellInfo->ue->ueId, sCellInfo->sCellId);
 #endif
-   RETVALUE(ROK);
+   return ROK;
 }
 
 \f
@@ -705,7 +687,7 @@ U16           rnti;
    if((secCellCb = (RgSchCellCb *)rgSchUtlGetCellCb(inst, secCellId)) == NULLP)
    {
       RGSCHDBGERRNEW(inst, (rgSchPBuf(inst), "SCell doesnt exists"));
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    hqEntRstInfo.cellId = secCellId;
@@ -715,7 +697,7 @@ U16           rnti;
 
    RgSchMacRstHqEnt(&pst, &hqEntRstInfo);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 /*removed endif*/
 
@@ -933,14 +915,14 @@ U8            action;
    {
       RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid Serv Cell Idx %d\n", \
                sCellIdx));
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if(ueCb->cellInfo[sCellIdx] == NULLP)
    {
       RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Serv Cell not added to this Ue Scell Idx %d ueId %d\n", \
               sCellIdx,ueCb->ueId));
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    switch (action)
@@ -1012,7 +994,7 @@ U8            action;
          break;
       }
    }
-   RETVALUE(ret);
+   return (ret);
 }
 
  \f
@@ -1053,10 +1035,10 @@ U8           *sCellIdx;
       if((ueCb->cellInfo[(*sCellIdx)] != NULLP) &&
             (ueCb->cellInfo[(*sCellIdx)]->sCellState == RG_SCH_SCELL_READY))
       {
-         RETVALUE(ROK);
+         return ROK;
       }
    }
-   RETVALUE(RFAILED);
+   return RFAILED;
 }
 
 /**
@@ -1242,7 +1224,7 @@ RgSchUeCb    *ueCb;
       rgSCHSCellDelUeSCell(cellCb,ueCb,idx);
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #ifdef TFU_UPGRADE
@@ -1316,7 +1298,7 @@ U8                sCellIdx;
    {
       RGSCHDBGERRNEW(inst, (rgSchPBuf(inst),"Invalid Serv Cell Idx %d\n",
                sCellIdx));
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    sCellInfo = ueCb->cellInfo[sCellIdx];
@@ -1421,7 +1403,7 @@ U8                sCellIdx;
    cqiCb->riDist    = RG_SCH_INVALID_IDX; 
    cqiCb->nCqiTrIdx = RG_SCH_INVALID_IDX;
  
-   RETVALUE(ROK);
+   return ROK;
 }
 #endif
 
@@ -1668,7 +1650,7 @@ RgSchUePCqiCb     *cqiCb2;
       }
    }
 
-   RETVALUE(retCqiCb->servCellInfo->sCellIdx);
+   return (retCqiCb->servCellInfo->sCellIdx);
 }
 
 /**
@@ -1778,7 +1760,7 @@ RgSchUePCqiCb     *cqiCb;
    idx = ((nPCqiServCellIdx)& (CM_LTE_MAX_CELLS -1));
    ueCb->nPCqiCb = &ueCb->cellInfo[idx]->cqiCb;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
@@ -1896,7 +1878,7 @@ RgSchUePCqiCb     *cqiCb;
    /* Set the next expected Cqi into nPCqiCb */
    ueCb->nPRiCb = &ueCb->cellInfo[nPRiServCellIdx]->cqiCb;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 #endif/*TFU_UPGRADE*/
 
@@ -1941,7 +1923,7 @@ RgSchUeCb                  *ue;
          break;
       }
    }
-   RETVALUE(retVal);   
+   return (retVal);    
 }
 
 /**
@@ -1976,9 +1958,9 @@ RgSchUeCb      *ue
     * outstanding BO */
    if(ue->remBoCnt == RG_SCH_ACTIVATION_COUNT)
    {
-      RETVALUE(TRUE);
+      return (TRUE);
    }
-   RETVALUE(FALSE);
+   return (FALSE);
 }
 #endif/*LTE_ADV*/