2008-08-15 22:30:24

by Michael Büsch

[permalink] [raw]
Subject: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

This is the first part for the rewrite of the b43 PHY API.
This is needed in order to make development of N and LP code possible.

PLEASE TEST TEST TEST TEST TEST

Lots of testing on lots of different devices is needed to ensure this
doesn't introduce regressions due to typos.
95% of the patch just moves large parts of the PHY code from one file
to another. More move-patches will follow.
5% of the patch introduces an "ops" based PHY API.

Please test on all of your devices.

http://bu3sch.de/patches/wireless-testing/20080816-0023/patches/002-b43-phy-ops.patch
Apply against wireless-testing.git

(Not attached to the mail, as it is really big)


2008-08-22 11:06:06

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

MjAwOC84LzE2IE1pY2hhZWwgQnVlc2NoIDxtYkBidTNzY2guZGU+Ogo+IFRoaXMgaXMgdGhlIGZp
cnN0IHBhcnQgZm9yIHRoZSByZXdyaXRlIG9mIHRoZSBiNDMgUEhZIEFQSS4KPiBUaGlzIGlzIG5l
ZWRlZCBpbiBvcmRlciB0byBtYWtlIGRldmVsb3BtZW50IG9mIE4gYW5kIExQIGNvZGUgcG9zc2li
bGUuCj4KPiBQTEVBU0UgVEVTVCBURVNUIFRFU1QgVEVTVCBURVNUCj4KPiBMb3RzIG9mIHRlc3Rp
bmcgb24gbG90cyBvZiBkaWZmZXJlbnQgZGV2aWNlcyBpcyBuZWVkZWQgdG8gZW5zdXJlIHRoaXMK
PiBkb2Vzbid0IGludHJvZHVjZSByZWdyZXNzaW9ucyBkdWUgdG8gdHlwb3MuCj4gOTUlIG9mIHRo
ZSBwYXRjaCBqdXN0IG1vdmVzIGxhcmdlIHBhcnRzIG9mIHRoZSBQSFkgY29kZSBmcm9tIG9uZSBm
aWxlCj4gdG8gYW5vdGhlci4gTW9yZSBtb3ZlLXBhdGNoZXMgd2lsbCBmb2xsb3cuCj4gNSUgb2Yg
dGhlIHBhdGNoIGludHJvZHVjZXMgYW4gIm9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GI0My9iMGcwaW5pdHZhbHM1LmZ3CmZpcm13YXJlOiByZXF1ZXN0aW5nIGI0My9i
MGcwYnNpbml0dmFsczUuZncKYjQzLXBoeTA6IExvYWRpbmcgZmlybXdhcmUgdmVyc2lvbiA0MTAu
MjE2MCAoMjAwNy0wNS0yNiAxNTozMjoxMCkKYjQzLXBoeTAgZGVidWc6IENoaXAgaW5pdGlhbGl6
ZWQKYjQzLXBoeTAgZGVidWc6IDMyLWJpdCBETUEgaW5pdGlhbGl6ZWQKUmVnaXN0ZXJlZCBsZWQg
ZGV2aWNlOiBiNDMtcGh5MDo6dHgKUmVnaXN0ZXJlZCBsZWQgZGV2aWNlOiBiNDMtcGh5MDo6cngK
UmVnaXN0ZXJlZCBsZWQgZGV2aWNlOiBiNDMtcGh5MDo6cmFkaW8KYjQzLXBoeTAgZGVidWc6IFdp
cmVsZXNzIGludGVyZmFjZSBzdGFydGVkCmI0My1waHkwIGRlYnVnOiBBZGRpbmcgSW50ZXJmYWNl
IHR5cGUgMgpiNDMtcGh5MDogUmFkaW8gdHVybmVkIG9uIGJ5IHNvZnR3YXJlCgotLSAKUmFmYcWC
IE1pxYJlY2tpCg==

2008-08-16 19:36:54

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

