mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-24 18:13:21 +02:00
mac80211: use wpa_supplicant for unencrypted connections to improve client mode reliability (patch by Stijn Tintel from #6653)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19550 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a3d1e1db67
commit
9cbf96cc5a
@ -12,6 +12,9 @@ wpa_supplicant_setup_vif() {
|
||||
}
|
||||
|
||||
case "$enc" in
|
||||
*none*)
|
||||
key_mgmt='NONE'
|
||||
;;
|
||||
*wep*)
|
||||
key_mgmt='NONE'
|
||||
config_get key "$vif" key
|
||||
|
@ -312,6 +312,9 @@ enable_mac80211() {
|
||||
local key keystring
|
||||
|
||||
case "$enc" in
|
||||
*none*)
|
||||
config_get keymgmt "$vif" keymgmt
|
||||
;;
|
||||
*wep*)
|
||||
config_get keymgmt "$vif" keymgmt
|
||||
if [ -z "$keymgmt" ]; then
|
||||
@ -397,7 +400,18 @@ enable_mac80211() {
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid
|
||||
if [ -z "$keymgmt" ]; then
|
||||
iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid
|
||||
else
|
||||
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
|
||||
wpa_supplicant_setup_vif "$vif" wext || {
|
||||
echo "enable_mac80211($device): Failed to set up wpa_supplicant for interface $ifname" >&2
|
||||
# make sure this wifi interface won't accidentally stay open without encryption
|
||||
ifconfig "$ifname" down
|
||||
continue
|
||||
}
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user