Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935703Ab0HFTAa (ORCPT ); Fri, 6 Aug 2010 15:00:30 -0400 Received: from kroah.org ([198.145.64.141]:58557 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935673Ab0HFTAM (ORCPT ); Fri, 6 Aug 2010 15:00:12 -0400 X-Mailbox-Line: From gregkh@clark.site Fri Aug 6 11:58:35 2010 Message-Id: <20100806185835.184639576@clark.site> User-Agent: quilt/0.48-11.2 Date: Fri, 06 Aug 2010 11:57:10 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Felix Fietkau , "John W. Linville" Subject: [15/34] ath9k_hw: fix an off-by-one error in the PDADC boundaries calculation In-Reply-To: <20100806185853.GA28270@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 Lines: 38 2.6.32-stable review patch. If anyone has any objections, please let us know. ------------------ From: Felix Fietkau commit 03b4776c408d2f4bf3a5d204e223724d154716d1 upstream. PDADC values were only generated for values surrounding the target index, however not for the target index itself, leading to a minor error in the generated curve. Signed-off-by: Felix Fietkau Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c @@ -714,7 +714,7 @@ static void ath9k_hw_get_def_gain_bounda vpdTableI[i][sizeCurrVpdTable - 2]); vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep); - if (tgtIndex > maxIndex) { + if (tgtIndex >= maxIndex) { while ((ss <= tgtIndex) && (k < (AR5416_NUM_PDADC_VALUES - 1))) { tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] + -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/