upgrade madwifi, finally fix the annoying ap auto channel selection bug, default...
[openwrt/svn-archive/archive.git] / package / madwifi / files / lib / wifi / madwifi.sh
index ca933a1ddd1f3f6c14b0a4060d944592e04ae95a..6baf482dc545b1cf9c4ffc6ce2fed0efdb34e7e5 100755 (executable)
@@ -74,7 +74,9 @@ enable_atheros() {
        local device="$1"
        config_get channel "$device" channel
        config_get vifs "$device" vifs
        local device="$1"
        config_get channel "$device" channel
        config_get vifs "$device" vifs
-       
+
+       [ auto = "$channel" ] && channel=0
+
        local first=1
        for vif in $vifs; do
                nosbeacon=
        local first=1
        for vif in $vifs; do
                nosbeacon=
@@ -306,7 +308,7 @@ detect_atheros() {
                cat <<EOF
 config wifi-device  $dev
        option type     atheros
                cat <<EOF
 config wifi-device  $dev
        option type     atheros
-       option channel  5
+       option channel  auto
 
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1
 
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1