Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 3/5] ath10k: increase scan timeout
Date: Tue, 7 May 2013 16:52:12 +0300	[thread overview]
Message-ID: <87fvxy5243.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1367839451-27517-4-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 6 May 2013 13:24:09 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> We can't use the max scan time as the timeout
> itself. We must account for various overheads (ie.
> command/event processing).
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 3a27f35..df57772 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -1481,8 +1481,10 @@ static int ath10k_start_scan(struct ath10k *ar,
>  	/* the scan can complete earlier, before we even
>  	 * start the timer. in that case the timer handler
>  	 * checks ar->scan.in_progress and bails out if its
> -	 * false. */
> -	mod_timer(&ar->scan.timeout, jiffies + (arg->max_scan_time*HZ)/1000);
> +	 * false. Add a 200ms margin to account event/command
> +	 * processing. */
> +	mod_timer(&ar->scan.timeout, jiffies +
> +		  ((arg->max_scan_time+200)*HZ)/1000);

This patch is ok (no need to resend), but this code could use
msecs_to_jiffies().

-- 
Kalle Valo

  reply	other threads:[~2013-05-07 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06 11:24 [ath9k-devel] [PATCH 0/5] ath10k: scan/roc fixes Michal Kazior
2013-05-06 11:24 ` [ath9k-devel] [PATCH 1/5] ath10k: use data_lock to protect {scan, rx}_channel Michal Kazior
2013-05-06 11:24 ` [ath9k-devel] [PATCH 2/5] ath10k: simplify scan event locking Michal Kazior
2013-05-06 11:24 ` [ath9k-devel] [PATCH 3/5] ath10k: increase scan timeout Michal Kazior
2013-05-07 13:52   ` Kalle Valo [this message]
2013-05-06 11:24 ` [ath9k-devel] [PATCH 4/5] ath10k: wait for remain on channel chan switch Michal Kazior
2013-05-06 11:24 ` [ath9k-devel] [PATCH 5/5] ath10k: abort scan if start completion never came Michal Kazior
2013-05-07 13:53 ` [ath9k-devel] [PATCH 0/5] ath10k: scan/roc fixes 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=87fvxy5243.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath9k-devel@lists.ath9k.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