* [PATCH] mac80211: include MAC timestamp in radiotap header
@ 2007-11-23 10:45 Johannes Berg
2007-11-24 5:21 ` Michael Wu
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2007-11-23 10:45 UTC (permalink / raw)
To: John Linville; +Cc: Michael Wu, linux-wireless
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 &
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] mac80211: include MAC timestamp in radiotap header
2007-11-23 10:45 [PATCH] mac80211: include MAC timestamp in radiotap header Johannes Berg
@ 2007-11-24 5:21 ` Michael Wu
2007-11-24 8:34 ` Johannes Berg
2007-11-25 6:21 ` Kalle Valo
0 siblings, 2 replies; 7+ messages in thread
From: Michael Wu @ 2007-11-24 5:21 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
On Friday 23 November 2007 05:45:54 Johannes Berg wrote:
> This makes mac80211 include the low-level MAC timestamp
> in the radiotap header.
>
No thanks. Not every driver supports reporting the timestamp and supporting
timestamp/no timestamp in the default radiotap rx code makes it not so simple
anymore.
-Michael Wu
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mac80211: include MAC timestamp in radiotap header
2007-11-24 5:21 ` Michael Wu
@ 2007-11-24 8:34 ` Johannes Berg
2007-11-24 9:27 ` Mattias Nissler
2007-11-25 6:21 ` Kalle Valo
1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2007-11-24 8:34 UTC (permalink / raw)
To: Michael Wu; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
On Sat, 2007-11-24 at 00:21 -0500, Michael Wu wrote:
> On Friday 23 November 2007 05:45:54 Johannes Berg wrote:
> > This makes mac80211 include the low-level MAC timestamp
> > in the radiotap header.
> >
> No thanks. Not every driver supports reporting the timestamp and supporting
> timestamp/no timestamp in the default radiotap rx code makes it not so simple
> anymore.
Uh, so how am I supposed to get the timestamp? Copy all the code into
b43 and make it generate the exact same radiotap header? That's pretty
crappy too.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mac80211: include MAC timestamp in radiotap header
2007-11-24 8:34 ` Johannes Berg
@ 2007-11-24 9:27 ` Mattias Nissler
2007-11-24 9:36 ` bruno randolf
0 siblings, 1 reply; 7+ messages in thread
From: Mattias Nissler @ 2007-11-24 9:27 UTC (permalink / raw)
To: Johannes Berg; +Cc: Michael Wu, John Linville, linux-wireless
On Sat, 2007-11-24 at 09:34 +0100, Johannes Berg wrote:
> On Sat, 2007-11-24 at 00:21 -0500, Michael Wu wrote:
> > On Friday 23 November 2007 05:45:54 Johannes Berg wrote:
> > > This makes mac80211 include the low-level MAC timestamp
> > > in the radiotap header.
> > >
> > No thanks. Not every driver supports reporting the timestamp and supporting
> > timestamp/no timestamp in the default radiotap rx code makes it not so simple
> > anymore.
>
> Uh, so how am I supposed to get the timestamp? Copy all the code into
> b43 and make it generate the exact same radiotap header? That's pretty
> crappy too.
On rt2x00, we've just added a facility that dumps information about all
frames received and transmitted at a very low level. We dump general
information about the frame, the tx/rx descriptors and the packet. Maybe
something similar would also be useful for b43?
Mattias
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mac80211: include MAC timestamp in radiotap header
2007-11-24 9:27 ` Mattias Nissler
@ 2007-11-24 9:36 ` bruno randolf
2007-11-24 13:38 ` Mattias Nissler
0 siblings, 1 reply; 7+ messages in thread
From: bruno randolf @ 2007-11-24 9:36 UTC (permalink / raw)
To: Mattias Nissler; +Cc: Johannes Berg, Michael Wu, John Linville, linux-wireless
On Saturday 24 November 2007 18:27:41 Mattias Nissler wrote:
> On Sat, 2007-11-24 at 09:34 +0100, Johannes Berg wrote:
> > On Sat, 2007-11-24 at 00:21 -0500, Michael Wu wrote:
> > > On Friday 23 November 2007 05:45:54 Johannes Berg wrote:
> > > > This makes mac80211 include the low-level MAC timestamp
> > > > in the radiotap header.
> > >
> > > No thanks. Not every driver supports reporting the timestamp and
> > > supporting timestamp/no timestamp in the default radiotap rx code makes
> > > it not so simple anymore.
> >
> > Uh, so how am I supposed to get the timestamp? Copy all the code into
> > b43 and make it generate the exact same radiotap header? That's pretty
> > crappy too.
>
> On rt2x00, we've just added a facility that dumps information about all
> frames received and transmitted at a very low level. We dump general
> information about the frame, the tx/rx descriptors and the packet. Maybe
> something similar would also be useful for b43?
that's not a solution if you want them per packet in the radiotap header.
kismet & wireshark use them as well as other applications.
bruno
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mac80211: include MAC timestamp in radiotap header
2007-11-24 9:36 ` bruno randolf
@ 2007-11-24 13:38 ` Mattias Nissler
0 siblings, 0 replies; 7+ messages in thread
From: Mattias Nissler @ 2007-11-24 13:38 UTC (permalink / raw)
To: bruno randolf; +Cc: Johannes Berg, Michael Wu, John Linville, linux-wireless
On Sat, 2007-11-24 at 18:36 +0900, bruno randolf wrote:
> On Saturday 24 November 2007 18:27:41 Mattias Nissler wrote:
> > On Sat, 2007-11-24 at 09:34 +0100, Johannes Berg wrote:
> > > On Sat, 2007-11-24 at 00:21 -0500, Michael Wu wrote:
> > > > On Friday 23 November 2007 05:45:54 Johannes Berg wrote:
> > > > > This makes mac80211 include the low-level MAC timestamp
> > > > > in the radiotap header.
> > > >
> > > > No thanks. Not every driver supports reporting the timestamp and
> > > > supporting timestamp/no timestamp in the default radiotap rx code makes
> > > > it not so simple anymore.
> > >
> > > Uh, so how am I supposed to get the timestamp? Copy all the code into
> > > b43 and make it generate the exact same radiotap header? That's pretty
> > > crappy too.
> >
> > On rt2x00, we've just added a facility that dumps information about all
> > frames received and transmitted at a very low level. We dump general
> > information about the frame, the tx/rx descriptors and the packet. Maybe
> > something similar would also be useful for b43?
>
> that's not a solution if you want them per packet in the radiotap header.
> kismet & wireshark use them as well as other applications.
We actually dump per packet data that is read via debugfs and then fed
into wireshark. Helps debugging a lot :-)
Mattias
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mac80211: include MAC timestamp in radiotap header
2007-11-24 5:21 ` Michael Wu
2007-11-24 8:34 ` Johannes Berg
@ 2007-11-25 6:21 ` Kalle Valo
1 sibling, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2007-11-25 6:21 UTC (permalink / raw)
To: ext Michael Wu; +Cc: Johannes Berg, John Linville, linux-wireless
"ext Michael Wu" <flamingice@sourmilk.net> writes:
>> This makes mac80211 include the low-level MAC timestamp
>> in the radiotap header.
>>
> No thanks. Not every driver supports reporting the timestamp and supporting
> timestamp/no timestamp in the default radiotap rx code makes it not so simple
> anymore.
Having MAC timestamps is very useful when one is debugging low level
problems. I'm currently using madwifi for this but would prefer b43.
How many drivers do not support MAC timestamps? It would be really
shame to loose this functionality.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-11-25 6:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-23 10:45 [PATCH] mac80211: include MAC timestamp in radiotap header Johannes Berg
2007-11-24 5:21 ` 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
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).