On Saturday 16 August 2008, Larry Finger wrote:
> Larry Finger wrote:
> >
> > The patch works fine on the 802.11g portion of my BCM4312/1, which seems
> > to be the same as a BCM4311/1. This card has a PCIe format. I also
> > tested on my PCMCIA version of a BCM4318. That card works, but the
> > maximum transmit rate is only about 1/2 of what I get without it. The
> > card has a rev 09 802.11 core, a rev 7 PHY, and a rev 3 analog part. I
> > still have to test on a PCI format BCM4306/3 card, but I suspect that
> > you have already tested the 4306.
>
> Forget what I said about the loss of transmit rate. Once I did a
> proper test, it is the same with or without the patch. For the
> BCM4318, the b43 rate is slightly reduced from using bcm43xx. The
> difference is not really great, but a reproducible reduction from 16.6
> to 14.2 Mbs with the iwconfig rate set at 54 Mbs. By comparison, the
> BCM4312 is over 20 Mbs.

Thanks a lot for retesting.
Loss of TX rate would be the worst thing that can happen with this patch, as
it's very very hard to debug due to the size.

I didn't test it on all of my devices, yet. I just tried a 4306, where it
doesn't cause any regression.

2008-08-17 20:43:00

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY -- good on 4311

Ehud Gavron wrote:
> Works fine here. iperf same results as prior to patch.
> b43-phy0: Broadcom 4311 WLAN found
> b43-phy0 debug: Found PHY: Analog 4, Type 2, Revision 8
> b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2
>
> 2.6.27-rc2-wl on Ubuntu 8.04 (don't even ask how long it takes to build
> a new kernel and create a debian package and install it...)

I know, which is one of the reasons I don't use a Debian-based distro.
I want nothing to do with one whose stated goal is to make it so
difficult to change the kernel that the users won't do it.

Larry


2008-08-16 18:09:06

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

Larry Finger wrote:
>
> The patch works fine on the 802.11g portion of my BCM4312/1, which seems
> to be the same as a BCM4311/1. This card has a PCIe format. I also
> tested on my PCMCIA version of a BCM4318. That card works, but the
> maximum transmit rate is only about 1/2 of what I get without it. The
> card has a rev 09 802.11 core, a rev 7 PHY, and a rev 3 analog part. I
> still have to test on a PCI format BCM4306/3 card, but I suspect that
> you have already tested the 4306.

Forget what I said about the loss of transmit rate. Once I did a
proper test, it is the same with or without the patch. For the
BCM4318, the b43 rate is slightly reduced from using bcm43xx. The
difference is not really great, but a reproducible reduction from 16.6
to 14.2 Mbs with the iwconfig rate set at 54 Mbs. By comparison, the
BCM4312 is over 20 Mbs.

Larry


2008-08-17 20:37:59

by Ehud Gavron

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY -- good on 4311

Works fine here. iperf same results as prior to patch.

b43-phy0: Broadcom 4311 WLAN found
b43-phy0 debug: Found PHY: Analog 4, Type 2, Revision 8
b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2

2.6.27-rc2-wl on Ubuntu 8.04 (don't even ask how long it takes to build
a new kernel and create a debian package and install it...)

Ehud

Michael Buesch wrote:
> This is the first part for the rewrite of the b43 PHY API.
> This is needed in order to make development of N and LP code possible.
>
> PLEASE TEST TEST TEST TEST TEST
>
> Lots of testing on lots of different devices is needed to ensure this
> doesn't introduce regressions due to typos.
> 95% of the patch just moves large parts of the PHY code from one file
> to another. More move-patches will follow.
> 5% of the patch introduces an "ops" based PHY API.
>
> Please test on all of your devices.
>
> http://bu3sch.de/patches/wireless-testing/20080816-0023/patches/002-b43-phy-ops.patch
> Apply against wireless-testing.git
>
> (Not attached to the mail, as it is really big)
> _______________________________________________
> Bcm43xx-dev mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
>

2008-08-18 07:41:41

by Holger Schurig

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY -- good on 4311

> I know, which is one of the reasons I don't use a Debian-based
> distro. I want nothing to do with one whose stated goal is to
> make it so difficult to change the kernel that the users won't
> do it.

Huh? I use "make install modules_install" from my kernel source
dir (which I usually get via git) and that works fine, as in
every distro on earth.

Hehe, but I seldom use distro kernels, not even when I used Red
Hat or Mandrake in old times :-)

2008-08-18 13:49:08

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY -- good on 4311

