|
|
@ -3,6 +3,8 @@ wpa_supplicant_setup_vif() { |
|
|
|
local driver="$2" |
|
|
|
local driver="$2" |
|
|
|
local key="$key" |
|
|
|
local key="$key" |
|
|
|
local options="$3" |
|
|
|
local options="$3" |
|
|
|
|
|
|
|
local freq |
|
|
|
|
|
|
|
[ -n "$4" ] && freq="frequency=$4" |
|
|
|
|
|
|
|
|
|
|
|
# wpa_supplicant should use wext for mac80211 cards |
|
|
|
# wpa_supplicant should use wext for mac80211 cards |
|
|
|
[ "$driver" = "mac80211" ] && driver='wext' |
|
|
|
[ "$driver" = "mac80211" ] && driver='wext' |
|
|
@ -59,6 +61,7 @@ wpa_supplicant_setup_vif() { |
|
|
|
;; |
|
|
|
;; |
|
|
|
*psk*) |
|
|
|
*psk*) |
|
|
|
key_mgmt='WPA-PSK' |
|
|
|
key_mgmt='WPA-PSK' |
|
|
|
|
|
|
|
[ "$mode" = "adhoc" -a "$driver" != "nl80211" ] && key_mgmt='WPA-NONE' |
|
|
|
config_get_bool usepassphrase "$vif" usepassphrase 1 |
|
|
|
config_get_bool usepassphrase "$vif" usepassphrase 1 |
|
|
|
if [ "$usepassphrase" = "1" ]; then |
|
|
|
if [ "$usepassphrase" = "1" ]; then |
|
|
|
passphrase="psk=\"${key}\"" |
|
|
|
passphrase="psk=\"${key}\"" |
|
|
@ -123,11 +126,13 @@ wpa_supplicant_setup_vif() { |
|
|
|
cat > /var/run/wpa_supplicant-$ifname.conf <<EOF |
|
|
|
cat > /var/run/wpa_supplicant-$ifname.conf <<EOF |
|
|
|
ctrl_interface=/var/run/wpa_supplicant-$ifname |
|
|
|
ctrl_interface=/var/run/wpa_supplicant-$ifname |
|
|
|
network={ |
|
|
|
network={ |
|
|
|
|
|
|
|
$mode |
|
|
|
scan_ssid=1 |
|
|
|
scan_ssid=1 |
|
|
|
ssid="$ssid" |
|
|
|
ssid="$ssid" |
|
|
|
$bssid |
|
|
|
$bssid |
|
|
|
key_mgmt=$key_mgmt |
|
|
|
key_mgmt=$key_mgmt |
|
|
|
$proto |
|
|
|
$proto |
|
|
|
|
|
|
|
$freq |
|
|
|
$ieee80211w |
|
|
|
$ieee80211w |
|
|
|
$passphrase |
|
|
|
$passphrase |
|
|
|
$pairwise |
|
|
|
$pairwise |
|
|
|