radiotap.netbsd.org archive mirror
 help / color / mirror / Atom feed
From: Wojciech Dubowik <Wojciech.Dubowik-ASv44eHyqLVBDgjK7y7TUQ@public.gmane.org>
To: radiotap-sUITvd46vNxg9hUCZPvPmw@public.gmane.org
Subject: [RFC] MCS Field: STBC flag
Date: Tue, 1 Nov 2011 09:34:10 +0000 (UTC)	[thread overview]
Message-ID: <loom.20111101T094927-66@post.gmane.org> (raw)

Hello,
  I have been doing some testing with STBC and I have noticed that it's not
available in radiotap fields.
We could add new flag to MCS field to support it:

...
0x08 | HT format
0x10 | FEC type 
0x20 | STBC

...
0x08 | HT format - 0: mixed, 1: greenfield
0x10 | FEC type - 0: BCC, 1: LDPC 
0x20 | STBC - 0: OFF, 1: ON

I have done already implementation for wireshark, mac80211 and ath9k. I haven't
tested it for other cards since I don't have one which supports STBC.

Here is proposed patch for radiotap in mac80211. I could send the rest if this
new flag definition is ok.

Wojtek

---
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index 7e2c4d4..31837d7 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -260,6 +260,7 @@ enum ieee80211_radiotap_type {
 #define IEEE80211_RADIOTAP_MCS_HAVE_GI		0x04
 #define IEEE80211_RADIOTAP_MCS_HAVE_FMT		0x08
 #define IEEE80211_RADIOTAP_MCS_HAVE_FEC		0x10
+#define IEEE80211_RADIOTAP_MCS_HAVE_STBC	0x20
 
 #define IEEE80211_RADIOTAP_MCS_BW_MASK		0x03
 #define		IEEE80211_RADIOTAP_MCS_BW_20	0
@@ -269,7 +270,7 @@ enum ieee80211_radiotap_type {
 #define IEEE80211_RADIOTAP_MCS_SGI		0x04
 #define IEEE80211_RADIOTAP_MCS_FMT_GF		0x08
 #define IEEE80211_RADIOTAP_MCS_FEC_LDPC		0x10
-
+#define IEEE80211_RADIOTAP_MCS_STBC		0x20
 
 /* Ugly macro to convert literal channel numbers into their mhz equivalents
  * There are certianly some conditions that will break this (like feeding it '30')
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index dc1123a..0207210 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -671,6 +671,7 @@ enum mac80211_rx_flags {
 	RX_FLAG_HT		= 1<<9,
 	RX_FLAG_40MHZ		= 1<<10,
 	RX_FLAG_SHORT_GI	= 1<<11,
+	RX_FLAG_STBC		= 1<<12,
 };
 
 /**
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b867bd5..358dbfe 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -199,12 +199,15 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local
*local,
 		rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS);
 		*pos++ = IEEE80211_RADIOTAP_MCS_HAVE_MCS |
 			 IEEE80211_RADIOTAP_MCS_HAVE_GI |
-			 IEEE80211_RADIOTAP_MCS_HAVE_BW;
+			 IEEE80211_RADIOTAP_MCS_HAVE_BW |
+			 IEEE80211_RADIOTAP_MCS_HAVE_STBC;
 		*pos = 0;
 		if (status->flag & RX_FLAG_SHORT_GI)
 			*pos |= IEEE80211_RADIOTAP_MCS_SGI;
 		if (status->flag & RX_FLAG_40MHZ)
 			*pos |= IEEE80211_RADIOTAP_MCS_BW_40;
+		if (status->flag & RX_FLAG_STBC)
+			*pos |= IEEE80211_RADIOTAP_MCS_STBC;
 		pos++;
 		*pos++ = status->rate_idx;
 	}
---

             reply	other threads:[~2011-11-01  9:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01  9:34 Wojciech Dubowik [this message]
     [not found] ` <loom.20111101T094927-66-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2011-11-02  8:44   ` [RFC] MCS Field: STBC flag Johannes Berg

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=loom.20111101T094927-66@post.gmane.org \
    --to=wojciech.dubowik-asv44ehyqlvbdgjk7y7tuq@public.gmane.org \
    --cc=radiotap-sUITvd46vNxg9hUCZPvPmw@public.gmane.org \
    /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).