first of all get the following packages (partly from backports.org if you are running debian woody):
kernel-headers-2.6.0-1-386 kernel-headers-2.6.0-1 kernel-image-2.6.0-1-386 kernel-source-2.6.0 kernel-tree-2.6.0 kernel-package sharutils
...have only tried this with kernel 2.6.0 so far...
after installing all this stuff boot into the new kernel...
More info: http://www.debian.org/doc/manuals/reference/ch-kernel.en.html
now extract the kernel-sources
cd /usr/src/ tar xfvj kernel-source-2.6.0.tar.bz2 cd kernel-source-2.6.0 cp /boot/config-2.6.0-1-386 .config
now before re-building the kernel, I modified /etc/kernel-pkg.conf to include the line:
do_clean := No
this can be necessary because the madwifi driver wants some built executables for compiling. Newer versions of the driver (from mid-March, 2004) will build without this step.
now re-build the kernel
make-kpkg kernel_image
after that create a symbolic link that the madwifi driver finds the missing piece
ln -s /usr/src/kernel-source-2.6.0/vmlinux /lib/modules/2.6.0-1-386/build/vmlinux
after this has finished we need to get the latest madwifi cvs source with the command:
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi
now change into the directory with the madwifi source and simple run
make make install
now let's test it with
modprobe ath_pci
...after this you should have something like this in your /var/log/syslog
Feb 13 00:50:36 saxi kernel: ath_hal: module license Proprietary taints kernel.
Feb 13 00:50:36 saxi kernel: ath_hal: 0.9.6.11
Feb 13 00:50:36 saxi kernel: ath_pci: 0.8.5.2 BETA
Feb 13 00:50:36 saxi kernel: ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
Feb 13 00:50:36 saxi kernel: ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Feb 13 00:50:36 saxi kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36
Mbps 48Mbps 54Mbps
Feb 13 00:50:36 saxi kernel: ath0: 802.11 address: 00:80:c4:2e:5e:aa
Feb 13 00:50:36 saxi kernel: ath0: Atheros 5212: mem=0xe1000000, irq=5
You may need to run update-modules, too. It won't hurt (other than take a bit of time).
To set up loading of the module at boot time, add this line to /etc/modules:
ath_pci
Now let's configure the interface. Add in /etc/network/interfaces:
auto ath0 iface ath0 inet static address -your ip- network -your network- netmask -your netmask- broadcast -your broadcast address- #Add this if you want the machine to forward packets (act as a router): up /bin/echo "1" > /proc/sys/net/ipv4/ip_forward #configure the card to use g mode, adjust or leave out if you need something else: up /sbin/iwpriv ath0 mode 3 #Sample for a configuration with WEP: #up /sbin/iwconfig ath0 essid "access" mode master rate 54Mb key f4f272a9ab026a46d255e125d1 enc on #Sample for a configuration without WEP: up /sbin/iwconfig ath0 essid "access" mode master rate 54M enc off
auto ath0 iface ath0 inet dhcp #Add this if you want the machine to forward packets (act as a router): pre-up /bin/echo "1" > /proc/sys/net/ipv4/ip_forward #configure the card to use g mode, adjust or leave out if you need something else: pre-up /sbin/iwpriv ath0 mode 3 #Sample for a configuration with WEP: #pre-up /sbin/iwconfig ath0 essid "access" mode master rate 54Mb key f4f272a9ab026a46d255e125d1 enc on #Sample for a configuration without WEP: pre-up /sbin/iwconfig ath0 essid "access" mode master rate 54M enc off
Only use the line with or without encryption, not both. Add additional parameters to suit your needs. The example assumes the card runs as an access point, if you want it to connect to a router, change the mode. man iwconfig shows possible modes.
After that the machine will boot and the ath0 interface is enabled.
Debian Access Point with WEP - Tested with Kernel 2.6.4/2.6.5/2.6.6
auto eth0 eth1 ath0 br0# eth0 = external interface iface eth0 inet dhcp
# eth1 = internal interface iface eth1 inet manual address 127.0.0.2 netmask 255.0.0.0
# ath0 = wlan interface iface ath0 inet manual pre-up /sbin/iwpriv ath0 mode 3 <- Mode 3 = 802.11g / 2 = 802.11b / 1 = 802.11a wireless_essid YOUR-ESSID wireless_mode Master <- Put ath0 in AP mode wireless_channel 11 wireless_key s:YOUR-ASCII-KEY address 127.0.0.2 netmask 255.0.0.0
# br0 = bridge between eth1 and ath0 iface br0 inet manual bridge_ports eth1 ath0 bridge_stp off <- Disable 802.1d Spanning tree address 192.168.11.1 netmask 255.255.255.0 network 192.168.11.0 broadcast 192.168.11.255
I also use dhcp-relay to forward dhcp requests received on br0 to a dhcp server reacheable via eth0
It can also be done with 802.1q/vlan sub-interfaces
If you're using PCMCIA, the ath_pci driver should work just fine (on 2.4.x and up, where x is probably > 20-something) as the PCI-derived drivers are fine for PCMCIA too, but PCMCIA won't handle hot-swapping the card; for that, you need the hotplug package (PCI hotplug support). http://linux.seindal.dk/item23.html describes how to set that up: in short, add the following stanza to your /etc/network/interfaces:
mapping hotplug
script grep
map ath0
(Yes, it looks very weird, but it seems to work.)
In my experience, a hotplug interface should not be configured as "auto" in /etc/network/interfaces; it's mostly just confusing (typically, you get errors, because the required drivers and hardware support might not be available at the stage of the boot process where static network interfaces are brought up), and the hotplug driver will find it and bring it up anyway when all the necessary drivers for that have been loaded.
... --2004/07/24 20:36 CET
I have problems when using ifconfig to bring up my card. It either segfaults or freezes my machine. Anyone else have this happen to them?
Conceptronic 54 mbps pci card --2004/08/23 03:54 CET
I successfully compile and insmod ath_pci, but my card is not catched by the driver. There isn't any ath0 interface to configure. Whatever could be wrong, prithee?
... --2004/08/23 13:43 CET
Add anywhere in /etc/modules.conf:
alias ath0 ath_pci
2.6.7 --2004/08/25 09:17 CET
I have just managed to get this working under 2.6.7 (installed Sarge from scratch, installed the 2.6.7 kernel image and so on, just follow the instructions but substitute 2.6.0 for 2.6.7 :) ). Had no problems! However once the card was up I had to do "route add default gw <my gateway ip>" to remind the system where to head for internet connections, that's all. After installation you should be able to remove the kernel-source and kernel-tree packages you installed at the start, if you want to save diskspace :) .
Possibly easier method --2004/09/03 20:51 CET
See also instructions from Section 2.4 of http://www.mattfoster.clara.co.uk/madwifi-2.htm .
These worked successfully for my WG511T on DebianPPC 2.6.7 -- and I have nice .deb packages of the latest code. Easy package for xfer to other systems.
... --2004/09/13 10:32 CET
I posted about the prior problems with segfaults/freezes. It's resolved when using drive on 2.6 kernel.
... --2004/09/22 02:51 CET
Has anyone had any issues with managed mode timing out, and having to re-poll the AP? What's the deal with the NETDEV watchdog, which should be responsible for keeping the card online, or on-AIR in this case? If I'm not doing something net related for too long, it drops carrier, and i have to do a iwconfig ath0 essid
Kernel PCMCIA modules packages needed --2004/10/27 02:12 CET
I am using a Thinkpad 390E and had the pcmcia-cs modules package installed. I was getting an IRQ not found error in syslog. I tried the kernel-pcmcia-modules-2.4.26-1-686 package and then saw to it that "yenta_socket" was loaded via /etc/default/pcmcia and the modules load correctly. More details can be found at:
http://linux.seindal.dk/index.php?itemid=23