diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-11-28 18:00:59 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-11-28 18:00:59 +0000 |
commit | 6dba631d40692b4267d747540d8e408d951e20da (patch) | |
tree | dbb5aced74380fa8f51ab72780f94d70bbac4a20 /package/mac80211/files/lib/wifi | |
parent | 962efb9e0df7b17eea5b29022ffb4e28415815a4 (diff) | |
download | master-187ad058-6dba631d40692b4267d747540d8e408d951e20da.tar.gz master-187ad058-6dba631d40692b4267d747540d8e408d951e20da.tar.bz2 master-187ad058-6dba631d40692b4267d747540d8e408d951e20da.zip |
mac80211: fix detection of multiple mac80211 devices
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18583 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files/lib/wifi')
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 534a737a4d..91fdcf57c2 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -288,16 +288,16 @@ check_device() { detect_mac80211() { devidx=0 config_load wireless + while :; do + config_get type "wifi$devidx" type + [ -n "$type" ] || break + devidx=$(($devidx + 1)) + done for dev in $(ls /sys/class/ieee80211); do found=0 config_foreach check_device wifi-device [ "$found" -gt 0 ] && continue - while :; do - config_get type "wifi$devidx" type - [ -n "$type" ] || break - devidx=$(($devidx + 1)) - done mode_11n="" mode_band="g" channel="5" @@ -335,6 +335,7 @@ config wifi-iface option encryption none EOF + devidx=$(($devidx + 1)) done } |