summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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