linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: John W Linville <linville@tuxdriver.com>,
	Felix Fietkau <nbd@openwrt.org>
Subject: [PATCH] minstrel_ht: fix freeze with legacy hardware
Date: Wed, 14 Jul 2010 23:43:33 +0200	[thread overview]
Message-ID: <201007142343.33937.chunkeey@googlemail.com> (raw)

Ever since minstrel_ht was prompted to be the default RC,
I had an this odd freeze in ieee80211_tx_status, 
whenever I tried to connect my p54*(legacy 11abg) to
a 802.11n network.

Apparently, minstrel_ht was not interested if the hardware
supported 802.11n or not?

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
Note: There's another possible way to fix this.
We can simply AND sta's ht_supported bool with
the setting in sband's ht_supported.

The advantage is that we won't need this patch
and the procedure would "match" to what we did
with the ht_cap flags.

This is up for debate... But in the meantime,
here's a fix.

P.S.: is there a valid operation situation
where sta is be NULL, but priv_sta isn't?
---
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index b5ace24..8ad3630 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -635,8 +635,12 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
 	int stbc;
 	int i;
 
-	/* fall back to the old minstrel for legacy stations */
-	if (sta && !sta->ht_cap.ht_supported) {
+	/*
+	 * fall back to the old minstrel for legacy stations,
+	 * or on legacy hardware.
+	 */
+	if ((sta && !sta->ht_cap.ht_supported) ||
+	    !sband->ht_cap.ht_supported) {
 		msp->is_ht = false;
 		memset(&msp->legacy, 0, sizeof(msp->legacy));
 		msp->legacy.r = msp->ratelist;

             reply	other threads:[~2010-07-14 21:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 21:43 Christian Lamparter [this message]
2010-07-14 21:50 ` [PATCH] minstrel_ht: fix freeze with legacy hardware Felix Fietkau
2010-07-16 11:01   ` [PATCH] mac80211: skip HT parsing if HW does not support HT Christian Lamparter

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=201007142343.33937.chunkeey@googlemail.com \
    --to=chunkeey@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --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;
as well as URLs for NNTP newsgroup(s).