当前位置: 首页>>代码示例>>C++>>正文


C++ os_timeStampMs函数代码示例

本文整理汇总了C++中os_timeStampMs函数的典型用法代码示例。如果您正苦于以下问题:C++ os_timeStampMs函数的具体用法?C++ os_timeStampMs怎么用?C++ os_timeStampMs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了os_timeStampMs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: idle_to_selfWait

/***********************************************************************
 *                        idle_to_selfWait
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS idle_to_selfWait (void *pData)
{
	conn_t    *pConn = (conn_t *)pData;
    TI_UINT16  randomTime;

    siteMgr_join (pConn->hSiteMgr);

    /* get a randomTime that is constructed of the lower 13 bits ot the system time to 
       get a MS random time of ~8000 ms */
    randomTime = os_timeStampMs (pConn->hOs) & 0x1FFF;

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState (pConn->hCurrBss, TI_TRUE, BSS_INDEPENDENT);

    tmr_StartTimer (pConn->hConnTimer,
                    conn_timeout,
                    (TI_HANDLE)pConn,
                    pConn->timeout + randomTime,
                    TI_FALSE);

	/*  Notify that the driver is associated to the supplicant\IP stack. */
    EvHandlerSendEvent (pConn->hEvHandler, IPC_EVENT_ASSOCIATED, NULL, 0);

    return TI_OK;
}
开发者ID:ACSOP,项目名称:android_hardware_ti_wlan,代码行数:38,代码来源:connIbss.c

示例2: fwEvent_SmHandleEvents

/*
 * \brief	Handle the Fw Status information
 *
 * \param  hFwEvent  - FwEvent Driver handle
 * \return void
 *
 * \par Description
 * This function is called from fwEvent_Handle on a sync read, or from TwIf as a CB on an async read.
 * It calls fwEvent_CallHandlers to handle the triggered interrupts.
 *
 * \sa fwEvent_Handle
 */
static ETxnStatus fwEvent_SmHandleEvents (TfwEvent *pFwEvent)
{
	ETxnStatus eStatus;

	/* Save delta between driver and FW time (needed for Tx packets lifetime) */
	pFwEvent->uFwTimeOffset = (os_timeStampMs (pFwEvent->hOs) * 1000) -
	                          ENDIAN_HANDLE_LONG (pFwEvent->tFwStatusTxn.tFwStatus.fwLocalTime);

#ifdef HOST_INTR_MODE_LEVEL
	/* Acknowledge the host interrupt for LEVEL mode (must be after HINT_STT_CLR register clear on read) */
	os_InterruptServiced (pFwEvent->hOs);
#endif

	/* Save the interrupts status retreived from the FW */
	pFwEvent->uEventVector = pFwEvent->tFwStatusTxn.tFwStatus.intrStatus;

	/* Mask unwanted interrupts */
	pFwEvent->uEventVector &= pFwEvent->uEventMask;

	/* Call the interrupts handlers */
	eStatus = fwEvent_CallHandlers (pFwEvent);


	/* Return the status of the handlers processing (complete, pending or error) */
	return eStatus;
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:38,代码来源:FwEvent.c

示例3: switchChannel_smReqSCR_UpdateCmd

/**
*
*
* \b Description:
*
* Update the Switch Channel command parameters.
 * Request SCR and wait for SCR return.
 * if tx status suspend
 *  update regulatory Domain
 *  update tx
 *  start periodic timer

*
* \b ARGS:
*
*  I   - pData - pointer to the SwitchChannel SM context  \n
*
* \b RETURNS:
*
*  TI_OK if successful, TI_NOK otherwise.
*
*
*************************************************************************/
static TI_STATUS switchChannel_smReqSCR_UpdateCmd(void *pData)
{
	switchChannel_t             *pSwitchChannel = (switchChannel_t*)pData;
	EScrClientRequestStatus     scrStatus;
	EScePendReason              scrPendReason;

	if (pSwitchChannel == NULL) {
		return TI_NOK;
	}


	/* Save the TS when requesting SCR */
	pSwitchChannel->SCRRequestTimestamp = os_timeStampMs(pSwitchChannel->hOs);

	scrStatus = scr_clientRequest(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL,
	                              SCR_RESOURCE_SERVING_CHANNEL, &scrPendReason);
	if ((scrStatus != SCR_CRS_RUN) && (scrStatus != SCR_CRS_PEND)) {
		return (switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SCR_FAIL, pSwitchChannel));

	}
	if (scrStatus == SCR_CRS_RUN) {
		switchChannel_scrStatusCB(pSwitchChannel, scrStatus, SCR_RESOURCE_SERVING_CHANNEL, scrPendReason);
	} else if ((scrPendReason==SCR_PR_OTHER_CLIENT_RUNNING) ||
	           (scrPendReason==SCR_PR_DIFFERENT_GROUP_RUNNING) ) {  /* No use to wait for the SCR, invoke FAIL */
		return (switchChannel_smEvent((TI_UINT8*)&pSwitchChannel->currentState, SC_EVENT_SCR_FAIL, pSwitchChannel));
	}
	/* wait for the SCR callback function to be called */
	return TI_OK;

}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:53,代码来源:SwitchChannel.c

