aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/hostapd/files')
-rw-r--r--package/hostapd/files/hostapd.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh
index 147736bdc6..49b30cfd57 100644
--- a/package/hostapd/files/hostapd.sh
+++ b/package/hostapd/files/hostapd.sh
@@ -39,7 +39,11 @@ hostapd_setup_vif() {
case "$enc" in
*psk*|*PSK*)
config_get psk "$vif" key
- append hostapd_cfg "wpa_passphrase=$psk" "$N"
+ if [ ${#psk} -eq 64 ]; then
+ append hostapd_cfg "wpa_psk=$psk" "$N"
+ else
+ append hostapd_cfg "wpa_passphrase=$psk" "$N"
+ fi
;;
*wpa*|*WPA*)
# required fields? formats?