User Tools

Site Tools


This is an old revision of the document!


Compat-wireless is a package which contains the development versions (pulled from the kernel's git repository) of the in-kernel wireless drivers and the mac80211 wireless stack. New packages are released pretty much every day.

This package is mentioned quite often on the forums and the IRC channel because using it is very convenient. You can think of it (in fact, you should) as a sized-down version of the kernel tree, a one that contains only the sources of the wireless drivers and the wireless stack. Therefore, you can apply any wireless-related patches to it and recompile them without having to recompile the whole kernel.

Additionally, the development versions of the drivers have one particular advantage : they're being constantly improved. It is not uncommon to see that they support more hardware, have better performance, or simply contain fixes to various bugs - in contrast to their stable versions. However, you should always remember that development versions may be incomplete or contain even more bugs than the stable ones. Ergo, using them is not recommended in environments where high stability is desired.

The home page of the package is here.

Package requirements

In order to install this package, you need to have a few things :

  • Kernel newer than or equal to 2.6.22, though versions newer than and equal to 2.6.27 are highly recommended
  • The kernel headers for the kernel you're currently running
  • Basic development tools

Installing the package

If you meet the requirements of the package, you can try installing it. The installation process (or, more precisely, the package selection) depends on which kernel you're running.

Kernels 2.6.22 - 2.6.26

For these kernels, a package called compat-wireless-old exists. It's not as widely supported and updated as often as the “normal” version. If you can, consider updating to a more current version of the kernel.

 $ wget$(date -I).tar.bz2
 $ tar -jxf compat-wireless-old-$(date -I).tar.bz2
 $ cd compat-wireless-old-$(date -I)
 $ wget
 $ patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
 ( apply any additional patches that you may need )
 $ make
 # make install

Please note that the patch provided here worked for the newest version of compat-wireless-old at the time of writing this article (15 October 2009). Due to its highly changeable nature, please keep in mind that it might not work for newer versions of the package.

Kernels newer than and 2.6.27

The installation process is pretty much analogous to the one described above.

 $ wget$(date -I).tar.bz2
 $ tar -jxf compat-wireless-$(date -I).tar.bz2
 $ cd compat-wireless-$(date -I)
 $ wget
 $ patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
 ( apply any additional patches that you may need )
 $ make
 # make install

Uninstalling the package

Should you be in any way dissatisfied with the new drivers, you can uninstall them very easily, since - in order to keep the original drivers and stack unmodified - the compat-wireless package installs its modules into a different directory so that the old ones are not overwritten.

 $ cd /lib/modules/`uname -r`/
 # rm -fR updates
 # depmod -ae

The two commands described above will delete all the new drivers, as well as the wireless stack provided by compat-wireless, and revert you to using the original kernel modules.


Compilation problems

If you encounter compilation problems, please make sure you've got kernel headers installed and that the system knows where to look for them. Generally, there should be a symlink under

 /lib/modules/`uname -r`/build

which points to the directory containing the kernel headers.

Module loading problems

Firstly, make sure that the compat-wireless package was compiled with GCC whose minor version is the same as the minor version of the GCC with which the kernel was compiled. For example, if you compiled your kernel with GCC 4.3.2, but you compiled compat-wireless with GCC 4.4.1, you might run into “Invalid module format” problems. These will also occur if you've built the package for a different kernel than the one you're currently running.

Secondly, you will need to reload any modules you're currently using, as well as their dependencies, in order to make sure that there are no unresolved symbols (i.e. functions/macros/variables that are present in the new version but not in the old one). The best way to do this is to reboot. If you don't want to reboot, then simply rmmod all the wireless-related modules that are currently being used. For example, if you're using the b43 driver, then you would have to do :

 # rmmod b43
 # rmmod ssb
 # modprobe b43

Another approach is to use the unload script provided by the authors of the compat-wireless package. Just run make unload when the installation finishes.

compat-wireless.1255652179.txt.gz · Last modified: 2009/10/16 02:16 (external edit)