Linux wireless drivers development
 help / color / mirror / Atom feed
From: Thomas Ilnseher <illth@gmx.de>
To: John Linville <linville@tuxdriver.com>
Cc: "Broadcom Wireless" <bcm43xx-dev@lists.berlios.de>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	"Gábor Stefanik" <netrolller.3d@gmail.com>
Subject: [PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling
Date: Wed, 16 Sep 2009 21:37:59 +0200	[thread overview]
Message-ID: <1253129879.2989.48.camel@note> (raw)

This patch adds the lpphy_clear_tx_power_offsets to b43.

Signed-off-by: Thomas Ilnseher <illth@gmx.de>

---
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


             reply	other threads:[~2009-09-16 19:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 19:37 Thomas Ilnseher [this message]
2009-09-16 19:40 ` [PATCH 2/2] b43: Add lpphy_clear_tx_power_offsets to improve TX Power handling Gábor Stefanik
2009-09-16 20:17   ` Thomas Ilnseher
2009-09-16 20:44     ` Gábor Stefanik
2009-09-16 21:00       ` Thomas Ilnseher
2009-09-16 21:00     ` Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1253129879.2989.48.camel@note \
    --to=illth@gmx.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netrolller.3d@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox