aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
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
commit1fe0eac4f4c98d810007536f207ade6b4de5414d (patch)
tree654ae9968a3b6de2aed911664ee7a1ac563f3eec /package/mac80211
parenta41a411af7de20a9f92dafaca60ab7b3d836515c (diff)
downloadupstream-1fe0eac4f4c98d810007536f207ade6b4de5414d.tar.gz
upstream-1fe0eac4f4c98d810007536f207ade6b4de5414d.tar.bz2
upstream-1fe0eac4f4c98d810007536f207ade6b4de5414d.zip
mac80211: improve wifi interface cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19285 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-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