Broadcom WiFi

My card is not supported by bwi/bwn, do you know if someone is working on new driver based on http://www.broadcom.com/support/802.11/linux_sta.php ?

Here is my pciconf

Code:
hostb0@pci0:0:0:0:	class=0x060000 card=0x04411028 chip=0x00448086 rev=0x18 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:	class=0x060400 card=0x04411028 chip=0x00458086 rev=0x18 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
none0@pci0:0:22:0:	class=0x078000 card=0x04411028 chip=0x3b648086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = simple comms
ehci0@pci0:0:26:0:	class=0x0c0320 card=0x04411028 chip=0x3b3c8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = serial bus
    subclass   = USB
none1@pci0:0:27:0:	class=0x040300 card=0x04411028 chip=0x3b568086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = multimedia
    subclass   = HDA
pcib2@pci0:0:28:0:	class=0x060400 card=0x04411028 chip=0x3b428086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:1:	class=0x060400 card=0x04411028 chip=0x3b448086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:2:	class=0x060400 card=0x04411028 chip=0x3b468086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:28:4:	class=0x060400 card=0x04411028 chip=0x3b4a8086 rev=0x06 hdr=0x01
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-PCI
ehci1@pci0:0:29:0:	class=0x0c0320 card=0x04411028 chip=0x3b348086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = serial bus
    subclass   = USB
pcib6@pci0:0:30:0:	class=0x060401 card=0x04411028 chip=0x24488086 rev=0xa6 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 Family (ICH2/3/4/5/6/7/8/9-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:	class=0x060100 card=0x04411028 chip=0x3b0b8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:2:	class=0x010601 card=0x04411028 chip=0x3b2f8086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'IBEX AHCI Controller(6Port)'
    class      = mass storage
    subclass   = SATA
none2@pci0:0:31:3:	class=0x0c0500 card=0x04411028 chip=0x3b308086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = serial bus
    subclass   = SMBus
none3@pci0:0:31:6:	class=0x118000 card=0x04411028 chip=0x3b328086 rev=0x06 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = dasp
vgapci0@pci0:1:0:0:	class=0x030000 card=0x04411028 chip=0x0a7510de rev=0xa2 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    class      = display
    subclass   = VGA
none4@pci0:1:0:1:	class=0x040300 card=0x04411028 chip=0x0be310de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    class      = multimedia
    subclass   = HDA
none5@pci0:18:0:0:	class=0x028000 card=0x00101028 chip=0x472714e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    class      = network
re0@pci0:19:0:0:	class=0x020000 card=0x04411028 chip=0x816810ec rev=0x03 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
 
I've got my BCM4312 worked finally!!
This is my dmesg message..

Code:
firmware_register: cannot register image bwn_v4_lp_b0g0initvals5, firmware table full!
module_register_init: MOD_LOAD (bwn_v4_lp_ucode_fw, 0xc1181e70, 0) error 6
siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem 0x9b000000-0x9b003fff irq 18 at device 0.0 on pci3
bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)
bwn0: DMA (64 bits)
bwn0: Using 1 MSI messages
bwn0: [FILTER]
bwn_v4_lp_ucode15: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_lp_ucode15) not found
bwn-open_v4_lp_ucode15: could not load firmware image, error 2
bwn0: the fw file(bwn-open_v4_lp_ucode15) not found

and notice such one line:
Code:
firmware_register: cannot register image bwn_v4_lp_b0g0initvals5, firmware table full!
module_register_init: MOD_LOAD (bwn_v4_lp_ucode_fw, 0xc1181e70, 0) error 6

and then i enlager the firmware table size by modifying /sys/kern/subr_firmware.c
Code:
#define	FIRMWARE_MAX	30
increase the number 30 to a higer value. i changed it to 60
and then rebuild the kernel.
then it work!!!
 
I'm using:
Code:
FreeBSD 8.2-PRERELEASE #0
My chip is BCM4321
I get:
Code:
siba_bwn0: <Unknown> mem 0xf1ffc000-0xf1ffffff,0xf0000000-0xf00fffff irq 17 at device 0.0 on pci12
siba_bwn0: warn: multiple PCI(E) cores
siba_bwn0: unsupported coreid (USB 1.1 Host)
 
NDISulator on 8.2 have already got important changes: usable amd64 support being one of them.

Because you use wpa_supplicant, having scan result from ifconfig is not important right now.
 
Yes, I did found commit of LAST stable_ndis5 (just before merge) and am currently using it.
Thou, out in caffe, where WPA isn't needed as WiFi is open for guests.
Works also at home with my encrypted WPA AP.
;)
 
