All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Chadd <adrian@freebsd.org>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: ath9k-devel@lists.ath9k.org,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Bob Copeland <me@bobcopeland.com>
Subject: Re: [ath9k-devel] ath9k_htc and reported mactime
Date: Wed, 24 Oct 2012 16:33:46 -0700	[thread overview]
Message-ID: <CAJ-VmokGeCLY8pCpL5H0VgznXnB-ob1z_sPaSQUZn0PengSgow@mail.gmail.com> (raw)
In-Reply-To: <20121024220813.GB6723@shredder>

On 24 October 2012 15:08, Thomas Pedersen <thomas@cozybit.com> wrote:

>> Also, we should check to see whether the MAC is paying attention to
>> any beacon frames
>
> How? For mesh mode support we currently just reuse the WDS AP firmware vif
> opmode.
>
>> and updating _its_ timestamp using that beacon frame timer.  That's
>> one of the mesh-and-sta-and-ap-at-the-same-time problems - in
>> STA mode, the TSF gets fudged based on the AP TSF. In other modes this
>> doesn't necessarily hold.
>
> OK, but the TSF for AP shouldn't be automatically updated on other
> beacons, right?

Right but look at those AP macs, there's multiple overlapping TSFs there, right?

* Each MAC AP has an incrementing TSF;
* Multiple APs have different TSF spaces, they're not synchronised at all;
* There's one RX TSF namespace - if the vif is in AP mode then it's
free-running and not synchronising against any other TSF;
* Thus the above makes sense to me.

So far the beacon frames look correct and they're increasing; you're
not obviously synchronising TSF against anything.

Going back to the original question - you fetch TSF after you receive
the packet, and sometimes the TSF in the frame is greater than the TSF
read back by the ath9k TSF get method.
The ath9k_htc tsf read is just 'tsf = ath9k_hw_gettsf64(priv->ah);',
so it's doing direct register reads. That should be immediate, but
it's USB so it may take a while.

So hm, now you've made me open the ath9k_htc firmware source. I hate you.

Let me look.



Adrian

WARNING: multiple messages have this Message-ID (diff)
From: Adrian Chadd <adrian@freebsd.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] ath9k_htc and reported mactime
Date: Wed, 24 Oct 2012 16:33:46 -0700	[thread overview]
Message-ID: <CAJ-VmokGeCLY8pCpL5H0VgznXnB-ob1z_sPaSQUZn0PengSgow@mail.gmail.com> (raw)
In-Reply-To: <20121024220813.GB6723@shredder>

On 24 October 2012 15:08, Thomas Pedersen <thomas@cozybit.com> wrote:

>> Also, we should check to see whether the MAC is paying attention to
>> any beacon frames
>
> How? For mesh mode support we currently just reuse the WDS AP firmware vif
> opmode.
>
>> and updating _its_ timestamp using that beacon frame timer.  That's
>> one of the mesh-and-sta-and-ap-at-the-same-time problems - in
>> STA mode, the TSF gets fudged based on the AP TSF. In other modes this
>> doesn't necessarily hold.
>
> OK, but the TSF for AP shouldn't be automatically updated on other
> beacons, right?

Right but look at those AP macs, there's multiple overlapping TSFs there, right?

* Each MAC AP has an incrementing TSF;
* Multiple APs have different TSF spaces, they're not synchronised at all;
* There's one RX TSF namespace - if the vif is in AP mode then it's
free-running and not synchronising against any other TSF;
* Thus the above makes sense to me.

So far the beacon frames look correct and they're increasing; you're
not obviously synchronising TSF against anything.

Going back to the original question - you fetch TSF after you receive
the packet, and sometimes the TSF in the frame is greater than the TSF
read back by the ath9k TSF get method.
The ath9k_htc tsf read is just 'tsf = ath9k_hw_gettsf64(priv->ah);',
so it's doing direct register reads. That should be immediate, but
it's USB so it may take a while.

So hm, now you've made me open the ath9k_htc firmware source. I hate you.

Let me look.



