linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gábor Stefanik" <netrolller.3d@gmail.com>
To: Michael Buesch <mb@bu3sch.de>,
	John Linville <linville@tuxdriver.com>,
	Larry Finger <Larry.Finger@lwfinger.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Broadcom Wireless <bcm43xx-dev@lists.berlios.de>
Subject: [RFC] b43: LP-PHY: Initialize SW TX power control
Date: Tue, 11 Aug 2009 23:03:13 +0200	[thread overview]
Message-ID: <4A81DC91.8020208@gmail.com> (raw)

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 <netrolller.3d@gmail.com>

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

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);
 	}
 }
 



             reply	other threads:[~2009-08-11 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 21:03 Gábor Stefanik [this message]
2009-08-12  1:41 ` [RFC] b43: LP-PHY: Initialize SW TX power control Larry Finger

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=4A81DC91.8020208@gmail.com \
    --to=netrolller.3d@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    /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;
as well as URLs for NNTP newsgroup(s).