linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] b43: LP-PHY: Initialize SW TX power control
@ 2009-08-11 21:03 Gábor Stefanik
  2009-08-12  1:41 ` Larry Finger
  0 siblings, 1 reply; 2+ messages in thread
From: Gábor Stefanik @ 2009-08-11 21:03 UTC (permalink / raw)
  To: Michael Buesch, John Linville, Larry Finger
  Cc: linux-wireless, Broadcom Wireless

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] b43: LP-PHY: Initialize SW TX power control
  2009-08-11 21:03 [RFC] b43: LP-PHY: Initialize SW TX power control Gábor Stefanik
@ 2009-08-12  1:41 ` Larry Finger
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2009-08-12  1:41 UTC (permalink / raw)
  To: Gábor Stefanik
  Cc: Michael Buesch, John Linville, linux-wireless, Broadcom Wireless

Gábor Stefanik wrote:
> 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;

I found a typo in the specs today. The pad should be 14 and pga should
be 15.

> +            txgain.dac = 0;
> +        } // FIXME offset 0 is just a guess!
> +        lpphy_write_gain_table(dev, 0, txgain);

The link was wrong in the page. The correct routine is
http://bcm-v4.sipsolutions.net/802.11/PHY/LP/SetTXGain. It has one
argument &txgain. I don't think this one has been written yet.

Larry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-12  1:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-11 21:03 [RFC] b43: LP-PHY: Initialize SW TX power control Gábor Stefanik
2009-08-12  1:41 ` Larry Finger

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