aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-23 08:28:20 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-01-23 08:28:20 +0000
commit26c953db2072dcc03e36c43446d237df83770270 (patch)
treefd451bb3511d48080a4921f3104f945a456b95b5 /package
parentccb604a5735f561a8c933c756ef92857412bb8c5 (diff)
downloadupstream-26c953db2072dcc03e36c43446d237df83770270.tar.gz
upstream-26c953db2072dcc03e36c43446d237df83770270.tar.bz2
upstream-26c953db2072dcc03e36c43446d237df83770270.zip
mac80211: improve wifi interface cleanup
SVN-Revision: 19285
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index cd03b3082c..1c12a154c5 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -174,12 +174,13 @@ disable_mac80211() (
# kill all running hostapd and wpa_supplicant processes that
# are running on atheros/mac80211 vifs
for pid in `pidof hostapd wpa_supplicant`; do
- grep "$phy" /proc/$pid/cmdline >/dev/null && \
+ grep -E "($phy|wlan)" /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
ifconfig "$wdev" down 2>/dev/null
unbridge "$dev"
iw dev "$wdev" del