diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2023-10-13 16:44:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-15 18:20:45 +0200 |
commit | fda7398845873b09f08c3ee3125c861e819c9721 (patch) | |
tree | 444135221581327c840e3ed561ec78a47fe49853 /drivers/staging | |
parent | 29f9b2e9399cd5bee5f44bcad5c006fbaf40349f (diff) | |
download | linux-stable-fda7398845873b09f08c3ee3125c861e819c9721.tar.gz linux-stable-fda7398845873b09f08c3ee3125c861e819c9721.tar.bz2 linux-stable-fda7398845873b09f08c3ee3125c861e819c9721.zip |
staging: rtl8192e: Remove _rtl92e_dm_ctrl_initgain_byrssi_false_alarm()
Remove function _rtl92e_dm_ctrl_initgain_byrssi_false_alarm() as it is
unused. Remove in above function called function
_rtl92e_dm_ctrl_initgain_byrssi_highpwr() as well.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/80a5a0b67d9d225a58c96781c33e2216c0ea1c6e.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 | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 2bbc6a67188c..e69c22e5d205 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -163,9 +163,7 @@ static void _rtl92e_dm_check_tx_power_tracking(struct net_device *dev); static void _rtl92e_dm_dig_init(struct net_device *dev); static void _rtl92e_dm_ctrl_initgain_byrssi(struct net_device *dev); -static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev); static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev); -static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev); static void _rtl92e_dm_initial_gain(struct net_device *dev); static void _rtl92e_dm_pd_th(struct net_device *dev); static void _rtl92e_dm_cs_ratio(struct net_device *dev); @@ -987,119 +985,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) dm_digtable.pre_sta_connect_state = dm_digtable.cur_sta_connect_state; } -static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev) -{ - struct r8192_priv *priv = rtllib_priv(dev); - u8 i; - - if (dm_digtable.dig_algorithm_switch) { - dm_digtable.dig_state = DM_STA_DIG_MAX; - for (i = 0; i < 3; i++) - rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1); - dm_digtable.dig_algorithm_switch = 0; - } - - if (priv->rtllib->link_state != MAC80211_LINKED) - return; - - if ((priv->undecorated_smoothed_pwdb > dm_digtable.rssi_low_thresh) && - (priv->undecorated_smoothed_pwdb < dm_digtable.rssi_high_thresh)) - return; - if (priv->undecorated_smoothed_pwdb <= dm_digtable.rssi_low_thresh) { - if (dm_digtable.dig_state == DM_STA_DIG_OFF) - return; - - dm_digtable.dig_highpwr_state = DM_STA_DIG_MAX; - dm_digtable.dig_state = DM_STA_DIG_OFF; - - rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8); - - rtl92e_writeb(dev, rOFDM0_XAAGCCore1, 0x17); - rtl92e_writeb(dev, rOFDM0_XBAGCCore1, 0x17); - rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x17); - rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x17); - - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x00); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x42); - - rtl92e_writeb(dev, 0xa0a, 0x08); - - return; - } - - if (priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_thresh) { - u8 reset_flag = 0; - - if (dm_digtable.dig_state == DM_STA_DIG_ON) { - _rtl92e_dm_ctrl_initgain_byrssi_highpwr(dev); - return; - } - - dm_digtable.dig_state = DM_STA_DIG_ON; - - if (reset_flag == 1) { - rtl92e_writeb(dev, rOFDM0_XAAGCCore1, 0x2c); - rtl92e_writeb(dev, rOFDM0_XBAGCCore1, 0x2c); - rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x2c); - rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x2c); - } else { - rtl92e_writeb(dev, rOFDM0_XAAGCCore1, 0x20); - rtl92e_writeb(dev, rOFDM0_XBAGCCore1, 0x20); - rtl92e_writeb(dev, rOFDM0_XCAGCCore1, 0x20); - rtl92e_writeb(dev, rOFDM0_XDAGCCore1, 0x20); - } - - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x20); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44); - - rtl92e_writeb(dev, 0xa0a, 0xcd); - - rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1); - } - _rtl92e_dm_ctrl_initgain_byrssi_highpwr(dev); -} - -static void _rtl92e_dm_ctrl_initgain_byrssi_highpwr(struct net_device *dev) -{ - struct r8192_priv *priv = rtllib_priv(dev); - - if ((priv->undecorated_smoothed_pwdb > - dm_digtable.rssi_high_power_lowthresh) && - (priv->undecorated_smoothed_pwdb < - dm_digtable.rssi_high_power_highthresh)) - return; - - if (priv->undecorated_smoothed_pwdb >= - dm_digtable.rssi_high_power_highthresh) { - if (dm_digtable.dig_highpwr_state == DM_STA_DIG_ON) - return; - dm_digtable.dig_highpwr_state = DM_STA_DIG_ON; - - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x10); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x43); - } else { - if (dm_digtable.dig_highpwr_state == DM_STA_DIG_OFF) - return; - dm_digtable.dig_highpwr_state = DM_STA_DIG_OFF; - - if ((priv->undecorated_smoothed_pwdb < - dm_digtable.rssi_high_power_lowthresh) && - (priv->undecorated_smoothed_pwdb >= - dm_digtable.rssi_high_thresh)) { - if (priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) - rtl92e_writeb(dev, (rOFDM0_XATxAFE + 3), 0x20); - else - rtl92e_writeb(dev, rOFDM0_RxDetector1, 0x44); - } - } -} - static void _rtl92e_dm_initial_gain(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); |