staging: r8188eu: remove os_dep/mlme_linux.c
authorMichael Straube <straube.linux@gmail.com>
Wed, 31 Aug 2022 05:36:39 +0000 (07:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2022 15:43:25 +0000 (17:43 +0200)
The function rtw_init_mlme_timer() is only used in core/rtw_mlme.c.
Move rtw_init_mlme_timer(), including the static functions it calls,
to core/rtw_mlme.c and make it static. Remove the now empty file
os_dep/mlme_linux.c.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220831053639.8559-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/Makefile
drivers/staging/r8188eu/core/rtw_mlme.c
drivers/staging/r8188eu/include/mlme_osdep.h
drivers/staging/r8188eu/os_dep/mlme_linux.c [deleted file]

index afafe6957155d70e6cb09e89a485422fcbb1e900..f5091a3ed4d285bdc90fe9c4df1243f61918e396 100644 (file)
@@ -22,7 +22,6 @@ r8188eu-y = \
                hal/usb_halinit.o \
                hal/usb_ops_linux.o \
                os_dep/ioctl_linux.o \
-               os_dep/mlme_linux.o \
                os_dep/os_intfs.o \
                os_dep/osdep_service.o \
                os_dep/usb_intf.o \
index bb317ba4bcd5781291a86f94a55efe0fef2efa68..8f21d34a317fe1328b3f193c38c93174608be128 100644 (file)
@@ -189,6 +189,37 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
        return ie + 8;
 }
 
+static void rtw_join_timeout_handler(struct timer_list *t)
+{
+       struct adapter *adapter = from_timer(adapter, t, mlmepriv.assoc_timer);
+
+       _rtw_join_timeout_handler(adapter);
+}
+
+static void _rtw_scan_timeout_handler(struct timer_list *t)
+{
+       struct adapter *adapter = from_timer(adapter, t, mlmepriv.scan_to_timer);
+
+       rtw_scan_timeout_handler(adapter);
+}
+
+static void _dynamic_check_timer_handlder(struct timer_list *t)
+{
+       struct adapter *adapter = from_timer(adapter, t, mlmepriv.dynamic_chk_timer);
+
+       rtw_dynamic_check_timer_handlder(adapter);
+       _set_timer(&adapter->mlmepriv.dynamic_chk_timer, 2000);
+}
+
+static void rtw_init_mlme_timer(struct adapter *padapter)
+{
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+
+       timer_setup(&pmlmepriv->assoc_timer, rtw_join_timeout_handler, 0);
+       timer_setup(&pmlmepriv->scan_to_timer, _rtw_scan_timeout_handler, 0);
+       timer_setup(&pmlmepriv->dynamic_chk_timer, _dynamic_check_timer_handlder, 0);
+}
+
 int rtw_init_mlme_priv(struct adapter *padapter)/* struct      mlme_priv *pmlmepriv) */
 {
        int     i;
index d5e367e2d0de8e93fd4dce59bd6a49869563b18c..1fa66c5e3c9c4ef3dd2159f11f2297e2c952da77 100644 (file)
@@ -7,8 +7,6 @@
 #include "osdep_service.h"
 #include "drv_types.h"
 
-void rtw_init_mlme_timer(struct adapter *padapter);
-
 void indicate_wx_scan_complete_event(struct adapter *padapter);
 
 #endif /* _MLME_OSDEP_H_ */
diff --git a/drivers/staging/r8188eu/os_dep/mlme_linux.c b/drivers/staging/r8188eu/os_dep/mlme_linux.c
deleted file mode 100644 (file)
index 2f8f866..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2011 Realtek Corporation. i*/
-
-#define _MLME_OSDEP_C_
-
-#include "../include/osdep_service.h"
-#include "../include/drv_types.h"
-#include "../include/mlme_osdep.h"
-
-static void rtw_join_timeout_handler(struct timer_list *t)
-{
-       struct adapter *adapter = from_timer(adapter, t, mlmepriv.assoc_timer);
-
-       _rtw_join_timeout_handler(adapter);
-}
-
-static void _rtw_scan_timeout_handler(struct timer_list *t)
-{
-       struct adapter *adapter = from_timer(adapter, t, mlmepriv.scan_to_timer);
-
-       rtw_scan_timeout_handler(adapter);
-}
-
-static void _dynamic_check_timer_handlder(struct timer_list *t)
-{
-       struct adapter *adapter = from_timer(adapter, t, mlmepriv.dynamic_chk_timer);
-
-       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;
-
-       timer_setup(&pmlmepriv->assoc_timer, rtw_join_timeout_handler, 0);
-       timer_setup(&pmlmepriv->scan_to_timer, _rtw_scan_timeout_handler, 0);
-       timer_setup(&pmlmepriv->dynamic_chk_timer, _dynamic_check_timer_handlder, 0);
-}