From patchwork Fri May 20 12:22:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 803182 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 p4KCMf1n023586 for ; Fri, 20 May 2011 12:23:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964811Ab1ETMW5 (ORCPT ); Fri, 20 May 2011 08:22:57 -0400 Received: from mail.atheros.com ([12.19.149.2]:59057 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964802Ab1ETMW4 (ORCPT ); Fri, 20 May 2011 08:22:56 -0400 Received: from mail.atheros.com ([10.234.20.107]) by sidewinder.atheros.com for ; Fri, 20 May 2011 05:22:26 -0700 Received: from mail.atheros.com (10.12.4.66) by SC1EXHC-02.global.atheros.com (10.234.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Fri, 20 May 2011 05:22:53 -0700 Received: by mail.atheros.com (sSMTP sendmail emulation); Fri, 20 May 2011 17:52:53 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 6/6] mac80211: stop queues before rate control updation Date: Fri, 20 May 2011 17:52:15 +0530 Message-ID: <1305894135-14036-6-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:03 +0000 (UTC) Stop tx queues before updating rate control to ensure proper rate selection. Otherwise packets can be transmitted in 40 Mhz whereas hw is configured in HT20. Signed-off-by: Rajkumar Manoharan --- net/mac80211/mlme.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4f6b267..7465955 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -232,6 +232,9 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, WARN_ON(!ieee80211_set_channel_type(local, sdata, channel_type)); } + ieee80211_stop_queues_by_reason(&sdata->local->hw, + IEEE80211_QUEUE_STOP_REASON_CSA); + /* channel_type change automatically detected */ ieee80211_hw_config(local, 0); @@ -245,6 +248,9 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, rcu_read_unlock(); } + ieee80211_wake_queues_by_reason(&sdata->local->hw, + IEEE80211_QUEUE_STOP_REASON_CSA); + ht_opmode = le16_to_cpu(hti->operation_mode); /* if bss configuration changed store the new one */