From patchwork Fri May 20 12:22:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 803152 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4KCMf1m023586 for ; Fri, 20 May 2011 12:23:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964801Ab1ETMWw (ORCPT ); Fri, 20 May 2011 08:22:52 -0400 Received: from mail.atheros.com ([12.19.149.2]:59054 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935738Ab1ETMWv (ORCPT ); Fri, 20 May 2011 08:22:51 -0400 Received: from mail.atheros.com ([10.234.20.107]) by sidewinder.atheros.com for ; Fri, 20 May 2011 05:22:20 -0700 Received: from mail.atheros.com (10.12.4.66) by SC1EXHC-02.global.atheros.com (10.10.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Fri, 20 May 2011 05:22:48 -0700 Received: by mail.atheros.com (sSMTP sendmail emulation); Fri, 20 May 2011 17:52:47 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan , Subject: [PATCH 5/6] ath9k: set 40 Mhz rate only if hw is configured in ht40 Date: Fri, 20 May 2011 17:52:14 +0530 Message-ID: <1305894135-14036-5-git-send-email-rmanoharan@atheros.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1305894135-14036-1-git-send-email-rmanoharan@atheros.com> References: <1305894135-14036-1-git-send-email-rmanoharan@atheros.com> MIME-Version: 1.0 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 20 May 2011 12:23:02 +0000 (UTC) Whenever there is a channel width change from 40 Mhz to 20 Mhz, the hardware is reconfigured to ht20. Meantime before doing the rate control updation, the packets are being transmitted are selected rate with IEEE80211_TX_RC_40_MHZ_WIDTH. While transmitting ht40 rate packets in ht20 mode is causing baseband panic with AR9003 based chips. ==== BB update: BB status=0x02001109 ==== ath: ** BB state: wd=1 det=1 rdar=0 rOFDM=1 rCCK=1 tOFDM=0 tCCK=0 agc=2 src=0 ** ath: ** BB WD cntl: cntl1=0xffff0085 cntl2=0x00000004 ** ath: ** BB mode: BB_gen_controls=0x000033c0 ** ath: ** BB busy times: rx_clear=99%, rx_frame=0%, tx_frame=0% ** ath: ==== BB update: done ==== Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath9k/rc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 1754221..ba7f36a 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c @@ -689,7 +689,8 @@ static void ath_rc_rate_set_series(const struct ath_rate_table *rate_table, if (WLAN_RC_PHY_HT(rate_table->info[rix].phy)) { rate->flags |= IEEE80211_TX_RC_MCS; - if (WLAN_RC_PHY_40(rate_table->info[rix].phy)) + if (WLAN_RC_PHY_40(rate_table->info[rix].phy) && + conf_is_ht40(&txrc->hw->conf)) rate->flags |= IEEE80211_TX_RC_40_MHZ_WIDTH; if (WLAN_RC_PHY_SGI(rate_table->info[rix].phy)) rate->flags |= IEEE80211_TX_RC_SHORT_GI;