Holger Schurig wrote:
> Huh? I use "make install modules_install" from my kernel source
> dir (which I usually get via git) and that works fine, as in
> every distro on earth.
>
> Hehe, but I seldom use distro kernels, not even when I used Red
> Hat or Mandrake in old times :-)

I tried that with Ubuntu 8.04 and the resulting kernel wouldn't boot.
Only when I went through the process of making the ".deb" and
installing that did the new kernel start properly. I didn't
investigate it thoroughly as I was only testing one patch - I quickly
fled back to openSUSE.

Larry

2008-08-21 17:48:14

by Sean Hodges

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

On Sat, 2008-08-16 at 00:29 +0200, Michael Buesch wrote:
> This is the first part for the rewrite of the b43 PHY API.
> This is needed in order to make development of N and LP code possible.
>
> PLEASE TEST TEST TEST TEST TEST
>
> Lots of testing on lots of different devices is needed to ensure this
> doesn't introduce regressions due to typos.
> 95% of the patch just moves large parts of the PHY code from one file
> to another. More move-patches will follow.
> 5% of the patch introduces an "ops" based PHY API.
>
> Please test on all of your devices.
>
> http://bu3sch.de/patches/wireless-testing/20080816-0023/patches/002-b43-phy-ops.patch
> Apply against wireless-testing.git

As a novice to driver development, is there some way I can help with
testing this?

I have no experience of driver development/testing, but have an N-PHY
BCM4328 wireless NIC that is just itching to be eventually freed from
ndiswrapper :) I'd be happy to lend some help testing new patches and
feeding back results, if I could get a few pointers on where to get
started...

I'm running 2.6.24-19 kernel release, and my card is listed by lspci as:

06:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n
(rev 03)


Sean







2008-08-18 12:58:08

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY -- good on 4311

On Monday 18 August 2008 09:41:10 Holger Schurig wrote:
> > I know, which is one of the reasons I don't use a Debian-based
> > distro. I want nothing to do with one whose stated goal is to
> > make it so difficult to change the kernel that the users won't
> > do it.
>
> Huh? I use "make install modules_install" from my kernel source
> dir (which I usually get via git) and that works fine, as in
> every distro on earth.

I can only second that.
I simply ignore any distro specific kernel handling and override
the grub/yaboot entries as I desire. I also ignore any rpm or deb
for installing a kernel. I do it this way since the very beginning
and it works fine on debian and non-debian distros.

In general, I do always ignore the packet manager, but install
custom compiled software in a specific directory so it does not
interfere in any way with the distro packets.


--
Greetings Michael.

2008-08-24 12:26:50

by Benoît Knecht

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

Michael Buesch wrote:
> PLEASE TEST TEST TEST TEST TEST

I tested your patch on my 4318, and it seems performance and stability
are pretty much the same as unpatched wireless-testing. Here's what
dmesg has to say:
# dmesg | grep b43
b43-pci-bridge 0001:10:12.0: enabling device (0004 -> 0006)
b43-phy0: Broadcom 4318 WLAN found
b43-phy0 debug: Found PHY: Analog 3, Type 2, Revision 7
b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 8
b43-phy0 debug: DebugFS (CONFIG_DEBUG_FS) not enabled in kernel config
firmware: requesting b43/ucode5.fw
firmware: requesting b43/pcm5.fw
firmware: requesting b43/b0g0initvals5.fw
firmware: requesting b43/b0g0bsinitvals5.fw
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
b43-phy0 debug: Chip initialized
b43-phy0 debug: 32-bit DMA initialized
b43-phy0 debug: Wireless interface started
b43-phy0 debug: Adding Interface type 2
b43-phy0: Radio turned on by software
b43-phy0 debug: Using hardware based encryption for keyidx: 0, mac:
00:16:b6:a3:26:91
b43-phy0 debug: Using hardware based encryption for keyidx: 1, mac:
ff:ff:ff:ff:ff:ff

and the exact description of my card:
# lspci -vn
0001:10:12.0 0280: 14e4:4318 (rev 02)
Subsystem: 106b:4318
Flags: bus master, fast devsel, latency 16, IRQ 52
Memory at 80084000 (32-bit, non-prefetchable) [size=3D8K]
Kernel driver in use: b43-pci-bridge
Kernel modules: ssb

