From patchwork Sat Jul 9 04:12:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 957902 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p694DSQp021057 for ; Sat, 9 Jul 2011 04:13:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751072Ab1GIENR (ORCPT ); Sat, 9 Jul 2011 00:13:17 -0400 Received: from nbd.name ([46.4.11.11]:35856 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750887Ab1GIENQ (ORCPT ); Sat, 9 Jul 2011 00:13:16 -0400 Received: by nf.local (Postfix, from userid 501) id 2A47D4DADF86; Sat, 9 Jul 2011 11:12:55 +0700 (WIT) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, lrodriguez@atheros.com Subject: [PATCH 8/9] ath9k_hw: fix synth delay for half/quarter channels Date: Sat, 9 Jul 2011 11:12:53 +0700 Message-Id: <1310184774-32913-8-git-send-email-nbd@openwrt.org> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1310184774-32913-7-git-send-email-nbd@openwrt.org> References: <1310184774-32913-1-git-send-email-nbd@openwrt.org> <1310184774-32913-2-git-send-email-nbd@openwrt.org> <1310184774-32913-3-git-send-email-nbd@openwrt.org> <1310184774-32913-4-git-send-email-nbd@openwrt.org> <1310184774-32913-5-git-send-email-nbd@openwrt.org> <1310184774-32913-6-git-send-email-nbd@openwrt.org> <1310184774-32913-7-git-send-email-nbd@openwrt.org> 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 (demeter2.kernel.org [140.211.167.43]); Sat, 09 Jul 2011 04:13:28 +0000 (UTC) The radio needs twice / four times as much time to stabilize for half/quarter channels. Signed-off-by: Felix Fietkau --- drivers/net/wireless/ath/ath9k/ar5008_phy.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index 441bb33..fac2c6d 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c @@ -627,6 +627,11 @@ static void ar5008_hw_init_bb(struct ath_hw *ah, else synthDelay /= 10; + if (IS_CHAN_HALF_RATE(chan)) + synthDelay *= 2; + else if (IS_CHAN_QUARTER_RATE(chan)) + synthDelay *= 4; + REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN); udelay(synthDelay + BASE_ACTIVATE_DELAY);