Skip to contentSkip to conversation

staging: rtl8192e: Fix duplicated conditional branch

PATCH Superseded Alexander Kuleshov 3 participants 3 messages Jan 4, 2015 – Jan 5, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192e: Fix duplicated conditional branch

---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +1 -1
index 885315c..9010d0f 100644
@@ -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
#1 lore raw
Quoted 1 line · Alexander Kuleshov

[]

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;
#2 lore raw
Quoted 18 lines · Joe Perches
Quoted 1 line · Alexander Kuleshov

[]

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