summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-08-27 10:01:19 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-08-27 10:01:19 +0000
commit378556035f6497d6183a787fcda3acd73a1d4d7e (patch)
tree49de2f361246b908cc96defaaeb9e8a1320f577e
parent89faf5dff1932cbf69406d4487d7655e4c5a9c8b (diff)
add IEEE80211_RADIOTAP_F_FCS radiotap flag from NetBSD.
use it in drivers that leave the 802.11 FCS in frames passed to radiotap BPF. otherwise, userland has no way to know if FCS is included or not as it depends on drivers. this is required by some ports (aircrack). requested by dhill@
-rw-r--r--sys/dev/ic/ath.c3
-rw-r--r--sys/net80211/ieee80211_radiotap.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index fe5f04c1adb..565f0790ba1 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.75 2008/08/27 09:05:03 damien Exp $ */
+/* $OpenBSD: ath.c,v 1.76 2008/08/27 10:01:18 damien Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -2025,6 +2025,7 @@ ath_rx_proc(void *arg, int npending)
if (sc->sc_drvbpf) {
struct mbuf mb;
+ sc->sc_rxtap.wr_flags = IEEE80211_RADIOTAP_F_FCS;
sc->sc_rxtap.wr_rate =
sc->sc_hwmap[ds->ds_rxstat.rs_rate] &
IEEE80211_RATE_VAL;
diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h
index 938f74b8dad..72bb5264ed4 100644
--- a/sys/net80211/ieee80211_radiotap.h
+++ b/sys/net80211/ieee80211_radiotap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_radiotap.h,v 1.8 2006/06/23 21:34:15 reyk Exp $ */
+/* $OpenBSD: ieee80211_radiotap.h,v 1.9 2008/08/27 10:01:18 damien Exp $ */
/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.3 2004/04/05 22:13:21 sam Exp $ */
/* $NetBSD: ieee80211_radiotap.h,v 1.9 2004/06/06 04:13:28 dyoung Exp $ */
@@ -202,5 +202,6 @@ enum ieee80211_radiotap_type {
#define IEEE80211_RADIOTAP_F_FRAG 0x08 /* sent/received
* with fragmentation
*/
+#define IEEE80211_RADIOTAP_F_FCS 0x10 /* frame includes FCS */
#endif /* _NET_IF_IEEE80211RADIOTAP_H_ */