summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-28 18:00:59 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-28 18:00:59 +0000
commitf1db6935aee7d844efa89fddb773e9b362f980fb (patch)
treedbb5aced74380fa8f51ab72780f94d70bbac4a20
parent0da4b7c2080993059906e671fe33471142efbc73 (diff)
mac80211: fix detection of multiple mac80211 devices
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18583 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/mac80211/Makefile2
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh11
2 files changed, 7 insertions, 6 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index 303618bbd..5eaf77bda 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2009-11-21
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE_URL:= \
http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/11 \
http://wireless.kernel.org/download/compat-wireless-2.6
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index 534a737a4..91fdcf57c 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
}