From fb83a5d35e84ee6a19b2b6397268e08ad12ed941 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 23 Sep 2005 19:15:25 +0000 Subject: [PATCH] fix setting wl0_crypto in webif SVN-Revision: 1983 --- .../www/cgi-bin/webif/wireless-config.sh | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh b/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh index 74b20b913e..1486c27e02 100755 --- a/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh +++ b/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh @@ -56,11 +56,8 @@ load_settings "wireless" [ $FORM_encryption = off ] && { wep=${wl0_wep:-$(nvram get wl0_wep)} case "$wep" in - 1|enabled|on) - FORM_encryption=wep - ;; - *) - FORM_encryption=disabled + 1|enabled|on) FORM_encryption=wep;; + *) FORM_encryption=disabled;; esac } FORM_key1=${wl0_key1:-$(nvram get wl0_key1)} @@ -74,32 +71,25 @@ load_settings "wireless" SAVED=1 save_setting wireless wl0_mode "$FORM_mode" save_setting wireless wl0_ssid "$FORM_ssid" + case "$FORM_aes$FORM_tkip" in + aes) save_setting wireless wl0_crypto aes;; + tkip) save_setting wireless wl0_crypto tkip;; + aestkip) save_setting wireless wl0_crypto tkip+aes;; + esac case "$FORM_encryption" in psk) case "${FORM_wpa1}${FORM_wpa2}" in - wpa1) - save_setting wireless wl0_akm "psk" - ;; - wpa2) - save_setting wireless wl0_akm "psk2" - ;; - wpa1wpa2) - save_setting wireless wl0_akm "psk psk2" - ;; + wpa1) save_setting wireless wl0_akm "psk";; + wpa2) save_setting wireless wl0_akm "psk2";; + wpa1wpa2) save_setting wireless wl0_akm "psk psk2";; esac save_setting wireless wl0_wpa_psk "$FORM_wpa_psk" ;; wpa) case "${FORM_wpa1}${FORM_wpa2}" in - wpa1) - save_setting wireless wl0_akm "wpa" - ;; - wpa2) - save_setting wireless wl0_akm "wpa2" - ;; - wpa1wpa2) - save_setting wireless wl0_akm "wpa wpa2" - ;; + wpa1) save_setting wireless wl0_akm "wpa";; + wpa2) save_setting wireless wl0_akm "wpa2";; + wpa1wpa2) save_setting wireless wl0_akm "wpa wpa2";; esac ;; wep) -- 2.30.2