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
[JIRA ID - ODUHIGH-275] Part -2 classifying of logs of sch folder
[o-du/l2.git]
/
src
/
5gnrsch
/
rg_sch_lmm.c
diff --git
a/src/5gnrsch/rg_sch_lmm.c
b/src/5gnrsch/rg_sch_lmm.c
index
9903a9f
..
b5afd68
100755
(executable)
--- a/
src/5gnrsch/rg_sch_lmm.c
+++ b/
src/5gnrsch/rg_sch_lmm.c
@@
-34,9
+34,6
@@
request primitives are defined here.
*/
request primitives are defined here.
*/
-static const char* RLOG_MODULE_NAME="MAC";
-static int RLOG_MODULE_ID=4096;
-static int RLOG_FILE_ID=167;
/* header include files (.h) */
#include "common_def.h"
/* header include files (.h) */
#include "common_def.h"
@@
-70,22
+67,22
@@
Void rgSCHCmnInit ARGS((Void));
/* forward references */
extern int schActvInit(Ent entity, Inst instId, Region region, Reason reason);
#ifdef UNUSE_FUN
/* forward references */
extern int schActvInit(Ent entity, Inst instId, Region region, Reason reason);
#ifdef UNUSE_FUN
-
PRIVATE U16
rgSCHLmmSapCfg ARGS((
+
static uint16_t
rgSCHLmmSapCfg ARGS((
Inst inst,
RgCfg *cfg,
Inst inst,
RgCfg *cfg,
-
U8
sapIdx,
+
uint8_t
sapIdx,
Elmnt sapType
));
#endif
Elmnt sapType
));
#endif
-
PRIVATE
Void rgSCHLmmShutdown ARGS((
+
static
Void rgSCHLmmShutdown ARGS((
Inst inst
));
void printSchCellInfo(void)
{
Inst inst
));
void printSchCellInfo(void)
{
-
U8
idx=0;
-
U8
inst=0;
+
uint8_t
idx=0;
+
uint8_t
inst=0;
for (idx = 0; idx < rgSchCb[inst].numSaps; idx++)
{
/* Unbind all the TFU SAP */
for (idx = 0; idx < rgSchCb[inst].numSaps; idx++)
{
/* Unbind all the TFU SAP */
@@
-93,8
+90,8
@@
void printSchCellInfo(void)
* with this SAP */
if (rgSchCb[inst].tfuSap[idx].cell != NULLP)
{
* with this SAP */
if (rgSchCb[inst].tfuSap[idx].cell != NULLP)
{
-
RLOG1(L_INFO,"
CELL %d\n", idx);
-
RLOG1(L_INFO,"
NUM UEs :%d\n",rgSchCb[inst].tfuSap[idx].cell->ueLst.nmbEnt);
+
DU_LOG("\nINFO --> SCH :
CELL %d\n", idx);
+
DU_LOG("\nINFO --> SCH :
NUM UEs :%d\n",rgSchCb[inst].tfuSap[idx].cell->ueLst.nmbEnt);
}
}
}
}
}
}
@@
-112,35
+109,25
@@
void printSchCellInfo(void)
* reason for success/failure of this function.
*
* @param[in] RgCfg *cfg, the Configuaration information
* reason for success/failure of this function.
*
* @param[in] RgCfg *cfg, the Configuaration information
- * @return
U16
+ * @return
uint16_t
* -# LCM_REASON_GENCFG_NOT_DONE
* -# LCM_REASON_INVALID_SAP
* -# LCM_REASON_NOT_APPL
**/
#ifdef UNUSE_FUN
* -# LCM_REASON_GENCFG_NOT_DONE
* -# LCM_REASON_INVALID_SAP
* -# LCM_REASON_NOT_APPL
**/
#ifdef UNUSE_FUN
-#ifdef ANSI
-PRIVATE U16 rgSCHLmmSapCfg
+static uint16_t rgSCHLmmSapCfg
(
Inst dInst,
RgCfg *cfg, /* Configuaration information */
(
Inst dInst,
RgCfg *cfg, /* Configuaration information */
-
U8
sapIdx, /* SAP index */
+
uint8_t
sapIdx, /* SAP index */
Elmnt sapType /* SAP Type */
)
Elmnt sapType /* SAP Type */
)
-#else
-PRIVATE U16 rgSCHLmmSapCfg(dInst, cfg, sapIdx, sapType)
-Inst dInst;
-RgCfg *cfg; /* Configuaration information */
-U8 sapIdx; /* SAP index */
-Elmnt sapType; /* SAP Type */
-#endif
{
{
-
U16
ret = LCM_REASON_NOT_APPL;
+
uint16_t
ret = LCM_REASON_NOT_APPL;
RgSchLowSapCfgInfo *lowSapCfg = NULLP;
RgSchUpSapCfgInfo *upSapCfg = NULLP;
Inst inst = (dInst - SCH_INST_START);
RgSchLowSapCfgInfo *lowSapCfg = NULLP;
RgSchUpSapCfgInfo *upSapCfg = NULLP;
Inst inst = (dInst - SCH_INST_START);
- TRC2(rgSCHLmmSapCfg)
-
/* Check if Gen Config has been done */
switch(sapType)
/* Check if Gen Config has been done */
switch(sapType)
@@
-151,7
+138,7
@@
Elmnt sapType; /* SAP Type */
(cfg->s.schInstCfg.rgrSap[sapIdx].selector != ODU_SELECTOR_LC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
(cfg->s.schInstCfg.rgrSap[sapIdx].selector != ODU_SELECTOR_LC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmSapCfg(): unsupported"
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmSapCfg(): unsupported"
" Selector value for RGR.");
break;
}
" Selector value for RGR.");
break;
}
@@
-185,7
+172,7
@@
Elmnt sapType; /* SAP Type */
(cfg->s.schInstCfg.tfuSap[sapIdx].selector != ODU_SELECTOR_LC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
(cfg->s.schInstCfg.tfuSap[sapIdx].selector != ODU_SELECTOR_LC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmSapCfg(): unsupported"
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmSapCfg(): unsupported"
" Selector value for TFU.");
break;
}
" Selector value for TFU.");
break;
}
@@
-214,8
+201,8
@@
Elmnt sapType; /* SAP Type */
lowSapCfg->sapPst.prior = cfg->s.schInstCfg.tfuSap[sapIdx].prior;
lowSapCfg->suId = cfg->s.schInstCfg.tfuSap[sapIdx].suId;
lowSapCfg->spId = cfg->s.schInstCfg.tfuSap[sapIdx].spId;
lowSapCfg->sapPst.prior = cfg->s.schInstCfg.tfuSap[sapIdx].prior;
lowSapCfg->suId = cfg->s.schInstCfg.tfuSap[sapIdx].suId;
lowSapCfg->spId = cfg->s.schInstCfg.tfuSap[sapIdx].spId;
-
cmMemcpy((U8 *)
&lowSapCfg->bndTmr,
-
(U8 *)
&cfg->s.schInstCfg.tfuSap[sapIdx].bndTmr,
+
memcpy(
&lowSapCfg->bndTmr,
+ &cfg->s.schInstCfg.tfuSap[sapIdx].bndTmr,
sizeof(TmrCfg));
break;
case STRGMSAP:
sizeof(TmrCfg));
break;
case STRGMSAP:
@@
-225,7
+212,7
@@
Elmnt sapType; /* SAP Type */
(cfg->s.schInstCfg.rgmSap[sapIdx].selector != RGM_SEL_TC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
(cfg->s.schInstCfg.rgmSap[sapIdx].selector != RGM_SEL_TC))
{
ret = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmSapCfg(): unsupported"
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmSapCfg(): unsupported"
" Selector value for RGM.");
break;
}
" Selector value for RGM.");
break;
}
@@
-277,30
+264,20
@@
Elmnt sapType; /* SAP Type */
* File : rg_sch_lmm.c
*
**********************************************************/
* File : rg_sch_lmm.c
*
**********************************************************/
-#ifdef ANSI
-PRIVATE Void rgSCHLmmShutdown
-(
-Inst inst
-)
-#else
-PRIVATE Void rgSCHLmmShutdown(inst)
-Inst inst;
-#endif
+static Void rgSCHLmmShutdown(Inst inst)
{
Inst dInst = inst + SCH_INST_START;
{
Inst dInst = inst + SCH_INST_START;
-
U8
idx;
+
uint8_t
idx;
#ifdef LTE_L2_MEAS
CmLList *lnk = NULLP;
RgSchCb *instCb = &rgSchCb[inst];
RgSchCellCb *cell = NULLP;
RgSchL2MeasCb *measCb;
#ifdef LTE_L2_MEAS
CmLList *lnk = NULLP;
RgSchCb *instCb = &rgSchCb[inst];
RgSchCellCb *cell = NULLP;
RgSchL2MeasCb *measCb;
-
U8
ulAllocIdx;
+
uint8_t
ulAllocIdx;
RgSchCmnUlCell *cellUl;
RgSchClcBoRpt *bo = NULL;
#endif
RgSchCmnUlCell *cellUl;
RgSchClcBoRpt *bo = NULL;
#endif
- TRC2(rgSCHLmmShutdown)
-
#ifdef LTE_L2_MEAS
for (idx = 0; idx < instCb->numSaps; idx++)
{
#ifdef LTE_L2_MEAS
for (idx = 0; idx < instCb->numSaps; idx++)
{
@@
-363,7
+340,7
@@
Inst inst;
/* Unbind all the TFU SAP */
if(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_WAIT_BNDCFM)
{
/* Unbind all the TFU SAP */
if(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_WAIT_BNDCFM)
{
- rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND);
+
//
rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND);
if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE)
{
rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR, (PTR)&rgSchCb[inst].tfuSap[idx]);
if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE)
{
rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR, (PTR)&rgSchCb[inst].tfuSap[idx]);
@@
-372,7
+349,7
@@
Inst inst;
}
if(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_BND)
{
}
if(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_BND)
{
- rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND);
+
//
rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg, LRG_UNBND);
rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_UNBND;
}
/* Free the memory held by the cell associated with this SAP */
rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_UNBND;
}
/* Free the memory held by the cell associated with this SAP */
@@
-419,7
+396,7
@@
Inst inst;
/* Set Config done in TskInit */
rgSchCb[inst].rgSchInit.cfgDone = FALSE;
/* Set Config done in TskInit */
rgSchCb[inst].rgSchInit.cfgDone = FALSE;
-
RETVOID
;
+
return
;
}
\f
}
\f
@@
-438,22
+415,9
@@
Inst inst;
* File : rg_sch_lmm.c
*
**********************************************************/
* File : rg_sch_lmm.c
*
**********************************************************/
-#ifdef ANSI
-Void rgSCHLmmGenCntrl
-(
-RgMngmt *cntrl,
-RgMngmt *cfm,
-Pst *cfmPst
-)
-#else
-Void rgSCHLmmGenCntrl(cntrl, cfm, cfmPst)
-RgMngmt *cntrl;
-RgMngmt *cfm;
-Pst *cfmPst;
-#endif
+Void rgSCHLmmGenCntrl(RgMngmt *cntrl,RgMngmt *cfm,Pst *cfmPst)
{
Inst inst = (cfmPst->srcInst - SCH_INST_START); /* Scheduler instance ID */
{
Inst inst = (cfmPst->srcInst - SCH_INST_START); /* Scheduler instance ID */
- TRC2(rgSCHLmmGenCntrl)
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
@@
-469,8
+433,8
@@
Pst *cfmPst;
/* Enable Unsolicited Status (alarms) */
rgSchCb[inst].rgSchInit.usta = TRUE;
/*Store the response and TransId for sending the Alarms */
/* Enable Unsolicited Status (alarms) */
rgSchCb[inst].rgSchInit.usta = TRUE;
/*Store the response and TransId for sending the Alarms */
-
cmMemcpy((U8 *)
&rgSchCb[inst].genCfg.ustaResp.response,
-
(U8 *)
&cntrl->hdr.response, sizeof(Resp));
+
memcpy(
&rgSchCb[inst].genCfg.ustaResp.response,
+ &cntrl->hdr.response, sizeof(Resp));
rgSchCb[inst].genCfg.ustaResp.transId = cntrl->hdr.transId;
break;
case SADBG:
rgSchCb[inst].genCfg.ustaResp.transId = cntrl->hdr.transId;
break;
case SADBG:
@@
-498,8
+462,8
@@
Pst *cfmPst;
* L2
* statistics
* */
* L2
* statistics
* */
-
cmMemset((U8 *)
&hqRetxStats, 0, sizeof(RgSchHqRetxStats));
-
cmMemset((U8 *)
&hqFailStats, 0, sizeof(RgSchNackAckStats));
+
memset(
&hqRetxStats, 0, sizeof(RgSchHqRetxStats));
+
memset(
&hqFailStats, 0, sizeof(RgSchNackAckStats));
#endif
break;
}
#endif
break;
}
@@
-507,7
+471,7
@@
Pst *cfmPst;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmGenCntrl(): "
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmGenCntrl(): "
"invalid subaction=%d", cntrl->t.cntrl.subAction);
break;
}
"invalid subaction=%d", cntrl->t.cntrl.subAction);
break;
}
@@
-531,7
+495,7
@@
Pst *cfmPst;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmGenCntrl():"
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmGenCntrl():"
" invalid subaction=%d", cntrl->t.cntrl.subAction);
break;
}
" invalid subaction=%d", cntrl->t.cntrl.subAction);
break;
}
@@
-543,12
+507,12
@@
Pst *cfmPst;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmGenCntrl(): invalid"
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmGenCntrl(): invalid"
" action=%d", cntrl->t.cntrl.action);
break;
}
RgMiLrgSchCntrlCfm(cfmPst, cfm);
" action=%d", cntrl->t.cntrl.action);
break;
}
RgMiLrgSchCntrlCfm(cfmPst, cfm);
-
RETVOID
;
+
return
;
}
\f
}
\f
@@
-567,31
+531,23
@@
Pst *cfmPst;
* File : rg_sch_lmm.c
*
**********************************************************/
* File : rg_sch_lmm.c
*
**********************************************************/
-#ifdef ANSI
Void rgSCHLmmSapCntrl
(
RgMngmt *cntrl,
RgMngmt *cfm,
Pst *cfmPst
)
Void rgSCHLmmSapCntrl
(
RgMngmt *cntrl,
RgMngmt *cfm,
Pst *cfmPst
)
-#else
-Void rgSCHLmmSapCntrl(cntrl, cfm, cfmPst)
-RgMngmt *cntrl;
-RgMngmt *cfm;
-Pst *cfmPst;
-#endif
{
{
-
U8
idx;
+
uint8_t
idx;
/* TODO Pass InstId instead of using InstId from cfmPst */
Inst inst = (cfmPst->srcInst - SCH_INST_START); /* Scheduler instance Id */
/* TODO Pass InstId instead of using InstId from cfmPst */
Inst inst = (cfmPst->srcInst - SCH_INST_START); /* Scheduler instance Id */
- TRC2(rgSCHLmmSapCntrl)
/* Only TFU SAP can be controlled by LM */
switch(cntrl->hdr.elmId.elmnt)
{
case STTFUSAP:
/* Only TFU SAP can be controlled by LM */
switch(cntrl->hdr.elmId.elmnt)
{
case STTFUSAP:
- idx = (
U8
)cntrl->t.cntrl.s.rgSapCntrl.suId;
+ idx = (
uint8_t
)cntrl->t.cntrl.s.rgSapCntrl.suId;
if (idx > LRG_MAX_SAPS_PER_INST)
{
cfm->cfm.status = LCM_PRIM_NOK;
if (idx > LRG_MAX_SAPS_PER_INST)
{
cfm->cfm.status = LCM_PRIM_NOK;
@@
-620,8
+576,8
@@
Pst *cfmPst;
rgSchCb[inst].tfuSap[idx].numBndRetries++;
/* Store the response and TransId for sending
* the Control confirm */
rgSchCb[inst].tfuSap[idx].numBndRetries++;
/* Store the response and TransId for sending
* the Control confirm */
-
cmMemcpy((U8 *)
&rgSchCb[inst].genCfg.bndCfmResp[idx].response,
-
(U8 *)
&cntrl->hdr.response, sizeof(Resp));
+
memcpy(
&rgSchCb[inst].genCfg.bndCfmResp[idx].response,
+ &cntrl->hdr.response, sizeof(Resp));
rgSchCb[inst].genCfg.bndCfmResp[idx].transId =
cntrl->hdr.transId;
rgSchCb[inst].genCfg.bndCfmResp[idx].transId =
cntrl->hdr.transId;
@@
-632,9
+588,9
@@
Pst *cfmPst;
* Request to TFU */
RgMiLrgSchCntrlCfm(cfmPst, cfm);
* Request to TFU */
RgMiLrgSchCntrlCfm(cfmPst, cfm);
- rgSCHUtlTfuBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg.suId,
- rgSchCb[inst].tfuSap[idx].sapCfg.spId);
-
RETVOID
;
+
//
rgSCHUtlTfuBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg.suId,
+
//
rgSchCb[inst].tfuSap[idx].sapCfg.spId);
+
return
;
}
break;
case AUBND:
}
break;
case AUBND:
@@
-649,8
+605,8
@@
Pst *cfmPst;
}
else
{
}
else
{
- rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg,
- TFU_UBNDREQ_MNGMT);
+
//
rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg,
+
//
TFU_UBNDREQ_MNGMT);
if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE)
{
rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR,
if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE)
{
rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR,
@@
-667,15
+623,15
@@
Pst *cfmPst;
if ((rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_WAIT_BNDCFM) ||
(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_BND))
{
if ((rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_WAIT_BNDCFM) ||
(rgSchCb[inst].tfuSap[idx].sapSta.sapState == LRG_BND))
{
- rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg,
- TFU_UBNDREQ_MNGMT);
+
//
rgSCHUtlTfuUBndReq(inst, rgSchCb[inst].tfuSap[idx].sapCfg,
+
//
TFU_UBNDREQ_MNGMT);
if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE)
{
rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR,
(PTR)&rgSchCb[inst].tfuSap[idx]);
}
}
if (rgSchCb[inst].tfuSap[idx].sapCfg.bndTmr.enb == TRUE)
{
rgSCHLmmStopTmr(inst, RGSCH_BNDREQ_TMR,
(PTR)&rgSchCb[inst].tfuSap[idx]);
}
}
-
cmMemset((U8 *)
&rgSchCb[inst].tfuSap[idx], 0, sizeof(RgSchLowSapCb));
+
memset(
&rgSchCb[inst].tfuSap[idx], 0, sizeof(RgSchLowSapCb));
rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_NOT_CFG;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_NOT_CFG;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
@@
-683,13
+639,13
@@
Pst *cfmPst;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmSapCntrl(): "
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmSapCntrl(): "
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
break;
case STRGRSAP:
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
break;
case STRGRSAP:
- idx = (
U8
)cntrl->t.cntrl.s.rgSapCntrl.spId;
+ idx = (
uint8_t
)cntrl->t.cntrl.s.rgSapCntrl.spId;
if (idx > LRG_MAX_SAPS_PER_INST)
{
cfm->cfm.status = LCM_PRIM_NOK;
if (idx > LRG_MAX_SAPS_PER_INST)
{
cfm->cfm.status = LCM_PRIM_NOK;
@@
-698,7
+654,7
@@
Pst *cfmPst;
switch(cntrl->t.cntrl.action)
{
case ADEL:
switch(cntrl->t.cntrl.action)
{
case ADEL:
-
cmMemset((U8 *)
&rgSchCb[inst].rgrSap[idx], 0, sizeof(RgSchUpSapCb));
+
memset(
&rgSchCb[inst].rgrSap[idx], 0, sizeof(RgSchUpSapCb));
rgSchCb[inst].rgrSap[idx].sapSta.sapState = LRG_NOT_CFG;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
rgSchCb[inst].rgrSap[idx].sapSta.sapState = LRG_NOT_CFG;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
@@
-706,13
+662,13
@@
Pst *cfmPst;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmSapCntrl(): "
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmSapCntrl(): "
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
break;
case STRGMSAP:
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
break;
case STRGMSAP:
- idx = (
U8
)cntrl->t.cntrl.s.rgSapCntrl.spId;
+ idx = (
uint8_t
)cntrl->t.cntrl.s.rgSapCntrl.spId;
if (idx > LRG_MAX_SAPS_PER_INST)
{
cfm->cfm.status = LCM_PRIM_NOK;
if (idx > LRG_MAX_SAPS_PER_INST)
{
cfm->cfm.status = LCM_PRIM_NOK;
@@
-721,7
+677,7
@@
Pst *cfmPst;
switch(cntrl->t.cntrl.action)
{
case ADEL:
switch(cntrl->t.cntrl.action)
{
case ADEL:
-
cmMemset((U8 *)
&rgSchCb[inst].rgmSap[idx], 0, sizeof(RgSchUpSapCb));
+
memset(
&rgSchCb[inst].rgmSap[idx], 0, sizeof(RgSchUpSapCb));
rgSchCb[inst].rgmSap[idx].sapSta.sapState = LRG_NOT_CFG;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
rgSchCb[inst].rgmSap[idx].sapSta.sapState = LRG_NOT_CFG;
cfm->cfm.status = LCM_PRIM_OK;
cfm->cfm.reason = LCM_REASON_NOT_APPL;
@@
-729,7
+685,7
@@
Pst *cfmPst;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
default:
cfm->cfm.status = LCM_PRIM_NOK;
cfm->cfm.reason = LCM_REASON_INVALID_PAR_VAL;
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmSapCntrl(): "
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmSapCntrl(): "
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
"invalid action=%d", cntrl->t.cntrl.action);
break;
}
@@
-737,10
+693,10
@@
Pst *cfmPst;
default:
/* Would never come here. */
default:
/* Would never come here. */
-
RETVOID
;
+
return
;
}
RgMiLrgSchCntrlCfm(cfmPst, cfm);
}
RgMiLrgSchCntrlCfm(cfmPst, cfm);
-
RETVOID
;
+
return
;
}
\f
}
\f
@@
-760,24
+716,15
@@
Pst *cfmPst;
* File : rg_sch_lmm.c
*
**********************************************************/
* File : rg_sch_lmm.c
*
**********************************************************/
-#ifdef ANSI
Void SchFillCfmPst
(
Pst *reqPst,
Pst *cfmPst,
RgMngmt *cfm
)
Void SchFillCfmPst
(
Pst *reqPst,
Pst *cfmPst,
RgMngmt *cfm
)
-#else
-Void SchFillCfmPst(reqPst, cfmPst, cfm)
-Pst *reqPst;
-Pst *cfmPst;
-RgMngmt *cfm;
-#endif
{
Inst inst;
{
Inst inst;
- TRC2(SchFillCfmPst)
-
inst = (reqPst->dstInst - SCH_INST_START);
cfmPst->srcEnt = ENTMAC;
inst = (reqPst->dstInst - SCH_INST_START);
cfmPst->srcEnt = ENTMAC;
@@
-791,7
+738,7
@@
RgMngmt *cfm;
cfmPst->region = cfm->hdr.response.mem.region;
cfmPst->pool = cfm->hdr.response.mem.pool;
cfmPst->region = cfm->hdr.response.mem.region;
cfmPst->pool = cfm->hdr.response.mem.pool;
-
RETVOID
;
+
return
;
}
\f
}
\f
@@
-808,36
+755,26
@@
RgMngmt *cfm;
* code based on "tmrEvnt".
*
* @param[in] S16 tmrEvnt, the Timer Event
* code based on "tmrEvnt".
*
* @param[in] S16 tmrEvnt, the Timer Event
- * @param[in]
U32
tmrVal, the Wait Time
+ * @param[in]
uint32_t
tmrVal, the Wait Time
* @param[in] PTR cb, Entry for which Timer expired
* @return S16
* -# ROK
**/
* @param[in] PTR cb, Entry for which Timer expired
* @return S16
* -# ROK
**/
-#ifdef ANSI
S16 rgSCHLmmStartTmr
(
S16 rgSCHLmmStartTmr
(
-Inst
inst,
-S16
tmrEvnt, /* Timer Event */
-
U32
tmrVal, /* Wait Time */
-PTR
cb /* Entry for which Timer Expired */
+Inst inst,
+S16 tmrEvnt, /* Timer Event */
+
uint32_t
tmrVal, /* Wait Time */
+PTR cb /* Entry for which Timer Expired */
)
)
-#else
-S16 rgSCHLmmStartTmr(inst, tmrEvnt, tmrVal, cb)
-Inst inst; /* scheduler instance ID */
-S16 tmrEvnt; /* Timer Event */
-U32 tmrVal; /* Wait Time */
-PTR cb; /* Entry for which Timer Expired */
-#endif
{
CmTmrArg arg;
/* Inst dInst = inst + SCH_INST_START; */
{
CmTmrArg arg;
/* Inst dInst = inst + SCH_INST_START; */
- TRC2(rgSCHLmmStartTmr)
-
UNUSED(tmrEvnt);
/* Initialize the arg structure */
UNUSED(tmrEvnt);
/* Initialize the arg structure */
-
cmMemset((U8 *)
&arg, 0, sizeof(CmTmrArg));
+
memset(
&arg, 0, sizeof(CmTmrArg));
arg.tqCp = &rgSchCb[inst].tmrTqCp;
arg.tq = rgSchCb[inst].tmrTq;
arg.tqCp = &rgSchCb[inst].tmrTqCp;
arg.tq = rgSchCb[inst].tmrTq;
@@
-872,26
+809,17
@@
PTR cb; /* Entry for which Timer Expired */
* -# ROK
* -# RFAILED
**/
* -# ROK
* -# RFAILED
**/
-#ifdef ANSI
S16 rgSCHLmmStopTmr
(
S16 rgSCHLmmStopTmr
(
-Inst
inst, /* Scheduler instance */
-S16
tmrEvnt, /* Timer Event */
-PTR
cb /* Entry for which Timer Expired */
+Inst inst, /* Scheduler instance */
+S16 tmrEvnt, /* Timer Event */
+PTR cb /* Entry for which Timer Expired */
)
)
-#else
-S16 rgSCHLmmStopTmr(inst, tmrEvnt, cb)
-Inst inst; /* Scheduler instance */
-S16 tmrEvnt; /* Timer Event */
-PTR cb; /* Entry for which Timer Expired */
-#endif
{
CmTmrArg arg;
{
CmTmrArg arg;
-
U8
i;
+
uint8_t
i;
S16 ret;
S16 ret;
- TRC2(rgSCHLmmStopTmr)
-
ret = RFAILED;
for(i=0;i<RGSCH_MAX_TIMER;i++)
ret = RFAILED;
for(i=0;i<RGSCH_MAX_TIMER;i++)
@@
-900,7
+828,7
@@
PTR cb; /* Entry for which Timer Expired */
if(((RgSchLowSapCb *)cb)->tmrBlk.tmrEvnt == tmrEvnt)
{
/* Initialize the arg structure */
if(((RgSchLowSapCb *)cb)->tmrBlk.tmrEvnt == tmrEvnt)
{
/* Initialize the arg structure */
-
cmMemset((U8 *)
&arg, 0, sizeof(CmTmrArg));
+
memset(
&arg, 0, sizeof(CmTmrArg));
arg.tqCp = &rgSchCb[inst].tmrTqCp;
arg.tq = rgSchCb[inst].tmrTq;
arg.tqCp = &rgSchCb[inst].tmrTqCp;
arg.tq = rgSchCb[inst].tmrTq;
@@
-938,24
+866,14
@@
PTR cb; /* Entry for which Timer Expired */
* @return S16
* -# ROK
**/
* @return S16
* -# ROK
**/
-#ifdef ANSI
S16 rgSCHLmmTmrExpiry
(
PTR cb, /* Pointer to timer control block */
S16 tmrEvnt /* Timer Event */
)
S16 rgSCHLmmTmrExpiry
(
PTR cb, /* Pointer to timer control block */
S16 tmrEvnt /* Timer Event */
)
-#else
-S16 rgSCHLmmTmrExpiry(cb,tmrEvnt)
-PTR cb; /* Pointer to timer control block */
-S16 tmrEvnt; /* Timer Event */
-#endif
{
S16 ret = ROK;
RgSchLowSapCb *tfuSap = (RgSchLowSapCb *)cb;
{
S16 ret = ROK;
RgSchLowSapCb *tfuSap = (RgSchLowSapCb *)cb;
-#ifdef DEBUGP
- Inst inst = tfuSap->cell->instIdx;
-#endif
- TRC2(rgSCHLmmTmrExpiry)
switch(tmrEvnt)
switch(tmrEvnt)
@@
-964,27
+882,27
@@
S16 tmrEvnt; /* Timer Event */
tfuSap->numBndRetries++;
if(tfuSap->numBndRetries > RGSCH_MAX_BNDRETRY)
{
tfuSap->numBndRetries++;
if(tfuSap->numBndRetries > RGSCH_MAX_BNDRETRY)
{
- rgSCHLmmStaInd((
U8
)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
- (
U16)LCM_CATEGORY_INTERFACE, (U16
)LCM_EVENT_BND_FAIL,
- (
U16
)LCM_CAUSE_TMR_EXPIRED, (RgUstaDgn *)NULLP);
+ rgSCHLmmStaInd((
uint8_t
)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
+ (
uint16_t)LCM_CATEGORY_INTERFACE, (uint16_t
)LCM_EVENT_BND_FAIL,
+ (
uint16_t
)LCM_CAUSE_TMR_EXPIRED, (RgUstaDgn *)NULLP);
}
else
{
/* Restart the bind timer */
if (tfuSap->sapCfg.bndTmr.enb == TRUE)
{
}
else
{
/* Restart the bind timer */
if (tfuSap->sapCfg.bndTmr.enb == TRUE)
{
- ret = rgSCHLmmStartTmr((
U8
)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
+ ret = rgSCHLmmStartTmr((
uint8_t
)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
RGSCH_BNDREQ_TMR,
RGSCH_BNDREQ_TMR,
- (
U32
)tfuSap->sapCfg.bndTmr.val, cb);
+ (
uint32_t
)tfuSap->sapCfg.bndTmr.val, cb);
}
/* Send bind request */
}
/* Send bind request */
-
rgSCHUtlTfuBndReq((U8
)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
- tfuSap->sapCfg.suId, tfuSap->sapCfg.spId);
+
//rgSCHUtlTfuBndReq((uint8_t
)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
+
//
tfuSap->sapCfg.suId, tfuSap->sapCfg.spId);
}
break;
default:
}
break;
default:
-
RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "
rgSCHLmmTmrExpiry(): Invalid"
+
DU_LOG("\nERROR --> SCH :
rgSCHLmmTmrExpiry(): Invalid"
" tmrEvnt=%d", tmrEvnt);
ret = RFAILED;
break;
" tmrEvnt=%d", tmrEvnt);
ret = RFAILED;
break;
@@
-1009,31
+927,22
@@
S16 tmrEvnt; /* Timer Event */
*
* @param[in] Pst *pst, Post Structure
* @param[in] SuId suId, Service user ID
*
* @param[in] Pst *pst, Post Structure
* @param[in] SuId suId, Service user ID
- * @param[in]
U8
status, Status
+ * @param[in]
uint8_t
status, Status
* @return S16
* -# ROK
**/
* @return S16
* -# ROK
**/
-#ifdef ANSI
S16 rgSCHLmmBndCfm
(
Pst *pst, /* Post Structure */
SuId suId, /* Service user ID */
S16 rgSCHLmmBndCfm
(
Pst *pst, /* Post Structure */
SuId suId, /* Service user ID */
-
U8
status /* Status */
+
uint8_t
status /* Status */
)
)
-#else
-S16 rgSCHLmmBndCfm(pst,suId,status)
-Pst *pst; /* Post Structure */
-SuId suId; /* Service user Id */
-U8 status; /* Status */
-#endif
{
S16 ret = ROK;
RgMngmt cntrlCfm;
Pst cfmPst;
Inst inst = (pst->dstInst - SCH_INST_START); /* scheduler instance */
{
S16 ret = ROK;
RgMngmt cntrlCfm;
Pst cfmPst;
Inst inst = (pst->dstInst - SCH_INST_START); /* scheduler instance */
- TRC2(rgSCHLmmBndCfm)
-
/* check the SAP State */
switch(rgSchCb[inst].tfuSap[suId].sapSta.sapState)
/* check the SAP State */
switch(rgSchCb[inst].tfuSap[suId].sapSta.sapState)
@@
-1054,7
+963,7
@@
U8 status; /* Status */
cfmPst.region = rgSchCb[inst].genCfg.bndCfmResp[suId].response.mem.region;
cfmPst.pool = rgSchCb[inst].genCfg.bndCfmResp[suId].response.mem.pool;
cfmPst.region = rgSchCb[inst].genCfg.bndCfmResp[suId].response.mem.region;
cfmPst.pool = rgSchCb[inst].genCfg.bndCfmResp[suId].response.mem.pool;
-
cmMemset((U8 *)
&cntrlCfm, 0, sizeof(RgMngmt));
+
memset(
&cntrlCfm, 0, sizeof(RgMngmt));
switch(status)
{
switch(status)
{
@@
-1069,7
+978,7
@@
U8 status; /* Status */
cntrlCfm.cfm.status = LCM_PRIM_OK;
cntrlCfm.cfm.reason = LCM_REASON_NOT_APPL;
/* Sending Status Indication to Layer Manager */
cntrlCfm.cfm.status = LCM_PRIM_OK;
cntrlCfm.cfm.reason = LCM_REASON_NOT_APPL;
/* Sending Status Indication to Layer Manager */
- rgSCHLmmStaInd((
U8
)(rgSchCb[inst].tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
+ rgSCHLmmStaInd((
uint8_t
)(rgSchCb[inst].tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
LCM_CATEGORY_INTERFACE, LCM_EVENT_BND_OK,
LCM_CAUSE_LYR_SPECIFIC, (RgUstaDgn *)NULLP);
break;
LCM_CATEGORY_INTERFACE, LCM_EVENT_BND_OK,
LCM_CAUSE_LYR_SPECIFIC, (RgUstaDgn *)NULLP);
break;
@@
-1105,41
+1014,29
@@
U8 status; /* Status */
* This API is used by the other modules of MAC to send a unsolicited
* status indication to the Layer Manager.
*
* This API is used by the other modules of MAC to send a unsolicited
* status indication to the Layer Manager.
*
- * @param[in]
U16
category, the Alarm category
- * @param[in]
U16
event, the Alarm event
- * @param[in]
U16
cause, the cause of the Alarm
+ * @param[in]
uint16_t
category, the Alarm category
+ * @param[in]
uint16_t
event, the Alarm event
+ * @param[in]
uint16_t
cause, the cause of the Alarm
* @param[in] RgUstaDgn *dgn, Alarm Diagonostics
* @return S16
* -# ROK
**/
* @param[in] RgUstaDgn *dgn, Alarm Diagonostics
* @return S16
* -# ROK
**/
-#ifdef ANSI
S16 rgSCHLmmStaInd
(
Inst inst,
S16 rgSCHLmmStaInd
(
Inst inst,
-
U16
category,
-
U16
event,
-
U16
cause,
+
uint16_t
category,
+
uint16_t
event,
+
uint16_t
cause,
RgUstaDgn *dgn
)
RgUstaDgn *dgn
)
-#else
-S16 rgSCHLmmStaInd(inst, category, event, cause, dgn)
-Inst inst;
-U16 category;
-U16 event;
-U16 cause;
-RgUstaDgn *dgn;
-#endif
{
RgMngmt usta;
{
RgMngmt usta;
- TRC2(rgSCHLmmStaInd)
-
if(rgSchCb[inst].rgSchInit.usta == FALSE)
{
return ROK;
}
if(rgSchCb[inst].rgSchInit.usta == FALSE)
{
return ROK;
}
-
- cmMemset((U8 *)&usta, 0, sizeof(RgMngmt));
+ memset(&usta, 0, sizeof(RgMngmt));
SGetDateTime(&usta.t.usta.cmAlarm.dt);
usta.t.usta.cmAlarm.category = category;
SGetDateTime(&usta.t.usta.cmAlarm.dt);
usta.t.usta.cmAlarm.category = category;
@@
-1147,7
+1044,7
@@
RgUstaDgn *dgn;
usta.t.usta.cmAlarm.cause = cause;
if (dgn != NULLP)
{
usta.t.usta.cmAlarm.cause = cause;
if (dgn != NULLP)
{
-
cmMemcpy((U8 *)&usta.t.usta.dgn, (U8 *)
dgn, sizeof(RgUstaDgn));
+
memcpy(&usta.t.usta.dgn,
dgn, sizeof(RgUstaDgn));
}
rgSchCb[inst].rgSchInit.lmPst.selector =
}
rgSchCb[inst].rgSchInit.lmPst.selector =
@@
-1182,20
+1079,9
@@
RgUstaDgn *dgn;
* @return S16
* -# ROK
**/
* @return S16
* -# ROK
**/
-#ifdef ANSI
-S16 schActvTmr
-(
-Ent ent,
-Inst inst
-)
-#else
-S16 schActvTmr(ent, inst)
-Ent ent;
-Inst inst;
-#endif
+S16 schActvTmr(Ent ent,Inst inst)
{
Inst schInst = (inst - SCH_INST_START);
{
Inst schInst = (inst - SCH_INST_START);
- TRC2(schActvTmr)
/* Check if any timer in the scheduler instance has expired */
cmPrcTmr(&rgSchCb[schInst].tmrTqCp,
/* Check if any timer in the scheduler instance has expired */
cmPrcTmr(&rgSchCb[schInst].tmrTqCp,