staging: rtl8192e: Fix duplicated conditional branch
PATCH 1/1 staging: rtl8192e: Fix duplicated conditional branch
Signed-off-by Alexander Kuleshov <[email protected]>
--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +1 -1
@@ -1661,7 +1661,7 @@ void dm_change_dynamic_initgain_thresh(struct net_device *dev, dm_digtable.rssi_low_thresh = dm_value; }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_HIGH ) { dm_digtable.rssi_high_power_highthresh = dm_value; - }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_HIGH ) { + }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_LOW ) { dm_digtable.rssi_high_power_highthresh = dm_value; }else if (dm_type ==DIG_TYPE_ENABLE ) { dm_digtable.dig_state =DM_STA_DIG_MAX ;
Signature · 1 line
2.2.1.202.g44ae4ee.dirty
Quoted 1 line · Alexander Kuleshov
Signed-off-by Alexander Kuleshov <[email protected]>
[]
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
Quoted 1 line
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +0
-0
[]
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c void dm_change_dynamic_initgain_thresh(struct net_device *dev, · line 1667
Quoted 9 lines
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +1
-1@@ -1661,7 +1661,7 @@ void dm_change_dynamic_initgain_thresh(struct net_device *dev, dm_digtable.rssi_low_thresh = dm_value; }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_HIGH ) { dm_digtable.rssi_high_power_highthresh = dm_value; - }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_HIGH ) { + }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_LOW ) { dm_digtable.rssi_high_power_highthresh = dm_value; }else if (dm_type ==DIG_TYPE_ENABLE ) { dm_digtable.dig_state =DM_STA_DIG_MAX ;
Presumably, this is a copy/paste error and should have both lines changed to HIGHPWR_LOW/high_power_lowthresh
else if (dm_type == DIG_TYPE_THRESH_HIGHPWR_LOW) dm_digtable.rssi_high_power_lowthresh = dm_value;
Quoted 18 lines · Joe Perches
Quoted 1 line · Alexander Kuleshov
Signed-off-by Alexander Kuleshov <[email protected]>[]
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
Quoted 1 line
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +0
-0[]
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c void dm_change_dynamic_initgain_thresh(struct net_device *dev, · line 1667
Quoted 9 lines
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +1
-1@@ -1661,7 +1661,7 @@ void dm_change_dynamic_initgain_thresh(struct net_device *dev, dm_digtable.rssi_low_thresh = dm_value; }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_HIGH ) { dm_digtable.rssi_high_power_highthresh = dm_value; - }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_HIGH ) { + }else if (dm_type ==DIG_TYPE_THRESH_HIGHPWR_LOW ) { dm_digtable.rssi_high_power_highthresh = dm_value; }else if (dm_type ==DIG_TYPE_ENABLE ) { dm_digtable.dig_state =DM_STA_DIG_MAX ;Presumably, this is a copy/paste error and should have both lines changed to HIGHPWR_LOW/high_power_lowthresh
Quoted 3 lines
else if (dm_type == DIG_TYPE_THRESH_HIGHPWR_LOW) dm_digtable.rssi_high_power_lowthresh = dm_value;
I have no idea what this should be, but this patch does not appear to be any improvement. Joe is probably correct.
Larry