linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] staging: r8188eu: another round of removals
@ 2021-10-16 11:30 Martin Kaiser
  2021-10-16 11:30 ` [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code Martin Kaiser
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove some more dead code and unused definitions.

Martin Kaiser (8):
  staging: r8188eu: remove empty trigger gpio code
  staging: r8188eu: interface type is always usb
  staging: r8188eu: remove two checks that are always false
  staging: r8188eu: remove unused function prototypes
  staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
  staging: r8188eu: clean up Hal8188EPhyCfg.h
  staging: r8188eu: remove procfs functions
  staging: r8188eu: CurrentWirelessMode is not used

 drivers/staging/r8188eu/Makefile              |   1 -
 drivers/staging/r8188eu/core/rtw_debug.c      | 886 ------------------
 .../staging/r8188eu/hal/HalHWImg8188E_BB.c    |  14 +-
 .../staging/r8188eu/hal/HalHWImg8188E_MAC.c   |   3 +-
 .../staging/r8188eu/hal/HalHWImg8188E_RF.c    |   8 +-
 drivers/staging/r8188eu/hal/HalPhyRf_8188e.c  |  38 -
 drivers/staging/r8188eu/hal/odm.c             |   3 -
 drivers/staging/r8188eu/hal/rtl8188e_dm.c     |   2 -
 drivers/staging/r8188eu/hal/usb_halinit.c     |   8 -
 .../staging/r8188eu/include/Hal8188EPhyCfg.h  |  78 --
 drivers/staging/r8188eu/include/hal_intf.h    |   1 -
 drivers/staging/r8188eu/include/odm.h         |  11 +-
 .../staging/r8188eu/include/rtl8188e_hal.h    |   1 -
 drivers/staging/r8188eu/include/rtw_debug.h   | 148 ---
 14 files changed, 6 insertions(+), 1196 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c

-- 
2.20.1


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

* [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:23   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 2/8] staging: r8188eu: interface type is always usb Martin Kaiser
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

The hal variable HW_VAR_TRIGGER_GPIO_0 and the rtl8192cu_trigger_gpio_0
function are not used. Remove them.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/usb_halinit.c  | 8 --------
 drivers/staging/r8188eu/include/hal_intf.h | 1 -
 2 files changed, 9 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index abbd107ad3c1..cdc602fa9af8 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1087,11 +1087,6 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
 	_ReadAdapterInfo8188EU(Adapter);
 }
 
-#define GPIO_DEBUG_PORT_NUM 0
-static void rtl8192cu_trigger_gpio_0(struct adapter *adapt)
-{
-}
-
 static void ResumeTxBeacon(struct adapter *adapt)
 {
 	struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
@@ -1657,9 +1652,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			}
 		}
 		break;
-	case HW_VAR_TRIGGER_GPIO_0:
-		rtl8192cu_trigger_gpio_0(Adapter);
-		break;
 	case HW_VAR_RPT_TIMER_SETTING:
 		{
 			u16 min_rpt_time = (*(u16 *)val);
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 408168284b3f..d777ad9071e2 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -55,7 +55,6 @@ enum hw_variables {
 	HW_VAR_TDLS_RS_RCR,
 	HW_VAR_TDLS_DONE_CH_SEN,
 	HW_VAR_INITIAL_GAIN,
-	HW_VAR_TRIGGER_GPIO_0,
 	HW_VAR_BT_SET_COEXIST,
 	HW_VAR_BT_ISSUE_DELBA,
 	HW_VAR_CURRENT_ANTENNA,
-- 
2.20.1


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

* [PATCH 2/8] staging: r8188eu: interface type is always usb
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
  2021-10-16 11:30 ` [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:46   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 3/8] staging: r8188eu: remove two checks that are always false Martin Kaiser
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

SupportInterface in struct odm_dm_struct is always ODM_ITRF_USB.
Remove the variable and the code to configure the interface.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c  |  9 +++------
 drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c |  3 +--
 drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c  |  3 +--
 drivers/staging/r8188eu/hal/odm.c               |  3 ---
 drivers/staging/r8188eu/hal/rtl8188e_dm.c       |  2 --
 drivers/staging/r8188eu/include/odm.h           | 11 +----------
 6 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
index 17b55c31f6eb..a623e0aaa0d0 100644
--- a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
+++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
@@ -176,7 +176,6 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
 {
 	u32     hex         = 0;
 	u32     i           = 0;
-	u8     interfaceValue   = dm_odm->SupportInterface;
 	u32     arraylen    = sizeof(array_agc_tab_1t_8188e) / sizeof(u32);
 	u32    *array       = array_agc_tab_1t_8188e;
 	bool		biol = false;
@@ -185,7 +184,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
 	u8 bndy_cnt = 1;
 	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
 
-	hex += interfaceValue << 8;
+	hex += ODM_ITRF_USB << 8;
 	hex += ODM_CE << 16;
 	hex += 0xFF000000;
 	biol = rtw_IOL_applied(adapter);
@@ -453,7 +452,6 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
 {
 	u32     hex         = 0;
 	u32     i           = 0;
-	u8     interfaceValue   = dm_odm->SupportInterface;
 	u32     arraylen    = sizeof(array_phy_reg_1t_8188e) / sizeof(u32);
 	u32    *array       = array_phy_reg_1t_8188e;
 	bool	biol = false;
@@ -461,7 +459,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
 	struct xmit_frame *pxmit_frame = NULL;
 	u8 bndy_cnt = 1;
 	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
-	hex += interfaceValue << 8;
+	hex += ODM_ITRF_USB << 8;
 	hex += ODM_CE << 16;
 	hex += 0xFF000000;
 	biol = rtw_IOL_applied(adapter);
@@ -659,11 +657,10 @@ void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm)
 {
 	u32  hex;
 	u32  i           = 0;
-	u8  interfaceValue   = dm_odm->SupportInterface;
 	u32  arraylen    = sizeof(array_phy_reg_pg_8188e) / sizeof(u32);
 	u32 *array       = array_phy_reg_pg_8188e;
 
-	hex = interfaceValue << 8;
+	hex = ODM_ITRF_USB << 8;
 	hex += (ODM_CE << 16) + 0xFF000000;
 
 	for (i = 0; i < arraylen; i += 3) {
diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
index bb57e93eb959..b4c55863d3fb 100644
--- a/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
+++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
@@ -133,7 +133,6 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
 
 	u32     hex         = 0;
 	u32     i;
-	u8     interface_val   = dm_odm->SupportInterface;
 	u32     array_len    = sizeof(array_MAC_REG_8188E) / sizeof(u32);
 	u32    *array       = array_MAC_REG_8188E;
 	bool	biol = false;
@@ -142,7 +141,7 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
 	struct xmit_frame	*pxmit_frame = NULL;
 	u8 bndy_cnt = 1;
 	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
-	hex += interface_val << 8;
+	hex += ODM_ITRF_USB << 8;
 	hex += ODM_CE << 16;
 	hex += 0xFF000000;
 
diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
index 7a8faa7885a1..3e2a09fc2619 100644
--- a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
+++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
@@ -144,7 +144,6 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
 
 	u32     hex         = 0;
 	u32     i           = 0;
-	u8     interfaceValue   = pDM_Odm->SupportInterface;
 	u32     ArrayLen    = sizeof(Array_RadioA_1T_8188E) / sizeof(u32);
 	u32    *Array       = Array_RadioA_1T_8188E;
 	bool		biol = false;
@@ -153,7 +152,7 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
 	u8 bndy_cnt = 1;
 	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
 
-	hex += interfaceValue << 8;
+	hex += ODM_ITRF_USB << 8;
 	hex += ODM_CE << 16;
 	hex += 0xFF000000;
 	biol = rtw_IOL_applied(Adapter);
diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
index 2178ffe41bb3..a90597b82e12 100644
--- a/drivers/staging/r8188eu/hal/odm.c
+++ b/drivers/staging/r8188eu/hal/odm.c
@@ -214,9 +214,6 @@ void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn
 	case	ODM_CMNINFO_ABILITY:
 		pDM_Odm->SupportAbility = (u32)Value;
 		break;
-	case	ODM_CMNINFO_INTERFACE:
-		pDM_Odm->SupportInterface = (u8)Value;
-		break;
 	case	ODM_CMNINFO_MP_TEST_CHIP:
 		pDM_Odm->bIsMPChip = (u8)Value;
 		break;
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
index 1ca24a507d6d..869d95f3cf33 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
@@ -33,8 +33,6 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
 
 	dm_odm->Adapter = Adapter;
 
-	ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_USB);
-
 	ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(hal_data->VersionID));
 
 	if (hal_data->rf_type == RF_1T1R)
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index 187f872d09b5..ba936d30a0db 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -262,7 +262,6 @@ enum odm_common_info_def {
 
 	/* HOOK BEFORE REG INIT----------- */
 	ODM_CMNINFO_ABILITY,		/* ODM_ABILITY_E */
-	ODM_CMNINFO_INTERFACE,		/* ODM_INTERFACE_E */
 	ODM_CMNINFO_MP_TEST_CHIP,
 	ODM_CMNINFO_RF_TYPE,		/* RF_PATH_E or ODM_RF_TYPE_E? */
 	/* HOOK BEFORE REG INIT-----------  */
@@ -343,13 +342,7 @@ enum odm_ability_def {
 	ODM_RF_CALIBRATION		= BIT(26),
 };
 
-/* 	ODM_CMNINFO_INTERFACE */
-enum odm_interface_def {
-	ODM_ITRF_PCIE	=	0x1,
-	ODM_ITRF_USB	=	0x2,
-	ODM_ITRF_SDIO	=	0x4,
-	ODM_ITRF_ALL	=	0x7,
-};
+# define ODM_ITRF_USB 0x2
 
 /*  ODM_CMNINFO_RF_TYPE */
 /*  For example 1T2R (A+AB = BIT(0)|BIT(4)|BIT(5)) */
@@ -611,8 +604,6 @@ struct odm_dm_struct {
 /* HOOK BEFORE REG INIT----------- */
 	/*  ODM Support Ability DIG/RATR/TX_PWR_TRACK/ �K�K = 1/2/3/�K */
 	u32	SupportAbility;
-	/*  ODM PCIE/USB/SDIO/GSPI = 0/1/2/3 */
-	u8	SupportInterface;
 	/*  RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
 	u8	RFType;
 
-- 
2.20.1


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

* [PATCH 3/8] staging: r8188eu: remove two checks that are always false
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
  2021-10-16 11:30 ` [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code Martin Kaiser
  2021-10-16 11:30 ` [PATCH 2/8] staging: r8188eu: interface type is always usb Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:48   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 4/8] staging: r8188eu: remove unused function prototypes Martin Kaiser
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Commit aefb1fc5c185 ("staging: r8188eu: odm BoardType is never set")
clarified that the odm board type is always 0.

The CheckCondition functions extract the board type from the hex
parameter and stores it in _board. For _board == 0,
(_board == cond) && cond != 0x00 is always false. Remove the checks.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c | 5 -----
 drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c | 5 -----
 2 files changed, 10 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
index a623e0aaa0d0..f6e4243e0c7b 100644
--- a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
+++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
@@ -13,7 +13,6 @@
 
 static bool CheckCondition(const u32  condition, const u32  hex)
 {
-	u32 _board     = (hex & 0x000000FF);
 	u32 _interface = (hex & 0x0000FF00) >> 8;
 	u32 _platform  = (hex & 0x00FF0000) >> 16;
 	u32 cond = condition;
@@ -21,10 +20,6 @@ static bool CheckCondition(const u32  condition, const u32  hex)
 	if (condition == 0xCDCDCDCD)
 		return true;
 
-	cond = condition & 0x000000FF;
-	if ((_board == cond) && cond != 0x00)
-		return false;
-
 	cond = condition & 0x0000FF00;
 	cond = cond >> 8;
 	if ((_interface & cond) == 0 && cond != 0x07)
diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
index 3e2a09fc2619..5e0a96200078 100644
--- a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
+++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
@@ -6,7 +6,6 @@
 
 static bool CheckCondition(const u32  Condition, const u32  Hex)
 {
-	u32 _board     = (Hex & 0x000000FF);
 	u32 _interface = (Hex & 0x0000FF00) >> 8;
 	u32 _platform  = (Hex & 0x00FF0000) >> 16;
 	u32 cond = Condition;
@@ -14,10 +13,6 @@ static bool CheckCondition(const u32  Condition, const u32  Hex)
 	if (Condition == 0xCDCDCDCD)
 		return true;
 
-	cond = Condition & 0x000000FF;
-	if ((_board == cond) && cond != 0x00)
-		return false;
-
 	cond = Condition & 0x0000FF00;
 	cond = cond >> 8;
 	if ((_interface & cond) == 0 && cond != 0x07)
-- 
2.20.1


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

* [PATCH 4/8] staging: r8188eu: remove unused function prototypes
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
                   ` (2 preceding siblings ...)
  2021-10-16 11:30 ` [PATCH 3/8] staging: r8188eu: remove two checks that are always false Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:50   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 5/8] staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used Martin Kaiser
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove prototypes of functions that aren't present in this driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/include/Hal8188EPhyCfg.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
index ee4b26ecd19d..084bccc5dcb9 100644
--- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
+++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
@@ -194,18 +194,10 @@ void PHY_SetBWMode8188E(struct adapter *adapter,
 
 /*  channel switch related funciton */
 void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
-/*  Call after initialization */
-void ChkFwCmdIoDone(struct adapter *adapter);
 
 /*  BB/MAC/RF other monitor API */
 void PHY_SetRFPathSwitch_8188E(struct adapter *adapter,	bool main);
 
-void PHY_SwitchEphyParameter(struct adapter *adapter);
-
-void PHY_EnableHostClkReq(struct adapter *adapter);
-
-bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
-
 void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
 				 u32 mask, u32 data);
 /*--------------------------Exported Function prototype---------------------*/
-- 
2.20.1


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

* [PATCH 5/8] staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
                   ` (3 preceding siblings ...)
  2021-10-16 11:30 ` [PATCH 4/8] staging: r8188eu: remove unused function prototypes Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:53   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 6/8] staging: r8188eu: clean up Hal8188EPhyCfg.h Martin Kaiser
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove the PHY_SetRFPathSwitch_8188E function which is not used.

It was the only caller of phy_setrfpathswitch_8188e, that function
can be removed as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/HalPhyRf_8188e.c  | 38 -------------------
 .../staging/r8188eu/include/Hal8188EPhyCfg.h  |  3 --
 2 files changed, 41 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
index f01ee3cd8795..79f407c280be 100644
--- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
+++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
@@ -1189,41 +1189,3 @@ void PHY_LCCalibrate_8188E(struct adapter *adapt)
 		phy_LCCalibrate_8188E(adapt, false);
 	}
 }
