From: Christian Lamparter <chunkeey@googlemail.com>
To: Ignacy Gawedzki <i@lri.fr>
Cc: linux-wireless@vger.kernel.org
Subject: Re: A few questions about modifications in carl9170
Date: Tue, 28 Sep 2010 14:04:59 +0200 [thread overview]
Message-ID: <201009281404.59297.chunkeey@googlemail.com> (raw)
In-Reply-To: <20100928062720.GA31986@zenon.in.qult.net>
On Tuesday 28 September 2010 08:27:21 Ignacy Gawedzki wrote:
> On Tue, Sep 28, 2010 at 01:28:22AM +0200, thus spake Christian Lamparter:
> > On Tuesday 28 September 2010 01:01:37 Ignacy Gawedzki wrote:
> > > On Mon, Sep 27, 2010 at 07:36:21PM +0200, thus spake Christian Lamparter:
> > > > Sure, but why when you have a monotonic 40 MHz timer?
> > >
> > > Glad to know there is such a thing, then. =)
> > or was it 80Mhz? Nevermind, the docs are not very specific.
>
> AFAICT there's a constant in timer.h :
>
> #define AR9170_TICKS_PER_MICROSECOND 80
it is supposed to be 25 ns clock counter
> but there's also that clock_set() function that seems to be setting the clock
> up with different frequencies, but I supppose that's a different thing.
clock_set sets the CPUs clock, which has an effect on timer0-3 but not
on the clock source.
> > > I just tried the whole setup with the latest wireless-testing sources and your
> > > patch on the firmware. So far, so good, the problems I had previously are not
> > > showing up. I'm now just adapting your proposition to support rollover and
> > > conversion of the measurement to nanoseconds.
> > Rollover checks? Can you please tell me where you exactly see a potential
> > rollover problem in the proposal?
>
> Well, what I meant was to support the case when the clock ticks counter wraps
> around. Supposing there are 40e6 ticks per second, 2^32 ticks run out in less
> than 108 seconds, or maybe I'm missing something here.
yes, "MAC RESET" and carl9170_tx_janitor. A frame can't be delayed for more
than 6 second.
> I then need to consider the case where comp_tsf ends up not being larger
> than tsfl. Since > we're dealing with unsigned ints, in this case the
> simple difference would end up being something rather large. :/
Too much bad literature.
Give it a try, set comp_tsfl = 0x10 and super->s.tsfl = 0xfffff000.
then comp_tsfl - super->s.tsfl equals to 0x10 - 0xfffff000, which on
a 32-bit arch gives you 0x00001010 (+ carry/borrow)
Regards,
Chr
next prev parent reply other threads:[~2010-09-28 12:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 13:29 A few questions about modifications in carl9170 Ignacy Gawedzki
2010-09-27 15:37 ` Christian Lamparter
2010-09-27 16:05 ` Ignacy Gawedzki
2010-09-27 17:36 ` Christian Lamparter
2010-09-27 23:01 ` Ignacy Gawedzki
2010-09-27 23:23 ` Ignacy Gawedzki
2010-09-27 23:39 ` Christian Lamparter
2010-09-28 6:44 ` Ignacy Gawedzki
2010-09-27 23:28 ` Christian Lamparter
2010-09-28 6:27 ` Ignacy Gawedzki
2010-09-28 12:04 ` Christian Lamparter [this message]
2010-09-28 12:40 ` Ignacy Gawedzki
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=201009281404.59297.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=i@lri.fr \
--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).