mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 13:57:54 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fda7398845
commit
8e6bbbdaa7
@@ -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)
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
struct dig_t {
|
||||
u8 dig_algorithm_switch;
|
||||
|
||||
long rssi_low_thresh;
|
||||
long rssi_high_thresh;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user