mac80211: fix wpa handling in sta mode
SVN-Revision: 18662
This commit is contained in:
parent
03ca3bf5bb
commit
6da667f886
1 changed files with 5 additions and 5 deletions
|
@ -176,10 +176,10 @@ enable_mac80211() {
|
||||||
case "$enc" in
|
case "$enc" in
|
||||||
wep)
|
wep)
|
||||||
config_get keymgmt "$vif" keymgmt
|
config_get keymgmt "$vif" keymgmt
|
||||||
if [ -e "$keymgmt" ]; then
|
if [ -n "$keymgmt" ]; then
|
||||||
for idx in 1 2 3 4; do
|
for idx in 1 2 3 4; do
|
||||||
local zidx
|
local zidx
|
||||||
zidx = idx - 1
|
zidx = $((idx - 1))
|
||||||
config_get key "$vif" "key${idx}"
|
config_get key "$vif" "key${idx}"
|
||||||
if [ -n "$key" ]; then
|
if [ -n "$key" ]; then
|
||||||
append keystring "${zidx}:${key} "
|
append keystring "${zidx}:${key} "
|
||||||
|
@ -187,7 +187,7 @@ enable_mac80211() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
wpa)
|
*wpa*|*psk*)
|
||||||
config_get key "$vif" key
|
config_get key "$vif" key
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -240,7 +240,7 @@ enable_mac80211() {
|
||||||
config_get bssid "$vif" bssid
|
config_get bssid "$vif" bssid
|
||||||
case "$enc" in
|
case "$enc" in
|
||||||
wep)
|
wep)
|
||||||
if [ -e "$keymgmt" ]; then
|
if [ -n "$keymgmt" ]; then
|
||||||
[ -n "$keystring" ] &&
|
[ -n "$keystring" ] &&
|
||||||
iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid key "$keystring"
|
iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid key "$keystring"
|
||||||
else
|
else
|
||||||
|
@ -254,7 +254,7 @@ enable_mac80211() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
wpa*|psk*)
|
*wpa*|*psk*)
|
||||||
config_get key "$vif" key
|
config_get key "$vif" key
|
||||||
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
|
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
|
||||||
wpa_supplicant_setup_vif "$vif" wext || {
|
wpa_supplicant_setup_vif "$vif" wext || {
|
||||||
|
|
Loading…
Reference in a new issue