#!/bin/sh
# This script is run on resume to force a down and up of any madwifi
# iterfaces. Otherwise they could get into a weird state.
IFACES=$(ifconfig | grep -B 1 ^ath | cut -d ' ' -f 1)
for iface in $IFACES; do
	echo down $ifcase >>/tmp/log
	ifdown $iface || ifconfig $iface down
done

rmmod ath_pci 2>/dev/null
rmmod ath_hal 2>/dev/null
rmmod wlan 2>/dev/null

for iface in $IFACES; do
	ifup $iface
done

