linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
@ 2007-05-26 17:09 Larry Finger
  2007-05-26 17:19 ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Larry Finger @ 2007-05-26 17:09 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Bcm43xx-dev, linux-wireless

Index: wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c
===================================================================
--- wireless-mb.orig/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c
+++ wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c
@@ -4122,6 +4122,10 @@ void bcm43xx_radio_set_txpower_bg(struct
 	tx_magn = _tx_magn;
 	phy->bbatt = baseband_attenuation;
 	phy->rfatt = radio_attenuation;
+	if (tx_bias == 0xFF) {
+		bcm43xx_lo_g_measure(dev);
+		tx_bias = phy->lo_control->tx_bias;
+	}
 
 	/* Set Baseband Attenuation on device. */
 	bcm43xx_phy_set_baseband_attenuation(dev, baseband_attenuation);

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 17:09 [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF Larry Finger
@ 2007-05-26 17:19 ` Michael Buesch
  2007-05-26 17:55   ` Larry Finger
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2007-05-26 17:19 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bcm43xx-dev, linux-wireless

On Saturday 26 May 2007 19:09:34 Larry Finger wrote:
> Index: wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c
> ===================================================================
> --- wireless-mb.orig/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c
> +++ wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c
> @@ -4122,6 +4122,10 @@ void bcm43xx_radio_set_txpower_bg(struct
>  	tx_magn = _tx_magn;
>  	phy->bbatt = baseband_attenuation;
>  	phy->rfatt = radio_attenuation;
> +	if (tx_bias == 0xFF) {
> +		bcm43xx_lo_g_measure(dev);
> +		tx_bias = phy->lo_control->tx_bias;
> +	}
>  
>  	/* Set Baseband Attenuation on device. */
>  	bcm43xx_phy_set_baseband_attenuation(dev, baseband_attenuation);

Ok, on which specification bits is this actually based? :)
txpower_bg still needs a rewrite, and I have a patch for that in
the pipeline, but it's still buggy due to missing specs stuff.

-- 
Greetings Michael.

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 17:19 ` Michael Buesch
@ 2007-05-26 17:55   ` Larry Finger
  2007-05-26 17:56     ` Michael Buesch
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Larry Finger @ 2007-05-26 17:55 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Bcm43xx-dev, linux-wireless

Michael Buesch wrote:
> 
> Ok, on which specification bits is this actually based? :)
> txpower_bg still needs a rewrite, and I have a patch for that in
> the pipeline, but it's still buggy due to missing specs stuff.
> 

It is not in the V4 specifications that I have found, but the V3 (softmac) driver does this "fixup". 
With it, my 4311 connects with bcm43xx-mac80211. Without it, no connection.

Larry



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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 17:55   ` Larry Finger
@ 2007-05-26 17:56     ` Michael Buesch
  2007-05-26 20:06     ` Michael Buesch
  2007-05-26 20:18     ` Michael Buesch
  2 siblings, 0 replies; 9+ messages in thread
From: Michael Buesch @ 2007-05-26 17:56 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bcm43xx-dev, linux-wireless

On Saturday 26 May 2007 19:55:30 Larry Finger wrote:
> Michael Buesch wrote:
> > 
> > Ok, on which specification bits is this actually based? :)
> > txpower_bg still needs a rewrite, and I have a patch for that in
> > the pipeline, but it's still buggy due to missing specs stuff.
> > 
> 
> It is not in the V4 specifications that I have found, but the V3 (softmac) driver does this "fixup". 
> With it, my 4311 connects with bcm43xx-mac80211. Without it, no connection.

Hm, very interesting. I'll take a look at it, then.

-- 
Greetings Michael.

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 17:55   ` Larry Finger
  2007-05-26 17:56     ` Michael Buesch
@ 2007-05-26 20:06     ` Michael Buesch
  2007-05-26 21:11       ` Larry Finger
  2007-05-26 20:18     ` Michael Buesch
  2 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2007-05-26 20:06 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bcm43xx-dev, linux-wireless

On Saturday 26 May 2007 19:55:30 Larry Finger wrote:
> Michael Buesch wrote:
> > 
> > Ok, on which specification bits is this actually based? :)
> > txpower_bg still needs a rewrite, and I have a patch for that in
> > the pipeline, but it's still buggy due to missing specs stuff.
> > 
> 
> It is not in the V4 specifications that I have found, but the V3 (softmac) driver does this "fixup". 

I cannot find this in the sm driver. Can you give me a hint
where to search?

> With it, my 4311 connects with bcm43xx-mac80211. Without it, no connection.

Ok, nice.

-- 
Greetings Michael.

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 17:55   ` Larry Finger
  2007-05-26 17:56     ` Michael Buesch
  2007-05-26 20:06     ` Michael Buesch
@ 2007-05-26 20:18     ` Michael Buesch
  2 siblings, 0 replies; 9+ messages in thread
From: Michael Buesch @ 2007-05-26 20:18 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bcm43xx-dev, linux-wireless

On Saturday 26 May 2007 19:55:30 Larry Finger wrote:
> With it, my 4311 connects with bcm43xx-mac80211. Without it, no connection.

Ok, it seems to fix the itssi thing, but that re-enables
txpower adjustment, which reveals the whole bunch of bugs in there. :)
So before I can merge this, I have to fix these bugs there.

