aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-25 22:11:21 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-01-25 22:11:21 +0000
commitf5c84a89d6c6c9651dc506a7d7d0747b3bccaf79 (patch)
treea7f1d81229deee0a9b85f7a146c727a61dffde4f /package/mac80211/files
parent985bb03e61a4b9de9e7ece2e4936b4a7d91f789b (diff)
downloadmaster-187ad058-f5c84a89d6c6c9651dc506a7d7d0747b3bccaf79.tar.gz
master-187ad058-f5c84a89d6c6c9651dc506a7d7d0747b3bccaf79.tar.bz2
master-187ad058-f5c84a89d6c6c9651dc506a7d7d0747b3bccaf79.zip
mac80211: restrict the killing of wpa_supplicant processes to the right interface (#5991)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19334 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh8
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 1c12a154c5..44082aa990 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