From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Michael Wu <flamingice@sourmilk.net>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: include MAC timestamp in radiotap header
Date: Fri, 23 Nov 2007 11:45:54 +0100 [thread overview]
Message-ID: <1195814754.4149.86.camel@johannes.berg> (raw)
This makes mac80211 include the low-level MAC timestamp
in the radiotap header.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/rx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- everything.orig/net/mac80211/rx.c 2007-11-22 23:33:46.058691568 +0100
+++ everything/net/mac80211/rx.c 2007-11-23 11:45:10.422091198 +0100
@@ -82,6 +82,7 @@ ieee80211_rx_monitor(struct ieee80211_lo
int needed_headroom = 0;
struct ieee80211_rtap_hdr {
struct ieee80211_radiotap_header hdr;
+ __le64 tsft;
u8 flags;
u8 rate;
__le16 chan_freq;
@@ -157,7 +158,8 @@ ieee80211_rx_monitor(struct ieee80211_lo
memset(rthdr, 0, sizeof(*rthdr));
rthdr->hdr.it_len = cpu_to_le16(sizeof(*rthdr));
rthdr->hdr.it_present =
- cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) |
+ cpu_to_le32((1 << IEEE80211_RADIOTAP_TSFT) |
+ (1 << IEEE80211_RADIOTAP_FLAGS) |
(1 << IEEE80211_RADIOTAP_RATE) |
(1 << IEEE80211_RADIOTAP_CHANNEL) |
(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) |
@@ -165,6 +167,8 @@ ieee80211_rx_monitor(struct ieee80211_lo
rthdr->flags = local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS ?
IEEE80211_RADIOTAP_F_FCS : 0;
+ rthdr->tsft = cpu_to_le64(status->mactime);
+
/* FIXME: when radiotap gets a 'bad PLCP' flag use it here */
rthdr->rx_flags = 0;
if (status->flag &
next reply other threads:[~2007-11-23 12:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-23 10:45 Johannes Berg [this message]
2007-11-24 5:21 ` [PATCH] mac80211: include MAC timestamp in radiotap header Michael Wu
2007-11-24 8:34 ` Johannes Berg
2007-11-24 9:27 ` Mattias Nissler
2007-11-24 9:36 ` bruno randolf
2007-11-24 13:38 ` Mattias Nissler
2007-11-25 6:21 ` Kalle Valo
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=1195814754.4149.86.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=flamingice@sourmilk.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).