I've just upgraded to the latest version of the MadWifi driver (madwifi.org).
A change has been made to the code so that my pccard now gets added as 'wifi0' when it is plugged in.
wlanconfig must then be run to create the network device (I used ath<n>
) against which a network interface can be configured.
To do this automatically when the card is insert I modified /etc/hotplug/net.agent and added the following code
# Run ifrename as needed - Jean II
# Remap interface names based on MAC address. This workaround
# the dreaded configuration problem "all my cards are 'eth0'"...
# This needs to be done before ifup otherwise ifup will get
# confused by the name changed and because iface need to be
# down to change its name.
if [ -x /usr/sbin/ifrename ] && [ -r /etc/iftab ]; then
debug_mesg invoke ifrename for $INTERFACE
NEWNAME=`/usr/sbin/ifrename -i $INTERFACE`
if [ -n "$NEWNAME" ]; then
debug_mesg iface $INTERFACE is remapped to $NEWNAME
# Additional hack for MadWifi
#if [ `/sbin/iwconfig 2>&1 | grep "^wifi.*no wireless extentions"` ] ; then
if [[ "$INTERFACE" =~ "wifi[0-9]+" ]]; then
NEWNAME=`/usr/local/bin/wlanconfig ath create wlandev $INTERFACE wlanmode sta`
# Slackware Linux:
It's worth mentioning that the number assigned to the device name is set by the kernel and increments everytime the card is ejected and re-inserted between reboots.
wlanconfig should let you hardcode the number (e.g wlanconfig ath0 ....) but I kept getting an ioctl error when I try.
rc.inet1.conf may need duplicate entries if you intend to pop the card in and out between reboots.
you can use wlanconfig to destroy the 'ath' device but this only works while the device is running so I couldn't think of any way to automate this
when the card is ejected.
I hope this information helps someone else.