The Place of Marlow
Davs !
Who am I ?
Technical Stuff
Asterisk Telephony Switch
Bootable USB Keys
Dell Latitude D600
Dell Latitude X1
Digital Alpha Workstations
Gnome Screenshots
IE Search modified
ISP Mailserver Solution
ISPWorks (ISP Management Solution)
Linux based Access Points
LM sensors configuration
madwifi Debian packages
Pro@ccess Router Setup
Vservers (BSD Jails on Linux)
Wireless Community WAN
Reviews
Pictures
Links
Tagwall
Statistics

Multiband Atheros Driver for WiFi (madwifi) package for Debian


Author: Martin List-Petersen - martin at list-petersen dot dk
The newest version of this document can allways be found at http://www.marlow.dk/madwifi
To see this document without menu etc. (for printing, opens new window), click here.
Version: 1.7-1
Created: June 19th, 2004
Last updated: September 7th, 2005
Dazzle Zio!
 


The information provided here comes at NO WARRANTY. Use it on your own risk. Currently only the HEAD branch is supported. Don't expect anything else to work, yet.
Credits: Flavio Stanchina's packages (RaLink RT2400 and ATI Radeon drivers) were the basis, upon which i build the packages mentioned herein. Basically he took vendor tarballs and packaged them without redistributing the tarballs itself.
I just took the idea one step further and got my package to pull the source out of a cvs repository, since the madwifi driver currently only is distributed that way.
Thanks for the inspiration, Flavio.
Also thanks to Sam Leffler and all the others that are writing and improving the Atheros driver. It is great to see, that at least some people care to port WLan drivers to Linux natively, without using wrappers and other evil things.
Joshua Aune send me the changes for supporting 2.6 also.

Caveats


Read this document fully before you start doing anything. It would also be helpful, if you knew a bit about the basics of Debian, how to use make-kpkg and building source packages. I will try to go through all the steps, that are necessary to create the madwifi modules and tools the "Debian Way", but don't expect me to answer trivial questions if you get stuck. My time is limited and with the increasing amount of documentation that i'm writing my mailbox seems to fill up with questions sometimes.
One good point to start if you don't know anything about how to build kernels the "Debian Way" is to look at SourceForge's Newbiedoc or the Howto "Recompiling a kernel the Debian way". Reading one or both of those will save you a lot trouble and me a lot time, that i instead can use of writing new documentation and improving current.

Requirements

First of all you would need a WLan card, that is based on the Atheros chipset. Without that it would be useless looking at this document in the first place. If you not are sure, what chipset your WLan card is based on, have a look at Linux-WLan. They have a extensive list of WLan adapters, their capabilities and what chipset they are based on.

You need to install the kernel source code and configure it with make-kpkg. Any kernel version available from Debian should do.
If you have installed a binary kernel, you can allways fetch the correct source for that, and configure it as appropriate

  apt-get install kernel-source-2.x.y
  cd /usr/src
  tar -xjvf kernel-source-2.x.y.tar.bz2
  cd kernel-source-2.x.y
  cp /boot/config-2.x.y-flavour .config
  make-kpkg --append-to-version "-flavour" --revision 2.x.y-z --config oldconfig configure
    

If you have a kernelversion, that looks like 2.6.4-1-686, the "-flavour" would be "-1-686".

If you already have a configured kernel source tree, you can use it, but make sure that it's exactly the same configuration you are using.

Make also sure that you have installed the packages kernel-package, debhelper, fakeroot and cvs. They are essential for getting this package to work.


Repository

My repository for the Debian packages can be used by adding:
  deb ftp://debian.marlow.dk/ sid madwifi
  deb-src ftp://debian.marlow.dk/ sid madwifi
		
To /etc/apt/sources.list and of course to run apt-get update afterwards.

You can then choose to do your own cvs checkout, by downloading the package builder with apt-get source madwifi or you can grab the daily cvs snapshot of my repository: apt-get install madwifi-source madwifi-tools.

My repository only holds the x86 platform based -tools packages, so for any other platform you should choose the package builder.

The package builder

For building the packages you will need 2 files:

You grab them of the repository with apt-get source madwifi or download them manually. In that case you will have to run dpkg-source -x madwifi-1.7-3.dsc to unpack them.

cd into the directory madwifi-1.7 and run:
  fakeroot dpkg-buildpackage
		
