Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ignacy Gawedzki <i@lri.fr>
To: linux-wireless@vger.kernel.org
Subject: Re: About clocks in the carl9170 firmware
Date: Wed, 5 Jan 2011 15:19:44 +0100	[thread overview]
Message-ID: <20110105141944.GA8013@zenon.in.qult.net> (raw)
In-Reply-To: <AANLkTi=WQwx5hOxeGweFOLVtpss54NZsRyV0tkBqf4CP@mail.gmail.com>

On Wed, Jan 05, 2011 at 08:57:14AM -0500, thus spake Brian Prodoehl:
> On Wed, Jan 5, 2011 at 6:13 AM, Ignacy Gawedzki <i@lri.fr> wrote:
> > Hi,
> >
> > A few months ago, Christian Lamparter suggested to me the use of
> > get_clock_counter() in the carl9170 firmware code for time measurement
> > purposes.
> >
> > I just got back to that, after a long period of other things to do instead.
> >
> > According to the results of a few tests I've been running yesterday, it looks
> > that this clock is 44Mhz, not 40Mhz, nor 80Mhz.
> 
> I have seen the same thing.  In 802.11g mode, that clock counter runs
> at 44MHz.  There are rumors that this changes with operating mode.
> Its easy to believe that it would run at 80MHz in turbo (40MHz
> channel-width) mode.  But, I haven't tested that, and can only say
> that I've seen that clock counter run at 44MHz as well.

That would make sense indeed.

> 
> > According to Christian, the clock source, as accessed through
> > get_clock_counter() is stable and does not depend on calls to clock_set().
> > This is further corroborated by the definition and use of the
> > AR9170_TICKS_PER_MICROSECOND *constant* in timer.h.  But still, how comes that
> > constant is 80 then?
> 
> Does anything in the firmware really rely on that constant being
> right?  I'm more familiar with ar9170usb and the open firmware for
> that, where the constants were also wrong, but nothing used them
> except for some delay functions, for which the accuracy wasn't
> critical.

AFAICT, the delay functions are used during initialization and AGC
calibration.  I have no idea whether the accuracy is critical or not in these
parts.

In any case, there is room for developing an accurate clock, assuming that it
always changes on request of the firmware and never by itself.  I'll give it a
try and test whether it breaks everything or not. =)

-- 
I used to have a sig, but I've stopped smoking now.

      reply	other threads:[~2011-01-05 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 11:13 About clocks in the carl9170 firmware Ignacy Gawedzki
2011-01-05 13:57 ` Brian Prodoehl
2011-01-05 14:19   ` Ignacy Gawedzki [this message]

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=20110105141944.GA8013@zenon.in.qult.net \
    --to=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