All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k: Fix rate table choice
@ 2010-02-04 21:06 Benoit Papillault
  2010-02-05  0:14 ` Luis R. Rodriguez
  2010-02-05  4:51 ` Sujith
  0 siblings, 2 replies; 6+ messages in thread
From: Benoit Papillault @ 2010-02-04 21:06 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Benoit Papillault

ath9k rate control choose the rate table based on the current channel
(if it is ht40 or not). However, it happens that at this stage, the
channel is still ht20 even if the peer sta capabilities would later
allow ht40. So let's use peer sta capabilities directly.

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
---
 drivers/net/wireless/ath/ath9k/rc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 1196884..5ce9da5 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1341,10 +1341,8 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
 		if (sc->sc_ah->opmode != NL80211_IFTYPE_STATION)
 			return;
 
-		if (sc->hw->conf.channel_type == NL80211_CHAN_HT40MINUS ||
-		    sc->hw->conf.channel_type == NL80211_CHAN_HT40PLUS)
-			oper_cw40 = true;
-
+		oper_cw40 = (sta->ht_cap.cap &
+			     IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? true : false;
 		oper_sgi40 = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
 			true : false;
 
-- 
1.6.3.3


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

end of thread, other threads:[~2010-02-05  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04 21:06 [PATCH] ath9k: Fix rate table choice Benoit Papillault
2010-02-05  0:14 ` Luis R. Rodriguez
2010-02-05  0:36   ` Benoit PAPILLAULT
2010-02-05  4:51 ` Sujith
2010-02-05  7:21   ` Benoit PAPILLAULT
2010-02-05  7:57     ` Sujith

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.