/* 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,
- U8 sapIdx,
+ uint8_t sapIdx,
Elmnt sapType
));
#endif
-PRIVATE Void rgSCHLmmShutdown ARGS((
+static Void rgSCHLmmShutdown ARGS((
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 */
* 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
-#ifdef ANSI
-PRIVATE U16 rgSCHLmmSapCfg
+static uint16_t rgSCHLmmSapCfg
(
Inst dInst,
RgCfg *cfg, /* Configuaration information */
-U8 sapIdx, /* SAP index */
+uint8_t sapIdx, /* SAP index */
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);
* 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;
- U8 idx;
+ uint8_t idx;
#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
/* 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].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 */
/* Set Config done in TskInit */
rgSchCb[inst].rgSchInit.cfgDone = FALSE;
- RETVOID;
+ return;
}
\f
* 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 */
break;
}
RgMiLrgSchCntrlCfm(cfmPst, cfm);
- RETVOID;
+ return;
}
\f
* File : rg_sch_lmm.c
*
**********************************************************/
-#ifdef ANSI
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 */
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;
* 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:
}
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].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,
}
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;
}
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;
default:
/* Would never come here. */
- RETVOID;
+ return;
}
RgMiLrgSchCntrlCfm(cfmPst, cfm);
- RETVOID;
+ return;
}
\f
* File : rg_sch_lmm.c
*
**********************************************************/
-#ifdef ANSI
Void SchFillCfmPst
(
Pst *reqPst,
Pst *cfmPst,
RgMngmt *cfm
)
-#else
-Void SchFillCfmPst(reqPst, cfmPst, cfm)
-Pst *reqPst;
-Pst *cfmPst;
-RgMngmt *cfm;
-#endif
{
Inst inst;
cfmPst->region = cfm->hdr.response.mem.region;
cfmPst->pool = cfm->hdr.response.mem.pool;
- RETVOID;
+ return;
}
\f
* 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
**/
-#ifdef ANSI
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; */
* -# ROK
* -# RFAILED
**/
-#ifdef ANSI
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;
- U8 i;
+ uint8_t i;
S16 ret;
ret = RFAILED;
* @return S16
* -# ROK
**/
-#ifdef ANSI
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;
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)
{
- ret = rgSCHLmmStartTmr((U8)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
+ ret = rgSCHLmmStartTmr((uint8_t)(tfuSap->sapCfg.sapPst.srcInst - SCH_INST_START),
RGSCH_BNDREQ_TMR,
- (U32)tfuSap->sapCfg.bndTmr.val, cb);
+ (uint32_t)tfuSap->sapCfg.bndTmr.val, cb);
}
/* 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:
*
* @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
**/
-#ifdef ANSI
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;
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;
* 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
**/
-#ifdef ANSI
S16 rgSCHLmmStaInd
(
Inst inst,
-U16 category,
-U16 event,
-U16 cause,
+uint16_t category,
+uint16_t event,
+uint16_t cause,
RgUstaDgn *dgn
)
-#else
-S16 rgSCHLmmStaInd(inst, category, event, cause, dgn)
-Inst inst;
-U16 category;
-U16 event;
-U16 cause;
-RgUstaDgn *dgn;
-#endif
{
RgMngmt usta;
{
return ROK;
}
-
memset(&usta, 0, sizeof(RgMngmt));
SGetDateTime(&usta.t.usta.cmAlarm.dt);
* @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);