Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-443] Contention Free RA by UE in handover
[o-du/l2.git]
/
src
/
5gnrsch
/
rg_sch_drx.c
diff --git
a/src/5gnrsch/rg_sch_drx.c
b/src/5gnrsch/rg_sch_drx.c
index
5b44497
..
0cdfccf
100755
(executable)
--- a/
src/5gnrsch/rg_sch_drx.c
+++ b/
src/5gnrsch/rg_sch_drx.c
@@
-32,20
+32,9
@@
@brief This file implements the DRX processing .
*/
@brief This file implements the DRX processing .
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=163;
/* header include files -- defines (.h) */
/* 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"
#include "lrg.h"
#include "rgr.h"
#include "rgm.h"
@@
-58,19
+47,8
@@
static int RLOG_FILE_ID=163;
#include "rg_sch.h"
#include "rg_sch_err.h"
#include "rg_sch_cmn.h"
#include "rg_sch.h"
#include "rg_sch_err.h"
#include "rg_sch_cmn.h"
-#include "rl_interface.h"
-#include "rl_common.h"
/* header/extern include files (.x) */
/* 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 */
#include "tfu.x" /* TFU types */
#include "lrg.x" /* layer management typedefs for MAC */
#include "rgr.x" /* layer management typedefs for MAC */
@@
-126,7
+104,7
@@
static int RLOG_FILE_ID=163;
* in TDD config 2 where no DwPTS exits.
*/
* in TDD config 2 where no DwPTS exits.
*/
-
PRIVATE U8
rgSchDrxDlSfTddCfg[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG] =
+
static uint8_t
rgSchDrxDlSfTddCfg[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG] =
{
{2,4,6,6,7,8,3},
{4,6,8,7,8,9,5}
{
{2,4,6,6,7,8,3},
{4,6,8,7,8,9,5}
@@
-141,7
+119,7
@@
PRIVATE U8 rgSchDrxDlSfTddCfg[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG] =
*
*/
*
*/
-
PRIVATE U8
rgSchDrxDLSfTillNxtSFN[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG]
+
static uint8_t
rgSchDrxDLSfTillNxtSFN[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG]
[RGSCH_NUM_SUB_FRAMES]=
{
{
[RGSCH_NUM_SUB_FRAMES]=
{
{
@@
-174,7
+152,7
@@
PRIVATE U8 rgSchDrxDLSfTillNxtSFN[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG]
*
*/
*
*/
-
PRIVATE U8
rgSchDrxDLSftoDLSfIdx[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG]
+
static uint8_t
rgSchDrxDLSftoDLSfIdx[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG]
[RGSCH_NUM_SUB_FRAMES]=
{
{
[RGSCH_NUM_SUB_FRAMES]=
{
{
@@
-200,7
+178,7
@@
PRIVATE U8 rgSchDrxDLSftoDLSfIdx[RGSCH_MAX_SFCFG][RGSCH_MAX_TDD_CFG]
/* The k+4 th subframe in TDD at which HARQ RTT expires may be an Uplink SF.
In such case, the drx retx timer may start at the next pdcch sf instead
of at k+4 itself */
/* The k+4 th subframe in TDD at which HARQ RTT expires may be an Uplink SF.
In such case, the drx retx timer may start at the next pdcch sf instead
of at k+4 itself */
-
U8
rgSchDrxHarqRetxFirstPsf[RGSCH_MAX_TDD_CFG][RGSCH_NUM_SUB_FRAMES] = {
+
uint8_t
rgSchDrxHarqRetxFirstPsf[RGSCH_MAX_TDD_CFG][RGSCH_NUM_SUB_FRAMES] = {
{0, 0, 4, 0, 6, 0, 0, 4, 0, 6},
{0, 0, 4, 6, 0, 0, 0, 4, 6, 0},
{0, 0, 4, 0, 0, 0, 0, 4, 0, 0},
{0, 0, 4, 0, 6, 0, 0, 4, 0, 6},
{0, 0, 4, 6, 0, 0, 0, 4, 6, 0},
{0, 0, 4, 0, 0, 0, 0, 4, 0, 0},
@@
-214,66
+192,66
@@
U8 rgSchDrxHarqRetxFirstPsf[RGSCH_MAX_TDD_CFG][RGSCH_NUM_SUB_FRAMES] = {
/******************************************************************************
* Start of Function declarations *
******************************************************************************/
/******************************************************************************
* Start of Function declarations *
******************************************************************************/
-
PRIVATE
Void rgSCHDrxTtiHdlOnDurUl ARGS((
+
static
Void rgSCHDrxTtiHdlOnDurUl ARGS((
RgSchCellCb *cell,
RgSchCellCb *cell,
-
U16
ulIndex
+
uint16_t
ulIndex
));
));
-
PRIVATE
Void rgSCHDrxTtiHdlOnDurDl ARGS((
+
static
Void rgSCHDrxTtiHdlOnDurDl ARGS((
RgSchCellCb *cell,
RgSchCellCb *cell,
-
U16
dlIndex
+
uint16_t
dlIndex
));
));
-
PRIVATE
Void rgSCHDrxTtiHdlDlHarqRTT ARGS((
+
static
Void rgSCHDrxTtiHdlDlHarqRTT ARGS((
RgSchCellCb *cell,
RgSchCellCb *cell,
-
U16
dlIndex
+
uint16_t
dlIndex
));
));
-
PRIVATE
Void rgSCHDrxTtiHdlUlHarqRTT ARGS((
+
static
Void rgSCHDrxTtiHdlUlHarqRTT ARGS((
RgSchCellCb *cell,
RgSchCellCb *cell,
-
U16
ulIndex
+
uint16_t
ulIndex
));
));
-
PRIVATE S16 rgSCHDrxTtiHdlOnDur ARGS((RgSchCellCb *cellCb, U16
dlIndex,
-
U16
ulIndex));
-
PRIVATE S16 rgSCHDrxTtiHdlInActv ARGS((RgSchCellCb *cellCb, U16
dlIndex,
-
U16
ulIndex));
-
PRIVATE S16 rgSCHDrxTtiHdlShortCycle ARGS((RgSchCellCb *cell, U16
dlIndex,
-
U16
ulIndex));
-
PRIVATE S16 rgSCHDrxTtiHdlDlHarq ARGS((RgSchCellCb *cellCb, U16
dlIndex,
-
U16
ulIndex));
-
PRIVATE
S16 rgSCHDrxCpyUeCfg ARGS((RgSchDrxUeCb *drxCb,
+
static S16 rgSCHDrxTtiHdlOnDur ARGS((RgSchCellCb *cellCb, uint16_t
dlIndex,
+
uint16_t
ulIndex));
+
static S16 rgSCHDrxTtiHdlInActv ARGS((RgSchCellCb *cellCb, uint16_t
dlIndex,
+
uint16_t
ulIndex));
+
static S16 rgSCHDrxTtiHdlShortCycle ARGS((RgSchCellCb *cell, uint16_t
dlIndex,
+
uint16_t
ulIndex));
+
static S16 rgSCHDrxTtiHdlDlHarq ARGS((RgSchCellCb *cellCb, uint16_t
dlIndex,
+
uint16_t
ulIndex));
+
static
S16 rgSCHDrxCpyUeCfg ARGS((RgSchDrxUeCb *drxCb,
RgrUeDrxCfg* ueDrxCfg));
RgrUeDrxCfg* ueDrxCfg));
-
PRIVATE
S16 rgSCHDrxGetNxtOnDur ARGS((RgSchCellCb* cell,RgSchDrxUeCb* drxCb,
+
static
S16 rgSCHDrxGetNxtOnDur ARGS((RgSchCellCb* cell,RgSchDrxUeCb* drxCb,
CmLteTimingInfo* nxtOnDur,
CmLteTimingInfo* nxtOnDur,
-
U8
delta));
+
uint8_t
delta));
-
PRIVATE
Void rgSCHDrxMvToNxtOnDurOcc ARGS((RgSchCellCb* cell,
+
static
Void rgSCHDrxMvToNxtOnDurOcc ARGS((RgSchCellCb* cell,
RgSchUeCb* ue,
RgSchUeCb* ue,
-
U16
idx,
+
uint16_t
idx,
Bool calcFrmOffst));
#ifdef LTE_TDD
Bool calcFrmOffst));
#ifdef LTE_TDD
-
PRIVATE
Void rgSCHDrxCalcNxtTmrExpry ARGS((RgSchCellCb *cell,
+
static
Void rgSCHDrxCalcNxtTmrExpry ARGS((RgSchCellCb *cell,
RgSchUeCb *ue,
RgSchUeCb *ue,
-
U16
delta,
-
U32
tmrLen,
+
uint16_t
delta,
+
uint32_t
tmrLen,
S16 *distance,
S16 *distance,
-
U16
*idx
+
uint16_t
*idx
));
));
-
PRIVATE S16 rgSCHDrxGetNxtTmrExpry ARGS((RgSchCellCb *cell,U16
curTime,
-
U32
duration,
+
static S16 rgSCHDrxGetNxtTmrExpry ARGS((RgSchCellCb *cell,uint16_t
curTime,
+
uint32_t
duration,
CmLteTimingInfo* tmrExpryIdx));
#endif /* LTE_TDD */
#ifdef EMTC_ENABLE
CmLteTimingInfo* tmrExpryIdx));
#endif /* LTE_TDD */
#ifdef EMTC_ENABLE
-
EXTERN
S16 rgSCHEmtcDrxCpyUeCfg
+S16 rgSCHEmtcDrxCpyUeCfg
(
RgSchUeCb *ueCb,
RgrUeDrxCfg *drxCfg
);
(
RgSchUeCb *ueCb,
RgrUeDrxCfg *drxCfg
);
-
EXTERN
S16 rgSCHDrxTtiHdlUlHarq
+S16 rgSCHDrxTtiHdlUlHarq
(
RgSchCellCb *cell,
(
RgSchCellCb *cell,
-
U16
dlIndex,
-
U16
ulIndex
+
uint16_t
dlIndex,
+
uint16_t
ulIndex
);
);
-
EXTERN
Void rgSCHDrxUeUlHqReset
+Void rgSCHDrxUeUlHqReset
(
RgSchCellCb *cell,
RgSchUeCb *ue,
(
RgSchCellCb *cell,
RgSchUeCb *ue,
@@
-319,21
+297,10
@@
RgUeUlHqCb *hqE
* added*
* @return
*/
* added*
* @return
*/
-#ifdef ANSI
-PUBLIC Void rgSCHDrxTtiInd
-(
-RgSchCellCb *cell
-)
-#else
-PUBLIC Void rgSCHDrxTtiInd (cell)
-RgSchCellCb *cell;
-#endif
+Void rgSCHDrxTtiInd(RgSchCellCb *cell)
{
{
- U16 dlIndex;
- U16 ulIndex;
-
- TRC2(rgSCHDrxTtiInd );
-
+ uint16_t dlIndex;
+ uint16_t ulIndex;
dlIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot +
RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
dlIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot +
RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
@@
-372,7
+339,7
@@
RgSchCellCb *cell;
#endif /*LTEMAC_R9*/
#endif /*LTEMAC_R9*/
-
RETVOID
;
+
return
;
}/*rgSCHDrxTtiInd*/
}/*rgSCHDrxTtiInd*/
@@
-397,32
+364,18
@@
RgSchCellCb *cell;
*
*
* @param RgSchCellCb *cellCb
*
*
* @param RgSchCellCb *cellCb
- * @param
U16
dlIndex
- * @param
U16
ulIndex
+ * @param
uint16_t
dlIndex
+ * @param
uint16_t
ulIndex
* @return ROK/RFAILED
*/
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PRIVATE S16 rgSCHDrxTtiHdlOnDur
-(
-RgSchCellCb* cell,
-U16 dlIndex,
-U16 ulIndex
-)
-#else
-PRIVATE S16 rgSCHDrxTtiHdlOnDur(cell, dlIndex, ulIndex)
-RgSchCellCb* cell;
-U16 dlIndex;
-U16 ulIndex;
-#endif
+static S16 rgSCHDrxTtiHdlOnDur(RgSchCellCb *cell,uint16_t dlIndex,uint16_t ulIndex)
{
{
- TRC2(rgSCHDrxTtiHdlOnDur);
-
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP )
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP )
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-430,7
+383,7
@@
U16 ulIndex;
rgSCHDrxTtiHdlOnDurUl(cell, ulIndex);
rgSCHDrxTtiHdlOnDurUl(cell, ulIndex);
-
RETVALUE(ROK)
;
+
return ROK
;
}/*rgSCHDrxTtiHdlOnDur*/
}/*rgSCHDrxTtiHdlOnDur*/
@@
-456,41
+409,27
@@
U16 ulIndex;
*
*
* @param RgSchCellCb *cellCb
*
*
* @param RgSchCellCb *cellCb
- * @param
U16
dlIndex
- * @param
U16
ulIndex
+ * @param
uint16_t
dlIndex
+ * @param
uint16_t
ulIndex
* @return ROK/RFAILED
*/
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxTtiHdlInActv
-(
-RgSchCellCb *cell,
-U16 dlIndex,
-U16 ulIndex
-)
-#else
-PUBLIC S16 rgSCHDrxTtiHdlInActv(cell, dlIndex, ulIndex)
-RgSchCellCb *cell;
-U16 dlIndex;
-U16 ulIndex;
-#endif
+S16 rgSCHDrxTtiHdlInActv(RgSchCellCb *cell,uint16_t dlIndex,uint16_t ulIndex)
{
CmLList *node;
RgSchDRXCellCb *drxCell=NULLP;
RgSchUeCb *ue=NULLP;
RgSchDrxUeCb *drxUe=NULLP;
{
CmLList *node;
RgSchDRXCellCb *drxCell=NULLP;
RgSchUeCb *ue=NULLP;
RgSchDrxUeCb *drxUe=NULLP;
-
U16
shrtCycleExpIndx;
+
uint16_t
shrtCycleExpIndx;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
CmLListCp ulInactvLst; /* list of UE's becoming UL-inactive */
RgSchCmnCell *cellSch = NULLP;
Bool delInUlScan = FALSE;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
CmLListCp ulInactvLst; /* list of UE's becoming UL-inactive */
RgSchCmnCell *cellSch = NULLP;
Bool delInUlScan = FALSE;
- TRC2(rgSCHDrxTtiHdlInActv);
-
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP)
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP)
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-678,7
+617,7
@@
U16 ulIndex;
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisDl->rgSCHDlInactvtUes(cell,&dlInactvLst);
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
}/*rgSCHDrxTtiHdlInActv*/
/** @brief This function handles the per TTI processing for DRX short cycle
@@
-697,36
+636,22
@@
U16 ulIndex;
*
*
* @param RgSchCellCb *cell
*
*
* @param RgSchCellCb *cell
- * @param
U16
dlIndex
- * @param
U16
ulIndex
+ * @param
uint16_t
dlIndex
+ * @param
uint16_t
ulIndex
* @return ROK/RFAILED
*/
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxTtiHdlShortCycle
-(
-RgSchCellCb *cell,
-U16 dlIndex,
-U16 ulIndex
-)
-#else
-PUBLIC S16 rgSCHDrxTtiHdlShortCycle (cell, dlIndex, ulIndex)
-RgSchCellCb *cell;
-U16 dlIndex;
-U16 ulIndex;
-#endif
+S16 rgSCHDrxTtiHdlShortCycle(RgSchCellCb *cell,uint16_t dlIndex,uint16_t ulIndex)
{
CmLList *node;
RgSchDRXCellCb *drxCell=NULLP;
RgSchUeCb *ue=NULLP;
RgSchDrxUeCb *drxUe=NULLP;
{
CmLList *node;
RgSchDRXCellCb *drxCell=NULLP;
RgSchUeCb *ue=NULLP;
RgSchDrxUeCb *drxUe=NULLP;
- TRC2(rgSCHDrxTtiHdlShortCycle );
-
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP )
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP )
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-762,7
+687,7
@@
U16 ulIndex;
rgSCHDrxMvToNxtOnDurOcc(cell,ue,RG_SCH_DRX_DL_DELTA,TRUE);
}/*while(node)...*/
rgSCHDrxMvToNxtOnDurOcc(cell,ue,RG_SCH_DRX_DL_DELTA,TRUE);
}/*while(node)...*/
-
RETVALUE(ROK)
;
+
return ROK
;
}/*rgSCHDrxTtiHdlShortCycle*/
}/*rgSCHDrxTtiHdlShortCycle*/
@@
-789,41
+714,27
@@
U16 ulIndex;
*
*
* @param RgSchCellCb *cellCb
*
*
* @param RgSchCellCb *cellCb
- * @param
U16
dlIndex
- * @param
U16
ulIndex
+ * @param
uint16_t
dlIndex
+ * @param
uint16_t
ulIndex
* @return ROK/RFAILED
*/
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PRIVATE S16 rgSCHDrxTtiHdlDlHarq
-(
-RgSchCellCb *cell,
-U16 dlIndex,
-U16 ulIndex
-)
-#else /* ANSI */
-PRIVATE S16 rgSCHDrxTtiHdlDlHarq (cell, dlIndex, ulIndex)
-RgSchCellCb *cell;
-U16 dlIndex;
-U16 ulIndex;
-#endif /* ANSI */
+static S16 rgSCHDrxTtiHdlDlHarq(RgSchCellCb *cell,uint16_t dlIndex,uint16_t ulIndex)
{
#if ( ERRCLASS & ERRCLS_INT_PAR)
if ( cell == (RgSchCellCb *)NULLP )
{
{
#if ( ERRCLASS & ERRCLS_INT_PAR)
if ( cell == (RgSchCellCb *)NULLP )
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif /*ERRCLASS & ERRCLS_INT_PAR*/
}
#endif /*ERRCLASS & ERRCLS_INT_PAR*/
- TRC2(rgSCHDrxTtiHdlDlHarq );
-
rgSCHDrxTtiHdlDlHarqRTT(cell, dlIndex);
rgSCHDrxTtiHdlUlHarqRTT(cell, ulIndex);
rgSCHDrxTtiHdlDlHarqRTT(cell, dlIndex);
rgSCHDrxTtiHdlUlHarqRTT(cell, ulIndex);
-
RETVALUE(ROK)
;
+
return ROK
;
}
/** @brief This function is called by the common scheduler as part of
}
/** @brief This function is called by the common scheduler as part of
@@
-841,47
+752,31
@@
U16 ulIndex;
*
* @param RgSchCellCb *cell
* @param CmLListCp *ueUlLst
*
* @param RgSchCellCb *cell
* @param CmLListCp *ueUlLst
- * @param
U8
direction
+ * @param
uint8_t
direction
* @return Void
*/
* @return Void
*/
-#ifdef ANSI
-PUBLIC Void rgSCHDrxStrtInActvTmr
-(
-RgSchCellCb *cell,
-CmLListCp *ueLst,
-U8 direction
-)
-#else
-PUBLIC Void rgSCHDrxStrtInActvTmr(cell, ueLst, direction)
-RgSchCellCb *cell;
-CmLListCp *ueLst;
-U8 direction;
-#endif
+Void rgSCHDrxStrtInActvTmr(RgSchCellCb *cell,CmLListCp *ueLst,uint8_t direction)
{
CmLList *node;
CmLList *delNode;
RgSchUeCb *ueCb;
RgSchDrxUeCb *ueDrxCb;
#ifndef LTE_TDD
{
CmLList *node;
CmLList *delNode;
RgSchUeCb *ueCb;
RgSchDrxUeCb *ueDrxCb;
#ifndef LTE_TDD
-
U16
index1;
+
uint16_t
index1;
#endif
#endif
-
U16
inActvTmrExpIndx;
+
uint16_t
inActvTmrExpIndx;
#ifndef LTE_TDD
#ifndef LTE_TDD
-
U16
curTimeInSf; /* current time in number of subframes */
+
uint16_t
curTimeInSf; /* current time in number of subframes */
#endif
#ifdef LTE_TDD
#endif
#ifdef LTE_TDD
-
U16
delta;
+
uint16_t
delta;
#endif /*LTE_TDD*/
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
CmLListCp ulInactvLst; /* list of UE's becoming UL-inactive */
RgSchCmnCell *cellSch = NULLP;
Bool delInUlScan = FALSE;
#endif /*LTE_TDD*/
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
CmLListCp ulInactvLst; /* list of UE's becoming UL-inactive */
RgSchCmnCell *cellSch = NULLP;
Bool delInUlScan = FALSE;
-
- TRC2(rgSCHDrxStrtInActvTmr);
-
-
if ( direction == RG_SCH_DRX_UL)
{
#ifndef LTE_TDD
if ( direction == RG_SCH_DRX_UL)
{
#ifndef LTE_TDD
@@
-1025,7
+920,7
@@
U8 direction;
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisDl->rgSCHDlInactvtUes(cell,&dlInactvLst);
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisDl->rgSCHDlInactvtUes(cell,&dlInactvLst);
-
RETVOID
;
+
return
;
}/*rgSCHDrxStrtInActvTmr*/
/** @brief This function is called by the downlink HARQ module on receiving a
}/*rgSCHDrxStrtInActvTmr*/
/** @brief This function is called by the downlink HARQ module on receiving a
@@
-1041,33
+936,19
@@
U8 direction;
*
* @param RgSchCellCb *cell
* @param RgSchDlHqProcCb *dlHq
*
* @param RgSchCellCb *cell
* @param RgSchDlHqProcCb *dlHq
- * @param
U8
tbCnt
+ * @param
uint8_t
tbCnt
* @return Void
*/
* @return Void
*/
-#ifdef ANSI
-PUBLIC Void rgSCHDrxStartHarqRTTTmr
-(
-RgSchCellCb *cell,
-RgSchDlHqProcCb *hqP,
-U8 tbCnt
-)
-#else
-PUBLIC Void rgSCHDrxStartHarqRTTTmr(cell, hqP, tbCnt)
-RgSchCellCb *cell;
-RgSchDlHqProcCb *hqP;
-U8 tbCnt;
-#endif
+Void rgSCHDrxStartHarqRTTTmr(RgSchCellCb *cell,RgSchDlHqProcCb *hqP,uint8_t tbCnt)
{
RgSchDRXCellCb *drxCell =NULLP;
RgSchDrxDlHqProcCb *drxHq =NULLP;
{
RgSchDRXCellCb *drxCell =NULLP;
RgSchDrxDlHqProcCb *drxHq =NULLP;
-
U16
harqRTTExpIndx;
-
U8
fdbkDelta;
+
uint16_t
harqRTTExpIndx;
+
uint8_t
fdbkDelta;
#ifdef LTE_TDD
#ifdef LTE_TDD
-
U8
firstDlTxOcassion;
-
U8
drxRetxTmrStartSf;
+
uint8_t
firstDlTxOcassion;
+
uint8_t
drxRetxTmrStartSf;
#endif
#endif
- TRC2(rgSCHDrxStartHarqRTTTmr);
-
drxCell = RG_SCH_DRX_GET_CELL(cell);
drxHq = RG_SCH_DRX_GET_DL_HQ(hqP);
drxCell = RG_SCH_DRX_GET_CELL(cell);
drxHq = RG_SCH_DRX_GET_DL_HQ(hqP);
@@
-1109,7
+990,7
@@
U8 tbCnt;
may not be possible */
drxRetxTmrStartSf = (hqP->tbInfo[tbCnt].fdbkTime.subframe +
firstDlTxOcassion) % RGSCH_NUM_SUB_FRAMES;
may not be possible */
drxRetxTmrStartSf = (hqP->tbInfo[tbCnt].fdbkTime.subframe +
firstDlTxOcassion) % RGSCH_NUM_SUB_FRAMES;
-
U8
i;
+
uint8_t
i;
/* We are here because the Retx Timer start is moved by atleast one
position. Hence the timer will be reduced by minimum one */
drxHq->retxTmrReduction = 1;
/* We are here because the Retx Timer start is moved by atleast one
position. Hence the timer will be reduced by minimum one */
drxHq->retxTmrReduction = 1;
@@
-1146,7
+1027,7
@@
U8 tbCnt;
drxHq->harqRTTEnt.node = (PTR)hqP;
drxHq->rttIndx = harqRTTExpIndx;
drxHq->harqRTTEnt.node = (PTR)hqP;
drxHq->rttIndx = harqRTTExpIndx;
-
RETVOID
;
+
return
;
}/*rgSCHDrxStartHarqRTTTmr*/
}/*rgSCHDrxStartHarqRTTTmr*/
@@
-1173,45
+1054,30
@@
U8 tbCnt;
* -# ROK
* -# RFAILED
*/
* -# ROK
* -# RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxUeCfg
-(
- RgSchCellCb *cell,
- RgSchUeCb *ue,
- RgrUeCfg *ueCfg
- )
-#else
-PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
- RgSchCellCb *cell;
- RgSchUeCb *ue;
- RgrUeCfg *ueCfg;
-#endif
+S16 rgSCHDrxUeCfg(RgSchCellCb *cell,RgSchUeCb *ue,RgrUeCfg *ueCfg)
{
S16 ret = ROK;
RgSchDrxUeCb *ueDrxCb;
CmLteTimingInfo nxtOnDur;
{
S16 ret = ROK;
RgSchDrxUeCb *ueDrxCb;
CmLteTimingInfo nxtOnDur;
- U16 onDurIndx;
- U16 nxtOnDurTime;
- U16 curTime;
- U8 cellIdx;
-
-
- TRC2(rgSCHDrxUeCfg);
+ uint16_t onDurIndx;
+ uint16_t nxtOnDurTime;
+ uint16_t curTime;
+ uint8_t cellIdx;
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP)
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP)
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
if ((ue == (RgSchUeCb* )NULLP)
||
(ueCfg == (RgrUeCfg* )NULLP))
{
}
if ((ue == (RgSchUeCb* )NULLP)
||
(ueCfg == (RgrUeCfg* )NULLP))
{
-
RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId, "
rgSCHDrxUeCfg():"
+
DU_LOG("\nERROR --> SCH :
rgSCHDrxUeCfg():"
"Invalid params.cell or ue or ueCfg is NULL ");
"Invalid params.cell or ue or ueCfg is NULL ");
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-1222,9
+1088,8
@@
PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
if(ret != ROK)
{
if(ret != ROK)
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "Memory allocation FAILED for DRX UECB CRBTI:%d",ue->ueId);
- RETVALUE(ret);
+ DU_LOG("\nERROR --> SCH : Memory allocation FAILED for DRX UECB CRBTI:%d",ue->ueId);
+ return (ret);
}
ueDrxCb = ue->drxCb;
}
ueDrxCb = ue->drxCb;
@@
-1285,10
+1150,10
@@
PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
ueDrxCb->distance = (nxtOnDurTime - curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (ueDrxCb->distance < 0)
{
ueDrxCb->distance = (nxtOnDurTime - curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (ueDrxCb->distance < 0)
{
-
RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "
DRXUE. Invalid "
+
DU_LOG("\nERROR --> SCH :
DRXUE. Invalid "
"value for distance, %d CRNTI:%d", ueDrxCb->distance,ue->ueId);
}
"value for distance, %d CRNTI:%d", ueDrxCb->distance,ue->ueId);
}
- //
printf("
The onduartion index is: %d\n",(int)onDurIndx);
+ //
DU_LOG("\nDEBUG --> SCH :
The onduartion index is: %d\n",(int)onDurIndx);
cmLListAdd2Tail(&(cell->drxCb->drxQ[onDurIndx].onDurationQ),
&(ueDrxCb->onDurationEnt));
cmLListAdd2Tail(&(cell->drxCb->drxQ[onDurIndx].onDurationQ),
&(ueDrxCb->onDurationEnt));
@@
-1307,7
+1172,7
@@
PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
ueDrxCb->shortCycleEnt.node = (PTR)ue;
}
ueDrxCb->shortCycleEnt.node = (PTR)ue;
}
-
RETVALUE
(ret);
+
return
(ret);
} /* end of rgSCHDrxUeCfg */
/** @brief This function gets the next occurance of onDurationTimer from the
} /* end of rgSCHDrxUeCfg */
/** @brief This function gets the next occurance of onDurationTimer from the
@@
-1333,37
+1198,22
@@
PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
* @param RgSchCellCb *cell
* @param RgSchDrxUeCb *drxCb
* @param CmLteTimingInfo *nxtOnDur
* @param RgSchCellCb *cell
* @param RgSchDrxUeCb *drxCb
* @param CmLteTimingInfo *nxtOnDur
- * @param
U8
delta
+ * @param
uint8_t
delta
* @return ROK/RFAILED
*/
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PRIVATE S16 rgSCHDrxGetNxtOnDur
-(
- RgSchCellCb *cell,
- RgSchDrxUeCb *drxCb,
- CmLteTimingInfo *nxtOnDur,
- U8 delta
- )
-#else
-PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
- RgSchCellCb *cell;
- RgSchDrxUeCb *drxCb;
- CmLteTimingInfo *nxtOnDur;
- U8 delta;
-#endif
+static S16 rgSCHDrxGetNxtOnDur(RgSchCellCb *cell,RgSchDrxUeCb *drxCb,CmLteTimingInfo *nxtOnDur,uint8_t delta)
{
{
-
U16
curTime;
-
U16
curDist;
-
U16
cycleLen;
-
U32
numOfCycles;
-
U32
nxtDist;
+
uint16_t
curTime;
+
uint16_t
curDist;
+
uint16_t
cycleLen;
+
uint32_t
numOfCycles;
+
uint32_t
nxtDist;
- TRC3(rgSCHDrxGetNxtOnDur);
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP )
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP )
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
if( (drxCb == (RgSchDrxUeCb* )NULLP)
}
if( (drxCb == (RgSchDrxUeCb* )NULLP)
@@
-1371,10
+1221,9
@@
PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
(nxtOnDur == (CmLteTimingInfo* )NULLP)
)
{
(nxtOnDur == (CmLteTimingInfo* )NULLP)
)
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDrxGetNxOnDur():Invalid params."
+ DU_LOG("\nERROR --> SCH : rgSCHDrxGetNxOnDur():Invalid params."
"cell/drxCb/nxtOnDur is NULL");
"cell/drxCb/nxtOnDur is NULL");
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-1396,7
+1245,7
@@
PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
{
/* offset is the nextOnDur */
nxtOnDur->sfn = drxCb->drxStartOffset / RGSCH_NUM_SUB_FRAMES_5G;
{
/* offset is the nextOnDur */
nxtOnDur->sfn = drxCb->drxStartOffset / RGSCH_NUM_SUB_FRAMES_5G;
- nxtOnDur->slot = (
U8
)(drxCb->drxStartOffset % RGSCH_NUM_SUB_FRAMES_5G);
+ nxtOnDur->slot = (
uint8_t
)(drxCb->drxStartOffset % RGSCH_NUM_SUB_FRAMES_5G);
nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->slot);
}
else
nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->slot);
}
else
@@
-1409,8
+1258,8
@@
PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
{
/* Perfect match pick up the current time */
/*nxtOnDur should be set to equal to currentTime + DELTA */
{
/* Perfect match pick up the current time */
/*nxtOnDur should be set to equal to currentTime + DELTA */
- nxtOnDur->sfn = (
U16
)curTime / RGSCH_NUM_SUB_FRAMES_5G;
- nxtOnDur->slot = (
U16
)curTime % RGSCH_NUM_SUB_FRAMES_5G;
+ nxtOnDur->sfn = (
uint16_t
)curTime / RGSCH_NUM_SUB_FRAMES_5G;
+ nxtOnDur->slot = (
uint16_t
)curTime % RGSCH_NUM_SUB_FRAMES_5G;
nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->slot);
}
nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->slot);
}
@@
-1418,8
+1267,8
@@
PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
{
nxtDist = drxCb->drxStartOffset + (numOfCycles + 1) *
cycleLen;
{
nxtDist = drxCb->drxStartOffset + (numOfCycles + 1) *
cycleLen;
- nxtOnDur->sfn = (
U16
)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
- nxtOnDur->slot = (
U16
)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
+ nxtOnDur->sfn = (
uint16_t
)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
+ nxtOnDur->slot = (
uint16_t
)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
}
}
}
}
@@
-1429,10
+1278,10
@@
PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
if((nxtDist - (curTime - delta)) <= RG_SCH_DRX_MAX_DELTA)
{
nxtDist = nxtDist + cycleLen;
if((nxtDist - (curTime - delta)) <= RG_SCH_DRX_MAX_DELTA)
{
nxtDist = nxtDist + cycleLen;
- nxtOnDur->sfn = (
U16
)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
- nxtOnDur->slot = (
U16
)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
+ nxtOnDur->sfn = (
uint16_t
)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
+ nxtOnDur->slot = (
uint16_t
)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
} /* end of rgSCHDrxGetNxtOnDur */
/** @brief This function is a utility function to copy the UE configuration from
@@
-1450,19
+1299,8
@@
PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
* @param RgrUeDrxCfg *drxCfg
* @return ROK/RFAILED
*/
* @param RgrUeDrxCfg *drxCfg
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PRIVATE S16 rgSCHDrxCpyUeCfg
-(
- RgSchDrxUeCb *ueCb,
- RgrUeDrxCfg *drxCfg
-)
-#else
-PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
- RgSchDrxUeCb *ueCb;
- RgrUeDrxCfg *drxCfg;
-#endif
+static S16 rgSCHDrxCpyUeCfg(RgSchDrxUeCb *ueCb,RgrUeDrxCfg *drxCfg)
{
{
- TRC3(rgSCHDrxCpyUeCfg);
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( (ueCb == (RgSchDrxUeCb* )NULLP )
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( (ueCb == (RgSchDrxUeCb* )NULLP )
@@
-1470,7
+1308,7
@@
PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
(drxCfg == (RgrUeDrxCfg* )NULLP)
)
{
(drxCfg == (RgrUeDrxCfg* )NULLP)
)
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-1488,7
+1326,7
@@
PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
ueCb->shortDrxCycle = drxCfg->drxShortDrx.shortDrxCycle;
ueCb->shortCycleTmrLen = drxCfg->drxShortDrx.drxShortCycleTmr;
ueCb->shortDrxCycle = drxCfg->drxShortDrx.shortDrxCycle;
ueCb->shortCycleTmrLen = drxCfg->drxShortDrx.drxShortCycleTmr;
-
RETVALUE(ROK)
;
+
return ROK
;
} /* end of rgSCHDrxCpyUeCfg */
#ifdef RGR_V2
} /* end of rgSCHDrxCpyUeCfg */
#ifdef RGR_V2
@@
-1515,38
+1353,23
@@
PRIVATE S16 rgSCHDrxCpyUeCfg (ueCb, drxCfg)
* @param RgrUeRecfg *ueReCfg
* @return ROK/RFAILED
*/
* @param RgrUeRecfg *ueReCfg
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxUeReCfg
-(
- RgSchCellCb *cell,
- RgSchUeCb *ue,
- RgrUeRecfg *ueReCfg
- )
-#else
-PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
- RgSchCellCb *cell;
- RgSchUeCb *ue;
- RgrUeRecfg *ueReCfg;
-#endif
+S16 rgSCHDrxUeReCfg(RgSchCellCb *cell,RgSchUeCb *ue,RgrUeRecfg *ueReCfg)
{
/* DRX_INFI_LOOP */
RgSchCmnCell *cellSch = NULLP;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
{
/* DRX_INFI_LOOP */
RgSchCmnCell *cellSch = NULLP;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
-
S16 ret = ROK;
Inst instIdx = cell->instIdx;
RgSchDrxUeCb *ueDrxCb;
CmLteTimingInfo nxtOnDur;
S16 ret = ROK;
Inst instIdx = cell->instIdx;
RgSchDrxUeCb *ueDrxCb;
CmLteTimingInfo nxtOnDur;
- U16 nxtOnDurTime;
- U16 onDurIndx;
- U16 curTime;
- U16 shrtCycleExpIndx;
- U16 onDurExpTime;
- U16 cycleLen;
- U16 curIndx;
- U8 cellIdx;
-
- TRC2(rgSCHDrxUeReCfg);
+ uint16_t nxtOnDurTime;
+ uint16_t onDurIndx;
+ uint16_t curTime;
+ uint16_t shrtCycleExpIndx;
+ uint16_t onDurExpTime;
+ uint16_t cycleLen;
+ uint16_t curIndx;
+ uint8_t cellIdx;
/* drx was disabled but now enabled for this ue */
/* drx was disabled but now enabled for this ue */
@@
-1561,10
+1384,9
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
if ( ret != ROK )
{
if ( ret != ROK )
{
- RLOG_ARG1(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHdrxUeReCfg():""Memory allocation FAILED for DRX UE Cb CRNTI:%d",
+ DU_LOG("\nERROR --> SCH : rgSCHdrxUeReCfg():""Memory allocation FAILED for DRX UE Cb CRNTI:%d",
ue->ueId);
ue->ueId);
-
RETVALUE
(ret);
+
return
(ret);
}
ue->isDrxEnabled = TRUE; /* sachin */
}
ue->isDrxEnabled = TRUE; /* sachin */
@@
-1595,7
+1417,7
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
}
if( ue->drxCb == NULLP )
{
}
if( ue->drxCb == NULLP )
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
ueDrxCb = ue->drxCb;
}
ueDrxCb = ue->drxCb;
@@
-1675,8
+1497,7
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
if((ueDrxCb->onDurExpIndx != DRX_INVALID) && (ueDrxCb->onDurExpDistance != DRX_TMR_EXPRD))
{
curIndx = (curTime + RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
if((ueDrxCb->onDurExpIndx != DRX_INVALID) && (ueDrxCb->onDurExpDistance != DRX_TMR_EXPRD))
{
curIndx = (curTime + RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
- RLOG_ARG3(L_DEBUG,DBG_CELLID,cell->cellId,
- "OLD ONDUR RUNNING-EXPIRES at %d curIdx-%d nxtOnDurTime-%d",
+ DU_LOG("\nDEBUG --> SCH : OLD ONDUR RUNNING-EXPIRES at %d curIdx-%d nxtOnDurTime-%d",
ueDrxCb->onDurExpIndx,
curIndx,
nxtOnDurTime);
ueDrxCb->onDurExpIndx,
curIndx,
nxtOnDurTime);
@@
-1684,11
+1505,13
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
/* Manipulating the time when old onDuration timer can expire */
if(curIndx >= ueDrxCb->onDurExpIndx)
{
/* Manipulating the time when old onDuration timer can expire */
if(curIndx >= ueDrxCb->onDurExpIndx)
{
- onDurExpTime = curTime + ((ueDrxCb->onDurExpDistance+1) * RG_SCH_MAX_DRXQ_SIZE)+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
+ onDurExpTime = curTime + ((ueDrxCb->onDurExpDistance+1) * RG_SCH_MAX_DRXQ_SIZE)+\
+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
}
else
{
}
else
{
- onDurExpTime = curTime + (ueDrxCb->onDurExpDistance * RG_SCH_MAX_DRXQ_SIZE)+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
+ onDurExpTime = curTime + (ueDrxCb->onDurExpDistance * RG_SCH_MAX_DRXQ_SIZE)+\
+ (ueDrxCb->onDurExpIndx - curIndx + RG_SCH_DRX_DL_DELTA);
}
if(nxtOnDurTime <= onDurExpTime)
}
if(nxtOnDurTime <= onDurExpTime)
@@
-1712,7
+1535,7
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
ueDrxCb->distance = (nxtOnDurTime - curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (ueDrxCb->distance < 0)
{
ueDrxCb->distance = (nxtOnDurTime - curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (ueDrxCb->distance < 0)
{
-
RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"
DRXUE. Invalid "
+
DU_LOG("\nERROR --> SCH :
DRXUE. Invalid "
"value for distance, %d CRNTI:%d", ueDrxCb->distance,ue->ueId);
}
"value for distance, %d CRNTI:%d", ueDrxCb->distance,ue->ueId);
}
@@
-1747,7
+1570,7
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
}
}
}
}
-
RETVALUE(ROK)
;
+
return ROK
;
} /* end of rgSCHDrxUeReCfg */
#endif
} /* end of rgSCHDrxUeReCfg */
#endif
@@
-1765,27
+1588,11
@@
PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
* @param RgSchCellCb *cell
* @return ROK/RFAILED
*/
* @param RgSchCellCb *cell
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC Void rgSCHDrxUeHqReset
-(
- RgSchCellCb *cell,
- RgSchUeCb *ue,
- RgSchDlHqEnt *hqE,
- U8 cellIdx
- )
-#else
-PUBLIC Void rgSCHDrxUeHqReset(cell, ue, hqE, cellIdx)
- RgSchCellCb *cell;
- RgSchUeCb *ue;
- RgSchDlHqEnt *hqE;
- U8 cellIdx;
-#endif
+Void rgSCHDrxUeHqReset(RgSchCellCb *cell,RgSchUeCb *ue,RgSchDlHqEnt *hqE,uint8_t cellIdx)
{
RgSchDlHqProcCb *hqP;
RgSchDrxDlHqProcCb *drxHq =NULLP;
{
RgSchDlHqProcCb *hqP;
RgSchDrxDlHqProcCb *drxHq =NULLP;
- U8 i;
-
- TRC2(rgSCHDrxUeHqReset);
+ uint8_t i;
for(i=0; i < hqE->numHqPrcs; i++)
{
for(i=0; i < hqE->numHqPrcs; i++)
{
@@
-1837,26
+1644,15
@@
PUBLIC Void rgSCHDrxUeHqReset(cell, ue, hqE, cellIdx)
* @param RgSchUeCb *ue
* @return ROK/RFAILED
*/
* @param RgSchUeCb *ue
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxUeDel
-(
- RgSchCellCb *cell,
- RgSchUeCb *ue
- )
-#else
-PUBLIC S16 rgSCHDrxUeDel (cell, ue)
- RgSchCellCb *cell;
- RgSchUeCb *ue;
-#endif
+S16 rgSCHDrxUeDel(RgSchCellCb *cell,RgSchUeCb *ue)
{
RgSchDrxUeCb *ueDrxCb;
RgSchDlHqEnt *hqE = NULLP;
{
RgSchDrxUeCb *ueDrxCb;
RgSchDlHqEnt *hqE = NULLP;
-
U8
cellIdx;
+
uint8_t
cellIdx;
RgSchUeCellInfo *cellInfo = NULLP;
#ifdef EMTC_ENABLE
RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
#endif
RgSchUeCellInfo *cellInfo = NULLP;
#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 */
/* ccpu00129899: Moved the drx-enabled check to the caller */
@@
-1917,7
+1713,7
@@
PUBLIC S16 rgSCHDrxUeDel (cell, ue)
ueDrxCb->drxDlInactvMask = DRX_UE_INACTIVE;
ueDrxCb->drxUlInactvMask = DRX_UE_INACTIVE;
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.
}/*rgSCHDrxUeDel*/
/** @brief This function is called at the time of RGR cell configuration.
@@
-1928,39
+1724,25
@@
PUBLIC S16 rgSCHDrxUeDel (cell, ue)
* Function: rgSCHDrxCellCfg
*
* Processing steps:
* Function: rgSCHDrxCellCfg
*
* Processing steps:
- * - Initializes the following drxQ (
cmM
emset would do).
+ * - Initializes the following drxQ (
m
emset would do).
*
*
* @param RgSchCellCb *cell
* @param RgrCellCfg *cellCfg
* @return ROK/RFAILED
*/
*
*
* @param RgSchCellCb *cell
* @param RgrCellCfg *cellCfg
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxCellCfg
-(
- RgSchCellCb *cell,
- RgrCellCfg *cellCfg
- )
-#else
-PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
- RgSchCellCb *cell;
- RgrCellCfg *cellCfg;
-#endif
+S16 rgSCHDrxCellCfg(RgSchCellCb *cell,RgrCellCfg *cellCfg)
{
S16 ret = ROK;
Inst instIdx = cell->instIdx;
{
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))
{
#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);
+ DU_LOG("\nERROR --> SCH : rgSCHDrxCellCfg():Invalid Params. cell/cellCfg is NULL");
+ return RFAILED;
}
#endif
}
#endif
@@
-1970,9
+1752,9
@@
PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
if(ret != ROK)
{
if(ret != ROK)
{
-
RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,"
rgSCHDrxCellCfg():"
+
DU_LOG("\nERROR --> SCH :
rgSCHDrxCellCfg():"
"Memory allocation FAILED for DRX cell Cb");
"Memory allocation FAILED for DRX cell Cb");
-
RETVALUE
(ret);
+
return
(ret);
}
/* delInUlScan determines which index scans the queue last.
}
/* delInUlScan determines which index scans the queue last.
@@
-1992,7
+1774,7
@@
PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
cell->drxCb->delInUlScan = TRUE;
}
cell->drxCb->delInUlScan = TRUE;
}
-
RETVALUE
(ret);
+
return
(ret);
} /* end of rgSchDrxCellCfg */
} /* end of rgSchDrxCellCfg */
@@
-2012,21
+1794,10
@@
PUBLIC S16 rgSCHDrxCellCfg (cell, cellCfg)
* @param RgSchCellCb *cell
* @return Void
*/
* @param RgSchCellCb *cell
* @return Void
*/
-#ifdef ANSI
-PUBLIC Void rgSCHDrxCellDel
-(
- RgSchCellCb *cell
- )
-#else
-PUBLIC Void rgSCHDrxCellDel (cell)
- RgSchCellCb *cell;
-#endif
+Void rgSCHDrxCellDel(RgSchCellCb *cell)
{
Inst instIdx = cell->instIdx;
{
Inst instIdx = cell->instIdx;
- TRC2(rgSCHCfgRgrCellDel);
-
-
if (cell->drxCb)
{
/* ccpu00117052 - MOD - Passing double pointer
if (cell->drxCb)
{
/* ccpu00117052 - MOD - Passing double pointer
@@
-2034,7
+1805,7
@@
PUBLIC Void rgSCHDrxCellDel (cell)
rgSCHUtlFreeSBuf(instIdx, (Data **)(&(cell->drxCb)),
sizeof(RgSchDRXCellCb));
}
rgSCHUtlFreeSBuf(instIdx, (Data **)(&(cell->drxCb)),
sizeof(RgSchDRXCellCb));
}
-
RETVOID
;
+
return
;
} /* end of rgSchDrxCellDel */
/** @brief This function is called when an SR is received from the UE. In this
} /* end of rgSchDrxCellDel */
/** @brief This function is called when an SR is received from the UE. In this
@@
-2063,34
+1834,20
@@
PUBLIC Void rgSCHDrxCellDel (cell)
* @param RgSchUeCb *ue
* @return ROK/RFAILED
*/
* @param RgSchUeCb *ue
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PUBLIC S16 rgSCHDrxSrInd
-(
- RgSchCellCb *cell,
- RgSchUeCb *ue
- )
-#else
-PUBLIC S16 rgSCHDrxSrInd (cell, ue)
- RgSchCellCb *cell;
- RgSchUeCb *ue;
-#endif
+S16 rgSCHDrxSrInd(RgSchCellCb *cell,RgSchUeCb *ue)
{
RgSchDrxUeCb *drxCb;
{
RgSchDrxUeCb *drxCb;
- TRC2(rgSCHDrxSrInd);
-
-
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP)
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( cell == (RgSchCellCb* )NULLP)
{
-
RETVALUE(ROK)
;
+
return ROK
;
}
if( (ue == (RgSchUeCb* )NULLP))
{
}
if( (ue == (RgSchUeCb* )NULLP))
{
- RLOG_ARG0(L_ERROR,DBG_CELLID,cell->cellId,
- "rgSCHDrxSrInd():Invalid Params. cell/ue is NULL");
- RETVALUE(RFAILED);
+ DU_LOG("\nERROR --> SCH : rgSCHDrxSrInd():Invalid Params. cell/ue is NULL");
+ return RFAILED;
}
#endif
/* KWork fix - shifted this down */
}
#endif
/* KWork fix - shifted this down */
@@
-2104,7
+1861,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);
/* 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 */
} /* rgSCHDrxSrInd */
@@
-2132,23
+1889,10
@@
PUBLIC S16 rgSCHDrxSrInd (cell, ue)
* @param RgSchUeCb *ueCb
* @return Void
*/
* @param RgSchUeCb *ueCb
* @return Void
*/
-#ifdef ANSI
-PUBLIC Void rgSCHDrxDedRa
-(
-RgSchCellCb *cellCb,
-RgSchUeCb *ueCb
- )
-#else
-PUBLIC Void rgSCHDrxDedRa (cellCb, ueCb)
-RgSchCellCb *cellCb;
-RgSchUeCb *ueCb;
-#endif
+Void rgSCHDrxDedRa(RgSchCellCb *cellCb, RgSchUeCb *ueCb)
{
RgSchDrxUeCb *drxCb;
{
RgSchDrxUeCb *drxCb;
- TRC2(rgSCHDrxDedRa);
-
-
drxCb = RG_SCH_DRX_GET_UE(ueCb);
/* Mark the UE as active for UL & DL */
drxCb = RG_SCH_DRX_GET_UE(ueCb);
/* Mark the UE as active for UL & DL */
@@
-2162,7
+1906,7
@@
RgSchUeCb *ueCb;
drxCb->raRcvd = TRUE;
drxCb->raRcvd = TRUE;
-
RETVOID
;
+
return
;
} /* end of rgSCHDrxDedRa */
} /* end of rgSCHDrxDedRa */
@@
-2179,38
+1923,23
@@
RgSchUeCb *ueCb;
*
* @param RgSchCellCb *cell
* @param RgSchUeCb *ueCb
*
* @param RgSchCellCb *cell
* @param RgSchUeCb *ueCb
- * @param
U16
idx - if calcFrmOffst is TRUE,
+ * @param
uint16_t
idx - if calcFrmOffst is TRUE,
* idx is delta to be added
* @param Bool calcFrmOffst
* @return Void
*/
* idx is delta to be added
* @param Bool calcFrmOffst
* @return Void
*/
-#ifdef ANSI
-PRIVATE Void rgSCHDrxMvToNxtOnDurOcc
-(
-RgSchCellCb *cell,
-RgSchUeCb *ueCb,
-U16 idx,
-Bool calcFrmOffst
-)
-#else
-PRIVATE Void rgSCHDrxMvToNxtOnDurOcc (cell, ueCb, idx, calcFrmOffst)
-RgSchCellCb *cell;
-RgSchUeCb *ueCb;
-U16 idx;
-Bool calcFrmOffst;
-#endif
+static Void rgSCHDrxMvToNxtOnDurOcc(RgSchCellCb *cell,RgSchUeCb *ueCb,uint16_t idx,Bool calcFrmOffst)
{
{
-
U16
nxtOnDurIndex;
-
U16
curTime;
+
uint16_t
nxtOnDurIndex;
+
uint16_t
curTime;
RgSchDrxUeCb *drxUe;
RgSchDRXCellCb *drxCell;
RgSchDrxUeCb *drxUe;
RgSchDRXCellCb *drxCell;
- CmLteTimingInfo
nxtOnDur; /* to be used when calcFrmOffset is set */
-
U16
nxtOnDurInSf; /* next On Duration in no of subframes */
+ CmLteTimingInfo nxtOnDur; /* to be used when calcFrmOffset is set */
+
uint16_t
nxtOnDurInSf; /* next On Duration in no of subframes */
drxCell = cell->drxCb;
drxUe = ueCb->drxCb;
drxCell = cell->drxCb;
drxUe = ueCb->drxCb;
- TRC2(rgSCHDrxMvToNxtOnDurOcc)
if(calcFrmOffst == FALSE)
{
if(calcFrmOffst == FALSE)
{
@@
-2229,7
+1958,7
@@
Bool calcFrmOffst;
}
else
{
}
else
{
- rgSCHDrxGetNxtOnDur(cell,drxUe,&nxtOnDur,(
U8
)idx);
+ rgSCHDrxGetNxtOnDur(cell,drxUe,&nxtOnDur,(
uint8_t
)idx);
nxtOnDurInSf = ((nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
nxtOnDur.slot);
nxtOnDurInSf = ((nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
nxtOnDur.slot);
@@
-2241,7
+1970,7
@@
Bool calcFrmOffst;
drxUe->distance = (nxtOnDurInSf-curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (drxUe->distance < 0)
{
drxUe->distance = (nxtOnDurInSf-curTime) / RG_SCH_MAX_DRXQ_SIZE;
if (drxUe->distance < 0)
{
-
RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"
DRXUE. Invalid "
+
DU_LOG("\nERROR --> SCH :
DRXUE. Invalid "
"value for distance, %d CRNTI:%d", drxUe->distance,ueCb->ueId);
}
}
"value for distance, %d CRNTI:%d", drxUe->distance,ueCb->ueId);
}
}
@@
-2260,7
+1989,7
@@
Bool calcFrmOffst;
drxUe->onDurationEnt.node = (PTR)ueCb;
drxUe->onDurIndx = nxtOnDurIndex;
drxUe->onDurationEnt.node = (PTR)ueCb;
drxUe->onDurIndx = nxtOnDurIndex;
-
RETVOID
;
+
return
;
}/*rgSCHDrxMvToNxtOnDurOcc*/
#ifdef LTE_TDD
}/*rgSCHDrxMvToNxtOnDurOcc*/
#ifdef LTE_TDD
@@
-2295,42
+2024,26
@@
Bool calcFrmOffst;
* and will expire on (15,1)
*
* @param RgSchUeCb *ue Ue control block.
* and will expire on (15,1)
*
* @param RgSchUeCb *ue Ue control block.
- * @param
U16
curTime current Time
- * @param
U32
duration Timer duration
+ * @param
uint16_t
curTime current Time
+ * @param
uint32_t
duration Timer duration
* @param CmLteTimingInfo *tmrExpryIdx Timer expry (SFN,sf)
* @return ROK/RFAILED
*/
* @param CmLteTimingInfo *tmrExpryIdx Timer expry (SFN,sf)
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PRIVATE S16 rgSCHDrxGetNxtTmrExpry
-(
- RgSchCellCb *cell,
- U16 curTime,
- U32 duration,
- CmLteTimingInfo *tmrExpryIdx
-)
-#else
-PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
- RgSchCellCb *cell;
- U16 curTime;
- U32 duration;
- CmLteTimingInfo *tmrExpryIdx;
-#endif
+static S16 rgSCHDrxGetNxtTmrExpry(RgSchCellCb *cell, uint16_t curTime, uint32_t duration,CmLteTimingInfo *tmrExpryIdx)
{
{
-
U32
dlSfTillNxtSFN; /*!< DL subframes till next SFN */
-
U8
tddCfgMode; /*!< tdd config mode */
+
uint32_t
dlSfTillNxtSFN; /*!< DL subframes till next SFN */
+
uint8_t
tddCfgMode; /*!< tdd config mode */
Bool isDwPtsCnted; /*!< is DwPts counted as PDCCH sf */
CmLteTimingInfo crntTime; /*!< current SFN & sf */
Bool isDwPtsCnted; /*!< is DwPts counted as PDCCH sf */
CmLteTimingInfo crntTime; /*!< current SFN & sf */
- TRC2(rgSCHDrxGetNxtTmrExpry);
-
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( (cell == (RgSchCellCb* )NULLP)
||
(tmrExpryIdx == (CmLteTimingInfo* )NULLP)
)
{
#if ( ERRCLASS & ERRCLS_INT_PAR )
if ( (cell == (RgSchCellCb* )NULLP)
||
(tmrExpryIdx == (CmLteTimingInfo* )NULLP)
)
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
#endif
}
#endif
@@
-2352,7
+2065,7
@@
PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
if ( dlSfTillNxtSFN >= duration )
{
/* the timer would expire on the same RF */
if ( dlSfTillNxtSFN >= duration )
{
/* the timer would expire on the same RF */
-
U32
diff = dlSfTillNxtSFN - duration;
+
uint32_t
diff = dlSfTillNxtSFN - duration;
tmrExpryIdx->sfn = crntTime.sfn;
tmrExpryIdx->sfn = crntTime.sfn;
@@
-2363,7
+2076,7
@@
PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
}
else
{
}
else
{
-
U8
arrayIdx;
+
uint8_t
arrayIdx;
/* to know the DL sf index based on diff */
arrayIdx = rgSchDrxDlSfTddCfg[isDwPtsCnted][tddCfgMode];
/* to know the DL sf index based on diff */
arrayIdx = rgSchDrxDlSfTddCfg[isDwPtsCnted][tddCfgMode];
@@
-2373,15
+2086,15
@@
PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
}/* if ( dlSfTillNxtSFN >= duration...*/
else
{
}/* if ( dlSfTillNxtSFN >= duration...*/
else
{
-
U32
remSf; /*!< remaining subframes */
-
U32
numRf; /*!< num of complete radio frames */
-
U32
numRemSfs; /*!< num of remaining subframes */
+
uint32_t
remSf; /*!< remaining subframes */
+
uint32_t
numRf; /*!< num of complete radio frames */
+
uint32_t
numRemSfs; /*!< num of remaining subframes */
remSf = duration - dlSfTillNxtSFN;
/* move to (currSFN,9) having consued dlSfTillNxtSFN DL subframes */
tmrExpryIdx->sfn = crntTime.sfn;
remSf = duration - dlSfTillNxtSFN;
/* move to (currSFN,9) having consued dlSfTillNxtSFN DL subframes */
tmrExpryIdx->sfn = crntTime.sfn;
- tmrExpryIdx->subframe = (
U8
)9;
+ tmrExpryIdx->subframe = (
uint8_t
)9;
numRf = (1 * remSf)/rgSchDrxDlSfTddCfg[isDwPtsCnted][tddCfgMode];
numRemSfs = (1 * remSf)%rgSchDrxDlSfTddCfg[isDwPtsCnted][tddCfgMode];
numRf = (1 * remSf)/rgSchDrxDlSfTddCfg[isDwPtsCnted][tddCfgMode];
numRemSfs = (1 * remSf)%rgSchDrxDlSfTddCfg[isDwPtsCnted][tddCfgMode];
@@
-2428,7
+2141,7
@@
PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
tmrExpryIdx->sfn = tmrExpryIdx->sfn - (RG_SCH_CMN_MAX_SFN_NUM + 1);
}
tmrExpryIdx->sfn = tmrExpryIdx->sfn - (RG_SCH_CMN_MAX_SFN_NUM + 1);
}
-
RETVALUE(ROK)
;
+
return ROK
;
}/*rgSCHDrxGetNxtTmrExpry*/
/** @brief This function calculates the next onDuration Occurence
}/*rgSCHDrxGetNxtTmrExpry*/
/** @brief This function calculates the next onDuration Occurence
@@
-2443,38
+2156,18
@@
PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
*
* @param RgSchCellCb *cell
* @param RgSchUeCb *ue
*
* @param RgSchCellCb *cell
* @param RgSchUeCb *ue
- * @param
U16
delta
- * @param
U32
tmrLen
- * @param
U16
*distance
+ * @param
uint16_t
delta
+ * @param
uint32_t
tmrLen
+ * @param
uint16_t
*distance
* @param S16 *idx
* @return ROK/RFAILED
*/
* @param S16 *idx
* @return ROK/RFAILED
*/
-#ifdef ANSI
-PRIVATE Void rgSCHDrxCalcNxtTmrExpry
-(
- RgSchCellCb *cell,
- RgSchUeCb *ue,
- U16 delta,
- U32 tmrLen,
- S16 *distance,
- U16 *idx
-)
-#else
-PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
- RgSchCellCb *cell;
- RgSchUeCb *ue;
- U16 delta;
- U32 tmrLen;
- S16 *distance;
- U16 *idx;
-#endif
+static Void rgSCHDrxCalcNxtTmrExpry(RgSchCellCb *cell, RgSchUeCb *ue, uint16_t delta, uint32_t tmrLen, S16 *distance, uint16_t *idx)
{
{
-
U16
curTimeInSf; /*current time in no of subframes*/
+
uint16_t
curTimeInSf; /*current time in no of subframes*/
CmLteTimingInfo tmrExpry;
CmLteTimingInfo tmrExpry;
-
U16
tmrExpryInSf; /*timer expry in no of subframes*/
+
uint16_t
tmrExpryInSf; /*timer expry in no of subframes*/
- TRC2(rgSCHDrxCalcNxtTmrExpry)
-
curTimeInSf = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G +
cell->crntTime.slot;
curTimeInSf = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G +
cell->crntTime.slot;
@@
-2509,12
+2202,12
@@
PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
}
if (*distance < 0)
{
}
if (*distance < 0)
{
-
RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId, "
DRXUE. Invalid "
+
DU_LOG("\nERROR --> SCH :
DRXUE. Invalid "
"value for distance, %d CRNTI:%d", *distance,ue->ueId);
}
}
"value for distance, %d CRNTI:%d", *distance,ue->ueId);
}
}
-
RETVOID
;
+
return
;
}/*rgSCHDrxCalcNxtTmrExpry*/
/* ccpu00134670- Validating onduration timer versus DRX cycle*/
}/*rgSCHDrxCalcNxtTmrExpry*/
/* ccpu00134670- Validating onduration timer versus DRX cycle*/
@@
-2536,26
+2229,11
@@
PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
* File :
*
**********************************************************/
* File :
*
**********************************************************/
-#ifdef ANSI
-PUBLIC S16 rgSCHCfgVldtTddDrxCycCfg
-(
-RgSchCellCb *cell,
-U16 drxCycle,
-U8 onDurTmr,
-U16 offSet
-)
-#else
-PUBLIC S16 rgSCHCfgVldtTddDrxCycCfg(cell, drxCycle, onDurTmr, offSet)
-RgSchCellCb *cell;
-U16 drxCycle;
-U8 onDurTmr;
-U16 offSet;
-#endif
+S16 rgSCHCfgVldtTddDrxCycCfg(RgSchCellCb *cell,uint16_t drxCycle,uint8_t onDurTmr, uint16_t offSet)
{
{
-
U16
startTime;
-
U16
endTimeInSf;
+
uint16_t
startTime;
+
uint16_t
endTimeInSf;
CmLteTimingInfo endTime;
CmLteTimingInfo endTime;
- TRC2(rgSCHCfgVldtTddDrxCycCfg)
startTime = offSet;
do
startTime = offSet;
do
@@
-2567,7
+2245,7
@@
U16 offSet;
if(((RGSCH_MAX_SUBFRM_5G + endTimeInSf- startTime) % RGSCH_MAX_SUBFRM_5G) >=
drxCycle)
{
if(((RGSCH_MAX_SUBFRM_5G + endTimeInSf- startTime) % RGSCH_MAX_SUBFRM_5G) >=
drxCycle)
{
-
RETVALUE(RFAILED)
;
+
return RFAILED
;
}
startTime = (startTime + drxCycle);
}
startTime = (startTime + drxCycle);
@@
-2579,7
+2257,7
@@
U16 offSet;
}while((drxCycle % RGSCH_NUM_SUB_FRAMES) &&
(startTime < (drxCycle * RGSCH_NUM_SUB_FRAMES/2)));
}while((drxCycle % RGSCH_NUM_SUB_FRAMES) &&
(startTime < (drxCycle * RGSCH_NUM_SUB_FRAMES/2)));
-
RETVALUE(ROK)
;
+
return ROK
;
}
#endif /*LTE_TDD */
}
#endif /*LTE_TDD */
@@
-2601,21
+2279,11
@@
U16 offSet;
*
*
* @param RgSchCellCb *cellCb
*
*
* @param RgSchCellCb *cellCb
- * @param
U16
ulIndex
+ * @param
uint16_t
ulIndex
* @return Void
*/
* @return Void
*/
-#ifdef ANSI
-PRIVATE Void rgSCHDrxTtiHdlOnDurUl
-(
-RgSchCellCb *cell,
-U16 ulIndex
-)
-#else
-PRIVATE Void rgSCHDrxTtiHdlOnDurUl(cell, ulIndex)
-RgSchCellCb *cell;
-U16 ulIndex;
-#endif
+static Void rgSCHDrxTtiHdlOnDurUl(RgSchCellCb *cell,uint16_t ulIndex)
{
CmLList *node;
RgSchDRXCellCb *drxCell = NULLP;
{
CmLList *node;
RgSchDRXCellCb *drxCell = NULLP;
@@
-2625,8
+2293,6
@@
U16 ulIndex;
RgSchCmnCell *cellSch = NULLP;
Bool delInUlScan = FALSE;
RgSchCmnCell *cellSch = NULLP;
Bool delInUlScan = FALSE;
- TRC2(rgSCHDrxTtiHdlOnDurUl)
-
drxCell = (cell->drxCb);
delInUlScan = drxCell->delInUlScan;
/***********************************************************
drxCell = (cell->drxCb);
delInUlScan = drxCell->delInUlScan;
/***********************************************************
@@
-2724,7
+2390,7
@@
U16 ulIndex;
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisUl->rgSCHUlInactvtUes(cell, &ulInactvLst);
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisUl->rgSCHUlInactvtUes(cell, &ulInactvLst);
-
RETVOID
;
+
return
;
}
/** @brief This function is called to handle onDurationTimer per TTI processing.
}
/** @brief This function is called to handle onDurationTimer per TTI processing.
@@
-2743,28
+2409,18
@@
U16 ulIndex;
*
*
* @param RgSchCellCb *cellCb
*
*
* @param RgSchCellCb *cellCb
- * @param
U16
dlIndex
+ * @param
uint16_t
dlIndex
* @return Void
*/
* @return Void
*/
-#ifdef ANSI
-PRIVATE Void rgSCHDrxTtiHdlOnDurDl
-(
-RgSchCellCb *cell,
-U16 dlIndex
-)
-#else
-PRIVATE Void rgSCHDrxTtiHdlOnDurDl(cell, dlIndex)
-RgSchCellCb *cell;
-U16 dlIndex;
-#endif
+static Void rgSCHDrxTtiHdlOnDurDl(RgSchCellCb *cell,uint16_t dlIndex)
{
CmLList *node;
RgSchDRXCellCb *drxCell = NULLP;
RgSchUeCb *ue = NULLP;
RgSchDrxUeCb *drxUe = NULLP;
RgSchCmnCell *cellSch = NULLP;
{
CmLList *node;
RgSchDRXCellCb *drxCell = NULLP;
RgSchUeCb *ue = NULLP;
RgSchDrxUeCb *drxUe = NULLP;
RgSchCmnCell *cellSch = NULLP;
-
U16
expiryIndex;
+
uint16_t
expiryIndex;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
Bool delInUlScan = FALSE;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
Bool delInUlScan = FALSE;
@@
-2772,14
+2428,13
@@
U16 dlIndex;
* in the onDurationTmrExprQ. If !delInUlScan, then calculate the next
* OnDuration occurence, q it there and remove it from the current location.
*/
* 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
***********************************************************/
drxCell = (cell->drxCb);
delInUlScan = drxCell->delInUlScan;
/***********************************************************
* Scanning OnDurationQ in DL
***********************************************************/
drxCell = (cell->drxCb);
delInUlScan = drxCell->delInUlScan;
- //
printf("
CELL Timer [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
+ //
DU_LOG("\nINFO --> SCH :
CELL Timer [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
node = drxCell->drxQ[dlIndex].onDurationQ.first;
node = drxCell->drxQ[dlIndex].onDurationQ.first;
@@
-2814,8
+2469,7
@@
U16 dlIndex;
/* Temporary fix to delete stale entry */
if (drxUe->onDurExpIndx != DRX_INVALID)
{
/* Temporary fix to delete stale entry */
if (drxUe->onDurExpIndx != DRX_INVALID)
{
- RLOG_ARG4(L_DEBUG,DBG_CELLID,cell->cellId,
- "UEID:%d PreExisted[%d:%d]in onDurExpQ new[%d]",
+ DU_LOG("\nDEBUG --> SCH : UEID:%d PreExisted[%d:%d]in onDurExpQ new[%d]",
ue->ueId,
drxUe->onDurExpIndx,
drxUe->onDurExpDistance,
ue->ueId,
drxUe->onDurExpIndx,
drxUe->onDurExpDistance,
@@
-2843,11
+2497,12
@@
U16 dlIndex;
cmLListAdd2Tail(&(drxCell->drxQ[expiryIndex].onDurationExpQ),
&(drxUe->onDurationExpEnt));
cmLListAdd2Tail(&(drxCell->drxQ[expiryIndex].onDurationExpQ),
&(drxUe->onDurationExpEnt));
- //
printf("
DRXOnDuration Timer Started at [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
+ //
DU_LOG("\nINFO --> SCH :
DRXOnDuration Timer Started at [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
drxUe->onDurationExpEnt.node = (PTR)ue;
drxUe->onDurExpIndx = expiryIndex;
drxUe->onDurationExpEnt.node = (PTR)ue;
drxUe->onDurExpIndx = expiryIndex;
- //printf("DRxOnDuration will Expire = [%d]\n",(cell->crntTime.sfn*10+cell->crntTime.slot+drxUe->onDurTmrLen));
+ //DU_LOG("\nINFO --> SCH : DRxOnDuration will Expire = [%d]\n",\
+ (cell->crntTime.sfn*10+cell->crntTime.slot+drxUe->onDurTmrLen));
if ( delInUlScan == FALSE )
{
if ( delInUlScan == FALSE )
{
@@
-2913,7
+2568,7
@@
U16 dlIndex;
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisDl->rgSCHDlInactvtUes(cell, &dlInactvLst);
cellSch = RG_SCH_CMN_GET_CELL(cell);
cellSch->apisDl->rgSCHDlInactvtUes(cell, &dlInactvLst);
-
RETVOID
;
+
return
;
}/*rgSCHDrxTtiHdlOnDurDl*/
/** @brief This function handles the Dl HARQ timer's processing per TTI.
}/*rgSCHDrxTtiHdlOnDurDl*/
/** @brief This function handles the Dl HARQ timer's processing per TTI.
@@
-2930,36
+2585,24
@@
U16 dlIndex;
* process accordingly.
*
* @param RgSchCellCb *cellCb
* process accordingly.
*
* @param RgSchCellCb *cellCb
- * @param
U16
dlIndex
+ * @param
uint16_t
dlIndex
* @return Void
*/
* @return Void
*/
-#ifdef ANSI
-PRIVATE Void rgSCHDrxTtiHdlDlHarqRTT
-(
-RgSchCellCb *cell,
-U16 dlIndex
-)
-#else /* ANSI */
-PRIVATE Void rgSCHDrxTtiHdlDlHarqRTT(cell, dlIndex)
-RgSchCellCb *cell;
-U16 dlIndex;
-#endif /* ANSI */
+static Void rgSCHDrxTtiHdlDlHarqRTT(RgSchCellCb *cell,uint16_t dlIndex)
{
CmLList *node;
RgSchDrxDlHqProcCb *drxHq;
RgSchDlHqProcCb *dlHq;
RgSchDRXCellCb *drxCell;
RgSchDrxUeCb *drxUe;
{
CmLList *node;
RgSchDrxDlHqProcCb *drxHq;
RgSchDlHqProcCb *dlHq;
RgSchDRXCellCb *drxCell;
RgSchDrxUeCb *drxUe;
-
U16
reTxExpIndx;
+
uint16_t
reTxExpIndx;
Bool delInUlScan;
RgSchUeCb *ue;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
RgSchCmnCell *cellSch = RG_SCH_CMN_GET_CELL(cell);
Bool delInUlScan;
RgSchUeCb *ue;
CmLListCp dlInactvLst; /* list of UE's becoming DL-inactive */
RgSchCmnCell *cellSch = RG_SCH_CMN_GET_CELL(cell);
- U8 cellIdx;
- U32 dlInactvMask;
-
- TRC2(rgSCHDrxTtiHdlDlHarqRTT);
+ uint8_t cellIdx;
+ uint32_t dlInactvMask;
drxCell = cell->drxCb;
delInUlScan = drxCell->delInUlScan;
drxCell = cell->drxCb;
delInUlScan = drxCell->delInUlScan;
@@
-3030,7
+2673,7
@@
U16 dlIndex;
}
else
{
}
else
{
-
RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId,"
CRNTI:%d "
+
DU_LOG("\nERROR --> SCH :
CRNTI:%d "
"Adding Retx Node to expire at RetxIndx: %d at dlIndex %d "
"drxHq->reTxIndx %d", ue->ueId, reTxExpIndx, dlIndex,
drxHq->reTxIndx);
"Adding Retx Node to expire at RetxIndx: %d at dlIndex %d "
"drxHq->reTxIndx %d", ue->ueId, reTxExpIndx, dlIndex,
drxHq->reTxIndx);
@@
-3094,7
+2737,7
@@
U16 dlIndex;
/*Call schedulers to inactivate ue*/
cellSch->apisDl->rgSCHDlInactvtUes(cell, &dlInactvLst);
/*Call schedulers to inactivate ue*/
cellSch->apisDl->rgSCHDlInactvtUes(cell, &dlInactvLst);
-
RETVOID
;
+
return
;
}
/** @brief This function handles the Ul HARQ timer's processing per TTI.
}
/** @brief This function handles the Ul HARQ timer's processing per TTI.
@@
-3119,37
+2762,25
@@
U16 dlIndex;
*
*
* @param RgSchCellCb *cellCb
*
*
* @param RgSchCellCb *cellCb
- * @param
U16
ulIndex
+ * @param
uint16_t
ulIndex
* @return Void
*/
* @return Void
*/
-#ifdef ANSI
-PRIVATE Void rgSCHDrxTtiHdlUlHarqRTT
-(
-RgSchCellCb *cell,
-U16 ulIndex
-)
-#else /* ANSI */
-PRIVATE Void rgSCHDrxTtiHdlUlHarqRTT(cell, ulIndex)
-RgSchCellCb *cell;
-U16 ulIndex;
-#endif /* ANSI */
+static Void rgSCHDrxTtiHdlUlHarqRTT(RgSchCellCb *cell,uint16_t ulIndex)
{
CmLList *node;
RgSchDrxDlHqProcCb *drxHq;
RgSchDlHqProcCb *dlHq;
RgSchDRXCellCb *drxCell;
RgSchDrxUeCb *drxUe;
{
CmLList *node;
RgSchDrxDlHqProcCb *drxHq;
RgSchDlHqProcCb *dlHq;
RgSchDRXCellCb *drxCell;
RgSchDrxUeCb *drxUe;
- Bool delInUlScan;
- RgSchUeCb *ue;
- CmLListCp ulInactvLst; /* list of UE's becoming DL-inactive */
- RgSchCmnCell *cellSch = RG_SCH_CMN_GET_CELL(cell);
-
U8
cellIdx;
-
U32
ulInactvMask;
+ Bool
delInUlScan;
+ RgSchUeCb
*ue;
+ CmLListCp
ulInactvLst; /* list of UE's becoming DL-inactive */
+ RgSchCmnCell
*cellSch = RG_SCH_CMN_GET_CELL(cell);
+
uint8_t
cellIdx;
+
uint32_t
ulInactvMask;
- TRC2(rgSCHDrxTtiHdlUlHarqRTT);
-
drxCell = cell->drxCb;
delInUlScan = drxCell->delInUlScan;
drxCell = cell->drxCb;
delInUlScan = drxCell->delInUlScan;
@@
-3239,7
+2870,7
@@
U16 ulIndex;
}
cellSch->apisUl->rgSCHUlInactvtUes(cell, &ulInactvLst);
}
cellSch->apisUl->rgSCHUlInactvtUes(cell, &ulInactvLst);
-
RETVOID
;
+
return
;
}
}