Adrian

  reply	other threads:[~2012-10-24 23:33 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-21  2:32 [ath9k-devel] ath9k_htc and reported mactime Thomas Pedersen
2012-10-21  2:41 ` Thomas Pedersen
2012-10-21  2:41   ` [ath9k-devel] " Thomas Pedersen
2012-10-22 14:31 ` Adrian Chadd
2012-10-22 14:31   ` Adrian Chadd
2012-10-23 19:06   ` [ath9k-devel] Performance degradation when monitor interface is enabled Ali Abedi
2012-10-23 19:20     ` Adrian Chadd
2012-10-23 20:36       ` Ali Abedi
2012-10-23 20:51         ` Adrian Chadd
2012-10-25 19:46           ` Ali Abedi
2012-10-25 19:52             ` abhinav narain
2012-10-27 19:24             ` [ath9k-devel] Channel busy cycles Ali Abedi
2012-10-27 23:42               ` Adrian Chadd
2012-10-27 23:50                 ` Ali Abedi
2012-10-28  6:25                   ` Adrian Chadd
2012-10-28 13:59                     ` Ali Abedi
2012-10-28 18:40                       ` Adrian Chadd
     [not found]                         ` <508DADC6.9080309@mailservices.uwaterloo.ca>
2012-10-29  2:33                           ` Adrian Chadd
2012-10-29  3:49                             ` Wright, Brett
2012-10-29  3:54                               ` Adrian Chadd
     [not found]                                 ` <50907DD8.1030607@mailservices.uwaterloo.ca>
     [not found]                                   ` <CAJ-Vmo=E_iDMYO6sP7dVqfnNFTMR1xKT5Y4-7dDGL2EPYqt0cA@mail.gmail.com>
     [not found]                                     ` <509168B9.7000508@mailservices.uwaterloo.ca>
2012-10-31 18:54                                       ` Ali Abedi
     [not found]                                       ` <CAJ-Vmok=5kzx_5swJm1UOz=4U2vM0YgChGnxvVX45hdpm-=aCQ@mail.gmail.com>
     [not found]                                         ` <48EC4E8D43A28947B1AB2639FA97CDB90C0480BC@nasanexd02a.na.qualcomm.com>
     [not found]                                           ` <1938DD2280AE524AAB886A6036F7922A23476EE8@nasanexd02a.na.qualcomm.com>
     [not found]                                             ` <48EC4E8D43A28947B1AB2639FA97CDB90C0480E3@nasanexd02a.na.qualcomm.com>
     [not found]                                               ` <A61E02718FA45C4797F54E7EF4F2EC8F2384EFAF@nasanexd02a.na.qualcomm.com>
     [not found]                                                 ` <48EC4E8D43A28947B1AB2639FA97CDB90C048ECC@nasanexd02a.na.qualcomm.com>
2012-11-09 21:34                                                   ` [ath9k-devel] Fwd: FW: " Adrian Chadd
2012-11-11  5:02                                                     ` Ali Abedi
2012-11-11 16:10                                                       ` Adrian Chadd
2012-10-24 19:45   ` [ath9k-devel] ath9k_htc and reported mactime Thomas Pedersen
2012-10-24 19:45     ` Thomas Pedersen
2012-10-24 21:22     ` Adrian Chadd
2012-10-24 21:22       ` Adrian Chadd
2012-10-24 21:26       ` Adrian Chadd
2012-10-24 21:26         ` Adrian Chadd
2012-10-24 22:08         ` Thomas Pedersen
2012-10-24 22:08           ` Thomas Pedersen
2012-10-24 23:33           ` Adrian Chadd [this message]
2012-10-24 23:33             ` Adrian Chadd
2012-10-25  1:54             ` Adrian Chadd
2012-10-25  1:54               ` Adrian Chadd
2012-10-25  2:13               ` Adrian Chadd
2012-10-25  2:13                 ` Adrian Chadd
2012-10-25 20:42               ` Adrian Chadd
2012-10-25 20:42                 ` Adrian Chadd
2012-10-25 22:25                 ` Thomas Pedersen
2012-10-25 22:25                   ` Thomas Pedersen
2012-10-25 22:27                   ` Adrian Chadd
2012-10-25 22:27                     ` Adrian Chadd
2012-10-26  0:41                     ` Thomas Pedersen
2012-10-26  0:41                       ` Thomas Pedersen
2012-10-26  0:42                       ` Adrian Chadd
2012-10-26  0:42                         ` Adrian Chadd
2012-10-24 22:04       ` Thomas Pedersen
2012-10-24 22:04         ` Thomas Pedersen

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=CAJ-VmokGeCLY8pCpL5H0VgznXnB-ob1z_sPaSQUZn0PengSgow@mail.gmail.com \
    --to=adrian@freebsd.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.com \
    --cc=thomas@cozybit.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.