radiotap.netbsd.org archive mirror
 help / color / mirror / Atom feed
* [RFC] MCS Field: STBC flag
@ 2011-11-01  9:34 Wojciech Dubowik
       [not found] ` <loom.20111101T094927-66-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Wojciech Dubowik @ 2011-11-01  9:34 UTC (permalink / raw)
  To: radiotap-sUITvd46vNxg9hUCZPvPmw

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;
 	}
---

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] MCS Field: STBC flag
       [not found] ` <loom.20111101T094927-66-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
@ 2011-11-02  8:44   ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2011-11-02  8:44 UTC (permalink / raw)
  To: Wojciech Dubowik; +Cc: radiotap-sUITvd46vNxg9hUCZPvPmw

On Tue, 2011-11-01 at 09:34 +0000, Wojciech Dubowik wrote:
> 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:

That seems useful.

I think even for new bits we should follow the regular process, see
http://radiotap.org/Standardisation (and examples on this list of
course)

johannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-02  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-01  9:34 [RFC] MCS Field: STBC flag Wojciech Dubowik
     [not found] ` <loom.20111101T094927-66-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2011-11-02  8:44   ` Johannes Berg

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).