On Wed, 2013-02-20 at 10:26 -0800, Thomas Pedersen wrote:
> On Wed, Feb 20, 2013 at 6:50 AM, Johannes Berg
> <[email protected]> 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

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to