linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU()
@ 2022-01-07 21:50 Michael Straube
  2022-01-07 21:50 ` [PATCH 1/6] staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU() Michael Straube
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

This series removes unused cases from GetHwReg8188EU(). Some of the
cases are also unused in SetHwReg8188EU() and removed there as well.

Tested on x86_64 with Inter-Tech DMG-02.

Michael Straube (6):
  staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU()
  staging: r8188eu: remove HW_VAR_TXPAUSE
  staging: r8188eu: remove HW_VAR_CURRENT_ANTENNA from GetHwReg8188EU()
  staging: r8188eu: remove HW_VAR_EFUSE_BYTES from GetHwReg8188EU()
  staging: r8188eu: EfuseUsedBytes is set but never used
  staging: r8188eu: remove HW_VAR_APFM_ON_MAC

 .../staging/r8188eu/hal/rtl8188e_hal_init.c   |  3 ---
 drivers/staging/r8188eu/hal/usb_halinit.c     | 25 -------------------
 drivers/staging/r8188eu/include/hal_intf.h    |  5 ----
 .../staging/r8188eu/include/rtl8188e_hal.h    |  2 --
 4 files changed, 35 deletions(-)

-- 
2.34.1


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

* [PATCH 1/6] staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU()
  2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
@ 2022-01-07 21:50 ` Michael Straube
  2022-01-07 21:50 ` [PATCH 2/6] staging: r8188eu: remove HW_VAR_TXPAUSE Michael Straube
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

GetHwReg8188EU() is never called with HW_VAR_BASIC_RATE. Remove that
case from the function.

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

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 96db9a8e7667..b996580b30ba 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1592,9 +1592,6 @@ void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 	struct odm_dm_struct *podmpriv = &haldata->odmpriv;
 
 	switch (variable) {
-	case HW_VAR_BASIC_RATE:
-		*((u16 *)(val)) = haldata->BasicRateSet;
-		fallthrough;
 	case HW_VAR_TXPAUSE:
 		val[0] = rtw_read8(Adapter, REG_TXPAUSE);
 		break;
-- 
2.34.1


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

* [PATCH 2/6] staging: r8188eu: remove HW_VAR_TXPAUSE
  2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
  2022-01-07 21:50 ` [PATCH 1/6] staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU() Michael Straube
@ 2022-01-07 21:50 ` Michael Straube
  2022-01-07 21:50 ` [PATCH 3/6] staging: r8188eu: remove HW_VAR_CURRENT_ANTENNA from GetHwReg8188EU() Michael Straube
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

SetHwReg8188EU() and GetHwReg8188EU() are never called with
HW_VAR_TXPAUSE. Remove that case from both functions.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/hal/usb_halinit.c  | 6 ------
 drivers/staging/r8188eu/include/hal_intf.h | 1 -
 2 files changed, 7 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index b996580b30ba..72b008a78d75 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1138,9 +1138,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			rtw_write8(Adapter, REG_INIRTS_RATE_SEL, RateIndex);
 		}
 		break;
-	case HW_VAR_TXPAUSE:
-		rtw_write8(Adapter, REG_TXPAUSE, *((u8 *)val));
-		break;
 	case HW_VAR_BCN_FUNC:
 		hw_var_set_bcn_func(Adapter, variable, val);
 		break;
@@ -1592,9 +1589,6 @@ void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 	struct odm_dm_struct *podmpriv = &haldata->odmpriv;
 
 	switch (variable) {
-	case HW_VAR_TXPAUSE:
-		val[0] = rtw_read8(Adapter, REG_TXPAUSE);
-		break;
 	case HW_VAR_BCN_VALID:
 		/* BCN_VALID, BIT(16) of REG_TDECTRL = BIT(0) of REG_TDECTRL+2 */
 		val[0] = (BIT(0) & rtw_read8(Adapter, REG_TDECTRL + 2)) ? true : false;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index b4a7e0ce3116..77149eda7edf 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -16,7 +16,6 @@ enum hw_variables {
 	HW_VAR_BSSID,
 	HW_VAR_INIT_RTS_RATE,
 	HW_VAR_BASIC_RATE,
-	HW_VAR_TXPAUSE,
 	HW_VAR_BCN_FUNC,
 	HW_VAR_CORRECT_TSF,
 	HW_VAR_CHECK_BSSID,
-- 
2.34.1


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

* [PATCH 3/6] staging: r8188eu: remove HW_VAR_CURRENT_ANTENNA from GetHwReg8188EU()
  2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
  2022-01-07 21:50 ` [PATCH 1/6] staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU() Michael Straube
  2022-01-07 21:50 ` [PATCH 2/6] staging: r8188eu: remove HW_VAR_TXPAUSE Michael Straube
@ 2022-01-07 21:50 ` Michael Straube
  2022-01-07 21:50 ` [PATCH 4/6] staging: r8188eu: remove HW_VAR_EFUSE_BYTES " Michael Straube
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

GetHwReg8188EU() is never called with HW_VAR_CURRENT_ANTENNA. Remove
that case from the function.

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

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 72b008a78d75..33523ca90ee5 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1614,9 +1614,6 @@ void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			}
 		}
 		break;
-	case HW_VAR_CURRENT_ANTENNA:
-		val[0] = haldata->CurAntenna;
-		break;
 	case HW_VAR_EFUSE_BYTES: /*  To get EFUE total used bytes, added by Roger, 2008.12.22. */
 		*((u16 *)(val)) = haldata->EfuseUsedBytes;
 		break;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 77149eda7edf..37c2d2b82ea8 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_INITIAL_GAIN,
 	HW_VAR_BT_SET_COEXIST,
 	HW_VAR_BT_ISSUE_DELBA,
-	HW_VAR_CURRENT_ANTENNA,
 	HW_VAR_ANTENNA_DIVERSITY_LINK,
 	HW_VAR_ANTENNA_DIVERSITY_SELECT,
 	HW_VAR_SWITCH_EPHY_WoWLAN,
-- 
2.34.1


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

* [PATCH 4/6] staging: r8188eu: remove HW_VAR_EFUSE_BYTES from GetHwReg8188EU()
  2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
                   ` (2 preceding siblings ...)
  2022-01-07 21:50 ` [PATCH 3/6] staging: r8188eu: remove HW_VAR_CURRENT_ANTENNA from GetHwReg8188EU() Michael Straube
@ 2022-01-07 21:50 ` Michael Straube
  2022-01-07 21:50 ` [PATCH 5/6] staging: r8188eu: EfuseUsedBytes is set but never used Michael Straube
  2022-01-07 21:50 ` [PATCH 6/6] staging: r8188eu: remove HW_VAR_APFM_ON_MAC Michael Straube
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

GetHwReg8188EU() is never called with HW_VAR_EFUSE_BYTES. Remove that
case from the function.

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

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 33523ca90ee5..c1129c83ebf7 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1614,9 +1614,6 @@ void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			}
 		}
 		break;
-	case HW_VAR_EFUSE_BYTES: /*  To get EFUE total used bytes, added by Roger, 2008.12.22. */
-		*((u16 *)(val)) = haldata->EfuseUsedBytes;
-		break;
 	case HW_VAR_APFM_ON_MAC:
 		*val = haldata->bMacPwrCtrlOn;
 		break;
-- 
2.34.1


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

* [PATCH 5/6] staging: r8188eu: EfuseUsedBytes is set but never used
  2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
                   ` (3 preceding siblings ...)
  2022-01-07 21:50 ` [PATCH 4/6] staging: r8188eu: remove HW_VAR_EFUSE_BYTES " Michael Straube
@ 2022-01-07 21:50 ` Michael Straube
  2022-01-07 21:50 ` [PATCH 6/6] staging: r8188eu: remove HW_VAR_APFM_ON_MAC Michael Straube
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

The field EfuseUsedBytes of struct hal_data_8188e is set but never
used. Remove it.

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

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index b818872e0d19..53328c4b1fd1 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -797,9 +797,6 @@ static void Hal_EfuseReadEFuse88E(struct adapter *Adapter,
 	for (i = 0; i < _size_byte; i++)
 		pbuf[i] = efuseTbl[_offset + i];
 
-	/*  5. Calculate Efuse utilization. */
-	SetHwReg8188EU(Adapter, HW_VAR_EFUSE_BYTES, (u8 *)&eFuse_Addr);
-
 exit:
 	kfree(efuseTbl);
 	kfree(eFuseWord);
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index c1129c83ebf7..10e40e654775 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1528,9 +1528,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			}
 		}
 		break;
-	case HW_VAR_EFUSE_BYTES: /*  To set EFUE total used bytes, added by Roger, 2008.12.22. */
-		haldata->EfuseUsedBytes = *((u16 *)val);
-		break;
 	case HW_VAR_FIFO_CLEARN_UP:
 		{
 			struct pwrctrl_priv *pwrpriv = &Adapter->pwrctrlpriv;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 37c2d2b82ea8..a86cb376a125 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -59,7 +59,6 @@ enum hw_variables {
 	HW_VAR_ANTENNA_DIVERSITY_SELECT,
 	HW_VAR_SWITCH_EPHY_WoWLAN,
 	HW_VAR_EFUSE_USAGE,
-	HW_VAR_EFUSE_BYTES,
 	HW_VAR_EFUSE_BT_USAGE,
 	HW_VAR_EFUSE_BT_BYTES,
 	HW_VAR_FIFO_CLEARN_UP,
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 8134a173ea07..837b633cf98a 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -232,8 +232,6 @@ struct hal_data_8188e {
 	u8	OutEpQueueSel;
 	u8	OutEpNumber;
 
-	u16	EfuseUsedBytes;
-
 	struct P2P_PS_Offload_t	p2p_ps_offload;
 
 	/*  Auto FSM to Turn On, include clock, isolation, power control
-- 
2.34.1


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

* [PATCH 6/6] staging: r8188eu: remove HW_VAR_APFM_ON_MAC
  2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
                   ` (4 preceding siblings ...)
  2022-01-07 21:50 ` [PATCH 5/6] staging: r8188eu: EfuseUsedBytes is set but never used Michael Straube
@ 2022-01-07 21:50 ` Michael Straube
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2022-01-07 21:50 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

SetHwReg8188EU() and GetHwReg8188EU() are never called with
HW_VAR_APFM_ON_MAC. Remove that case from both functions.

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

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 10e40e654775..91610e2adae2 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -1556,10 +1556,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			}
 		}
 		break;
-	case HW_VAR_APFM_ON_MAC:
-		haldata->bMacPwrCtrlOn = *val;
-		DBG_88E("%s: bMacPwrCtrlOn=%d\n", __func__, haldata->bMacPwrCtrlOn);
-		break;
 	case HW_VAR_TX_RPT_MAX_MACID:
 		{
 			u8 maxMacid = *val;
@@ -1611,9 +1607,6 @@ void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 			}
 		}
 		break;
-	case HW_VAR_APFM_ON_MAC:
-		*val = haldata->bMacPwrCtrlOn;
-		break;
 	case HW_VAR_CHK_HI_QUEUE_EMPTY:
 		*val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION) & 0x0000ff00) == 0) ? true : false;
 		break;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index a86cb376a125..120b32994e1f 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -62,8 +62,6 @@ enum hw_variables {
 	HW_VAR_EFUSE_BT_USAGE,
 	HW_VAR_EFUSE_BT_BYTES,
 	HW_VAR_FIFO_CLEARN_UP,
-	HW_VAR_APFM_ON_MAC, /* Auto FSM to Turn On, include clock, isolation,
-			     * power control for MAC only */
 	/*  The valid upper nav range for the HW updating, if the true value is
 	 *  larger than the upper range, the HW won't update it. */
 	/*  Unit in microsecond. 0 means disable this function. */
-- 
2.34.1


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

end of thread, other threads:[~2022-01-07 21:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 21:50 [PATCH 0/6] staging: r8188eu: clean up GetHwReg8188EU() Michael Straube
2022-01-07 21:50 ` [PATCH 1/6] staging: r8188eu: remove HW_VAR_BASIC_RATE from GetHwReg8188EU() Michael Straube
2022-01-07 21:50 ` [PATCH 2/6] staging: r8188eu: remove HW_VAR_TXPAUSE Michael Straube
2022-01-07 21:50 ` [PATCH 3/6] staging: r8188eu: remove HW_VAR_CURRENT_ANTENNA from GetHwReg8188EU() Michael Straube
2022-01-07 21:50 ` [PATCH 4/6] staging: r8188eu: remove HW_VAR_EFUSE_BYTES " Michael Straube
2022-01-07 21:50 ` [PATCH 5/6] staging: r8188eu: EfuseUsedBytes is set but never used Michael Straube
2022-01-07 21:50 ` [PATCH 6/6] staging: r8188eu: remove HW_VAR_APFM_ON_MAC Michael Straube

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