jeudi, octobre 18, 2012

Using BCM4313 wireless chip under FreeBSD

I've got a new laptop at $DAY-JOB, and this laptop have a BCM4313 chip:

# pciconf -lv | grep Wireless
    device     = 'BCM4313 802.11b/g/n Wireless LAN Controller'

I've first try with net/bwn-firmware-kmod and if_bwn without success, but NDIS works great (on 9.1-RC2 at last).
Here here to proced for converting the Windows XP drivers to a kernel module:
# cd /tmp
# fetch  http://gugus69.free.fr/freebsd/Broadcom_BCM43xx_5.100.235.19_win5x.tgz
# tar xzvf Broadcom_BCM43xx_5.100.235.19_win5x.tgz
# cd Broadcom_BCM43xx_5.100.235.19_win5x/
# ndisgen

Inside ndisgen, here is to proceed:

  1. Type 3 for "Convert driver"
  2. INF Filename: bcmwl5.inf
  3. SYS Filename: bcmwl564.sys (or bcmwl5.sys for FreeBSD-i386)
  4. Firmware Files: kept empty

At the end, it should generated the bcmwl564_sys.ko module, now enable it:
# cp bcmwl564_sys.ko /boot/modules/
# kldload bcmwl564_sys

ndis0: mem 0xd4500000-0xd4503fff irq 19 at device 0.0 on pci36
ndis0: NDIS API version: 5.


And check that you have a new ndis0 interface:

# ifconfig | grep ndis
ndis0: flags=8843 metric 0 mtu 2290

You can now configure your rc.conf like that
kld_list='bcmwl564_sys'
wlans_ndis0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"


And enjoy !

Aucun commentaire: