Return-path: Received: from mail-we0-f175.google.com ([74.125.82.175]:55470 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751683Ab3HZTEZ convert rfc822-to-8bit (ORCPT ); Mon, 26 Aug 2013 15:04:25 -0400 Received: by mail-we0-f175.google.com with SMTP id n5so3113525wev.34 for ; Mon, 26 Aug 2013 12:04:24 -0700 (PDT) References: <20130826131851.GB10525@redhat.com> Mime-Version: 1.0 (1.0) In-Reply-To: <20130826131851.GB10525@redhat.com> Content-Type: text/plain; charset=us-ascii Message-Id: (sfid-20130826_210428_631953_DF3F7205) Cc: "John W. Linville" , Fabien ADAM , "linux-wireless@vger.kernel.org" , "users@rt2x00.serialmonkey.com" From: Gertjan van Wingerde Subject: Re: [rt2x00-users] [PATCH 3.11] rt2800: fix wrong TX power compensation Date: Mon, 26 Aug 2013 21:04:24 +0200 To: Stanislaw Gruszka Sender: linux-wireless-owner@vger.kernel.org List-ID: Sent from my iPad On 26 aug. 2013, at 15:18, Stanislaw Gruszka wrote: > We should not do temperature compensation on devices without > EXTERNAL_TX_ALC bit set (called DynamicTxAgcControl on vendor driver). > Such devices can have totally bogus TSSI parameters on the EEPROM, > but still threaded by us as valid and result doing wrong TX power > calculations. > > This fix inability to connect to AP on slightly longer distance on > some Ralink chips/devices. > > Reported-and-tested-by: Fabien ADAM > Cc: stable@vger.kernel.org > Signed-off-by: Stanislaw Gruszka Acked-by: Gertjan van Wingerde > --- > drivers/net/wireless/rt2x00/rt2800lib.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > John, > > If possible this should go to 3.11, -next & cc -stable is also fine as > ususal. > > Note that in -next version of the patch rt2x00_eeprom_read() should > be changed to rt2800_eeprom_read() do to commit > 3e38d3daf881a78ac13e93504a8ac5777040797e > > diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c > index 1f80ea5..a0119d3 100644 > --- a/drivers/net/wireless/rt2x00/rt2800lib.c > +++ b/drivers/net/wireless/rt2x00/rt2800lib.c > @@ -2790,6 +2790,13 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev) > int i; > > /* > + * First check if temperature compensation is supported. > + */ > + rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom); > + if (!rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_EXTERNAL_TX_ALC)) > + return 0; > + > + /* > * Read TSSI boundaries for temperature compensation from > * the EEPROM. > * > -- > 1.7.11.7 > > > _______________________________________________ > users mailing list > users@rt2x00.serialmonkey.com > http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com