diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 356088060..41a25a400 100755 --- a/package/madwifi/files/lib/wifi/madwifi.sh +++ b/package/madwifi/files/lib/wifi/madwifi.sh @@ -225,10 +225,15 @@ enable_atheros() { PSK|psk|PSK2|psk2) case "$enc" in PSK|psk) - proto='proto=WPA';; + proto='proto=WPA' + passphrase="${key}" + ;; PSK2|psk2) - proto='proto=RSN';; + proto='proto=RSN' + passphrase=`wpa_passphrase ${ssid} "${key}" | grep psk | grep -v \#| cut -d= -f2` + ;; esac + cat > /var/run/wpa_supplicant-$ifname.conf <