local config=${2}
shift 2
+ local ieee80211w
local anonymous_identity
local auth_alg
local auth_mode
case "${mode}" in
EAP)
- key_mgmt="WPA-EAP"
+ key_mgmt="WPA-EAP-SHA256 WPA-EAP"
+ ;;
+ WPA3)
+ key_mgmt="SAE"
+
+ ieee80211w="2"
;;
WPA2)
auth_alg="OPEN"
proto="RSN"
- key_mgmt="WPA-PSK"
+ key_mgmt="WPA-PSK-SHA256 WPA-PSK"
;;
WPA)
auth_alg="OPEN"
proto="WPA"
- key_mgmt="WPA-PSK"
+ key_mgmt="WPA-PSK-SHA256 WPA-PSK"
;;
WEP)
auth_alg="SHARED"
echo " key_mgmt=${key_mgmt}"
fi
if [ -n "${psk}" ]; then
- echo " psk=\"${psk}\""
+ if [ "${key_mgmt}" = "SAE" ]; then
+ echo " sae_password=\"${psk}\""
+ else
+ echo " psk=\"${psk}\""
+ fi
fi
if [ -n "${wep_tx_keyidx}" ]; then
echo " wep_tx_keyidx=${wep_tx_keyidx}"
if [ -n "${priority}" ]; then
echo " priority=${priority}"
fi
+ if [ -n "${ieee80211w}" ]; then
+ echo " ieee80211w=${ieee80211w}"
+ fi
# EAP
if [ "${mode}" = "EAP" ]; then
# Build wpa_supplicant command line.
local wpa_suppl_cmd="wpa_supplicant -B -qqq -i${device} -c${config}"
- if device_is_wireless ${device}; then
- wpa_suppl_cmd="${wpa_suppl_cmd} -Dwext"
- else
+ if ! device_is_wireless ${device}; then
wpa_suppl_cmd="${wpa_suppl_cmd} -Dwired"
fi