linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add STBC flag decoding for radiotap
@ 2012-01-23 14:27 Wojciech Dubowik
  2012-01-23 14:27 ` [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Wojciech Dubowik
  2012-01-23 14:27 ` [PATCH 2/2] ath9k: Add STBC flag to rx status " Wojciech Dubowik
  0 siblings, 2 replies; 5+ messages in thread
From: Wojciech Dubowik @ 2012-01-23 14:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, Wojciech Dubowik

These patches have been originally posted on radiotap.org on 3 Nov 2011
and followed radiotap standardisation process.

Wireshark counterpart is on:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6720


Wojciech Dubowik (2):
  mac80211: Add STBC RX flag to radiotap.     Signed-off-by: Wojciech
    Dubowik <Wojciech.Dubowik@neratec.com>
  ath9k: Add STBC flag to rx status     Signed-off-by: Wojciech Dubowik
    <Wojciech.Dubowik@neratec.com>

 drivers/net/wireless/ath/ath9k/ar9003_mac.c |    1 +
 drivers/net/wireless/ath/ath9k/mac.c        |    2 ++
 drivers/net/wireless/ath/ath9k/mac.h        |    4 +++-
 drivers/net/wireless/ath/ath9k/recv.c       |    2 ++
 include/net/ieee80211_radiotap.h            |    3 ++-
 include/net/mac80211.h                      |    1 +
 net/mac80211/rx.c                           |    5 ++++-
 7 files changed, 15 insertions(+), 3 deletions(-)

-- 
1.7.4.1


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

