linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: "Björn Smedman" <bjorn.smedman@venatech.se>
Cc: Pavel Roskin <proski@gnu.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] ath9k: fix TSF after reset on AR913x
Date: Thu, 01 Jul 2010 02:47:36 +0200	[thread overview]
Message-ID: <4C2BE5A8.9030003@openwrt.org> (raw)
In-Reply-To: <AANLkTim8NrVZfcJGi4NK_OhXBxEY0Lw9fdg1bcbzDU0X@mail.gmail.com>

On 2010-07-01 12:38 AM, Björn Smedman wrote:
> On Thu, Jul 1, 2010 at 12:02 AM, Pavel Roskin <proski@gnu.org> wrote:
>> On Wed, 2010-06-30 at 02:07 +0200, Felix Fietkau wrote:
>>> +     if (AR_SREV_9100(ah) && (ath9k_hw_gettsf64(ah) < tsf)) {
>>> +             tsf += 1500;
>>
>> Why 1500?  Is it a magic number?  It is a result of some measurement?
>> Can we have a define for it, please?
> 
> Does the TSF always start counting from zero when the chip is reset?
> In that case maybe the "magic number" can be replaced with the return
> value from ath9k_hw_gettsf64() (which we call anyway).
No, the TSF value at this point is not accurate. It differs
semi-randomly by a few orders of magnitude from the time measured by the
CPU timer. The value I put in above is just an approximation, but since
making it completely accurate is impossible, I figured this is good
enough, especially since the value will most likely not deviate much
from what I've measured here.

- Felix

  reply	other threads:[~2010-07-01  0:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30  0:07 [PATCH] ath9k: fix TSF after reset on AR913x Felix Fietkau
2010-06-30 22:02 ` Pavel Roskin
2010-06-30 22:38   ` Björn Smedman
2010-07-01  0:47     ` Felix Fietkau [this message]
2010-07-01  6:39       ` Johannes Berg
2010-07-01  7:51         ` Felix Fietkau
2010-07-01  0:45   ` Felix Fietkau

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=4C2BE5A8.9030003@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=bjorn.smedman@venatech.se \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=proski@gnu.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).