keep track of the wifi interface state in /var/state/wireless
[openwrt/svn-archive/archive.git] / package / madwifi / files / lib / wifi / madwifi.sh
index 222e2a9ddd44d1eff72722b0a2cc859fae355f94..07a6cd78bf74b1285d527dd8bb4b90c237fd5559 100755 (executable)
@@ -50,6 +50,7 @@ scan_atheros() {
 disable_atheros() (
        local device="$1"
 
+       set_wifi_down "$device"
        # kill all running hostapd and wpa_supplicant processes that
        # are running on atheros vifs 
        for pid in `pidof hostapd wpa_supplicant`; do
@@ -204,6 +205,7 @@ enable_atheros() {
                        start_net "$ifname" "$net_cfg"
                }
                iwconfig "$ifname" essid "$ssid"
+               set_wifi_up "$vif" "$ifname"
                case "$mode" in
                        ap)
                                config_get_bool isolate "$vif" isolate 0