All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] minstrel_ht: fix freeze with legacy hardware
@ 2010-07-14 21:43 Christian Lamparter
  2010-07-14 21:50 ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Lamparter @ 2010-07-14 21:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W Linville, Felix Fietkau

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;

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

* Re: [PATCH] minstrel_ht: fix freeze with legacy hardware
  2010-07-14 21:43 [PATCH] minstrel_ht: fix freeze with legacy hardware Christian Lamparter
@ 2010-07-14 21:50 ` Felix Fietkau
  2010-07-16 11:01   ` [PATCH] mac80211: skip HT parsing if HW does not support HT Christian Lamparter
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2010-07-14 21:50 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, John W Linville

On 2010-07-14 11:43 PM, Christian Lamparter wrote:
> 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?
Either of those two options is OK with me. I would prefer masking it in
mac80211 though, since the sta ht setting are already partially masked
by hw capabilities.

- Felix

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

* [PATCH] mac80211: skip HT parsing if HW does not support HT
  2010-07-14 21:50 ` Felix Fietkau
@ 2010-07-16 11:01   ` Christian Lamparter
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Lamparter @ 2010-07-16 11:01 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, John W Linville

This patch will also fix the odd freeze which occurred
when minstrel_ht connects to an 802.11n network with
legacy hardware.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
John,

As you know Felix has favored the alternative.
Therefore, can you please ignore
[PATCH] minstrel_ht: fix freeze with legacy hardware
and use this one instead?

Regards,
	Chr
---
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index be928ef..9d101fb 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -29,7 +29,7 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
 
 	memset(ht_cap, 0, sizeof(*ht_cap));
 
-	if (!ht_cap_ie)
+	if (!ht_cap_ie || !sband->ht_cap.ht_supported)
 		return;
 
 	ht_cap->ht_supported = true;

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

end of thread, other threads:[~2010-07-16 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14 21:43 [PATCH] minstrel_ht: fix freeze with legacy hardware Christian Lamparter
2010-07-14 21:50 ` Felix Fietkau
2010-07-16 11:01   ` [PATCH] mac80211: skip HT parsing if HW does not support HT Christian Lamparter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.