From: navin patidar Date: Sun, 22 Jun 2014 08:51:46 +0000 (+0530) Subject: staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync() X-Git-Tag: firefly_0821_release~176^2~3491^2~1393 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5aa8b9aeb8f6763299ee0b700ab7ab5f06044409;p=firefly-linux-kernel-4.4.55.git staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync() Signed-off-by: navin patidar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 556d17d29797..aeaa873bfeb1 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -2084,7 +2084,6 @@ void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) { - u8 timer_cancelled; struct sta_info *psta = NULL; struct wlan_network *pwlan = NULL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -2097,7 +2096,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) _set_timer(&pmlmepriv->assoc_timer, 1); } - _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled); + del_timer_sync(&pmlmepriv->assoc_timer); spin_lock_bh(&pmlmepriv->lock); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index c03442d97673..0cb9e152cc5e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -725,10 +725,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf) RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_surveydone_event_callback: fw_state:%x\n\n", get_fwstate(pmlmepriv))); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) { - u8 timer_cancelled; - - _cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled); - + del_timer_sync(&pmlmepriv->scan_to_timer); _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); } else { RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv))); @@ -1103,7 +1100,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) { - u8 timer_cancelled; struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL; struct sta_priv *pstapriv = &adapter->stapriv; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); @@ -1196,7 +1192,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) } /* s5. Cancle assoc_timer */ - _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled); + del_timer_sync(&pmlmepriv->assoc_timer); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("Cancle assoc_timer\n")); diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c index 6023a85d20e3..e1fd198eae30 100644 --- a/drivers/staging/rtl8188eu/core/rtw_p2p.c +++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c @@ -1404,9 +1404,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr result = attr_content; if (attr_content == P2P_STATUS_SUCCESS) { - u8 bcancelled = 0; - - _cancel_timer(&pwdinfo->restore_p2p_state_timer, &bcancelled); + del_timer_sync(&pwdinfo->restore_p2p_state_timer); /* Commented by Albert 20100911 */ /* Todo: Need to handle the case which both Intents are the same. */ diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 2d07deade14a..95131fe5c2b5 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -90,12 +90,6 @@ static inline void _set_timer(struct timer_list *ptimer, u32 delay_time) mod_timer(ptimer , (jiffies+(delay_time*HZ/1000))); } -static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled) -{ - del_timer_sync(ptimer); - *bcancelled = true;/* true ==1; false==0 */ -} - #define RTW_TIMER_HDL_ARGS void *FunctionContext #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #define RTW_DECLARE_TIMER_HDL(name) \