Broadcom BCM 802.11 linux-sta driver compilation issues

I am using one lenovo netbook, which is coming with Broadcom wireless adapter.
Since I was having performance issues with the open source driver I started using the driver provided by Broadcom:

On the newer kernel there are two compilation issues which need patching.

The patches provided below are for version of the driver.

The first issue which I hit was the following error during compilation
/usr/src/linux-sta/src/wl/sys/wl_linux.c:396:2: error: unknown field ‘ndo_set_multicast_list’ specified in initializer
/usr/src/linux-sta/src/wl/sys/wl_linux.c:396:2: warning: initialization from incompatible pointer type [enabled by default]
/usr/src/linux-sta/src/wl/sys/wl_linux.c:396:2: warning: (near initialization for ‘wl_netdev_ops.ndo_validate_addr’) [enabled by default]
make[2]: *** [/usr/src/linux-sta/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/usr/src/linux-sta] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.4.0-1.fc17.i686'

The secon issue is the following error

/usr/src/linux-sta/src/wl/sys/wl_linux.c:43:24: fatal error: asm/system.h: No such file or directory

which is caused by dropping the header asm/system.h in kernel 3.4 in favor of 5 new headers.

More about this can be read here:;a=commitdiff;h=0195c002

Here is a patch witch fixes both of the issues.

You can download the patch from pastebin:

I am pasting the code in pastebin, because has an "incredibly good" editor and I am fighting for half an hour to make it not hiding most of the source code and as you can see he wins :).

place this text in a file and save it

then go in the dirver directory in my case:

cd /usr/src/linux-sta/src/wl/sys/

and run the patch

patch -p0 < /path/where/the/you/saved/the/patchfile.patch

then try to compile as usual

cd /usr/src/linux-sta/
make clean
make install
depmod -a
modprobe wl