Skip to contentSkip to conversation

remove dead code from bcm43xx-softmac

PATCH Superseded Larry Finger 3 participants 3 messages Sep 4, 2006 1 message not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove dead code from bcm43xx-softmac

John,

Please queue the following patch for wireless-2.6. It removes some code that was made obsolete by the wireless statistics changes of several weeks ago, but was not noticed them.

Thanks,

Larry

=================

This patch removes code that was make obsolete when the wireless statistics in bcm43xx-softmac were changed, but was overlooked at that time. The value of bcm->stats.link_quality computed here is never used.

drivers/net/wireless/bcm43xx/bcm43xx_main.c +1 -11
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
@@ -1549,17 +1549,7 @@ static void handle_irq_noise(struct bcm4
  		else
  			average -= 48;
 
-/* FIXME: This is wrong, but people want fancy stats. well... */
-bcm->stats.noise = average;
-		if (average > -65)
-			bcm->stats.link_quality = 0;
-		else if (average > -75)
-			bcm->stats.link_quality = 1;
-		else if (average > -85)
-			bcm->stats.link_quality = 2;
-		else
-			bcm->stats.link_quality = 3;
-//		dprintk(KERN_INFO PFX "Link Quality: %u (avg was %d)\n", bcm->stats.link_quality, average);
+		bcm->stats.noise = average;
  drop_calculation:
  		bcm->noisecalc.calculation_running = 0;
  		return;
#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · Larry Finger

John,

Please queue the following patch for wireless-2.6. It removes some code that was made obsolete by the wireless statistics changes of several weeks ago, but was not noticed them.

Thanks,

Quoted 7 lines

Larry

=================

This patch removes code that was make obsolete when the wireless statistics in bcm43xx-softmac were changed, but was overlooked at that time. The value of bcm->stats.link_quality computed here is never used.

So you can also remove the actual variable, no?

Quoted 26 lines

Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================

drivers/net/wireless/bcm43xx/bcm43xx_main.c +1 -11
@@ -1549,17 +1549,7 @@ static void handle_irq_noise(struct bcm4
  		else
  			average -= 48;
 
-/* FIXME: This is wrong, but people want fancy stats. well... */
-bcm->stats.noise = average;
-		if (average > -65)
-			bcm->stats.link_quality = 0;
-		else if (average > -75)
-			bcm->stats.link_quality = 1;
-		else if (average > -85)
-			bcm->stats.link_quality = 2;
-		else
-			bcm->stats.link_quality = 3;
-//		dprintk(KERN_INFO PFX "Link Quality: %u (avg was %d)\n", bcm->stats.link_quality, average);
+		bcm->stats.noise = average;
  drop_calculation:
  		bcm->noisecalc.calculation_running = 0;
  		return;
Signature · 1 line
Greetings Michael.
#3 lore raw
Quoted 7 lines · Michael Buesch
Quoted 6 lines · Larry Finger

John,

Please queue the following patch for wireless-2.6. It removes some code that was made obsolete by the wireless statistics changes of several weeks ago, but was not noticed them.

Thanks,

Quoted 7 lines
Quoted 5 lines

Larry

=================

This patch removes code that was make obsolete when the wireless statistics in bcm43xx-softmac were changed, but was overlooked at that time. The value of bcm->stats.link_quality computed here is never used.

So you can also remove the actual variable, no?

Yes.

Larry