linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: ignore the return value of ath5k_hw_noise_floor_calibration
@ 2008-11-03 10:27 Felix Fietkau
  2008-11-03 19:27 ` Tim Gardner
  0 siblings, 1 reply; 5+ messages in thread
From: Felix Fietkau @ 2008-11-03 10:27 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W. Linville, Nick Kossifidis

Noise floor calibration occasionally fails on Atheros hardware.
This is not fatal and can happen if there's simply too much 
noise on the air. Ignoring the calibration error is the right
thing to do here, because when the error is ignored, the hardware
will still work, whereas if the error causes the driver to bail out
of a bigger configuration function and does not configure the tx
queues or the IMR (as is the case in reset.c), the hw no longer
works properly until the next reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

diff --git a/drivers/net/wireless/ath5k/phy.c b/drivers/net/wireless/ath5k/phy.c
--- a/drivers/net/wireless/ath5k/phy.c
+++ b/drivers/net/wireless/ath5k/phy.c
@@ -2196,9 +2196,7 @@ static int ath5k_hw_rf5110_calibrate(struct ath5k_hw *ah,
 		return ret;
 	}
 
-	ret = ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
-	if (ret)
-		return ret;
+	ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
 
 	/*
 	 * Re-enable RX/TX and beacons
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c
--- a/drivers/net/wireless/ath5k/reset.c
+++ b/drivers/net/wireless/ath5k/reset.c
@@ -842,9 +842,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
 	 *
 	 * XXX: Find an interval that's OK for all cards...
 	 */
-	ret = ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
-	if (ret)
-		return ret;
+	ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
 
 	/*
 	 * Reset queues and start beacon timers at the end of the reset routine

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] ath5k: ignore the return value of ath5k_hw_noise_floor_calibration
@ 2009-01-10  1:21 darklight
  2009-01-10 23:15 ` Bob Copeland
  2009-01-13 19:43 ` John W. Linville
  0 siblings, 2 replies; 5+ messages in thread
From: darklight @ 2009-01-10  1:21 UTC (permalink / raw)
  To: linux-wireless

hi,

some weeks ago Felix Fietkau posted a patch for the "ath5k phy0:
unsupported jumbo" warnings (see here:
http://article.gmane.org/gmane.linux.kernel.wireless.general/23430 )
I just had the same problem - after applying Felix' patch the warnings
went down from 50-100 per day to 5.

as a quick note: I did not just apply this patch, instead I replaced
Linus' upstream wireless stack with the one from wireless-testing
(using kernel version 2.6.28)

I hope Felix' patch can get into Linus' kernel (mainline) so other
users can profit from this

oh and just to make sure this patch will get accepted:
ath5k_hw_noise_floor_calibration was called without verifying it's
result in ath5k_hw_rf511x_calibrate -> so in theory this patch is
clean an get into mainline (just to be fair: I must admit I'm not
familiar with the mac80211 nor with ath5k code)

regards,
Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-13 19:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03 10:27 [PATCH] ath5k: ignore the return value of ath5k_hw_noise_floor_calibration Felix Fietkau
2008-11-03 19:27 ` Tim Gardner
  -- strict thread matches above, loose matches on Subject: below --
2009-01-10  1:21 darklight
2009-01-10 23:15 ` Bob Copeland
2009-01-13 19:43 ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).