linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D}
@ 2024-08-31 10:08 Michael Straube
  2024-08-31 10:08 ` [PATCH 1/5] staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path Michael Straube
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Michael Straube @ 2024-08-31 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: philipp.g.hortmann, linux-staging, linux-kernel, Michael Straube

This series removes the unsed RF90_PATH_C and RF90_PATH_D from the
enum rf90_radio_path and adjusts the size of arrays that are indexed
by values from rf90_radio_path.

Compile-tested only.

Michael Straube (5):
  staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path
  staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX
  staging: rtl8192e: adjust size of trsw_gain_X for new RF90_PATH_MAX
  staging: rtl8192e: adjust size of brfpath_rxenable for new
    RF90_PATH_MAX
  staging: rtl8192e: adjust size of RxMIMOSignalStrength

 drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 3 ++-
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 --
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h   | 2 +-
 drivers/staging/rtl8192e/rtllib.h              | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)

-- 
2.46.0


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

* [PATCH 1/5] staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path
  2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
@ 2024-08-31 10:08 ` Michael Straube
  2024-08-31 10:08 ` [PATCH 2/5] staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX Michael Straube
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2024-08-31 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: philipp.g.hortmann, linux-staging, linux-kernel, Michael Straube

RF90_PATH_C and RF90_PATH_D are unused in this driver. Remove them
from enum rf90_radio_path.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
index ff4b4004b0d0..c928bc2b218b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
@@ -20,8 +20,6 @@ enum hw90_block {
 enum rf90_radio_path {
 	RF90_PATH_A = 0,
 	RF90_PATH_B = 1,
-	RF90_PATH_C = 2,
-	RF90_PATH_D = 3,
 	RF90_PATH_MAX
 };
 
-- 
2.46.0


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

* [PATCH 2/5] staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX
  2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
  2024-08-31 10:08 ` [PATCH 1/5] staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path Michael Straube
@ 2024-08-31 10:08 ` Michael Straube
  2024-08-31 10:08 ` [PATCH 3/5] staging: rtl8192e: adjust size of trsw_gain_X " Michael Straube
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2024-08-31 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: philipp.g.hortmann, linux-staging, linux-kernel, Michael Straube

The local array rx_pwr in the function _rtl92e_query_rxphystatus() is
always accessed by indices in the range i = 0; i < RF90_PATH_MAX.
A previous patch changed the value of RF90_PATH_MAX from 4 to 2, so we can
reduce the size of rx_pwr to 2. Use RF90_PATH_MAX instead of a hard-coded
size.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 519cad9e1106..5646bd498871 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1159,7 +1159,7 @@ static void _rtl92e_query_rxphystatus(struct r8192_priv *priv,
 	struct phy_sts_cck_819xpci *pcck_buf;
 	u8 *prxpkt;
 	u8 i, max_spatial_stream, tmp_rxevm;
-	s8 rx_pwr[4], rx_pwr_all = 0;
+	s8 rx_pwr[RF90_PATH_MAX], rx_pwr_all = 0;
 	s8 rx_evmX;
 	u8 evm, pwdb_all;
 	u32 RSSI, total_rssi = 0;
-- 
2.46.0


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

* [PATCH 3/5] staging: rtl8192e: adjust size of trsw_gain_X for new RF90_PATH_MAX
  2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
  2024-08-31 10:08 ` [PATCH 1/5] staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path Michael Straube
  2024-08-31 10:08 ` [PATCH 2/5] staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX Michael Straube
@ 2024-08-31 10:08 ` Michael Straube
  2024-08-31 10:08 ` [PATCH 4/5] staging: rtl8192e: adjust size of brfpath_rxenable " Michael Straube
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2024-08-31 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: philipp.g.hortmann, linux-staging, linux-kernel, Michael Straube

The array trsw_gain_X in struct phy_sts_ofdm_819xpci is always accessed by
indices in the range i = 0; i < RF90_PATH_MAX. A previous patch changed the
value of RF90_PATH_MAX from 4 to 2, so we can reduce the size of
trsw_gain_X to 2. Use RF90_PATH_MAX instead of a hard-coded size.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
index d87bace0a19b..de0cd40df25f 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
@@ -8,6 +8,7 @@
 #define R8190P_DEF_H
 
 #include <linux/types.h>
+#include "r8192E_phy.h"
 
 #define		MAX_SILENT_RESET_RX_SLOT_NUM	10
 
@@ -137,7 +138,7 @@ struct tx_fwinfo_8190pci {
 };
 
 struct phy_sts_ofdm_819xpci {
-	u8	trsw_gain_X[4];
+	u8	trsw_gain_X[RF90_PATH_MAX];
 	u8	pwdb_all;
 	u8	cfosho_X[4];
 	u8	cfotail_X[4];
-- 
2.46.0


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

* [PATCH 4/5] staging: rtl8192e: adjust size of brfpath_rxenable for new RF90_PATH_MAX
  2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
                   ` (2 preceding siblings ...)
  2024-08-31 10:08 ` [PATCH 3/5] staging: rtl8192e: adjust size of trsw_gain_X " Michael Straube
@ 2024-08-31 10:08 ` Michael Straube
  2024-08-31 10:08 ` [PATCH 5/5] staging: rtl8192e: adjust size of RxMIMOSignalStrength Michael Straube
  2024-09-02 17:37 ` [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Philipp Hortmann
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2024-08-31 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: philipp.g.hortmann, linux-staging, linux-kernel, Michael Straube

The array brfpath_rxenable in struct r8192_priv is always accessed by
indices in the range i = 0; i < RF90_PATH_MAX. A previous patch changed the
value of RF90_PATH_MAX from 4 to 2, so we can reduce the size of
brfpath_rxenable to 2. Use RF90_PATH_MAX instead of a hard-coded size.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 1d6d31292f41..8297d7e59415 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -300,7 +300,7 @@ struct r8192_priv {
 
 	u32 rf_reg_0value[4];
 	u8 num_total_rf_path;
-	bool brfpath_rxenable[4];
+	bool brfpath_rxenable[RF90_PATH_MAX];
 
 	bool tx_pwr_data_read_from_eeprom;
 
-- 
2.46.0


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

* [PATCH 5/5] staging: rtl8192e: adjust size of RxMIMOSignalStrength
  2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
                   ` (3 preceding siblings ...)
  2024-08-31 10:08 ` [PATCH 4/5] staging: rtl8192e: adjust size of brfpath_rxenable " Michael Straube
@ 2024-08-31 10:08 ` Michael Straube
  2024-09-02 17:37 ` [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Philipp Hortmann
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Straube @ 2024-08-31 10:08 UTC (permalink / raw)
  To: gregkh; +Cc: philipp.g.hortmann, linux-staging, linux-kernel, Michael Straube

The array RxMIMOSignalStrength in struct rtllib_rx_stats is always accessed
with indices in the range i = 0; i < 2. We can reduce the size from 4 to 2.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/rtl8192e/rtllib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 7a1a68317a49..0eb987e999c5 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -480,7 +480,7 @@ struct rtllib_rx_stats {
 	bool  bFirstMPDU;
 	bool  contain_htc;
 	u32   RxPWDBAll;
-	u8    RxMIMOSignalStrength[4];
+	u8    RxMIMOSignalStrength[2];
 	s8    RxMIMOSignalQuality[2];
 	bool  bPacketMatchBSSID;
 	bool  bIsCCK;
-- 
2.46.0


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

* Re: [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D}
  2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
                   ` (4 preceding siblings ...)
  2024-08-31 10:08 ` [PATCH 5/5] staging: rtl8192e: adjust size of RxMIMOSignalStrength Michael Straube
@ 2024-09-02 17:37 ` Philipp Hortmann
  5 siblings, 0 replies; 7+ messages in thread
From: Philipp Hortmann @ 2024-09-02 17:37 UTC (permalink / raw)
  To: Michael Straube, gregkh; +Cc: linux-staging, linux-kernel

On 8/31/24 12:08, Michael Straube wrote:
> This series removes the unsed RF90_PATH_C and RF90_PATH_D from the
> enum rf90_radio_path and adjusts the size of arrays that are indexed
> by values from rf90_radio_path.
> 
> Compile-tested only.
> 
> Michael Straube (5):
>    staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path
>    staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX
>    staging: rtl8192e: adjust size of trsw_gain_X for new RF90_PATH_MAX
>    staging: rtl8192e: adjust size of brfpath_rxenable for new
>      RF90_PATH_MAX
>    staging: rtl8192e: adjust size of RxMIMOSignalStrength
> 
>   drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 3 ++-
>   drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
>   drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 --
>   drivers/staging/rtl8192e/rtl8192e/rtl_core.h   | 2 +-
>   drivers/staging/rtl8192e/rtllib.h              | 2 +-
>   5 files changed, 5 insertions(+), 6 deletions(-)
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>

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

end of thread, other threads:[~2024-09-02 17:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-31 10:08 [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Michael Straube
2024-08-31 10:08 ` [PATCH 1/5] staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path Michael Straube
2024-08-31 10:08 ` [PATCH 2/5] staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX Michael Straube
2024-08-31 10:08 ` [PATCH 3/5] staging: rtl8192e: adjust size of trsw_gain_X " Michael Straube
2024-08-31 10:08 ` [PATCH 4/5] staging: rtl8192e: adjust size of brfpath_rxenable " Michael Straube
2024-08-31 10:08 ` [PATCH 5/5] staging: rtl8192e: adjust size of RxMIMOSignalStrength Michael Straube
2024-09-02 17:37 ` [PATCH 0/5] staging: rtl8192e: remove RF90_PATH_{C,D} Philipp Hortmann

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