-
-static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2t)
-{
-	struct hal_data_8188e	*pHalData = GET_HAL_DATA(adapt);
-	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
-
-	if (!adapt->hw_init_completed) {
-		u8 u1btmp;
-		u1btmp = ODM_Read1Byte(dm_odm, REG_LEDCFG2) | BIT(7);
-		ODM_Write1Byte(dm_odm, REG_LEDCFG2, u1btmp);
-		ODM_SetBBReg(dm_odm, rFPGA0_XAB_RFParameter, BIT(13), 0x01);
-	}
-
-	if (is2t) {	/* 92C */
-		if (main)
-			ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x1);	/* 92C_Path_A */
-		else
-			ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x2);	/* BT */
-	} else {			/* 88C */
-		if (main)
-			ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x2);	/* Main */
-		else
-			ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x1);	/* Aux */
-	}
-}
-
-void PHY_SetRFPathSwitch_8188E(struct adapter *adapt, bool main)
-{
-	struct hal_data_8188e	*pHalData = GET_HAL_DATA(adapt);
-	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
-
-	if (dm_odm->RFType == ODM_2T2R) {
-		phy_setrfpathswitch_8188e(adapt, main, true);
-	} else {
-		/*  For 88C 1T1R */
-		phy_setrfpathswitch_8188e(adapt, main, false);
-	}
-}
diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
index 084bccc5dcb9..feae0b32cac6 100644
--- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
+++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
@@ -195,9 +195,6 @@ void PHY_SetBWMode8188E(struct adapter *adapter,
 /*  channel switch related funciton */
 void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
 
-/*  BB/MAC/RF other monitor API */
-void PHY_SetRFPathSwitch_8188E(struct adapter *adapter,	bool main);
-
 void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
 				 u32 mask, u32 data);
 /*--------------------------Exported Function prototype---------------------*/
-- 
2.20.1


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

* [PATCH 6/8] staging: r8188eu: clean up Hal8188EPhyCfg.h
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
                   ` (4 preceding siblings ...)
  2021-10-16 11:30 ` [PATCH 5/8] staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:54   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 7/8] staging: r8188eu: remove procfs functions Martin Kaiser
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove a bunch of unused structs, enums and defines
from Hal8188EPhyCfg.h.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 .../staging/r8188eu/include/Hal8188EPhyCfg.h  | 59 -------------------
 1 file changed, 59 deletions(-)

diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
index feae0b32cac6..58377edf724d 100644
--- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
+++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
@@ -21,23 +21,6 @@
 /*--------------------------Define Parameters-------------------------------*/
 
 /*------------------------------Define structure----------------------------*/
