Skip to main content

MadWifi HAL DKMS Mini-How-To

Update: Ubuntu Karmic Koala 9.10 seems to support my card at full 54Mbit, however, I get max 12Mbit upload/download rate… Interesting…

Update: Ubuntu Jaunty 9.04 has ath5k driver which supports my card out-of-the-box without binary blobs and dkms magic is no longer needed :). Max speed is around 11Mbit with ath5k though

devices with newer radios (RF2413 and up) have a different way to handle tx power control and because we don’t support tx power calibration yet, they have problems transmitting on rates above 18M. On these cards try to manually set 11M to get better results.

I happened to own a Wi-Fi card which is not supported by LRM (AR5BX63, Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)). Nearly every time my kernel modules got updated from the repository I got ‘Revision not supported’ message and had to perform reinstallation of the modules from 0.10.5.6 branch of MadWifi SVN repository. After upgrade to Intrepid (which has DKMS support built in) I decided that the same approach may be applied to madwifi-hal.

So, here’s how it can be done:

  1. Download madwifi-hal-0.10.5.6 from madwifi SVN

    svn co http://svn.madwifi-project.org/madwifi/branches/madwifi-hal-0.10.5.6
    

    Note that madwifi project has changed their domain name from madwifi.org to madwifi-project.org last November.

  2. Put the following dkms.conf to the madwifi-hal-0.10.5.6 directory:

    PACKAGE_NAME="madwifi-hal"
    PACKAGE_VERSION="0.10.5.6"
    CLEAN="make clean"
    BUILT_MODULE_NAME[0]="ath_pci"
    BUILT_MODULE_LOCATION[0]="ath"
    DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[1]="ath_hal"
    BUILT_MODULE_LOCATION[1]="ath_hal"
    DEST_MODULE_LOCATION[1]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[2]="wlan_acl"
    BUILT_MODULE_LOCATION[2]="net80211"
    DEST_MODULE_LOCATION[2]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[3]="wlan_ccmp"
    BUILT_MODULE_LOCATION[3]="net80211"
    DEST_MODULE_LOCATION[3]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[4]="wlan"
    BUILT_MODULE_LOCATION[4]="net80211"
    DEST_MODULE_LOCATION[4]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[5]="wlan_scan_ap"
    BUILT_MODULE_LOCATION[5]="net80211"
    DEST_MODULE_LOCATION[5]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[6]="wlan_scan_sta"
    BUILT_MODULE_LOCATION[6]="net80211"
    DEST_MODULE_LOCATION[6]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[7]="wlan_tkip"
    BUILT_MODULE_LOCATION[7]="net80211"
    DEST_MODULE_LOCATION[7]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[8]="wlan_wep"
    BUILT_MODULE_LOCATION[8]="net80211"
    DEST_MODULE_LOCATION[8]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[9]="wlan_xauth"
    BUILT_MODULE_LOCATION[9]="net80211"
    DEST_MODULE_LOCATION[9]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[10]="ath_rate_sample"
    BUILT_MODULE_LOCATION[10]="ath_rate/sample"
    DEST_MODULE_LOCATION[10]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[11]="ath_rate_amrr"
    BUILT_MODULE_LOCATION[11]="ath_rate/amrr"
    DEST_MODULE_LOCATION[11]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[12]="ath_rate_minstrel"
    BUILT_MODULE_LOCATION[12]="ath_rate/minstrel"
    DEST_MODULE_LOCATION[12]="/kernel/drivers/net/wireless"
    BUILT_MODULE_NAME[13]="ath_rate_onoe"
    BUILT_MODULE_LOCATION[13]="ath_rate/onoe"
    DEST_MODULE_LOCATION[13]="/kernel/drivers/net/wireless"
    MAKE[0]="make modules KERNDIR=/lib/modules/$kernelver"
    AUTOINSTALL="yes"
    
  3. Create an archive for the directory:

    tar cfz madwifi-hal-0.10.5.6-dkms.tar.gz madwifi-hal-0.10.5.6
    
  4. Load madwifi-hal to DKMS source tree:

    sudo dkms ldtarball --archive=madwifi-hal-0.10.5.6-dkms.tar.gz
    
  5. Build madwifi-hal:

    sudo dkms build -m madwifi-hal -v 0.10.5.6
    
  6. Install madwifi-hal:

    sudo dkms install -m madwifi-hal -v 0.10.5.6
    

Now when kernel is updated or reinstalled – madwifi will be automatically rebuilt.