All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Pedersen <thomas@cozybit.com>
To: Johannes Berg <johannes@sipsolutions.net>
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 10:26:11 -0800	[thread overview]
Message-ID: <CAG6hwVM6FW7yDH12ngq3MMQMCkfyDwW_trrEn385m5SXirJ+Og@mail.gmail.com> (raw)
In-Reply-To: <1361371850.8629.24.camel@jlt4.sipsolutions.net>

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).

-- 
Thomas

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Pedersen <thomas@cozybit.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCHv2 1/3] mac80211: move mesh sync beacon handler into neighbour_update
Date: Wed, 20 Feb 2013 10:26:11 -0800	[thread overview]
Message-ID: <CAG6hwVM6FW7yDH12ngq3MMQMCkfyDwW_trrEn385m5SXirJ+Og@mail.gmail.com> (raw)
In-Reply-To: <1361371850.8629.24.camel@jlt4.sipsolutions.net>

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).

-- 
Thomas

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

Thread overview: 20+ 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 ` [ath9k-devel] " Marco Porsch
2013-02-18 16:08 ` [PATCHv2 2/3] mac80211: mesh power save doze scheduling Marco Porsch
2013-02-18 16:08   ` [ath9k-devel] " Marco Porsch
2013-02-18 16:41   ` Christian Lamparter
2013-02-18 16:41     ` [ath9k-devel] " Christian Lamparter
2013-02-20 15:01   ` Johannes Berg
2013-02-20 15:01     ` [ath9k-devel] " Johannes Berg
2013-02-25 10:06     ` Marco Porsch
2013-02-25 10:06       ` [ath9k-devel] " Marco Porsch
2013-02-26 20:52       ` Johannes Berg
2013-02-26 20:52         ` [ath9k-devel] " Johannes Berg
2013-02-18 16:08 ` [PATCHv2 3/3] ath9k: mesh powersave support Marco Porsch
2013-02-18 16:08   ` [ath9k-devel] " Marco Porsch
2013-02-20 14:50 ` [PATCHv2 1/3] mac80211: move mesh sync beacon handler into neighbour_update Johannes Berg
2013-02-20 14:50   ` [ath9k-devel] " Johannes Berg
2013-02-20 18:26   ` Thomas Pedersen [this message]
2013-02-20 18:26     ` Thomas Pedersen
2013-02-20 20:00     ` Johannes Berg
2013-02-20 20:00       ` [ath9k-devel] " Johannes Berg

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=CAG6hwVM6FW7yDH12ngq3MMQMCkfyDwW_trrEn385m5SXirJ+Og@mail.gmail.com \
    --to=thomas@cozybit.com \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=devel@lists.open80211s.org \
    --cc=johannes@sipsolutions.net \
    --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=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 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.