From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Tue, 7 May 2013 16:52:12 +0300 Subject: [ath9k-devel] [PATCH 3/5] ath10k: increase scan timeout 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") References: <1367839451-27517-1-git-send-email-michal.kazior@tieto.com> <1367839451-27517-4-git-send-email-michal.kazior@tieto.com> Message-ID: <87fvxy5243.fsf@kamboji.qca.qualcomm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Michal Kazior 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 > --- > 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