linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops
@ 2021-09-04 12:40 Michael Straube
  2021-09-04 12:40 ` [PATCH 1/6] staging: r8188eu: remove intf_chip_configure " Michael Straube
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Getting rid of the hal layer is on the todo list. This series
removes some functions from hal_ops and make the driver call the
pointed functions directly.

Tested with Inter-Tech DMG-02.

Michael Straube (6):
  staging: r8188eu: remove intf_chip_configure from hal_ops
  staging: r8188eu: remove read_adapter_info from hal_ops
  staging: r8188eu: remove read_chip_version from hal_ops
  staging: r8188eu: remove wrapper around ReadChipVersion8188E()
  staging: r8188eu: remove GetHalODMVarHandler from hal_ops
  staging: r8188eu: remove init_default_value from hal_ops

 drivers/staging/r8188eu/hal/hal_intf.c        | 33 -------------------
 .../staging/r8188eu/hal/rtl8188e_hal_init.c   | 16 +--------
 drivers/staging/r8188eu/hal/usb_halinit.c     | 10 ++----
 drivers/staging/r8188eu/include/hal_intf.h    | 22 +++----------
 .../staging/r8188eu/include/rtl8188e_hal.h    |  2 ++
 drivers/staging/r8188eu/os_dep/os_intfs.c     |  4 +--
 drivers/staging/r8188eu/os_dep/usb_intf.c     |  7 ++--
 7 files changed, 16 insertions(+), 78 deletions(-)

-- 
2.33.0


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

* [PATCH 1/6] staging: r8188eu: remove intf_chip_configure from hal_ops
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
@ 2021-09-04 12:40 ` Michael Straube
  2021-09-04 12:40 ` [PATCH 2/6] staging: r8188eu: remove read_adapter_info " Michael Straube
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Remove intf_chip_configure from hal_ops and remove its wrapper
rtw_hal_chip_configure(). Call rtl8188eu_interface_configure()
directly instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/hal_intf.c     | 6 ------
 drivers/staging/r8188eu/hal/usb_halinit.c  | 3 +--
 drivers/staging/r8188eu/include/hal_intf.h | 6 +++---
 drivers/staging/r8188eu/os_dep/usb_intf.c  | 2 +-
 4 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index bcc77da06c08..f52c77279f3d 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_chip_configure(struct adapter *adapt)
-{
-	if (adapt->HalFunc.intf_chip_configure)
-		adapt->HalFunc.intf_chip_configure(adapt);
-}
-
 void rtw_hal_read_chip_info(struct adapter *adapt)
 {
 	if (adapt->HalFunc.read_adapter_info)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 147c51255878..df1887bf29eb 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -60,7 +60,7 @@ static bool HalUsbSetQueuePipeMapping8188EUsb(struct adapter *adapt, u8 NumInPip
 	return result;
 }
 
-static void rtl8188eu_interface_configure(struct adapter *adapt)
+void rtl8188eu_interface_configure(struct adapter *adapt)
 {
 	struct hal_data_8188e	*haldata	= GET_HAL_DATA(adapt);
 	struct dvobj_priv	*pdvobjpriv = adapter_to_dvobj(adapt);
@@ -2250,7 +2250,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 	halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
 
 	halfunc->init_default_value = &rtl8188eu_init_default_value;
-	halfunc->intf_chip_configure = &rtl8188eu_interface_configure;
 	halfunc->read_adapter_info = &ReadAdapterInfo8188EU;
 
 	halfunc->SetHwRegHandler = &SetHwReg8188EU;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 5f6ef4d6333a..6740a6570e6a 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -152,8 +152,6 @@ struct hal_ops {
 
 	void	(*init_default_value)(struct adapter *padapter);
 
-	void	(*intf_chip_configure)(struct adapter *padapter);
-
 	void	(*read_adapter_info)(struct adapter *padapter);
 
 	void	(*enable_interrupt)(struct adapter *padapter);
@@ -267,6 +265,9 @@ struct hal_ops {
 #define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
 
 void rtl8188eu_set_hal_ops(struct adapter *padapter);
+
+void rtl8188eu_interface_configure(struct adapter *adapt);
+
 void rtw_hal_def_value_init(struct adapter *padapter);
 
 void	rtw_hal_free_data(struct adapter *padapter);
@@ -283,7 +284,6 @@ void rtw_hal_stop(struct adapter *padapter);
 void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 
-void rtw_hal_chip_configure(struct adapter *padapter);
 void rtw_hal_read_chip_info(struct adapter *padapter);
 void rtw_hal_read_chip_version(struct adapter *padapter);
 
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index bb85ab77fd26..d4765205ae26 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -602,7 +602,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 	rtw_hal_read_chip_version(padapter);
 
 	/* step usb endpoint mapping */
-	rtw_hal_chip_configure(padapter);
+	rtl8188eu_interface_configure(padapter);
 
 	/* step read efuse/eeprom data and get mac_addr */
 	rtw_hal_read_chip_info(padapter);
-- 
2.33.0


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

* [PATCH 2/6] staging: r8188eu: remove read_adapter_info from hal_ops
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
  2021-09-04 12:40 ` [PATCH 1/6] staging: r8188eu: remove intf_chip_configure " Michael Straube