* [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
  2012-01-23 14:27 [PATCH 0/2] Add STBC flag decoding for radiotap Wojciech Dubowik
@ 2012-01-23 14:27 ` Wojciech Dubowik
  2012-01-23 18:19   ` Johannes Berg
  2012-01-23 14:27 ` [PATCH 2/2] ath9k: Add STBC flag to rx status " Wojciech Dubowik
  1 sibling, 1 reply; 5+ messages in thread
From: Wojciech Dubowik @ 2012-01-23 14:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, Wojciech Dubowik

---
 include/net/ieee80211_radiotap.h |    3 ++-
 include/net/mac80211.h           |    1 +
 net/mac80211/rx.c                |    5 ++++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index 7139254..e5b89c4 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
 
 /* helpers */
 static inline int ieee80211_get_radiotap_len(unsigned char *data)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d49928b..aed6ef1 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -672,6 +672,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 7514091..da23b6b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -204,12 +204,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;
 	}
-- 
1.7.4.1


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

* [PATCH 2/2] ath9k: Add STBC flag to rx status Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
  2012-01-23 14:27 [PATCH 0/2] Add STBC flag decoding for radiotap Wojciech Dubowik
  2012-01-23 14:27 ` [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Wojciech Dubowik
@ 2012-01-23 14:27 ` Wojciech Dubowik
  1 sibling, 0 replies; 5+ messages in thread
From: Wojciech Dubowik @ 2012-01-23 14:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, Wojciech Dubowik

---
 drivers/net/wireless/ath/ath9k/ar9003_mac.c |    1 +
 drivers/net/wireless/ath/ath9k/mac.c        |    2 ++
 drivers/net/wireless/ath/ath9k/mac.h        |    4 +++-
 drivers/net/wireless/ath/ath9k/recv.c       |    2 ++
 4 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
index 09b8c9d..f270854 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
@@ -503,6 +503,7 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
 	rxs->rs_antenna = (MS(rxsp->status4, AR_RxAntenna) & 0x7);
 	rxs->rs_flags  = (rxsp->status4 & AR_GI) ? ATH9K_RX_GI : 0;
 	rxs->rs_flags  |= (rxsp->status4 & AR_2040) ? ATH9K_RX_2040 : 0;
+	rxs->rs_flags |= (rxsp->status4 & AR_RxSTBC) ? ATH9K_RX_STBC : 0;
 
 	rxs->evm0 = rxsp->status6;
 	rxs->evm1 = rxsp->status7;
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index e196aba..83171b6 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -593,6 +593,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
 		(ads.ds_rxstatus3 & AR_GI) ? ATH9K_RX_GI : 0;
 	rs->rs_flags |=
 		(ads.ds_rxstatus3 & AR_2040) ? ATH9K_RX_2040 : 0;
+	rs->rs_flags |=
+		(ads.ds_rxstatus3 & AR_RxSTBC) ? ATH9K_RX_STBC : 0;
 
 	if (ads.ds_rxstatus8 & AR_PreDelimCRCErr)
 		rs->rs_flags |= ATH9K_RX_DELIM_CRC_PRE;
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 11dbd14..d0fda0e 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -191,6 +191,7 @@ struct ath_htc_rx_status {
 #define ATH9K_RX_DELIM_CRC_PRE    0x10
 #define ATH9K_RX_DELIM_CRC_POST   0x20
 #define ATH9K_RX_DECRYPT_BUSY     0x40
+#define ATH9K_RX_STBC             0x80
 
 #define ATH9K_RXKEYIX_INVALID	((u8)-1)
 #define ATH9K_TXKEYIX_INVALID	((u8)-1)
@@ -531,7 +532,8 @@ struct ar5416_desc {
 #define AR_2040             0x00000002
 #define AR_Parallel40       0x00000004
 #define AR_Parallel40_S     2
-#define AR_RxStatusRsvd30   0x000000f8
+#define AR_RxSTBC           0x00000008
+#define AR_RxStatusRsvd30   0x000000f0
 #define AR_RxAntenna	    0xffffff00
 #define AR_RxAntenna_S	    8
 
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 0e666fb..ee94cfd 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -911,6 +911,8 @@ static int ath9k_process_rate(struct ath_common *common,
 			rxs->flag |= RX_FLAG_40MHZ;
 		if (rx_stats->rs_flags & ATH9K_RX_GI)
 			rxs->flag |= RX_FLAG_SHORT_GI;
+		if (rx_stats->rs_flags & ATH9K_RX_STBC)
+			rxs->flag |= RX_FLAG_STBC;
 		rxs->rate_idx = rx_stats->rs_rate & 0x7f;
 		return 0;
 	}
-- 
1.7.4.1


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

* [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
  2012-01-23 14:44 [PATCH 0/2] Add STBC flag decoding for radiotap Wojciech Dubowik
@ 2012-01-23 14:44 ` Wojciech Dubowik
  0 siblings, 0 replies; 5+ messages in thread
From: Wojciech Dubowik @ 2012-01-23 14:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ath9k-devel, Wojciech Dubowik

---
 include/net/ieee80211_radiotap.h |    3 ++-
 include/net/mac80211.h           |    1 +
 net/mac80211/rx.c                |    5 ++++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index 7139254..e5b89c4 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
 
 /* helpers */
 static inline int ieee80211_get_radiotap_len(unsigned char *data)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d49928b..aed6ef1 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -672,6 +672,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 7514091..da23b6b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -204,12 +204,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;
 	}
-- 
1.7.4.1


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

* Re: [PATCH 1/2] mac80211: Add STBC RX flag to radiotap.  Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
  2012-01-23 14:27 ` [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Wojciech Dubowik
@ 2012-01-23 18:19   ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-01-23 18:19 UTC (permalink / raw)
  To: Wojciech Dubowik; +Cc: linville, linux-wireless, ath9k-devel, Wojciech Dubowik

>  #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

Need radiotap standardisation *FIRST* before you're allowed to touch 
this file.

johannes

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

end of thread, other threads:[~2012-01-23 18:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 14:27 [PATCH 0/2] Add STBC flag decoding for radiotap Wojciech Dubowik
2012-01-23 14:27 ` [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Wojciech Dubowik
2012-01-23 18:19   ` Johannes Berg
2012-01-23 14:27 ` [PATCH 2/2] ath9k: Add STBC flag to rx status " Wojciech Dubowik
  -- strict thread matches above, loose matches on Subject: below --
2012-01-23 14:44 [PATCH 0/2] Add STBC flag decoding for radiotap Wojciech Dubowik
2012-01-23 14:44 ` [PATCH 1/2] mac80211: Add STBC RX flag to radiotap. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Wojciech Dubowik

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