summaryrefslogtreecommitdiffstats
path: root/package/madwifi/files/lib
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-03-24 01:01:18 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-03-24 01:01:18 +0000
commit6e8c336f90f207ebc635f7ee57284256ec675bf2 (patch)
tree5798fe870a88fb640a0c088d7d82274fb86056e1 /package/madwifi/files/lib
parentcd3aa7e128ca1ce67d7d7c7bc6e0374be987edf0 (diff)
fix wep encryption setting for madwifi
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6655 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/files/lib')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 720f3af87..1cd727ade 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -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