Cleanup redundant psk handling code in wpa_supplicant.sh. (I sent this one to openwrt...
authorTravis Kemen <thepeople@openwrt.org>
Wed, 24 Mar 2010 00:19:42 +0000 (00:19 +0000)
committerTravis Kemen <thepeople@openwrt.org>
Wed, 24 Mar 2010 00:19:42 +0000 (00:19 +0000)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
SVN-Revision: 20394

package/hostapd/files/wpa_supplicant.sh

index a9f8ca1322aa297ce76f7998e93d5d103bf5ca0e..b6499e6c68f54b941b089c46815de9be75c1988e 100644 (file)
@@ -50,22 +50,17 @@ wpa_supplicant_setup_vif() {
                *psk*)
                        key_mgmt='WPA-PSK'
                        config_get_bool usepassphrase "$vif" passphrase 1
+                       if [ "$usepassphrase" = "1" ]; then
+                               passphrase="psk=\"${key}\""
+                       else
+                               passphrase="psk=${key}"
+                       fi
                        case "$enc" in
                                *psk2*)
                                        proto='proto=RSN'
-                                       if [ "$usepassphrase" = "1" ]; then
-                                               passphrase="psk=\"${key}\""
-                                       else
-                                               passphrase="psk=${key}"
-                                       fi
                                ;;
                                *psk*)
                                        proto='proto=WPA'
-                                       if [ "$usepassphrase" = "1" ]; then
-                                               passphrase="psk=\"${key}\""
-                                       else
-                                               passphrase="psk=${key}"
-                                       fi
                                ;;
                        esac
                ;;