Sunday, September 21, 2008

Ndiswrapper-SSB Driver Bug in Slamd64 12.1 (Kernel 2.6.25.9) -- Somehow With A wpa_supplicant Fix

It's quite sad to find out that the current generation of opensource driver for Broadcom BCM43xx WLAN chipset is still unable to get WEP working as expected--after some checks, I found that the driver unable to work with WEP unless you use wpa_supplicant to set the WEP keys. It forces me to go back to use ndiswrapper once more. Nonetheless, using ndiswrapper is not as easy as it seems because the driver has a conflict with the ssb driver module. The workaround is an ugly workaround, but it seems working so far.

First, block all drivers related to WLAN handling and the ssb kernel module in /etc/modprobe.d/blacklist (note that it's very fortunate that I build the ssb driver as a kernel module)

...
# Disable Broadcom b43 driver and all related wifi drivers because
# we are using ndiswrapper.
# Also, disable ssb and ohci_hcd and then enable them back in /etc/rc.d/rc.local
blacklist b43
blacklist rfkill_input
blacklist rfkill
blacklist mac80211
blacklist cfg80211
blacklist ohci_hcd
blacklist ssb
...


Second, load ndiswrapper driver before ssb loaded using /etc/rc.d/rc.local:

...
# Load ndiswrapper-based BCM4318 WLAN driver
modprobe ndiswrapper

# Enable ssb and ohci_hcd
modprobe ssb
modprobe ohci_hcd
...


Now everything worked as expected. Nonetheless, this is an ugly hack just to make the encryption work in this particular WLAN chipset.
Note that I'm using the Windows XP x64 Broadcom BCM43xx driver as the driver which is loaded by ndiswrapper on boot.

----
Update:

After conducting some experiments, I found out that WEP actually works with the opensource Linux BCM43xx driver (b43 driver module along with its dependency modules). The catch is, I have to use wpa_supplicant to set the WEP key. This is the wpa_supplicant configuration file for WEP that I use:

# Static WEP keys

ctrl_interface=/var/run/wpa_supplicant

network={
ssid="bounsier"
key_mgmt=NONE
wep_key0="very_secret_wep_key"
# wep_key1=0102030405
wep_tx_keyidx=0
}



Further tests, shows that WPA is also working correctly in the current generation of BCM43xx opensource driver with the help of wpa_supplicant as the WPA "back-end".
Post a Comment

No comments: