From patchwork Thu Feb 4 21:06:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit PAPILLAULT X-Patchwork-Id: 77223 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o14Lrthe009480 for ; Thu, 4 Feb 2010 21:53:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757812Ab0BDVxv (ORCPT ); Thu, 4 Feb 2010 16:53:51 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:52852 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932927Ab0BDVxs (ORCPT ); Thu, 4 Feb 2010 16:53:48 -0500 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id 09A9F940089; Thu, 4 Feb 2010 22:53:41 +0100 (CET) Received: from benoit-laptop (ns.popipo.fr [88.163.232.53]) by smtp1-g21.free.fr (Postfix) with ESMTP id 27BEB940105; Thu, 4 Feb 2010 22:53:39 +0100 (CET) Received: by benoit-laptop (Postfix, from userid 1000) id 638F91DE07A; Thu, 4 Feb 2010 22:06:09 +0100 (CET) From: Benoit Papillault To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benoit Papillault Subject: [PATCH] ath9k: Fix rate table choice Date: Thu, 4 Feb 2010 22:06:06 +0100 Message-Id: <1265317566-15372-1-git-send-email-benoit.papillault@free.fr> X-Mailer: git-send-email 1.6.3.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 21:53:56 +0000 (UTC) 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;