fix wep encryption setting for madwifi
authorFelix Fietkau <nbd@openwrt.org>
Sat, 24 Mar 2007 01:01:18 +0000 (01:01 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 24 Mar 2007 01:01:18 +0000 (01:01 +0000)
SVN-Revision: 6655

package/madwifi/files/lib/wifi/madwifi.sh

index 720f3af..1cd727a 100755 (executable)
@@ -125,7 +125,11 @@ enable_atheros() {
                                        iwconfig "$ifname" enc "[$idx]" "${key:-off}"
                                done
                                config_get key "$vif" key
-                               iwconfig "$ifname" enc "${key:-1}"
+                               key="${key:-1}"
+                               case "$key" in
+                                       [1234]) iwconfig "$ifname" enc "[$key]";;
+                                       *) iwconfig "$ifname" enc "$key";;
+                               esac
                        ;;
                        PSK|psk|PSK2|psk2)
                                config_get key "$vif" key