# Ndis causes kernel panic at boot



## fbsduser (Dec 26, 2011)

Hi. 

I got (in June this year) a brand new HP Pavilion G4-1065la with Ubuntu 11.04 64bits preloaded (it was a limited edition of Linux based Pavilion G4 laptops for Latin-American countries, that came with Linux and without the Windows tax, making them cheap. This edition was never advertised on HP's website, I found out about it because the laptop I bought at the local computer store was suspiciously cheap, and when I unpacked it I got the surprise when I found a "powered by Ubuntu" sticker instead of the usual "Windows" one, and an Ubuntu LiveDVD included, and obviously one big partition with Ubuntu installed on it plus the swap partition).

Of course everything works OOTB in Ubuntu. I got FreeBSD 9.0 rc3 x86 installed next to ubuntu on this box. But the wireless card (MS-approved, HP-certified, Broadcom BCM4313 abgn/ BCM 2070 BT 2.1+EDR piece of SHIT card) just won't work.

Tried ndisgen using this XP driver to get the wireless card going. Used the bcmwl5.inf and bcmwl5.sys (don't know if it contains a firmware file, if it does tell me which one is it) files and then followed these steps, and put this wpa_supplicant.conf file in /etc. 

But when I reboot it gets stuck in "ndis. NDIS API 5.1". If I remove all the references to ndis it boots but as soon as I *kldload* the bcmwl5_sys driver I get a kernel panic (I attached the crash dump files in an archive). 

I would like to know if it is a known problem in the FreeBSD 9.0rc3 version of ndisulator? Or is there any other driver that will work better (is there a Win98 driver for that card, because the PCBSD guys say that with the Win98 driver it works, yet I tried to find a Win98 driver but found nothing).

TIA.


----------



## yipidee (Dec 31, 2011)

I have the same wireless card in my Acer Aspire One, I used NDIS wrapper and the XP drivers you mentioned in the OP. If I try to load the bcmwl5 module at boot I get a kernel panic, but if I *kldload* it after boot it works fine. It's definitely possible to use this wi-fi card in FreeBSD 9.0-RC3 using NDIS.


----------



## yipidee (Dec 31, 2011)

Try moving your bcmwl5_sys.ko to /boot/modules/ instead of /boot/kernel/.


----------



## fbsduser (Jan 1, 2012)

yipidee said:
			
		

> I have the same wireless card in my Acer Aspire One, I used NDIS wrapper and the XP drivers you mentioned in the OP. If I try to load the bcmwl5 module at boot I get a kernel panic, but if I *kldload* it after boot it works fine. It's definitely possible to use this wi-fi card in FreeBSD 9.0-RC3 using NDIS.



Is it the same exact card (bcm4313wifi+bcm2070bt)? Or the wifi only bcm4313?

Because the problem I have is that I don't get a kernel panic by loading them at boot. When I try to load at boot it just gets stuck in the "NDIS API" part. There is no core dump or anything like that. It just won't move past that. The kernel panic IS when I *kldload* it after boot. Also this happens whether the driver file is in /boot/kernel (where I used to have it) or in /boot/modules (where I have it now).

The only other thing to ask is if you added any file as firmware (is there even a firmware file in that archive)? That, whether your card is a wifi+bt or wifi only and how the HP bits in the card firmware act are the only things that might affect it (HP puts some propietary stuff in the card's firmware to allow the laptop's BIOS to differentiate between the (artificially expensive) HP and the generic model of a wifi card).


----------



## Nicholas (Jan 8, 2012)

Hi fbsuser.
Did you include firmware files:


> both bcm43xx.cat (bcm43xx64.cat for amd64) and bcmwlcoi.dll (bcmwlcoi64.dll for amd64) as firmware files


I suppose I have the same card as yours and it works, except that the system panics if I restart /etc/rc.d/netif


----------



## aperechnev (Jan 27, 2015)

I have the same problem with NDIS and bcm4331 on my MacBook Pro 9,2. FreeBSD can't load it on boot process, it just crashes in start. But if I load it via `kldload` it loads okay.

Also system sometimes crashes when I load it via `kldload` in a few minutes. I don't know why and when, but I will research this crash a bit more, and then post information here.


----------