@ 2021-09-04 12:40 ` Michael Straube
  2021-09-04 12:40 ` [PATCH 3/6] staging: r8188eu: remove read_chip_version " Michael Straube
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Remove read_adapter_info from hal_ops and remove its wrapper
rtw_hal_read_chip_info(). Call ReadAdapterInfo8188EU() directly
instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/hal_intf.c     | 6 ------
 drivers/staging/r8188eu/hal/usb_halinit.c  | 3 +--
 drivers/staging/r8188eu/include/hal_intf.h | 4 +---
 drivers/staging/r8188eu/os_dep/usb_intf.c  | 2 +-
 4 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index f52c77279f3d..f58dd3da6c13 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_read_chip_info(struct adapter *adapt)
-{
-	if (adapt->HalFunc.read_adapter_info)
-		adapt->HalFunc.read_adapter_info(adapt);
-}
-
 void rtw_hal_read_chip_version(struct adapter *adapt)
 {
 	if (adapt->HalFunc.read_chip_version)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index df1887bf29eb..d34d26de69d9 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1215,7 +1215,7 @@ static int _ReadAdapterInfo8188EU(struct adapter *Adapter)
 	return _SUCCESS;
 }
 
-static void ReadAdapterInfo8188EU(struct adapter *Adapter)
+void ReadAdapterInfo8188EU(struct adapter *Adapter)
 {
 	/*  Read EEPROM size before call any EEPROM function */
 	Adapter->EepromAddressSize = GetEEPROMSize8188E(Adapter);
@@ -2250,7 +2250,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 	halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
 
 	halfunc->init_default_value = &rtl8188eu_init_default_value;
-	halfunc->read_adapter_info = &ReadAdapterInfo8188EU;
 
 	halfunc->SetHwRegHandler = &SetHwReg8188EU;
 	halfunc->GetHwRegHandler = &GetHwReg8188EU;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 6740a6570e6a..9845b6f7378e 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -152,8 +152,6 @@ struct hal_ops {
 
 	void	(*init_default_value)(struct adapter *padapter);
 
-	void	(*read_adapter_info)(struct adapter *padapter);
-
 	void	(*enable_interrupt)(struct adapter *padapter);
 	void	(*disable_interrupt)(struct adapter *padapter);
 	s32	(*interrupt_handler)(struct adapter *padapter);
@@ -267,6 +265,7 @@ struct hal_ops {
 void rtl8188eu_set_hal_ops(struct adapter *padapter);
 
 void rtl8188eu_interface_configure(struct adapter *adapt);
+void ReadAdapterInfo8188EU(struct adapter *Adapter);
 
 void rtw_hal_def_value_init(struct adapter *padapter);
 
@@ -284,7 +283,6 @@ void rtw_hal_stop(struct adapter *padapter);
 void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 
-void rtw_hal_read_chip_info(struct adapter *padapter);
 void rtw_hal_read_chip_version(struct adapter *padapter);
 
 u8 rtw_hal_set_def_var(struct adapter *padapter,
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index d4765205ae26..bf7ef56d12e3 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -605,7 +605,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 	rtl8188eu_interface_configure(padapter);
 
 	/* step read efuse/eeprom data and get mac_addr */
-	rtw_hal_read_chip_info(padapter);
+	ReadAdapterInfo8188EU(padapter);
 
 	/* step 5. */
 	if (rtw_init_drv_sw(padapter) == _FAIL)
-- 
2.33.0


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

* [PATCH 3/6] staging: r8188eu: remove read_chip_version from hal_ops
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
  2021-09-04 12:40 ` [PATCH 1/6] staging: r8188eu: remove intf_chip_configure " Michael Straube
  2021-09-04 12:40 ` [PATCH 2/6] staging: r8188eu: remove read_adapter_info " Michael Straube
@ 2021-09-04 12:40 ` Michael Straube
  2021-09-04 12:40 ` [PATCH 4/6] staging: r8188eu: remove wrapper around ReadChipVersion8188E() Michael Straube
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Remove read_chip_version from hal_ops and remove its wrapper
rtw_hal_read_chip_version(). Call rtl8188e_read_chip_version()
directly instead

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/hal_intf.c          | 6 ------
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 +---
 drivers/staging/r8188eu/include/hal_intf.h      | 3 ---
 drivers/staging/r8188eu/include/rtl8188e_hal.h  | 2 ++
 drivers/staging/r8188eu/os_dep/usb_intf.c       | 3 ++-
 5 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index f58dd3da6c13..1a59644679f1 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_read_chip_version(struct adapter *adapt)
-{
-	if (adapt->HalFunc.read_chip_version)
-		adapt->HalFunc.read_chip_version(adapt);
-}
-
 void rtw_hal_def_value_init(struct adapter *adapt)
 {
 	if (adapt->HalFunc.init_default_value)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 1adaf472a116..24bc8ba8726e 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1730,7 +1730,7 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
 	return ChipVersion;
 }
 
-static void rtl8188e_read_chip_version(struct adapter *padapter)
+void rtl8188e_read_chip_version(struct adapter *padapter)
 {
 	ReadChipVersion8188E(padapter);
 }
@@ -1798,8 +1798,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
 	pHalFunc->dm_init = &rtl8188e_init_dm_priv;
 	pHalFunc->dm_deinit = &rtl8188e_deinit_dm_priv;
 
-	pHalFunc->read_chip_version = &rtl8188e_read_chip_version;
-
 	pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E;
 	pHalFunc->set_channel_handler = &PHY_SwChnl8188E;
 
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 9845b6f7378e..7046f4b222b6 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -148,7 +148,6 @@ struct hal_ops {
 
 	void	(*dm_init)(struct adapter *padapter);
 	void	(*dm_deinit)(struct adapter *padapter);
-	void	(*read_chip_version)(struct adapter *padapter);
 
 	void	(*init_default_value)(struct adapter *padapter);
 
@@ -283,8 +282,6 @@ void rtw_hal_stop(struct adapter *padapter);
 void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 
-void rtw_hal_read_chip_version(struct adapter *padapter);
-
 u8 rtw_hal_set_def_var(struct adapter *padapter,
 		       enum hal_def_variable eVariable, void *pValue);
 u8 rtw_hal_get_def_var(struct adapter *padapter,
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 103991b6ec82..5cd441e8e16b 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -437,6 +437,8 @@ bool HalDetectPwrDownMode88E(struct adapter *Adapter);
 void Hal_InitChannelPlan(struct adapter *padapter);
 void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
 
+void rtl8188e_read_chip_version(struct adapter *padapter);
+
 void rtl8188e_clone_haldata(struct adapter *dst, struct adapter *src);
 void rtl8188e_start_thread(struct adapter *padapter);
 void rtl8188e_stop_thread(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index bf7ef56d12e3..b7129e8b9924 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -14,6 +14,7 @@
 #include "../include/usb_ops.h"
 #include "../include/usb_osintf.h"
 #include "../include/rtw_ioctl.h"
+#include "../include/rtl8188e_hal.h"
 
 int ui_pid[3] = {0, 0, 0};
 
@@ -599,7 +600,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 	rtw_init_io_priv(padapter, usb_set_intf_ops);
 
 	/* step read_chip_version */
-	rtw_hal_read_chip_version(padapter);
+	rtl8188e_read_chip_version(padapter);
 
 	/* step usb endpoint mapping */
 	rtl8188eu_interface_configure(padapter);
-- 
2.33.0


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

* [PATCH 4/6] staging: r8188eu: remove wrapper around ReadChipVersion8188E()
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
                   ` (2 preceding siblings ...)
  2021-09-04 12:40 ` [PATCH 3/6] staging: r8188eu: remove read_chip_version " Michael Straube
@ 2021-09-04 12:40 ` Michael Straube
  2021-09-04 12:40 ` [PATCH 5/6] staging: r8188eu: remove GetHalODMVarHandler from hal_ops Michael Straube
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Function ReadChipVersion8188E() is only called by the wrapper
rtl8188e_read_chip_version(). Rename ReadChipVersion8188E()
to rtl8188e_read_chip_version() and change the return type to
void since the return value is never used.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 24bc8ba8726e..64a0223f0ee0 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1689,7 +1689,7 @@ static int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8
 	return ret;
 }
 
-static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
+void rtl8188e_read_chip_version(struct adapter *padapter)
 {
 	u32				value32;
 	struct HAL_VERSION		ChipVersion;
@@ -1726,13 +1726,6 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
 	}
 
 	MSG_88E("RF_Type is %x!!\n", pHalData->rf_type);
-
-	return ChipVersion;
-}
-
-void rtl8188e_read_chip_version(struct adapter *padapter)
-{
-	ReadChipVersion8188E(padapter);
 }
 
 static void rtl8188e_GetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
-- 
2.33.0


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

* [PATCH 5/6] staging: r8188eu: remove GetHalODMVarHandler from hal_ops
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
                   ` (3 preceding siblings ...)
  2021-09-04 12:40 ` [PATCH 4/6] staging: r8188eu: remove wrapper around ReadChipVersion8188E() Michael Straube
@ 2021-09-04 12:40 ` Michael Straube
  2021-09-04 12:40 ` [PATCH 6/6] staging: r8188eu: remove init_default_value " Michael Straube
  2021-09-04 18:27 ` [PATCH 0/6] staging: r8188eu: remove some functions " Phillip Potter
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Remove GetHalODMVarHandler from hal_ops ant remove its wrapper
rtw_hal_get_odm_var(), both are unused.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/hal_intf.c          | 9 ---------
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 -----
 drivers/staging/r8188eu/include/hal_intf.h      | 6 ------
 3 files changed, 20 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 1a59644679f1..9069b52f83ff 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -124,15 +124,6 @@ void rtw_hal_set_odm_var(struct adapter *adapt,
 						      val1, set);
 }
 
-void rtw_hal_get_odm_var(struct adapter *adapt,
-			 enum hal_odm_variable var, void *val1,
-			 bool set)
-{
-	if (adapt->HalFunc.GetHalODMVarHandler)
-		adapt->HalFunc.GetHalODMVarHandler(adapt, var,
-						      val1, set);
-}
-
 void rtw_hal_enable_interrupt(struct adapter *adapt)
 {
 	if (adapt->HalFunc.enable_interrupt)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 64a0223f0ee0..09f7bc010ba7 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1728,10 +1728,6 @@ void rtl8188e_read_chip_version(struct adapter *padapter)
 	MSG_88E("RF_Type is %x!!\n", pHalData->rf_type);
 }
 
-static void rtl8188e_GetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
-{
-}
-
 static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
 {
 	struct hal_data_8188e	*pHalData = GET_HAL_DATA(Adapter);
@@ -1823,7 +1819,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
 	pHalFunc->sreset_linked_status_check  = &rtl8188e_sreset_linked_status_check;
 	pHalFunc->sreset_get_wifi_status  = &sreset_get_wifi_status;
 
-	pHalFunc->GetHalODMVarHandler = &rtl8188e_GetHalODMVar;
 	pHalFunc->SetHalODMVarHandler = &rtl8188e_SetHalODMVar;
 
 	pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 7046f4b222b6..d5cf9b0d9a77 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -174,9 +174,6 @@ struct hal_ops {
 				       enum hal_def_variable eVariable,
 				       void *pValue);
 
-	void	(*GetHalODMVarHandler)(struct adapter *padapter,
-				       enum hal_odm_variable eVariable,
-				       void *pValue1, bool bSet);
 	void	(*SetHalODMVarHandler)(struct adapter *padapter,
 				       enum hal_odm_variable eVariable,
 				       void *pValue1, bool bSet);
@@ -290,9 +287,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,
 void rtw_hal_set_odm_var(struct adapter *padapter,
 			 enum hal_odm_variable eVariable, void *pValue1,
 			 bool bSet);
-void rtw_hal_get_odm_var(struct adapter *padapter,
-			 enum hal_odm_variable eVariable,
-			 void *pValue1, bool bSet);
 
 void rtw_hal_enable_interrupt(struct adapter *padapter);
 void rtw_hal_disable_interrupt(struct adapter *padapter);
-- 
2.33.0


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

* [PATCH 6/6] staging: r8188eu: remove init_default_value from hal_ops
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
                   ` (4 preceding siblings ...)
  2021-09-04 12:40 ` [PATCH 5/6] staging: r8188eu: remove GetHalODMVarHandler from hal_ops Michael Straube
@ 2021-09-04 12:40 ` Michael Straube
  2021-09-04 18:27 ` [PATCH 0/6] staging: r8188eu: remove some functions " Phillip Potter
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 12:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
	linux-kernel, Michael Straube

Remove init_default_value from hal_ops and remove its wrapper
rtw_hal_def_value_init(). Call rtl8188eu_init_default_value()
directly instead

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/hal_intf.c     | 6 ------
 drivers/staging/r8188eu/hal/usb_halinit.c  | 4 +---
 drivers/staging/r8188eu/include/hal_intf.h | 5 +----
 drivers/staging/r8188eu/os_dep/os_intfs.c  | 4 ++--
 4 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 9069b52f83ff..c06b299cf266 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_def_value_init(struct adapter *adapt)
-{
-	if (adapt->HalFunc.init_default_value)
-		adapt->HalFunc.init_default_value(adapt);
-}
-
 void rtw_hal_free_data(struct adapter *adapt)
 {
 	if (adapt->HalFunc.free_hal_data)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index d34d26de69d9..679f9f6e6dbe 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2196,7 +2196,7 @@ static void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt)
 	rtw_write8(adapt, bcn_ctrl_reg, rtw_read8(adapt, bcn_ctrl_reg) | BIT(1));
 }
 
-static void rtl8188eu_init_default_value(struct adapter *adapt)
+void rtl8188eu_init_default_value(struct adapter *adapt)
 {
 	struct hal_data_8188e *haldata;
 	struct pwrctrl_priv *pwrctrlpriv;
@@ -2249,8 +2249,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 	halfunc->InitSwLeds = &rtl8188eu_InitSwLeds;
 	halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
 
-	halfunc->init_default_value = &rtl8188eu_init_default_value;
-
 	halfunc->SetHwRegHandler = &SetHwReg8188EU;
 	halfunc->GetHwRegHandler = &GetHwReg8188EU;
 	halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index d5cf9b0d9a77..b3ea9fc041c6 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -149,8 +149,6 @@ struct hal_ops {
 	void	(*dm_init)(struct adapter *padapter);
 	void	(*dm_deinit)(struct adapter *padapter);
 
-	void	(*init_default_value)(struct adapter *padapter);
-
 	void	(*enable_interrupt)(struct adapter *padapter);
 	void	(*disable_interrupt)(struct adapter *padapter);
 	s32	(*interrupt_handler)(struct adapter *padapter);
@@ -262,8 +260,7 @@ void rtl8188eu_set_hal_ops(struct adapter *padapter);
 
 void rtl8188eu_interface_configure(struct adapter *adapt);
 void ReadAdapterInfo8188EU(struct adapter *Adapter);
-
-void rtw_hal_def_value_init(struct adapter *padapter);
+void rtl8188eu_init_default_value(struct adapter *adapt);
 
 void	rtw_hal_free_data(struct adapter *padapter);
 
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index c3ac0ae153f8..49ccdde1b0bb 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -782,7 +782,7 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 	rtw_update_registrypriv_dev_network(padapter);
 
 	/* hal_priv */
-	rtw_hal_def_value_init(padapter);
+	rtl8188eu_init_default_value(padapter);
 
 	/* misc. */
 	padapter->bReadPortCancel = false;
@@ -801,7 +801,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
 	struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
 
 	/* hal_priv */
-	rtw_hal_def_value_init(padapter);
+	rtl8188eu_init_default_value(padapter);
 	padapter->bReadPortCancel = false;
 	padapter->bWritePortCancel = false;
 	padapter->bRxRSSIDisplay = 0;
-- 
2.33.0


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

* Re: [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops
  2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
                   ` (5 preceding siblings ...)
  2021-09-04 12:40 ` [PATCH 6/6] staging: r8188eu: remove init_default_value " Michael Straube
@ 2021-09-04 18:27 ` Phillip Potter
  2021-09-04 19:06   ` Michael Straube
  6 siblings, 1 reply; 9+ messages in thread
From: Phillip Potter @ 2021-09-04 18:27 UTC (permalink / raw)
  To: Michael Straube
  Cc: Greg KH, Larry Finger, Martin Kaiser, Fabio M. De Francesco,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On Sat, 4 Sept 2021 at 13:40, Michael Straube <straube.linux@gmail.com> wrote:
>
> Getting rid of the hal layer is on the todo list. This series
> removes some functions from hal_ops and make the driver call the
> pointed functions directly.
>
> Tested with Inter-Tech DMG-02.
>
> Michael Straube (6):
>   staging: r8188eu: remove intf_chip_configure from hal_ops
>   staging: r8188eu: remove read_adapter_info from hal_ops
>   staging: r8188eu: remove read_chip_version from hal_ops
>   staging: r8188eu: remove wrapper around ReadChipVersion8188E()
>   staging: r8188eu: remove GetHalODMVarHandler from hal_ops
>   staging: r8188eu: remove init_default_value from hal_ops
>
>  drivers/staging/r8188eu/hal/hal_intf.c        | 33 -------------------
>  .../staging/r8188eu/hal/rtl8188e_hal_init.c   | 16 +--------
>  drivers/staging/r8188eu/hal/usb_halinit.c     | 10 ++----
>  drivers/staging/r8188eu/include/hal_intf.h    | 22 +++----------
>  .../staging/r8188eu/include/rtl8188e_hal.h    |  2 ++
>  drivers/staging/r8188eu/os_dep/os_intfs.c     |  4 +--
>  drivers/staging/r8188eu/os_dep/usb_intf.c     |  7 ++--
>  7 files changed, 16 insertions(+), 78 deletions(-)
>
> --
> 2.33.0
>

Dear Michael,

Looks good to me, built and tested here:
Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

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

* Re: [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops
  2021-09-04 18:27 ` [PATCH 0/6] staging: r8188eu: remove some functions " Phillip Potter
@ 2021-09-04 19:06   ` Michael Straube
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Straube @ 2021-09-04 19:06 UTC (permalink / raw)
  To: Phillip Potter
  Cc: Greg KH, Larry Finger, Martin Kaiser, Fabio M. De Francesco,
	open list:STAGING SUBSYSTEM, Linux Kernel Mailing List

On 9/4/21 20:27, Phillip Potter wrote:
> On Sat, 4 Sept 2021 at 13:40, Michael Straube <straube.linux@gmail.com> wrote:
>>
>> Getting rid of the hal layer is on the todo list. This series
>> removes some functions from hal_ops and make the driver call the
>> pointed functions directly.
>>
>> Tested with Inter-Tech DMG-02.
>>
>> Michael Straube (6):
>>    staging: r8188eu: remove intf_chip_configure from hal_ops
>>    staging: r8188eu: remove read_adapter_info from hal_ops
>>    staging: r8188eu: remove read_chip_version from hal_ops
>>    staging: r8188eu: remove wrapper around ReadChipVersion8188E()
>>    staging: r8188eu: remove GetHalODMVarHandler from hal_ops
>>    staging: r8188eu: remove init_default_value from hal_ops
>>
>>   drivers/staging/r8188eu/hal/hal_intf.c        | 33 -------------------
>>   .../staging/r8188eu/hal/rtl8188e_hal_init.c   | 16 +--------
>>   drivers/staging/r8188eu/hal/usb_halinit.c     | 10 ++----
>>   drivers/staging/r8188eu/include/hal_intf.h    | 22 +++----------
>>   .../staging/r8188eu/include/rtl8188e_hal.h    |  2 ++
>>   drivers/staging/r8188eu/os_dep/os_intfs.c     |  4 +--
>>   drivers/staging/r8188eu/os_dep/usb_intf.c     |  7 ++--
>>   7 files changed, 16 insertions(+), 78 deletions(-)
>>
>> --
>> 2.33.0
>>
> 
> Dear Michael,
> 
> Looks good to me, built and tested here:
> Acked-by: Phillip Potter <phil@philpotter.co.uk>
> 
> Regards,
> Phil
> 

Thanks for your review and testing Phillip.
Much appreciated.

Regards,
Michael

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

end of thread, other threads:[~2021-09-04 19:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 12:40 [PATCH 0/6] staging: r8188eu: remove some functions from hal_ops Michael Straube
2021-09-04 12:40 ` [PATCH 1/6] staging: r8188eu: remove intf_chip_configure " Michael Straube
2021-09-04 12:40 ` [PATCH 2/6] staging: r8188eu: remove read_adapter_info " Michael Straube
2021-09-04 12:40 ` [PATCH 3/6] staging: r8188eu: remove read_chip_version " Michael Straube
2021-09-04 12:40 ` [PATCH 4/6] staging: r8188eu: remove wrapper around ReadChipVersion8188E() Michael Straube
2021-09-04 12:40 ` [PATCH 5/6] staging: r8188eu: remove GetHalODMVarHandler from hal_ops Michael Straube
2021-09-04 12:40 ` [PATCH 6/6] staging: r8188eu: remove init_default_value " Michael Straube
2021-09-04 18:27 ` [PATCH 0/6] staging: r8188eu: remove some functions " Phillip Potter
2021-09-04 19:06   ` Michael Straube

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).