Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFC] minstrel_ht: refine STBC handling
@ 2010-05-08  0:41 Christian Lamparter
  2010-05-08  8:27 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Lamparter @ 2010-05-08  0:41 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless

The maximum number of space time streams should be determined
by the RX STBC bits in the HT capabilities of the HT peer.

Note 1:
	The specification (I've 802.11n D8.0) also states	that the
	Rx MCS Bitmask subfield of the Supported MCS Set field also
	has some weight in the STBC stream equation.
	But unless I'm totally wrong here, minstrel_ht already takes
	that into account by filtering out unsupported MCS rates, right?

Note 2:
	The "if" check looks suspicious, OUR hardware must be have the
	IEEE80211_HT_CAP_TX_STBC capability and not the peer?!
---
And now to something completely different:

I noticed that only the peer's HT capabilities are fully evaluated,
but the actual capabilities of the sending device (stored
in sband->ht_cap.cap) are not considered.

Theoretically, this shouldn't be an issue, simply because if the
hardware does not support the feature, the driver will almost
certainly ignore the spurious flag.
---
--- a/net/mac80211/rc80211_minstrel_ht.c	2010-05-08 01:46:14.000000000 +0200
+++ b/net/mac80211/rc80211_minstrel_ht.c	2010-05-08 01:45:17.000000000 +0200
@@ -663,8 +663,10 @@ minstrel_ht_update_caps(void *priv, stru
 	}
 	mi->sample_tries = 4;
 
-	if (sta_cap & IEEE80211_HT_CAP_TX_STBC)
-		mi->tx_flags |= IEEE80211_TX_CTL_STBC;
+	if (sband->ht_cap.cap & IEEE80211_HT_CAP_TX_STBC) {
+		mi->tx_flags |= ((sta_cap >> IEEE80211_HT_CAP_RX_STBC_SHIFT)
+				& 3) << IEEE80211_TX_CTL_STBC_SHIFT;
+	}
 
 	if (sta_cap & IEEE80211_HT_CAP_LDPC_CODING)
 		mi->tx_flags |= IEEE80211_TX_CTL_LDPC;

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

end of thread, other threads:[~2010-05-08  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-08  0:41 [RFC] minstrel_ht: refine STBC handling Christian Lamparter
2010-05-08  8:27 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox