staging: rtl8188eu: Remove wrapper function _dynamic_check_timer_handlder()
authornavin patidar <navin.patidar@gmail.com>
Mon, 28 Jul 2014 17:41:25 +0000 (23:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jul 2014 00:16:09 +0000 (17:16 -0700)
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/include/rtw_mlme.h
drivers/staging/rtl8188eu/os_dep/mlme_linux.c

index d5b2f51..149c271 100644 (file)
@@ -1431,24 +1431,27 @@ static void rtw_auto_scan_handler(struct adapter *padapter)
        }
 }
 
-void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
+void rtw_dynamic_check_timer_handlder(void *function_context)
 {
+       struct adapter *adapter = (struct adapter *)function_context;
        struct registry_priv *pregistrypriv = &adapter->registrypriv;
 
        if (!adapter)
-               return;
+               goto exit;
        if (!adapter->hw_init_completed)
-               return;
+               goto exit;
        if ((adapter->bDriverStopped) || (adapter->bSurpriseRemoved))
-               return;
+               goto exit;
        if (adapter->net_closed)
-               return;
+               goto exit;
        rtw_dynamic_chk_wk_cmd(adapter);
 
        if (pregistrypriv->wifi_spec == 1) {
                /* auto site survey */
                rtw_auto_scan_handler(adapter);
        }
+exit:
+       _set_timer(&adapter->mlmepriv.dynamic_chk_timer, 2000);
 }
 
 #define RTW_SCAN_RESULT_EXPIRE 2000
index 8f5457b..8d83f7c 100644 (file)
@@ -554,7 +554,7 @@ void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
 void _rtw_join_timeout_handler(void *function_context);
 void rtw_scan_timeout_handler(void *function_context);
 
-void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
+void rtw_dynamic_check_timer_handlder(void *function_context);
 #define rtw_is_scan_deny(adapter) false
 #define rtw_clear_scan_deny(adapter) do {} while (0)
 #define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
index 0bfaa78..82b71fa 100644 (file)
 #include <drv_types.h>
 #include <mlme_osdep.h>
 
-static void _dynamic_check_timer_handlder(void *FunctionContext)
-{
-       struct adapter *adapter = (struct adapter *)FunctionContext;
-
-       if (adapter->registrypriv.mp_mode == 1)
-               return;
-       rtw_dynamic_check_timer_handlder(adapter);
-       _set_timer(&adapter->mlmepriv.dynamic_chk_timer, 2000);
-}
-
 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->scan_to_timer), padapter->pnetdev, rtw_scan_timeout_handler, padapter);
-       _init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter);
+       _init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, rtw_dynamic_check_timer_handlder, padapter);
 }
 
 void rtw_os_indicate_connect(struct adapter *adapter)