mac80211: fix detection of multiple mac80211 devices
authorGabor Juhos <juhosg@openwrt.org>
Sat, 28 Nov 2009 18:00:59 +0000 (18:00 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 28 Nov 2009 18:00:59 +0000 (18:00 +0000)
SVN-Revision: 18583

package/mac80211/Makefile
package/mac80211/files/lib/wifi/mac80211.sh

index 303618bbd9745c24f27054c1e9158f4e48550263..5eaf77bdabeb1a74c989c16c23a5582ff5813249 100644 (file)
@@ -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
index 534a737a4d02e7e7034b010a4cc3d2dbd10e0788..91fdcf57c2f0f832fd98c517be60d11b245e35e0 100644 (file)
@@ -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
 }