mac80211: restrict the killing of wpa_supplicant processes to the right interface...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 25 Jan 2010 22:11:21 +0000 (22:11 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 25 Jan 2010 22:11:21 +0000 (22:11 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19334 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/mac80211/files/lib/wifi/mac80211.sh

index 1c12a15..44082aa 100644 (file)
@@ -173,14 +173,18 @@ disable_mac80211() (
        set_wifi_down "$device"
        # kill all running hostapd and wpa_supplicant processes that
        # are running on atheros/mac80211 vifs
-       for pid in `pidof hostapd wpa_supplicant`; do
-               grep -E "($phy|wlan)" /proc/$pid/cmdline >/dev/null && \
+       for pid in `pidof hostapd`; do
+               grep -E "$phy" /proc/$pid/cmdline >/dev/null && \
                        kill $pid
        done
 
        include /lib/network
        for wdev in $(ls /sys/class/ieee80211/${phy}/device/net 2>/dev/null); do
                [ -f "/var/run/$wdev.pid" ] && kill $(cat /var/run/$wdev.pid) >&/dev/null 2>&1
+               for pid in `pidof wpa_supplicant`; do
+                       grep "$wdev" /proc/$pid/cmdline >/dev/null && \
+                               kill $pid
+               done
                ifconfig "$wdev" down 2>/dev/null
                unbridge "$dev"
                iw dev "$wdev" del
This page took 0.020427 seconds and 4 git commands to generate.