]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/ath5k-ignore-calibration-return-value.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ath5k-ignore-calibration-return-value.patch
1 From 8b0162a3dc5c30e862b7a73da29e32de3170f5e4 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@openwrt.org>
3 Date: Mon, 3 Nov 2008 11:27:38 +0100
4 Subject: [PATCH] ath5k: ignore the return value of ath5k_hw_noise_floor_calibration
5 References: bnc#446541
6 Patch-mainline: 2.6.28-rc7
7
8 Noise floor calibration occasionally fails on Atheros hardware.
9 This is not fatal and can happen if there's simply too much
10 noise on the air. Ignoring the calibration error is the right
11 thing to do here, because when the error is ignored, the hardware
12 will still work, whereas if the error causes the driver to bail out
13 of a bigger configuration function and does not configure the tx
14 queues or the IMR (as is the case in reset.c), the hw no longer
15 works properly until the next reset.
16
17 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
18 Signed-off-by: John W. Linville <linville@tuxdriver.com>
19 Signed-off-by: Jiri Slaby <jslaby@suse.cz>
20 ---
21 drivers/net/wireless/ath5k/hw.c | 4 +---
22 drivers/net/wireless/ath5k/phy.c | 4 +---
23 2 files changed, 2 insertions(+), 6 deletions(-)
24
25 --- a/drivers/net/wireless/ath5k/hw.c
26 +++ b/drivers/net/wireless/ath5k/hw.c
27 @@ -1131,9 +1131,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
28 *
29 * XXX: Find an interval that's OK for all cards...
30 */
31 - ret = ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
32 - if (ret)
33 - return ret;
34 + ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
35
36 /*
37 * Reset queues and start beacon timers at the end of the reset routine
38 --- a/drivers/net/wireless/ath5k/phy.c
39 +++ b/drivers/net/wireless/ath5k/phy.c
40 @@ -2193,9 +2193,7 @@ static int ath5k_hw_rf5110_calibrate(str
41 return ret;
42 }
43
44 - ret = ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
45 - if (ret)
46 - return ret;
47 + ath5k_hw_noise_floor_calibration(ah, channel->center_freq);
48
49 /*
50 * Re-enable RX/TX and beacons