From patchwork Fri Aug 14 06:02:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Natarajan X-Patchwork-Id: 41348 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7E62P19027645 for ; Fri, 14 Aug 2009 06:02:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755947AbZHNGCW (ORCPT ); Fri, 14 Aug 2009 02:02:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755959AbZHNGCW (ORCPT ); Fri, 14 Aug 2009 02:02:22 -0400 Received: from mail-pz0-f196.google.com ([209.85.222.196]:35896 "EHLO mail-pz0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755886AbZHNGCW (ORCPT ); Fri, 14 Aug 2009 02:02:22 -0400 Received: by pzk34 with SMTP id 34so909157pzk.4 for ; Thu, 13 Aug 2009 23:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=qHT1b75VbF2kvl774DE1mRDZHFE5ijZUjb0eAgBHiXM=; b=ASygGpm18guyK1HD/MTm6Pfv5a4KFjq74Jn3Z793AktlXbMq0hdLA6VDwod1PPWms8 kStF/JRfH1Nc623iI9/9Lj37gFTdNBmBGXdby4VlLKcN2HVd+hjPQtYWWQO4GKmizx0z 77Wq1k1R0qlyMRroN2xNP4Cr05slmTbNllYc4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=PI1/KdYfKd+EnbmfhWk5iVlWLQDFdg9I73nIUmchN4LWx91urLLgYH5ndv58KTtW/t 4bzJDoX1CWqBEmaoCY3+yJlbxr6qONSFZ6zh4rJrb0KLvj9owLeadrMgTDL8vvAhSpUD gP5O42hMw3BGdbyg+Usoie4y67kmNYG2shQfc= Received: by 10.114.235.16 with SMTP id i16mr1646353wah.28.1250229743457; Thu, 13 Aug 2009 23:02:23 -0700 (PDT) Received: from myhost.users.atheros.com ([124.30.92.178]) by mx.google.com with ESMTPS id k41sm1127330rvb.0.2009.08.13.23.02.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Aug 2009 23:02:22 -0700 (PDT) Date: Fri, 14 Aug 2009 11:32:04 +0530 From: Vivek Natarajan To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org Subject: [PATCH 4/5] ath9k: Fix ref power interpolation logic for AR9287 chipsets. Message-ID: <20090814060204.GD3541@myhost.users.atheros.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Vivek Natarajan --- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index aeb7f48..9590979 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c @@ -374,7 +374,6 @@ static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah, u8 *pCalChans, u16 availPiers, int8_t *pPwr) { - u8 pcdac, i = 0; u16 idxL = 0, idxR = 0, numPiers; bool match; struct chan_centers centers; @@ -392,17 +391,12 @@ static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah, &idxL, &idxR); if (match) { - pcdac = pRawDatasetOpLoop[idxL].pcdac[0][0]; - *pPwr = pRawDatasetOpLoop[idxL].pwrPdg[0][0]; + *pPwr = (int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0]; } else { - pcdac = pRawDatasetOpLoop[idxR].pcdac[0][0]; - *pPwr = (pRawDatasetOpLoop[idxL].pwrPdg[0][0] + - pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2; + *pPwr = ((int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0] + + (int8_t) pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2; } - while ((pcdac > ah->originalGain[i]) && - (i < (AR9280_TX_GAIN_TABLE_SIZE - 1))) - i++; } static void ar9287_eeprom_olpc_set_pdadcs(struct ath_hw *ah,