diff options
author | Mateusz Kulikowski <mateusz.kulikowski@gmail.com> | 2015-06-08 23:23:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-12 17:13:27 -0700 |
commit | 32215eaa6e395c91cb0191553f14eb0abb69dc68 (patch) | |
tree | b79e2c4c937f120d24eb8085a751db7abf531868 /drivers/staging/rtl8192e | |
parent | 67ba748c03bc2103df090b1413661d77c8334ea4 (diff) | |
download | linux-32215eaa6e395c91cb0191553f14eb0abb69dc68.tar.bz2 |
staging: rtl8192e: Remove dead code: dig_t::dbg_mode, drx_path_sel::DbgMode
dig_t::dbg_mode and drx_path_sel::DbgMode are initialized to one value and
checked only once in code.This patch throws them away, and deletes
always-true conditions.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 25 |
2 files changed, 2 insertions, 31 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index d2734520a5e3..8532e0c21e75 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -1308,7 +1308,6 @@ static void dm_dig_init(struct net_device *dev) dm_digtable.dig_algorithm = DIG_ALGO_BY_RSSI; - dm_digtable.dbg_mode = DM_DBG_OFF; dm_digtable.dig_algorithm_switch = 0; dm_digtable.dig_state = DM_STA_DIG_MAX; @@ -1388,8 +1387,7 @@ static void dm_ctrl_initgain_byrssi_by_driverrssi( dm_digtable.CurSTAConnectState = DIG_STA_DISCONNECT; - if (dm_digtable.dbg_mode == DM_DBG_OFF) - dm_digtable.rssi_val = priv->undecorated_smoothed_pwdb; + dm_digtable.rssi_val = priv->undecorated_smoothed_pwdb; dm_initial_gain(dev); dm_pd_th(dev); dm_cs_ratio(dev); @@ -1946,7 +1944,6 @@ static void dm_init_rxpath_selection(struct net_device *dev) DM_RxPathSelTable.cck_method = CCK_Rx_Version_2; else DM_RxPathSelTable.cck_method = CCK_Rx_Version_1; - DM_RxPathSelTable.DbgMode = DM_DBG_OFF; DM_RxPathSelTable.disabledRF = 0; for (i = 0; i < 4; i++) { DM_RxPathSelTable.rf_rssi[i] = 50; @@ -1989,8 +1986,7 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev) DM_RxPathSelTable.cck_method = CCK_Rx_Version_2; for (i = 0; i < RF90_PATH_MAX; i++) { - if (!DM_RxPathSelTable.DbgMode) - DM_RxPathSelTable.rf_rssi[i] = priv->stats.rx_rssi_percentage[i]; + DM_RxPathSelTable.rf_rssi[i] = priv->stats.rx_rssi_percentage[i]; if (priv->brfpath_rxenable[i]) { rf_num++; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h index ae2034e760d5..b037451c3ada 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h @@ -87,7 +87,6 @@ struct dig_t { u8 dig_enable_flag; u8 dig_algorithm; - u8 dbg_mode; u8 dig_algorithm_switch; long rssi_low_thresh; @@ -130,23 +129,6 @@ enum dm_ratr_sta { DM_RATR_STA_MAX }; -enum dm_dig_op_sta { - DIG_TYPE_THRESH_HIGH = 0, - DIG_TYPE_THRESH_LOW = 1, - DIG_TYPE_THRESH_HIGHPWR_HIGH = 2, - DIG_TYPE_THRESH_HIGHPWR_LOW = 3, - DIG_TYPE_DBG_MODE = 4, - DIG_TYPE_RSSI = 5, - DIG_TYPE_ALGORITHM = 6, - DIG_TYPE_BACKOFF = 7, - DIG_TYPE_PWDB_FACTOR = 8, - DIG_TYPE_RX_GAIN_MIN = 9, - DIG_TYPE_RX_GAIN_MAX = 10, - DIG_TYPE_ENABLE = 20, - DIG_TYPE_DISABLE = 30, - DIG_OP_TYPE_MAX -}; - enum dm_dig_alg { DIG_ALGO_BY_FALSE_ALARM = 0, DIG_ALGO_BY_RSSI = 1, @@ -180,7 +162,6 @@ enum dm_dig_cs_ratio { struct drx_path_sel { u8 Enable; - u8 DbgMode; u8 cck_method; u8 cck_Rx_path; @@ -201,12 +182,6 @@ enum dm_cck_rx_path_method { }; -enum dm_dbg { - DM_DBG_OFF = 0, - DM_DBG_ON = 1, - DM_DBG_MAX -}; - struct dcmd_txcmd { u32 Op; u32 Length; |