![]() |
Michael's Blog |
Home | Gallery | Stats | Downloads | Links | Scripts | Fuel Stats | Wiki | RSS |
Building the wl module on linux 3.2
After upgrading my netbook kernel to the latest stable version available on backports.org I soon discovered that my wireless interface no longer worked. Trying to rebuild the module resulted in the following error:
/usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c: In function _wl_set_multicast_list: /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1435: error: struct net_device has no member named mc_list /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1435: error: struct net_device has no member named mc_count /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1436: error: dereferencing pointer to incomplete type /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1442: error: dereferencing pointer to incomplete type make[4]: *** [/usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.o] Error 1 make[3]: *** [_module_/usr/src/modules/broadcom-sta/amd64] Error 2 make[2]: *** [sub-make] Error 2 make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-0.bpo.2-amd64' make: *** [all] Error 2 root@netbook:/usr/src/modules/broadcom-sta/amd64# run "make API=WEXT" bash: run: command not found root@netbook:/usr/src/modules/broadcom-sta/amd64# "make API=WEXT" bash: make API=WEXT: command not found root@netbook:/usr/src/modules/broadcom-sta/amd64# make API=WEXT KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` make[1]: Entering directory `/usr/src/linux-headers-3.2.0-0.bpo.2-amd64' CC [M] /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.o /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c: In function _wl_set_multicast_list: /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1435: error: struct net_device has no member named mc_list /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1435: error: struct net_device has no member named mc_count /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1436: error: dereferencing pointer to incomplete type /usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.c:1442: error: dereferencing pointer to incomplete type make[4]: *** [/usr/src/modules/broadcom-sta/amd64/src/wl/sys/wl_linux.o] Error 1 make[3]: *** [_module_/usr/src/modules/broadcom-sta/amd64] Error 2 make[2]: *** [sub-make] Error 2 make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-0.bpo.2-amd64' make: *** [all] Error 2
A bit of googling lead me to a few patches that helped solve the issue. Here is a unified diff of my changes which should allow you to cleanly build and install the wl module using module-assistant.
http://www.watters.ws/broadcom_bcm4313_linux3.2.patch
One thing to note is that the source code needs to be patched BEFORE you run m-a, i.e. cd to /usr/src/modules/broadcom_sta/amd64/src/wl/sys and run patch the patch from there.
I hope that somebody will find this useful.