I transfered some files around using both patched and unpatched
wireless-testing, and I get very similar results in both cases:
around 2.6 MB/s upload and 3.5 MB/s download. This is a couple rooms
away from the AP, with a signal quality of 58/100.

I will continue using this kernel for some time, and will report back
here if I notice anything peculiar.

I hope I didn't forget anything useful, but the bottom line is that I
didn't see any difference between patched and unpatched
wireless-testing, and if you need me to run some more tests, I'd be
happy to; please let me know.

--
Beno=C3=AEt

2008-08-21 13:08:25

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

On Thursday 21 August 2008 00:40:32 Larry Finger wrote:
> Michael Buesch wrote:
> > This is the first part for the rewrite of the b43 PHY API.
> > This is needed in order to make development of N and LP code possible.
> >
> > PLEASE TEST TEST TEST TEST TEST
> >
> > Lots of testing on lots of different devices is needed to ensure this
> > doesn't introduce regressions due to typos.
> > 95% of the patch just moves large parts of the PHY code from one file
> > to another. More move-patches will follow.
> > 5% of the patch introduces an "ops" based PHY API.
> >
> > Please test on all of your devices.
>
> I have now tested on a BCM4311/2 with positive results. The transmit
> throughput is roughly the same at 20.7 Mbs with a 54 Mbs bulk rate.

Thanks :)

I'll also do more testing and submit the patch soon.

Anybody who didn't test his device, yet, please do so. If you discover
a breakage after the merge, that will be _very_ unfortunate and we will have
to live with the breakage until it is fixed (which can be very hard to do).

--
Greetings Michael.

2008-08-16 04:01:05

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

Michael Buesch wrote:
> This is the first part for the rewrite of the b43 PHY API.
> This is needed in order to make development of N and LP code possible.
>
> PLEASE TEST TEST TEST TEST TEST
>
> Lots of testing on lots of different devices is needed to ensure this
> doesn't introduce regressions due to typos.
> 95% of the patch just moves large parts of the PHY code from one file
> to another. More move-patches will follow.
> 5% of the patch introduces an "ops" based PHY API.
>
> Please test on all of your devices.

The patch works fine on the 802.11g portion of my BCM4312/1, which
seems to be the same as a BCM4311/1. This card has a PCIe format. I
also tested on my PCMCIA version of a BCM4318. That card works, but
the maximum transmit rate is only about 1/2 of what I get without it.
The card has a rev 09 802.11 core, a rev 7 PHY, and a rev 3 analog
part. I still have to test on a PCI format BCM4306/3 card, but I
suspect that you have already tested the 4306.

Larry

2008-08-20 22:40:40

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY

Michael Buesch wrote:
> This is the first part for the rewrite of the b43 PHY API.
> This is needed in order to make development of N and LP code possible.
>
> PLEASE TEST TEST TEST TEST TEST
>
> Lots of testing on lots of different devices is needed to ensure this
> doesn't introduce regressions due to typos.
> 95% of the patch just moves large parts of the PHY code from one file
> to another. More move-patches will follow.
> 5% of the patch introduces an "ops" based PHY API.
>
> Please test on all of your devices.

I have now tested on a BCM4311/2 with positive results. The transmit
throughput is roughly the same at 20.7 Mbs with a 54 Mbs bulk rate.

Larry


2008-08-18 13:01:51

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH RFT] b43: Rewrite PHY API for N-PHY/LP-PHY -- good on 4311

On Sunday 17 August 2008 21:26:21 Ehud Gavron wrote:
> Works fine here. iperf same results as prior to patch.
>
> b43-phy0: Broadcom 4311 WLAN found
> b43-phy0 debug: Found PHY: Analog 4, Type 2, Revision 8
> b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2

Thanks a lot for testing.

I want to encourage people again to test this patch.
This really needs a lot of testing, because a regression caused by this
would really really be a bad thing.
Even if you think your card was already tested by somebody else, please test
it anyway. There are so many different cards with matching revision numbers
that really are slightly different.

Get wireless-testing.git:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git

and apply the patch
http://bu3sch.de/patches/wireless-testing/20080816-0023/patches/002-b43-phy-ops.patch

Please test basic features, throughput and longterm stability of the connection.

--
Greetings Michael.