linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: Marco Porsch <marco@cozybit.com>,
	mcgrof@qca.qualcomm.com, jouni@qca.qualcomm.com,
	vthiagar@qca.qualcomm.com, senthilb@qca.qualcomm.com,
	sleffler@google.com, linux-wireless@vger.kernel.org,
	devel@lists.open80211s.org, ath9k-devel@lists.ath9k.org
Subject: Re: [PATCHv2 1/3] mac80211: move mesh sync beacon handler into neighbour_update
Date: Wed, 20 Feb 2013 21:00:18 +0100	[thread overview]
Message-ID: <1361390418.8579.6.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAG6hwVM6FW7yDH12ngq3MMQMCkfyDwW_trrEn385m5SXirJ+Og@mail.gmail.com> (sfid-20130220_192632_697375_96735330)

On Wed, 2013-02-20 at 10:26 -0800, Thomas Pedersen wrote:
> On Wed, Feb 20, 2013 at 6:50 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Mon, 2013-02-18 at 17:08 +0100, Marco Porsch wrote:
> >
> >> +     /*
> >> +      * If available, calculate the time the beacon timestamp field was
> >> +      * received from the rx_status->mactime field. Otherwise get the
> >> +      * current TSF as approximation before entering rcu-read section.
> >> +      */
> >> +     if (ieee80211_have_rx_timestamp(rx_status))
> >> +             t_r = ieee80211_calculate_rx_timestamp(local, rx_status,
> >> +                                                    24 + 12 +
> >> +                                                    elems->total_len +
> >> +                                                    FCS_LEN,
> >> +                                                    24);
> >
> > That doesn't seem right -- it's calculating the timestamp at the end of
> > the frame, but you said you wanted the timestamp at the "timestamp
> > field" time, which is just 24 bytes into the frame.
> 
> [...]
> 
> >> -     if (ieee80211_have_rx_timestamp(rx_status))
> >> -             /* time when timestamp field was received */
> >> -             t_r = ieee80211_calculate_rx_timestamp(local, rx_status,
> >> -                                                    24 + 12 +
> >> -                                                    elems->total_len +
> >> -                                                    FCS_LEN,
> >> -                                                    24);
> >
> > I see this was already wrong ...
> 
> No it's OK. The API is actually
> ieee80211_calculate_rx_timestamp(local, status, len, offset).

Oops, indeed, my mistake.

johannes


      reply	other threads:[~2013-02-20 20:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 16:08 [PATCHv2 1/3] mac80211: move mesh sync beacon handler into neighbour_update Marco Porsch
2013-02-18 16:08 ` [PATCHv2 2/3] mac80211: mesh power save doze scheduling Marco Porsch
2013-02-18 16:41   ` Christian Lamparter
2013-02-20 15:01   ` Johannes Berg
2013-02-25 10:06     ` Marco Porsch
2013-02-26 20:52       ` Johannes Berg
2013-02-18 16:08 ` [PATCHv2 3/3] ath9k: mesh powersave support Marco Porsch
2013-02-20 14:50 ` [PATCHv2 1/3] mac80211: move mesh sync beacon handler into neighbour_update Johannes Berg
2013-02-20 18:26   ` Thomas Pedersen
2013-02-20 20:00     ` Johannes Berg [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=1361390418.8579.6.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=devel@lists.open80211s.org \
    --cc=jouni@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marco@cozybit.com \
    --cc=mcgrof@qca.qualcomm.com \
    --cc=senthilb@qca.qualcomm.com \
    --cc=sleffler@google.com \
    --cc=thomas@cozybit.com \
    --cc=vthiagar@qca.qualcomm.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 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).