Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Gucea Doru <gucea.doru@gmail.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [question] TBTT value
Date: Mon, 21 Nov 2016 19:06:19 +0200	[thread overview]
Message-ID: <CANfLQrY3CdAZCfF0HYV-M3gr0Xf=cdTCTyCK3SGbgb_u4UxLZA@mail.gmail.com> (raw)

Hello, everyone

We looked at the beacon behavior [1] at the station side and we are
trying to understand the logic used for computing the nexttbtt -
Target Beacon Transmission Time - value [2]:

return (u32) tsf + divisor - offset;

What's the reason for taking only 32 bits from TSF - which is 64 bits
long -  and losing the upper 32 bits?

I noticed that the nexttbtt  value is later used for arming the
AR_NEXT_TBTT_TIMER [3] but there is no clear explanation related to
this hardware timer. What is the connection between this hardware
timer and TSF? My assumption is that, for triggering this timer, the
value from the timer is continuously compared with the TSF value but I
can't figure it out how a 32 bit value is compared with a 64 bit
value.

[1] http://lxr.free-electrons.com/source/drivers/net/wireless/ath/ath9k/common-beacon.c#L41
[2] http://lxr.free-electrons.com/source/drivers/net/wireless/ath/ath9k/common-beacon.c#L30
[3] http://lxr.free-electrons.com/source/drivers/net/wireless/ath/ath9k/hw.c?v=4.3#L2278

Thanks,
Doru

             reply	other threads:[~2016-11-21 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 17:06 Gucea Doru [this message]
2016-11-22  7:16 ` [ath9k-devel] [question] TBTT value Janusz Dziedzic
2016-11-26 13:18   ` Gucea Doru
2016-11-28  6:50     ` Janusz Dziedzic

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='CANfLQrY3CdAZCfF0HYV-M3gr0Xf=cdTCTyCK3SGbgb_u4UxLZA@mail.gmail.com' \
    --to=gucea.doru@gmail.com \
    --cc=ath9k-devel@lists.ath9k.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 read-only IMAP folder(s) and NNTP newsgroup(s).