Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32215eaa authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman
Browse files

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: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 67ba748c
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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,7 +1387,6 @@ 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_initial_gain(dev);
	dm_pd_th(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,7 +1986,6 @@ 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];

		if (priv->brfpath_rxenable[i]) {
+0 −25
Original line number Diff line number Diff line
@@ -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;