[PATCH] [RFC] ath9k: Fix reporting of RX STBC streams to userspace

Subsystems: atheros ath generic utilities, qualcomm atheros ath9k wireless driver, the rest

STALE5753d

3 messages, 3 authors, 2011-01-12 · open the first message on its own page

[PATCH] [RFC] ath9k: Fix reporting of RX STBC streams to userspace

From: Bernhard Walle <hidden>
Date: 2011-01-11 16:59:56

While the driver reports

        ath: TX streams 2, RX streams: 2

in the kernel log (with ATH_DBG_CONFIG set in the debug module
parameter), "iw list" only reported

[...]
        Capabilities: 0x12ce
                HT20/HT40
                SM Power Save disabled
                RX HT40 SGI
                TX STBC
                RX STBC 1-streams
[...]

The driver seems to set the value as flag while the iw tool interprets
it as number. This patch fixes that.

Signed-off-by: Bernhard Walle <redacted>
---
 drivers/net/wireless/ath/ath9k/init.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 639dc93..935b6c3 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -215,17 +215,17 @@ static void setup_ht_cap(struct ath_softc *sc,
 	else
 		max_streams = 2;
 
-	if (AR_SREV_9280_20_OR_LATER(ah)) {
-		if (max_streams >= 2)
-			ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
-		ht_info->cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
-	}
-
 	/* set up supported mcs set */
 	memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
 	tx_streams = ath9k_cmn_count_streams(common->tx_chainmask, max_streams);
 	rx_streams = ath9k_cmn_count_streams(common->rx_chainmask, max_streams);
 
+	if (AR_SREV_9280_20_OR_LATER(ah)) {
+		if (max_streams >= 2)
+			ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
+		ht_info->cap |= (rx_streams << IEEE80211_HT_CAP_RX_STBC_SHIFT);
+	}
+
 	ath_print(common, ATH_DBG_CONFIG,
 		  "TX streams %d, RX streams: %d\n",
 		  tx_streams, rx_streams);
-- 
1.7.1

Re: [ath9k-devel] [PATCH] [RFC] ath9k: Fix reporting of RX STBC streams to userspace

From: Felix Fietkau <hidden>
Date: 2011-01-12 01:31:04

On 2011-01-11 9:59 AM, Bernhard Walle wrote:
quoted hunk
While the driver reports

         ath: TX streams 2, RX streams: 2

in the kernel log (with ATH_DBG_CONFIG set in the debug module
parameter), "iw list" only reported

[...]
         Capabilities: 0x12ce
                 HT20/HT40
                 SM Power Save disabled
                 RX HT40 SGI
                 TX STBC
                 RX STBC 1-streams
[...]

The driver seems to set the value as flag while the iw tool interprets
it as number. This patch fixes that.

Signed-off-by: Bernhard Walle<redacted>
---
  drivers/net/wireless/ath/ath9k/init.c |   12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 639dc93..935b6c3 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -215,17 +215,17 @@ static void setup_ht_cap(struct ath_softc *sc,
  	else
  		max_streams = 2;

-	if (AR_SREV_9280_20_OR_LATER(ah)) {
-		if (max_streams>= 2)
-			ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
-		ht_info->cap |= (1<<  IEEE80211_HT_CAP_RX_STBC_SHIFT);
-	}
-
  	/* set up supported mcs set */
  	memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
  	tx_streams = ath9k_cmn_count_streams(common->tx_chainmask, max_streams);
  	rx_streams = ath9k_cmn_count_streams(common->rx_chainmask, max_streams);

+	if (AR_SREV_9280_20_OR_LATER(ah)) {
+		if (max_streams>= 2)
+			ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
+		ht_info->cap |= (rx_streams<<  IEEE80211_HT_CAP_RX_STBC_SHIFT);
+	}
+
Are you sure the card can actually receive multiple streams via STBC? As 
far as I know, only one stream can be received properly via STBC, more 
streams have to be sent without it.

- Felix

Re: [PATCH] [RFC] ath9k: Fix reporting of RX STBC streams to userspace

From: Vasanthakumar Thiagarajan <hidden>
Date: 2011-01-12 05:23:06

On Tue, Jan 11, 2011 at 10:29:54PM +0530, Bernhard Walle wrote:
While the driver reports

        ath: TX streams 2, RX streams: 2

in the kernel log (with ATH_DBG_CONFIG set in the debug module
parameter), "iw list" only reported

[...]
        Capabilities: 0x12ce
                HT20/HT40
                SM Power Save disabled
                RX HT40 SGI
                TX STBC
                RX STBC 1-streams
[...]

The driver seems to set the value as flag while the iw tool interprets
it as number. This patch fixes that.
Nope. hw supports STBC for one Spatial stream only.

Vasanth
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help