Skip to contentSkip to conversation

BOUNCE [email protected]: Global taboo body match "/=[8-9a-f][0-9a-f]=[8-9a-f][0-9a-f]=[8-9a-f][0-9a-f]/i" at line 59

PATCH [email protected] 1 participant 1 message Feb 9, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from sipsolutions.net (cl-1649.ham-01.de.sixxs.net [IPv6:2001:6f8:900:670::2])

	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mail.netbsd.org (Postfix) with ESMTPS id E29E463B13B
	for <[email protected]>; Mon,  9 Feb 2009 09:49:50 +0000 (UTC)
Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <[email protected]>)
	id 1LWSlt-0006W4-4j
	for [email protected]; Mon, 09 Feb 2009 10:49:46 +0100

Subject: [RFA] RX flags
From: Johannes Berg <[email protected]>
To: radiotap <[email protected]>
Content-Type: multipart/mixed; boundary="=-lUysiMTCgz5FaPq+jp+v"
Date: Mon, 09 Feb 2009 10:49:42 +0100
Message-Id: <1234172982.4175.184.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
Mime-Version: 1.0
X-Mailer: Evolution 2.22.3.1

--=-lUysiMTCgz5FaPq+jp+v
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

This is a request for adoption of the following new radiotap features:

* a new flag in the "flags" field (field 1):
- bad FCS
* the new "RX flags" field (field 14), currently containing the following flag:
- bad PLCP

Rationale:

* The "bad FCS" flag is evidently useful when the driver knows that the FCS was bad but cannot get the FCS itself from the hardware, or when the FCS cannot be verified in software because of hardware decryption.
* The "bad PLCP" flag is useful to detect spurious non-802.11 transmissions that may be interfering with 802.11 operation and broken packets, if hardware is capable of passing such "frames" to the driver

I propose to make changes to radiotap as follows:

1) Add the "bad FCS" flag to the flags field (field 1) with the bit

    number 6, i.e. mask 0x40. [1]

2) Define the new RX flags field at field number 14, with the following definition:
- field contents: a single 16-bit integer
- field alignment: 2
- define bit 0 (mask 0x0001) to be reserved (it was defined by some implementations as "bad FCS" which is in the flags field)
- define bit 1 (mask 0x0002) of this field to mean "frame has bad PLCP"
- all other bits (mask 0xfffc) shall be reserved for future assignment

I have attached two patches implementing these changes in

* Linux for drivers using mac80211 (the generic 802.11 stack) and the libertas driver for Marvell hardware (no other driver uses these flags);

* wireshark, adding an option to dissect bit 14 as "FCS in header" for non-standard radiotap files created by some tools (some of the proposals above are already implemented in wireshark)

Barring objections, I will repost the normative changes on in two weeks time (Feb 23.) to be adopted on March 2, at which point I will make the changes to the radiotap.org website and post the Linux patch for inclusion.

johannes

=EF=BB=BF[1] =EF=BB=BFThis leaves one bit (0x80) in the flags which wiresha= rk interprets
as "short guard interval" (from 11n) which may be added in a later proposal

--=-lUysiMTCgz5FaPq+jp+v
Content-Disposition: attachment; filename=035-linux-radiotap-rxflags.patch
Content-Type: text/x-vhdl; name=035-linux-radiotap-rxflags.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

---
 drivers/net/wireless/libertas/radiotap.h |   10 ----------
 drivers/net/wireless/libertas/rx.c       |   12 ++----------
 include/net/ieee80211_radiotap.h         |    4 +++-
 net/mac80211/rx.c                        |    7 ++++---
 4 files changed, 9 insertions(+), 24 deletions(-)
drivers/net/wireless/libertas/radiotap.h +0 -10
@@ -33,22 +33,12 @@ struct rx_radiotap_hdr {
 	struct ieee80211_radiotap_header hdr;
 	u8 flags;
 	u8 rate;
-	u16 chan_freq;
-	u16 chan_flags;
-	u8 antenna;
 	u8 antsignal;
-	u16 rx_flags;
-#if 0
-	u8 pad[IEEE80211_RADIOTAP_HDRLEN - 18];
-#endif
 } __attribute__ ((packed));
 
 #define RX_RADIOTAP_PRESENT (			\
 	(1 << IEEE80211_RADIOTAP_FLAGS) |	\
 	(1 << IEEE80211_RADIOTAP_RATE) |	\
