* [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops
@ 2021-09-06 18:52 Michael Straube
2021-09-06 18:52 ` [PATCH v2 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
` (39 more replies)
0 siblings, 40 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
In order to get rid of the HAL layer this series removes the next
bunch of function pointers from struct hal_ops.
Also it removes some empty functions and cleans up some minor style
issues I stumbled upon.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (40):
staging: r8188eu: remove InitSwLeds from hal_ops
staging: r8188eu: remove DeInitSwLeds from hal_ops
staging: r8188eu: remove dm_init from hal_ops
staging: r8188eu: remove dm_deinit from hal_ops
staging: r8188eu: remove SetHalODMVarHandler from hal_ops
staging: r8188eu: remove empty functions
staging: r8188eu: remove unused function rtw_interface_ps_func()
staging: r8188eu: remove interface_ps_func from hal_ops
staging: r8188eu: remove hal_dm_watchdog from hal_ops
staging: r8188eu: remove set_bwmode_handler from hal_ops
staging: r8188eu: remove set_channel_handler from hal_ops
staging: r8188eu: remove unused enum hal_intf_ps_func
staging: r8188eu: remove Add_RateATid from hal_ops
staging: r8188eu: remove hal_power_on from hal_ops
staging: r8188eu: remove sreset_init_value from hal_ops
staging: r8188eu: remove sreset_reset_value from hal_ops
staging: r8188eu: remove silentreset from hal_ops
staging: r8188eu: remove sreset_xmit_status_check from hal_ops
staging: r8188eu: remove sreset_linked_status_check from hal_ops
staging: r8188eu: remove sreset_get_wifi_status from hal_ops
staging: r8188eu: remove EfusePowerSwitch from hal_ops
staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E()
staging: r8188eu: remove wrapper Efuse_PowerSwitch()
staging: r8188eu: remove ReadEFuse from hal_ops
staging: r8188eu: remove EFUSEGetEfuseDefinition from hal_ops
staging: r8188eu: remove EfuseGetCurrentSize from hal_ops
staging: r8188eu: remove empty comments
staging: r8188eu: remove Efuse_PgPacketRead from hal_ops
staging: r8188eu: remove Efuse_PgPacketWrite from hal_ops
staging: r8188eu: remove Efuse_WordEnableDataWrite from hal_ops
staging: r8188eu: remove useless assignment
staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops
staging: r8188eu: remove AntDivCompareHandler from hal_ops
staging: r8188eu: remove empty function rtl8188e_start_thread()
staging: r8188eu: remove empty function rtl8188e_stop_thread()
staging: r8188eu: remove hal_notch_filter from hal_ops
staging: r8188eu: remove free_hal_data from hal_ops
staging: r8188eu: remove unused function rtl8188e_clone_haldata()
staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops
staging: r8188eu: remove UpdateHalRAMask8188EUsb from hal_ops
drivers/staging/r8188eu/core/rtw_ap.c | 9 +-
drivers/staging/r8188eu/core/rtw_cmd.c | 6 +-
drivers/staging/r8188eu/core/rtw_efuse.c | 182 ++++--------------
drivers/staging/r8188eu/core/rtw_mlme.c | 7 +-
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 +-
drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 18 +-
drivers/staging/r8188eu/core/rtw_p2p.c | 4 +-
drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 -
drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +-
drivers/staging/r8188eu/core/rtw_wlan_util.c | 8 +-
drivers/staging/r8188eu/hal/hal_intf.c | 170 +---------------
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 123 +++---------
drivers/staging/r8188eu/hal/usb_halinit.c | 36 +---
drivers/staging/r8188eu/include/hal_intf.h | 123 ++----------
.../staging/r8188eu/include/rtl8188e_hal.h | 5 -
drivers/staging/r8188eu/include/rtw_efuse.h | 9 -
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 -
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 31 +--
drivers/staging/r8188eu/os_dep/os_intfs.c | 21 +-
19 files changed, 142 insertions(+), 627 deletions(-)
--
2.33.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [PATCH v2 01/40] staging: r8188eu: remove InitSwLeds from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 02/40] staging: r8188eu: remove DeInitSwLeds " Michael Straube
` (38 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove InitSwLeds from hal_ops and remove its wrapper
rtw_hal_sw_led_init(). Call rtl8188eu_InitSwLeds() 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 | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 3 ++-
drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ++--
5 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index e91db4f5886b..1848a7246d6d 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -25,12 +25,6 @@ void rtw_hal_dm_deinit(struct adapter *adapt)
adapt->HalFunc.dm_deinit(adapt);
}
-void rtw_hal_sw_led_init(struct adapter *adapt)
-{
- if (adapt->HalFunc.InitSwLeds)
- adapt->HalFunc.InitSwLeds(adapt);
-}
-
void rtw_hal_sw_led_deinit(struct adapter *adapt)
{
if (adapt->HalFunc.DeInitSwLeds)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 679f9f6e6dbe..86080d502636 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2246,7 +2246,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->init_recv_priv = &rtl8188eu_init_recv_priv;
halfunc->free_recv_priv = &rtl8188eu_free_recv_priv;
- halfunc->InitSwLeds = &rtl8188eu_InitSwLeds;
halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
halfunc->SetHwRegHandler = &SetHwReg8188EU;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 16d59d24d1b8..e240d5b2406f 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -143,7 +143,6 @@ struct hal_ops {
s32 (*init_recv_priv)(struct adapter *padapter);
void (*free_recv_priv)(struct adapter *padapter);
- void (*InitSwLeds)(struct adapter *padapter);
void (*DeInitSwLeds)(struct adapter *padapter);
void (*dm_init)(struct adapter *padapter);
@@ -256,7 +255,6 @@ void rtw_hal_free_data(struct adapter *padapter);
void rtw_hal_dm_init(struct adapter *padapter);
void rtw_hal_dm_deinit(struct adapter *padapter);
-void rtw_hal_sw_led_init(struct adapter *padapter);
void rtw_hal_sw_led_deinit(struct adapter *padapter);
u32 rtw_hal_power_on(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index bd637a667299..7c18b0adf740 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -15,6 +15,7 @@
#include "../include/rtw_mp_ioctl.h"
#include "../include/usb_ops.h"
#include "../include/rtl8188e_hal.h"
+#include "../include/rtl8188e_led.h"
#include "../include/rtw_mp.h"
#include "../include/rtw_iol.h"
@@ -3845,7 +3846,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
if (!memcmp(rereg_priv->old_ifname, "disable%d", 9)) {
padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed;
- rtw_hal_sw_led_init(padapter);
+ rtl8188eu_InitSwLeds(padapter);
rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode);
}
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 49ccdde1b0bb..7e0eaa3f7db6 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -9,9 +9,9 @@
#include "../include/recv_osdep.h"
#include "../include/hal_intf.h"
#include "../include/rtw_ioctl.h"
-
#include "../include/usb_osintf.h"
#include "../include/rtw_br_ext.h"
+#include "../include/rtl8188e_led.h"
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
@@ -887,7 +887,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
ret8 = rtw_init_default_value(padapter);
rtw_hal_dm_init(padapter);
- rtw_hal_sw_led_init(padapter);
+ rtl8188eu_InitSwLeds(padapter);
rtw_hal_sreset_init(padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 02/40] staging: r8188eu: remove DeInitSwLeds from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
2021-09-06 18:52 ` [PATCH v2 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 03/40] staging: r8188eu: remove dm_init " Michael Straube
` (37 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove DeInitSwLeds from hal_ops and remove its wrapper
rtw_hal_sw_led_deinit(). Call rtl8188eu_DeInitSwLeds() 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 | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 3 ---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +-
drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +-
5 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 1848a7246d6d..3c4c719fe9bc 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -25,12 +25,6 @@ void rtw_hal_dm_deinit(struct adapter *adapt)
adapt->HalFunc.dm_deinit(adapt);
}
-void rtw_hal_sw_led_deinit(struct adapter *adapt)
-{
- if (adapt->HalFunc.DeInitSwLeds)
- adapt->HalFunc.DeInitSwLeds(adapt);
-}
-
u32 rtw_hal_power_on(struct adapter *adapt)
{
if (adapt->HalFunc.hal_power_on)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 86080d502636..87aa12a6b5ba 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2246,7 +2246,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->init_recv_priv = &rtl8188eu_init_recv_priv;
halfunc->free_recv_priv = &rtl8188eu_free_recv_priv;
- halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
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 e240d5b2406f..a3da6e04d481 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -143,8 +143,6 @@ struct hal_ops {
s32 (*init_recv_priv)(struct adapter *padapter);
void (*free_recv_priv)(struct adapter *padapter);
- void (*DeInitSwLeds)(struct adapter *padapter);
-
void (*dm_init)(struct adapter *padapter);
void (*dm_deinit)(struct adapter *padapter);
@@ -255,7 +253,6 @@ void rtw_hal_free_data(struct adapter *padapter);
void rtw_hal_dm_init(struct adapter *padapter);
void rtw_hal_dm_deinit(struct adapter *padapter);
-void rtw_hal_sw_led_deinit(struct adapter *padapter);
u32 rtw_hal_power_on(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 7c18b0adf740..c7229878ee53 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -3862,7 +3862,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rereg_priv->old_bRegUseLed = padapter->ledpriv.bRegUseLed;
padapter->ledpriv.bRegUseLed = false;
- rtw_hal_sw_led_deinit(padapter);
+ rtl8188eu_DeInitSwLeds(padapter);
/* the interface is being "disabled", we can do deeper IPS */
rereg_priv->old_ips_mode = rtw_get_ips_mode_req(&padapter->pwrctrlpriv);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 7e0eaa3f7db6..43deffc29833 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -906,7 +906,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)
_cancel_timer_ex(&padapter->mlmepriv.dynamic_chk_timer);
/* cancel sw led timer */
- rtw_hal_sw_led_deinit(padapter);
+ rtl8188eu_DeInitSwLeds(padapter);
_cancel_timer_ex(&padapter->pwrctrlpriv.pwr_state_check_timer);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 03/40] staging: r8188eu: remove dm_init from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
2021-09-06 18:52 ` [PATCH v2 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
2021-09-06 18:52 ` [PATCH v2 02/40] staging: r8188eu: remove DeInitSwLeds " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 04/40] staging: r8188eu: remove dm_deinit " Michael Straube
` (36 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove dm_init from hal_ops and remove its wrapper rtw_hal_dm_init().
Call rtl8188e_init_dm_priv() 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 | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
drivers/staging/r8188eu/os_dep/os_intfs.c | 3 ++-
4 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 3c4c719fe9bc..a3b3dd11ba6e 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -12,12 +12,6 @@ void rtw_hal_free_data(struct adapter *adapt)
adapt->HalFunc.free_hal_data(adapt);
}
-void rtw_hal_dm_init(struct adapter *adapt)
-{
- if (adapt->HalFunc.dm_init)
- adapt->HalFunc.dm_init(adapt);
-}
-
void rtw_hal_dm_deinit(struct adapter *adapt)
{
/* cancel dm timer */
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 09f7bc010ba7..765c8c4321f1 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1784,7 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->dm_init = &rtl8188e_init_dm_priv;
pHalFunc->dm_deinit = &rtl8188e_deinit_dm_priv;
pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index a3da6e04d481..7d502701be27 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -143,7 +143,6 @@ struct hal_ops {
s32 (*init_recv_priv)(struct adapter *padapter);
void (*free_recv_priv)(struct adapter *padapter);
- void (*dm_init)(struct adapter *padapter);
void (*dm_deinit)(struct adapter *padapter);
void (*set_bwmode_handler)(struct adapter *padapter,
@@ -251,7 +250,6 @@ void rtl8188eu_init_default_value(struct adapter *adapt);
void rtw_hal_free_data(struct adapter *padapter);
-void rtw_hal_dm_init(struct adapter *padapter);
void rtw_hal_dm_deinit(struct adapter *padapter);
u32 rtw_hal_power_on(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 43deffc29833..c5dc02d30349 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -12,6 +12,7 @@
#include "../include/usb_osintf.h"
#include "../include/rtw_br_ext.h"
#include "../include/rtl8188e_led.h"
+#include "../include/rtl8188e_dm.h"
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
@@ -886,7 +887,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
ret8 = rtw_init_default_value(padapter);
- rtw_hal_dm_init(padapter);
+ rtl8188e_init_dm_priv(padapter);
rtl8188eu_InitSwLeds(padapter);
rtw_hal_sreset_init(padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 04/40] staging: r8188eu: remove dm_deinit from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (2 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 03/40] staging: r8188eu: remove dm_init " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 05/40] staging: r8188eu: remove SetHalODMVarHandler " Michael Straube
` (35 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove dm_deinit from hal_ops and remove its wrapper
rtw_hal_dm_deinit(). Call rtl8188e_deinit_dm_priv() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 7 -------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 --
drivers/staging/r8188eu/include/hal_intf.h | 4 ----
drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +-
4 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index a3b3dd11ba6e..d467e734a699 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -12,13 +12,6 @@ void rtw_hal_free_data(struct adapter *adapt)
adapt->HalFunc.free_hal_data(adapt);
}
-void rtw_hal_dm_deinit(struct adapter *adapt)
-{
- /* cancel dm timer */
- if (adapt->HalFunc.dm_deinit)
- adapt->HalFunc.dm_deinit(adapt);
-}
-
u32 rtw_hal_power_on(struct adapter *adapt)
{
if (adapt->HalFunc.hal_power_on)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 765c8c4321f1..355878ec270d 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1784,8 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->dm_deinit = &rtl8188e_deinit_dm_priv;
-
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 7d502701be27..61f4a6bcb7dc 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -143,8 +143,6 @@ struct hal_ops {
s32 (*init_recv_priv)(struct adapter *padapter);
void (*free_recv_priv)(struct adapter *padapter);
- void (*dm_deinit)(struct adapter *padapter);
-
void (*set_bwmode_handler)(struct adapter *padapter,
enum ht_channel_width Bandwidth,
u8 Offset);
@@ -250,8 +248,6 @@ void rtl8188eu_init_default_value(struct adapter *adapt);
void rtw_hal_free_data(struct adapter *padapter);
-void rtw_hal_dm_deinit(struct adapter *padapter);
-
u32 rtw_hal_power_on(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index c5dc02d30349..039c05ffbc57 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -913,7 +913,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)
_cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
/* cancel dm timer */
- rtw_hal_dm_deinit(padapter);
+ rtl8188e_deinit_dm_priv(padapter);
}
u8 rtw_free_drv_sw(struct adapter *padapter)
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 05/40] staging: r8188eu: remove SetHalODMVarHandler from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (3 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 04/40] staging: r8188eu: remove dm_deinit " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 06/40] staging: r8188eu: remove empty functions Michael Straube
` (34 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove SetHalODMVarHandler from hal_ops and remove its wrapper
rtw_hal_set_odm_var(). Call rtl8188e_SetHalODMVar() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_ap.c | 4 ++--
drivers/staging/r8188eu/core/rtw_mlme.c | 4 ++--
drivers/staging/r8188eu/core/rtw_p2p.c | 4 ++--
drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +-
drivers/staging/r8188eu/hal/hal_intf.c | 9 ---------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 +---
drivers/staging/r8188eu/include/hal_intf.h | 10 ++--------
7 files changed, 10 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index 1c07ad28b242..da8b5332b5e7 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -453,7 +453,7 @@ void update_bmc_sta(struct adapter *padapter)
init_rate = get_highest_rate_idx(tx_ra_bitmap & 0x0fffffff) & 0x3f;
/* ap mode */
- rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
+ rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
{
u8 arg = 0;
@@ -505,7 +505,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
DBG_88E("%s\n", __func__);
/* ap mode */
- rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
+ rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
psta->ieee8021x_blocked = true;
diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 37578638bb76..d330f58ab3ad 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -984,7 +984,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
psta->aid = pnetwork->join_res;
psta->mac_id = 0;
/* sta mode */
- rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
+ rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, true);
/* security related */
if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) {
padapter->securitypriv.binstallGrpkey = false;
@@ -1276,7 +1276,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
psta->mac_id = (uint)pstassoc->cam_id;
DBG_88E("%s\n", __func__);
/* for ad-hoc mode */
- rtw_hal_set_odm_var(adapter, HAL_ODM_STA_INFO, psta, true);
+ rtl8188e_SetHalODMVar(adapter, HAL_ODM_STA_INFO, psta, true);
rtw_sta_media_status_rpt(adapter, psta, 1);
if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)
psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
diff --git a/drivers/staging/r8188eu/core/rtw_p2p.c b/drivers/staging/r8188eu/core/rtw_p2p.c
index e2b6cf2386e0..3d237f276847 100644
--- a/drivers/staging/r8188eu/core/rtw_p2p.c
+++ b/drivers/staging/r8188eu/core/rtw_p2p.c
@@ -1955,7 +1955,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
/* Enable P2P function */
init_wifidirect_info(padapter, role);
- rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, true);
+ rtl8188e_SetHalODMVar(padapter, HAL_ODM_P2P_STATE, NULL, true);
} else if (role == P2P_ROLE_DISABLE) {
if (_FAIL == rtw_pwr_wakeup(padapter)) {
ret = _FAIL;
@@ -1974,7 +1974,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
}
- rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, false);
+ rtl8188e_SetHalODMVar(padapter, HAL_ODM_P2P_STATE, NULL, false);
/* Restore to initial setting. */
update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode);
diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
index c3600cb1790a..fc6484e403d0 100644
--- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
@@ -320,7 +320,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
}
if (!(psta->state & WIFI_AP_STATE))
- rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, false);
+ rtl8188e_SetHalODMVar(padapter, HAL_ODM_STA_INFO, psta, false);
#ifdef CONFIG_88EU_AP_MODE
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index d467e734a699..4f893333cade 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -82,15 +82,6 @@ u8 rtw_hal_get_def_var(struct adapter *adapt,
return _FAIL;
}
-void rtw_hal_set_odm_var(struct adapter *adapt,
- enum hal_odm_variable var, void *val1,
- bool set)
-{
- if (adapt->HalFunc.SetHalODMVarHandler)
- adapt->HalFunc.SetHalODMVarHandler(adapt, var,
- val1, set);
-}
-
u32 rtw_hal_inirp_init(struct adapter *adapt)
{
u32 rst = _FAIL;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 355878ec270d..bed89a1234bd 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1728,7 +1728,7 @@ void rtl8188e_read_chip_version(struct adapter *padapter)
MSG_88E("RF_Type is %x!!\n", pHalData->rf_type);
}
-static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
+void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
{
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
struct odm_dm_struct *podmpriv = &pHalData->odmpriv;
@@ -1816,8 +1816,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->SetHalODMVarHandler = &rtl8188e_SetHalODMVar;
-
pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 61f4a6bcb7dc..f6f0763e0ab3 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -162,10 +162,6 @@ struct hal_ops {
enum hal_def_variable eVariable,
void *pValue);
- void (*SetHalODMVarHandler)(struct adapter *padapter,
- enum hal_odm_variable eVariable,
- void *pValue1, bool bSet);
-
void (*UpdateRAMaskHandler)(struct adapter *padapter,
u32 mac_id, u8 rssi_level);
void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
@@ -245,6 +241,8 @@ void rtl8188eu_set_hal_ops(struct adapter *padapter);
void rtl8188eu_interface_configure(struct adapter *adapt);
void ReadAdapterInfo8188EU(struct adapter *Adapter);
void rtl8188eu_init_default_value(struct adapter *adapt);
+void rtl8188e_SetHalODMVar(struct adapter *Adapter,
+ enum hal_odm_variable eVariable, void *pValue1, bool bSet);
void rtw_hal_free_data(struct adapter *padapter);
@@ -260,10 +258,6 @@ u8 rtw_hal_set_def_var(struct adapter *padapter,
u8 rtw_hal_get_def_var(struct adapter *padapter,
enum hal_def_variable eVariable, void *pValue);
-void rtw_hal_set_odm_var(struct adapter *padapter,
- enum hal_odm_variable eVariable, void *pValue1,
- bool bSet);
-
u32 rtw_hal_inirp_init(struct adapter *padapter);
u32 rtw_hal_inirp_deinit(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 06/40] staging: r8188eu: remove empty functions
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (4 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 05/40] staging: r8188eu: remove SetHalODMVarHandler " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func() Michael Straube
` (33 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove the following empty functions.
Hal_InitChannelPlan()
Hal_CustomizeByCustomerID_8188EU()
_InitBeaconMaxError()
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 ----
drivers/staging/r8188eu/hal/usb_halinit.c | 15 ---------------
drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
3 files changed, 20 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index bed89a1234bd..ca020f2ed7a2 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -2242,10 +2242,6 @@ void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bool Aut
DBG_88E("ThermalMeter = 0x%x\n", pHalData->EEPROMThermalMeter);
}
-void Hal_InitChannelPlan(struct adapter *padapter)
-{
-}
-
bool HalDetectPwrDownMode88E(struct adapter *Adapter)
{
u8 tmpvalue = 0;
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 87aa12a6b5ba..65f68f35b611 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -403,10 +403,6 @@ static void _InitEDCA(struct adapter *Adapter)
rtw_write32(Adapter, REG_EDCA_VO_PARAM, 0x002FA226);
}
-static void _InitBeaconMaxError(struct adapter *Adapter, bool InfraMode)
-{
-}
-
static void _InitHWLed(struct adapter *Adapter)
{
struct led_priv *pledpriv = &Adapter->ledpriv;
@@ -819,7 +815,6 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
InitUsbAggregationSetting(Adapter);
_InitOperationMode(Adapter);/* todo */
_InitBeaconParameters(Adapter);
- _InitBeaconMaxError(Adapter, true);
/* */
/* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */
@@ -1140,10 +1135,6 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool
}
}
-static void Hal_CustomizeByCustomerID_8188EU(struct adapter *adapt)
-{
-}
-
static void
readAdapterInfo_8188EU(
struct adapter *adapt
@@ -1166,12 +1157,6 @@ readAdapterInfo_8188EU(
Hal_EfuseParseBoardType88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);
Hal_ReadThermalMeter_88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);
- /* */
- /* The following part initialize some vars by PG info. */
- /* */
- Hal_InitChannelPlan(adapt);
- Hal_CustomizeByCustomerID_8188EU(adapt);
-
_ReadLEDSetting(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);
}
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 5cd441e8e16b..bb5620a9b17b 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -434,7 +434,6 @@ void Hal_ReadPowerSavingMode88E(struct adapter *pAdapter, u8 *hwinfo,
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);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func()
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (5 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 06/40] staging: r8188eu: remove empty functions Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 08/40] staging: r8188eu: remove interface_ps_func from hal_ops Michael Straube
` (32 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove unused function rtw_interface_ps_func().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 --------
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 --
2 files changed, 10 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index c3897b29121c..00750394c50b 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -473,14 +473,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter)
}
-u8 rtw_interface_ps_func(struct adapter *padapter, enum hal_intf_ps_func efunc_id, u8 *val)
-{
- u8 bResult = true;
- rtw_hal_intf_ps_func(padapter, efunc_id, val);
-
- return bResult;
-}
-
inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
index 543f928e8089..8446dfb50f34 100644
--- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
@@ -251,8 +251,6 @@ s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms);
void LPS_Enter(struct adapter *adapter);
void LPS_Leave(struct adapter *adapter);
-u8 rtw_interface_ps_func(struct adapter *adapter,
- enum hal_intf_ps_func efunc_id, u8 *val);
void rtw_set_ips_deny(struct adapter *adapter, u32 ms);
int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms,
const char *caller);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 08/40] staging: r8188eu: remove interface_ps_func from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (6 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func() Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 09/40] staging: r8188eu: remove hal_dm_watchdog " Michael Straube
` (31 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove interface_ps_func from hal_ops from hal_ops and remove its
wrapper rtw_hal_intf_ps_func() and the unused rtl8188eu_ps_func().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 9 ---------
drivers/staging/r8188eu/hal/usb_halinit.c | 9 ---------
drivers/staging/r8188eu/include/hal_intf.h | 5 -----
3 files changed, 23 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 4f893333cade..45166f160756 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -101,15 +101,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)
return _FAIL;
}
-u8 rtw_hal_intf_ps_func(struct adapter *adapt,
- enum hal_intf_ps_func efunc_id, u8 *val)
-{
- if (adapt->HalFunc.interface_ps_func)
- return adapt->HalFunc.interface_ps_func(adapt, efunc_id,
- val);
- return _FAIL;
-}
-
s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)
{
if (adapt->HalFunc.hal_xmit)
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 65f68f35b611..7b9cca4e3cb4 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2205,12 +2205,6 @@ void rtl8188eu_init_default_value(struct adapter *adapt)
haldata->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0;
}
-static u8 rtl8188eu_ps_func(struct adapter *Adapter, enum hal_intf_ps_func efunc_id, u8 *val)
-{
- u8 bResult = true;
- return bResult;
-}
-
void rtl8188eu_set_hal_ops(struct adapter *adapt)
{
struct hal_ops *halfunc = &adapt->HalFunc;
@@ -2243,8 +2237,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->hal_xmit = &rtl8188eu_hal_xmit;
halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit;
- halfunc->interface_ps_func = &rtl8188eu_ps_func;
-
rtl8188e_set_hal_ops(halfunc);
-
}
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index f6f0763e0ab3..44a8943eadfe 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -175,8 +175,6 @@ struct hal_ops {
void (*AntDivCompareHandler)(struct adapter *adapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
- u8 (*interface_ps_func)(struct adapter *padapter,
- enum hal_intf_ps_func efunc_id, u8 *val);
s32 (*hal_xmit)(struct adapter *padapter,
struct xmit_frame *pxmitframe);
@@ -261,9 +259,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,
u32 rtw_hal_inirp_init(struct adapter *padapter);
u32 rtw_hal_inirp_deinit(struct adapter *padapter);
-u8 rtw_hal_intf_ps_func(struct adapter *padapter,
- enum hal_intf_ps_func efunc_id, u8 *val);
-
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
s32 rtw_hal_mgnt_xmit(struct adapter *padapter,
struct xmit_frame *pmgntframe);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 09/40] staging: r8188eu: remove hal_dm_watchdog from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (7 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 08/40] staging: r8188eu: remove interface_ps_func from hal_ops Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 10/40] staging: r8188eu: remove set_bwmode_handler " Michael Straube
` (30 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove hal_dm_watchdog from hal_ops and remove its wrapper
rtw_hal_dm_watchdog(). Call rtl8188e_HalDmWatchDog directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 3 ++-
drivers/staging/r8188eu/hal/hal_intf.c | 6 ------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 --
drivers/staging/r8188eu/include/hal_intf.h | 3 ---
4 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 738e1ec749be..67b4fe1304a5 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -9,6 +9,7 @@
#include "../include/mlme_osdep.h"
#include "../include/rtw_br_ext.h"
#include "../include/rtw_mlme_ext.h"
+#include "../include/rtl8188e_dm.h"
/*
Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
@@ -1496,7 +1497,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
linked_status_chk(padapter);
traffic_status_watchdog(padapter);
- rtw_hal_dm_watchdog(padapter);
+ rtl8188e_HalDmWatchDog(padapter);
}
static void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 45166f160756..9374e5ecb13b 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -229,12 +229,6 @@ void rtw_hal_set_chan(struct adapter *adapt, u8 channel)
adapt->HalFunc.set_channel_handler(adapt, channel);
}
-void rtw_hal_dm_watchdog(struct adapter *adapt)
-{
- if (adapt->HalFunc.hal_dm_watchdog)
- adapt->HalFunc.hal_dm_watchdog(adapt);
-}
-
void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
{
if (adapt->HalFunc.SetBeaconRelatedRegistersHandler)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index ca020f2ed7a2..844a18117f09 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1787,8 +1787,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E;
pHalFunc->set_channel_handler = &PHY_SwChnl8188E;
- pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog;
-
pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
pHalFunc->run_thread = &rtl8188e_start_thread;
pHalFunc->cancel_thread = &rtl8188e_stop_thread;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 44a8943eadfe..caf759a9eb48 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -148,8 +148,6 @@ struct hal_ops {
u8 Offset);
void (*set_channel_handler)(struct adapter *padapter, u8 channel);
- void (*hal_dm_watchdog)(struct adapter *padapter);
-
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
u8 *val);
void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -289,7 +287,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,
void rtw_hal_set_bwmode(struct adapter *padapter,
enum ht_channel_width Bandwidth, u8 Offset);
void rtw_hal_set_chan(struct adapter *padapter, u8 channel);
-void rtw_hal_dm_watchdog(struct adapter *padapter);
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 10/40] staging: r8188eu: remove set_bwmode_handler from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (8 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 09/40] staging: r8188eu: remove hal_dm_watchdog " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 11/40] staging: r8188eu: remove set_channel_handler " Michael Straube
` (29 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove set_bwmode_handler from hal_ops and remove its wrapper
rtw_hal_set_bwmode(). Call PHY_SetBWMode8188E() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/r8188eu/hal/hal_intf.c | 8 --------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 5 -----
4 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index ccb5fbbc3ffb..37400e29eec4 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -328,7 +328,7 @@ void SetBWMode(struct adapter *padapter, unsigned short bwmode,
rtw_set_oper_bw(padapter, bwmode);
rtw_set_oper_choffset(padapter, channel_offset);
- rtw_hal_set_bwmode(padapter, (enum ht_channel_width)bwmode, channel_offset);
+ PHY_SetBWMode8188E(padapter, (enum ht_channel_width)bwmode, channel_offset);
}
void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 9374e5ecb13b..93691e72e263 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -215,14 +215,6 @@ void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath,
bitmask, data);
}
-void rtw_hal_set_bwmode(struct adapter *adapt,
- enum ht_channel_width bandwidth, u8 offset)
-{
- if (adapt->HalFunc.set_bwmode_handler)
- adapt->HalFunc.set_bwmode_handler(adapt, bandwidth,
- offset);
-}
-
void rtw_hal_set_chan(struct adapter *adapt, u8 channel)
{
if (adapt->HalFunc.set_channel_handler)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 844a18117f09..8a73294d8bec 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1784,7 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E;
pHalFunc->set_channel_handler = &PHY_SwChnl8188E;
pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index caf759a9eb48..f3f294aa6a24 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -143,9 +143,6 @@ struct hal_ops {
s32 (*init_recv_priv)(struct adapter *padapter);
void (*free_recv_priv)(struct adapter *padapter);
- void (*set_bwmode_handler)(struct adapter *padapter,
- enum ht_channel_width Bandwidth,
- u8 Offset);
void (*set_channel_handler)(struct adapter *padapter, u8 channel);
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -284,8 +281,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
-void rtw_hal_set_bwmode(struct adapter *padapter,
- enum ht_channel_width Bandwidth, u8 Offset);
void rtw_hal_set_chan(struct adapter *padapter, u8 channel);
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 11/40] staging: r8188eu: remove set_channel_handler from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (9 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 10/40] staging: r8188eu: remove set_bwmode_handler " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:52 ` [PATCH v2 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func Michael Straube
` (28 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove set_channel_handler from hal_ops and remove its wrapper
rtw_hal_set_chan(). Call PHY_SwChnl8188E() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_wlan_util.c | 4 ++--
drivers/staging/r8188eu/hal/hal_intf.c | 6 ------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 --
drivers/staging/r8188eu/include/hal_intf.h | 4 ----
4 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index 37400e29eec4..cd4f1ae61dca 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -318,7 +318,7 @@ void SelectChannel(struct adapter *padapter, unsigned char channel)
{
/* saved channel info */
rtw_set_oper_ch(padapter, channel);
- rtw_hal_set_chan(padapter, channel);
+ PHY_SwChnl8188E(padapter, channel);
}
void SetBWMode(struct adapter *padapter, unsigned short bwmode,
@@ -359,7 +359,7 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigne
rtw_set_oper_bw(padapter, bwmode);
rtw_set_oper_choffset(padapter, channel_offset);
- rtw_hal_set_chan(padapter, center_ch); /* set center channel */
+ PHY_SwChnl8188E(padapter, center_ch); /* set center channel */
SetBWMode(padapter, bwmode, channel_offset);
}
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 93691e72e263..79a2a5a0abd9 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -215,12 +215,6 @@ void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath,
bitmask, data);
}
-void rtw_hal_set_chan(struct adapter *adapt, u8 channel)
-{
- if (adapt->HalFunc.set_channel_handler)
- adapt->HalFunc.set_channel_handler(adapt, channel);
-}
-
void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
{
if (adapt->HalFunc.SetBeaconRelatedRegistersHandler)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 8a73294d8bec..4274b11e456c 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1784,8 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->set_channel_handler = &PHY_SwChnl8188E;
-
pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
pHalFunc->run_thread = &rtl8188e_start_thread;
pHalFunc->cancel_thread = &rtl8188e_stop_thread;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index f3f294aa6a24..eab0b8576c92 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -143,8 +143,6 @@ struct hal_ops {
s32 (*init_recv_priv)(struct adapter *padapter);
void (*free_recv_priv)(struct adapter *padapter);
- void (*set_channel_handler)(struct adapter *padapter, u8 channel);
-
void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
u8 *val);
void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -281,8 +279,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
-void rtw_hal_set_chan(struct adapter *padapter, u8 channel);
-
u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (10 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 11/40] staging: r8188eu: remove set_channel_handler " Michael Straube
@ 2021-09-06 18:52 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 13/40] staging: r8188eu: remove Add_RateATid from hal_ops Michael Straube
` (27 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:52 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
HAL_USB_SELECT_SUSPEND and HAL_MAX_ID are both unused,
so enum hal_intf_ps_func can be removed.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/include/hal_intf.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index eab0b8576c92..3bf0d18e2ba8 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -121,11 +121,6 @@ enum hal_odm_variable {
HAL_ODM_WIFI_DISPLAY_STATE,
};
-enum hal_intf_ps_func {
- HAL_USB_SELECT_SUSPEND,
- HAL_MAX_ID,
-};
-
typedef s32 (*c2h_id_filter)(u8 id);
struct hal_ops {
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 13/40] staging: r8188eu: remove Add_RateATid from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (11 preceding siblings ...)
2021-09-06 18:52 ` [PATCH v2 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 14/40] staging: r8188eu: remove hal_power_on " Michael Straube
` (26 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove Add_RateATid from hal_ops and remove its wrapper
rtw_hal_add_ra_tid(). Call rtl8188e_Add_RateATid() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_ap.c | 5 +++--
drivers/staging/r8188eu/hal/hal_intf.c | 8 --------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 3 ---
4 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index da8b5332b5e7..8e6b1964f533 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -7,6 +7,7 @@
#include "../include/drv_types.h"
#include "../include/wifi.h"
#include "../include/ieee80211.h"
+#include "../include/rtl8188e_cmd.h"
#ifdef CONFIG_88EU_AP_MODE
@@ -393,7 +394,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
/* bitmap[28:31]= Rate Adaptive id */
/* arg[0:4] = macid */
/* arg[5] = Short GI */
- rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, rssi_level);
+ rtl8188e_Add_RateATid(padapter, tx_ra_bitmap, arg, rssi_level);
if (shortGIrate)
init_rate |= BIT(6);
@@ -467,7 +468,7 @@ void update_bmc_sta(struct adapter *padapter)
/* bitmap[28:31]= Rate Adaptive id */
/* arg[0:4] = macid */
/* arg[5] = Short GI */
- rtw_hal_add_ra_tid(padapter, tx_ra_bitmap, arg, 0);
+ rtl8188e_Add_RateATid(padapter, tx_ra_bitmap, arg, 0);
}
/* set ra_id, init_rate */
psta->raid = raid;
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 79a2a5a0abd9..39b1a8711754 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -158,14 +158,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
}
}
-void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg,
- u8 rssi_level)
-{
- if (adapt->HalFunc.Add_RateATid)
- adapt->HalFunc.Add_RateATid(adapt, bitmap, arg,
- rssi_level);
-}
-
/* Start specifical interface thread */
void rtw_hal_start_thread(struct adapter *adapt)
{
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 4274b11e456c..0b14748e1346 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1784,7 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
pHalFunc->run_thread = &rtl8188e_start_thread;
pHalFunc->cancel_thread = &rtl8188e_stop_thread;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 3bf0d18e2ba8..9f804f9f5363 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -154,8 +154,6 @@ struct hal_ops {
u32 mac_id, u8 rssi_level);
void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
- void (*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg,
- u8 rssi_level);
void (*run_thread)(struct adapter *adapter);
void (*cancel_thread)(struct adapter *adapter);
@@ -257,7 +255,6 @@ s32 rtw_hal_init_recv_priv(struct adapter *padapter);
void rtw_hal_free_recv_priv(struct adapter *padapter);
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
-void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
void rtw_hal_clone_data(struct adapter *dst_adapt,
struct adapter *src_adapt);
void rtw_hal_start_thread(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 14/40] staging: r8188eu: remove hal_power_on from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (12 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 13/40] staging: r8188eu: remove Add_RateATid from hal_ops Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 15/40] staging: r8188eu: remove sreset_init_value " Michael Straube
` (25 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove hal_power_on from hal_ops and remove its wrapper
rtw_hal_power_on(). Call rtl8188eu_InitPowerOn() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 7 -------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +-
drivers/staging/r8188eu/hal/usb_halinit.c | 3 +--
drivers/staging/r8188eu/include/hal_intf.h | 4 +---
4 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 39b1a8711754..58ece9a1232c 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -12,13 +12,6 @@ void rtw_hal_free_data(struct adapter *adapt)
adapt->HalFunc.free_hal_data(adapt);
}
-u32 rtw_hal_power_on(struct adapter *adapt)
-{
- if (adapt->HalFunc.hal_power_on)
- return adapt->HalFunc.hal_power_on(adapt);
- return _FAIL;
-}
-
uint rtw_hal_init(struct adapter *adapt)
{
uint status = _SUCCESS;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 0b14748e1346..207fb182ee6c 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -904,7 +904,7 @@ static void ReadEFuseByIC(struct adapter *Adapter, u8 efuseType, u16 _offset, u1
if (!bPseudoTest) {
int ret = _FAIL;
if (rtw_IOL_applied(Adapter)) {
- rtw_hal_power_on(Adapter);
+ rtl8188eu_InitPowerOn(Adapter);
iol_mode_enable(Adapter, 1);
ret = iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 7b9cca4e3cb4..2c010f12118a 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -85,7 +85,7 @@ void rtl8188eu_interface_configure(struct adapter *adapt)
pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes);
}
-static u32 rtl8188eu_InitPowerOn(struct adapter *adapt)
+u32 rtl8188eu_InitPowerOn(struct adapter *adapt)
{
u16 value16;
/* HW Power on sequence */
@@ -2214,7 +2214,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
DBG_88E("cant not alloc memory for HAL DATA\n");
adapt->hal_data_sz = sizeof(struct hal_data_8188e);
- halfunc->hal_power_on = rtl8188eu_InitPowerOn;
halfunc->hal_init = &rtl8188eu_hal_init;
halfunc->hal_deinit = &rtl8188eu_hal_deinit;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 9f804f9f5363..63842cd469c5 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -124,7 +124,6 @@ enum hal_odm_variable {
typedef s32 (*c2h_id_filter)(u8 id);
struct hal_ops {
- u32 (*hal_power_on)(struct adapter *padapter);
u32 (*hal_init)(struct adapter *padapter);
u32 (*hal_deinit)(struct adapter *padapter);
@@ -227,10 +226,9 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter);
void rtl8188eu_init_default_value(struct adapter *adapt);
void rtl8188e_SetHalODMVar(struct adapter *Adapter,
enum hal_odm_variable eVariable, void *pValue1, bool bSet);
+u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
void rtw_hal_free_data(struct adapter *padapter);
-
-u32 rtw_hal_power_on(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
void rtw_hal_stop(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 15/40] staging: r8188eu: remove sreset_init_value from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (13 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 14/40] staging: r8188eu: remove hal_power_on " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 16/40] staging: r8188eu: remove sreset_reset_value " Michael Straube
` (24 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove sreset_init_value from hal_ops and remove its wrapper
rtw_hal_sreset_init(). Call sreset_init_value() 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 | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
drivers/staging/r8188eu/os_dep/os_intfs.c | 3 ++-
4 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 58ece9a1232c..712e497f77ab 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
}
-void rtw_hal_sreset_init(struct adapter *adapt)
-{
- if (adapt->HalFunc.sreset_init_value)
- adapt->HalFunc.sreset_init_value(adapt);
-}
-
void rtw_hal_sreset_reset(struct adapter *adapt)
{
if (adapt->HalFunc.silentreset)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 207fb182ee6c..82de4eaedf1a 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
- pHalFunc->sreset_init_value = &sreset_init_value;
pHalFunc->sreset_reset_value = &sreset_reset_value;
pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform;
pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 63842cd469c5..1cc97dcb06bc 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -193,7 +193,6 @@ struct hal_ops {
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
- void (*sreset_init_value)(struct adapter *padapter);
void (*sreset_reset_value)(struct adapter *padapter);
void (*silentreset)(struct adapter *padapter);
void (*sreset_xmit_status_check)(struct adapter *padapter);
@@ -274,7 +273,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
-void rtw_hal_sreset_init(struct adapter *padapter);
void rtw_hal_sreset_reset(struct adapter *padapter);
void rtw_hal_sreset_reset_value(struct adapter *padapter);
void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 039c05ffbc57..333005c13061 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -13,6 +13,7 @@
#include "../include/rtw_br_ext.h"
#include "../include/rtl8188e_led.h"
#include "../include/rtl8188e_dm.h"
+#include "../include/rtw_sreset.h"
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
@@ -890,7 +891,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
rtl8188e_init_dm_priv(padapter);
rtl8188eu_InitSwLeds(padapter);
- rtw_hal_sreset_init(padapter);
+ sreset_init_value(padapter);
spin_lock_init(&padapter->br_ext_lock);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 16/40] staging: r8188eu: remove sreset_reset_value from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (14 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 15/40] staging: r8188eu: remove sreset_init_value " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 17/40] staging: r8188eu: remove silentreset " Michael Straube
` (23 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove sreset_reset_value from hal_ops and remove its wrapper
rtw_hal_sreset_reset_value(). Call sreset_reset_value() 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 | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +-
4 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 712e497f77ab..e5267c23ab86 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -227,12 +227,6 @@ void rtw_hal_sreset_reset(struct adapter *adapt)
adapt->HalFunc.silentreset(adapt);
}
-void rtw_hal_sreset_reset_value(struct adapter *adapt)
-{
- if (adapt->HalFunc.sreset_reset_value)
- adapt->HalFunc.sreset_reset_value(adapt);
-}
-
void rtw_hal_sreset_xmit_status_check(struct adapter *adapt)
{
if (adapt->HalFunc.sreset_xmit_status_check)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 82de4eaedf1a..222e66656aa9 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
- pHalFunc->sreset_reset_value = &sreset_reset_value;
pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform;
pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check;
pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 1cc97dcb06bc..946896698655 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -193,7 +193,6 @@ struct hal_ops {
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
- void (*sreset_reset_value)(struct adapter *padapter);
void (*silentreset)(struct adapter *padapter);
void (*sreset_xmit_status_check)(struct adapter *padapter);
void (*sreset_linked_status_check) (struct adapter *padapter);
@@ -274,7 +273,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *src);
void rtw_hal_sreset_reset(struct adapter *padapter);
-void rtw_hal_sreset_reset_value(struct adapter *padapter);
void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
void rtw_hal_sreset_linked_status_check(struct adapter *padapter);
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 333005c13061..28f6028d7335 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -816,7 +816,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
- rtw_hal_sreset_reset_value(padapter);
+ sreset_reset_value(padapter);
pwrctrlpriv->pwr_state_check_cnts = 0;
/* mlmeextpriv */
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 17/40] staging: r8188eu: remove silentreset from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (15 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 16/40] staging: r8188eu: remove sreset_reset_value " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 18/40] staging: r8188eu: remove sreset_xmit_status_check " Michael Straube
` (22 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove silentreset from hal_ops and remove its wrapper
rtw_hal_sreset_reset().
Call rtl8188e_silentreset_for_specific_platform() 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 | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +-
4 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index e5267c23ab86..51f6160f7dec 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
}
-void rtw_hal_sreset_reset(struct adapter *adapt)
-{
- if (adapt->HalFunc.silentreset)
- adapt->HalFunc.silentreset(adapt);
-}
-
void rtw_hal_sreset_xmit_status_check(struct adapter *adapt)
{
if (adapt->HalFunc.sreset_xmit_status_check)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 222e66656aa9..f9852eae7c74 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
- pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform;
pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check;
pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check;
pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 946896698655..1a85f11ba596 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -193,7 +193,6 @@ struct hal_ops {
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
- void (*silentreset)(struct adapter *padapter);
void (*sreset_xmit_status_check)(struct adapter *padapter);
void (*sreset_linked_status_check) (struct adapter *padapter);
u8 (*sreset_get_wifi_status)(struct adapter *padapter);
@@ -272,7 +271,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
-void rtw_hal_sreset_reset(struct adapter *padapter);
void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
void rtw_hal_sreset_linked_status_check(struct adapter *padapter);
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index c7229878ee53..803caf94da4c 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4304,7 +4304,7 @@ static int rtw_dbg_port(struct net_device *dev,
case 0x0f:
if (extra_arg == 0) {
DBG_88E("###### silent reset test.......#####\n");
- rtw_hal_sreset_reset(padapter);
+ rtl8188e_silentreset_for_specific_platform(padapter);
}
break;
case 0x15:
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 18/40] staging: r8188eu: remove sreset_xmit_status_check from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (16 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 17/40] staging: r8188eu: remove silentreset " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 19/40] staging: r8188eu: remove sreset_linked_status_check " Michael Straube
` (21 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove sreset_xmit_status_check from hal_ops and remove its wrapper
rtw_hal_sreset_xmit_status_check().
Call rtl8188e_sreset_xmit_status_check() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 3 ++-
drivers/staging/r8188eu/hal/hal_intf.c | 6 ------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
4 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 67b4fe1304a5..a52c17dd2e5a 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -10,6 +10,7 @@
#include "../include/rtw_br_ext.h"
#include "../include/rtw_mlme_ext.h"
#include "../include/rtl8188e_dm.h"
+#include "../include/rtl8188e_sreset.h"
/*
Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
@@ -1492,7 +1493,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
expire_timeout_chk(padapter);
#endif
- rtw_hal_sreset_xmit_status_check(padapter);
+ rtl8188e_sreset_xmit_status_check(padapter);
linked_status_chk(padapter);
traffic_status_watchdog(padapter);
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 51f6160f7dec..b1a71a8fdf38 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
}
-void rtw_hal_sreset_xmit_status_check(struct adapter *adapt)
-{
- if (adapt->HalFunc.sreset_xmit_status_check)
- adapt->HalFunc.sreset_xmit_status_check(adapt);
-}
-
void rtw_hal_sreset_linked_status_check(struct adapter *adapt)
{
if (adapt->HalFunc.sreset_linked_status_check)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index f9852eae7c74..9b44fd2d93d7 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
- pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check;
pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check;
pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 1a85f11ba596..2f4bc16aeabd 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -193,7 +193,6 @@ struct hal_ops {
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
- void (*sreset_xmit_status_check)(struct adapter *padapter);
void (*sreset_linked_status_check) (struct adapter *padapter);
u8 (*sreset_get_wifi_status)(struct adapter *padapter);
@@ -271,7 +270,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
-void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
void rtw_hal_sreset_linked_status_check(struct adapter *padapter);
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 19/40] staging: r8188eu: remove sreset_linked_status_check from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (17 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 18/40] staging: r8188eu: remove sreset_xmit_status_check " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 20/40] staging: r8188eu: remove sreset_get_wifi_status " Michael Straube
` (20 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove sreset_linked_status_check from hal_ops and remove its wrapper
rtw_hal_sreset_linked_status_check().
Call rtl8188e_sreset_linked_status_check() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++-
drivers/staging/r8188eu/hal/hal_intf.c | 6 ------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
4 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 57cf74d30984..2bdc1ed18149 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -10,6 +10,7 @@
#include "../include/wlan_bssdef.h"
#include "../include/mlme_osdep.h"
#include "../include/recv_osdep.h"
+#include "../include/rtl8188e_sreset.h"
static struct mlme_handler mlme_sta_tbl[] = {
{WIFI_ASSOCREQ, "OnAssocReq", &OnAssocReq},
@@ -7400,7 +7401,7 @@ void linked_status_chk(struct adapter *padapter)
if (padapter->bRxRSSIDisplay)
_linked_rx_signal_strehgth_display(padapter);
- rtw_hal_sreset_linked_status_check(padapter);
+ rtl8188e_sreset_linked_status_check(padapter);
if (is_client_associated_to_ap(padapter)) {
/* linked infrastructure client mode */
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index b1a71a8fdf38..1840c4046859 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
}
-void rtw_hal_sreset_linked_status_check(struct adapter *adapt)
-{
- if (adapt->HalFunc.sreset_linked_status_check)
- adapt->HalFunc.sreset_linked_status_check(adapt);
-}
-
u8 rtw_hal_sreset_get_wifi_status(struct adapter *adapt)
{
u8 status = 0;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 9b44fd2d93d7..0ee7da10633a 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
- pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check;
pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status;
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 2f4bc16aeabd..baa08d9346f9 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -193,7 +193,6 @@ struct hal_ops {
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
- void (*sreset_linked_status_check) (struct adapter *padapter);
u8 (*sreset_get_wifi_status)(struct adapter *padapter);
int (*IOL_exec_cmds_sync)(struct adapter *padapter,
@@ -270,7 +269,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
-void rtw_hal_sreset_linked_status_check(struct adapter *padapter);
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 20/40] staging: r8188eu: remove sreset_get_wifi_status from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (18 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 19/40] staging: r8188eu: remove sreset_linked_status_check " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 21/40] staging: r8188eu: remove EfusePowerSwitch " Michael Straube
` (19 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove sreset_get_wifi_status from hal_ops and remove its wrapper
rtw_hal_sreset_get_wifi_status(). Call sreset_get_wifi_status()
directly instead.
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 | 2 --
drivers/staging/r8188eu/include/hal_intf.h | 4 ----
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +-
4 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 1840c4046859..27adaea61f84 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -221,15 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
}
-u8 rtw_hal_sreset_get_wifi_status(struct adapter *adapt)
-{
- u8 status = 0;
-
- if (adapt->HalFunc.sreset_get_wifi_status)
- status = adapt->HalFunc.sreset_get_wifi_status(adapt);
- return status;
-}
-
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
u32 max_wating_ms, u32 bndy_cnt)
{
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 0ee7da10633a..04c382e698f9 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1803,8 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
- pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status;
-
pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index baa08d9346f9..f85385cc9288 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -193,8 +193,6 @@ struct hal_ops {
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
- u8 (*sreset_get_wifi_status)(struct adapter *padapter);
-
int (*IOL_exec_cmds_sync)(struct adapter *padapter,
struct xmit_frame *frame, u32 max_wait,
u32 bndy_cnt);
@@ -269,8 +267,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
-u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
-
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
u32 max_wating_ms, u32 bndy_cnt);
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 803caf94da4c..19354eb41031 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2305,7 +2305,7 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le
rtw_hal_set_hwreg(padapter, HW_VAR_TRIGGER_GPIO_0, NULL);
break;
case GEN_MP_IOCTL_SUBCODE(GET_WIFI_STATUS):
- *pdata = rtw_hal_sreset_get_wifi_status(padapter);
+ *pdata = sreset_get_wifi_status(padapter);
break;
default:
break;
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 21/40] staging: r8188eu: remove EfusePowerSwitch from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (19 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 20/40] staging: r8188eu: remove sreset_get_wifi_status " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E() Michael Straube
` (18 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove EfusePowerSwitch from hal_ops and call
rtl8188e_EfusePowerSwitch() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 7 +------
drivers/staging/r8188eu/include/hal_intf.h | 4 ++--
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index e1a9c031435b..8388ec60d21d 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -82,7 +82,7 @@ Efuse_PowerSwitch(
u8 write,
u8 PwrState)
{
- pAdapter->HalFunc.EfusePowerSwitch(pAdapter, write, PwrState);
+ rtl8188e_EfusePowerSwitch(pAdapter, write, PwrState);
}
/*-----------------------------------------------------------------------------
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 04c382e698f9..c7edb9ba4085 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -757,11 +757,7 @@ hal_EfusePowerSwitch_RTL8188E(
}
}
-static void
-rtl8188e_EfusePowerSwitch(
- struct adapter *pAdapter,
- u8 bWrite,
- u8 PwrState)
+void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)
{
hal_EfusePowerSwitch_RTL8188E(pAdapter, bWrite, PwrState);
}
@@ -1795,7 +1791,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */
- pHalFunc->EfusePowerSwitch = &rtl8188e_EfusePowerSwitch;
pHalFunc->ReadEFuse = &rtl8188e_ReadEFuse;
pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition;
pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index f85385cc9288..86456bac3a5a 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite,
- u8 PwrState);
void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
u16 _size_byte, u8 *pbuf, bool bPseudoTest);
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
@@ -221,6 +219,8 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter,
enum hal_odm_variable eVariable, void *pValue1, bool bSet);
u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
+void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState);
+
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E()
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (20 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 21/40] staging: r8188eu: remove EfusePowerSwitch " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch() Michael Straube
` (17 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Rename hal_EfusePowerSwitch_RTL8188E() to get rid of a wrapper.
hal_EfusePowerSwitch_RTL8188E() -> rtl8188e_EfusePowerSwitch().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index c7edb9ba4085..b5d0cd332165 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -707,11 +707,7 @@ hal_EfusePgPacketWriteData(
struct pgpkt *pTargetPkt,
bool bPseudoTest);
-static void
-hal_EfusePowerSwitch_RTL8188E(
- struct adapter *pAdapter,
- u8 bWrite,
- u8 PwrState)
+void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)
{
u8 tempval;
u16 tmpV16;
@@ -757,11 +753,6 @@ hal_EfusePowerSwitch_RTL8188E(
}
}
-void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)
-{
- hal_EfusePowerSwitch_RTL8188E(pAdapter, bWrite, PwrState);
-}
-
static void Hal_EfuseReadEFuse88E(struct adapter *Adapter,
u16 _offset,
u16 _size_byte,
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch()
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (21 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E() Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 24/40] staging: r8188eu: remove ReadEFuse from hal_ops Michael Straube
` (16 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove wrapper Efuse_PowerSwitch() and call rtl8188e_EfusePowerSwitch()
directly.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 55 ++++++---------------
drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 8 +--
drivers/staging/r8188eu/include/rtw_efuse.h | 1 -
3 files changed, 18 insertions(+), 46 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 8388ec60d21d..1aeddfa2f14d 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -58,33 +58,6 @@ Efuse_Write1ByteToFakeContent(
return true;
}
-/*-----------------------------------------------------------------------------
- * Function: Efuse_PowerSwitch
- *
- * Overview: When we want to enable write operation, we should change to
- * pwr on state. When we stop write, we should switch to 500k mode
- * and disable LDO 2.5V.
- *
- * Input: NONE
- *
- * Output: NONE
- *
- * Return: NONE
- *
- * Revised History:
- * When Who Remark
- * 11/17/2008 MHC Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-void
-Efuse_PowerSwitch(
- struct adapter *pAdapter,
- u8 write,
- u8 PwrState)
-{
- rtl8188e_EfusePowerSwitch(pAdapter, write, PwrState);
-}
-
/*-----------------------------------------------------------------------------
* Function: efuse_GetCurrentSize
*
@@ -431,7 +404,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
rw8 = &efuse_read8;
}
- Efuse_PowerSwitch(padapter, write, true);
+ rtl8188e_EfusePowerSwitch(padapter, write, true);
/* e-fuse one byte read / write */
for (i = 0; i < cnts; i++) {
@@ -445,7 +418,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
break;
}
- Efuse_PowerSwitch(padapter, write, false);
+ rtl8188e_EfusePowerSwitch(padapter, write, false);
return res;
}
@@ -459,9 +432,9 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
/* */
u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
{
- Efuse_PowerSwitch(padapter, false, true);
+ rtl8188e_EfusePowerSwitch(padapter, false, true);
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
- Efuse_PowerSwitch(padapter, false, false);
+ rtl8188e_EfusePowerSwitch(padapter, false, false);
return _SUCCESS;
}
@@ -475,11 +448,11 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
if ((addr + cnts) > mapLen)
return _FAIL;
- Efuse_PowerSwitch(padapter, false, true);
+ rtl8188e_EfusePowerSwitch(padapter, false, true);
efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
- Efuse_PowerSwitch(padapter, false, false);
+ rtl8188e_EfusePowerSwitch(padapter, false, false);
return _SUCCESS;
}
@@ -493,11 +466,11 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
if ((addr + cnts) > mapLen)
return _FAIL;
- Efuse_PowerSwitch(padapter, false, true);
+ rtl8188e_EfusePowerSwitch(padapter, false, true);
efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
- Efuse_PowerSwitch(padapter, false, false);
+ rtl8188e_EfusePowerSwitch(padapter, false, false);
return _SUCCESS;
}
@@ -524,7 +497,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
if (ret == _FAIL)
goto exit;
- Efuse_PowerSwitch(padapter, true, true);
+ rtl8188e_EfusePowerSwitch(padapter, true, true);
offset = (addr >> 3);
word_en = 0xF;
@@ -587,7 +560,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
memset(newdata, 0xFF, PGPKT_DATA_SIZE);
} while (1);
- Efuse_PowerSwitch(padapter, true, false);
+ rtl8188e_EfusePowerSwitch(padapter, true, false);
exit:
kfree(map);
return ret;
@@ -616,7 +589,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
if (ret == _FAIL)
goto exit;
- Efuse_PowerSwitch(padapter, true, true);
+ rtl8188e_EfusePowerSwitch(padapter, true, true);
offset = (addr >> 3);
word_en = 0xF;
@@ -679,7 +652,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
memset(newdata, 0xFF, PGPKT_DATA_SIZE);
} while (1);
- Efuse_PowerSwitch(padapter, true, false);
+ rtl8188e_EfusePowerSwitch(padapter, true, false);
exit:
@@ -768,13 +741,13 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,
{
u16 mapLen = 0;
- Efuse_PowerSwitch(pAdapter, false, true);
+ rtl8188e_EfusePowerSwitch(pAdapter, false, true);
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
- Efuse_PowerSwitch(pAdapter, false, false);
+ rtl8188e_EfusePowerSwitch(pAdapter, false, false);
}
/*-----------------------------------------------------------------------------
diff --git a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
index c85f8e467337..7cb3f55ff58e 100644
--- a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
+++ b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
@@ -973,19 +973,19 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
_irqlevel_changed_(&oldirql, LOWER);
if (poid_par_priv->type_of_oid == QUERY_OID) {
- Efuse_PowerSwitch(Adapter, false, true);
+ rtl8188e_EfusePowerSwitch(Adapter, false, true);
if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false))
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
else
status = NDIS_STATUS_FAILURE;
- Efuse_PowerSwitch(Adapter, false, false);
+ rtl8188e_EfusePowerSwitch(Adapter, false, false);
} else {
- Efuse_PowerSwitch(Adapter, true, true);
+ rtl8188e_EfusePowerSwitch(Adapter, true, true);
if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false))
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
else
status = NDIS_STATUS_FAILURE;
- Efuse_PowerSwitch(Adapter, true, false);
+ rtl8188e_EfusePowerSwitch(Adapter, true, false);
}
_irqlevel_changed_(&oldirql, RAISE);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index b3ff46db2091..18fb9a4d9a0e 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -119,7 +119,6 @@ void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
-void Efuse_PowerSwitch(struct adapter *adapt,u8 bWrite,u8 PwrState);
int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test);
int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
bool test);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 24/40] staging: r8188eu: remove ReadEFuse from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (22 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch() Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition " Michael Straube
` (15 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove ReadEFuse from hal_ops and remove its wrapper
efuse_ReadEFuse(). Call rtl8188e_ReadEFuse() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 11 +++--------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 7 +++----
drivers/staging/r8188eu/include/hal_intf.h | 5 +++--
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 1aeddfa2f14d..faf6cefaa4f0 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -175,11 +175,6 @@ ReadEFuseByte(
/* write addr must be after sec5. */
/* */
-static void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool pseudo)
-{
- Adapter->HalFunc.ReadEFuse(Adapter, efuseType, _offset, _size_byte, pbuf, pseudo);
-}
-
void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool pseudo
)
{
@@ -450,7 +445,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
rtl8188e_EfusePowerSwitch(padapter, false, true);
- efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
+ rtl8188e_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
rtl8188e_EfusePowerSwitch(padapter, false, false);
@@ -468,7 +463,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
rtl8188e_EfusePowerSwitch(padapter, false, true);
- efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
+ rtl8188e_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
rtl8188e_EfusePowerSwitch(padapter, false, false);
@@ -745,7 +740,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
- efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
+ rtl8188e_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
rtl8188e_EfusePowerSwitch(pAdapter, false, false);
}
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index b5d0cd332165..eed32dd6ee28 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -912,9 +912,9 @@ static void ReadEFuse_Pseudo(struct adapter *Adapter, u8 efuseType, u16 _offset,
Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
}
-static void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
- u16 _offset, u16 _size_byte, u8 *pbuf,
- bool bPseudoTest)
+void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
+ u16 _offset, u16 _size_byte, u8 *pbuf,
+ bool bPseudoTest)
{
if (bPseudoTest)
ReadEFuse_Pseudo(Adapter, efuseType, _offset, _size_byte, pbuf, bPseudoTest);
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */
- pHalFunc->ReadEFuse = &rtl8188e_ReadEFuse;
pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition;
pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 86456bac3a5a..e1bb1f30c7e9 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
- u16 _size_byte, u8 *pbuf, bool bPseudoTest);
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
u8 type, void *pOut, bool bPseudoTest);
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
@@ -220,6 +218,9 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter,
u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState);
+void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
+ u16 _offset, u16 _size_byte, u8 *pbuf,
+ bool bPseudoTest);
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (23 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 24/40] staging: r8188eu: remove ReadEFuse from hal_ops Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 26/40] staging: r8188eu: remove EfuseGetCurrentSize " Michael Straube
` (14 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove EFUSEGetEfuseDefinition from hal_ops and remove its wrapper
EFUSE_GetEfuseDefinition(). Call rtl8188e_EFUSE_GetEfuseDefinition()
directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 44 +++++--------------
drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 6 +--
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 13 +++---
drivers/staging/r8188eu/include/hal_intf.h | 4 +-
drivers/staging/r8188eu/include/rtw_efuse.h | 2 -
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 22 +++++-----
6 files changed, 32 insertions(+), 59 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index faf6cefaa4f0..42462a91ac58 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -157,30 +157,6 @@ ReadEFuseByte(
*pbuf = (u8)(value32 & 0xff);
}
-/* */
-/* Description: */
-/* 1. Execute E-Fuse read byte operation according as map offset and */
-/* save to E-Fuse table. */
-/* 2. Referred from SD1 Richard. */
-/* */
-/* Assumption: */
-/* 1. Boot from E-Fuse and successfully auto-load. */
-/* 2. PASSIVE_LEVEL (USB interface) */
-/* */
-/* Created by Roger, 2008.10.21. */
-/* */
-/* 2008/12/12 MH 1. Reorganize code flow and reserve bytes. and add description. */
-/* 2. Add efuse utilization collect. */
-/* 2008/12/22 MH Read Efuse must check if we write section 1 data again!!! Sec1 */
-/* write addr must be after sec5. */
-/* */
-
-void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool pseudo
- )
-{
- pAdapter->HalFunc.EFUSEGetEfuseDefinition(pAdapter, efuseType, type, pOut, pseudo);
-}
-
/*-----------------------------------------------------------------------------
* Function: EFUSE_Read1Byte
*
@@ -205,7 +181,7 @@ u8 EFUSE_Read1Byte(struct adapter *Adapter, u16 Address)
u32 k = 0;
u16 contentLen = 0;
- EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
if (Address < contentLen) { /* E-fuse 512Byte */
/* Write E-fuse Register address bit0~7 */
@@ -385,8 +361,8 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
u8 res = _FAIL;
u8 (*rw8)(struct adapter *, u16, u8*);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if (start_addr > real_content_len)
return _FAIL;
@@ -421,7 +397,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
u16 efuse_GetMaxSize(struct adapter *padapter)
{
u16 max_size;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
return max_size;
}
/* */
@@ -438,7 +414,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
{
u16 mapLen = 0;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
if ((addr + cnts) > mapLen)
return _FAIL;
@@ -456,7 +432,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
{
u16 mapLen = 0;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
if ((addr + cnts) > mapLen)
return _FAIL;
@@ -479,7 +455,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
u8 ret = _SUCCESS;
u16 mapLen = 0;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
if ((addr + cnts) > mapLen)
return _FAIL;
@@ -571,7 +547,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
u8 ret = _SUCCESS;
u16 mapLen = 0;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
if ((addr + cnts) > mapLen)
return _FAIL;
@@ -738,7 +714,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,
rtl8188e_EfusePowerSwitch(pAdapter, false, true);
- EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
rtl8188e_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
@@ -769,7 +745,7 @@ void EFUSE_ShadowMapUpdate(
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
u16 mapLen = 0;
- EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
if (pEEPROM->bautoload_fail_flag)
memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
diff --git a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
index 7cb3f55ff58e..48f0f3b8dbb8 100644
--- a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
+++ b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
@@ -913,7 +913,7 @@ int rtl8188eu_oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
cnts = pefuse->cnts;
data = pefuse->data;
- EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size)
return NDIS_STATUS_NOT_ACCEPTED;
@@ -944,7 +944,7 @@ int rtl8188eu_oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
cnts = pefuse->cnts;
data = pefuse->data;
- EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size)
return NDIS_STATUS_NOT_ACCEPTED;
@@ -1055,7 +1055,7 @@ int rtl8188eu_oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)
struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);
u16 maplen = 0;
- EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&maplen, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&maplen, false);
*poid_par_priv->bytes_rw = 0;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index eed32dd6ee28..47bc2f6ee37e 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1047,7 +1047,7 @@ static void Hal_EFUSEGetEfuseDefinition_Pseudo88E(struct adapter *pAdapter, u8 e
}
}
-static void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool bPseudoTest)
+void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool bPseudoTest)
{
if (bPseudoTest)
Hal_EFUSEGetEfuseDefinition_Pseudo88E(pAdapter, efuseType, type, pOut);
@@ -1205,7 +1205,7 @@ static int hal_EfusePgPacketRead_8188e(struct adapter *pAdapter, u8 offset, u8 *
u8 max_section = 0;
u8 tmp_header = 0;
- EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest);
if (!data)
return false;
@@ -1341,7 +1341,7 @@ static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuse
u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0;
u8 repeatcnt = 0;
- EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
while (efuse_addr < efuse_max_available_len) {
pg_header = ((pTargetPkt->offset & 0x07) << 5) | 0x0F;
@@ -1521,8 +1521,8 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u
u16 startAddr = 0, efuse_max_available_len = 0, efuse_max = 0;
struct pgpkt curPkt;
- EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
- EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&efuse_max, bPseudoTest);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&efuse_max, bPseudoTest);
if (efuseType == EFUSE_WIFI) {
if (bPseudoTest) {
@@ -1610,7 +1610,7 @@ hal_EfusePgCheckAvailableAddr(
u16 efuse_max_available_len = 0;
/* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */
- EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)
return false;
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */
- pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition;
pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index e1bb1f30c7e9..6db73da08e2b 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
- u8 type, void *pOut, bool bPseudoTest);
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
bool bPseudoTest);
int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
@@ -221,6 +219,8 @@ void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)
void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
u16 _offset, u16 _size_byte, u8 *pbuf,
bool bPseudoTest);
+void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType,
+ u8 type, void *pOut, bool bPseudoTest);
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 18fb9a4d9a0e..1dc49d82abf4 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -114,8 +114,6 @@ u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
u8 Efuse_CalculateWordCnts(u8 word_en);
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
-void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
- void *out, bool bPseudoTest);
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 19354eb41031..08b891b9c708 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4651,7 +4651,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
}
DBG_88E("%s: cnts =%d\n", __func__, cnts);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EINVAL;
@@ -4690,7 +4690,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
} else if (strcmp(tmp[0], "mac") == 0) {
cnts = 6;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%02x)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -4712,7 +4712,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
} else if (strcmp(tmp[0], "vidpid") == 0) {
cnts = 4;
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%02x)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -4789,7 +4789,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
}
DBG_88E("%s: cnts =%d\n", __func__, cnts);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -4945,7 +4945,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]);
/* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -5020,7 +5020,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]);
/* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -5058,7 +5058,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -5097,7 +5097,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if ((addr + cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT;
@@ -5152,7 +5152,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
} else if (strcmp(tmp[0], "btfk2map") == 0) {
memcpy(pEfuseHal->BTEfuseModifiedMap, pEfuseHal->fakeBTEfuseModifiedMap, EFUSE_BT_MAX_MAP_LEN);
- EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if (max_available_size < 1) {
err = -EFAULT;
goto exit;
@@ -5164,7 +5164,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
goto exit;
}
} else if (strcmp(tmp[0], "wlfk2map") == 0) {
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if (max_available_size < 1) {
err = -EFAULT;
goto exit;
@@ -6032,7 +6032,7 @@ static int rtw_mp_thermal(struct net_device *dev,
Hal_GetThermalMeter(padapter, &val);
if (bwrite == 0) {
- EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+ rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
if (2 > max_available_size) {
DBG_88E("no available efuse!\n");
return -EFAULT;
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 26/40] staging: r8188eu: remove EfuseGetCurrentSize from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (24 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 27/40] staging: r8188eu: remove empty comments Michael Straube
` (13 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove EfuseGetCurrentSize from hal_ops and remove its wrapper
Efuse_GetCurrentSize(). Call rtl8188e_EfuseGetCurrentSize() directly
instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 31 +------------------
.../staging/r8188eu/hal/rtl8188e_hal_init.c | 7 ++---
drivers/staging/r8188eu/include/hal_intf.h | 3 +-
drivers/staging/r8188eu/include/rtw_efuse.h | 1 -
4 files changed, 5 insertions(+), 37 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 42462a91ac58..bae9a32ec27e 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -58,35 +58,6 @@ Efuse_Write1ByteToFakeContent(
return true;
}
-/*-----------------------------------------------------------------------------
- * Function: efuse_GetCurrentSize
- *
- * Overview: Get current efuse size!!!
- *
- * Input: NONE
- *
- * Output: NONE
- *
- * Return: NONE
- *
- * Revised History:
- * When Who Remark
- * 11/16/2008 MHC Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-u16
-Efuse_GetCurrentSize(
- struct adapter *pAdapter,
- u8 efuseType,
- bool pseudo)
-{
- u16 ret = 0;
-
- ret = pAdapter->HalFunc.EfuseGetCurrentSize(pAdapter, efuseType, pseudo);
-
- return ret;
-}
-
/* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */
u8
Efuse_CalculateWordCnts(u8 word_en)
@@ -404,7 +375,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
{
rtl8188e_EfusePowerSwitch(padapter, false, true);
- *size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
+ *size = rtl8188e_EfuseGetCurrentSize(padapter, EFUSE_WIFI, false);
rtl8188e_EfusePowerSwitch(padapter, false, false);
return _SUCCESS;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 47bc2f6ee37e..8b7fde0a49f1 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1181,7 +1181,7 @@ static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudo
return ret;
}
-static u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest)
+u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest)
{
u16 ret = 0;
@@ -1323,7 +1323,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
if (!PgWriteSuccess)
return false;
else
- efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest);
+ efuse_addr = rtl8188e_EfuseGetCurrentSize(pAdapter, efuseType, bPseudoTest);
} else {
efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1;
}
@@ -1612,7 +1612,7 @@ hal_EfusePgCheckAvailableAddr(
/* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */
rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
- if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)
+ if (rtl8188e_EfuseGetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)
return false;
return true;
}
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */
- pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 6db73da08e2b..640195a4c830 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
- bool bPseudoTest);
int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
u8 *data, bool bPseudoTest);
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
@@ -221,6 +219,7 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
bool bPseudoTest);
void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType,
u8 type, void *pOut, bool bPseudoTest);
+u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest);
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 1dc49d82abf4..5cd1313dbe36 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -111,7 +111,6 @@ u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
u16 cnts, u8 *data);
u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
u16 cnts, u8 *data);
-u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
u8 Efuse_CalculateWordCnts(u8 word_en);
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 27/40] staging: r8188eu: remove empty comments
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (25 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 26/40] staging: r8188eu: remove EfuseGetCurrentSize " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops Michael Straube
` (12 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove empty comments.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index bae9a32ec27e..9196a7925940 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -25,10 +25,9 @@ u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN] = {0};
u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
/*------------------------Define local variable------------------------------*/
-/* */
#define REG_EFUSE_CTRL 0x0030
#define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */
-/* */
+
static bool Efuse_Read1ByteFromFakeContent(struct adapter *pAdapter,
u16 Offset,
u8 *Value)
@@ -364,14 +363,14 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
return res;
}
-/* */
+
u16 efuse_GetMaxSize(struct adapter *padapter)
{
u16 max_size;
rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
return max_size;
}
-/* */
+
u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
{
rtl8188e_EfusePowerSwitch(padapter, false, true);
@@ -380,7 +379,7 @@ u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
return _SUCCESS;
}
-/* */
+
u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
{
u16 mapLen = 0;
@@ -416,7 +415,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
return _SUCCESS;
}
-/* */
+
u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
{
u8 offset, word_en;
@@ -508,7 +507,6 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
return ret;
}
-/* */
u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
{
u8 offset, word_en;
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (26 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 27/40] staging: r8188eu: remove empty comments Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 29/40] staging: r8188eu: remove Efuse_PgPacketWrite " Michael Straube
` (11 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove Efuse_PgPacketRead from hal_ops and remove its wrapper
Efuse_PgPacketRead(). Call rtl8188e_Efuse_PgPacketRead() directly
instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 9 ---------
drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ++---
drivers/staging/r8188eu/include/hal_intf.h | 3 +--
drivers/staging/r8188eu/include/rtw_efuse.h | 1 -
5 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 9196a7925940..518ed5b2e8d2 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -247,15 +247,6 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)
return result;
}
-int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool pseudo)
-{
- int ret = 0;
-
- ret = pAdapter->HalFunc.Efuse_PgPacketRead(pAdapter, offset, data, pseudo);
-
- return ret;
-}
-
int Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool pseudo)
{
int ret;
diff --git a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
index 48f0f3b8dbb8..4c56c0da7625 100644
--- a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
+++ b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
@@ -974,7 +974,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
if (poid_par_priv->type_of_oid == QUERY_OID) {
rtl8188e_EfusePowerSwitch(Adapter, false, true);
- if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false))
+ if (rtl8188e_Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false))
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
else
status = NDIS_STATUS_FAILURE;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 8b7fde0a49f1..9cbb13a07f83 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1294,7 +1294,7 @@ static int Hal_EfusePgPacketRead_Pseudo(struct adapter *pAdapter, u8 offset, u8
return ret;
}
-static int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
+int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
{
int ret;
@@ -1313,7 +1313,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
memset((void *)originaldata, 0xff, 8);
- if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {
+ if (rtl8188e_Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {
/* check if data exist */
badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pFixPkt->word_en, originaldata, bPseudoTest);
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */
- pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 640195a4c830..115d2598b3b0 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
- u8 *data, bool bPseudoTest);
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
u8 word_en, u8 *data, bool bPseudoTest);
u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
@@ -220,6 +218,7 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType,
u8 type, void *pOut, bool bPseudoTest);
u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest);
+int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest);
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 5cd1313dbe36..d19ef73be39e 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -116,7 +116,6 @@ void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
-int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test);
int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
bool test);
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 29/40] staging: r8188eu: remove Efuse_PgPacketWrite from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (27 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite " Michael Straube
` (10 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove Efuse_PgPacketWrite from hal_ops and remove its wrapper
Efuse_PgPacketWrite(). Call rtl8188e_Efuse_PgPacketWrite() directly
instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 11 +----------
drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 2 +-
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 ++++-----
drivers/staging/r8188eu/include/hal_intf.h | 3 +--
drivers/staging/r8188eu/include/rtw_efuse.h | 2 --
5 files changed, 7 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 518ed5b2e8d2..25c1e545313f 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -247,15 +247,6 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)
return result;
}
-int Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool pseudo)
-{
- int ret;
-
- ret = pAdapter->HalFunc.Efuse_PgPacketWrite(pAdapter, offset, word_en, data, pseudo);
-
- return ret;
-}
-
/*-----------------------------------------------------------------------------
* Function: efuse_WordEnableDataRead
*
@@ -473,7 +464,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
}
if (word_en != 0xF) {
- ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
+ ret = rtl8188e_Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
DBG_88E("offset=%x\n", offset);
DBG_88E("word_en=%x\n", word_en);
diff --git a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
index 4c56c0da7625..65450091051f 100644
--- a/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
+++ b/drivers/staging/r8188eu/core/rtw_mp_ioctl.c
@@ -981,7 +981,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
rtl8188e_EfusePowerSwitch(Adapter, false, false);
} else {
rtl8188e_EfusePowerSwitch(Adapter, true, true);
- if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false))
+ if (rtl8188e_Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false))
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
else
status = NDIS_STATUS_FAILURE;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 9cbb13a07f83..24009e9cc099 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1318,7 +1318,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pFixPkt->word_en, originaldata, bPseudoTest);
if (badworden != 0xf) { /* write fail */
- PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
+ PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
if (!PgWriteSuccess)
return false;
@@ -1448,7 +1448,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u
return true;
} else {
/* reorganize other pg packet */
- PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
+ PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
if (!PgWriteSuccess)
return false;
else
@@ -1574,7 +1574,7 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u
u32 PgWriteSuccess = 0;
/* if write fail on some words, write these bad words again */
- PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
+ PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
if (!PgWriteSuccess) {
bRet = false; /* write fail, return */
@@ -1665,7 +1665,7 @@ static int Hal_EfusePgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_e
return ret;
}
-static int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
+int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
{
int ret;
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */
- pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
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 115d2598b3b0..748c809b1adc 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
- u8 word_en, u8 *data, bool bPseudoTest);
u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
u16 efuse_addr, u8 word_en,
u8 *data, bool bPseudoTest);
@@ -219,6 +217,7 @@ void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType,
u8 type, void *pOut, bool bPseudoTest);
u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest);
int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest);
+int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index d19ef73be39e..b10798354a6b 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -116,8 +116,6 @@ void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
-int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
- bool test);
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr,
u8 word_en, u8 *data, bool test);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (28 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 29/40] staging: r8188eu: remove Efuse_PgPacketWrite " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 31/40] staging: r8188eu: remove useless assignment Michael Straube
` (9 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove Efuse_WordEnableDataWrite from hal_ops and remove its wrapper
Efuse_WordEnableDataWrite(). Call rtl8188e_Efuse_WordEnableDataWrite()
directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 9 ---------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 +++------
drivers/staging/r8188eu/include/hal_intf.h | 4 ----
drivers/staging/r8188eu/include/rtw_efuse.h | 2 --
4 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 25c1e545313f..47c4d8bf5daf 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -284,15 +284,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
}
}
-u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data, bool pseudo)
-{
- u8 ret = 0;
-
- ret = pAdapter->HalFunc.Efuse_WordEnableDataWrite(pAdapter, efuse_addr, word_en, data, pseudo);
-
- return ret;
-}
-
static u8 efuse_read8(struct adapter *padapter, u16 address, u8 *value)
{
return efuse_OneByteRead(padapter, address, value, false);
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 24009e9cc099..eb30a6fcd8d0 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1315,7 +1315,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
if (rtl8188e_Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {
/* check if data exist */
- badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pFixPkt->word_en, originaldata, bPseudoTest);
+ badworden = rtl8188e_Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pFixPkt->word_en, originaldata, bPseudoTest);
if (badworden != 0xf) { /* write fail */
PgWriteSuccess = rtl8188e_Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
@@ -1442,7 +1442,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u
u32 PgWriteSuccess = 0;
badworden = 0x0f;
- badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pTargetPkt->word_en, pTargetPkt->data, bPseudoTest);
+ badworden = rtl8188e_Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pTargetPkt->word_en, pTargetPkt->data, bPseudoTest);
if (badworden == 0x0F) {
/* write ok */
return true;
@@ -1569,7 +1569,7 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u
(!hal_EfuseCheckIfDatafollowed(pAdapter, curPkt.word_cnts, startAddr + 1, bPseudoTest)) &&
wordEnMatched(pTargetPkt, &curPkt, &matched_wden)) {
/* Here to write partial data */
- badworden = Efuse_WordEnableDataWrite(pAdapter, startAddr + 1, matched_wden, pTargetPkt->data, bPseudoTest);
+ badworden = rtl8188e_Efuse_WordEnableDataWrite(pAdapter, startAddr + 1, matched_wden, pTargetPkt->data, bPseudoTest);
if (badworden != 0x0F) {
u32 PgWriteSuccess = 0;
/* if write fail on some words, write these bad words again */
@@ -1781,9 +1781,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
- /* Efuse related function */
- pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
-
pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 748c809b1adc..4b937bd2c63c 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,10 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
- u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
- u16 efuse_addr, u8 word_en,
- u8 *data, bool bPseudoTest);
-
int (*IOL_exec_cmds_sync)(struct adapter *padapter,
struct xmit_frame *frame, u32 max_wait,
u32 bndy_cnt);
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index b10798354a6b..2dd74c9c691d 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -117,8 +117,6 @@ u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
-u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr,
- u8 word_en, u8 *data, bool test);
u8 EFUSE_Read1Byte(struct adapter *adapter, u16 address);
void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 31/40] staging: r8188eu: remove useless assignment
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (29 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops Michael Straube
` (8 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
The local variable badworden is set to a new value immediately after
an assignment. Remove the useless assignment and initialization.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index eb30a6fcd8d0..33d4e534f05e 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1438,10 +1438,9 @@ static bool hal_EfusePgPacketWrite1ByteHeader(struct adapter *pAdapter, u8 efuse
static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest)
{
u16 efuse_addr = *pAddr;
- u8 badworden = 0;
+ u8 badworden;
u32 PgWriteSuccess = 0;
- badworden = 0x0f;
badworden = rtl8188e_Efuse_WordEnableDataWrite(pAdapter, efuse_addr + 1, pTargetPkt->word_en, pTargetPkt->data, bPseudoTest);
if (badworden == 0x0F) {
/* write ok */
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (30 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 31/40] staging: r8188eu: remove useless assignment Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 33/40] staging: r8188eu: remove AntDivCompareHandler " Michael Straube
` (7 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove AntDivBeforeLinkHandler from hal_ops and remove its wrapper
rtw_hal_antdiv_before_linked(). Call AntDivBeforeLink8188E() directly
instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/r8188eu/hal/hal_intf.c | 7 -------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 2 --
4 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 2bdc1ed18149..ef04845d7a71 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -6370,7 +6370,7 @@ void site_survey(struct adapter *padapter)
/* 20100721:Interrupt scan operation here. */
/* For SW antenna diversity before link, it needs to switch to another antenna and scan again. */
/* It compares the scan result and select beter one to do connection. */
- if (rtw_hal_antdiv_before_linked(padapter)) {
+ if (AntDivBeforeLink8188E(padapter)) {
pmlmeext->sitesurvey_res.bss_cnt = 0;
pmlmeext->sitesurvey_res.channel_idx = -1;
pmlmeext->chan_scan_time = SURVEY_TO / 2;
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 27adaea61f84..1bec02b1dede 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -206,13 +206,6 @@ void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
adapt->HalFunc.SetBeaconRelatedRegistersHandler(adapt);
}
-u8 rtw_hal_antdiv_before_linked(struct adapter *adapt)
-{
- if (adapt->HalFunc.AntDivBeforeLinkHandler)
- return adapt->HalFunc.AntDivBeforeLinkHandler(adapt);
- return false;
-}
-
void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 33d4e534f05e..62fd62ced0e5 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1773,7 +1773,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->run_thread = &rtl8188e_start_thread;
pHalFunc->cancel_thread = &rtl8188e_stop_thread;
- pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E;
pHalFunc->AntDivCompareHandler = &AntDivCompare8188E;
pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 4b937bd2c63c..929e861cc81b 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -156,7 +156,6 @@ struct hal_ops {
void (*run_thread)(struct adapter *adapter);
void (*cancel_thread)(struct adapter *adapter);
- u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter);
void (*AntDivCompareHandler)(struct adapter *adapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
@@ -256,7 +255,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
-u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
struct wlan_bssid_ex *dst,
struct wlan_bssid_ex *src);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 33/40] staging: r8188eu: remove AntDivCompareHandler from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (31 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread() Michael Straube
` (6 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove AntDivCompareHandler from hal_ops and remove its wrapper
rtw_hal_antdiv_rssi_compared(). Call AntDivCompare8188E() directly
instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_mlme.c | 3 ++-
drivers/staging/r8188eu/hal/hal_intf.c | 8 --------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 -
drivers/staging/r8188eu/include/hal_intf.h | 8 --------
4 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index d330f58ab3ad..848b1d4bf398 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -14,6 +14,7 @@
#include "../include/wlan_bssdef.h"
#include "../include/rtw_ioctl_set.h"
#include "../include/usb_osintf.h"
+#include "../include/rtl8188e_dm.h"
extern unsigned char MCS_rate_2R[16];
extern unsigned char MCS_rate_1R[16];
@@ -469,7 +470,7 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
u8 sq_final;
long rssi_final;
- rtw_hal_antdiv_rssi_compared(padapter, dst, src); /* this will update src.Rssi, need consider again */
+ AntDivCompare8188E(padapter, dst, src); /* this will update src.Rssi, need consider again */
/* The rule below is 1/5 for sample value, 4/5 for history value */
if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) && is_same_network(&padapter->mlmepriv.cur_network.network, src)) {
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 1bec02b1dede..e723742dab51 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -206,14 +206,6 @@ void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
adapt->HalFunc.SetBeaconRelatedRegistersHandler(adapt);
}
-void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
- struct wlan_bssid_ex *dst,
- struct wlan_bssid_ex *src)
-{
- if (adapt->HalFunc.AntDivCompareHandler)
- adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
-}
-
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
u32 max_wating_ms, u32 bndy_cnt)
{
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 62fd62ced0e5..84449d8111c0 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1773,7 +1773,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->run_thread = &rtl8188e_start_thread;
pHalFunc->cancel_thread = &rtl8188e_stop_thread;
- pHalFunc->AntDivCompareHandler = &AntDivCompare8188E;
pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 929e861cc81b..2c6a3d1f0077 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -156,10 +156,6 @@ struct hal_ops {
void (*run_thread)(struct adapter *adapter);
void (*cancel_thread)(struct adapter *adapter);
- void (*AntDivCompareHandler)(struct adapter *adapter,
- struct wlan_bssid_ex *dst,
- struct wlan_bssid_ex *src);
-
s32 (*hal_xmit)(struct adapter *padapter,
struct xmit_frame *pxmitframe);
s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -255,10 +251,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,
enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data);
-void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
- struct wlan_bssid_ex *dst,
- struct wlan_bssid_ex *src);
-
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
u32 max_wating_ms, u32 bndy_cnt);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread()
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (32 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 33/40] staging: r8188eu: remove AntDivCompareHandler " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread() Michael Straube
` (5 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove empty function rtl8188e_start_thread() and related code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 7 -------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 -----
drivers/staging/r8188eu/include/hal_intf.h | 2 --
drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
drivers/staging/r8188eu/os_dep/os_intfs.c | 1 -
5 files changed, 16 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index e723742dab51..3ea581fb2c7e 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -151,13 +151,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
}
}
-/* Start specifical interface thread */
-void rtw_hal_start_thread(struct adapter *adapt)
-{
- if (adapt->HalFunc.run_thread)
- adapt->HalFunc.run_thread(adapt);
-}
-
/* Start specifical interface thread */
void rtw_hal_stop_thread(struct adapter *adapt)
{
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 84449d8111c0..fc420cbec5de 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1748,10 +1748,6 @@ void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_ada
memcpy(dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz);
}
-void rtl8188e_start_thread(struct adapter *padapter)
-{
-}
-
void rtl8188e_stop_thread(struct adapter *padapter)
{
}
@@ -1770,7 +1766,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->run_thread = &rtl8188e_start_thread;
pHalFunc->cancel_thread = &rtl8188e_stop_thread;
pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 2c6a3d1f0077..caee83ed962d 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -153,7 +153,6 @@ struct hal_ops {
u32 mac_id, u8 rssi_level);
void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
- void (*run_thread)(struct adapter *adapter);
void (*cancel_thread)(struct adapter *adapter);
s32 (*hal_xmit)(struct adapter *padapter,
@@ -237,7 +236,6 @@ void rtw_hal_free_recv_priv(struct adapter *padapter);
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
void rtw_hal_clone_data(struct adapter *dst_adapt,
struct adapter *src_adapt);
-void rtw_hal_start_thread(struct adapter *padapter);
void rtw_hal_stop_thread(struct adapter *padapter);
void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index bb5620a9b17b..5947708594d2 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -439,7 +439,6 @@ 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);
void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int len);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 28f6028d7335..c18f6a7237c7 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -733,7 +733,6 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
else
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); /* wait for cmd_thread to run */
- rtw_hal_start_thread(padapter);
return _status;
}
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread()
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (33 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread() Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops Michael Straube
` (4 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove empty function rtl8188e_stop_thread() and related code.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 7 -------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 ------
drivers/staging/r8188eu/include/hal_intf.h | 3 ---
drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
drivers/staging/r8188eu/os_dep/os_intfs.c | 2 --
5 files changed, 19 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 3ea581fb2c7e..4a9820c2b36e 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -151,13 +151,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
}
}
-/* Start specifical interface thread */
-void rtw_hal_stop_thread(struct adapter *adapt)
-{
- if (adapt->HalFunc.cancel_thread)
- adapt->HalFunc.cancel_thread(adapt);
-}
-
u32 rtw_hal_read_bbreg(struct adapter *adapt, u32 regaddr, u32 bitmask)
{
u32 data = 0;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index fc420cbec5de..f87cfa0e404a 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1748,10 +1748,6 @@ void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_ada
memcpy(dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz);
}
-void rtl8188e_stop_thread(struct adapter *padapter)
-{
-}
-
static void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
{
if (enable) {
@@ -1766,8 +1762,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
- pHalFunc->cancel_thread = &rtl8188e_stop_thread;
-
pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index caee83ed962d..fdde4b2b8ec4 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -153,8 +153,6 @@ struct hal_ops {
u32 mac_id, u8 rssi_level);
void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
- void (*cancel_thread)(struct adapter *adapter);
-
s32 (*hal_xmit)(struct adapter *padapter,
struct xmit_frame *pxmitframe);
s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -236,7 +234,6 @@ void rtw_hal_free_recv_priv(struct adapter *padapter);
void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
void rtw_hal_clone_data(struct adapter *dst_adapt,
struct adapter *src_adapt);
-void rtw_hal_stop_thread(struct adapter *padapter);
void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 5947708594d2..40bc00a9b23b 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -439,7 +439,6 @@ 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_stop_thread(struct adapter *padapter);
void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int len);
s32 rtl8188e_iol_efuse_patch(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index c18f6a7237c7..3b277774b39a 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -742,8 +742,6 @@ void rtw_stop_drv_threads(struct adapter *padapter)
up(&padapter->cmdpriv.cmd_queue_sema);
if (padapter->cmdThread)
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
-
- rtw_hal_stop_thread(padapter);
}
static u8 rtw_init_default_value(struct adapter *padapter)
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (34 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread() Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 37/40] staging: r8188eu: remove free_hal_data " Michael Straube
` (3 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove hal_notch_filter from hal_ops and remove its wrapper
rtw_hal_notch_filter(). Call hal_notch_filter_8188e() directly
instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 8 +-------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 +---
drivers/staging/r8188eu/include/hal_intf.h | 6 ++----
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 4a9820c2b36e..4394c6825f1a 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -24,7 +24,7 @@ uint rtw_hal_init(struct adapter *adapt)
adapt->hw_init_completed = true;
if (adapt->registrypriv.notch_filter == 1)
- rtw_hal_notch_filter(adapt, 1);
+ hal_notch_filter_8188e(adapt, 1);
} else {
adapt->hw_init_completed = false;
DBG_88E("rtw_hal_init: hal__init fail\n");
@@ -201,9 +201,3 @@ int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
bndy_cnt);
return _FAIL;
}
-
-void rtw_hal_notch_filter(struct adapter *adapter, bool enable)
-{
- if (adapter->HalFunc.hal_notch_filter)
- adapter->HalFunc.hal_notch_filter(adapter, enable);
-}
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index f87cfa0e404a..9a76e9aaa2d0 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1748,7 +1748,7 @@ void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_ada
memcpy(dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz);
}
-static void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
+void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
{
if (enable) {
DBG_88E("Enable notch filter\n");
@@ -1768,8 +1768,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
-
- pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
}
u8 GetEEPROMSize8188E(struct adapter *padapter)
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index fdde4b2b8ec4..35201286704f 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -172,8 +172,6 @@ struct hal_ops {
int (*IOL_exec_cmds_sync)(struct adapter *padapter,
struct xmit_frame *frame, u32 max_wait,
u32 bndy_cnt);
-
- void (*hal_notch_filter)(struct adapter *adapter, bool enable);
};
#define RF_CHANGE_BY_INIT 0
@@ -207,6 +205,8 @@ u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bP
int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest);
int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest);
+void hal_notch_filter_8188e(struct adapter *adapter, bool enable);
+
void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
@@ -249,8 +249,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
u32 max_wating_ms, u32 bndy_cnt);
-void rtw_hal_notch_filter(struct adapter *adapter, bool enable);
-
void indicate_wx_scan_complete_event(struct adapter *padapter);
u8 rtw_do_join(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 37/40] staging: r8188eu: remove free_hal_data from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (35 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata() Michael Straube
` (2 subsequent siblings)
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove free_hal_data from hal_ops and remove its wrapper
rtw_hal_free_data(). Call rtl8188e_free_hal_data() 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 | 6 +-----
drivers/staging/r8188eu/include/hal_intf.h | 5 +----
drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +-
4 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 4394c6825f1a..17ac271e2417 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_free_data(struct adapter *adapt)
-{
- if (adapt->HalFunc.free_hal_data)
- adapt->HalFunc.free_hal_data(adapt);
-}
-
uint rtw_hal_init(struct adapter *adapt)
{
uint status = _SUCCESS;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 9a76e9aaa2d0..22750cd40d45 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -669,12 +669,10 @@ void rtl8188e_InitializeFirmwareVars(struct adapter *padapter)
pHalData->LastHMEBoxNum = 0;
}
-static void rtl8188e_free_hal_data(struct adapter *padapter)
+void rtl8188e_free_hal_data(struct adapter *padapter)
{
-
kfree(padapter->HalData);
padapter->HalData = NULL;
-
}
/* */
@@ -1760,8 +1758,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
}
void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
- pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
-
pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 35201286704f..9b0a44659f57 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -127,8 +127,6 @@ struct hal_ops {
u32 (*hal_init)(struct adapter *padapter);
u32 (*hal_deinit)(struct adapter *padapter);
- void (*free_hal_data)(struct adapter *padapter);
-
u32 (*inirp_init)(struct adapter *padapter);
u32 (*inirp_deinit)(struct adapter *padapter);
@@ -194,7 +192,7 @@ void rtl8188eu_init_default_value(struct adapter *adapt);
void rtl8188e_SetHalODMVar(struct adapter *Adapter,
enum hal_odm_variable eVariable, void *pValue1, bool bSet);
u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
-
+void rtl8188e_free_hal_data(struct adapter *padapter);
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState);
void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
u16 _offset, u16 _size_byte, u8 *pbuf,
@@ -207,7 +205,6 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en
void hal_notch_filter_8188e(struct adapter *adapter, bool enable);
-void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
void rtw_hal_stop(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 3b277774b39a..97889d17a0e4 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -946,7 +946,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
rtw_free_pwrctrl_priv(padapter);
- rtw_hal_free_data(padapter);
+ rtl8188e_free_hal_data(padapter);
/* free the old_pnetdev */
if (padapter->rereg_nd_name_priv.old_pnetdev) {
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata()
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (36 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 37/40] staging: r8188eu: remove free_hal_data " Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb " Michael Straube
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove unused function rtl8188e_clone_haldata().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 -----
drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 --
2 files changed, 7 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 22750cd40d45..760ca114a7cc 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1741,11 +1741,6 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVaria
}
}
-void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_adapter)
-{
- memcpy(dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz);
-}
-
void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
{
if (enable) {
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 40bc00a9b23b..13217789d495 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -438,8 +438,6 @@ 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 rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int len);
s32 rtl8188e_iol_efuse_patch(struct adapter *padapter);
void rtw_cancel_all_timer(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (37 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata() Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
2021-09-06 18:53 ` [PATCH v2 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb " Michael Straube
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove SetBeaconRelatedRegistersHandler from hal_ops and remove its
wrapper rtw_hal_bcn_related_reg_setting().
Call SetBeaconRelatedRegisters8188EUsb() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +-
drivers/staging/r8188eu/hal/hal_intf.c | 6 ------
drivers/staging/r8188eu/hal/usb_halinit.c | 3 +--
drivers/staging/r8188eu/include/hal_intf.h | 5 ++---
4 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_wlan_util.c b/drivers/staging/r8188eu/core/rtw_wlan_util.c
index cd4f1ae61dca..c2f664bdb979 100644
--- a/drivers/staging/r8188eu/core/rtw_wlan_util.c
+++ b/drivers/staging/r8188eu/core/rtw_wlan_util.c
@@ -1525,7 +1525,7 @@ void correct_TSF(struct adapter *padapter, struct mlme_ext_priv *pmlmeext)
void beacon_timing_control(struct adapter *padapter)
{
- rtw_hal_bcn_related_reg_setting(padapter);
+ SetBeaconRelatedRegisters8188EUsb(padapter);
}
static struct adapter *pbuddy_padapter;
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index 17ac271e2417..d38a8134b243 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -180,12 +180,6 @@ void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath,
bitmask, data);
}
-void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
-{
- if (adapt->HalFunc.SetBeaconRelatedRegistersHandler)
- adapt->HalFunc.SetBeaconRelatedRegistersHandler(adapt);
-}
-
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
u32 max_wating_ms, u32 bndy_cnt)
{
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 2c010f12118a..4d60b5156995 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2147,7 +2147,7 @@ static void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_l
psta->init_rate = init_rate;
}
-static void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt)
+void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt)
{
u32 value32;
struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
@@ -2231,7 +2231,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb;
halfunc->UpdateRAMaskHandler = &UpdateHalRAMask8188EUsb;
- halfunc->SetBeaconRelatedRegistersHandler = &SetBeaconRelatedRegisters8188EUsb;
halfunc->hal_xmit = &rtl8188eu_hal_xmit;
halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 9b0a44659f57..668a21cbe71e 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -149,7 +149,6 @@ struct hal_ops {
void (*UpdateRAMaskHandler)(struct adapter *padapter,
u32 mac_id, u8 rssi_level);
- void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
s32 (*hal_xmit)(struct adapter *padapter,
struct xmit_frame *pxmitframe);
@@ -205,6 +204,8 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en
void hal_notch_filter_8188e(struct adapter *adapter, bool enable);
+void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt);
+
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
void rtw_hal_stop(struct adapter *padapter);
@@ -232,8 +233,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
void rtw_hal_clone_data(struct adapter *dst_adapt,
struct adapter *src_adapt);
-void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
-
u32 rtw_hal_read_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask);
void rtw_hal_write_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask,
u32 Data);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb from hal_ops
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
` (38 preceding siblings ...)
2021-09-06 18:53 ` [PATCH v2 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops Michael Straube
@ 2021-09-06 18:53 ` Michael Straube
39 siblings, 0 replies; 41+ messages in thread
From: Michael Straube @ 2021-09-06 18:53 UTC (permalink / raw)
To: gregkh
Cc: Larry.Finger, phil, martin, fmdefrancesco, linux-staging,
linux-kernel, Michael Straube
Remove UpdateHalRAMask8188EUsb from hal_ops and call
UpdateHalRAMask8188EUsb() directly instead.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/hal_intf.c | 4 +---
drivers/staging/r8188eu/hal/usb_halinit.c | 4 +---
drivers/staging/r8188eu/include/hal_intf.h | 4 +---
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c
index d38a8134b243..92c55b9ab244 100644
--- a/drivers/staging/r8188eu/hal/hal_intf.c
+++ b/drivers/staging/r8188eu/hal/hal_intf.c
@@ -139,9 +139,7 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)
add_RATid(adapt, psta, 0);/* todo: based on rssi_level*/
#endif
} else {
- if (adapt->HalFunc.UpdateRAMaskHandler)
- adapt->HalFunc.UpdateRAMaskHandler(adapt, mac_id,
- rssi_level);
+ UpdateHalRAMask8188EUsb(adapt, mac_id, rssi_level);
}
}
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 4d60b5156995..37a976c56f06 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -2064,7 +2064,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV
return bResult;
}
-static void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level)
+void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level)
{
u8 init_rate = 0;
u8 networkType, raid;
@@ -2230,8 +2230,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb;
halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb;
- halfunc->UpdateRAMaskHandler = &UpdateHalRAMask8188EUsb;
-
halfunc->hal_xmit = &rtl8188eu_hal_xmit;
halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 668a21cbe71e..727ef8511f64 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -147,9 +147,6 @@ struct hal_ops {
enum hal_def_variable eVariable,
void *pValue);
- void (*UpdateRAMaskHandler)(struct adapter *padapter,
- u32 mac_id, u8 rssi_level);
-
s32 (*hal_xmit)(struct adapter *padapter,
struct xmit_frame *pxmitframe);
s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -205,6 +202,7 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en
void hal_notch_filter_8188e(struct adapter *adapter, bool enable);
void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt);
+void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
--
2.33.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
end of thread, other threads:[~2021-09-06 18:54 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 18:52 [PATCH v2 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
2021-09-06 18:52 ` [PATCH v2 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
2021-09-06 18:52 ` [PATCH v2 02/40] staging: r8188eu: remove DeInitSwLeds " Michael Straube
2021-09-06 18:52 ` [PATCH v2 03/40] staging: r8188eu: remove dm_init " Michael Straube
2021-09-06 18:52 ` [PATCH v2 04/40] staging: r8188eu: remove dm_deinit " Michael Straube
2021-09-06 18:52 ` [PATCH v2 05/40] staging: r8188eu: remove SetHalODMVarHandler " Michael Straube
2021-09-06 18:52 ` [PATCH v2 06/40] staging: r8188eu: remove empty functions Michael Straube
2021-09-06 18:52 ` [PATCH v2 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func() Michael Straube
2021-09-06 18:52 ` [PATCH v2 08/40] staging: r8188eu: remove interface_ps_func from hal_ops Michael Straube
2021-09-06 18:52 ` [PATCH v2 09/40] staging: r8188eu: remove hal_dm_watchdog " Michael Straube
2021-09-06 18:52 ` [PATCH v2 10/40] staging: r8188eu: remove set_bwmode_handler " Michael Straube
2021-09-06 18:52 ` [PATCH v2 11/40] staging: r8188eu: remove set_channel_handler " Michael Straube
2021-09-06 18:52 ` [PATCH v2 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func Michael Straube
2021-09-06 18:53 ` [PATCH v2 13/40] staging: r8188eu: remove Add_RateATid from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 14/40] staging: r8188eu: remove hal_power_on " Michael Straube
2021-09-06 18:53 ` [PATCH v2 15/40] staging: r8188eu: remove sreset_init_value " Michael Straube
2021-09-06 18:53 ` [PATCH v2 16/40] staging: r8188eu: remove sreset_reset_value " Michael Straube
2021-09-06 18:53 ` [PATCH v2 17/40] staging: r8188eu: remove silentreset " Michael Straube
2021-09-06 18:53 ` [PATCH v2 18/40] staging: r8188eu: remove sreset_xmit_status_check " Michael Straube
2021-09-06 18:53 ` [PATCH v2 19/40] staging: r8188eu: remove sreset_linked_status_check " Michael Straube
2021-09-06 18:53 ` [PATCH v2 20/40] staging: r8188eu: remove sreset_get_wifi_status " Michael Straube
2021-09-06 18:53 ` [PATCH v2 21/40] staging: r8188eu: remove EfusePowerSwitch " Michael Straube
2021-09-06 18:53 ` [PATCH v2 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E() Michael Straube
2021-09-06 18:53 ` [PATCH v2 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch() Michael Straube
2021-09-06 18:53 ` [PATCH v2 24/40] staging: r8188eu: remove ReadEFuse from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition " Michael Straube
2021-09-06 18:53 ` [PATCH v2 26/40] staging: r8188eu: remove EfuseGetCurrentSize " Michael Straube
2021-09-06 18:53 ` [PATCH v2 27/40] staging: r8188eu: remove empty comments Michael Straube
2021-09-06 18:53 ` [PATCH v2 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 29/40] staging: r8188eu: remove Efuse_PgPacketWrite " Michael Straube
2021-09-06 18:53 ` [PATCH v2 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite " Michael Straube
2021-09-06 18:53 ` [PATCH v2 31/40] staging: r8188eu: remove useless assignment Michael Straube
2021-09-06 18:53 ` [PATCH v2 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 33/40] staging: r8188eu: remove AntDivCompareHandler " Michael Straube
2021-09-06 18:53 ` [PATCH v2 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread() Michael Straube
2021-09-06 18:53 ` [PATCH v2 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread() Michael Straube
2021-09-06 18:53 ` [PATCH v2 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 37/40] staging: r8188eu: remove free_hal_data " Michael Straube
2021-09-06 18:53 ` [PATCH v2 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata() Michael Straube
2021-09-06 18:53 ` [PATCH v2 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops Michael Straube
2021-09-06 18:53 ` [PATCH v2 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb " Michael Straube
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.