Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:59441 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071Ab2IHIVn (ORCPT ); Sat, 8 Sep 2012 04:21:43 -0400 From: Sujith Manoharan MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-ID: <20554.65332.70163.2580@gargle.gargle.HOWL> (sfid-20120908_102149_768955_C032CEBF) Date: Sat, 8 Sep 2012 13:47:56 +0530 To: Felix Fietkau CC: Sujith Manoharan , , Subject: Re: [RFC 6/7] ath9k_hw: Program correct PLL value for AR9565 In-Reply-To: <504AFCE8.5010306@openwrt.org> References: <20554.62374.945320.866841@gargle.gargle.HOWL> <504AFCE8.5010306@openwrt.org> Sender: linux-wireless-owner@vger.kernel.org List-ID: Felix Fietkau wrote: > That looks messed up, how about just: > > pll = ath9k_hw_compute_pll_control(ah, chan); > if (AR_SREV_9565(ah)) > pll |= 0x40000; > REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll); > > Or alternatively move that OR mask into ath9k_hw_compute_pll_control [RFC v2] ath9k_hw: Program correct PLL value for AR9565 Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 063d724..47de1a9 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -918,7 +918,8 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, } pll = ath9k_hw_compute_pll_control(ah, chan); - + if (AR_SREV_9565(ah)) + pll |= 0x40000; REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll); if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) || -- 1.7.12