From patchwork Tue Mar 16 00:38:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 86056 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 o2G0d1O2011791 for ; Tue, 16 Mar 2010 00:39:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756748Ab0CPAjA (ORCPT ); Mon, 15 Mar 2010 20:39:00 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:58200 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756733Ab0CPAi7 (ORCPT ); Mon, 15 Mar 2010 20:38:59 -0400 Received: from mcgrof by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1NrKoC-0005GC-DC; Tue, 16 Mar 2010 00:38:56 +0000 Date: Mon, 15 Mar 2010 20:38:56 -0400 From: "Luis R. Rodriguez" To: "Luis R. Rodriguez" Cc: Felix Fietkau , "linville@tuxdriver.com" , Vivek Natarajan , Sujith Manoharan , "linux-wireless@vger.kernel.org" Subject: Re: [PATCH v3 00/12] ath9k_hw: complete support for AR9271 Message-ID: <20100316003856.GL8069@bombadil.infradead.org> References: <1268459216-22372-1-git-send-email-lrodriguez@atheros.com> <20100315214338.GB4000@tux> <43e72e891003151625t795b8ecdr2ce2e6927e8632a4@mail.gmail.com> <20100315234909.GA2662@tux> <4B9EC85B.8070800@openwrt.org> <43e72e891003151655i7dc051d0lc1da26267e9c706@mail.gmail.com> <4B9ECB3E.3010802@openwrt.org> <43e72e891003151709r42745e27q6e42c131d202a4cb@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <43e72e891003151709r42745e27q6e42c131d202a4cb@mail.gmail.com> User-Agent: Mutt/1.5.19 (2009-01-05) 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]); Tue, 16 Mar 2010 00:39:01 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 3b4c636..e501599 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -1438,6 +1438,14 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw, ath9k_htc_beacon_config(priv, vif, bss_conf); } + if (changed & BSS_CHANGED_ERP_SLOT) { + if (bss_conf->use_short_slot) + ah->slottime = 9; + else + ah->slottime = 20; + ath9k_hw_init_global_settings(ah); + } + if (changed & BSS_CHANGED_BEACON) ath9k_htc_beacon_update(priv, vif); @@ -1567,6 +1575,18 @@ static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw, u32 value) return 0; } +static void ath9k_htc_set_coverage_class(struct ieee80211_hw *hw, + u8 coverage_class) +{ + struct ath9k_htc_priv *priv = hw->priv; + struct ath_hw *ah = priv->ah; + + mutex_lock(&priv->mutex); + ah->coverage_class = coverage_class; + ath9k_hw_init_global_settings(ah); + mutex_unlock(&priv->mutex); +} + struct ieee80211_ops ath9k_htc_ops = { .tx = ath9k_htc_tx, .start = ath9k_htc_start, @@ -1587,4 +1607,5 @@ struct ieee80211_ops ath9k_htc_ops = { .sw_scan_complete = ath9k_htc_sw_scan_complete, .set_rts_threshold = ath9k_htc_set_rts_threshold, .rfkill_poll = ath9k_htc_rfkill_poll_state, + .set_coverage_class = ath9k_htc_set_coverage_class, };