From: Tim Gardner <timg@tpi.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
Nick Kossifidis <mickflemm@gmail.com>
Subject: Re: [PATCH] ath5k: ignore the return value of ath5k_hw_noise_floor_calibration
Date: Mon, 03 Nov 2008 12:27:39 -0700 [thread overview]
Message-ID: <490F50AB.6080502@tpi.com> (raw)
In-Reply-To: <490ED21A.9080508@openwrt.org>
Felix Fietkau wrote:
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
ACK
While I'm not sure I agree with your theory on why noise floor
calibration fails, this patch certainly cuts down on log noise without
introducing any adverse side effects.
rtg
--
Tim Gardner timg@tpi.com www.tpi.com
OR 503-601-0234 x102 MT 406-443-5357
next prev parent reply other threads:[~2008-11-03 19:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=490F50AB.6080502@tpi.com \
--to=timg@tpi.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mickflemm@gmail.com \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).