示例4: switchChannel_smStartSwitchChannelCmd

/**
*
*
* \b Description:
*
* This function is called once SwitchChannel command was received and the SCR
 * request returned with reason RUN.
 * In this case perform the following:
 *  Set CMD to FW


*
* \b ARGS:
*
*  I   - pData - pointer to the SwitchChannel SM context  \n
*
* \b RETURNS:
*
*  TI_OK if successful, TI_NOK otherwise.
*
*
*************************************************************************/
static TI_STATUS switchChannel_smStartSwitchChannelCmd(void *pData)
{
	switchChannel_t         *pSwitchChannel = (switchChannel_t *)pData;
	TSwitchChannelParams    pSwitchChannelCmd;
	TI_UINT32                   switchChannelTimeDuration;
	paramInfo_t             param;

	if (pSwitchChannel == NULL) {
		return TI_NOK;
	}

	param.paramType = SITE_MGR_BEACON_INTERVAL_PARAM;
	siteMgr_getParam(pSwitchChannel->hSiteMgr, &param);

	switchChannelTimeDuration = pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount * param.content.beaconInterval * 1024 / 1000;
	if (  (switchChannelTimeDuration!=0) &&
	        ((os_timeStampMs(pSwitchChannel->hOs) - pSwitchChannel->SCRRequestTimestamp) >= switchChannelTimeDuration )) {  /* There's no time to perfrom the SCC, set the Count to 1 */
		pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount = 1;
	}

	apConn_indicateSwitchChannelInProgress(pSwitchChannel->hApConn);

	pSwitchChannelCmd.channelNumber = pSwitchChannel->curChannelSwitchCmdParams.channelNumber;
	pSwitchChannelCmd.switchTime    = pSwitchChannel->curChannelSwitchCmdParams.channelSwitchCount;
	pSwitchChannelCmd.txFlag        = pSwitchChannel->curChannelSwitchCmdParams.channelSwitchMode;
	pSwitchChannelCmd.flush         = 0;
	TWD_CmdSwitchChannel (pSwitchChannel->hTWD, &pSwitchChannelCmd);


	return TI_OK;

}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:54,代码来源:SwitchChannel.c

示例5: txCtrlParams_setAdmissionCtrlParams

