Michal Kazior <michal.kaz...@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.kaz...@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 _______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel