# Broadcom bcm43xx native drivers - bye bye ndiswrapper?

## Havin_it

'ning all,

This: http://www.osnews.com/story.php?news_id=12886

And this: https://forums.gentoo.org/viewtopic-t-409194.html

Now they have some working code, I'm intensely curious.  I don't have a Mac with an Airport, Ive got a Belkin 54g PCMCIA card (type F5D7010) that uses the same chipset.  Some questions:

1) [Inevitably] Might we be seeing this in Portage anytime soon?

2) Has anyone tried it on an x86 system with this or similar card? Success?

3) In the Airport-based thread above, they mention needing access to the original firmware to create the drivers.  Will this also be the case with the Wintel bcmwl5.sys drivers?

4) Will anyone consider an unofficial ebuild for ~x86?

It seems like exciting news, I'd just like to see what other people know/feel about it.

----------

## JoseJX

1. Not likely, the driver development is still moving too quickly.  Ubuntu already added it to their testing kernel and that's breaking things for people trying to update.

2. It should work on x86 and x86-64 as well.

3. You should read the README with the driver, but yes, you need the firmware blobs from an existing driver.  A list of options are in the fwcutter README, any version will do, but it's best to use the version that you know works with your card.

4. See #1, eventually, but not until things settle down.

----------

## Havin_it

Hi, thanks for the reply.  I understand if it's not ready for primetime yet - I had to wait for ndiswrapper to become usable for this card too.

I may give the nightly a try - I don't mind breaking things now and again - though I guess I'll still need to wait for the 2.6.15 kernel, according to their website.

If I get any success worth reporting, I'll do so here.

----------

## JoseJX

Any 2.6.15 release canidate will work, vanilla-sources works well as do the mm sources.  If you do have a problem to report, please add it to the thead that you linked to, it'll be easier for me to keep track of. :)

----------

## Havin_it

I'm raring to go with this, but don't seem to ave any 2.6.15 iterations in Portage for ~x86 yet (not even hard-masked).  Can't see anything on gentoo-portage either - are we talking third-party ebuilds here?

Re: posting findings in the thread above.  Are you sure that's appropriate?  It is in the PPC forum, plus (at the moment at least) heavily focussed on the Airport Extreme device.   Shouldn't there be an x86 (or platform-agnostic) thread?

Just my thoughts - I'll be happy to do as you ask if you think it's best   :Very Happy: 

----------

## PaulBredbury

 *Havin_it wrote:*   

> I'm raring to go with this, but don't seem to ave any 2.6.15 iterations in Portage

 

Kernels in portage. Scroll down to e.g. vanilla-sources.

----------

## Havin_it

Ah, fair play.  I was just looking in gentoo-sources.

I don't really wanna dump gentoo-sources if I can avoid it; can the vanilla kernel be installed side-by-side with it?

----------

## JoseJX

Of course.  All kernels are slotted which means they don't interfere with eachother.  Of course you can only boot one at a time. ;)  2.6.15 itself should be available within the next week or so, as soon as 2.6.15 is final, a Gentoo sources version will be released.

As for the post, the bcm43xx driver and the Airport Extreme are *exactly* the same thing.  There is nothing really ppc specific about the directions, it's in the PPC forum because there is no other workaround for using the chipset like NDIS wrapper on x86 and we're the most interested in a working native driver.  I can't guarantee that I'll check for other threads about it regularly, so posting in that thread about x86 is fine as far as I'm concerned.  I just want to see what issues people are running into so we can keep improving the driver. :)

----------

## Havin_it

Okay, you got it.  I'll wait until 2.6.15 hits gentoo-sources (hey, so I'm lazy!) and report in your thread   :Very Happy: 

One small question:  should I remove ndiswrapper completely, or is it suficient to disable the module from autoloading and remove the alias from modules.conf?

