+ iwconfig "$ifname" essid "$ssid"
+ case "$mode" in
+ ap)
+ hostapd_setup_vif "$vif" madwifi || {
+ echo "enable_atheros($device): Failed to set up wpa for interface $ifname" >&2
+ # make sure this wifi interface won't accidentally stay open without encryption
+ ifconfig "$ifname" down
+ wlanconfig "$ifname" destroy
+ continue
+ }
+ ;;
+ wds|sta)
+ # FIXME: implement wpa_supplicant calls here
+ ;;
+ esac