Skip to contentSkip to conversation

minstrel_ht: refine STBC handling

RFC In review Christian Lamparter 2 participants 2 messages May 8, 2010 mac80211

lore
Share & tools
lore
#0 lore raw

RFC 1/1 minstrel_ht: refine STBC handling

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

net/mac80211/rc80211_minstrel_ht.c +4 -2
@@ -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;
maintainer
#1 lore raw
Quoted 3 lines · Christian Lamparter

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.

mac80211 will give you the peer's capabilities already restricted down to our own.

johannes