projects
/
openwrt
/
svn-archive
/
archive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f1fda66
)
mac80211: fix interface teardown for kernels >= 2.6.33
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 6 Jul 2010 18:53:48 +0000
(18:53 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 6 Jul 2010 18:53:48 +0000
(18:53 +0000)
SVN-Revision: 22078
package/mac80211/files/lib/wifi/mac80211.sh
patch
|
blob
|
history
diff --git
a/package/mac80211/files/lib/wifi/mac80211.sh
b/package/mac80211/files/lib/wifi/mac80211.sh
index af8dd23270e1cf20354b0a2f17362dbb71cd076d..a963db81ba2e95727064ffa87bd3bb27c8cc405b 100644
(file)
--- a/
package/mac80211/files/lib/wifi/mac80211.sh
+++ b/
package/mac80211/files/lib/wifi/mac80211.sh
@@
-165,6
+165,14
@@
scan_mac80211() {
config_set "$device" vifs "${ap:+$ap }${adhoc:+$adhoc }${sta:+$sta }${monitor:+$monitor }${mesh:+$mesh}"
}
config_set "$device" vifs "${ap:+$ap }${adhoc:+$adhoc }${sta:+$sta }${monitor:+$monitor }${mesh:+$mesh}"
}
+list_phy_interfaces() {
+ local phy="$1"
+ if [ -d "/sys/class/ieee80211/${phy}/device/net" ]; then
+ ls "/sys/class/ieee80211/${phy}/device/net" 2>/dev/null;
+ else
+ ls "/sys/class/ieee80211/${phy}/device" 2>/dev/null | grep net: | sed -e 's,net:,,g'
+ fi
+}
disable_mac80211() (
local device="$1"
disable_mac80211() (
local device="$1"
@@
-181,7
+189,7
@@
disable_mac80211() (
done
include /lib/network
done
include /lib/network
- for wdev in $(l
s /sys/class/ieee80211/${phy}/device/net 2>/dev/null
); do
+ for wdev in $(l
ist_phy_interfaces "$phy"
); 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 && \
[ -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 && \