[package] sync macs with vif bssids in broadcom.sh, fixes multi-ssid with wpa
[openwrt/svn-archive/archive.git] / package / base-files / files / sbin / wifi
index 63e132d4f1c1e9291ecf21b9b4f455dda3e1a47f..30ecb1b77c748d141b79105662a776a2fb916cc7 100755 (executable)
@@ -70,7 +70,7 @@ start_net() {(
        [ -f "/var/run/$iface.pid" ] && kill "$(cat /var/run/${iface}.pid)" 2>/dev/null
        include /lib/network
        scan_interfaces
-       setup_interface "$1" "$2"
+       setup_interface "$1" "$2" "$3"
 )}
 
 set_wifi_up() {
@@ -84,6 +84,8 @@ set_wifi_down() {
        local cfg="$1"
        local vifs vif vifstr
 
+       [ -f "/var/run/wifi-${cfg}.pid" ] &&
+               kill "$(cat "/var/run/wifi-${cfg}.pid")"
        uci_revert_state wireless "$cfg"
        config_get vifs "$cfg" vifs
        for vif in $vifs; do