If you are missing some packages, dpkg-buildpackage will complain. The debian packaging system will now kick off cvs and download the latest madwifi driver from their sourceforge site. Once you are finished it will leave you with 2 new Debian packages:
  • madwifi-source_20040619_all.deb - The source package needed to compile the kernel modules.
  • madwifi-tools_20040619_i386.deb - The tools package comtaining the athstats tool. You probably wont need this, but i included it for completeness.

The version (20040619) will be the date when you fetched the madwifi source. If you leave the madwifi-1.7 directory where it is and rerun the dpkg-buildpackage process at a later time it will not download a new cvs snapshot, but recreate the packages with the allready fetched driver sources.

If you want to download a new version, simply delete madwifi-1.7/madwifi.tar.gz and kick off the dpkg-buildpackage process again. An existing madwifi.tar.gz file forces the package builder to ommit the cvs checkout and build the driver from the sources in madwifi.tar.gz.


Installing the packages

Install the packages:

  dpkg -i madwifi-source_20040619_all.deb
  dpkg -i madwifi-tools_20040619_i386.deb
    
The rate algorythm was recently split out into new modules (ath_rate_onoe, ath_rate_amrr, ath_rate_sample), so that it could be replaced with other algorythm's. One of them is amrr. If you want to use AMRR (Adaptive Multi Rate Retry) or the sample module instead of the default algorythm, you would have to enter export ATH_RATE=ath_rate/amrr OR export ATH_RATE=ath_rate/sample now. If you don't care about this, just leave it as it is. I have linked a document about Rate Adaption, that also discribes the AMRR in the links section. Good reading :)

After you have installed the packages, change directory to /usr/src and type:
  tar -xzvf madwifi.tar.gz
  cd kernel-source-x.y.z
  fakeroot make-kpkg --append-to-version "-flavour" --revision 2.x.y-z --added-modules madwifi modules_image
    
This will build a new package, which you will have to install:
  dpkg -i /usr/src/madwifi-module-x.y.z_20040619-1+kernelversion_i386.deb
		
Eventually it is a good idea to run update-modules afterwards. Just to make sure, that the modules are recognised by the system.

You can now load the module:
  modprobe ath_pci
		
Usually you would get something like:
  Warning: loading /lib/modules/2.4.24-20040613-loke/kernel/drivers/net/ath_hal.o will taint the kernel: non-GPL license - Proprietary
    See http://www.tux.org/lkml/#export-tainted for information about tainted modules
  Module ath_hal loaded, with warnings
  Module wlan loaded, with warnings
  Module ath_pci loaded, with warnings
		

This is ok. The madwifi driver contains a binary hal library because of FCC regulations and thus taints the kernel. Check lsmod and see if it has loaded everything correctly (modules ath_pci, wlan and ath_hal. You can also check dmesg to see what output the driver gave you on load.
If everything worked as expected, you should have a ath0 interface and be able to query that with ifconfig ath0 and iwconfig ath0.
So now you only need to configure your networking.


Links


History

  • 1.7-1 (20050905) - removed tools package, not to depend on kernel source, added sample rate module, several cleanup issues.
  • 1.6-1 (20041108) - support for $ATH_RATE added to the packages.
  • 1.5-4 (20041013) - added picture of some Atheros based Wlan cards.
  • 1.5-3 (20041010) - added info on daily snapshots.
  • 1.5-2 (20040925) - added the url for the FAQ.
  • 1.5-1 (20040925) - loads of changes went into the madwifi driver, which broke the Debian packager. Fixed now.
  • 1.4-1 (20040808) - added athctrl tool to set ack+cts timeouts based on the distance between two stations.
  • 1.3-4 (20040807) - added the addtional modules for WEP etc. that are split out in the WPA branch.
  • 1.3-3 (20040806) - back to HEAD, since WPA and HEAD branches are merged now.
  • 1.3-2 (20040803) - fix for the powerpc architecture.
  • 1.3-1 (20040803) - added TARGET on make (due to changes in madwifi source) and changed package to pull WPA tree, Sam stated HEAD is dead.
  • 1.2-1 (20040731) - packages update to allow cross-compiling.
  • 1.1-2 (20040707) - update of website to meet HTML 4.01 transitional and new design
  • 1.1-1 (20040623) - update of package, kernel 2.6 support.
  • 1.0-2 (20040620) - update of package, minor bugfix.
  • 1.0-1 (20040619) - initial document.



Website last modified: Jan 8th, 2007 - 1:39 PM  GMT.
(C)opyright 1997 - 2007  by Martin List-Petersen
IPv6 Ready Hosting by TuxBoxValid HTML 4.01!Valid CSS!