linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c
@ 2022-08-31  5:36 Michael Straube
  2022-08-31  5:36 ` [PATCH 1/2] staging: r8188eu: make two functions static Michael Straube
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Straube @ 2022-08-31  5:36 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

This series moves the functions from os_dep/mlme_linux.c to
core/rtw_mlme.c and removes os_dep/mlme_linux.c.

Tested on x86_64 with Inter-Tech DMG-02.

Michael Straube (2):
  staging: r8188eu: make two functions static
  staging: r8188eu: remove os_dep/mlme_linux.c

 drivers/staging/r8188eu/Makefile             |  1 -
 drivers/staging/r8188eu/core/rtw_mlme.c      | 31 ++++++++++++++++
 drivers/staging/r8188eu/include/mlme_osdep.h |  2 -
 drivers/staging/r8188eu/include/rtw_mlme.h   |  2 -
 drivers/staging/r8188eu/os_dep/mlme_linux.c  | 39 --------------------
 5 files changed, 31 insertions(+), 44 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/os_dep/mlme_linux.c

-- 
2.37.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] staging: r8188eu: make two functions static
  2022-08-31  5:36 [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Michael Straube
@ 2022-08-31  5:36 ` Michael Straube
  2022-08-31  5:36 ` [PATCH 2/2] staging: r8188eu: remove os_dep/mlme_linux.c Michael Straube
  2022-08-31 18:55 ` [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Philipp Hortmann
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-08-31  5:36 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

The functions rtw_join_timeout_handler() and
_rtw_scan_timeout_handler() are only used in os_dep/mlme_linux.c.
Make them static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/rtw_mlme.h  | 2 --
 drivers/staging/r8188eu/os_dep/mlme_linux.c | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index e8168e36fac2..d827ea7d841b 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -433,8 +433,6 @@ void indicate_wx_scan_complete_event(struct adapter *padapter);
 void rtw_indicate_wx_assoc_event(struct adapter *padapter);
 void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
 int event_thread(void *context);
-void rtw_join_timeout_handler (struct timer_list *t);
-void _rtw_scan_timeout_handler (struct timer_list *t);
 void rtw_free_network_queue(struct adapter *adapter, u8 isfreeall);
 int rtw_init_mlme_priv(struct adapter *adapter);
 void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv);
diff --git a/drivers/staging/r8188eu/os_dep/mlme_linux.c b/drivers/staging/r8188eu/os_dep/mlme_linux.c
index 5bd2b2c31342..2f8f866d5362 100644
--- a/drivers/staging/r8188eu/os_dep/mlme_linux.c
+++ b/drivers/staging/r8188eu/os_dep/mlme_linux.c
@@ -7,14 +7,14 @@
 #include "../include/drv_types.h"
 #include "../include/mlme_osdep.h"
 
-void rtw_join_timeout_handler (struct timer_list *t)
+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);
 }
 
-void _rtw_scan_timeout_handler (struct timer_list *t)
+static void _rtw_scan_timeout_handler(struct timer_list *t)
 {
 	struct adapter *adapter = from_timer(adapter, t, mlmepriv.scan_to_timer);
 
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] staging: r8188eu: remove os_dep/mlme_linux.c
  2022-08-31  5:36 [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Michael Straube
  2022-08-31  5:36 ` [PATCH 1/2] staging: r8188eu: make two functions static Michael Straube
@ 2022-08-31  5:36 ` Michael Straube
  2022-08-31 18:55 ` [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Philipp Hortmann
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-08-31  5:36 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

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.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/Makefile             |  1 -
 drivers/staging/r8188eu/core/rtw_mlme.c      | 31 ++++++++++++++++
 drivers/staging/r8188eu/include/mlme_osdep.h |  2 -
 drivers/staging/r8188eu/os_dep/mlme_linux.c  | 39 --------------------
 4 files changed, 31 insertions(+), 42 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/os_dep/mlme_linux.c

diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index afafe6957155..f5091a3ed4d2 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -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 \
diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index bb317ba4bcd5..8f21d34a317f 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -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;
diff --git a/drivers/staging/r8188eu/include/mlme_osdep.h b/drivers/staging/r8188eu/include/mlme_osdep.h
index d5e367e2d0de..1fa66c5e3c9c 100644
--- a/drivers/staging/r8188eu/include/mlme_osdep.h
+++ b/drivers/staging/r8188eu/include/mlme_osdep.h
@@ -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
index 2f8f866d5362..000000000000
--- a/drivers/staging/r8188eu/os_dep/mlme_linux.c
+++ /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);
-}
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c
  2022-08-31  5:36 [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Michael Straube
  2022-08-31  5:36 ` [PATCH 1/2] staging: r8188eu: make two functions static Michael Straube
  2022-08-31  5:36 ` [PATCH 2/2] staging: r8188eu: remove os_dep/mlme_linux.c Michael Straube
@ 2022-08-31 18:55 ` Philipp Hortmann
  2 siblings, 0 replies; 4+ messages in thread
From: Philipp Hortmann @ 2022-08-31 18:55 UTC (permalink / raw)
  To: Michael Straube, gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel

On 8/31/22 07:36, Michael Straube wrote:
> This series moves the functions from os_dep/mlme_linux.c to
> core/rtw_mlme.c and removes os_dep/mlme_linux.c.
> 
> Tested on x86_64 with Inter-Tech DMG-02.
> 
> Michael Straube (2):
>    staging: r8188eu: make two functions static
>    staging: r8188eu: remove os_dep/mlme_linux.c
> 
>   drivers/staging/r8188eu/Makefile             |  1 -
>   drivers/staging/r8188eu/core/rtw_mlme.c      | 31 ++++++++++++++++
>   drivers/staging/r8188eu/include/mlme_osdep.h |  2 -
>   drivers/staging/r8188eu/include/rtw_mlme.h   |  2 -
>   drivers/staging/r8188eu/os_dep/mlme_linux.c  | 39 --------------------
>   5 files changed, 31 insertions(+), 44 deletions(-)
>   delete mode 100644 drivers/staging/r8188eu/os_dep/mlme_linux.c
> 


Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-31 18:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  5:36 [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Michael Straube
2022-08-31  5:36 ` [PATCH 1/2] staging: r8188eu: make two functions static Michael Straube
2022-08-31  5:36 ` [PATCH 2/2] staging: r8188eu: remove os_dep/mlme_linux.c Michael Straube
2022-08-31 18:55 ` [PATCH 0/2] staging: r8188eu: migrate os_dep/mlme_linux.c Philipp Hortmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).