]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync()
authornavin patidar <navin.patidar@gmail.com>
Sun, 22 Jun 2014 08:51:46 +0000 (14:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:27:15 +0000 (20:27 -0400)
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/core/rtw_p2p.c
drivers/staging/rtl8188eu/include/osdep_service.h

index 556d17d2979725b43db76ea820270e3b45e4efe0..aeaa873bfeb1c500edcff29b12e7ed9cec5afb0c 100644 (file)
@@ -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);
 
index c03442d97673cb47c8fa03fc07cc22b8dcdee175..0cb9e152cc5ec86020fc820ccca5a0f264ba4d24 100644 (file)
@@ -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"));
 
index 6023a85d20e36bd08700003f2d0138e29bca0f40..e1fd198eae30aad63300a69fce521e321d9f288d 100644 (file)
@@ -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. */
index 2d07deade14a43eed91cb4667eed7728d8da3db0..95131fe5c2b54274ad1e95c27372e81e4fc93a75 100644 (file)
@@ -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) \