From: gavron@wetwork.net
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Broadcom Wireless <bcm43xx-dev@berlios.de>,
wireless <linux-wireless@vger.kernel.org>
Subject: Re: Speed enhancement for BCM4306/2
Date: Sat, 06 Sep 2008 17:14:40 -0700 [thread overview]
Message-ID: <48C31CF0.1000505@wetwork.net> (raw)
In-Reply-To: <48C3121C.9090309@lwfinger.net>
Larry Finger wrote:
> gavron@wetwork.net wrote:
>> I haven't tried a build yet, but please let me know if I'm on the
>> right track.
>>
>> E
>> # diff -uN /tmp/phy.c drivers/net/wireless/b43legacy/phy.c
>> --- /tmp/phy.c 2008-09-06 15:13:33.000000000 -0700
>> +++ drivers/net/wireless/b43legacy/phy.c 2008-09-06
>> 15:54:03.000000000 -0700
>> @@ -1010,7 +1010,7 @@
>> b43legacy_phy_initb5(dev);
>> else
>> b43legacy_phy_initb6(dev);
>> - if (phy->rev >= 2 || phy->gmode)
>> + if (phy->rev >= 2 && phy->gmode)
>> b43legacy_phy_inita(dev);
>>
>> if (phy->rev >= 2) {
>> @@ -1021,21 +1021,26 @@
>> b43legacy_phy_write(dev, 0x0811, 0x0000);
>> b43legacy_phy_write(dev, 0x0015, 0x00C0);
>> }
>> - if (phy->rev > 5) {
>> + if (phy->rev >= 3) {
>
> AFAIK, this change is an error in the specs. I have since changed it.
> Sorry I didn't catch it earlier.
>
> Otherwise, this patch seems to be correct. All you need now are the
> fixes for b43legacy_phy_initb5() and b43legacy_phy_initb6().
>
> Larry
Ok, this one applies changes to the PHY, B5PHY, and B6PHY changes.
E
# diff -uN /tmp/phy.c drivers/net/wireless/b43legacy/phy.c
--- /tmp/phy.c 2008-09-06 15:13:33.000000000 -0700
+++ drivers/net/wireless/b43legacy/phy.c 2008-09-06
17:13:31.000000000 -0700
@@ -595,12 +595,14 @@
0x0035) & 0xFFC0) | 0x0064);
b43legacy_phy_write(dev, 0x005D, (b43legacy_phy_read(dev,
0x005D) & 0xFF80) | 0x000A);
+ b43legacy_phy_write(dev, 0x5B, 0x0000);
+ b43legacy_phy_write(dev, 0x5C, 0x0000);
}
if (dev->bad_frames_preempt)
b43legacy_phy_write(dev, B43legacy_PHY_RADIO_BITFIELD,
b43legacy_phy_read(dev,
- B43legacy_PHY_RADIO_BITFIELD) | (1 << 11));
+ B43legacy_PHY_RADIO_BITFIELD) | (1 << 12));
if (phy->analog == 1) {
b43legacy_phy_write(dev, 0x0026, 0xCE00);
@@ -771,7 +773,7 @@
b43legacy_phy_write(dev, 0x002A, 0x8AC0);
b43legacy_phy_write(dev, 0x0038, 0x0668);
b43legacy_radio_set_txpower_bg(dev, 0xFFFF, 0xFFFF, 0xFFFF);
- if (phy->radio_rev <= 5)
+ if (phy->radio_rev == 4 || phy->radio_rev == 5)
b43legacy_phy_write(dev, 0x005D, (b43legacy_phy_read(dev,
0x005D) & 0xFF80) | 0x0003);
if (phy->radio_rev <= 2)
@@ -1010,7 +1012,7 @@
b43legacy_phy_initb5(dev);
else
b43legacy_phy_initb6(dev);
- if (phy->rev >= 2 || phy->gmode)
+ if (phy->rev >= 2 && phy->gmode)
b43legacy_phy_inita(dev);
if (phy->rev >= 2) {
@@ -1025,17 +1027,22 @@
b43legacy_phy_write(dev, 0x0811, 0x0400);
b43legacy_phy_write(dev, 0x0015, 0x00C0);
}
- if (phy->rev >= 2 || phy->gmode) {
+ if (phy->gmode) {
tmp = b43legacy_phy_read(dev, 0x0400) & 0xFF;
- if (tmp == 3 || tmp == 5) {
+ if (tmp == 3) {
+ b43legacy_phy_write(dev, 0x04C2, 0x1816);
+ b43legacy_phy_write(dev, 0x04C3, 0x8606);
+ }
+ if (tmp == 4 || tmp == 5) {
b43legacy_phy_write(dev, 0x04C2, 0x1816);
b43legacy_phy_write(dev, 0x04C3, 0x8006);
- if (tmp == 5)
- b43legacy_phy_write(dev, 0x04CC,
- (b43legacy_phy_read(dev,
- 0x04CC) & 0x00FF) |
- 0x1F00);
+ b43legacy_phy_write(dev, 0x04CC,
+ (b43legacy_phy_read(dev,
+ 0x04CC) & 0x00FF) |
+ 0x1F00);
}
+ }
+ if (phy-->rev >= 2)
b43legacy_phy_write(dev, 0x047E, 0x0078);
}
if (phy->radio_rev == 8) {
@@ -1092,7 +1099,7 @@
*/
b43legacy_nrssi_hw_update(dev, 0xFFFF);
b43legacy_calc_nrssi_threshold(dev);
- } else if (phy->gmode || phy->rev >= 2) {
+ } else if (phy->gmode) {
if (phy->nrssi[0] == -1000) {
B43legacy_WARN_ON(phy->nrssi[1] != -1000);
b43legacy_calc_nrssi_slope(dev);
prev parent reply other threads:[~2008-09-07 0:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 23:02 Speed enhancement for BCM4306/2 Larry Finger
2008-09-06 4:38 ` gavron
2008-09-06 4:49 ` Larry Finger
2008-09-06 5:04 ` gavron
2008-09-06 10:41 ` Michael Buesch
2008-09-06 15:29 ` Larry Finger
2008-09-06 18:07 ` gavron
2008-09-06 18:11 ` Michael Buesch
2008-09-06 18:30 ` Larry Finger
2008-09-06 22:59 ` gavron
2008-09-06 23:28 ` Larry Finger
2008-09-06 23:46 ` gavron
2008-09-07 0:18 ` Larry Finger
2008-09-07 0:25 ` gavron
2008-09-07 0:35 ` Larry Finger
2008-09-07 0:41 ` gavron
2008-09-07 0:14 ` gavron [this message]
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=48C31CF0.1000505@wetwork.net \
--to=gavron@wetwork.net \
--cc=Larry.Finger@lwfinger.net \
--cc=bcm43xx-dev@berlios.de \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.