From patchwork Tue Aug 18 20:08:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?G=C3=A1bor_Stefanik?= X-Patchwork-Id: 42412 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 n7IK8YHe018890 for ; Tue, 18 Aug 2009 20:08:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751703AbZHRUIb (ORCPT ); Tue, 18 Aug 2009 16:08:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751684AbZHRUIb (ORCPT ); Tue, 18 Aug 2009 16:08:31 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:42007 "EHLO mail-bw0-f222.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbZHRUIa (ORCPT ); Tue, 18 Aug 2009 16:08:30 -0400 Received: by bwz22 with SMTP id 22so3257769bwz.18 for ; Tue, 18 Aug 2009 13:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=Kuo3JgW1OT8fuRVKEMpXLAJpuz3tgYPaDo0y902TIu0=; b=e8MVkhVJ/YspZCwAU2K3ikR6mIAhn/AKLqkZAE6ni0A+fDwmnZbSCp6ceycheEOYPR 4ow50PzsjkwPjXxyiPn7y1YQdzygXA4OS/2MBKJT4KY+XxdGn+Q7daL2xHsldhuVrYQt jTHsDNbyr1rFhKlaDXLzlRGd3qIvlHZCR7/Lw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=kjh6KWpEcc5bVGVzIFWjUtzWRxMar3hqWAxJ7nAaMMifmVtexXuR2O780tLNS7Ci+j kNojqTVUUk2Ug4XGFt4uLF81EoyJ/NGOPpdBmSj0svGugFwbYyOGN2qE4W+hTp3vC1Z5 cE92EFbrqUhSHRIB9NTQ+n4RrfXseScY37cVg= Received: by 10.103.67.25 with SMTP id u25mr2054903muk.45.1250626110587; Tue, 18 Aug 2009 13:08:30 -0700 (PDT) Received: from ?192.168.1.4? (pool-0392b.externet.hu [88.209.229.42]) by mx.google.com with ESMTPS id e9sm26220054muf.2.2009.08.18.13.08.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 18 Aug 2009 13:08:30 -0700 (PDT) Message-ID: <4A8B0A3F.6040106@gmail.com> Date: Tue, 18 Aug 2009 22:08:31 +0200 From: =?UTF-8?B?R8OhYm9yIFN0ZWZhbmlr?= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Linville , Michael Buesch , Larry Finger CC: Mark Huijgen , Broadcom Wireless , linux-wireless Subject: [PATCH] b43: LP-PHY: Two small spec updates Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The specs are beginning to support rev3 LP-PHYs - implement one of the changes needed for rev3 support. Also, in the new MIPS driver, the "Japan TX filter" was renamed to "analog TX filter init" - however, calling it "init" is confusing, so name it "set analog filter", with a comment for easier future identification. Signed-off-by: Gábor Stefanik --- drivers/net/wireless/b43/phy_lp.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 6c69cdb..65f0010 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -609,9 +609,14 @@ static void lpphy_2063_init(struct b43_wldev *dev) b43_radio_write(dev, B2063_PA_SP7, 0); b43_radio_write(dev, B2063_TX_RF_SP6, 0x20); b43_radio_write(dev, B2063_TX_RF_SP9, 0x40); - b43_radio_write(dev, B2063_PA_SP3, 0xa0); - b43_radio_write(dev, B2063_PA_SP4, 0xa0); - b43_radio_write(dev, B2063_PA_SP2, 0x18); + if (dev->phy.rev == 2) { + b43_radio_write(dev, B2063_PA_SP3, 0xa0); + b43_radio_write(dev, B2063_PA_SP4, 0xa0); + b43_radio_write(dev, B2063_PA_SP2, 0x18); + } else { + b43_radio_write(dev, B2063_PA_SP3, 0x20); + b43_radio_write(dev, B2063_PA_SP2, 0x20); + } } struct lpphy_stx_table_entry { @@ -1996,7 +2001,9 @@ static int lpphy_b2062_tune(struct b43_wldev *dev, return err; } -static void lpphy_japan_filter(struct b43_wldev *dev, int channel) + +/* This was previously called lpphy_japan_filter */ +static void lpphy_set_analog_filter(struct b43_wldev *dev, int channel) { struct b43_phy_lp *lpphy = dev->phy.lp; u16 tmp = (channel == 14); //SPEC FIXME check japanwidefilter! @@ -2165,7 +2172,7 @@ static int b43_lpphy_op_switch_channel(struct b43_wldev *dev, err = lpphy_b2062_tune(dev, new_channel); if (err) return err; - lpphy_japan_filter(dev, new_channel); + lpphy_set_analog_filter(dev, new_channel); lpphy_adjust_gain_table(dev, channel2freq_lp(new_channel)); }