You are on page 1of 3

step 1:

First of all, make sure you are the "proud owner of Broadcom BCM43xx wireless ca
rd":
[user@host ~]$ /sbin/lspci | grep Broadcom
0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
After the WLAN chip model was determined, make sure you have no missing packages
needed at compile-time and install them if you do:
[root@host ~]# yum install kernel-headers kernel-devel gcc
Of course, if you're compiling the driver for Xen kernel (i.e. kernel-xen), you
should install kernel-xen-devel instead of kernel-devel.
step 2:
[root@host ~]# mkdir -p /usr/local/src/hybrid-wl
[root@host hybrid-wl]# cd /usr/local/src/hybrid-wl
[root@host hybrid-wl]# tar xvfz /path/to/the/tarball/hybrid-portsrc-x86_64-v5.10
.91.9.3.tar.gz (name of the downloaded file)
[root@host hybrid-wl]# chown -R someuser.somegroup /usr/local/src/hybrid-wl
step 3:
[user@host hybrid-wl]$ make -C /lib/modules/`uname -r`/build/ M=`pwd`
As you can see, there is a problem with the typedefs.h file at the line 70. To o
vercome this, comment out block of code beginning at line 70, so it would look l
ike this:
/*
#ifndef TYPEDEF_BOOL
typedef unsigned char bool;
#endif
*/
This may also be resolved by simply adding the line below at header (regardless
the fact that one such line already exists):
#define TYPEDEF_BOOL
Now, try compiling the driver module again:
[user@host hybrid-wl]$ make -C /lib/modules/`uname -r`/build/ M=`pwd`
and the compile output should look something like this:
make: Entering directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
CC [M] /tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_linux.o
CC [M] /tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_iw.o
CC [M] /tmp/hybrid/hybrid/hybrid/src/shared/linux_osl.o
LD [M] /tmp/hybrid/hybrid/hybrid/wl.o
Building modules, stage 2.
MODPOST
CC
/tmp/hybrid/hybrid/hybrid/wl.mod.o
LD [M] /tmp/hybrid/hybrid/hybrid/wl.ko
make: Leaving directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
The module, once built, can be stripped of unnecessary symbols:

[user@host hybrid-wl]$ strip --strip-debug wl.ko


What you will notice, is that driver module file size reduces significantly (fro
m 2.2MB to 1.5MB). And yes, your driver module works
step 4:
Having successfully compiled the driver module, you can now load it into kernel
and set up automatic driver load on system boot (to do this, you'll have to assu
me root privileges). Of course, all this can only be done only after you remove
the existing wireless driver modules from kernel (in case these are loaded):
[root@host
[root@host
[root@host
[root@host

~]#
~]#
~]#
~]#

rmmod
rmmod
rmmod
rmmod

bcm43xx
b43
b43legacy
ndiswrapper

and now load the driver module:


[root@host hybrid-wl]# insmod wl.ko
In case this fails (there have been quite a few reports, however, this kind of b
ehavior has not yet been witnessed by the author), with an error message like:
insmod: error inserting 'wl.ko': -1 Unknown symbol in module
Try building the module dependencies first:
[root@host ~]# depmod `uname -r`
and then load the driver module:
[root@host hybrid-wl]# modprobe wl
If module loading fails once again, try inserting ieee802.11_crypt_tkip module d
ependency manually first, and only then proceed with loading of wl driver module
:
[root@host hybrid-wl]# modprobe ieee80211_crypt_tkip
[root@host hybrid-wl]# modprobe wl
The 'ndiswrapper' kernel module can be removed provided you didn't use it for an
ything else but wireless driver, but this is not necessary.
step 5:
First of all, copy the driver module file to a location where kernel can find it
:
[root@host hybrid-wl]# cp -vi /usr/local/src/hybrid-wl/wl.ko /lib/modules/`uname
-r`/extra/
to be consistent with all other external modules that have been / may be install
ed from a kmod packages (e.g. fuse, ntfs-3g, etc.)
Next, run:
[root@host ~]# depmod $(uname -r)

in order to create a list of module dependencies.


Edit the /etc/modprobe.d/blacklist file adding the lines:
blacklist
blacklist
blacklist
blacklist

bcm43xx
ndiswrapper
b43
b43legacy

By doing so, you're preventing these modules from being loaded into kernel at bo
ot time. Also, if there is a line in the /etc/modprobe.conf assigning the driver
to your wireless interface, like:
alias eth1 bcm43xx
or
alias eth1 b43
or
alias eth1 b43legacy
have the line commented out:
#alias eth1 bcm43xx
or
#alias eth1 b43
or
#alias eth1 b43legacy
and add the new driver alias for your wireless card:
alias eth1 wl
All this assuming the device file for your wireless interface is 'eth1'.
Now, edit the /etc/modprobe.d/modprobe.conf.dist file and add the following line
s to it (in some cases, the following may not be necessary):
alias ieee80211_crypt_tkip ieee80211_crypt_tkip
alias eth1 wl