From patchwork Tue Aug 11 21:03:13 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: 40766 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 n7BL3aBm027851 for ; Tue, 11 Aug 2009 21:03:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754345AbZHKVDQ (ORCPT ); Tue, 11 Aug 2009 17:03:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752977AbZHKVDP (ORCPT ); Tue, 11 Aug 2009 17:03:15 -0400 Received: from mail-fx0-f228.google.com ([209.85.220.228]:39837 "EHLO mail-fx0-f228.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752815AbZHKVDP (ORCPT ); Tue, 11 Aug 2009 17:03:15 -0400 Received: by fxm28 with SMTP id 28so1781511fxm.17 for ; Tue, 11 Aug 2009 14:03:14 -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=lnlYIIVuSXkommb+q1YAC2bxcXvQRDEp17JKmazNLxE=; b=VKrWgT70kH5vfsCY871n+B/SV/iLS5kyPHfHhLfbTq89CJCcU4mjLOOLFV5wUwrGMz rY/qr2IcUq0K+g3mKypTtnGQT8nxZ1xCy5xYKrMNSaakqp8a7bYCtadM7K9G0i+elW+P 8pQ+jlnBhcrCu3gdNL3ZiBsSiQspfAt0mhFzs= 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=fR7CVd1UJukaTOsSpYWLhWvORqHfJ3yMn8QLs7ZYd/gXetHoV9ZsBOcAOXajSTR5rU kXn4zHm4bSboAujJaLDLMShapLlHiOUNEeeWHZf9oVuae+NGRdXxOZxAazRXf7+NhK7Y UmHYAXiOBIXaUjQaus6R7NPkgwBWxFU8+qk90= Received: by 10.103.193.6 with SMTP id v6mr216028mup.57.1250024594795; Tue, 11 Aug 2009 14:03:14 -0700 (PDT) Received: from ?192.168.1.3? (pool-02041.externet.hu [88.209.202.64]) by mx.google.com with ESMTPS id 23sm27414649mum.35.2009.08.11.14.03.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Aug 2009 14:03:14 -0700 (PDT) Message-ID: <4A81DC91.8020208@gmail.com> Date: Tue, 11 Aug 2009 23:03:13 +0200 From: =?UTF-8?B?R8OhYm9yIFN0ZWZhbmlr?= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Michael Buesch , John Linville , Larry Finger CC: linux-wireless , Broadcom Wireless Subject: [RFC] b43: LP-PHY: Initialize SW TX power control Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org I'm not sure at all if writing to offset 0 in the TX gain table is the right thing to do... please clarify. Not-yet-signed-off-by: Gábor Stefanik --- If this is indeed the right thing to do, please inform me, and I will resubmit this as a formal patch. phy_lp.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 689c932..93451c9 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -847,15 +847,23 @@ static void lpphy_calibration(struct b43_wldev *dev) /* Initialize TX power control */ static void lpphy_tx_pctl_init(struct b43_wldev *dev) { + lpphy_tx_gain_table_entry txgain; if (0/*FIXME HWPCTL capable */) { //TODO } else { /* This device is only software TX power control capable. */ + txgain.bb_mult = 0x96; if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { - //TODO + txgain.gm = 4; + txgain.pad = 12; + txgain.pga = 12; + txgain.dac = 0; } else { - //TODO - } - //TODO set BB multiplier to 0x0096 + txgain.gm = 7; + txgain.pad = 15; + txgain.pga = 14; + txgain.dac = 0; + } // FIXME offset 0 is just a guess! + lpphy_write_gain_table(dev, 0, txgain); } }