diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2023-10-13 16:44:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-15 18:20:45 +0200 |
commit | 8e6bbbdaa7b04a08fbd6795a5dca112afd2fc0a7 (patch) | |
tree | 90947f95022ae6e0a2038f4a84c020ce2b2ee3b7 /drivers/staging | |
parent | fda7398845873b09f08c3ee3125c861e819c9721 (diff) | |
download | linux-stable-8e6bbbdaa7b04a08fbd6795a5dca112afd2fc0a7.tar.gz linux-stable-8e6bbbdaa7b04a08fbd6795a5dca112afd2fc0a7.tar.bz2 linux-stable-8e6bbbdaa7b04a08fbd6795a5dca112afd2fc0a7.zip |
staging: rtl8192e: Remove unchanged variable dig_algorithm_switch
Remove variable dig_algorithm_switch as its value is set to 0 at
initialization. The equations result accordingly. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/a76d8b86f2591446a071b4f614adf628b0fe5c93.1697127817.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 18 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 |
2 files changed, 0 insertions, 20 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index e69c22e5d205..0bd9211500ac 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -911,8 +911,6 @@ static void _rtl92e_dm_dig_init(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - dm_digtable.dig_algorithm_switch = 0; - dm_digtable.dig_state = DM_STA_DIG_MAX; dm_digtable.dig_highpwr_state = DM_STA_DIG_MAX; dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT; @@ -962,8 +960,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) u8 i; static u8 fw_dig; - if (dm_digtable.dig_algorithm_switch) - fw_dig = 0; if (fw_dig <= 3) { for (i = 0; i < 3; i++) rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8); @@ -980,8 +976,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) _rtl92e_dm_initial_gain(dev); _rtl92e_dm_pd_th(dev); _rtl92e_dm_cs_ratio(dev); - if (dm_digtable.dig_algorithm_switch) - dm_digtable.dig_algorithm_switch = 0; dm_digtable.pre_sta_connect_state = dm_digtable.cur_sta_connect_state; } @@ -991,10 +985,6 @@ static void _rtl92e_dm_initial_gain(struct net_device *dev) u8 initial_gain = 0; static u8 initialized, force_write; - if (dm_digtable.dig_algorithm_switch) { - initialized = 0; - } - if (rtllib_act_scanning(priv->rtllib, true)) { force_write = 1; return; @@ -1040,10 +1030,6 @@ static void _rtl92e_dm_pd_th(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); static u8 initialized, force_write; - if (dm_digtable.dig_algorithm_switch) { - initialized = 0; - } - if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) { if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) { if (dm_digtable.rssi_val >= @@ -1100,10 +1086,6 @@ static void _rtl92e_dm_cs_ratio(struct net_device *dev) { static u8 initialized, force_write; - if (dm_digtable.dig_algorithm_switch) { - initialized = 0; - } - if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) { if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) { if (dm_digtable.rssi_val <= dm_digtable.rssi_low_thresh) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h index 15af490d2dcd..12b7d426b6b9 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h @@ -50,8 +50,6 @@ /*------------------------------Define structure----------------------------*/ struct dig_t { - u8 dig_algorithm_switch; - long rssi_low_thresh; long rssi_high_thresh; |