/***********************************************************************
 *                        txCtrlParams_setAdmissionCtrlParams
 ***********************************************************************
DESCRIPTION:    This function is called for add/delete a tspec in order
				to update parameters.

INPUT:			hTxCtrl - handale to the ts data object
				acId - the AC of the tspec
				mediumTime	- tha alocated medium time for this UP 
				minimumPHYRate - the min phy rate to send a packet of this UP
				admFlag - indicate if the its addition or deletion of tspec 

OUTPUT:     None

RETURN:     void
************************************************************************/
TI_STATUS txCtrlParams_setAdmissionCtrlParams(TI_HANDLE hTxCtrl, TI_UINT8 acId, TI_UINT16 mediumTime, 
											  TI_UINT32 minimumPHYRate, TI_BOOL admFlag)
{
	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
	TI_UINT32	i;

	if(admFlag == TI_TRUE) 
	{
		/* tspec added */
		pTxCtrl->mediumTime[acId] = mediumTime;
        pTxCtrl->admissionState[acId] = AC_ADMITTED;
		pTxCtrl->useAdmissionAlgo[acId] = TI_TRUE;
		pTxCtrl->lastCreditCalcTimeStamp[acId] = os_timeStampMs(pTxCtrl->hOs);
		pTxCtrl->credit[acId] = mediumTime;
	}
	else
	{
		/* tspaec deleted */
		pTxCtrl->mediumTime[acId] = 0;
        pTxCtrl->admissionState[acId] = AC_NOT_ADMITTED;
		pTxCtrl->useAdmissionAlgo[acId] = TI_FALSE;
		pTxCtrl->lastCreditCalcTimeStamp[acId] = 0;
		pTxCtrl->credit[acId] = 0;
	}

	/* Update the Tx queues mapping after admission change. */
	txCtrl_UpdateQueuesMapping (hTxCtrl);
	
	/* If the timer was not enabled in registry than we will never set it */
	if (pTxCtrl->bCreditCalcTimerEnabled)
	{
    	/* enable disable credit calculation timer */
    	for (i = 0; i < MAX_NUM_OF_AC; i++)
    	{
    		if (pTxCtrl->useAdmissionAlgo[i])
    		{
    			if (!pTxCtrl->bCreditCalcTimerRunning)
    			{
    				pTxCtrl->bCreditCalcTimerRunning = TI_TRUE;
                    tmr_StartTimer (pTxCtrl->hCreditTimer,
                                    calcCreditFromTimer,
                                    (TI_HANDLE)pTxCtrl,
                                    pTxCtrl->creditCalculationTimeout, 
                                    TI_TRUE);
    			}
    			
    			return TI_OK;
    		}
    	}
    
    	/* in all queues useAdmissionAlgo is not TRUE, so stop timer if running */
        if (pTxCtrl->bCreditCalcTimerRunning)
        {
            tmr_StopTimer (pTxCtrl->hCreditTimer);
            pTxCtrl->bCreditCalcTimerRunning = TI_FALSE;
        }
    }

	return TI_OK;
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel,代码行数:76,代码来源:txCtrlParams.c

示例6: fwEvent_SmHandleEvents

/*
 * \brief	Handle the Fw Status information 
 * 
 * \param  hFwEvent  - FwEvent Driver handle
 * \return void
 * 
 * \par Description
 * This function is called from fwEvent_Handle on a sync read, or from TwIf as a CB on an async read.
 * It calls fwEvent_CallHandlers to handle the triggered interrupts.
 * 
 * \sa fwEvent_Handle
 */
static ETxnStatus fwEvent_SmHandleEvents (TfwEvent *pFwEvent)
{
    ETxnStatus eStatus;
    CL_TRACE_START_L4();

    /* Save delta between driver and FW time (needed for Tx packets lifetime) */
    pFwEvent->uFwTimeOffset = (os_timeStampMs (pFwEvent->hOs) * 1000) - 
                              ENDIAN_HANDLE_LONG (pFwEvent->tFwStatusTxn.tFwStatus.fwLocalTime);

#ifdef HOST_INTR_MODE_LEVEL
    /* Acknowledge the host interrupt for LEVEL mode (must be after HINT_STT_CLR register clear on read) */
    os_InterruptServiced (pFwEvent->hOs);
#endif

    /* Save the interrupts status retreived from the FW */
    pFwEvent->uEventVector = pFwEvent->tFwStatusTxn.tFwStatus.intrStatus;

    /* Mask unwanted interrupts */
    pFwEvent->uEventVector &= pFwEvent->uEventMask;

    /* Call the interrupts handlers */
    eStatus = fwEvent_CallHandlers (pFwEvent);

    TRACE5(pFwEvent->hReport, REPORT_SEVERITY_INFORMATION, "fwEvent_SmHandleEvents: Status=%d, EventVector=0x%x, IntrPending=%d, NumPendHndlrs=%d, FwTimeOfst=%d\n", eStatus, pFwEvent->uEventVector, pFwEvent->bIntrPending, pFwEvent->uNumPendHndlrs, pFwEvent->uFwTimeOffset);
    CL_TRACE_END_L4("tiwlan_drv.ko", "CONTEXT", "FwEvent", "");

    /* Return the status of the handlers processing (complete, pending or error) */
    return eStatus;
} 
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:41,代码来源:FwEvent.c

示例7: TrafficMonitor_Start

TI_STATUS TrafficMonitor_Start(TI_HANDLE hTrafficMonitor)
{
	TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
	TrafficAlertElement_t *AlertElement;
	TI_UINT32 CurentTime;


	if (TrafficMonitor == NULL)
		return TI_NOK;

	/*starts the bandwidth TIMER*/
	if (!TrafficMonitor->Active) { /*To prevent double call to timer start*/
		TrafficMonitor_UpdateDownTrafficTimerState (TrafficMonitor);
	}

	AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
	CurentTime = os_timeStampMs(TrafficMonitor->hOs);

	/* go over all the Down elements and reload the timer*/
	while (AlertElement) {
		if (AlertElement->CurrentState != ALERT_WAIT_FOR_RESET) {
			AlertElement->EventCounter = 0;
			AlertElement->TimeOut = AlertElement->TimeIntervalMs + CurentTime;
		}
		AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
	}
	TrafficMonitor->Active = TI_TRUE;

	return TI_OK;
}
开发者ID:3ig,项目名称:Xperia-2011-Official-Kernel-Sources,代码行数:30,代码来源:TrafficMonitor.c

示例8: MacServices_measurementSRV_startMeasurement

/**
 * \\n
 * \date 09-November-2005\n
 * \brief Starts a measurement operation.\n
 *
 * Function Scope \e Public.\n
 * \param hMacServices - handle to the MacServices object.\n
 * \param pMsrRequest - a structure containing measurement parameters.\n
 * \param timeToRequestexpiryMs - the time (in milliseconds) the measurement SRV has to start the request.\n
 * \param cmdResponseCBFunc - callback function to used for command response.\n
 * \param cmdResponseCBObj - handle to pass to command response CB.\n
 * \param cmdCompleteCBFunc - callback function to be used for command complete.\n
 * \param cmdCompleteCBObj - handle to pass to command complete CB.\n
 * \return TI_OK if successful (various, TBD codes if not).\n
 */
TI_STATUS MacServices_measurementSRV_startMeasurement( TI_HANDLE hMacServices,
        TMeasurementRequest* pMsrRequest,
        TI_UINT32 timeToRequestExpiryMs,
        TCmdResponseCb cmdResponseCBFunc,
        TI_HANDLE cmdResponseCBObj,
        TMeasurementSrvCompleteCb cmdCompleteCBFunc,
        TI_HANDLE cmdCompleteCBObj )
{
	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)((MacServices_t*)hMacServices)->hMeasurementSRV;
	TI_INT32 i;

#ifdef TI_DBG
	measurementSRVPrintRequest( (TI_HANDLE)pMeasurementSRV, pMsrRequest );
#endif

	/* mark that request is in progress */
	pMeasurementSRV->bInRequest = TI_TRUE;

	/* mark to send NULL data when exiting driver mode (can be changed to TI_FALSE
	   only when explictly stopping the measurement */
	pMeasurementSRV->bSendNullDataWhenExitPs = TI_TRUE;

	/* Nullify return status */
	pMeasurementSRV->returnStatus = TI_OK;

	/* copy request parameters */
	os_memoryCopy (pMeasurementSRV->hOS,
	               (void *)&pMeasurementSRV->msrRequest,
	               (void *)pMsrRequest,
	               sizeof(TMeasurementRequest));

	/* Mark the current time stamp and the duration to start to cehck expiry later */
	pMeasurementSRV->requestRecptionTimeStampMs = os_timeStampMs( pMeasurementSRV->hOS );
	pMeasurementSRV->timeToRequestExpiryMs = timeToRequestExpiryMs;

	/* copy callbacks */
	pMeasurementSRV->commandResponseCBFunc = cmdResponseCBFunc;
	pMeasurementSRV->commandResponseCBObj = cmdResponseCBObj;
	pMeasurementSRV->measurmentCompleteCBFunc = cmdCompleteCBFunc;
	pMeasurementSRV->measurementCompleteCBObj = cmdCompleteCBObj;

	/* initialize reply */
	pMeasurementSRV->msrReply.numberOfTypes = pMsrRequest->numberOfTypes;
	for ( i = 0; i < pMsrRequest->numberOfTypes; i++ ) {
		pMeasurementSRV->msrReply.msrTypes[ i ].msrType = pMeasurementSRV->msrRequest.msrTypes[ i ].msrType;
		pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_OK;
	}

	/* nullify the pending CBs bitmap */
	pMeasurementSRV->pendingParamCBs = 0;

	/* send a start measurement event to the SM */
	measurementSRVSM_SMEvent( (TI_HANDLE)pMeasurementSRV, &(pMeasurementSRV->SMState),
	                          MSR_SRV_EVENT_MEASURE_START_REQUEST );

	/* mark that request has been sent */
	pMeasurementSRV->bInRequest = TI_FALSE;

	return pMeasurementSRV->returnStatus;
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:75,代码来源:MeasurementSrv.c

示例9: cmdQueue_Error

/*
 * \brief	Called when a command timeout occur
 *
 * \param  hCmdQueue - Handle to CmdQueue
 * \return TI_OK
 *
 * \par Description
 *
 * \sa cmdQueue_Init, cmdMbox_TimeOut
 */
TI_STATUS cmdQueue_Error (TI_HANDLE hCmdQueue, TI_UINT32 command, TI_UINT32 status, void *param)
{
	TCmdQueue* pCmdQueue = (TCmdQueue*)hCmdQueue;

	if (status == CMD_STATUS_UNKNOWN_CMD)
	{
		TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR , "cmdQueue_Error: Unknown Cmd  (%d)\n", command);
	}
	else if (status == CMD_STATUS_UNKNOWN_IE)
	{
		TRACE4( pCmdQueue->hReport, REPORT_SEVERITY_CONSOLE, "cmdQueue_Error: Unknown IE, cmdType : %d (%d) IE: %d (%d)\n",
		        command,
		        command,
		        (param) ? *((TI_UINT16 *) param) : 0,
		        (param) ? *((TI_UINT16 *) param) : 0
		      );

		WLAN_OS_REPORT(("cmdQueue_Error: Unknown IE, cmdType : %s (%d) IE: %s (%d)\n",
		                cmdQueue_GetCmdString (command),
		                command,
		                (param) ? cmdQueue_GetIEString (command, *((TI_UINT16 *) param)) : "",
		                *((TI_UINT16 *) param)));
	}
	else
	{
		TRACE1(pCmdQueue->hReport, REPORT_SEVERITY_ERROR , "cmdQueue_Error: CmdMbox status is %d\n", status);
	}

	if (status != CMD_STATUS_UNKNOWN_CMD && status != CMD_STATUS_UNKNOWN_IE)
	{
#ifdef TI_DBG

		TCmdQueueNode* pHead = &pCmdQueue->aCmdQueue[pCmdQueue->head];
		TI_UINT32 TimeStamp = os_timeStampMs(pCmdQueue->hOs);

		WLAN_OS_REPORT(("cmdQueue_Error: **ERROR**  Command Occured \n"
		                "                                        Cmd = %s %s, Len = %d \n"
		                "                                        NumOfCmd = %d\n"
		                "                                        MAC TimeStamp on timeout = %d\n",
		                cmdQueue_GetCmdString(pHead->cmdType),
		                (pHead->aParamsBuf) ? cmdQueue_GetIEString(pHead->cmdType, *(TI_UINT16 *)pHead->aParamsBuf) : "",
		                pHead->uParamsLen,
		                pCmdQueue->uNumberOfCommandInQueue,
		                TimeStamp));

		/* Print The command that was sent before the timeout occur */
		cmdQueue_PrintHistory(pCmdQueue, CMDQUEUE_HISTORY_DEPTH);

#endif /* TI_DBG */

		/* preform Recovery */
		if (pCmdQueue->fFailureCb)
		{
			pCmdQueue->fFailureCb (pCmdQueue->hFailureCb, TI_NOK);
		}
	}

	return TI_OK;
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:69,代码来源:CmdQueue.c

示例10: TrafficMonitor_Event

/***********************************************************************
 *                        TrafficMonitor_Event
 ***********************************************************************
DESCRIPTION: this function is called for every event that was requested from the Tx or Rx
             The function preformes update of the all the relevant Alert in the system
             that corresponds to the event. checks the Alert Status due to this event.



INPUT:          hTrafficMonitor -       Traffic Monitor the object.

            Count - evnet count.
            Mask - the event mask that That triggered this function.

            MonitorModuleType Will hold the module type from where this function was called.

OUTPUT:

RETURN:

************************************************************************/
void TrafficMonitor_Event(TI_HANDLE hTrafficMonitor,int Count,TI_UINT16 Mask,TI_UINT32 MonitorModuleType)
{
	TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
	TrafficAlertElement_t *AlertElement;
	TI_UINT32 activeTrafDownEventsNum = 0;
	TI_UINT32 trafficDownMinTimeout = 0xFFFFFFFF;
	TI_UINT32 uCurentTS;

	if (TrafficMonitor == NULL)
		return;

	if (!TrafficMonitor->Active)
		return;

	uCurentTS = os_timeStampMs(TrafficMonitor->hOs);

	/* for BW calculation */
	if (MonitorModuleType == RX_TRAFF_MODULE) {
		if (Mask & DIRECTED_FRAMES_RECV) {
			TrafficMonitor_updateBW(&TrafficMonitor->DirectRxFrameBW, uCurentTS);
		}
	} else if (MonitorModuleType == TX_TRAFF_MODULE) {
		if (Mask & DIRECTED_FRAMES_XFER) {
			TrafficMonitor_updateBW(&TrafficMonitor->DirectTxFrameBW, uCurentTS);
		}
	} else {
		return; /* module type does not exist, error return */
	}

	AlertElement  = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);

	/* go over all the elements and check for alert */
	while (AlertElement) {
		if (AlertElement->CurrentState != ALERT_WAIT_FOR_RESET) {
			if (AlertElement->MonitorMask[MonitorModuleType] & Mask) {
				AlertElement->ActionFunc(AlertElement,Count);
				if (AlertElement->Direction == TRAFF_UP) {
					isThresholdUp(AlertElement, uCurentTS);
				}
			}

			if ((AlertElement->Direction == TRAFF_DOWN) && (AlertElement->Trigger == TRAFF_EDGE) && (AlertElement->CurrentState == ALERT_OFF) && (AlertElement->Enabled == TI_TRUE)) {
				/* Increase counter of active traffic down events */
				activeTrafDownEventsNum++;

				/* Search for the alert with the most short Interval time - will be used to start timer */
				if ((AlertElement->TimeIntervalMs) < (trafficDownMinTimeout))
					trafficDownMinTimeout = AlertElement->TimeIntervalMs;
			}

		}
		AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
	}

	TrafficMonitor_ChangeDownTimerStatus (TrafficMonitor,activeTrafDownEventsNum,trafficDownMinTimeout);

}
开发者ID:3ig,项目名称:Xperia-2011-Official-Kernel-Sources,代码行数:78,代码来源:TrafficMonitor.c

