From patchwork Wed May 19 15:26:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gertjan van Wingerde X-Patchwork-Id: 100885 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4JFQOrD015829 for ; Wed, 19 May 2010 15:26:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241Ab0ESP0P (ORCPT ); Wed, 19 May 2010 11:26:15 -0400 Received: from cpsmtpb-ews05.kpnxchange.com ([213.75.39.8]:2884 "EHLO cpsmtpb-ews05.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605Ab0ESP0O (ORCPT ); Wed, 19 May 2010 11:26:14 -0400 Received: from cpbrm-ews33.kpnxchange.com ([10.94.84.164]) by cpsmtpb-ews05.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 19 May 2010 17:26:11 +0200 Received: from CPSMTPM-EML109.kpnxchange.com ([195.121.3.13]) by cpbrm-ews33.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 19 May 2010 17:26:10 +0200 Received: from wingerd.gvw.nl ([86.87.118.224]) by CPSMTPM-EML109.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Wed, 19 May 2010 17:26:10 +0200 Received: by wingerd.gvw.nl (Postfix, from userid 501) id 9065C60039; Wed, 19 May 2010 17:26:10 +0200 (CEST) From: Gertjan van Wingerde To: "John W. Linville" Cc: Ivo van Doorn , Helmut Schaa , , , Gertjan van Wingerde Subject: [PATCH 4/7] rt2x00: Simplify check for external LNA in rt2800_init_rfcsr. Date: Wed, 19 May 2010 17:26:06 +0200 Message-Id: <1274282769-19244-5-git-send-email-gwingerde@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274282769-19244-1-git-send-email-gwingerde@gmail.com> References: <1274282769-19244-1-git-send-email-gwingerde@gmail.com> X-OriginalArrivalTime: 19 May 2010 15:26:10.0979 (UTC) FILETIME=[9C51F730:01CAF767] X-RecipientDomain: vger.kernel.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.3 (demeter.kernel.org [140.211.167.41]); Wed, 19 May 2010 15:26:24 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 5183249..d46d1b8 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -2071,8 +2071,7 @@ int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev) if (rt2x00_rt_rev_lt(rt2x00dev, RT3071, REV_RT3071E) || rt2x00_rt_rev_lt(rt2x00dev, RT3090, REV_RT3090E) || rt2x00_rt_rev_lt(rt2x00dev, RT3390, REV_RT3390E)) { - rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom); - if (rt2x00_get_field16(eeprom, EEPROM_NIC_EXTERNAL_LNA_BG)) + if (test_bit(CONFIG_EXTERNAL_LNA_BG, &rt2x00dev->flags)) rt2x00_set_field8(&rfcsr, RFCSR17_R, 1); } rt2x00_eeprom_read(rt2x00dev, EEPROM_TXMIXER_GAIN_BG, &eeprom);