Sunday, February 25th, 2007
Using Atheros madwifi driver on ThinkPad T42 with Ubuntu Edgy Eft and Xen kernel
I followed this guide to get Xen up and running on my ThinkPad T42 running Ubuntu Edgy Eft. I ran into a roadblock using my laptop’s Atheros WiFi card with the Xen kernel. On a server, sure, you’re unlikely to need wireless, but on my laptop, it’s essential these days.
So I searched around Google and the closest solution I could find was here. The following are the steps I took to get the T42 wifi card working with the madwifi drivers on the xen kernel.
1) Follow this guide up until the domU section. Reboot into the Xen kernel and you will be up and running with a wired eth0 connection and ath0 will not work.
2) Get the necessary kernel headers
# sudo /bin/bash
# apt-get install linux-headers-'uname -r'
# apt-get install xen-headers-2.6.17-6-generic-xen0 // version number to match your Xen kernel - I installed both xen-headers-# and also xen-headers-#-generic
3) Download the current madwifi drivers snapshot here (other releases are here)
4) Copy into usr/src, unpack, and build
# cd /usr/src
# cp home/[username]/Desktop/madwifi-ng-r2156-20070225.tar.gz . // insert your username and the madwifi version
# tar -zxvf madwifi-ng-r2156-20070225.tar.gz
# cd madwifi-ng-r2156-20070225
# nano ath/if_ath.c
5) In nano, search for “ieee80211_qosframe” using Cntrl+w and then comment out this section of code:
/* comment this section out
#ifdef USE_HEADERLEN_RESV
dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
sizeof(struct llc) +
IEEE80211_ADDR_LEN +
IEEE80211_WEP_IVLEN +
IEEE80211_WEP_KIDLEN;
#ifdef ATH_SUPERG_FF
dev->hard_header_len += ATH_FF_MAX_HDR;
#endif
#endif
*/
6) Now, make your kernel modules
# make KERNELPATH=/usr/src/xen-headers-2.6.17-6-generic-xen0/
# make install KERNELPATH=/usr/src/xen-headers-2.6.17-6-generic-xen0/
7) Now edit /etc/modules and add the new driver
# nano /etc/modules
add in at the end
ath_pci
8) Reboot and you should now have wireless and Xen. Go back to the domU section here and continue along.
Please leave a Comment