staging: rtl8192e: Remove unused variable rxSNRdB
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 29 Jan 2023 14:58:14 +0000 (15:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2023 10:16:33 +0000 (11:16 +0100)
rxSNRdB is initialized and set but never read. Remove dead code. Local
variable rx_snrX is then of no use. Remove rx_snrX as well. Local
variable tmp_rxsnr is then of no use. Remove tmp_rxsnr as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b3150d506556375c4b155c51eabf79e128f50780.1675003608.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h

index 912b50d..1677b6c 100644 (file)
@@ -1297,9 +1297,9 @@ static void _rtl92e_query_rxphystatus(
        struct phy_sts_ofdm_819xpci *pofdm_buf;
        struct phy_sts_cck_819xpci *pcck_buf;
        u8 *prxpkt;
-       u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm;
+       u8 i, max_spatial_stream, tmp_rxevm;
        s8 rx_pwr[4], rx_pwr_all = 0;
-       s8 rx_snrX, rx_evmX;
+       s8 rx_evmX;
        u8 evm, pwdb_all;
        u32 RSSI, total_rssi = 0;
        u8 is_cck_rate = 0;
@@ -1419,11 +1419,6 @@ static void _rtl92e_query_rxphystatus(
                        rx_pwr[i] = ((pofdm_buf->trsw_gain_X[i] & 0x3F) *
                                     2) - 110;
 
-                       tmp_rxsnr = pofdm_buf->rxsnr_X[i];
-                       rx_snrX = (s8)(tmp_rxsnr);
-                       rx_snrX /= 2;
-                       priv->stats.rxSNRdB[i] = (long)rx_snrX;
-
                        RSSI = rtl92e_rx_db_to_percent(rx_pwr[i]);
                        if (priv->brfpath_rxenable[i])
                                total_rssi += RSSI;
index a5812df..d0c88d6 100644 (file)
@@ -197,7 +197,6 @@ struct rt_stats {
        long    recv_signal_power;
        u8 rx_rssi_percentage[4];
        u8 rx_evm_percentage[2];
-       long rxSNRdB[4];
        u32 slide_beacon_pwdb[100];
        u32 slide_beacon_total;
        u32     CurrentShowTxate;