-enum sw_chnl_cmd_id {
-	CmdID_End,
-	CmdID_SetTxPowerLevel,
-	CmdID_BBRegWrite10,
-	CmdID_WritePortUlong,
-	CmdID_WritePortUshort,
-	CmdID_WritePortUchar,
-	CmdID_RF_WriteReg,
-};
-
-/* 1. Switch channel related */
-struct sw_chnl_cmd {
-	enum sw_chnl_cmd_id CmdID;
-	u32 Para1;
-	u32 Para2;
-	u32 msDelay;
-};
 
 enum hw90_block {
 	HW90_BLOCK_MAC = 0,
@@ -73,16 +56,6 @@ enum wireless_mode {
 	WIRELESS_MODE_N_24G		= BIT(3),
 };
 
-enum phy_rate_tx_offset_area {
-	RA_OFFSET_LEGACY_OFDM1,
-	RA_OFFSET_LEGACY_OFDM2,
-	RA_OFFSET_HT_OFDM1,
-	RA_OFFSET_HT_OFDM2,
-	RA_OFFSET_HT_OFDM3,
-	RA_OFFSET_HT_OFDM4,
-	RA_OFFSET_HT_CCK,
-};
-
 /* BB/RF related */
 enum RF_TYPE_8190P {
 	RF_TYPE_MIN,		/*  0 */
@@ -141,24 +114,6 @@ struct bb_reg_def {
 				 * Path A and B */
 };
 
-struct ant_sel_ofdm {
-	u32 r_tx_antenna:4;
-	u32 r_ant_l:4;
-	u32 r_ant_non_ht:4;
-	u32 r_ant_ht1:4;
-	u32 r_ant_ht2:4;
-	u32 r_ant_ht_s1:4;
-	u32 r_ant_non_ht_s1:4;
-	u32 OFDM_TXSC:2;
-	u32 reserved:2;
-};
-
-struct ant_sel_cck {
-	u8 r_cckrx_enable_2:2;
-	u8 r_cckrx_enable:2;
-	u8 r_ccktx_enable:4;
-};
-
 /*------------------------------Define structure----------------------------*/
 
 /*------------------------Export global variable----------------------------*/
@@ -208,18 +163,4 @@ void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
 #define PHY_SetRFReg(adapt, rfpath, regaddr, bitmask, data)	\
 	rtl8188e_PHY_SetRFReg((adapt), (rfpath), (regaddr), (bitmask), (data))
 
-#define PHY_SetMacReg	PHY_SetBBReg
-
-#define	SIC_HW_SUPPORT			0
-
-#define	SIC_MAX_POLL_CNT		5
-
-#define	SIC_CMD_READY			0
-#define	SIC_CMD_WRITE			1
-#define	SIC_CMD_READ			2
-
-#define	SIC_CMD_REG			0x1EB		/*  1byte */
-#define	SIC_ADDR_REG			0x1E8		/*  1b9~1ba, 2 bytes */
-#define	SIC_DATA_REG			0x1EC		/*  1bc~1bf */
-
 #endif	/*  __INC_HAL8192CPHYCFG_H */
-- 
2.20.1


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

* [PATCH 7/8] staging: r8188eu: remove procfs functions
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
                   ` (5 preceding siblings ...)
  2021-10-16 11:30 ` [PATCH 6/8] staging: r8188eu: clean up Hal8188EPhyCfg.h Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:56   ` Michael Straube
  2021-10-16 11:30 ` [PATCH 8/8] staging: r8188eu: CurrentWirelessMode is not used Martin Kaiser
  2021-10-16 15:34 ` [PATCH 0/8] staging: r8188eu: another round of removals Phillip Potter
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

It seems that previous versions of this driver provided a procfs
interface for debugging.

Remove the procfs helper functions which are no longer used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/Makefile            |   1 -
 drivers/staging/r8188eu/core/rtw_debug.c    | 886 --------------------
 drivers/staging/r8188eu/include/rtw_debug.h | 148 ----
 3 files changed, 1035 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c

diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index 27826baef377..d63fad20e9d2 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -74,7 +74,6 @@ rtk_core :=				\
 		core/rtw_ap.o		\
 		core/rtw_br_ext.o	\
 		core/rtw_cmd.o		\
-		core/rtw_debug.o	\
 		core/rtw_efuse.o	\
 		core/rtw_ieee80211.o	\
 		core/rtw_ioctl_set.o	\
diff --git a/drivers/staging/r8188eu/core/rtw_debug.c b/drivers/staging/r8188eu/core/rtw_debug.c
deleted file mode 100644
index 3d613d997a38..000000000000
--- a/drivers/staging/r8188eu/core/rtw_debug.c
+++ /dev/null
@@ -1,886 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2012 Realtek Corporation. */
-
-#define _RTW_DEBUG_C_
-
-#include "../include/rtw_debug.h"
-#include "../include/drv_types.h"
-
-int proc_get_drv_version(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_write_reg(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	*eof = 1;
-	return 0;
-}
-
-int proc_set_write_reg(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	char tmp[32];
-	u32 addr, val, len;
-
-	if (count < 3) {
-		DBG_88E("argument size is less than 3\n");
-		return -EFAULT;
-	}
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		int num = sscanf(tmp, "%x %x %x", &addr, &val, &len);
-
-		if (num !=  3) {
-			DBG_88E("invalid write_reg parameter!\n");
-			return count;
-		}
-		switch (len) {
-		case 1:
-			rtw_write8(padapter, addr, (u8)val);
-			break;
-		case 2:
-			rtw_write16(padapter, addr, (u16)val);
-			break;
-		case 4:
-			rtw_write32(padapter, addr, val);
-			break;
-		default:
-			DBG_88E("error write length =%d", len);
-			break;
-		}
-	}
-	return count;
-}
-
-static u32 proc_get_read_addr = 0xeeeeeeee;
-static u32 proc_get_read_len = 0x4;
-
-int proc_get_read_reg(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-
-	int len = 0;
-
-	if (proc_get_read_addr == 0xeeeeeeee) {
-		*eof = 1;
-		return len;
-	}
-
-	switch (proc_get_read_len) {
-	case 1:
-		len += snprintf(page + len, count - len, "rtw_read8(0x%x)=0x%x\n", proc_get_read_addr, rtw_read8(padapter, proc_get_read_addr));
-		break;
-	case 2:
-		len += snprintf(page + len, count - len, "rtw_read16(0x%x)=0x%x\n", proc_get_read_addr, rtw_read16(padapter, proc_get_read_addr));
-		break;
-	case 4:
-		len += snprintf(page + len, count - len, "rtw_read32(0x%x)=0x%x\n", proc_get_read_addr, rtw_read32(padapter, proc_get_read_addr));
-		break;
-	default:
-		len += snprintf(page + len, count - len, "error read length=%d\n", proc_get_read_len);
-		break;
-	}
-
-	*eof = 1;
-	return len;
-}
-
-int proc_set_read_reg(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	char tmp[16];
-	u32 addr, len;
-
-	if (count < 2) {
-		DBG_88E("argument size is less than 2\n");
-		return -EFAULT;
-	}
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		int num = sscanf(tmp, "%x %x", &addr, &len);
-
-		if (num !=  2) {
-			DBG_88E("invalid read_reg parameter!\n");
-			return count;
-		}
-
-		proc_get_read_addr = addr;
-
-		proc_get_read_len = len;
-	}
-
-	return count;
-}
-
-int proc_get_fwstate(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "fwstate=0x%x\n", get_fwstate(pmlmepriv));
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_sec_info(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct security_priv *psecuritypriv = &padapter->securitypriv;
-
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n",
-						psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm,
-						psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_mlmext_state(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
-	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
-
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "pmlmeinfo->state=0x%x\n", pmlmeinfo->state);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_qos_option(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "qos_option=%d\n", pmlmepriv->qospriv.qos_option);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_ht_option(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
-	int len = 0;
-	len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option);
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rf_info(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "cur_ch=%d, cur_bw=%d, cur_ch_offet=%d\n",
-					pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
-	*eof = 1;
-	return len;
-}
-
-int proc_get_ap_info(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct sta_info *psta;
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-	struct wlan_network *cur_network = &pmlmepriv->cur_network;
-	struct sta_priv *pstapriv = &padapter->stapriv;
-	int len = 0;
-
-	psta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
-	if (psta) {
-		int i;
-		struct recv_reorder_ctrl *preorder_ctrl;
-
-		len += snprintf(page + len, count - len, "SSID=%s\n", cur_network->network.Ssid.Ssid);
-		len += snprintf(page + len, count - len, "sta's macaddr:%pM\n", psta->hwaddr);
-		len += snprintf(page + len, count - len, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
-		len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
-		len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
-		len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
-		len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
-		len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
-		len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
-
-		for (i = 0; i < 16; i++) {
-			preorder_ctrl = &psta->recvreorder_ctrl[i];
-			if (preorder_ctrl->enable)
-				len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq);
-		}
-	} else {
-		len += snprintf(page + len, count - len, "can't get sta's macaddr, cur_network's macaddr: %pM\n", cur_network->network.MacAddress);
-	}
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_trx_info(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
-	struct recv_priv  *precvpriv = &padapter->recvpriv;
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d, free_ext_xmitbuf_cnt=%d, free_recvframe_cnt=%d\n",
-				pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmit_extbuf_cnt, precvpriv->free_recvframe_cnt);
-	len += snprintf(page + len, count - len, "rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_mac_reg_dump1(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1;
-
-	len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
-
-	for (i = 0x0; i < 0x300; i += 4) {
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_mac_reg_dump2(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1;
-
-	len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
-	memset(page, 0, count);
-	for (i = 0x300; i < 0x600; i += 4) {
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_mac_reg_dump3(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1;
-
-	len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
-
-	for (i = 0x600; i < 0x800; i += 4) {
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_bb_reg_dump1(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1;
-
-	len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
-	for (i = 0x800; i < 0xB00; i += 4) {
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-	*eof = 1;
-	return len;
-}
-
-int proc_get_bb_reg_dump2(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1;
-
-	len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
-	for (i = 0xB00; i < 0xE00; i += 4) {
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-	*eof = 1;
-	return len;
-}
-
-int proc_get_bb_reg_dump3(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1;
-
-	len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
-	for (i = 0xE00; i < 0x1000; i += 4) {
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rf_reg_dump1(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1, path;
-	u32 value;
-
-	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
-	path = 1;
-	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
-	for (i = 0; i < 0xC0; i++) {
-		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x ", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", value);
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rf_reg_dump2(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1, path;
-	u32 value;
-
-	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
-	path = 1;
-	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
-	for (i = 0xC0; i < 0x100; i++) {
-		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x ", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", value);
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rf_reg_dump3(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1, path;
-	u32 value;
-
-	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
-	path = 2;
-	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
-	for (i = 0; i < 0xC0; i++) {
-		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x ", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", value);
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rf_reg_dump4(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-	int i, j = 1, path;
-	u32 value;
-
-	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
-	path = 2;
-	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
-	for (i = 0xC0; i < 0x100; i++) {
-		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
-		if (j % 4 == 1)
-			len += snprintf(page + len, count - len, "0x%02x ", i);
-		len += snprintf(page + len, count - len, " 0x%08x ", value);
-		if ((j++) % 4 == 0)
-			len += snprintf(page + len, count - len, "\n");
-	}
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rx_signal(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	int len = 0;
-
-	len = snprintf(page + len, count,
-		"rssi:%d\n"
-		"rxpwdb:%d\n"
-		"signal_strength:%u\n"
-		"signal_qual:%u\n"
-		"noise:%u\n",
-		padapter->recvpriv.rssi,
-		padapter->recvpriv.rxpwdb,
-		padapter->recvpriv.signal_strength,
-		padapter->recvpriv.signal_qual,
-		padapter->recvpriv.noise
-		);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_set_rx_signal(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	char tmp[32];
-	u32 is_signal_dbg;
-	s32 signal_strength;
-
-	if (count < 1)
-		return -EFAULT;
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
-		is_signal_dbg = is_signal_dbg == 0 ? 0 : 1;
-		if (is_signal_dbg && num != 2)
-			return count;
-
-		signal_strength = signal_strength > 100 ? 100 : signal_strength;
-		signal_strength = signal_strength < 0 ? 0 : signal_strength;
-
-		padapter->recvpriv.is_signal_dbg = is_signal_dbg;
-		padapter->recvpriv.signal_strength_dbg = signal_strength;
-
-		if (is_signal_dbg)
-			DBG_88E("set %s %u\n", "DBG_SIGNAL_STRENGTH", signal_strength);
-		else
-			DBG_88E("set %s\n", "HW_SIGNAL_STRENGTH");
-	}
-	return count;
-}
-
-int proc_get_ht_enable(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-	int len = 0;
-
-	if (pregpriv)
-		len += snprintf(page + len, count - len,
-			"%d\n",
-			pregpriv->ht_enable
-			);
-	*eof = 1;
-	return len;
-}
-
-int proc_set_ht_enable(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-	char tmp[32];
-	s32 mode = 0;
-
-	if (count < 1)
-		return -EFAULT;
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		if (pregpriv) {
-			pregpriv->ht_enable = mode;
-			pr_info("ht_enable=%d\n", pregpriv->ht_enable);
-		}
-	}
-
-	return count;
-}
-
-int proc_get_cbw40_enable(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-
-	int len = 0;
-
-	if (pregpriv)
-		len += snprintf(page + len, count - len,
-			"%d\n",
-			pregpriv->cbw40_enable
-			);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-	char tmp[32];
-	s32 mode = 0;
-
-	if (count < 1)
-		return -EFAULT;
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		if (pregpriv) {
-			pregpriv->cbw40_enable = mode;
-			pr_info("cbw40_enable=%d\n", mode);
-		}
-	}
-	return count;
-}
-
-int proc_get_ampdu_enable(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-
-	int len = 0;
-
-	if (pregpriv)
-		len += snprintf(page + len, count - len,
-			"%d\n",
-			pregpriv->ampdu_enable
-			);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-	char tmp[32];
-	s32 mode = 0;
-
-	if (count < 1)
-		return -EFAULT;
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		if (pregpriv) {
-			pregpriv->ampdu_enable = mode;
-			pr_info("ampdu_enable=%d\n", mode);
-		}
-	}
-	return count;
-}
-
-int proc_get_two_path_rssi(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-
-	int len = 0;
-
-	if (padapter)
-		len += snprintf(page + len, count - len,
-			"%d %d\n",
-			padapter->recvpriv.RxRssi[0],
-			padapter->recvpriv.RxRssi[1]
-			);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_rx_stbc(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-
-	int len = 0;
-
-	if (pregpriv)
-		len += snprintf(page + len, count - len,
-			"%d\n",
-			pregpriv->rx_stbc
-			);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_set_rx_stbc(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct registry_priv	*pregpriv = &padapter->registrypriv;
-	char tmp[32];
-	u32 mode = 0;
-
-	if (count < 1)
-		return -EFAULT;
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		if (pregpriv) {
-			pregpriv->rx_stbc = mode;
-			printk("rx_stbc=%d\n", mode);
-		}
-	}
-	return count;
-}
-
-int proc_get_rssi_disp(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	*eof = 1;
-	return 0;
-}
-
-int proc_set_rssi_disp(struct file *file, const char __user *buffer,
-		unsigned long count, void *data)
-{
-	struct net_device *dev = (struct net_device *)data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	char tmp[32];
-	u32 enable = 0;
-
-	if (count < 1) {
-		DBG_88E("argument size is less than 1\n");
-		return -EFAULT;
-	}
-
-	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
-		int num = sscanf(tmp, "%x", &enable);
-
-		if (num !=  1) {
-			DBG_88E("invalid set_rssi_disp parameter!\n");
-			return count;
-		}
-
-		if (enable) {
-			DBG_88E("Turn On Rx RSSI Display Function\n");
-			padapter->bRxRSSIDisplay = enable;
-		} else {
-			DBG_88E("Turn Off Rx RSSI Display Function\n");
-			padapter->bRxRSSIDisplay = 0;
-		}
-	}
-	return count;
-}
-
-int proc_get_all_sta_info(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct sta_info *psta;
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct sta_priv *pstapriv = &padapter->stapriv;
-	int i, j;
-	struct list_head *plist, *phead;
-	struct recv_reorder_ctrl *preorder_ctrl;
-	int len = 0;
-
-	len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
-
-	spin_lock_bh(&pstapriv->sta_hash_lock);
-
-	for (i = 0; i < NUM_STA; i++) {
-		phead = &pstapriv->sta_hash[i];
-		plist = phead->next;
-
-		while (phead != plist) {
-			psta = container_of(plist, struct sta_info, hash_list);
-
-			plist = plist->next;
-
-			len += snprintf(page + len, count - len, "sta's macaddr: %pM\n", psta->hwaddr);
-			len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
-			len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
-			len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
-			len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
-			len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
-			len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
-			len += snprintf(page + len, count - len, "sleepq_len=%d\n", psta->sleepq_len);
-			len += snprintf(page + len, count - len, "capability=0x%x\n", psta->capability);
-			len += snprintf(page + len, count - len, "flags=0x%x\n", psta->flags);
-			len += snprintf(page + len, count - len, "wpa_psk=0x%x\n", psta->wpa_psk);
-			len += snprintf(page + len, count - len, "wpa2_group_cipher=0x%x\n", psta->wpa2_group_cipher);
-			len += snprintf(page + len, count - len, "wpa2_pairwise_cipher=0x%x\n", psta->wpa2_pairwise_cipher);
-			len += snprintf(page + len, count - len, "qos_info=0x%x\n", psta->qos_info);
-			len += snprintf(page + len, count - len, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy);
-
-			for (j = 0; j < 16; j++) {
-				preorder_ctrl = &psta->recvreorder_ctrl[j];
-				if (preorder_ctrl->enable)
-					len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", j, preorder_ctrl->indicate_seq);
-			}
-		}
-	}
-	spin_unlock_bh(&pstapriv->sta_hash_lock);
-
-	*eof = 1;
-	return len;
-}
-
-int proc_get_best_channel(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data)
-{
-	struct net_device *dev = data;
-	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-	int len = 0;
-	u32 i, best_channel_24G = 1, index_24G = 0;
-
-	for (i = 0; pmlmeext->channel_set[i].ChannelNum != 0; i++) {
-		if (pmlmeext->channel_set[i].ChannelNum == 1)
-			index_24G = i;
-	}
-
-	for (i = 0; pmlmeext->channel_set[i].ChannelNum != 0; i++) {
-		/*  2.4G */
-		if (pmlmeext->channel_set[i].ChannelNum == 6) {
-			if (pmlmeext->channel_set[i].rx_count < pmlmeext->channel_set[index_24G].rx_count) {
-				index_24G = i;
-				best_channel_24G = pmlmeext->channel_set[i].ChannelNum;
-			}
-		}
-
-		/*  debug */
-		len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n",
-					pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count);
-	}
-
-	len += snprintf(page + len, count - len, "best_channel_24G = %d\n", best_channel_24G);
-
-	*eof = 1;
-	return len;
-}
diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/r8188eu/include/rtw_debug.h
index 002139cacfb5..0a77e3e73a45 100644
--- a/drivers/staging/r8188eu/include/rtw_debug.h
+++ b/drivers/staging/r8188eu/include/rtw_debug.h
@@ -72,152 +72,4 @@ extern u32 GlobalDebugLevel;
 			pr_info(DRIVER_PREFIX __VA_ARGS__);			\
 	} while (0)
 
-int proc_get_drv_version(char *page, char **start,
-			 off_t offset, int count,
-			 int *eof, void *data);
-
-int proc_get_write_reg(char *page, char **start,
-		       off_t offset, int count,
-		       int *eof, void *data);
-
-int proc_set_write_reg(struct file *file, const char __user *buffer,
-		       unsigned long count, void *data);
-int proc_get_read_reg(char *page, char **start,
-		      off_t offset, int count,
-		      int *eof, void *data);
-
-int proc_set_read_reg(struct file *file, const char __user *buffer,
-		      unsigned long count, void *data);
-
-int proc_get_fwstate(char *page, char **start,
-		     off_t offset, int count,
-		     int *eof, void *data);
-int proc_get_sec_info(char *page, char **start,
-		      off_t offset, int count,
-		      int *eof, void *data);
-int proc_get_mlmext_state(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_qos_option(char *page, char **start,
-			off_t offset, int count,
-			int *eof, void *data);
-int proc_get_ht_option(char *page, char **start,
-		       off_t offset, int count,
-		       int *eof, void *data);
-int proc_get_rf_info(char *page, char **start,
-		     off_t offset, int count,
-		     int *eof, void *data);
-int proc_get_ap_info(char *page, char **start,
-		     off_t offset, int count,
-		     int *eof, void *data);
-
-int proc_get_trx_info(char *page, char **start,
-		      off_t offset, int count,
-		      int *eof, void *data);
-
-int proc_get_mac_reg_dump1(char *page, char **start,
-			   off_t offset, int count,
-			   int *eof, void *data);
-
-int proc_get_mac_reg_dump2(char *page, char **start,
-			   off_t offset, int count,
-			   int *eof, void *data);
-
-int proc_get_mac_reg_dump3(char *page, char **start,
-			   off_t offset, int count,
-			   int *eof, void *data);
-
-int proc_get_bb_reg_dump1(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_bb_reg_dump2(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_bb_reg_dump3(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_rf_reg_dump1(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_rf_reg_dump2(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_rf_reg_dump3(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_rf_reg_dump4(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_all_sta_info(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_best_channel(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_get_rx_signal(char *page, char **start,
-		       off_t offset, int count,
-		       int *eof, void *data);
-
-int proc_set_rx_signal(struct file *file, const char __user *buffer,
-		       unsigned long count, void *data);
-
-int proc_get_ht_enable(char *page, char **start,
-		       off_t offset, int count,
-		       int *eof, void *data);
-
-int proc_set_ht_enable(struct file *file, const char __user *buffer,
-		       unsigned long count, void *data);
-
-int proc_get_cbw40_enable(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
-			  unsigned long count, void *data);
-
-int proc_get_ampdu_enable(char *page, char **start,
-			  off_t offset, int count,
-			  int *eof, void *data);
-
-int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
-			  unsigned long count, void *data);
-
-int proc_get_rx_stbc(char *page, char **start,
-		     off_t offset, int count,
-		     int *eof, void *data);
-
-int proc_set_rx_stbc(struct file *file, const char __user *buffer,
-		     unsigned long count, void *data);
-
-int proc_get_two_path_rssi(char *page, char **start,
-			   off_t offset, int count,
-			   int *eof, void *data);
-
-int proc_get_rssi_disp(char *page, char **start,
-		       off_t offset, int count,
-		       int *eof, void *data);
-
-int proc_set_rssi_disp(struct file *file, const char __user *buffer,
-		       unsigned long count, void *data);
-
-#ifdef CONFIG_BT_COEXIST
-int proc_get_btcoex_dbg(char *page, char **start,
-			off_t offset, int count,
-			int *eof, void *data);
-
-int proc_set_btcoex_dbg(struct file *file, const char *buffer,
-			signed long count, void *data);
-
-#endif /* CONFIG_BT_COEXIST */
-
 #endif	/* __RTW_DEBUG_H__ */
-- 
2.20.1


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

* [PATCH 8/8] staging: r8188eu: CurrentWirelessMode is not used
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
                   ` (6 preceding siblings ...)
  2021-10-16 11:30 ` [PATCH 7/8] staging: r8188eu: remove procfs functions Martin Kaiser
@ 2021-10-16 11:30 ` Martin Kaiser
  2021-10-17 11:57   ` Michael Straube
  2021-10-16 15:34 ` [PATCH 0/8] staging: r8188eu: another round of removals Phillip Potter
  8 siblings, 1 reply; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 11:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

CurrentWirelessMode in struct hal_data_8188e is not used. Remove the
component and the enum with its possible values.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/include/Hal8188EPhyCfg.h | 8 --------
 drivers/staging/r8188eu/include/rtl8188e_hal.h   | 1 -
 2 files changed, 9 deletions(-)

diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
index 58377edf724d..6f901ce607e8 100644
--- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
+++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
@@ -48,14 +48,6 @@ enum rf_radio_path {
 						 * total three groups */
 #define CHANNEL_GROUP_MAX_88E		6
 
-enum wireless_mode {
-	WIRELESS_MODE_UNKNOWN = 0x00,
-	WIRELESS_MODE_B			= BIT(0),
-	WIRELESS_MODE_G			= BIT(1),
-	WIRELESS_MODE_AUTO		= BIT(5),
-	WIRELESS_MODE_N_24G		= BIT(3),
-};
-
 /* BB/RF related */
 enum RF_TYPE_8190P {
 	RF_TYPE_MIN,		/*  0 */
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 5fdee1c6299c..ced7e12d9013 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -162,7 +162,6 @@ struct hal_data_8188e {
 	u8	PGMaxGroup;
 	/* current WIFI_PHY values */
 	u32	ReceiveConfig;
-	enum wireless_mode CurrentWirelessMode;
 	enum ht_channel_width CurrentChannelBW;
 	u8	CurrentChannel;
 	u8	nCur40MhzPrimeSC;/*  Control channel sub-carrier */
-- 
2.20.1


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

* Re: [PATCH 0/8] staging: r8188eu: another round of removals
  2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
                   ` (7 preceding siblings ...)
  2021-10-16 11:30 ` [PATCH 8/8] staging: r8188eu: CurrentWirelessMode is not used Martin Kaiser
@ 2021-10-16 15:34 ` Phillip Potter
  2021-10-16 16:33   ` Martin Kaiser
  8 siblings, 1 reply; 19+ messages in thread
From: Phillip Potter @ 2021-10-16 15:34 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Larry Finger, Michael Straube, linux-staging, linux-kernel,
	Greg Kroah-Hartman

On Sat, Oct 16, 2021 at 01:30:00PM +0200, Martin Kaiser wrote:
> Remove some more dead code and unused definitions.
> 
> Martin Kaiser (8):
>   staging: r8188eu: remove empty trigger gpio code
>   staging: r8188eu: interface type is always usb
>   staging: r8188eu: remove two checks that are always false
>   staging: r8188eu: remove unused function prototypes
>   staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
>   staging: r8188eu: clean up Hal8188EPhyCfg.h
>   staging: r8188eu: remove procfs functions
>   staging: r8188eu: CurrentWirelessMode is not used
> 
>  drivers/staging/r8188eu/Makefile              |   1 -
>  drivers/staging/r8188eu/core/rtw_debug.c      | 886 ------------------
>  .../staging/r8188eu/hal/HalHWImg8188E_BB.c    |  14 +-
>  .../staging/r8188eu/hal/HalHWImg8188E_MAC.c   |   3 +-
>  .../staging/r8188eu/hal/HalHWImg8188E_RF.c    |   8 +-
>  drivers/staging/r8188eu/hal/HalPhyRf_8188e.c  |  38 -
>  drivers/staging/r8188eu/hal/odm.c             |   3 -
>  drivers/staging/r8188eu/hal/rtl8188e_dm.c     |   2 -
>  drivers/staging/r8188eu/hal/usb_halinit.c     |   8 -
>  .../staging/r8188eu/include/Hal8188EPhyCfg.h  |  78 --
>  drivers/staging/r8188eu/include/hal_intf.h    |   1 -
>  drivers/staging/r8188eu/include/odm.h         |  11 +-
>  .../staging/r8188eu/include/rtl8188e_hal.h    |   1 -
>  drivers/staging/r8188eu/include/rtw_debug.h   | 148 ---
>  14 files changed, 6 insertions(+), 1196 deletions(-)
>  delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c
> 
> -- 
> 2.20.1
> 

Dear Martin,

Looks good from what I can see, many thanks. Built and tested on my
USB-N10 Nano.

For whole series:
Acked-by: Phillip Potter <phil@philpotter.co.uk>

Regards,
Phil

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

* Re: [PATCH 0/8] staging: r8188eu: another round of removals
  2021-10-16 15:34 ` [PATCH 0/8] staging: r8188eu: another round of removals Phillip Potter
@ 2021-10-16 16:33   ` Martin Kaiser
  0 siblings, 0 replies; 19+ messages in thread
From: Martin Kaiser @ 2021-10-16 16:33 UTC (permalink / raw)
  To: Phillip Potter
  Cc: Larry Finger, Michael Straube, linux-staging, linux-kernel,
	Greg Kroah-Hartman

Thus wrote Phillip Potter (phil@philpotter.co.uk):

> On Sat, Oct 16, 2021 at 01:30:00PM +0200, Martin Kaiser wrote:
> > Remove some more dead code and unused definitions.

> > Martin Kaiser (8):
> >   staging: r8188eu: remove empty trigger gpio code
> >   staging: r8188eu: interface type is always usb
> >   staging: r8188eu: remove two checks that are always false
> >   staging: r8188eu: remove unused function prototypes
> >   staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
> >   staging: r8188eu: clean up Hal8188EPhyCfg.h
> >   staging: r8188eu: remove procfs functions
> >   staging: r8188eu: CurrentWirelessMode is not used

> >  drivers/staging/r8188eu/Makefile              |   1 -
> >  drivers/staging/r8188eu/core/rtw_debug.c      | 886 ------------------
> >  .../staging/r8188eu/hal/HalHWImg8188E_BB.c    |  14 +-
> >  .../staging/r8188eu/hal/HalHWImg8188E_MAC.c   |   3 +-
> >  .../staging/r8188eu/hal/HalHWImg8188E_RF.c    |   8 +-
> >  drivers/staging/r8188eu/hal/HalPhyRf_8188e.c  |  38 -
> >  drivers/staging/r8188eu/hal/odm.c             |   3 -
> >  drivers/staging/r8188eu/hal/rtl8188e_dm.c     |   2 -
> >  drivers/staging/r8188eu/hal/usb_halinit.c     |   8 -
> >  .../staging/r8188eu/include/Hal8188EPhyCfg.h  |  78 --
> >  drivers/staging/r8188eu/include/hal_intf.h    |   1 -
> >  drivers/staging/r8188eu/include/odm.h         |  11 +-
> >  .../staging/r8188eu/include/rtl8188e_hal.h    |   1 -
> >  drivers/staging/r8188eu/include/rtw_debug.h   | 148 ---
> >  14 files changed, 6 insertions(+), 1196 deletions(-)
> >  delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c

> > -- 
> > 2.20.1


Hi Phil,

> Looks good from what I can see, many thanks. Built and tested on my
> USB-N10 Nano.

> For whole series:
> Acked-by: Phillip Potter <phil@philpotter.co.uk>

thanks for reviewing and testing.

Best regards,
Martin

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

* Re: [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code
  2021-10-16 11:30 ` [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code Martin Kaiser
@ 2021-10-17 11:23   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:23 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> The hal variable HW_VAR_TRIGGER_GPIO_0 and the rtl8192cu_trigger_gpio_0
> function are not used. Remove them.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/hal/usb_halinit.c  | 8 --------
>   drivers/staging/r8188eu/include/hal_intf.h | 1 -
>   2 files changed, 9 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
> index abbd107ad3c1..cdc602fa9af8 100644
> --- a/drivers/staging/r8188eu/hal/usb_halinit.c
> +++ b/drivers/staging/r8188eu/hal/usb_halinit.c
> @@ -1087,11 +1087,6 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
>   	_ReadAdapterInfo8188EU(Adapter);
>   }
>   
> -#define GPIO_DEBUG_PORT_NUM 0
> -static void rtl8192cu_trigger_gpio_0(struct adapter *adapt)
> -{
> -}
> -
>   static void ResumeTxBeacon(struct adapter *adapt)
>   {
>   	struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
> @@ -1657,9 +1652,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
>   			}
>   		}
>   		break;
> -	case HW_VAR_TRIGGER_GPIO_0:
> -		rtl8192cu_trigger_gpio_0(Adapter);
> -		break;
>   	case HW_VAR_RPT_TIMER_SETTING:
>   		{
>   			u16 min_rpt_time = (*(u16 *)val);
> diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
> index 408168284b3f..d777ad9071e2 100644
> --- a/drivers/staging/r8188eu/include/hal_intf.h
> +++ b/drivers/staging/r8188eu/include/hal_intf.h
> @@ -55,7 +55,6 @@ enum hw_variables {
>   	HW_VAR_TDLS_RS_RCR,
>   	HW_VAR_TDLS_DONE_CH_SEN,
>   	HW_VAR_INITIAL_GAIN,
> -	HW_VAR_TRIGGER_GPIO_0,
>   	HW_VAR_BT_SET_COEXIST,
>   	HW_VAR_BT_ISSUE_DELBA,
>   	HW_VAR_CURRENT_ANTENNA,
> 


Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 2/8] staging: r8188eu: interface type is always usb
  2021-10-16 11:30 ` [PATCH 2/8] staging: r8188eu: interface type is always usb Martin Kaiser
@ 2021-10-17 11:46   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:46 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> SupportInterface in struct odm_dm_struct is always ODM_ITRF_USB.
> Remove the variable and the code to configure the interface.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c  |  9 +++------
>   drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c |  3 +--
>   drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c  |  3 +--
>   drivers/staging/r8188eu/hal/odm.c               |  3 ---
>   drivers/staging/r8188eu/hal/rtl8188e_dm.c       |  2 --
>   drivers/staging/r8188eu/include/odm.h           | 11 +----------
>   6 files changed, 6 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
> index 17b55c31f6eb..a623e0aaa0d0 100644
> --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
> +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
> @@ -176,7 +176,6 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
>   {
>   	u32     hex         = 0;
>   	u32     i           = 0;
> -	u8     interfaceValue   = dm_odm->SupportInterface;
>   	u32     arraylen    = sizeof(array_agc_tab_1t_8188e) / sizeof(u32);
>   	u32    *array       = array_agc_tab_1t_8188e;
>   	bool		biol = false;
> @@ -185,7 +184,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
>   	u8 bndy_cnt = 1;
>   	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
>   
> -	hex += interfaceValue << 8;
> +	hex += ODM_ITRF_USB << 8;
>   	hex += ODM_CE << 16;
>   	hex += 0xFF000000;
>   	biol = rtw_IOL_applied(adapter);
> @@ -453,7 +452,6 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
>   {
>   	u32     hex         = 0;
>   	u32     i           = 0;
> -	u8     interfaceValue   = dm_odm->SupportInterface;
>   	u32     arraylen    = sizeof(array_phy_reg_1t_8188e) / sizeof(u32);
>   	u32    *array       = array_phy_reg_1t_8188e;
>   	bool	biol = false;
> @@ -461,7 +459,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
>   	struct xmit_frame *pxmit_frame = NULL;
>   	u8 bndy_cnt = 1;
>   	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
> -	hex += interfaceValue << 8;
> +	hex += ODM_ITRF_USB << 8;
>   	hex += ODM_CE << 16;
>   	hex += 0xFF000000;
>   	biol = rtw_IOL_applied(adapter);
> @@ -659,11 +657,10 @@ void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm)
>   {
>   	u32  hex;
>   	u32  i           = 0;
> -	u8  interfaceValue   = dm_odm->SupportInterface;
>   	u32  arraylen    = sizeof(array_phy_reg_pg_8188e) / sizeof(u32);
>   	u32 *array       = array_phy_reg_pg_8188e;
>   
> -	hex = interfaceValue << 8;
> +	hex = ODM_ITRF_USB << 8;
>   	hex += (ODM_CE << 16) + 0xFF000000;
>   
>   	for (i = 0; i < arraylen; i += 3) {
> diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
> index bb57e93eb959..b4c55863d3fb 100644
> --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
> +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
> @@ -133,7 +133,6 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
>   
>   	u32     hex         = 0;
>   	u32     i;
> -	u8     interface_val   = dm_odm->SupportInterface;
>   	u32     array_len    = sizeof(array_MAC_REG_8188E) / sizeof(u32);
>   	u32    *array       = array_MAC_REG_8188E;
>   	bool	biol = false;
> @@ -142,7 +141,7 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
>   	struct xmit_frame	*pxmit_frame = NULL;
>   	u8 bndy_cnt = 1;
>   	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
> -	hex += interface_val << 8;
> +	hex += ODM_ITRF_USB << 8;
>   	hex += ODM_CE << 16;
>   	hex += 0xFF000000;
>   
> diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
> index 7a8faa7885a1..3e2a09fc2619 100644
> --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
> +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
> @@ -144,7 +144,6 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
>   
>   	u32     hex         = 0;
>   	u32     i           = 0;
> -	u8     interfaceValue   = pDM_Odm->SupportInterface;
>   	u32     ArrayLen    = sizeof(Array_RadioA_1T_8188E) / sizeof(u32);
>   	u32    *Array       = Array_RadioA_1T_8188E;
>   	bool		biol = false;
> @@ -153,7 +152,7 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
>   	u8 bndy_cnt = 1;
>   	enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
>   
> -	hex += interfaceValue << 8;
> +	hex += ODM_ITRF_USB << 8;
>   	hex += ODM_CE << 16;
>   	hex += 0xFF000000;
>   	biol = rtw_IOL_applied(Adapter);
> diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
> index 2178ffe41bb3..a90597b82e12 100644
> --- a/drivers/staging/r8188eu/hal/odm.c
> +++ b/drivers/staging/r8188eu/hal/odm.c
> @@ -214,9 +214,6 @@ void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn
>   	case	ODM_CMNINFO_ABILITY:
>   		pDM_Odm->SupportAbility = (u32)Value;
>   		break;
> -	case	ODM_CMNINFO_INTERFACE:
> -		pDM_Odm->SupportInterface = (u8)Value;
> -		break;
>   	case	ODM_CMNINFO_MP_TEST_CHIP:
>   		pDM_Odm->bIsMPChip = (u8)Value;
>   		break;
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> index 1ca24a507d6d..869d95f3cf33 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
> @@ -33,8 +33,6 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
>   
>   	dm_odm->Adapter = Adapter;
>   
> -	ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_USB);
> -
>   	ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(hal_data->VersionID));
>   
>   	if (hal_data->rf_type == RF_1T1R)
> diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
> index 187f872d09b5..ba936d30a0db 100644
> --- a/drivers/staging/r8188eu/include/odm.h
> +++ b/drivers/staging/r8188eu/include/odm.h
> @@ -262,7 +262,6 @@ enum odm_common_info_def {
>   
>   	/* HOOK BEFORE REG INIT----------- */
>   	ODM_CMNINFO_ABILITY,		/* ODM_ABILITY_E */
> -	ODM_CMNINFO_INTERFACE,		/* ODM_INTERFACE_E */
>   	ODM_CMNINFO_MP_TEST_CHIP,
>   	ODM_CMNINFO_RF_TYPE,		/* RF_PATH_E or ODM_RF_TYPE_E? */
>   	/* HOOK BEFORE REG INIT-----------  */
> @@ -343,13 +342,7 @@ enum odm_ability_def {
>   	ODM_RF_CALIBRATION		= BIT(26),
>   };
>   
> -/* 	ODM_CMNINFO_INTERFACE */
> -enum odm_interface_def {
> -	ODM_ITRF_PCIE	=	0x1,
> -	ODM_ITRF_USB	=	0x2,
> -	ODM_ITRF_SDIO	=	0x4,
> -	ODM_ITRF_ALL	=	0x7,
> -};
> +# define ODM_ITRF_USB 0x2
>   
>   /*  ODM_CMNINFO_RF_TYPE */
>   /*  For example 1T2R (A+AB = BIT(0)|BIT(4)|BIT(5)) */
> @@ -611,8 +604,6 @@ struct odm_dm_struct {
>   /* HOOK BEFORE REG INIT----------- */
>   	/*  ODM Support Ability DIG/RATR/TX_PWR_TRACK/ �K�K = 1/2/3/�K */
>   	u32	SupportAbility;
> -	/*  ODM PCIE/USB/SDIO/GSPI = 0/1/2/3 */
> -	u8	SupportInterface;
>   	/*  RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
>   	u8	RFType;
>   
> 

Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 3/8] staging: r8188eu: remove two checks that are always false
  2021-10-16 11:30 ` [PATCH 3/8] staging: r8188eu: remove two checks that are always false Martin Kaiser
@ 2021-10-17 11:48   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:48 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> Commit aefb1fc5c185 ("staging: r8188eu: odm BoardType is never set")
> clarified that the odm board type is always 0.
> 
> The CheckCondition functions extract the board type from the hex
> parameter and stores it in _board. For _board == 0,
> (_board == cond) && cond != 0x00 is always false. Remove the checks.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c | 5 -----
>   drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c | 5 -----
>   2 files changed, 10 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
> index a623e0aaa0d0..f6e4243e0c7b 100644
> --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
> +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
> @@ -13,7 +13,6 @@
>   
>   static bool CheckCondition(const u32  condition, const u32  hex)
>   {
> -	u32 _board     = (hex & 0x000000FF);
>   	u32 _interface = (hex & 0x0000FF00) >> 8;
>   	u32 _platform  = (hex & 0x00FF0000) >> 16;
>   	u32 cond = condition;
> @@ -21,10 +20,6 @@ static bool CheckCondition(const u32  condition, const u32  hex)
>   	if (condition == 0xCDCDCDCD)
>   		return true;
>   
> -	cond = condition & 0x000000FF;
> -	if ((_board == cond) && cond != 0x00)
> -		return false;
> -
>   	cond = condition & 0x0000FF00;
>   	cond = cond >> 8;
>   	if ((_interface & cond) == 0 && cond != 0x07)
> diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
> index 3e2a09fc2619..5e0a96200078 100644
> --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
> +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
> @@ -6,7 +6,6 @@
>   
>   static bool CheckCondition(const u32  Condition, const u32  Hex)
>   {
> -	u32 _board     = (Hex & 0x000000FF);
>   	u32 _interface = (Hex & 0x0000FF00) >> 8;
>   	u32 _platform  = (Hex & 0x00FF0000) >> 16;
>   	u32 cond = Condition;
> @@ -14,10 +13,6 @@ static bool CheckCondition(const u32  Condition, const u32  Hex)
>   	if (Condition == 0xCDCDCDCD)
>   		return true;
>   
> -	cond = Condition & 0x000000FF;
> -	if ((_board == cond) && cond != 0x00)
> -		return false;
> -
>   	cond = Condition & 0x0000FF00;
>   	cond = cond >> 8;
>   	if ((_interface & cond) == 0 && cond != 0x07)
> 


Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 4/8] staging: r8188eu: remove unused function prototypes
  2021-10-16 11:30 ` [PATCH 4/8] staging: r8188eu: remove unused function prototypes Martin Kaiser
@ 2021-10-17 11:50   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:50 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> Remove prototypes of functions that aren't present in this driver.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/include/Hal8188EPhyCfg.h | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> index ee4b26ecd19d..084bccc5dcb9 100644
> --- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> +++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> @@ -194,18 +194,10 @@ void PHY_SetBWMode8188E(struct adapter *adapter,
>   
>   /*  channel switch related funciton */
>   void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
> -/*  Call after initialization */
> -void ChkFwCmdIoDone(struct adapter *adapter);
>   
>   /*  BB/MAC/RF other monitor API */
>   void PHY_SetRFPathSwitch_8188E(struct adapter *adapter,	bool main);
>   
> -void PHY_SwitchEphyParameter(struct adapter *adapter);
> -
> -void PHY_EnableHostClkReq(struct adapter *adapter);
> -
> -bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
> -
>   void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
>   				 u32 mask, u32 data);
>   /*--------------------------Exported Function prototype---------------------*/
> 


Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 5/8] staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used
  2021-10-16 11:30 ` [PATCH 5/8] staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used Martin Kaiser
@ 2021-10-17 11:53   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:53 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> Remove the PHY_SetRFPathSwitch_8188E function which is not used.
> 
> It was the only caller of phy_setrfpathswitch_8188e, that function
> can be removed as well.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/hal/HalPhyRf_8188e.c  | 38 -------------------
>   .../staging/r8188eu/include/Hal8188EPhyCfg.h  |  3 --
>   2 files changed, 41 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> index f01ee3cd8795..79f407c280be 100644
> --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
> @@ -1189,41 +1189,3 @@ void PHY_LCCalibrate_8188E(struct adapter *adapt)
>   		phy_LCCalibrate_8188E(adapt, false);
>   	}
>   }
> -
> -static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2t)
> -{
> -	struct hal_data_8188e	*pHalData = GET_HAL_DATA(adapt);
> -	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
> -
> -	if (!adapt->hw_init_completed) {
> -		u8 u1btmp;
> -		u1btmp = ODM_Read1Byte(dm_odm, REG_LEDCFG2) | BIT(7);
> -		ODM_Write1Byte(dm_odm, REG_LEDCFG2, u1btmp);
> -		ODM_SetBBReg(dm_odm, rFPGA0_XAB_RFParameter, BIT(13), 0x01);
> -	}
> -
> -	if (is2t) {	/* 92C */
> -		if (main)
> -			ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x1);	/* 92C_Path_A */
> -		else
> -			ODM_SetBBReg(dm_odm, rFPGA0_XB_RFInterfaceOE, BIT(5) | BIT(6), 0x2);	/* BT */
> -	} else {			/* 88C */
> -		if (main)
> -			ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x2);	/* Main */
> -		else
> -			ODM_SetBBReg(dm_odm, rFPGA0_XA_RFInterfaceOE, BIT(8) | BIT(9), 0x1);	/* Aux */
> -	}
> -}
> -
> -void PHY_SetRFPathSwitch_8188E(struct adapter *adapt, bool main)
> -{
> -	struct hal_data_8188e	*pHalData = GET_HAL_DATA(adapt);
> -	struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
> -
> -	if (dm_odm->RFType == ODM_2T2R) {
> -		phy_setrfpathswitch_8188e(adapt, main, true);
> -	} else {
> -		/*  For 88C 1T1R */
> -		phy_setrfpathswitch_8188e(adapt, main, false);
> -	}
> -}
> diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> index 084bccc5dcb9..feae0b32cac6 100644
> --- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> +++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> @@ -195,9 +195,6 @@ void PHY_SetBWMode8188E(struct adapter *adapter,
>   /*  channel switch related funciton */
>   void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
>   
> -/*  BB/MAC/RF other monitor API */
> -void PHY_SetRFPathSwitch_8188E(struct adapter *adapter,	bool main);
> -
>   void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
>   				 u32 mask, u32 data);
>   /*--------------------------Exported Function prototype---------------------*/
> 


Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 6/8] staging: r8188eu: clean up Hal8188EPhyCfg.h
  2021-10-16 11:30 ` [PATCH 6/8] staging: r8188eu: clean up Hal8188EPhyCfg.h Martin Kaiser
@ 2021-10-17 11:54   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:54 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> Remove a bunch of unused structs, enums and defines
> from Hal8188EPhyCfg.h.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   .../staging/r8188eu/include/Hal8188EPhyCfg.h  | 59 -------------------
>   1 file changed, 59 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> index feae0b32cac6..58377edf724d 100644
> --- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> +++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> @@ -21,23 +21,6 @@
>   /*--------------------------Define Parameters-------------------------------*/
>   
>   /*------------------------------Define structure----------------------------*/
> -enum sw_chnl_cmd_id {
> -	CmdID_End,
> -	CmdID_SetTxPowerLevel,
> -	CmdID_BBRegWrite10,
> -	CmdID_WritePortUlong,
> -	CmdID_WritePortUshort,
> -	CmdID_WritePortUchar,
> -	CmdID_RF_WriteReg,
> -};
> -
> -/* 1. Switch channel related */
> -struct sw_chnl_cmd {
> -	enum sw_chnl_cmd_id CmdID;
> -	u32 Para1;
> -	u32 Para2;
> -	u32 msDelay;
> -};
>   
>   enum hw90_block {
>   	HW90_BLOCK_MAC = 0,
> @@ -73,16 +56,6 @@ enum wireless_mode {
>   	WIRELESS_MODE_N_24G		= BIT(3),
>   };
>   
> -enum phy_rate_tx_offset_area {
> -	RA_OFFSET_LEGACY_OFDM1,
> -	RA_OFFSET_LEGACY_OFDM2,
> -	RA_OFFSET_HT_OFDM1,
> -	RA_OFFSET_HT_OFDM2,
> -	RA_OFFSET_HT_OFDM3,
> -	RA_OFFSET_HT_OFDM4,
> -	RA_OFFSET_HT_CCK,
> -};
> -
>   /* BB/RF related */
>   enum RF_TYPE_8190P {
>   	RF_TYPE_MIN,		/*  0 */
> @@ -141,24 +114,6 @@ struct bb_reg_def {
>   				 * Path A and B */
>   };
>   
> -struct ant_sel_ofdm {
> -	u32 r_tx_antenna:4;
> -	u32 r_ant_l:4;
> -	u32 r_ant_non_ht:4;
> -	u32 r_ant_ht1:4;
> -	u32 r_ant_ht2:4;
> -	u32 r_ant_ht_s1:4;
> -	u32 r_ant_non_ht_s1:4;
> -	u32 OFDM_TXSC:2;
> -	u32 reserved:2;
> -};
> -
> -struct ant_sel_cck {
> -	u8 r_cckrx_enable_2:2;
> -	u8 r_cckrx_enable:2;
> -	u8 r_ccktx_enable:4;
> -};
> -
>   /*------------------------------Define structure----------------------------*/
>   
>   /*------------------------Export global variable----------------------------*/
> @@ -208,18 +163,4 @@ void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
>   #define PHY_SetRFReg(adapt, rfpath, regaddr, bitmask, data)	\
>   	rtl8188e_PHY_SetRFReg((adapt), (rfpath), (regaddr), (bitmask), (data))
>   
> -#define PHY_SetMacReg	PHY_SetBBReg
> -
> -#define	SIC_HW_SUPPORT			0
> -
> -#define	SIC_MAX_POLL_CNT		5
> -
> -#define	SIC_CMD_READY			0
> -#define	SIC_CMD_WRITE			1
> -#define	SIC_CMD_READ			2
> -
> -#define	SIC_CMD_REG			0x1EB		/*  1byte */
> -#define	SIC_ADDR_REG			0x1E8		/*  1b9~1ba, 2 bytes */
> -#define	SIC_DATA_REG			0x1EC		/*  1bc~1bf */
> -
>   #endif	/*  __INC_HAL8192CPHYCFG_H */
> 


Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 7/8] staging: r8188eu: remove procfs functions
  2021-10-16 11:30 ` [PATCH 7/8] staging: r8188eu: remove procfs functions Martin Kaiser
@ 2021-10-17 11:56   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:56 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> It seems that previous versions of this driver provided a procfs
> interface for debugging.
> 
> Remove the procfs helper functions which are no longer used.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/Makefile            |   1 -
>   drivers/staging/r8188eu/core/rtw_debug.c    | 886 --------------------
>   drivers/staging/r8188eu/include/rtw_debug.h | 148 ----
>   3 files changed, 1035 deletions(-)
>   delete mode 100644 drivers/staging/r8188eu/core/rtw_debug.c
> 
> diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
> index 27826baef377..d63fad20e9d2 100644
> --- a/drivers/staging/r8188eu/Makefile
> +++ b/drivers/staging/r8188eu/Makefile
> @@ -74,7 +74,6 @@ rtk_core :=				\
>   		core/rtw_ap.o		\
>   		core/rtw_br_ext.o	\
>   		core/rtw_cmd.o		\
> -		core/rtw_debug.o	\
>   		core/rtw_efuse.o	\
>   		core/rtw_ieee80211.o	\
>   		core/rtw_ioctl_set.o	\
> diff --git a/drivers/staging/r8188eu/core/rtw_debug.c b/drivers/staging/r8188eu/core/rtw_debug.c
> deleted file mode 100644
> index 3d613d997a38..000000000000
> --- a/drivers/staging/r8188eu/core/rtw_debug.c
> +++ /dev/null
> @@ -1,886 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -/* Copyright(c) 2007 - 2012 Realtek Corporation. */
> -
> -#define _RTW_DEBUG_C_
> -
> -#include "../include/rtw_debug.h"
> -#include "../include/drv_types.h"
> -
> -int proc_get_drv_version(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_write_reg(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	*eof = 1;
> -	return 0;
> -}
> -
> -int proc_set_write_reg(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	char tmp[32];
> -	u32 addr, val, len;
> -
> -	if (count < 3) {
> -		DBG_88E("argument size is less than 3\n");
> -		return -EFAULT;
> -	}
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		int num = sscanf(tmp, "%x %x %x", &addr, &val, &len);
> -
> -		if (num !=  3) {
> -			DBG_88E("invalid write_reg parameter!\n");
> -			return count;
> -		}
> -		switch (len) {
> -		case 1:
> -			rtw_write8(padapter, addr, (u8)val);
> -			break;
> -		case 2:
> -			rtw_write16(padapter, addr, (u16)val);
> -			break;
> -		case 4:
> -			rtw_write32(padapter, addr, val);
> -			break;
> -		default:
> -			DBG_88E("error write length =%d", len);
> -			break;
> -		}
> -	}
> -	return count;
> -}
> -
> -static u32 proc_get_read_addr = 0xeeeeeeee;
> -static u32 proc_get_read_len = 0x4;
> -
> -int proc_get_read_reg(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -
> -	int len = 0;
> -
> -	if (proc_get_read_addr == 0xeeeeeeee) {
> -		*eof = 1;
> -		return len;
> -	}
> -
> -	switch (proc_get_read_len) {
> -	case 1:
> -		len += snprintf(page + len, count - len, "rtw_read8(0x%x)=0x%x\n", proc_get_read_addr, rtw_read8(padapter, proc_get_read_addr));
> -		break;
> -	case 2:
> -		len += snprintf(page + len, count - len, "rtw_read16(0x%x)=0x%x\n", proc_get_read_addr, rtw_read16(padapter, proc_get_read_addr));
> -		break;
> -	case 4:
> -		len += snprintf(page + len, count - len, "rtw_read32(0x%x)=0x%x\n", proc_get_read_addr, rtw_read32(padapter, proc_get_read_addr));
> -		break;
> -	default:
> -		len += snprintf(page + len, count - len, "error read length=%d\n", proc_get_read_len);
> -		break;
> -	}
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_set_read_reg(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	char tmp[16];
> -	u32 addr, len;
> -
> -	if (count < 2) {
> -		DBG_88E("argument size is less than 2\n");
> -		return -EFAULT;
> -	}
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		int num = sscanf(tmp, "%x %x", &addr, &len);
> -
> -		if (num !=  2) {
> -			DBG_88E("invalid read_reg parameter!\n");
> -			return count;
> -		}
> -
> -		proc_get_read_addr = addr;
> -
> -		proc_get_read_len = len;
> -	}
> -
> -	return count;
> -}
> -
> -int proc_get_fwstate(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> -
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "fwstate=0x%x\n", get_fwstate(pmlmepriv));
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_sec_info(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct security_priv *psecuritypriv = &padapter->securitypriv;
> -
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n",
> -						psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm,
> -						psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_mlmext_state(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
> -	struct mlme_ext_info	*pmlmeinfo = &pmlmeext->mlmext_info;
> -
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "pmlmeinfo->state=0x%x\n", pmlmeinfo->state);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_qos_option(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> -
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "qos_option=%d\n", pmlmepriv->qospriv.qos_option);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_ht_option(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> -
> -	int len = 0;
> -	len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option);
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rf_info(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "cur_ch=%d, cur_bw=%d, cur_ch_offet=%d\n",
> -					pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_ap_info(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct sta_info *psta;
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> -	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> -	struct wlan_network *cur_network = &pmlmepriv->cur_network;
> -	struct sta_priv *pstapriv = &padapter->stapriv;
> -	int len = 0;
> -
> -	psta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
> -	if (psta) {
> -		int i;
> -		struct recv_reorder_ctrl *preorder_ctrl;
> -
> -		len += snprintf(page + len, count - len, "SSID=%s\n", cur_network->network.Ssid.Ssid);
> -		len += snprintf(page + len, count - len, "sta's macaddr:%pM\n", psta->hwaddr);
> -		len += snprintf(page + len, count - len, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
> -		len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
> -		len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
> -		len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
> -		len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
> -		len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
> -		len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
> -
> -		for (i = 0; i < 16; i++) {
> -			preorder_ctrl = &psta->recvreorder_ctrl[i];
> -			if (preorder_ctrl->enable)
> -				len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq);
> -		}
> -	} else {
> -		len += snprintf(page + len, count - len, "can't get sta's macaddr, cur_network's macaddr: %pM\n", cur_network->network.MacAddress);
> -	}
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_trx_info(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
> -	struct recv_priv  *precvpriv = &padapter->recvpriv;
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d, free_ext_xmitbuf_cnt=%d, free_recvframe_cnt=%d\n",
> -				pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmit_extbuf_cnt, precvpriv->free_recvframe_cnt);
> -	len += snprintf(page + len, count - len, "rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_mac_reg_dump1(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1;
> -
> -	len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
> -
> -	for (i = 0x0; i < 0x300; i += 4) {
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_mac_reg_dump2(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1;
> -
> -	len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
> -	memset(page, 0, count);
> -	for (i = 0x300; i < 0x600; i += 4) {
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_mac_reg_dump3(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1;
> -
> -	len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
> -
> -	for (i = 0x600; i < 0x800; i += 4) {
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_bb_reg_dump1(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1;
> -
> -	len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
> -	for (i = 0x800; i < 0xB00; i += 4) {
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_bb_reg_dump2(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1;
> -
> -	len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
> -	for (i = 0xB00; i < 0xE00; i += 4) {
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_bb_reg_dump3(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1;
> -
> -	len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
> -	for (i = 0xE00; i < 0x1000; i += 4) {
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rf_reg_dump1(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1, path;
> -	u32 value;
> -
> -	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
> -	path = 1;
> -	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
> -	for (i = 0; i < 0xC0; i++) {
> -		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x ", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", value);
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rf_reg_dump2(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1, path;
> -	u32 value;
> -
> -	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
> -	path = 1;
> -	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
> -	for (i = 0xC0; i < 0x100; i++) {
> -		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x ", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", value);
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rf_reg_dump3(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1, path;
> -	u32 value;
> -
> -	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
> -	path = 2;
> -	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
> -	for (i = 0; i < 0xC0; i++) {
> -		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x ", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", value);
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rf_reg_dump4(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -	int i, j = 1, path;
> -	u32 value;
> -
> -	len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
> -	path = 2;
> -	len += snprintf(page + len, count - len, "\nRF_Path(%x)\n", path);
> -	for (i = 0xC0; i < 0x100; i++) {
> -		value = rtl8188e_PHY_QueryRFReg(padapter, path, i, 0xffffffff);
> -		if (j % 4 == 1)
> -			len += snprintf(page + len, count - len, "0x%02x ", i);
> -		len += snprintf(page + len, count - len, " 0x%08x ", value);
> -		if ((j++) % 4 == 0)
> -			len += snprintf(page + len, count - len, "\n");
> -	}
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rx_signal(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	int len = 0;
> -
> -	len = snprintf(page + len, count,
> -		"rssi:%d\n"
> -		"rxpwdb:%d\n"
> -		"signal_strength:%u\n"
> -		"signal_qual:%u\n"
> -		"noise:%u\n",
> -		padapter->recvpriv.rssi,
> -		padapter->recvpriv.rxpwdb,
> -		padapter->recvpriv.signal_strength,
> -		padapter->recvpriv.signal_qual,
> -		padapter->recvpriv.noise
> -		);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_set_rx_signal(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	char tmp[32];
> -	u32 is_signal_dbg;
> -	s32 signal_strength;
> -
> -	if (count < 1)
> -		return -EFAULT;
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
> -		is_signal_dbg = is_signal_dbg == 0 ? 0 : 1;
> -		if (is_signal_dbg && num != 2)
> -			return count;
> -
> -		signal_strength = signal_strength > 100 ? 100 : signal_strength;
> -		signal_strength = signal_strength < 0 ? 0 : signal_strength;
> -
> -		padapter->recvpriv.is_signal_dbg = is_signal_dbg;
> -		padapter->recvpriv.signal_strength_dbg = signal_strength;
> -
> -		if (is_signal_dbg)
> -			DBG_88E("set %s %u\n", "DBG_SIGNAL_STRENGTH", signal_strength);
> -		else
> -			DBG_88E("set %s\n", "HW_SIGNAL_STRENGTH");
> -	}
> -	return count;
> -}
> -
> -int proc_get_ht_enable(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -	int len = 0;
> -
> -	if (pregpriv)
> -		len += snprintf(page + len, count - len,
> -			"%d\n",
> -			pregpriv->ht_enable
> -			);
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_set_ht_enable(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -	char tmp[32];
> -	s32 mode = 0;
> -
> -	if (count < 1)
> -		return -EFAULT;
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		if (pregpriv) {
> -			pregpriv->ht_enable = mode;
> -			pr_info("ht_enable=%d\n", pregpriv->ht_enable);
> -		}
> -	}
> -
> -	return count;
> -}
> -
> -int proc_get_cbw40_enable(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -
> -	int len = 0;
> -
> -	if (pregpriv)
> -		len += snprintf(page + len, count - len,
> -			"%d\n",
> -			pregpriv->cbw40_enable
> -			);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -	char tmp[32];
> -	s32 mode = 0;
> -
> -	if (count < 1)
> -		return -EFAULT;
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		if (pregpriv) {
> -			pregpriv->cbw40_enable = mode;
> -			pr_info("cbw40_enable=%d\n", mode);
> -		}
> -	}
> -	return count;
> -}
> -
> -int proc_get_ampdu_enable(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -
> -	int len = 0;
> -
> -	if (pregpriv)
> -		len += snprintf(page + len, count - len,
> -			"%d\n",
> -			pregpriv->ampdu_enable
> -			);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -	char tmp[32];
> -	s32 mode = 0;
> -
> -	if (count < 1)
> -		return -EFAULT;
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		if (pregpriv) {
> -			pregpriv->ampdu_enable = mode;
> -			pr_info("ampdu_enable=%d\n", mode);
> -		}
> -	}
> -	return count;
> -}
> -
> -int proc_get_two_path_rssi(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -
> -	int len = 0;
> -
> -	if (padapter)
> -		len += snprintf(page + len, count - len,
> -			"%d %d\n",
> -			padapter->recvpriv.RxRssi[0],
> -			padapter->recvpriv.RxRssi[1]
> -			);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_rx_stbc(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -
> -	int len = 0;
> -
> -	if (pregpriv)
> -		len += snprintf(page + len, count - len,
> -			"%d\n",
> -			pregpriv->rx_stbc
> -			);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_set_rx_stbc(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct registry_priv	*pregpriv = &padapter->registrypriv;
> -	char tmp[32];
> -	u32 mode = 0;
> -
> -	if (count < 1)
> -		return -EFAULT;
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		if (pregpriv) {
> -			pregpriv->rx_stbc = mode;
> -			printk("rx_stbc=%d\n", mode);
> -		}
> -	}
> -	return count;
> -}
> -
> -int proc_get_rssi_disp(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	*eof = 1;
> -	return 0;
> -}
> -
> -int proc_set_rssi_disp(struct file *file, const char __user *buffer,
> -		unsigned long count, void *data)
> -{
> -	struct net_device *dev = (struct net_device *)data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	char tmp[32];
> -	u32 enable = 0;
> -
> -	if (count < 1) {
> -		DBG_88E("argument size is less than 1\n");
> -		return -EFAULT;
> -	}
> -
> -	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
> -		int num = sscanf(tmp, "%x", &enable);
> -
> -		if (num !=  1) {
> -			DBG_88E("invalid set_rssi_disp parameter!\n");
> -			return count;
> -		}
> -
> -		if (enable) {
> -			DBG_88E("Turn On Rx RSSI Display Function\n");
> -			padapter->bRxRSSIDisplay = enable;
> -		} else {
> -			DBG_88E("Turn Off Rx RSSI Display Function\n");
> -			padapter->bRxRSSIDisplay = 0;
> -		}
> -	}
> -	return count;
> -}
> -
> -int proc_get_all_sta_info(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct sta_info *psta;
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct sta_priv *pstapriv = &padapter->stapriv;
> -	int i, j;
> -	struct list_head *plist, *phead;
> -	struct recv_reorder_ctrl *preorder_ctrl;
> -	int len = 0;
> -
> -	len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
> -
> -	spin_lock_bh(&pstapriv->sta_hash_lock);
> -
> -	for (i = 0; i < NUM_STA; i++) {
> -		phead = &pstapriv->sta_hash[i];
> -		plist = phead->next;
> -
> -		while (phead != plist) {
> -			psta = container_of(plist, struct sta_info, hash_list);
> -
> -			plist = plist->next;
> -
> -			len += snprintf(page + len, count - len, "sta's macaddr: %pM\n", psta->hwaddr);
> -			len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
> -			len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
> -			len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
> -			len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
> -			len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
> -			len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
> -			len += snprintf(page + len, count - len, "sleepq_len=%d\n", psta->sleepq_len);
> -			len += snprintf(page + len, count - len, "capability=0x%x\n", psta->capability);
> -			len += snprintf(page + len, count - len, "flags=0x%x\n", psta->flags);
> -			len += snprintf(page + len, count - len, "wpa_psk=0x%x\n", psta->wpa_psk);
> -			len += snprintf(page + len, count - len, "wpa2_group_cipher=0x%x\n", psta->wpa2_group_cipher);
> -			len += snprintf(page + len, count - len, "wpa2_pairwise_cipher=0x%x\n", psta->wpa2_pairwise_cipher);
> -			len += snprintf(page + len, count - len, "qos_info=0x%x\n", psta->qos_info);
> -			len += snprintf(page + len, count - len, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy);
> -
> -			for (j = 0; j < 16; j++) {
> -				preorder_ctrl = &psta->recvreorder_ctrl[j];
> -				if (preorder_ctrl->enable)
> -					len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", j, preorder_ctrl->indicate_seq);
> -			}
> -		}
> -	}
> -	spin_unlock_bh(&pstapriv->sta_hash_lock);
> -
> -	*eof = 1;
> -	return len;
> -}
> -
> -int proc_get_best_channel(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data)
> -{
> -	struct net_device *dev = data;
> -	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> -	int len = 0;
> -	u32 i, best_channel_24G = 1, index_24G = 0;
> -
> -	for (i = 0; pmlmeext->channel_set[i].ChannelNum != 0; i++) {
> -		if (pmlmeext->channel_set[i].ChannelNum == 1)
> -			index_24G = i;
> -	}
> -
> -	for (i = 0; pmlmeext->channel_set[i].ChannelNum != 0; i++) {
> -		/*  2.4G */
> -		if (pmlmeext->channel_set[i].ChannelNum == 6) {
> -			if (pmlmeext->channel_set[i].rx_count < pmlmeext->channel_set[index_24G].rx_count) {
> -				index_24G = i;
> -				best_channel_24G = pmlmeext->channel_set[i].ChannelNum;
> -			}
> -		}
> -
> -		/*  debug */
> -		len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n",
> -					pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count);
> -	}
> -
> -	len += snprintf(page + len, count - len, "best_channel_24G = %d\n", best_channel_24G);
> -
> -	*eof = 1;
> -	return len;
> -}
> diff --git a/drivers/staging/r8188eu/include/rtw_debug.h b/drivers/staging/r8188eu/include/rtw_debug.h
> index 002139cacfb5..0a77e3e73a45 100644
> --- a/drivers/staging/r8188eu/include/rtw_debug.h
> +++ b/drivers/staging/r8188eu/include/rtw_debug.h
> @@ -72,152 +72,4 @@ extern u32 GlobalDebugLevel;
>   			pr_info(DRIVER_PREFIX __VA_ARGS__);			\
>   	} while (0)
>   
> -int proc_get_drv_version(char *page, char **start,
> -			 off_t offset, int count,
> -			 int *eof, void *data);
> -
> -int proc_get_write_reg(char *page, char **start,
> -		       off_t offset, int count,
> -		       int *eof, void *data);
> -
> -int proc_set_write_reg(struct file *file, const char __user *buffer,
> -		       unsigned long count, void *data);
> -int proc_get_read_reg(char *page, char **start,
> -		      off_t offset, int count,
> -		      int *eof, void *data);
> -
> -int proc_set_read_reg(struct file *file, const char __user *buffer,
> -		      unsigned long count, void *data);
> -
> -int proc_get_fwstate(char *page, char **start,
> -		     off_t offset, int count,
> -		     int *eof, void *data);
> -int proc_get_sec_info(char *page, char **start,
> -		      off_t offset, int count,
> -		      int *eof, void *data);
> -int proc_get_mlmext_state(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_qos_option(char *page, char **start,
> -			off_t offset, int count,
> -			int *eof, void *data);
> -int proc_get_ht_option(char *page, char **start,
> -		       off_t offset, int count,
> -		       int *eof, void *data);
> -int proc_get_rf_info(char *page, char **start,
> -		     off_t offset, int count,
> -		     int *eof, void *data);
> -int proc_get_ap_info(char *page, char **start,
> -		     off_t offset, int count,
> -		     int *eof, void *data);
> -
> -int proc_get_trx_info(char *page, char **start,
> -		      off_t offset, int count,
> -		      int *eof, void *data);
> -
> -int proc_get_mac_reg_dump1(char *page, char **start,
> -			   off_t offset, int count,
> -			   int *eof, void *data);
> -
> -int proc_get_mac_reg_dump2(char *page, char **start,
> -			   off_t offset, int count,
> -			   int *eof, void *data);
> -
> -int proc_get_mac_reg_dump3(char *page, char **start,
> -			   off_t offset, int count,
> -			   int *eof, void *data);
> -
> -int proc_get_bb_reg_dump1(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_bb_reg_dump2(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_bb_reg_dump3(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_rf_reg_dump1(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_rf_reg_dump2(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_rf_reg_dump3(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_rf_reg_dump4(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_all_sta_info(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_best_channel(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_get_rx_signal(char *page, char **start,
> -		       off_t offset, int count,
> -		       int *eof, void *data);
> -
> -int proc_set_rx_signal(struct file *file, const char __user *buffer,
> -		       unsigned long count, void *data);
> -
> -int proc_get_ht_enable(char *page, char **start,
> -		       off_t offset, int count,
> -		       int *eof, void *data);
> -
> -int proc_set_ht_enable(struct file *file, const char __user *buffer,
> -		       unsigned long count, void *data);
> -
> -int proc_get_cbw40_enable(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
> -			  unsigned long count, void *data);
> -
> -int proc_get_ampdu_enable(char *page, char **start,
> -			  off_t offset, int count,
> -			  int *eof, void *data);
> -
> -int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
> -			  unsigned long count, void *data);
> -
> -int proc_get_rx_stbc(char *page, char **start,
> -		     off_t offset, int count,
> -		     int *eof, void *data);
> -
> -int proc_set_rx_stbc(struct file *file, const char __user *buffer,
> -		     unsigned long count, void *data);
> -
> -int proc_get_two_path_rssi(char *page, char **start,
> -			   off_t offset, int count,
> -			   int *eof, void *data);
> -
> -int proc_get_rssi_disp(char *page, char **start,
> -		       off_t offset, int count,
> -		       int *eof, void *data);
> -
> -int proc_set_rssi_disp(struct file *file, const char __user *buffer,
> -		       unsigned long count, void *data);
> -
> -#ifdef CONFIG_BT_COEXIST
> -int proc_get_btcoex_dbg(char *page, char **start,
> -			off_t offset, int count,
> -			int *eof, void *data);
> -
> -int proc_set_btcoex_dbg(struct file *file, const char *buffer,
> -			signed long count, void *data);
> -
> -#endif /* CONFIG_BT_COEXIST */
> -
>   #endif	/* __RTW_DEBUG_H__ */
> 

Acked-by: Michael Straube <straube.linux@gmail.com>

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

* Re: [PATCH 8/8] staging: r8188eu: CurrentWirelessMode is not used
  2021-10-16 11:30 ` [PATCH 8/8] staging: r8188eu: CurrentWirelessMode is not used Martin Kaiser
@ 2021-10-17 11:57   ` Michael Straube
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Straube @ 2021-10-17 11:57 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 10/16/21 13:30, Martin Kaiser wrote:
> CurrentWirelessMode in struct hal_data_8188e is not used. Remove the
> component and the enum with its possible values.
> 
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>
> ---
>   drivers/staging/r8188eu/include/Hal8188EPhyCfg.h | 8 --------
>   drivers/staging/r8188eu/include/rtl8188e_hal.h   | 1 -
>   2 files changed, 9 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> index 58377edf724d..6f901ce607e8 100644
> --- a/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> +++ b/drivers/staging/r8188eu/include/Hal8188EPhyCfg.h
> @@ -48,14 +48,6 @@ enum rf_radio_path {
>   						 * total three groups */
>   #define CHANNEL_GROUP_MAX_88E		6
>   
> -enum wireless_mode {
> -	WIRELESS_MODE_UNKNOWN = 0x00,
> -	WIRELESS_MODE_B			= BIT(0),
> -	WIRELESS_MODE_G			= BIT(1),
> -	WIRELESS_MODE_AUTO		= BIT(5),
> -	WIRELESS_MODE_N_24G		= BIT(3),
> -};
> -
>   /* BB/RF related */
>   enum RF_TYPE_8190P {
>   	RF_TYPE_MIN,		/*  0 */
> diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> index 5fdee1c6299c..ced7e12d9013 100644
> --- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
> +++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
> @@ -162,7 +162,6 @@ struct hal_data_8188e {
>   	u8	PGMaxGroup;
>   	/* current WIFI_PHY values */
>   	u32	ReceiveConfig;
> -	enum wireless_mode CurrentWirelessMode;
>   	enum ht_channel_width CurrentChannelBW;
>   	u8	CurrentChannel;
>   	u8	nCur40MhzPrimeSC;/*  Control channel sub-carrier */
> 

Acked-by: Michael Straube <straube.linux@gmail.com>

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

end of thread, other threads:[~2021-10-17 11:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16 11:30 [PATCH 0/8] staging: r8188eu: another round of removals Martin Kaiser
2021-10-16 11:30 ` [PATCH 1/8] staging: r8188eu: remove empty trigger gpio code Martin Kaiser
2021-10-17 11:23   ` Michael Straube
2021-10-16 11:30 ` [PATCH 2/8] staging: r8188eu: interface type is always usb Martin Kaiser
2021-10-17 11:46   ` Michael Straube
2021-10-16 11:30 ` [PATCH 3/8] staging: r8188eu: remove two checks that are always false Martin Kaiser
2021-10-17 11:48   ` Michael Straube
2021-10-16 11:30 ` [PATCH 4/8] staging: r8188eu: remove unused function prototypes Martin Kaiser
2021-10-17 11:50   ` Michael Straube
2021-10-16 11:30 ` [PATCH 5/8] staging: r8188eu: PHY_SetRFPathSwitch_8188E is not used Martin Kaiser
2021-10-17 11:53   ` Michael Straube
2021-10-16 11:30 ` [PATCH 6/8] staging: r8188eu: clean up Hal8188EPhyCfg.h Martin Kaiser
2021-10-17 11:54   ` Michael Straube
2021-10-16 11:30 ` [PATCH 7/8] staging: r8188eu: remove procfs functions Martin Kaiser
2021-10-17 11:56   ` Michael Straube
2021-10-16 11:30 ` [PATCH 8/8] staging: r8188eu: CurrentWirelessMode is not used Martin Kaiser
2021-10-17 11:57   ` Michael Straube
2021-10-16 15:34 ` [PATCH 0/8] staging: r8188eu: another round of removals Phillip Potter
2021-10-16 16:33   ` Martin Kaiser

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