Hi!,

I have problems with my Broadcom card.

My installation is:
* OS: FreeBSD 8.1-RELEASE
* Wifi card: BCM4309
* CPU: PowerPC (POWERBOOK G4)


NOTE: the wifi card work fine in the same machine (powerbook g4) with UBUNTU and MACOS X (but I am a FreeBSD fan).

Here is info about my card:

Code:
# pciconf -lvcb

none0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x02 hdr=0x00
	vendor = 'Broadcom Corporation'
	device = '802.11b/g Wireless LAN Controller (BCM4309)'
	class = network
	bar [10] = type Memory, range 32, base 0x80084000, size 8192, enabled
	cap 01[40] = powerspec 2 supports D0 D1 D2 D3 current D0

[TEST #1: GENERIC kernel]

Code:
# kldload bwn_v4_lp_ucode

firmware_register: cannot register image bwn_v4_lp_lp0initvals15, firmware table full!
module_register_init: MOD_LOAD (bwn_v4_lp_ucode_fw, 0xd1be040c, 0) error 6

Same results with: bwn_v4_ucode and bwi_v3_ucode

[TEST #2: CUSTOM KERNEL BWI]

1- I edit "/sys/kern/subr_firmware.c" and change constant "FIRMWARE_MAX" from 30 to 60.

2- Then I boot with the custom kernel.

3- Load modules

Code:
# kldload bwi_v3_ucode

# kldload if_bwi
bwi0: <Broadcom BCM4306 802.11b/g Wireless Lan> mem 0x80084000-0x80085fff irq 52 at device 18.0 on pci1
bwi0: [ITHREAD]
bwi0: BBP: id 0x4306, rev 0x2, pkg 0
bwi0: MAC: rev 4
bwi0: PHY: type 2, rev 1, ver 1
bwi0: RF: manu 0x17f, type 0x2050, rev 2
bwi0: invalid antenna gain in sprom
bwi0: WARNING: using obsoleted if_watchdog interface

# kldstat
Id	Refs	Address		Size		Name
1	13		0x100000	843180	kernel
2	1		0xd1bdf000	29000		bwi_v3_ucode.ko
3	1		0xd1c08000	33000		if_bwi.ko
4	2		0xd1c3b000	61000		wlan.ko

# pciconf -lvcb

bwi0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x02 hdr=0x00
	vendor = 'Broadcom Corporation'
	device = '802.11b/g Wireless LAN Controller (BCM4309)'
	class = network
	bar [10] = type Memory, range 32, base 0x80084000, size 8192, enabled
	cap 01[40] = powerspec 2 supports D0 D1 D2 D3 current D0

# ifconfig bwi0
bwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:0a:95:f1:ed:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier

Interface created and linked to driver, fine!

4- Create wlandev interface

Code:
# ifconfig wlan0 create wlandev bwi0
wlan0: Ethernet address: 00:0a:95:f1:ed:65

# ifconfig wlan0
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:0a:95:f1:ed:65
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid "" channel 1 (2412 Mhz 11b)
	country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
	bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 1
	bintval 0

All working fine!

5- UP wlandev interface

Code:
# ifconfig wlan0 up
bwi0: firmware rev 0x0127, patch level 0x000e

RESULT: my notebook halt/crash , without show any messages...

[TEST #3: CUSTOM KERNEL BWN]

1- Same of TEST #2

2- Same of TEST #2

3- Load modules

Code:
# kldload bwn_v4_lp_ucode
# kldload if_bwn
siba_bwi0: <Broadcom BCM4306 802.11b/g Wireless Lan> mem 0x80084000-0x80085fff irq 52 at device 18.0 on pci1
siba_bwi0: warn: multiple 802.11 core

RESULT: interface not created :-( (same result with bwn_v4_ucode)

NOTE: if I try to load "if_bwi.ko" or "if_bwn.ko" in boot time (/boot/loader.conf) , I get a "KLD file XXXXX is missing dependencies" boot message.
 
BCM4309 doesn't work with if_bwn

Hi, just confirming that the BCM4309 doesn't work with if_bwn and current net/bwn-firmware-kmod from ports. Details: the machine is a Mac PowerBook G4, currently running FreeBSD 8.1-release:
Code:
root@powerbook-g4# uname -a
FreeBSD powerbook-g4.kg4.no 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sun Jul 18 11:09:21 UTC 2010
root@xserve.lan.xcllnt.net:/usr/obj/usr/src/sys/GENERIC  powerpc
hardware:
Code:
root@powerbook-g4# pciconf -lv | grep -A 3 bwn
siba_bwn0@pci1:0:18:0:	class=0x028000 card=0x004e106b chip=0x432014e4 rev=0x03 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = '802.11b/g Wireless LAN Controller (BCM4309)'
    class      = network
relevant ports:
Code:
root@powerbook-g4# pkg_info | grep b[4w][3n]
b43-fwcutter-012    Extracts firmware for Broadcom Wireless adapters
bwn-firmware-kmod-0.1.0 Broadcom AirForce IEEE 802.11 Firmware Kernel Module
Loading the modules work, but when I do # ifconfig wlan up
I get this in /var/log/messages:
Code:
Jan 16 19:42:45 powerbook-g4 kernel: bwn_v4_ucode5: could not load firmware image, error 2
Jan 16 19:42:45 powerbook-g4 kernel: bwn0: the fw file(bwn_v4_ucode5) not found
Jan 16 19:42:45 powerbook-g4 kernel: bwn-open_v4_ucode5: could not load firmware image, error 2
Jan 16 19:42:45 powerbook-g4 kernel: bwn0: the fw file(bwn-open_v4_ucode5) not found
If anyone is working on a port which includes that firmware, I will be happy to test the port. :)
 
tingo said:
Hi, just confirming that the BCM4309 doesn't work with if_bwn and current net/bwn-firmware-kmod from ports. Details: the machine is a Mac PowerBook G4, currently running FreeBSD 8.1-release:

Back in June, Weongyo Jeong was nice enough to help me with a Dell Truemobile 1300, which pciconf said was a 4309:
Code:
siba_bwn0@pci0:2:3:0:   class=0x028000 card=0x00011028 chip=0x432014e4 rev=0x02 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = '802.11b/g Wireless LAN Controller (BCM4309)'
    class      = network

That card only worked with a patched version of bwi(4) and net/bwi-firmware-kmod. I don't know if the patches have been committed to 8-stable or even -current, and unfortunately no longer have the card or a mini-PCI slot in which to try it.
 
Is anyone interested in/already working on getting these drivers to work with BCM 4322 chipsets (the kind that come with MacBooks)? I'm potentially interested in taking this on as a side-project, but I'm not familiar with these drivers.
 
.. if you guys have wireless stack related questions and wish to work on fixing up this driver, don't forget to ask the freebsd-wireless developers. :)
 
I've never done any work with FreeBSD wireless drivers, so I was testing the waters to see if someone with more experience might be interested.

In any case, I know there's a Linux driver, which seems to be C code that calls into a closed-source .o file. Disassembling closed-source drivers to figure things out *is* something I've done before.
 
@emc2:

This would be fantastic if you can take up the gauntlet. I'd been hoping Weongyo would have been able to do so, but the PHYS-N nature of those radios seemed insurmountable. I looked at the Linux drivers published by Broadcom but ended up lost in all that penguin stuff. :)
 
Ideally, person doing this, would be one from linux world, that already wrote drivers for linux, at least once and now has transferred to BSD and is prepared to write drivers for FreeBSD.
 
I've been out of FreeBSD for a while, and I haven't done any work on wireless drivers since 2006. However, I did help out a group with porting a driver to linux on a handheld device by disassembling the windows drivers and figuring out how they worked.

I don't have alot of free time, but I could try to do the same here. I have both the broadcom linux driver, and at least from what I've seen so far, it looks promising (ie, every single function and global variable has a name). It would be best if I could get in contact with someone to get more information on the ins and outs of the drivers.
 
I've been looking more at the Linux driver. The closed source .o file only has a handful of undefined symbols in it, about half of which are basic C functions (memcpy, strlen, etc.). My plan was/is to to reverse-compile the .o to get information which could be used to extend the bwn driver. But I wonder how hard it would be to write a wrapper around the .o that could plug into the FreeBSD kernel, as a way to get functionality in the mean time (and maybe to get some info about how the driver works via DDB)?
 
emc2 said:
I've been looking more at the Linux driver. The closed source .o file only has a handful of undefined symbols in it, about half of which are basic C functions (memcpy, strlen, etc.). My plan was/is to to reverse-compile the .o to get information which could be used to extend the bwn driver. But I wonder how hard it would be to write a wrapper around the .o that could plug into the FreeBSD kernel, as a way to get functionality in the mean time (and maybe to get some info about how the driver works via DDB)?

Didn't Linux guys do it already? Why not just use Linux code? It is already available.
 
richardpl said:
Didn't Linux guys do it already? Why not just use Linux code? It is already available.

Can the FreeBSD kernel support Linux network driver interfaces and kernel APIs directly? (I'd be rather surprised if it can)
 
Back
Top