diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-01-25 22:11:21 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-01-25 22:11:21 +0000 |
commit | 8d689fedac0ac19a9a73d4b62e8dda2045076a30 (patch) | |
tree | fa82d8d74b2f51736a710699c24f6cd671a1e187 /package/mac80211/files/lib | |
parent | 6f0883ae22c7b4f207f08c98dd984432eb1fffef (diff) | |
download | mtk-20170518-8d689fedac0ac19a9a73d4b62e8dda2045076a30.zip mtk-20170518-8d689fedac0ac19a9a73d4b62e8dda2045076a30.tar.gz mtk-20170518-8d689fedac0ac19a9a73d4b62e8dda2045076a30.tar.bz2 |
mac80211: restrict the killing of wpa_supplicant processes to the right interface (#5991)
SVN-Revision: 19334
Diffstat (limited to 'package/mac80211/files/lib')
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 1c12a15..44082aa 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -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 |