-	(1 << IEEE80211_RADIOTAP_CHANNEL) |	\
-	(1 << IEEE80211_RADIOTAP_ANTENNA) |	\
 	(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) |\
-	(1 << IEEE80211_RADIOTAP_RX_FLAGS) |	\
 	0)
 
include/net/ieee80211_radiotap.h +3 -1
@@ -230,8 +230,10 @@ enum ieee80211_radiotap_type {
 						 * 802.11 header and payload
 						 * (to 32-bit boundary)
 						 */
+#define IEEE80211_RADIOTAP_F_BADFCS	0x40	/* bad FCS */
+
 /* For IEEE80211_RADIOTAP_RX_FLAGS */
-#define IEEE80211_RADIOTAP_F_RX_BADFCS	0x0001	/* frame failed crc check */
+#define IEEE80211_RADIOTAP_F_RX_BADPLCP	0x0002	/* frame has bad PLCP */
 
 /* For IEEE80211_RADIOTAP_TX_FLAGS */
 #define IEEE80211_RADIOTAP_F_TX_FAIL	0x0001	/* failed due to excessive
drivers/net/wireless/libertas/rx.c +2 -10
@@ -351,19 +351,11 @@ static int process_rxed_802_11_packet(st
 	radiotap_hdr.hdr.it_pad = 0;
 	radiotap_hdr.hdr.it_len = cpu_to_le16 (sizeof(struct rx_radiotap_hdr));
 	radiotap_hdr.hdr.it_present = cpu_to_le32 (RX_RADIOTAP_PRESENT);
-	/* unknown values */
-	radiotap_hdr.flags = 0;
-	radiotap_hdr.chan_freq = 0;
-	radiotap_hdr.chan_flags = 0;
-	radiotap_hdr.antenna = 0;
-	/* known values */
+	if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
+		radiotap_hdr.flags |= IEEE80211_RADIOTAP_F_BADFCS;
 	radiotap_hdr.rate = convert_mv_rate_to_radiotap(prxpd->rx_rate);
 	/* XXX must check no carryout */
 	radiotap_hdr.antsignal = prxpd->snr + prxpd->nf;
-	radiotap_hdr.rx_flags = 0;
-	if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
-		radiotap_hdr.rx_flags |= IEEE80211_RADIOTAP_F_RX_BADFCS;
-	//memset(radiotap_hdr.pad, 0x11, IEEE80211_RADIOTAP_HDRLEN - 18);
 
 	/* chop the rxpd */
 	skb_pull(skb, sizeof(struct rxpd));
net/mac80211/rx.c +4 -3
@@ -142,6 +142,8 @@ ieee80211_add_rx_radiotap_header(struct 
 	/* IEEE80211_RADIOTAP_FLAGS */
 	if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)
 		*pos |= IEEE80211_RADIOTAP_F_FCS;
+	if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC))
+		*pos |= IEEE80211_RADIOTAP_F_BADFCS;
 	if (status->flag & RX_FLAG_SHORTPRE)
 		*pos |= IEEE80211_RADIOTAP_F_SHORTPRE;
 	pos++;
@@ -204,9 +206,8 @@ ieee80211_add_rx_radiotap_header(struct 
 	/* ensure 2 byte alignment for the 2 byte field as required */
 	if ((pos - (unsigned char *)rthdr) & 1)
 		pos++;
-	/* FIXME: when radiotap gets a 'bad PLCP' flag use it here */
-	if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC))
-		*(__le16 *)pos |= cpu_to_le16(IEEE80211_RADIOTAP_F_RX_BADFCS);
+	if (status->flag & RX_FLAG_FAILED_PLCP_CRC)
+		*(__le16 *)pos |= cpu_to_le16(IEEE80211_RADIOTAP_F_RX_BADPLCP);
 	pos += 2;
 }
 

--=-lUysiMTCgz5FaPq+jp+v
Content-Disposition: attachment; filename=wireshark-radiotap-rxflags.patch
Content-Type: text/x-vhdl; name=wireshark-radiotap-rxflags.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

---
 epan/dissectors/packet-radiotap.c |  131 +++++++++++++++++++++++++-------------
 1 file changed, 87 insertions(+), 44 deletions(-)
epan/dissectors/packet-radiotap.c +87 -44

244 lines not on this page · raw message

--=-lUysiMTCgz5FaPq+jp+v--