mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-24 22:35:11 +02:00
mac80211: improve wifi interface cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19285 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
34da3b9f3b
commit
7f1760652d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user