Linux wireless drivers development
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org
Subject: [RFC] minstrel_ht: refine STBC handling
Date: Sat, 8 May 2010 02:41:16 +0200	[thread overview]
Message-ID: <201005080241.16634.chunkeey@googlemail.com> (raw)

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;

             reply	other threads:[~2010-05-08  0:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-08  0:41 Christian Lamparter [this message]
2010-05-08  8:27 ` [RFC] minstrel_ht: refine STBC handling Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201005080241.16634.chunkeey@googlemail.com \
    --to=chunkeey@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@openwrt.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox