From 69fded91556913a3274eedc77158dc301cdeddd9 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 14 Sep 2015 20:41:35 -0500 Subject: [PATCH] rtl8188eu: Cancel more timers on exit A quick look shows the new ones have not been stopped. Signed-off-by: Larry Finger --- os_dep/mlme_linux.c | 20 -------------------- os_dep/os_intfs.c | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index 6043cee..c6f34e0 100644 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -59,7 +59,6 @@ void rtw_init_mlme_timer(struct adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; _init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, rtw_join_timeout_handler, padapter); - /* _init_timer(&(pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer), padapter->pnetdev, sitesurvey_ctrl_handler, padapter); */ _init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter); _init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter); @@ -127,7 +126,6 @@ void rtw_reset_securitypriv( struct adapter *adapter ) pmlmeext->mgnt_80211w_IPN_rx = 0; #endif /* CONFIG_IEEE80211W */ memset((unsigned char *)&adapter->securitypriv, 0, sizeof (struct security_priv)); - /* _init_timer(&(adapter->securitypriv.tkip_timer),adapter->pnetdev, rtw_use_tkipkey_handler, adapter); */ /* Added by Albert 2009/02/18 */ /* Restore the PMK information to securitypriv structure for the following connection. */ @@ -246,20 +244,6 @@ void init_addba_retry_timer(struct adapter *padapter, struct sta_info *psta) _init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta); } -/* -void _reauth_timer_hdl(void *FunctionContext) -{ - struct adapter *padapter = (struct adapter *)FunctionContext; - reauth_timer_hdl(padapter); -} - -void _reassoc_timer_hdl(void *FunctionContext) -{ - struct adapter *padapter = (struct adapter *)FunctionContext; - reassoc_timer_hdl(padapter); -} -*/ - void init_mlme_ext_timer(struct adapter *padapter) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -269,10 +253,6 @@ void init_mlme_ext_timer(struct adapter *padapter) #ifdef CONFIG_IEEE80211W _init_timer(&pmlmeext->sa_query_timer, padapter->pnetdev, _sa_query_timer_hdl, padapter); #endif /* CONFIG_IEEE80211W */ - /* _init_timer(&pmlmeext->ADDBA_timer, padapter->pnetdev, _addba_timer_hdl, padapter); */ - - /* _init_timer(&pmlmeext->reauth_timer, padapter->pnetdev, _reauth_timer_hdl, padapter); */ - /* _init_timer(&pmlmeext->reassoc_timer, padapter->pnetdev, _reassoc_timer_hdl, padapter); */ } #ifdef CONFIG_AP_MODE diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index b776053..4162ee2 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -819,11 +819,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter) /* add for CONFIG_IEEE80211W, none 11w also can use */ spin_lock_init(&padapter->security_key_mutex); - /* We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). */ - /* memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv)); */ - - /* _init_timer(&(padapter->securitypriv.tkip_timer), padapter->pifp, rtw_use_tkipkey_handler, padapter); */ - if (_rtw_init_sta_priv(&padapter->stapriv) == _FAIL) { DBG_88E("Can't _rtw_init_sta_priv\n"); @@ -856,6 +851,9 @@ exit: void rtw_cancel_all_timer(struct adapter *padapter) { + struct wifidirect_info *pwdinfo = &padapter->wdinfo; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_cancel_all_timer\n")); _cancel_timer_ex(&padapter->mlmepriv.assoc_timer); @@ -886,6 +884,15 @@ void rtw_cancel_all_timer(struct adapter *padapter) #if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST) if (padapter->HalFunc.hal_cancel_checkbthang_workqueue) padapter->HalFunc.hal_cancel_checkbthang_workqueue(padapter); +#endif + _cancel_timer_ex(&pwdinfo->find_phase_timer); + _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer); + _cancel_timer_ex(&pwdinfo->pre_tx_scan_timer); + _cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey); + _cancel_timer_ex(&pmlmeext->survey_timer); + _cancel_timer_ex(&pmlmeext->link_timer); +#ifdef CONFIG_IEEE80211W + _cancel_timer_ex(&pmlmeext->sa_query_timer); #endif /* cancel dm timer */ rtw_hal_dm_deinit(padapter);