/** * \fn tmr_StopTimer * \brief Stop a running timer * * Stop the specified timer. * * \note When using this function, it must be considered that timer expiry may happen * right before the timer is stopped, so it can't be assumed that this completely * prevents the timer expiry event! * \param hTimerInfo - The specific timer handle * \return void * \sa tmr_StartTimer */ void tmr_StopTimer (TI_HANDLE hTimerInfo) { TTimerInfo *pTimerInfo = (TTimerInfo *)hTimerInfo; /* The timer handle */ TTimerModule *pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule; /* The timer module handle */ /* Stop OS-API timer running */ os_timerStop(pTimerModule->hOs, pTimerInfo->hOsTimerObj); /* Clear periodic flag to prevent timer restart if we are in tmr_HandleExpiry context. */ pTimerInfo->bPeriodic = TI_FALSE; }
/** * * mainKeySmReportComplete * * \b Description: * * Report key complete to the main security SM. * * \b ARGS: * * I - pData - station control block \n * * \b RETURNS: * * OK on success, NOK otherwise. */ TI_STATUS mainKeys_bcastCompleteUcastComplete(struct _mainKeys_t *pMainKeys) { TI_STATUS status; WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG, ("mainKeys_bcastCompleteUcastComplete - sending Interrogate \n")); os_timerStop(pMainKeys->hOs, pMainKeys->timer); status = pMainKeys->pParent->reportKeysStatus(pMainKeys->pParent, OK); return status; }
/** * \author Yuval Adler\n * \date 29-Dec-2004\n * \brief Finalizes the scan SRV module (releasing memory and timer) * * Function Scope \e Public.\n * \param hScanSRV - handle to the scan SRV object.\n */ void MacServices_scanSRV_destroy( TI_HANDLE hScanSRV ) { scanSRV_t *pScanSRV = (scanSRV_t*)hScanSRV; /* free timer */ os_timerStop( pScanSRV->hOS, pScanSRV->timer ); os_timerDestroy( pScanSRV->hOS, pScanSRV->timer ); /* free memory */ fsm_Unload( pScanSRV->hOS, pScanSRV->SM ); os_memoryFree( pScanSRV->hOS, (TI_HANDLE)pScanSRV , sizeof(scanSRV_t) ); }
/**************************************************************************** * elpCtrl_Stop() **************************************************************************** * DESCRIPTION: Stop ElpCtrl module before Recovery. * Move to "open": MODE_KEEP_AWAKE + STATE_ON * * INPUTS: hElpCtrl - the handle to the ElpCtrl module. * * OUTPUT: * * RETURNS: OK ****************************************************************************/ int elpCtrl_Stop(TI_HANDLE hElpCtrl) { elpCtrl_t *pElpCtrl = (elpCtrl_t*)hElpCtrl; /* set the init state */ pElpCtrl->mode = ELPCTRL_MODE_KEEP_AWAKE; pElpCtrl->state = ELPS_AWAKE; /* printk("TI: %s:\t%lu - stop timeout\n", __FUNCTION__, jiffies); */ os_timerStop (pElpCtrl->hOs, pElpCtrl->hTimer); return OK; }
/**************************************************************************** * elpCtrl_ReceivedIRQ() **************************************************************************** * DESCRIPTION: * * INPUTS: hElpCtrl - the handle to the ElpCtrl module. * * OUTPUT: * * RETURNS: TNETWIF_PENDING | TNETWIF_COMPLETE ****************************************************************************/ void elpCtrl_ReceivedIRQ (TI_HANDLE hElpCtrl) { elpCtrl_t *pElpCtrl = (elpCtrl_t*)hElpCtrl; if (pElpCtrl->state == ELPS_WAKING_UP_MUX) { pElpCtrl->state = ELPS_AWAKE; /* printk("TI: %s:\t%lu - stop timeout\n", __FUNCTION__, jiffies); */ os_timerStop (pElpCtrl->hOs, pElpCtrl->hTimer); } return; }
/** * \brief Restart the scan SRV module upon recovery. * * Function Scope \e Public.\n * \param hScanSRV - handle to the scan SRV object.\n */ void scanSRV_restart( TI_HANDLE hScanSRV) { scanSRV_t *pScanSRV = (scanSRV_t *)hScanSRV; /* init state machine */ /* initialize current state */ pScanSRV->SMState = SCAN_SRV_STATE_IDLE; if ( TRUE == pScanSRV->bTimerRunning ) { os_timerStop( pScanSRV->hOS, pScanSRV->timer ); pScanSRV->bTimerRunning = FALSE; } }
/** * \fn tmr_StopTimer * \brief Stop a running timer * * Stop the specified timer. * * \note When using this function, it must be considered that timer expiry may happen * right before the timer is stopped, so it can't be assumed that this completely * prevents the timer expiry event! * \param hTimerInfo - The specific timer handle * \return void * \sa tmr_StartTimer */ void tmr_StopTimer (TI_HANDLE hTimerInfo) { TTimerInfo *pTimerInfo = (TTimerInfo *)hTimerInfo; /* The timer handle */ TTimerModule *pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule; /* The timer module handle */ if (!pTimerModule) { WLAN_OS_REPORT (("tmr_StopTimer(): ERROR - NULL timer!\n")); return; } /* Stop OS-API timer running */ os_timerStop(pTimerModule->hOs, pTimerInfo->hOsTimerObj); /* Clear periodic flag to prevent timer restart if we are in tmr_HandleExpiry context. */ pTimerInfo->bPeriodic = TI_FALSE; }
/** * * mainKeys_config * * \b Description: * * Init main security state machine state machine * * \b ARGS: * * none * * \b RETURNS: * * OK on success, NOK otherwise. * * \sa */ TI_STATUS mainKeys_unload(mainKeys_t *pMainKeys) { TI_STATUS status; if (pMainKeys == NULL) { return NOK; } status = fsm_Unload(pMainKeys->hOs, pMainKeys->pMainKeysSm); if (status != OK) { /* report failure but don't stop... */ WLAN_REPORT_ERROR(pMainKeys->hReport, RSN_MODULE_LOG, ("MAIN_KEYS_SM: Error releasing FSM memory \n")); } os_timerStop(pMainKeys->hOs, pMainKeys->timer); os_timerDestroy(pMainKeys->hOs, pMainKeys->timer); status = keyParser_unload(pMainKeys->pKeyParser); if (status != OK) { /* report failure but don't stop... */ WLAN_REPORT_ERROR(pMainKeys->hReport, RSN_MODULE_LOG, ("MAIN_KEYS_SM: Error unloading key parser\n")); } status = broadcastKey_unload(pMainKeys->pBcastSm); if (status != OK) { /* report failure but don't stop... */ WLAN_REPORT_ERROR(pMainKeys->hReport, RSN_MODULE_LOG, ("MAIN_KEYS_SM: Error unloading broadcast key SM\n")); } status = unicastKey_unload(pMainKeys->pUcastSm); if (status != OK) { /* report failure but don't stop... */ WLAN_REPORT_ERROR(pMainKeys->hReport, RSN_MODULE_LOG, ("MAIN_KEYS_SM: Error unloading unicast key SM\n")); } os_memoryFree(pMainKeys->hOs, pMainKeys, sizeof(mainKeys_t)); return OK; }
static TI_STATUS disAssocc_to_idle(void *pData) { conn_t *pConn = (conn_t *)pData; /* Stop the disconnect timeout timer. */ os_timerStop(((conn_t *)pData)->hOs, ((conn_t *)pData)->pTimer); /* * Tx Data Stop and QoS disconnect must be called only after the disconnect (dissasociate/deauthenticate) * has been sent, or else no TX complete is received! */ txData_stop(pConn->hTxData); qosMngr_disconnect(pConn->hQosMngr); #ifdef EXC_MODULE_INCLUDED measurementMgr_disableTsMetrics(pConn->hMeasurementMgr, MAX_NUM_OF_AC); #endif /* set Hw not available now that the connection process failed */ MacServices_powerAutho_AwakeRequiredUpdate(pConn->hMacServices, POWERAUTHO_AWAKE_NOT_REQUIRED, POWERAUTHO_AWAKE_REASON_CONNECTION); whalCtrl_FwDisconnect(pConn->hHalCtrl, RX_CONFIG_OPTION_MY_DST_MY_BSS, RX_FILTER_OPTION_FILTER_ALL); #ifdef EXC_MODULE_INCLUDED excMngr_updateIappInformation(pConn->hExcMngr, EXC_DISASSOC); #endif /* * Call the connection lost callback set by the SME or AP_CONN. */ pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode); /* * In case of connection failuer we might get here without freeing the SCR. */ if( pConn->scrRequested == TRUE ){ scr_clientComplete( pConn->hScr, SCR_CID_CONNECT ); pConn->scrRequested = FALSE; } return OK; }
/** * * mainKeySmStopSubKeySmsAndTimer * * \b Description: * * Stops unicast & broadcast key SMs and session timer. * * \b ARGS: * * I - pData - station control block \n * * \b RETURNS: * * OK on success, NOK otherwise. */ TI_STATUS mainKeys_stopBcastComplete(struct _mainKeys_t *pMainKeys) { TI_STATUS status = OK; status = pMainKeys->pUcastSm->stop(pMainKeys->pUcastSm); if (status != OK) { return NOK; } status = pMainKeys->pBcastSm->stop(pMainKeys->pBcastSm); if (status != OK) { return NOK; } os_timerStop(pMainKeys->hOs, pMainKeys->timer); return status; }
void sendMgmtPacket(TI_HANDLE hOs) { static TI_UINT8 aMsg[2000]; TI_UINT32 i; dot11MgmtSubType_e eMsgType = DE_AUTH; for (i = 0; i < packetLength; i++) { aMsg[i] = i; } mlmeBuilder_sendFrame(tmp_hMlme, eMsgType, aMsg, packetLength, 0); numOfPackets++; if ((infinitLoopFl == 0) && (numOfPackets > packetsNum)) { os_timerStop(hOs, dTimer); os_printf("\n *********** Last Packet was sent **********"); os_timerDestroy(hOs, dTimer); } else { os_timerStart(hOs, dTimer, 1000); } }
/**************************************************************************************** * os_timerDestroy() **************************************************************************************** DESCRIPTION: This function destroys the OS timer object. ARGUMENTS: RETURN: NOTES: *****************************************************************************************/ void os_timerDestroy (TI_HANDLE OsContext, TI_HANDLE TimerHandle) { os_timerStop (OsContext, TimerHandle); os_memoryFree (OsContext, TimerHandle, sizeof(TOsTimer)); }