From 57d26a83c0cf95d9909907a1be04505319f6bd1b Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 18 Oct 2007 20:51:21 +0000 Subject: [PATCH] fixed wpa2 support for madwifi/wpa_supplicant SVN-Revision: 9355 --- package/madwifi/files/lib/wifi/madwifi.sh | 11 ++++++++--- package/wpa_supplicant/Makefile | 19 +------------------ 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 3560880606..41a25a400f 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 <