2009-01-14 15:30:52

by Lorenzo Nava

[permalink] [raw]
Subject: [b43] opensource firmware

Hello everybody,

we completed the 1st version of initvals. They are available at http://www.ing.unibs.it/openfwwf
. Currently only binary version is available: don't worry, we will
publish source code as soon as possible!! This first version is a
"test version": please try it and let us know if everythink is ok...

Today we have also tested a new firmware version that works with WPA2-
personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS) (tested
on 4306 and 4318 PCI device). If anybody was interested please try new
firmware with encryption and let us know if it works correctly, thanks!

Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf

Cheers

Lorenzo Nava
Francesco Gringoli




2009-01-14 17:43:36

by Larry Finger

[permalink] [raw]
Subject: Re: [b43] opensource firmware

Lorenzo Nava wrote:

> Today we have also tested a new firmware version that works with
> WPA2-personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS)
> (tested on 4306 and 4318 PCI device). If anybody was interested please
> try new firmware with encryption and let us know if it works correctly,
> thanks!

On my BCM4318 (Linksys WPC54G, Ver 3) in a Cardbus format in a
WPA2-personal encrypted network with AES algorithm, it nearly worked.
With your firmware, it can scan and authenticate. It even gets an
DHCP-supplied IP address; however, I get no data through the link. In
addition, I see lots of PHY TRANSMISSION ERRORS. When I disable
hardware encryption (nohwcrypt=1), then it works.

Great job.

Larry

2009-01-14 21:21:15

by Johannes Berg

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wed, 2009-01-14 at 16:09 -0500, John W. Linville wrote:
> On Wed, Jan 14, 2009 at 09:45:22PM +0100, Johannes Berg wrote:
> >
> > > Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
> >
> > I suggest that before this is packaged, we change it so b43 can
> > recognise it and automatically disable qos and hwcrypto.
>
> That's a good idea. Is that simply a driver patch?

Should be fairly simple, yeah.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2009-01-15 10:48:45

by Ehud Gavron

[permalink] [raw]
Subject: Re: [b43] opensource firmware



Lorenzo Nava wrote:
> Yes, you're right. Actually there are 2 ways to make firmware works:
> 1) Disable hw crypto with module parameter
> 2) Remove pcm5.fw from your /lib/firmware/b43 directory
>
> When I run the firmware I never include pcm5.fw file. The only
> initvals really necessary are b0g0bsinitvals.fw and b0g0bsinitvals.fw.
>
Pardon me, but those filenames are identical and contain no numbers.
Did those get stripped off somewhere?
> cheers
>
> Lorenzo
>
Larry Finger had written:
>> Great job.
>>
>> Larry
>>
>>
Absolutely!!!!!!!!

Ehud

--
Legal Disclaimer that you are now contractually bound to under all laws with no recourse:
http://attrition.org/security/rants/z/disclaimers.html


2009-01-15 16:10:29

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Thursday 15 January 2009 16:59:11 Larry Finger wrote:
> Michael Buesch wrote:
> > Yes, please introduce a feature-bitfield at some location in SHM that's unused
> > by the proprietary firmware. This bitfields would contain a bit for QoS and
> > a bit for hwcrypto.
> > Also change your firmware so the driver detects it as open-source firmware.
> > I think that's done by writing 0xFFFF to the date/time field in SHM. I don't
> > quite remember, but it's something like that.
> > Note that this might mean that the firmware watchdog in the driver will trigger,
> > as that's enabled by the open-source-firmware-flag. We might want to temporarly
> > disable the watchdog in the driver for the time being.
>
> I like the idea of encoding the capabilities in the firmware as it
> would be a self-documenting method as the firmware evolves.
>
> Is using the Broadcom names for the firmware the best course of
> action? What if the opensource firmware files were named something
> like "os-ucode5.fw", etc. and b43 were coded to check for those files
> first? It would then fall back to the standard firmware if the
> opensource version is not found.

Already implemented here:
http://bu3sch.de/patches/wireless-testing/20081227-1821/patches/008-b43-probe-open-fw.patch
I just need to fix a leak in an error path before pushing that upstream.

--
Greetings, Michael.

2009-01-15 10:20:19

by Lorenzo Nava

[permalink] [raw]
Subject: Re: [b43] opensource firmware

> Pardon me, but those filenames are identical and contain no numbers. Did
> those get stripped off somewhere?
>>

I did a mistake. The correct name are b0g0bsinitvals5.fw and
b0g0initvals5.fw for revision 5.

Sorry

Cheers

Lorenzo

2009-01-15 22:59:42

by Francesco Gringoli

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Jan 15, 2009, at 4:59 PM, Larry Finger wrote:

> Michael Buesch wrote:
>> Yes, please introduce a feature-bitfield at some location in SHM
>> that's unused
>> by the proprietary firmware. This bitfields would contain a bit for
>> QoS and
>> a bit for hwcrypto.
>> Also change your firmware so the driver detects it as open-source
>> firmware.
>> I think that's done by writing 0xFFFF to the date/time field in
>> SHM. I don't
>> quite remember, but it's something like that.
>> Note that this might mean that the firmware watchdog in the driver
>> will trigger,
>> as that's enabled by the open-source-firmware-flag. We might want
>> to temporarly
>> disable the watchdog in the driver for the time being.
>
> I like the idea of encoding the capabilities in the firmware as it
> would be a self-documenting method as the firmware evolves.
>
> Is using the Broadcom names for the firmware the best course of
> action? What if the opensource firmware files were named something
> like "os-ucode5.fw", etc. and b43 were coded to check for those files
> first? It would then fall back to the standard firmware if the
> opensource version is not found.
>
> Larry
It could be interesting to also not separate the initvalues in two
different files, everything could be coded in a single file. Never
understood why original init values are split in two files.

Michael: SHM(0x0014) (16bit) is not used by the open source firmware,
I know the b43 reads core revision from SHM(0x0016). Normally
SHM(0x0014) is set to zero. We can put fw capabilities here (0x0014),
e.g.:

- bit 0: [0 state that encryption should be handled by b43]
- bit 1: [0 state that qos is not supported]

We can prepare a firmware image with such feature + watchdog. Posting
ASAP with new initvals (less values).

A question: is the standard kernel aware that date set to FFFF
indicates an opensource firmware or some define should be activated on
compilation?

Cheers,
-FG

2009-01-14 17:48:55

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wednesday 14 January 2009 18:43:27 Larry Finger wrote:
> Lorenzo Nava wrote:
>
> > Today we have also tested a new firmware version that works with
> > WPA2-personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS)
> > (tested on 4306 and 4318 PCI device). If anybody was interested please
> > try new firmware with encryption and let us know if it works correctly,
> > thanks!
>
> On my BCM4318 (Linksys WPC54G, Ver 3) in a Cardbus format in a
> WPA2-personal encrypted network with AES algorithm, it nearly worked.
> With your firmware, it can scan and authenticate. It even gets an
> DHCP-supplied IP address; however, I get no data through the link. In
> addition, I see lots of PHY TRANSMISSION ERRORS. When I disable
> hardware encryption (nohwcrypt=1), then it works.

Support for hardware crypto would require to reverse engineer the PCM firmware, first.
So we can't support hw-crypto, except on new devices that don't have a PCM anymore.
But these are not rev5 cores :)

--
Greetings, Michael.

2009-01-14 20:54:51

by Johannes Berg

[permalink] [raw]
Subject: Re: [b43] opensource firmware


> Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf

I suggest that before this is packaged, we change it so b43 can
recognise it and automatically disable qos and hwcrypto.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part

2009-01-15 15:59:28

by Larry Finger

[permalink] [raw]
Subject: Re: [b43] opensource firmware

Michael Buesch wrote:
> Yes, please introduce a feature-bitfield at some location in SHM that's unused
> by the proprietary firmware. This bitfields would contain a bit for QoS and
> a bit for hwcrypto.
> Also change your firmware so the driver detects it as open-source firmware.
> I think that's done by writing 0xFFFF to the date/time field in SHM. I don't
> quite remember, but it's something like that.
> Note that this might mean that the firmware watchdog in the driver will trigger,
> as that's enabled by the open-source-firmware-flag. We might want to temporarly
> disable the watchdog in the driver for the time being.

I like the idea of encoding the capabilities in the firmware as it
would be a self-documenting method as the firmware evolves.

Is using the Broadcom names for the firmware the best course of
action? What if the opensource firmware files were named something
like "os-ucode5.fw", etc. and b43 were coded to check for those files
first? It would then fall back to the standard firmware if the
opensource version is not found.

Larry


2009-01-15 15:44:52

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Thursday 15 January 2009 16:37:57 Michael Buesch wrote:
> On Wednesday 14 January 2009 21:45:22 Johannes Berg wrote:
> >
> > > Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
> >
> > I suggest that before this is packaged, we change it so b43 can
> > recognise it and automatically disable qos and hwcrypto.
>
> Yes, please introduce a feature-bitfield at some location in SHM that's unused
> by the proprietary firmware. This bitfields would contain a bit for QoS and
> a bit for hwcrypto.
> Also change your firmware so the driver detects it as open-source firmware.
> I think that's done by writing 0xFFFF to the date/time field in SHM. I don't
> quite remember, but it's something like that.
> Note that this might mean that the firmware watchdog in the driver will trigger,
> as that's enabled by the open-source-firmware-flag. We might want to temporarly
> disable the watchdog in the driver for the time being.
>

Ah and also note that hwcrypto is already automagically disabled, if the driver
detects an opensource-firmware.
To make the driver detect the firmware as opensource, write 0xFFFF to SHM_UCODEDATE

You need to disable the watchdog in b43_periodic_every15sec(), if you don't implement
the watchdog mechanism in your firmware. But it's pretty easy to implement.
It just has to write 0 to some register in the MAC loop. Of course, the register has
to be unused in the rest of the code.

--
Greetings, Michael.

2009-01-16 15:13:17

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Friday 16 January 2009 00:01:41 Francesco Gringoli wrote:
> On Jan 15, 2009, at 4:59 PM, Larry Finger wrote:
>
> > Michael Buesch wrote:
> >> Yes, please introduce a feature-bitfield at some location in SHM
> >> that's unused
> >> by the proprietary firmware. This bitfields would contain a bit for
> >> QoS and
> >> a bit for hwcrypto.
> >> Also change your firmware so the driver detects it as open-source
> >> firmware.
> >> I think that's done by writing 0xFFFF to the date/time field in
> >> SHM. I don't
> >> quite remember, but it's something like that.
> >> Note that this might mean that the firmware watchdog in the driver
> >> will trigger,
> >> as that's enabled by the open-source-firmware-flag. We might want
> >> to temporarly
> >> disable the watchdog in the driver for the time being.
> >
> > I like the idea of encoding the capabilities in the firmware as it
> > would be a self-documenting method as the firmware evolves.
> >
> > Is using the Broadcom names for the firmware the best course of
> > action? What if the opensource firmware files were named something
> > like "os-ucode5.fw", etc. and b43 were coded to check for those files
> > first? It would then fall back to the standard firmware if the
> > opensource version is not found.
> >
> > Larry
> It could be interesting to also not separate the initvalues in two
> different files, everything could be coded in a single file. Never
> understood why original init values are split in two files.

The normal initvalues have to be uploaded at init and the bandswitch init
values have to be uploaded on bandswitch. That's a different thing.
We currently implement bandswitch by re-initing, but that doesn't matter. We could
easily change that in future.
So don't put the initvals into one file.

> Michael: SHM(0x0014) (16bit) is not used by the open source firmware,

Eh no. You need to find an offset that's not used by the PROPRIETARY firmware.

> A question: is the standard kernel aware that date set to FFFF
> indicates an opensource firmware

Yes.

--
Greetings, Michael.

2009-01-15 15:38:41

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wednesday 14 January 2009 21:45:22 Johannes Berg wrote:
>
> > Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
>
> I suggest that before this is packaged, we change it so b43 can
> recognise it and automatically disable qos and hwcrypto.

Yes, please introduce a feature-bitfield at some location in SHM that's unused
by the proprietary firmware. This bitfields would contain a bit for QoS and
a bit for hwcrypto.
Also change your firmware so the driver detects it as open-source firmware.
I think that's done by writing 0xFFFF to the date/time field in SHM. I don't
quite remember, but it's something like that.
Note that this might mean that the firmware watchdog in the driver will trigger,
as that's enabled by the open-source-firmware-flag. We might want to temporarly
disable the watchdog in the driver for the time being.

--
Greetings, Michael.

2009-01-14 16:06:13

by Lorenzo Nava

[permalink] [raw]
Subject: Re: [b43] opensource firmware

Great!

Thank you very much for the help... qos=0 parameter was still needed,
so it is correct.

cheers

Lorenzo Nava.

On Jan 14, 2009, at 4:57 PM, Buran Ayuthia wrote:

> My 4311 rev 01 card still works with the new initvals and firmware
> using WPA2-personal (both TKIP and CCMP) and without encyrption. I am
> still loading the module using modprobe b43 qos=0.
>
> Buran Ayuthia
>
> On Wed, Jan 14, 2009 at 9:30 AM, Lorenzo Nava <[email protected]>
> wrote:
>> Hello everybody,
>>
>> we completed the 1st version of initvals. They are available at http://www.ing.unibs.it/openfwwf
>> . Currently only binary version is available: don't worry, we will
>> publish source code as soon as possible!! This first version is a
>> "test version": please try it and let us know if everythink is ok...
>>
>> Today we have also tested a new firmware version that works with
>> WPA2-
>> personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS) (tested
>> on 4306 and 4318 PCI device). If anybody was interested please try
>> new
>> firmware with encryption and let us know if it works correctly,
>> thanks!
>>
>> Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
>>
>> Cheers
>>
>> Lorenzo Nava
>> Francesco Gringoli
>>
>>
>> _______________________________________________
>> Bcm43xx-dev mailing list
>> [email protected]
>> https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
>>


2009-01-14 21:32:41

by Kyle McMartin

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wed, Jan 14, 2009 at 10:20:50PM +0100, Johannes Berg wrote:
> On Wed, 2009-01-14 at 16:09 -0500, John W. Linville wrote:
> > On Wed, Jan 14, 2009 at 09:45:22PM +0100, Johannes Berg wrote:
> > >
> > > > Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
> > >
> > > I suggest that before this is packaged, we change it so b43 can
> > > recognise it and automatically disable qos and hwcrypto.
> >
> > That's a good idea. Is that simply a driver patch?
>
> Should be fairly simple, yeah.
>

Testing a patch now, I'll fire it off to the list when I've made
sure it works alright. (Damn, my cardbus b43 card appears to have bought
the farm recently. Oh well. I'll figure something out)

regards, Kyle

2009-01-14 21:15:49

by John W. Linville

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wed, Jan 14, 2009 at 09:45:22PM +0100, Johannes Berg wrote:
>
> > Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
>
> I suggest that before this is packaged, we change it so b43 can
> recognise it and automatically disable qos and hwcrypto.

That's a good idea. Is that simply a driver patch?

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2009-01-21 17:29:44

by Francesco Gringoli

[permalink] [raw]
Subject: Re: [b43] opensource firmware

Hello everyone,

we just made available a new opensource firmware version, download at http://www.ing.unibs.it/openfwwf

New features:
- initvals source code added, initvals files are encoded by make process
- firmware is now recognized as opensource, though still as version
351 (old format). Firmware's date switched to FFFF
- watchdog implemented

Tested with kernel 2.6.29-rc2-wl.

Cheers,
-FG

2009-01-14 15:57:12

by Buran Ayuthia

[permalink] [raw]
Subject: Re: [b43] opensource firmware

My 4311 rev 01 card still works with the new initvals and firmware
using WPA2-personal (both TKIP and CCMP) and without encyrption. I am
still loading the module using modprobe b43 qos=0.

Buran Ayuthia

On Wed, Jan 14, 2009 at 9:30 AM, Lorenzo Nava <[email protected]> wrote:
> Hello everybody,
>
> we completed the 1st version of initvals. They are available at http://www.ing.unibs.it/openfwwf
> . Currently only binary version is available: don't worry, we will
> publish source code as soon as possible!! This first version is a
> "test version": please try it and let us know if everythink is ok...
>
> Today we have also tested a new firmware version that works with WPA2-
> personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS) (tested
> on 4306 and 4318 PCI device). If anybody was interested please try new
> firmware with encryption and let us know if it works correctly, thanks!
>
> Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf
>
> Cheers
>
> Lorenzo Nava
> Francesco Gringoli
>
>
> _______________________________________________
> Bcm43xx-dev mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
>

2009-01-21 17:37:11

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wednesday 21 January 2009 18:29:40 Francesco Gringoli wrote:
> Hello everyone,
>
> we just made available a new opensource firmware version, download at http://www.ing.unibs.it/openfwwf
>
> New features:
> - initvals source code added, initvals files are encoded by make process
> - firmware is now recognized as opensource, though still as version
> 351 (old format). Firmware's date switched to FFFF
> - watchdog implemented

Note that the debug-IRQ feature is now also available to you.
It enables you to panic, dump SHM, dump regs and print a marker message
from within the firmware. See my openfw repository and handle_irq_ucode_debug() in b43 for details.
Note that the debug-IRQ is synchronous, so it will disturb MAC functionality.
But you only want to use it for debugging anyway. And for debugging it is _very_ convenient
to be able to issue printks and memory dumps from within the firmware code.

--
Greetings, Michael.

2009-01-14 15:45:46

by John W. Linville

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Wed, Jan 14, 2009 at 04:30:47PM +0100, Lorenzo Nava wrote:
> Hello everybody,
>
> we completed the 1st version of initvals. They are available at http://www.ing.unibs.it/openfwwf
> . Currently only binary version is available: don't worry, we will
> publish source code as soon as possible!! This first version is a
> "test version": please try it and let us know if everythink is ok...
>
> Today we have also tested a new firmware version that works with WPA2-
> personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS) (tested
> on 4306 and 4318 PCI device). If anybody was interested please try new
> firmware with encryption and let us know if it works correctly, thanks!
>
> Initvals and new firmware version can be found at http://www.ing.unibs.it/openfwwf

Awesome...awesome...awesome!!!

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2009-01-25 18:37:43

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [b43] opensource firmware

2009/1/14 Lorenzo Nava <[email protected]>:
> we completed the 1st version of initvals. They are available at http:=
//http://www.ing.unibs.it/openfwwf
> . Currently only binary version is available: don't worry, we will
> publish source code as soon as possible!! This first version is a
> "test version": please try it and let us know if everythink is ok...
>
> Today we have also tested a new firmware version that works with WPA2=
-
> personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS) (tested
> on 4306 and 4318 PCI device). If anybody was interested please try ne=
w
> firmware with encryption and let us know if it works correctly, thank=
s!
>
> Initvals and new firmware version can be found at http://www.ing.unib=
s.it/openfwwf

I belive you still need testing?

I used openfwwf-5.0.tar.gz and initvals.tar.gz for my bcm4318 card in
Acer Aspire 5024 (qos=3D0). Scanning works fine, connecting to WPA
Personal network also. I can't check speed performance as I don't have
antenna connected to my card (notebook lid just gone... I belive
"Acer" explains that situation to you?). As for stability it's great.
I downloaded 100MB, left notebook for 24h and then downloaded another
50MB.

So to sum up: I don't feel any difference between opensource and
broardcom's firmware.

--=20
Rafa=C5=82 Mi=C5=82ecki

2009-01-15 23:17:49

by Kyle McMartin

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Thu, Jan 15, 2009 at 05:09:49PM +0100, Michael Buesch wrote:
> Already implemented here:
> http://bu3sch.de/patches/wireless-testing/20081227-1821/patches/008-b43-probe-open-fw.patch
> I just need to fix a leak in an error path before pushing that upstream.
>

Groovy, I had cooked a similar patch for Fedora but haven't gotten
around to packaging up the fw yet. Will sub in yours.

cheers, Kyle

2009-01-16 15:16:21

by Michael Büsch

[permalink] [raw]
Subject: Re: [b43] opensource firmware

On Friday 16 January 2009 00:17:43 Kyle McMartin wrote:
> On Thu, Jan 15, 2009 at 05:09:49PM +0100, Michael Buesch wrote:
> > Already implemented here:
> > http://bu3sch.de/patches/wireless-testing/20081227-1821/patches/008-b43-probe-open-fw.patch
> > I just need to fix a leak in an error path before pushing that upstream.
> >
>
> Groovy, I had cooked a similar patch for Fedora but haven't gotten
> around to packaging up the fw yet. Will sub in yours.

I think we can actually push my patch upstream. The remaining FIXME is not relevant
for the common case and it only matters in rare circumstances (I think A-PHY only, which
isn't implemented anyway). So we can fix it later.
The patch should work properly as-is for G/N/LP-PHY.

It probably needs a rediff against a current b43, however.

--
Greetings, Michael.

2009-01-15 09:10:03

by Lorenzo Nava

[permalink] [raw]
Subject: Re: [b43] opensource firmware

2009/1/14 Larry Finger <[email protected]>:
> Lorenzo Nava wrote:
>
>> Today we have also tested a new firmware version that works with
>> WPA2-personal (both TKIP and CCMP) and WPA2-enterprise (EAP-TTLS)
>> (tested on 4306 and 4318 PCI device). If anybody was interested please
>> try new firmware with encryption and let us know if it works correctly,
>> thanks!
>
> On my BCM4318 (Linksys WPC54G, Ver 3) in a Cardbus format in a
> WPA2-personal encrypted network with AES algorithm, it nearly worked.
> With your firmware, it can scan and authenticate. It even gets an
> DHCP-supplied IP address; however, I get no data through the link. In
> addition, I see lots of PHY TRANSMISSION ERRORS. When I disable
> hardware encryption (nohwcrypt=1), then it works.

Yes, you're right. Actually there are 2 ways to make firmware works:

1) Disable hw crypto with module parameter
2) Remove pcm5.fw from your /lib/firmware/b43 directory

When I run the firmware I never include pcm5.fw file. The only
initvals really necessary are b0g0bsinitvals.fw and b0g0bsinitvals.fw.

cheers

Lorenzo
>
> Great job.
>
> Larry
>