From patchwork Wed Sep 16 19:37:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Ilnseher X-Patchwork-Id: 48058 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 n8GJc86P015985 for ; Wed, 16 Sep 2009 19:38:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754449AbZIPTh6 (ORCPT ); Wed, 16 Sep 2009 15:37:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755566AbZIPTh6 (ORCPT ); Wed, 16 Sep 2009 15:37:58 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:64309 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754449AbZIPTh5 (ORCPT ); Wed, 16 Sep 2009 15:37:57 -0400 Received: by fg-out-1718.google.com with SMTP id 22so1702379fge.1 for ; Wed, 16 Sep 2009 12:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=oxjdGyBIAU3fq9ieBTXsZAP6+89QcqnoREL02Fp7XDw=; b=i6NB2b6IHLFihpO0Q2KWQuRRsgWGgzu28EYULUVbytGZ6XM3l1lBf/XlbwaKBPy6oO ahKsANhT8Qh1vL64FLjrzagcyqcHGcRbr19RBQGFFKwtr0lqmExQ8K+B4M1icISSLSYP x0GLzXazma9zejUR4Jph+TbZbNvkoItpTCUgI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=OeKIZO4oO0NQw/7Db/XGWPyfM2HXnwjb8TJGrFjc9ItGc8vizoJwMB0ZKmf7tP4wyM qIyfH31AqTFLig98CvofJM9uFNJegme6iPFQS3g6jFPkFzqFqDtGTMN3OIScErrUv+9r ZRnwk2B2531s42YXHWNzIv6YmmRRYfJMLgjIU= Received: by 10.86.220.11 with SMTP id s11mr7825141fgg.47.1253129878545; Wed, 16 Sep 2009 12:37:58 -0700 (PDT) Received: from ?192.168.178.28? (88-134-126-140-dynip.superkabel.de [88.134.126.140]) by mx.google.com with ESMTPS id 4sm193478fgg.3.2009.09.16.12.37.57 (version=SSLv3 cipher=RC4-MD5); Wed, 16 Sep 2009 12:37:58 -0700 (PDT) Subject: [PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling From: Thomas Ilnseher To: John Linville Cc: Broadcom Wireless , linux-wireless , Larry Finger , =?ISO-8859-1?Q?G=E1bor?= Stefanik Date: Wed, 16 Sep 2009 21:37:59 +0200 Message-Id: <1253129879.2989.48.camel@note> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch adds the lpphy_clear_tx_power_offsets to b43. Signed-off-by: Thomas Ilnseher --- -- 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 -uNr a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c --- a/drivers/net/wireless/b43/phy_lp.c 2009-09-16 20:52:17.501318374 +0200 +++ b/drivers/net/wireless/b43/phy_lp.c 2009-09-16 20:53:36.593319452 +0200 @@ -1125,6 +1125,18 @@ dev->phy.lp->tssi_idx = (b43_phy_read(dev, B43_LPPHY_TX_PWR_CTL_STAT) & 0x7F00) >> 8; } +static void lpphy_clear_tx_power_offsets(struct b43_wldev *dev) +{ + int i; + int id = 7; + if (dev->phy.rev < 2) + id = 10; + for (i = 0; i < 12; i++) + b43_lptab_write(dev, B43_LPTAB32(id, 0x40 + i), 0); + for (i = 0; i < 64; i++) + b43_lptab_write(dev, B43_LPTAB32(id, 0x80 + i), 0); +} + static void lpphy_set_tx_power_control(struct b43_wldev *dev, enum b43_lpphy_txpctl_mode mode) { @@ -1139,7 +1151,7 @@ if (oldmode == B43_LPPHY_TXPCTL_HW) { lpphy_update_tx_power_npt(dev); - //TODO Clear all TX Power offsets + lpphy_clear_tx_power_offsets(dev); } else { if (mode == B43_LPPHY_TXPCTL_HW) { //TODO Recalculate target TX power