-- 
Greetings Michael.

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 20:06     ` Michael Buesch
@ 2007-05-26 21:11       ` Larry Finger
  2007-05-26 21:13         ` Michael Buesch
  0 siblings, 1 reply; 9+ messages in thread
From: Larry Finger @ 2007-05-26 21:11 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Bcm43xx-dev, linux-wireless

Michael Buesch wrote:
> On Saturday 26 May 2007 19:55:30 Larry Finger wrote:
>> Michael Buesch wrote:
>>> Ok, on which specification bits is this actually based? :)
>>> txpower_bg still needs a rewrite, and I have a patch for that in
>>> the pipeline, but it's still buggy due to missing specs stuff.
>>>
>> It is not in the V4 specifications that I have found, but the V3 (softmac) driver does this "fixup". 
> 
> I cannot find this in the sm driver. Can you give me a hint
> where to search?
> 
>> With it, my 4311 connects with bcm43xx-mac80211. Without it, no connection.
> 
> Ok, nice.
> 

My memory was faulty earlier, but it is coming back. V3 differs in that txctl1 (the equivalent of 
tx_bias) is not initialized to 0xFF, but is given a value of 0-3 in bcm43xx_default_txctl1. I added 
trace code that checked the value being written to radio register 0x52 and dumped the stack when the 
value was still 0xFF. On that basis, I made it look like the code in bcm43xx_phy_initg when tx_bias 
is 0xFF.

Would you prefer the equivalent of bcm43xx_default_txctl1? That wouldn't be difficult.

Are the txpower adjustment bugs a problem with the specs? Is there anything I can do?

Larry

Larry

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 21:11       ` Larry Finger
@ 2007-05-26 21:13         ` Michael Buesch
  2007-05-26 21:41           ` Joseph Jezak
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Buesch @ 2007-05-26 21:13 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bcm43xx-dev, linux-wireless

On Saturday 26 May 2007 23:11:34 Larry Finger wrote:
> Michael Buesch wrote:
> > On Saturday 26 May 2007 19:55:30 Larry Finger wrote:
> >> Michael Buesch wrote:
> >>> Ok, on which specification bits is this actually based? :)
> >>> txpower_bg still needs a rewrite, and I have a patch for that in
> >>> the pipeline, but it's still buggy due to missing specs stuff.
> >>>
> >> It is not in the V4 specifications that I have found, but the V3 (softmac) driver does this "fixup". 
> > 
> > I cannot find this in the sm driver. Can you give me a hint
> > where to search?
> > 
> >> With it, my 4311 connects with bcm43xx-mac80211. Without it, no connection.
> > 
> > Ok, nice.
> > 
> 
> My memory was faulty earlier, but it is coming back. V3 differs in that txctl1 (the equivalent of 
> tx_bias) is not initialized to 0xFF, but is given a value of 0-3 in bcm43xx_default_txctl1. I added 
> trace code that checked the value being written to radio register 0x52 and dumped the stack when the 
> value was still 0xFF. On that basis, I made it look like the code in bcm43xx_phy_initg when tx_bias 
> is 0xFF.
> 
> Would you prefer the equivalent of bcm43xx_default_txctl1? That wouldn't be difficult.

Ok, I have patches that are designed to fix this. But still not done.

> Are the txpower adjustment bugs a problem with the specs? Is there anything I can do?

I'm not sure what causes this, yet. It's either a bug in estimating
the current power or in calculating the new attenuation values.

-- 
Greetings Michael.

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

* Re: [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF
  2007-05-26 21:13         ` Michael Buesch
@ 2007-05-26 21:41           ` Joseph Jezak
  0 siblings, 0 replies; 9+ messages in thread
From: Joseph Jezak @ 2007-05-26 21:41 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Larry Finger, linux-wireless, Bcm43xx-dev

 >> Are the txpower adjustment bugs a problem with the specs? Is
there anything I can do?
> 
> I'm not sure what causes this, yet. It's either a bug in estimating
> the current power or in calculating the new attenuation values.
> 

I'm working on updating the v4 specs for estimating the current
power, hopefully I'll finish for tomorrow.  I think the calculation
fo the new attenuation values is okay, but looking over it again
can't hurt.

-Joe

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

end of thread, other threads:[~2007-05-26 21:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-26 17:09 [PATCH] bcm43xx-mac80211: Fix for tx_bias equal to 0xFF Larry Finger
2007-05-26 17:19 ` Michael Buesch
2007-05-26 17:55   ` Larry Finger
2007-05-26 17:56     ` Michael Buesch
2007-05-26 20:06     ` Michael Buesch
2007-05-26 21:11       ` Larry Finger
2007-05-26 21:13         ` Michael Buesch
2007-05-26 21:41           ` Joseph Jezak
2007-05-26 20:18     ` Michael Buesch

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