[PATCH 2/8] staging: rtl8192e: Remove unused function rtl92e_dm_restore_state()

From: Philipp Hortmann
Date: Mon Oct 02 2023 - 13:53:27 EST


Remove rtl92e_dm_restore_state() as it is unused. Remove called functions
_rtl92e_dm_tx_power_reset_recovery() and
_rtl92e_dm_bb_initialgain_restore() as well.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 59 ----------------------
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 1 -
2 files changed, 60 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 5217ace3f140..8f5e4b932350 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -161,7 +161,6 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev);

static void _rtl92e_dm_check_tx_power_tracking(struct net_device *dev);

-static void _rtl92e_dm_bb_initialgain_restore(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);
@@ -915,64 +914,6 @@ void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14)
_rtl92e_dm_cck_tx_power_adjust_thermal_meter(dev, binch14);
}

-static void _rtl92e_dm_tx_power_reset_recovery(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
-
- rtl92e_set_bb_reg(dev, rOFDM0_XATxIQImbalance, bMaskDWord,
- dm_tx_bb_gain[priv->rfa_txpowertrackingindex]);
- rtl92e_dm_cck_txpower_adjust(dev, priv->bcck_in_ch14);
-
- rtl92e_set_bb_reg(dev, rOFDM0_XCTxIQImbalance, bMaskDWord,
- dm_tx_bb_gain[priv->rfc_txpowertrackingindex]);
-}
-
-void rtl92e_dm_restore_state(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
- u32 reg_ratr = priv->rate_adaptive.last_ratr;
- u32 ratr_value;
-
- if (!priv->up)
- return;
-
- if (priv->rate_adaptive.rate_adaptive_disabled)
- return;
- if (priv->rtllib->mode != WIRELESS_MODE_N_24G)
- return;
- ratr_value = reg_ratr;
- ratr_value &= ~(RATE_ALL_OFDM_2SS);
- rtl92e_writel(dev, RATR0, ratr_value);
- rtl92e_writeb(dev, UFWP, 1);
- if (priv->tx_pwr_tracking_init && priv->btxpower_tracking)
- _rtl92e_dm_tx_power_reset_recovery(dev);
-
- _rtl92e_dm_bb_initialgain_restore(dev);
-}
-
-static void _rtl92e_dm_bb_initialgain_restore(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
- u32 bit_mask = 0x7f;
-
- if (dm_digtable.dig_algorithm == DIG_ALGO_BY_RSSI)
- return;
-
- rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8);
- rtl92e_set_bb_reg(dev, rOFDM0_XAAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xaagccore1);
- rtl92e_set_bb_reg(dev, rOFDM0_XBAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xbagccore1);
- rtl92e_set_bb_reg(dev, rOFDM0_XCAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xcagccore1);
- rtl92e_set_bb_reg(dev, rOFDM0_XDAGCCore1, bit_mask,
- (u32)priv->initgain_backup.xdagccore1);
- bit_mask = bMaskByte2;
- rtl92e_set_bb_reg(dev, rCCK0_CCA, bit_mask,
- (u32)priv->initgain_backup.cca);
- rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x1);
-}
-
static void _rtl92e_dm_dig_init(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 9085a6454cbc..5ae2bf467158 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -178,7 +178,6 @@ void rtl92e_dm_txpower_tracking_wq(void *data);

void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14);

-void rtl92e_dm_restore_state(struct net_device *dev);
void rtl92e_dm_init_edca_turbo(struct net_device *dev);
void rtl92e_dm_rf_pathcheck_wq(void *data);
void rtl92e_dm_init_txpower_tracking(struct net_device *dev);
--
2.42.0