Compiling MadWIFI under CentOS 5

When i'm trying to compile MadWIFI driver under CentOS 5.2, I get an error about a structure redefinition.

In fact, I assume that RedHat/CentOS has modified its default kernel to include some patch and new features. The kernel is not the official 2.6.18 kernel but an improved version. By this modification, it seems that some new code has been added to the kernel and then the provided source for MadWIFI doesn't work anymore.

To solve this problem, Google is my best friend. I've found this : http://www.mail-archive.com/madwifi-tickets@lists.sourceforge.net/msg08661.html. So, I've just:

  1. Edit the file
    include/compat.h
  2. change at line 137:
    #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)

    to:
    #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
  3. make the driver
  4. install the driver.

 

And YESSS ... It works ! Louis.