On Wed, Feb 20, 2013 at 6:50 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html