* [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function
@ 2021-07-30 9:24 Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 02/12] staging: r8188eu: move ODM_TARGET_CHNL_NUM_2G_5G Greg Kroah-Hartman
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
ODM_ResetIQKResult() is empty and does nothing, so remove it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/hal/HalPhyRf.c | 4 ----
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 2 --
drivers/staging/r8188eu/include/HalPhyRf.h | 2 --
drivers/staging/r8188eu/include/odm.h | 2 --
4 files changed, 10 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf.c b/drivers/staging/r8188eu/hal/HalPhyRf.c
index 257940202f13..1805fdfbad48 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf.c
@@ -7,10 +7,6 @@
/* 3 IQ Calibration */
/* 3============================================================ */
-void ODM_ResetIQKResult(struct odm_dm_struct *pDM_Odm)
-{
-}
-
u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
{
u8 channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
index af32210bf359..df9bd4cdf575 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
@@ -437,8 +437,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
}
if (delta_IQK >= 8) { /* Delta temperature is equal to or larger than 20 centigrade. */
- ODM_ResetIQKResult(dm_odm);
-
dm_odm->RFCalibrateInfo.ThermalValue_IQK = ThermalValue;
PHY_IQCalibrate_8188E(Adapter, false);
}
diff --git a/drivers/staging/r8188eu/include/HalPhyRf.h b/drivers/staging/r8188eu/include/HalPhyRf.h
index ba3b6133fc13..54af312509a0 100644
--- a/drivers/staging/r8188eu/include/HalPhyRf.h
+++ b/drivers/staging/r8188eu/include/HalPhyRf.h
@@ -6,8 +6,6 @@
#define ODM_TARGET_CHNL_NUM_2G_5G 59
-void ODM_ResetIQKResult(struct odm_dm_struct *pDM_Odm);
-
u8 ODM_GetRightChnlPlaceforIQK(u8 chnl);
#endif /* #ifndef __HAL_PHY_RF_H__ */
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index 8c1d15eed259..15827b6a5729 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -1151,8 +1151,6 @@ void ODM_CancelAllTimers(struct odm_dm_struct *pDM_Odm);
void ODM_ReleaseAllTimers(struct odm_dm_struct *pDM_Odm);
-void ODM_ResetIQKResult(struct odm_dm_struct *pDM_Odm);
-
void ODM_AntselStatistics_88C(struct odm_dm_struct *pDM_Odm, u8 MacId,
u32 PWDBAll, bool isCCKrate);
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 02/12] staging: r8188eu: move ODM_TARGET_CHNL_NUM_2G_5G
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 03/12] staging: r8188eu: move ODM_GetRightChnlPlaceforIQK() Greg Kroah-Hartman
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
The ODM_TARGET_CHNL_NUM_2G_5G define is only used in one place, so move
it to the .c file it is used in instead of being in a .h file.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/hal/HalPhyRf.c | 2 ++
drivers/staging/r8188eu/include/HalPhyRf.h | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf.c b/drivers/staging/r8188eu/hal/HalPhyRf.c
index 1805fdfbad48..e5a58ee156b7 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf.c
@@ -7,6 +7,8 @@
/* 3 IQ Calibration */
/* 3============================================================ */
+#define ODM_TARGET_CHNL_NUM_2G_5G 59
+
u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
{
u8 channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
diff --git a/drivers/staging/r8188eu/include/HalPhyRf.h b/drivers/staging/r8188eu/include/HalPhyRf.h
index 54af312509a0..ba877eb7e801 100644
--- a/drivers/staging/r8188eu/include/HalPhyRf.h
+++ b/drivers/staging/r8188eu/include/HalPhyRf.h
@@ -4,8 +4,6 @@
#ifndef __HAL_PHY_RF_H__
#define __HAL_PHY_RF_H__
-#define ODM_TARGET_CHNL_NUM_2G_5G 59
-
u8 ODM_GetRightChnlPlaceforIQK(u8 chnl);
#endif /* #ifndef __HAL_PHY_RF_H__ */
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 03/12] staging: r8188eu: move ODM_GetRightChnlPlaceforIQK()
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 02/12] staging: r8188eu: move ODM_TARGET_CHNL_NUM_2G_5G Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 04/12] staging: r8188eu: remove include/h2clbk.h Greg Kroah-Hartman
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
ODM_GetRightChnlPlaceforIQK() is only called in one place, so move the
call to the single location and make the file static.
This lets us remove the hal/HalPhyRf.c and include/HalPhyRf.h files as
they are now empty.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/Makefile | 1 -
drivers/staging/r8188eu/hal/HalPhyRf.c | 30 -------------------
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 21 +++++++++++++
drivers/staging/r8188eu/include/HalPhyRf.h | 9 ------
drivers/staging/r8188eu/include/odm_precomp.h | 1 -
5 files changed, 21 insertions(+), 41 deletions(-)
delete mode 100644 drivers/staging/r8188eu/hal/HalPhyRf.c
delete mode 100644 drivers/staging/r8188eu/include/HalPhyRf.h
diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index 6db1376e9768..ea455b0939bf 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -28,7 +28,6 @@ OUTSRC_FILES := \
hal/HalHWImg8188E_MAC.o \
hal/HalHWImg8188E_BB.o \
hal/HalHWImg8188E_RF.o \
- hal/HalPhyRf.o \
hal/HalPhyRf_8188e.o \
hal/HalPwrSeqCmd.o \
hal/Hal8188EPwrSeq.o \
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf.c b/drivers/staging/r8188eu/hal/HalPhyRf.c
deleted file mode 100644
index e5a58ee156b7..000000000000
--- a/drivers/staging/r8188eu/hal/HalPhyRf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
- #include "odm_precomp.h"
-
-/* 3============================================================ */
-/* 3 IQ Calibration */
-/* 3============================================================ */
-
-#define ODM_TARGET_CHNL_NUM_2G_5G 59
-
-u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
-{
- u8 channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
- 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
- 124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153,
- 155, 157, 159, 161, 163, 165
- };
- u8 place = chnl;
-
- if (chnl > 14) {
- for (place = 14; place < sizeof(channel_all); place++) {
- if (channel_all[place] == chnl)
- return place-13;
- }
- }
- return 0;
-}
diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
index df9bd4cdf575..8b34842b4a30 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
@@ -1199,6 +1199,27 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t,
ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_IQCalibrate_8188E() <==\n"));
}
+#define ODM_TARGET_CHNL_NUM_2G_5G 59
+static u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
+{
+ u8 channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
+ 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
+ 124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153,
+ 155, 157, 159, 161, 163, 165
+ };
+ u8 place = chnl;
+
+ if (chnl > 14) {
+ for (place = 14; place < sizeof(channel_all); place++) {
+ if (channel_all[place] == chnl)
+ return place-13;
+ }
+ }
+ return 0;
+}
+
static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
{
u8 tmpreg;
diff --git a/drivers/staging/r8188eu/include/HalPhyRf.h b/drivers/staging/r8188eu/include/HalPhyRf.h
deleted file mode 100644
index ba877eb7e801..000000000000
--- a/drivers/staging/r8188eu/include/HalPhyRf.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __HAL_PHY_RF_H__
-#define __HAL_PHY_RF_H__
-
-u8 ODM_GetRightChnlPlaceforIQK(u8 chnl);
-
-#endif /* #ifndef __HAL_PHY_RF_H__ */
diff --git a/drivers/staging/r8188eu/include/odm_precomp.h b/drivers/staging/r8188eu/include/odm_precomp.h
index cec1035e4fe0..7e5db893c1ea 100644
--- a/drivers/staging/r8188eu/include/odm_precomp.h
+++ b/drivers/staging/r8188eu/include/odm_precomp.h
@@ -22,7 +22,6 @@
#include "odm_RegDefine11AC.h"
#include "odm_RegDefine11N.h"
-#include "HalPhyRf.h"
#include "HalPhyRf_8188e.h"/* for IQK,LCK,Power-tracking */
#include "Hal8188ERateAdaptive.h"/* for RA,Power training */
#include "rtl8188e_hal.h"
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 04/12] staging: r8188eu: remove include/h2clbk.h
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 02/12] staging: r8188eu: move ODM_TARGET_CHNL_NUM_2G_5G Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 03/12] staging: r8188eu: move ODM_GetRightChnlPlaceforIQK() Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 05/12] staging: r8188eu: remove include/autoconf.h Greg Kroah-Hartman
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
No one uses this file, so remove it from the tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/include/h2clbk.h | 15 ---------------
1 file changed, 15 deletions(-)
delete mode 100644 drivers/staging/r8188eu/include/h2clbk.h
diff --git a/drivers/staging/r8188eu/include/h2clbk.h b/drivers/staging/r8188eu/include/h2clbk.h
deleted file mode 100644
index 412b611760b3..000000000000
--- a/drivers/staging/r8188eu/include/h2clbk.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#define _H2CLBK_H_
-
-#include <rtl8711_spec.h>
-#include <TypeDef.h>
-
-void _lbk_cmd(struct adapter *adapter);
-
-void _lbk_rsp(struct adapter *adapter);
-
-void _lbk_evt(IN struct adapter *adapter);
-
-void h2c_event_callback(unsigned char *dev, unsigned char *pbuf);
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 05/12] staging: r8188eu: remove include/autoconf.h
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (2 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 04/12] staging: r8188eu: remove include/h2clbk.h Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 06/12] staging: r8188eu: remove include/Hal8188EReg.h Greg Kroah-Hartman
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
No one uses this file, so just remove it.
Also remove the pointless Makefile rule that was attempting to create
it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/Makefile | 7 ------
drivers/staging/r8188eu/include/autoconf.h | 26 ----------------------
2 files changed, 33 deletions(-)
delete mode 100644 drivers/staging/r8188eu/include/autoconf.h
diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index ea455b0939bf..a97cced2e61a 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -15,8 +15,6 @@ EXTRA_CFLAGS += -I$(src)/include
ccflags-y += -D__CHECK_ENDIAN__
-CONFIG_AUTOCFG_CP = n
-
CONFIG_R8188EU = m
CONFIG_USB_HCI = y
@@ -72,11 +70,6 @@ _OS_INTFS_FILES := \
_HAL_INTFS_FILES += $(OUTSRC_FILES)
-ifeq ($(CONFIG_AUTOCFG_CP), y)
-
-$(shell cp $(TopDIR)/autoconf_rtl8188e_usb_linux.h $(TopDIR)/include/autoconf.h)
-endif
-
ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
endif
diff --git a/drivers/staging/r8188eu/include/autoconf.h b/drivers/staging/r8188eu/include/autoconf.h
deleted file mode 100644
index fcbfc60fad5a..000000000000
--- a/drivers/staging/r8188eu/include/autoconf.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation.*/
-
-/* temporarily flag ******* */
-/*
- * Public General Config
- */
-#define RTL871X_MODULE_NAME "88EU"
-#define DRV_NAME "rtl8188eu"
-
-/*
- * Internal General Config
- */
-
-#define CONFIG_AP_MODE
-
-#define CONFIG_P2P
-
-#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
-
-#define CONFIG_BR_EXT_BRNAME "br0"
-
-/*
- * Debug Related Config
- */
-#define DBG 1
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 06/12] staging: r8188eu: remove include/Hal8188EReg.h
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (3 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 05/12] staging: r8188eu: remove include/autoconf.h Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 07/12] staging: r8188eu: remove rtw_mfree2d() function Greg Kroah-Hartman
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
No one is using the defines in this file, so remove it as it is not
needed anywhere.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/include/Hal8188EReg.h | 19 -------------------
drivers/staging/r8188eu/include/odm_precomp.h | 1 -
2 files changed, 20 deletions(-)
delete mode 100644 drivers/staging/r8188eu/include/Hal8188EReg.h
diff --git a/drivers/staging/r8188eu/include/Hal8188EReg.h b/drivers/staging/r8188eu/include/Hal8188EReg.h
deleted file mode 100644
index e04fae68fa4b..000000000000
--- a/drivers/staging/r8188eu/include/Hal8188EReg.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __HAL_8188E_REG_H__
-#define __HAL_8188E_REG_H__
-
-/* */
-/* Register Definition */
-/* */
-#define TRX_ANTDIV_PATH 0x860
-#define RX_ANTDIV_PATH 0xb2c
-#define ODM_R_A_AGC_CORE1_8188E 0xc50
-
-/* */
-/* Bitmap Definition */
-/* */
-#define BIT_FA_RESET_8188E BIT0
-
-#endif
diff --git a/drivers/staging/r8188eu/include/odm_precomp.h b/drivers/staging/r8188eu/include/odm_precomp.h
index 7e5db893c1ea..b3d8f6463658 100644
--- a/drivers/staging/r8188eu/include/odm_precomp.h
+++ b/drivers/staging/r8188eu/include/odm_precomp.h
@@ -32,7 +32,6 @@
#include "HalHWImg8188E_MAC.h"
#include "HalHWImg8188E_RF.h"
#include "HalHWImg8188E_BB.h"
-#include "Hal8188EReg.h"
#include "odm_RegConfig8188E.h"
#include "odm_RTL8188E.h"
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 07/12] staging: r8188eu: remove rtw_mfree2d() function
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (4 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 06/12] staging: r8188eu: remove include/Hal8188EReg.h Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 08/12] staging: r8188eu: remove rtw_buf_free() function Greg Kroah-Hartman
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
It is just a wrapper around kfree(), so remove it and just call kfree()
instead.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 8 ++------
drivers/staging/r8188eu/include/osdep_service.h | 1 -
drivers/staging/r8188eu/os_dep/osdep_service.c | 5 -----
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index af7977165c3c..02ba495b6d2c 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -187,9 +187,7 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
exit:
kfree(efuseTbl);
-
- if (eFuseWord)
- rtw_mfree2d((void *)eFuseWord, EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
+ kfree(eFuseWord);
}
static void efuse_read_phymap_from_txpktbuf(
@@ -921,9 +919,7 @@ static void Hal_EfuseReadEFuse88E(struct adapter *Adapter,
exit:
kfree(efuseTbl);
-
- if (eFuseWord)
- rtw_mfree2d((void *)eFuseWord, EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
+ kfree(eFuseWord);
}
static void ReadEFuseByIC(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest)
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index e61113c2608c..ac45eec75153 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -226,7 +226,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz);
#define rtw_mfree(pbuf, sz) _rtw_mfree((pbuf), (sz))
void *rtw_malloc2d(int h, int w, int size);
-void rtw_mfree2d(void *pbuf, int h, int w, int size);
u32 _rtw_down_sema(struct semaphore *sema);
void _rtw_mutex_init(struct mutex *pmutex);
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index bec784dda81b..d11718013cf9 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -91,11 +91,6 @@ void *rtw_malloc2d(int h, int w, int size)
return a;
}
-void rtw_mfree2d(void *pbuf, int h, int w, int size)
-{
- kfree(pbuf);
-}
-
/*
For the following list_xxx operations,
caller must guarantee the atomic context.
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 08/12] staging: r8188eu: remove rtw_buf_free() function
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (5 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 07/12] staging: r8188eu: remove rtw_mfree2d() function Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 09/12] staging: r8188eu: remove unused enum _NIC_VERSION Greg Kroah-Hartman
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
It is just a wrapper around kfree(), so just replace all calls with
kfree() instead. The pointer is also set to NULL and the length set to
0 to emulate the original logic, just to be "safe" as I do not have a
device to test with, but odds are that can be removed later on.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/core/rtw_mlme.c | 8 ++++++--
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 11 ++++++++---
drivers/staging/r8188eu/include/osdep_service.h | 1 -
drivers/staging/r8188eu/os_dep/osdep_service.c | 7 -------
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 887e3a89bd27..8266e9a88e01 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -102,8 +102,12 @@ static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen)
void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
{
- rtw_buf_free(&pmlmepriv->assoc_req, &pmlmepriv->assoc_req_len);
- rtw_buf_free(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len);
+ kfree(&pmlmepriv->assoc_req);
+ pmlmepriv->assoc_req = NULL;
+ pmlmepriv->assoc_req_len = 0;
+ kfree(&pmlmepriv->assoc_rsp);
+ pmlmepriv->assoc_rsp = NULL;
+ pmlmepriv->assoc_rsp_len = 0;
rtw_free_mlme_ie_data(&pmlmepriv->wps_beacon_ie, &pmlmepriv->wps_beacon_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_req_ie, &pmlmepriv->wps_probe_req_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_resp_ie, &pmlmepriv->wps_probe_resp_ie_len);
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 488a18133e59..36b4e073d24c 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1522,7 +1522,9 @@ unsigned int OnAssocRsp(struct adapter *padapter, struct recv_frame *precv_frame
if (res > 0) {
rtw_buf_update(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len, pframe, pkt_len);
} else {
- rtw_buf_free(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len);
+ kfree(&pmlmepriv->assoc_rsp);
+ pmlmepriv->assoc_rsp = NULL;
+ pmlmepriv->assoc_rsp_len = 0;
}
report_join_res(padapter, res);
@@ -5549,8 +5551,11 @@ void issue_assocreq(struct adapter *padapter)
exit:
if (ret == _SUCCESS)
rtw_buf_update(&pmlmepriv->assoc_req, &pmlmepriv->assoc_req_len, (u8 *)pwlanhdr, pattrib->pktlen);
- else
- rtw_buf_free(&pmlmepriv->assoc_req, &pmlmepriv->assoc_req_len);
+ else {
+ kfree(&pmlmepriv->assoc_req);
+ pmlmepriv->assoc_req = NULL;
+ pmlmepriv->assoc_req_len = 0;
+ }
return;
}
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index ac45eec75153..df59fa325e6e 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -440,7 +440,6 @@ u64 rtw_division64(u64 x, u64 y);
(((u64) (a)[3]) << 24) | (((u64) (a)[2]) << 16) | \
(((u64) (a)[1]) << 8) | ((u64) (a)[0]))
-void rtw_buf_free(u8 **buf, u32 *buf_len);
void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);
struct rtw_cbuf {
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index d11718013cf9..182f8e9cd199 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -388,13 +388,6 @@ u64 rtw_division64(u64 x, u64 y)
return x;
}
-void rtw_buf_free(u8 **buf, u32 *buf_len)
-{
- *buf_len = 0;
- kfree(*buf);
- *buf = NULL;
-}
-
void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
{
u32 ori_len = 0, dup_len = 0;
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 09/12] staging: r8188eu: remove unused enum _NIC_VERSION
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (6 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 08/12] staging: r8188eu: remove rtw_buf_free() function Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 10/12] staging: r8188eu: remove include/nic_spec.h Greg Kroah-Hartman
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
None of these enumerated values were used anywhere in the driver, so
just remove them all.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/include/drv_types.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index d407d9274a78..d8faea4f6045 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -40,13 +40,6 @@
#define DRIVERVERSION "v4.1.4_6773.20130222"
-enum _NIC_VERSION {
- RTL8711_NIC,
- RTL8712_NIC,
- RTL8713_NIC,
- RTL8716_NIC
-};
-
#define SPEC_DEV_ID_NONE BIT(0)
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
#define SPEC_DEV_ID_ENABLE_PS BIT(2)
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 10/12] staging: r8188eu: remove include/nic_spec.h
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (7 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 09/12] staging: r8188eu: remove unused enum _NIC_VERSION Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 11/12] staging: r8188eu: remove rtw_usb_bulk_msg() macro Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 12/12] staging: r8188eu: remove rtw_usb_control_msg() macro Greg Kroah-Hartman
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
No one was including this file, so just remove it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/include/nic_spec.h | 24 ----------------------
1 file changed, 24 deletions(-)
delete mode 100644 drivers/staging/r8188eu/include/nic_spec.h
diff --git a/drivers/staging/r8188eu/include/nic_spec.h b/drivers/staging/r8188eu/include/nic_spec.h
deleted file mode 100644
index 77e865398fd1..000000000000
--- a/drivers/staging/r8188eu/include/nic_spec.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __NIC_SPEC_H__
-#define __NIC_SPEC_H__
-
-#define RTL8711_MCTRL_ (0x20000)
-#define RTL8711_UART_ (0x30000)
-#define RTL8711_TIMER_ (0x40000)
-#define RTL8711_FINT_ (0x50000)
-#define RTL8711_HINT_ (0x50000)
-#define RTL8711_GPIO_ (0x60000)
-#define RTL8711_WLANCTRL_ (0x200000)
-#define RTL8711_WLANFF_ (0xe00000)
-#define RTL8711_HCICTRL_ (0x600000)
-#define RTL8711_SYSCFG_ (0x620000)
-#define RTL8711_SYSCTRL_ (0x620000)
-#define RTL8711_MCCTRL_ (0x020000)
-
-#include <rtl8711_regdef.h>
-
-#include <rtl8711_bitdef.h>
-
-#endif /* __RTL8711_SPEC_H__ */
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 11/12] staging: r8188eu: remove rtw_usb_bulk_msg() macro
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (8 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 10/12] staging: r8188eu: remove include/nic_spec.h Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 12/12] staging: r8188eu: remove rtw_usb_control_msg() macro Greg Kroah-Hartman
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
No one is using this wrapper macro, so just remove it as it is
pointless.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/include/usb_ops.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8188eu/include/usb_ops.h
index 9e60b3a9a02a..d5b31e31b62d 100644
--- a/drivers/staging/r8188eu/include/usb_ops.h
+++ b/drivers/staging/r8188eu/include/usb_ops.h
@@ -25,9 +25,6 @@ enum {
value, index, data, size, timeout_ms) \
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
(index), (data), (size), (timeout_ms))
-#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
- usb_bulk_msg((usb_dev), (pipe), (data), (len), \
- (actual_length), (timeout_ms))
#include <usb_ops_linux.h>
void rtl8188eu_set_hw_type(struct adapter *padapter);
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 12/12] staging: r8188eu: remove rtw_usb_control_msg() macro
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
` (9 preceding siblings ...)
2021-07-30 9:24 ` [PATCH 11/12] staging: r8188eu: remove rtw_usb_bulk_msg() macro Greg Kroah-Hartman
@ 2021-07-30 9:24 ` Greg Kroah-Hartman
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-30 9:24 UTC (permalink / raw)
To: linux-staging; +Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman
It is a wrapper around usb_control_msg() that does nothing, so remove
the macro and just call the correct USB function instead in the one
place it is used.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 2 +-
drivers/staging/r8188eu/include/usb_ops.h | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index dd6138dfebb6..3c6abedb313d 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -56,7 +56,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
memcpy(pIo_buf, pdata, len);
}
- status = rtw_usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
+ status = usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
if (status == len) { /* Success this control transfer. */
rtw_reset_continual_urb_error(dvobjpriv);
diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8188eu/include/usb_ops.h
index d5b31e31b62d..6267d0999400 100644
--- a/drivers/staging/r8188eu/include/usb_ops.h
+++ b/drivers/staging/r8188eu/include/usb_ops.h
@@ -21,10 +21,6 @@ enum {
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
-#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
- value, index, data, size, timeout_ms) \
- usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
- (index), (data), (size), (timeout_ms))
#include <usb_ops_linux.h>
void rtl8188eu_set_hw_type(struct adapter *padapter);
--
2.32.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-07-30 9:24 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 9:24 [PATCH 01/12] staging: r8188eu: remove empty ODM_ResetIQKResult() function Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 02/12] staging: r8188eu: move ODM_TARGET_CHNL_NUM_2G_5G Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 03/12] staging: r8188eu: move ODM_GetRightChnlPlaceforIQK() Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 04/12] staging: r8188eu: remove include/h2clbk.h Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 05/12] staging: r8188eu: remove include/autoconf.h Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 06/12] staging: r8188eu: remove include/Hal8188EReg.h Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 07/12] staging: r8188eu: remove rtw_mfree2d() function Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 08/12] staging: r8188eu: remove rtw_buf_free() function Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 09/12] staging: r8188eu: remove unused enum _NIC_VERSION Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 10/12] staging: r8188eu: remove include/nic_spec.h Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 11/12] staging: r8188eu: remove rtw_usb_bulk_msg() macro Greg Kroah-Hartman
2021-07-30 9:24 ` [PATCH 12/12] staging: r8188eu: remove rtw_usb_control_msg() macro Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).