From 08f2df36168b6b687f116110b98bb9f233e6ab99 Mon Sep 17 00:00:00 2001 From: damien Date: Wed, 27 Aug 2008 10:01:18 +0000 Subject: [PATCH] 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@ --- sys/dev/ic/ath.c | 3 ++- sys/net80211/ieee80211_radiotap.h | 3 ++- 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_ */ -- 2.20.1