[gotta have my fallback route, y'know...]

----------

## Akaihiryuu

I'd recommend just removing ndiswrapper from modules.autoload.d first, until you're sure it's working with the native driver.  I can't wait for this myself, I've got a Compaq 2108CL laptop with a Broadcom 4306 wireless chipset...ndiswrapper works, but I've had stability issues with 1.5 (which is ~x86 and the only version that will compile against 2.6.14.2)...basically it crashes after a very short time if preempt is on, or a fairly long time but randomly if preempt is off.  It's rather annoying, I basically get a kernel panic that says ndiswrapper tried to divide by 0, my CPU usage goes way up, and I can't rmmod ndiswrapper.  The only cure for that is to reboot, which should *never* be necessary with Linux.  I may just go to ~x86 for my kernel on that machine so I can get the native driver.  Does anyone know if the native driver will be inclued in 2.6.15, or will it still be necessary to get it separately?  If it's necessary to get it separately, will it be in the portage tree?

----------

## Havin_it

From what's been said above, I don't think we'll be seeing it in portage before the kernel comes out - and when it does, given that code still needs to be ripped from the Windows driver to construct it, I doubt it'll be built directly into the kernel.

About ndiswrapper, there is a patch to fix version 1.2 to work with kernel-2.6.14, see here for details:

https://forums.gentoo.org/viewtopic-t-401119-highlight-.html

----------

## Akaihiryuu

Interesting...what are the chances of that modified ebuild and patch making it into the portage tree?  I guess I'm probably going to have to create a portage overlay directory for now.

----------

## Akaihiryuu

Just got done creating portage overlay and applying the 2.6.14 ndiswrapper-1.2 patch.  It compiled...sadly I don't have any way to test it here since I'm at work and there is no access point nearby that I can use.  I also want to recompile my kernel with preempt support before I try it...but I don't have enough battery power left in my laptop to do any more compiling.  Testing will have to wait until I get home.  Incidentally, enabling preempt in the kernel makes ndiswrapper-1.5 crashes MUCH more frequent.  With preempt on, I'm lucky to have wireless for 2 minutes...with preempt off it sometimes works for as long as a half hour.  Either way, ndiswrapper-1.5 doesn't work very well.

----------

## JoseJX

The native driver won't be included in the linux kernel until a few things happen.  We need to finish it first of all. ;)  Also, we're working on an official 802.11 stack for the kernel.  Once this has been decided, our driver has a much better chance of making it into the kernel.  The firmware portion is irrelevant, there are other drivers in the kernel now that need firmware to be loaded that isn't shipped with the kernel.

----------

## Akaihiryuu

Ok, I just finished testing ndiswrapper-1.2 with kernel 2.6.14.2.  It works fine now, I haven't had any more strange crashes like I did with 1.5.

----------

## loren71

I know it's a dumb question, but how do I apply the patch?  Does it patch the kernel, or ndiswrapper?  It would be great if this would allow me to

run 2.6.14.  Ndiswrapper is forcing me to run 2.6.13 which dosen't play nice with ati-drivers. PITA.  Oh happy days that all my laptop bits would

run on the same kernel! lol

----------

## Havin_it

The patch is for ndiswrapper-1.2, not the kernel-sources.  You can download it, along with a modified ebuild that applies it if you're running a 2.6.14 or 2.6.15 kernel, from the bug-report page:

https://bugs.gentoo.org/show_bug.cgi?id=111029

The best way to use them is to place them in a Portage overlay - if you don't know how to do this, a primer is here:

http://gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild

Just copy all of /usr/portage/distfiles/net-wireless/ndiswrapper into the overlay, replace the ndiswrapper-1.4.ebuild with the downloaded file, and place the patch in the 'files' directory.  Build a digest for the new ebuild (this will take care of the digest for the patch automatically) and you're ready.  You may also wish to issue

echo "=net-wireless/ndiswrapper-1.5" >>/etc/portage/package.mask

to prevent portage trying to install the newer version everytime you update world.

----------

## loren71

Thanks Havin_it.  It works now.  I originally tried it on 2.6.14.3.  It compiled, but wouldn't load.  2.6.14.2 works perfect!

----------

## MixMax

It seems like we'r finaly getting some sort of native support for broadcom wlan cards. 

I know it's in realy early stages, but it looks very promising.

Here's the site.

http://bcm43xx.berlios.de/

----------

## Raftysworld

A shapshot hit portage today marked ~ppc

----------

## e-ipi

 *Raftysworld wrote:*   

> A shapshot hit portage today marked ~ppc

 

Has anyone tried to emerge it besides me?  The ieee80211softmac ebuild fails with a bunch of complaints about not finding asm/*.h.   Here's fhe first example (it goes on and on like this):

 * Preparing ieee80211softmac module

make -C /lib/modules/2.6.15/build M=/var/tmp/portage/ieee80211softmac-0.1-r20060105/work/ieee80211softmac-0.1 modules

make[1]: Entering directory `/usr/src/linux-2.6.15'

  CC [M]  /var/tmp/portage/ieee80211softmac-0.1-r20060105/work/ieee80211softmac-0.1/ieee80211softmac_io.o

include/linux/kernel.h:11 ©ç include ³ê½t@C,

                 /var/tmp/portage/ieee80211softmac-0.1-r20060105/work/ieee80211softmac-0.1/net/ieee80211softmac.h:4 ©ç,

                 /var/tmp/portage/ieee80211softmac-0.1-r20060105/work/ieee80211softmac-0.1/ieee80211softmac_priv.h:4 ©ç,

                 /var/tmp/portage/ieee80211softmac-0.1-r20060105/work/ieee80211softmac-0.1/ieee80211softmac_io.c:35 ©ç:

include/linux/linkage.h:5:25: asm/linkage.h: »Ìæ¤Èt@CâfBNgÍ  èÜ¹ñ

Did I forget something?

----------

## Havin_it

Folks,  JoseJX has requested for all discussion/bughunting on bcm43xx to be done in his own thread over in the PPC forum.  It's the second link in my original post - please post any problems there.

EDIT:  All right, here it is again - for the lazy people

https://forums.gentoo.org/viewtopic-t-409194.html

Thanks  :Wink: 

----------

## Akaihiryuu

It's nice to see bcm43xx in net-wireless.  Looks like for the moment the only keyword it has is ~ppc.  I guess that the native driver is MUCH more important at this stage for the ppc people than the x86 people though...the x86 people have access to ndiswrapper until the driver is completely stable and ready across all architectures, while the ppc people are left unable to use their wireless until the native driver is ready.  I do hope they put it at least in ~x86 soon though, I'd really like to try it out on my laptop.

----------

## e-ipi

 *Akaihiryuu wrote:*   

> It's nice to see bcm43xx in net-wireless.  Looks like for the moment the only keyword it has is ~ppc.  I guess that the native driver is MUCH more important at this stage for the ppc people than the x86 people though...the x86 people have access to ndiswrapper until the driver is completely stable and ready across all architectures, while the ppc people are left unable to use their wireless until the native driver is ready.  I do hope they put it at least in ~x86 soon though, I'd really like to try it out on my laptop.

 

Do check out the ppc thread if you haven't already.  There are x86 and amd64 people using this stuff, and it's easy enough to build and install the softmac and bcm43xx drivers on your own.

----------

## Havin_it

Get your syncs in, folks - both bcm43xx and ieee80211softmac are now ~x86 and ~amd64 ready for a couple of days already.

The builds are *-20060105.  No bcm43xx-devicescape or fwcutter yet though...

----------

## Akaihiryuu

I have all my systems set to sync on Tuesday morning.  Well actually my server syncs first, and then my other systems sync to my server's rsync mirror.  I'm lazy and don't like to spend time doing world updates more than once a week.

----------

## prometheanfire

got it working but not with dhcp, now to wait for kismet...  :Cool: 

----------

## soulwarrior

 *mthode wrote:*   

> got it working but not with dhcp, now to wait for kismet... 

 

I just read this on the Kismet homepage:

 *Quote:*   

> 
> 
> Broadcom, Madwifi-ng
> 
> A new svn checkin of the stable-devel tree just went up. This restores the highly experimental support for madwifi-ng (by working around the broken values in the new cvs commits of the driver), and adds experimental support for broadcom (yeah, I know, I never imagined it either).
> ...

 

(http://www.kismetwireless.net/blog/index.php?entry=/kismet/entry-1134328776.txt)

Greetings,

soulwarrior

----------

## prometheanfire

The error I get is 

```

Will drop privs to mthode (1000) gid 100

No specific sources given to be enabled, all will be enabled.

Enabling channel hopping.

Enabling channel splitting.

Source 0 (addme): Enabling monitor mode for bcm43xx source interface eth3 channel 6...

[b]FATAL: SetIFFlags: Unknown interface eth3: No such file or directory[/b]

```

I think that it is a problem with the drivers themselves

----------

## Akaihiryuu

I just got done installing vanilla-sources-2.6.15.1, softmac, and bcm43xx (using a Compaq Athlon XP-M laptop). It detects my wireless, it shows up as eth1, but sadly it's not in a state where I can use it yet (as least not at home), for 2 reasons. 1) the driver doesn't yet support scanning, which is annoying, but I could deal with it except for 2) it doesn't seem to work with WEP yet. Since my home network is WEP-encrypted, I'm still stuck with ndiswrapper for the time being. I hope these issues are resolved soon.

----------

## Adrien

Have you guys installed the bcm43xx firmware or not?

----------

## prometheanfire

This is all that I have done.

I have emerged 80211softmac and bcm43xx

I tried fwcutter and while I could get to the cutting part the part in typing make in the driver folder failed.

----------

## Akaihiryuu

I just did emerge bcm43xx, which included softmac as a dependency.  Didn't see anything about firmware.  Just looked through the portage tree...if there's firmware in there for my card (bcm4306), I can't find it.

----------

## Adrien

 *mthode wrote:*   

> I tried fwcutter and while I could get to the cutting part the part in typing make in the driver folder failed.

 

You should try again, I'm almost sure it won't be possible to bring your iface up without the firmware installed in /lib/firmware. After you extracted the .fw files it's something like:

```
# make installfw
```

 *Akaihiryuu wrote:*   

> Just looked through the portage tree...if there's firmware in there for my card (bcm4306), I can't find it.

 

Not in portage. Like mthode, you'll have to get fwcutter to extract the firmware from a windows .sys file.

----------

## Akaihiryuu

Got that done...it works, I can bring up the interface and connect to the access point, but DHCP doesn't work.  See the PPC thread for more details, it still doesn't work.

----------

## prometheanfire

it still will fail when I tell it to

```
ifconfig eth3 up
```

dmesg tells me

```
bcm43xx: Error: Microcode "bcm43xx_microcode5.fw" not available or load failed.
```

when it is in /lib/firmware

BTW I am using the drivers that came for this card (the 64bit version)

----------

## Akaihiryuu

Look in /lib/firmware and see if the file it's looking for is in there.

----------

## prometheanfire

It is in there

```
ls /lib/firmware/

bcm43xx_initval01.fw  bcm43xx_initval06.fw  bcm43xx_microcode2.fw

bcm43xx_initval02.fw  bcm43xx_initval07.fw  bcm43xx_microcode4.fw

bcm43xx_initval03.fw  bcm43xx_initval08.fw  bcm43xx_microcode5.fw

bcm43xx_initval04.fw  bcm43xx_initval09.fw  bcm43xx_pcm4.fw

bcm43xx_initval05.fw  bcm43xx_initval10.fw  bcm43xx_pcm5.fw
```

----------

## Adrien

 *mthode wrote:*   

> It is in there
> 
> ```
> ls /lib/firmware/
> 
> ...

 

Have you just retried extraction and installation, just to check out?

----------

## prometheanfire

done it 3 times

----------

