From patchwork Fri Apr 23 13:54:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 94675 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 o3NDsuuM021915 for ; Fri, 23 Apr 2010 13:54:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757478Ab0DWNyz (ORCPT ); Fri, 23 Apr 2010 09:54:55 -0400 Received: from mail-bw0-f225.google.com ([209.85.218.225]:32778 "EHLO mail-bw0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756419Ab0DWNyy (ORCPT ); Fri, 23 Apr 2010 09:54:54 -0400 Received: by bwz25 with SMTP id 25so11241198bwz.28 for ; Fri, 23 Apr 2010 06:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:mime-version:content-type:content-transfer-encoding :message-id; bh=bUlpQmhLiu83R+B3mglWBYS0UjoGvTr6XTEnadFd90I=; b=G3OWljjH1KYpMijfnRTHocFe0nLMYipYSigqrPhl8jGH7F5OlgX3L0RWJVeHKCvutJ YWQHLY8T0cL70bteDQ5R43KdxYDRNsT0cNzPUeTKj5NsM+7AZvSKNgjZSq3QYvtU2eIY PB4h/nud6F8yYYnvsH7OL491srxIRCXYkN9pQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:message-id; b=KIxzfBJczkGCD0gpWEit5uEjhmXmwi4Pbzy3grp1eGS1pqhXvTTlOsd6SUoMnHOrVr 4nfyZ4P2rsJhg/ycOECDI5KhJX30qfttifYLyKnrCHZOSu/3cEyEIv1cz+OXMk4FvUs0 HrkSRmP2s7Dy2L1kunVb+YDSFmh+SGVt0oKuo= Received: by 10.204.6.203 with SMTP id a11mr64617bka.8.1272030892853; Fri, 23 Apr 2010 06:54:52 -0700 (PDT) Received: from helmutmobil.localnet (p5495AD6E.dip.t-dialin.net [84.149.173.110]) by mx.google.com with ESMTPS id 16sm543311bwz.13.2010.04.23.06.54.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Apr 2010 06:54:52 -0700 (PDT) From: Helmut Schaa To: John Linville Subject: [PATCH] rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxx Date: Fri, 23 Apr 2010 15:54:43 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.34-rc4-wl-default; KDE/4.3.5; x86_64; ; ) Cc: Ivo van Doorn , Gertjan van Wingerde , linux-wireless@vger.kernel.org MIME-Version: 1.0 Message-Id: <201004231554.43474.helmut.schaa@googlemail.com> 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]); Fri, 23 Apr 2010 13:54:57 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index ec89372..1c59dc6 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h @@ -1566,6 +1566,11 @@ struct mac_iveiv_entry { #define RFCSR12_TX_POWER FIELD8(0x1f) /* + * RFCSR 13: + */ +#define RFCSR13_TX_POWER FIELD8(0x1f) + +/* * RFCSR 15: */ #define RFCSR15_TX_LO2_EN FIELD8(0x08) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index aa02ff6..3ee9882 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -794,6 +794,11 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev, TXPOWER_G_TO_DEV(info->tx_power1)); rt2800_rfcsr_write(rt2x00dev, 12, rfcsr); + rt2800_rfcsr_read(rt2x00dev, 13, &rfcsr); + rt2x00_set_field8(&rfcsr, RFCSR13_TX_POWER, + TXPOWER_G_TO_DEV(info->tx_power2)); + rt2800_rfcsr_write(rt2x00dev, 13, rfcsr); + rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr); rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset); rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);