This is due to the fact that there was a change in the kernel headers. The new kernels replaced the old net_device structure with a new one called net_device_ops. It looks like this change exists since kernel 2.6.29 and up.
In file included from /home/user/madwifi/madwifi-hal-0.10.5.6/ath/../net80211/ieee80211_monitor.h:34, from /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:75: /home/user/madwifi/madwifi-hal-0.10.5.6/ath/../ath/if_athvar.h:107: error: conflicting types for 'irqreturn_t' include/linux/irqreturn.h:16: note: previous declaration of 'irqreturn_t' was here /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c: In function 'ath_attach': /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:478: error: 'struct net_device' has no member named 'priv' /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:819: error: 'struct net_device' has no member named 'open' /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:820: error: 'struct net_device' has no member named 'stop' /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:821: error: 'struct net_device' has no member named 'hard_start_xmit' /home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.c:822: error: 'struct net_device' has no member named 'tx_timeout' ..... ..... ..... make[3]: *** [/home/user/madwifi/madwifi-hal-0.10.5.6/ath/if_ath.o] Error 1 make[2]: *** [/home/user/madwifi/madwifi-hal-0.10.5.6/ath] Error 2 make[1]: *** [_module_/home/user/madwifi/madwifi-hal-0.10.5.6] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic' make: *** [modules] Error 2
There currently is no stable release of the madwifi drivers for the new kernerls. But the madwifi project's latest trunk compiles and works fine (at least for me) and I have not noticed any issues yet. This should work with any Linux distribution with a kernel of 2.6.29 and above. To find out your kernel version run:
$uname -rHere is how to get and install it:
1. You can either get the latest trunk from the madwifi website at here or use the one that worked for me (click).
2. Download and uncompress the files, cd to the directory containing the file. Then gunzip and untar the files:
tar -xvzf madwifi-trunk-r4099-20090929.tar.gz3. Cd into the newly created directory and install the drivers. Firstly, make sure you have the kernel headers:
sudo apt-get install build-essentialThen compile and install:
sudo make4. Add the ath_pci module to the kernel. You need to add a line to the end of the /etc/modules file. The line should read: ath_pci. You can do this with vi of course, but if you don't know the vi editor then it would be much easier to use gedit. So, do:
sudo make install
sudo gedit /etc/modulesAdd ath_pci to the end of the file. Here is how my file looks:
At this point you can reboot and you should have wireless. You could save yourself a reboot by modprobing the kernel with the ath_pci module like this:# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. lp sbp2 ath_pci
sudo modprobe ath_pciThat's done:)

No comments:
Post a Comment