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 720f3af87c2137b83ff629055b6ab8eadaab787d..1cd727ade711e8c4b301653a3a980d6c4666f05e 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