aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-11-28 18:00:59 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-11-28 18:00:59 +0000
commit756b6fdbf312b441202cfef5883304a0579db8a9 (patch)
treed2a51f679efe1e7a9df91958f7eae650b047325f /package/mac80211/files
parentff7c793af5a18b56313c8bc0e10f05d3ab7f515a (diff)
downloadupstream-756b6fdbf312b441202cfef5883304a0579db8a9.tar.gz
upstream-756b6fdbf312b441202cfef5883304a0579db8a9.tar.bz2
upstream-756b6fdbf312b441202cfef5883304a0579db8a9.zip
mac80211: fix detection of multiple mac80211 devices
SVN-Revision: 18583
Diffstat (limited to 'package/mac80211/files')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh11
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
}