staging: rtl8192e: remove RF90_PATH_{C,D}
cover staging: rtl8192e: remove RF90_PATH_{C,D}
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(-)
Signature · 1 line
2.46.0
PATCH 1/5 staging: rtl8192e: remove RF90_PATH_{C,D} from enum rf90_radio_path
RF90_PATH_C and RF90_PATH_D are unused in this driver. Remove them from enum rf90_radio_path.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +0 -2
@@ -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 };
Signature · 1 line
2.46.0
PATCH 2/5 staging: rtl8192e: adjust size of rx_pwr for new RF90_PATH_MAX
In reply to Michael StraubeThe 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.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -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 ;
Signature · 1 line
2.46.0
PATCH 3/5 staging: rtl8192e: adjust size of trsw_gain_X for new RF90_PATH_MAX
In reply to Michael StraubeThe 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.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +2 -1
@@ -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 ];
Signature · 1 line
2.46.0
PATCH 4/5 staging: rtl8192e: adjust size of brfpath_rxenable for new RF90_PATH_MAX
In reply to Michael StraubeThe 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.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +1 -1
@@ -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;
Signature · 1 line
2.46.0
PATCH 5/5 staging: rtl8192e: adjust size of RxMIMOSignalStrength
In reply to Michael StraubeThe 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.
--- drivers/staging/rtl8192e/rtllib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -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;
Signature · 1 line
2.46.0
Quoted 12 lines · Michael Straube
This series removes the unsed
RF90_PATH_CandRF90_PATH_Dfrom the enumrf90_radio_pathand adjusts the size of arrays that are indexed by values fromrf90_radio_path.Compile-tested only.
Michael Straube (5):
staging: rtl8192e: remove RF90_PATH_{C,D} from enumrf90_radio_path
staging: rtl8192e: adjust size ofrx_pwrfor newRF90_PATH_MAX
staging: rtl8192e: adjust size oftrsw_gain_Xfor newRF90_PATH_MAX
staging: rtl8192e: adjust size ofbrfpath_rxenablefor newRF90_PATH_MAX
Quoted 9 lines
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(-)