示例11: StartMissingPktTimer

/**
 * \brief	Starts the timer guarding the waiting for a missing packet
 *
 * \param	uTid	index of TID timer to start
 */
static void StartMissingPktTimer(TRxQueue *pRxQueue, TI_UINT8 uTid)
{
	/* request to clear this TID's queue */
	pRxQueue->tRxQueueArraysMng.tSa1ArrayMng[uTid].uMissingPktTimeStamp = os_timeStampMs(pRxQueue->hOs);

	/* start timer (if not started already) */
	if ( pRxQueue->uMissingPktTimerClient == TID_CLIENT_NONE ) {
		tmr_StartTimer (pRxQueue->hMissingPktTimer, MissingPktTimeout, pRxQueue, BA_SESSION_TIME_TO_SLEEP, TI_FALSE);
		pRxQueue->uMissingPktTimerClient = uTid;
	}
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:16,代码来源:RxQueue.c

示例12: TrafficMonitor_GetFrameBandwidth

/***********************************************************************
 *                        TrafficMonitor_GetFrameBandwidth
 ***********************************************************************
DESCRIPTION: Returns the total direct frames in the Rx and Tx per second.

INPUT:          hTrafficMonitor -       Traffic Monitor the object.


OUTPUT:

RETURN:     Total BW
************************************************************************/
int TrafficMonitor_GetFrameBandwidth(TI_HANDLE hTrafficMonitor)
{
	TrafficMonitor_t 	*pTrafficMonitor =(TrafficMonitor_t*)hTrafficMonitor;
	TI_UINT32 			uCurentTS;

	if (pTrafficMonitor == NULL)
		return TI_NOK;

	uCurentTS = os_timeStampMs(pTrafficMonitor->hOs);

	/* Calculate BW for Rx & Tx */
	return ( TrafficMonitor_calcBW(&pTrafficMonitor->DirectRxFrameBW, uCurentTS) +
	         TrafficMonitor_calcBW(&pTrafficMonitor->DirectTxFrameBW, uCurentTS) );
}
开发者ID:3ig,项目名称:Xperia-2011-Official-Kernel-Sources,代码行数:26,代码来源:TrafficMonitor.c

示例13: sendDataPacket

void sendDataPacket (TI_HANDLE hOs)
{
    TI_UINT32       i;
	TTxCtrlBlk *    pPktCtrlBlk;
    TI_UINT8 *      pPktBuf;
    TEthernetHeader tEthHeader;
	char SrcBssid[6] = {0x88,0x88,0x88,0x88,0x88,0x88};
	char DesBssid[6] = {0x22,0x22,0x22,0x22,0x22,0x22};

	/* Allocate a TxCtrlBlk for the Tx packet and save timestamp, length and packet handle */
    pPktCtrlBlk = TWD_txCtrlBlk_Alloc (tmp_hTWD);

	if( NULL == pPktCtrlBlk )
	{
        os_printf("\n sendDataPacket() : pPktCtrlBlk returned as NULL from TWD_txCtrlBlk_Alloc() ");
        return;
	}

    pPktCtrlBlk->tTxDescriptor.startTime = os_timeStampMs (hOs);
    pPktCtrlBlk->tTxDescriptor.length    = (TI_UINT16)packetLength + ETHERNET_HDR_LEN;
    pPktCtrlBlk->tTxDescriptor.tid       = 0;
    pPktCtrlBlk->tTxPktParams.uPktType   = TX_PKT_TYPE_ETHER;

    /* Allocate buffer with headroom for getting the IP header in a 4-byte aligned address */
    pPktBuf = txCtrl_AllocPacketBuffer (tmp_hTxCtrl, pPktCtrlBlk, packetLength + ETHERNET_HDR_LEN + 2);

    /* Prepare Ethernet header */
    tEthHeader.type = HTOWLANS(ETHERTYPE_IP);
    MAC_COPY (tEthHeader.src, SrcBssid);
    MAC_COPY (tEthHeader.dst, DesBssid);

	if( pPktBuf )
	{
	    os_memoryCopy (hOs, pPktBuf + 2, &tEthHeader, ETHERNET_HDR_LEN);

        /* Build BDL */
        BUILD_TX_TWO_BUF_PKT_BDL (pPktCtrlBlk,
                                  pPktBuf + 2,
                                  ETHERNET_HDR_LEN,
                                  pPktBuf + 2 + ETHERNET_HDR_LEN,
                                  packetLength)

        /* Fill data buffer with incremented numbers */
        for (i = 0; i < packetLength; i++)
        {
            *(pPktBuf + 2 + ETHERNET_HDR_LEN + i) = i;
        }
	}
	else
	{
开发者ID:chambejp,项目名称:hardware,代码行数:50,代码来源:fwdriverdebug.c

示例14: whalCtrl_RecoveryEnded

/*
 * ----------------------------------------------------------------------------
 * Function : whalCtrl_RecoveryEnded
 *
 * Input    : 
 * Output   :
 * Process  :
 *		aanouce all the modules about the end of the recovery proccess.
 * Note(s)  :  Done
 * -----------------------------------------------------------------------------
 */
void whalCtrl_RecoveryEnded(TI_HANDLE hWhalCtrl)
{
	WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;

	/*Change the State of the mboxQueue and the interrupt Module and 
	After recovery we should enable back all interrupts according to the last interrupt shadow mask*/
	whalCtrl_exitFromInitMode(hWhalCtrl);
    
    /* 
    Indicates the MboxQueue that Reconfig Ended in Order To Call the CallBacks
	That Was saved before the recovery process started 
	*/
	CmdQueue_EndReconfig(((TnetwDrv_t*)pWhalCtrl->hTNETW_Driver)->hCmdQueue);
	
	WLAN_REPORT_INFORMATION(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
							 ("whalCtrl_ReConfig: End  (%d)\n", os_timeStampMs(pWhalCtrl->hOs)));
}
开发者ID:0omega,项目名称:platform_system_wlan_ti,代码行数:28,代码来源:whalRecovery.c

示例15: dummyPktReqCB

/****************************************************************************************
 *                               dummyPktReqCB                                          *
 ****************************************************************************************
DESCRIPTION: Callback for the TWD_OWN_EVENT_DUMMY_PKT_REQ event - transmits a dummy
             packet

INPUT:      - hTxMgmtQ      - Handle to the TxMgmtQ module
            - str			- Buffer containing the event data
            - strLen        - Event data length
OUTPUT:
RETURN:    void.\n
****************************************************************************************/
void dummyPktReqCB(TI_HANDLE hTxMgmtQ, char* str , TI_UINT32 strLen)
{
	TTxMgmtQ *pTxMgmtQ = (TTxMgmtQ*)hTxMgmtQ;
    TTxCtrlBlk* pTxCtrlBlk;
    void* pPayload;
    const TI_UINT16 uDummyPktBufLen = 1400;
    TI_STATUS status;

    /* Allocate control block for dummy packet */
    pTxCtrlBlk = TWD_txCtrlBlk_Alloc(pTxMgmtQ->hTWD);
    if (NULL == pTxCtrlBlk) {
        TRACE0(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "dummyPktReqCB: TxCtrlBlk allocation failed!\n");
        return;
    }

    /* Allocate payload buffer */
    pPayload  = txCtrl_AllocPacketBuffer(pTxMgmtQ->hTxCtrl, pTxCtrlBlk, WLAN_HDR_LEN + uDummyPktBufLen);
    if (NULL == pPayload)
    {
        TRACE0(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "dummyPktReqCB: Packet buffer allocation failed!\n");
        TWD_txCtrlBlk_Free (pTxMgmtQ->hTWD, pTxCtrlBlk);
        return;
    }

	/* Set packet parameters */
    {
		pTxCtrlBlk->tTxDescriptor.startTime = os_timeStampMs(pTxMgmtQ->hOs);

		/* Mark as a Dummy Blocks Packet */
		pTxCtrlBlk->tTxPktParams.uPktType = TX_PKT_TYPE_DUMMY_BLKS;

		BUILD_TX_TWO_BUF_PKT_BDL (pTxCtrlBlk, pTxCtrlBlk->aPktHdr, WLAN_HDR_LEN, pPayload, uDummyPktBufLen);
    }

    pTxMgmtQ->tDbgCounters.uDummyPackets++;

    /* Enqueue packet in the management-queues and run the scheduler. */
    status = txMgmtQ_Xmit(pTxMgmtQ, pTxCtrlBlk, TI_FALSE);

    if (TI_NOK == status)
    {
        TRACE0(pTxMgmtQ->hReport, REPORT_SEVERITY_ERROR, "dummyPktReqCB: xmit failed!\n");
    }
}
开发者ID:chambejp,项目名称:hardware,代码行数:56,代码来源:txMgmtQueue.c


注:本文中的os_timeStampMs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。