From: Oleksij Rempel <linux@rempel-privat.de>
To: ath9k-devel@venema.h4ckr.net, dan.carpenter@oracle.com,
Sujith.Manoharan@atheros.com, kvalo@codeaurora.org,
linux-wireless@vger.kernel.org
Cc: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
Subject: Re: [ath9k-devel] [PATCH] ath9k_htc: do ani shortcalibratio if we got -ETIMEDOUT
Date: Fri, 14 Aug 2015 07:10:00 +0200 [thread overview]
Message-ID: <55CD7828.8020904@rempel-privat.de> (raw)
In-Reply-To: <1439490098-12479-1-git-send-email-linux@rempel-privat.de>
[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]
Opps wrong email address. I'll resend the patch
Am 13.08.2015 um 20:21 schrieb Oleksij Rempel:
> From: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
>
> current code will handle -ETIMEDOUT as success which is probalbly wrong.
>
> According to this comment I assume it is safe to handle -ETIMEDOUT as false:
> drivers/net/wireless/ath/ath9k/calib.c
> 290 /*
> 291 * We timed out waiting for the noisefloor to load, probably due to an
> 292 * in-progress rx. Simply return here and allow the load plenty of time
> 293 * to complete before the next calibration interval. We need to avoid
> 294 * trying to load -50 (which happens below) while the previous load is
> 295 * still in progress as this can cause rx deafness. Instead by returning
> 296 * here, the baseband nf cal will just be capped by our present
> 297 * noisefloor until the next calibration timer.
> 298 */
>
> Since no other error wariants are present, this patch is checking only
> for (ret <= 0).
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Oleksij Rempel <external.Oleksij.Rempel@de.bosch.com>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> index dab1323..172a9ff 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> @@ -794,8 +794,11 @@ void ath9k_htc_ani_work(struct work_struct *work)
> common->ani.longcal_timer = timestamp;
> }
>
> - /* Short calibration applies only while caldone is false */
> - if (!common->ani.caldone) {
> + /*
> + * Short calibration applies only while caldone
> + * is false or -ETIMEDOUT
> + */
> + if (common->ani.caldone <= 0) {
> if ((timestamp - common->ani.shortcal_timer) >=
> short_cal_interval) {
> shortcal = true;
> @@ -844,7 +847,11 @@ set_timer:
> */
> cal_interval = ATH_LONG_CALINTERVAL;
> cal_interval = min(cal_interval, (u32)ATH_ANI_POLLINTERVAL);
> - if (!common->ani.caldone)
> + /*
> + * Short calibration applies only while caldone
> + * is false or -ETIMEDOUT
> + */
> + if (common->ani.caldone <= 0)
> cal_interval = min(cal_interval, (u32)short_cal_interval);
>
> ieee80211_queue_delayed_work(common->hw, &priv->ani_work,
>
--
Regards,
Oleksij
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
next prev parent reply other threads:[~2015-08-14 5:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150811214324.GA30816@mwanda>
2015-08-13 18:21 ` [PATCH] ath9k_htc: do ani shortcalibratio if we got -ETIMEDOUT Oleksij Rempel
2015-08-14 5:10 ` Oleksij Rempel [this message]
2015-08-14 5:16 ` [PATCH v2] " Oleksij Rempel
2015-08-25 12:10 ` [v2] " Kalle Valo
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=55CD7828.8020904@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=Sujith.Manoharan@atheros.com \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=dan.carpenter@oracle.com \
--cc=external.Oleksij.Rempel@de.bosch.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.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).