diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-02-19 01:07:21 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-02-19 01:07:21 +0000 |
commit | d692a2340c40f62c608fb54f0cc9736a30edcd07 (patch) | |
tree | 663d8a35573e31153d8bfb489de66dcefb4f185c /package/hostapd/files/wpa_supplicant.sh | |
parent | b47efaaf4d2fe940d06bde1e543947ddd0f7f4dc (diff) | |
download | master-31e0f0ae-d692a2340c40f62c608fb54f0cc9736a30edcd07.tar.gz master-31e0f0ae-d692a2340c40f62c608fb54f0cc9736a30edcd07.tar.bz2 master-31e0f0ae-d692a2340c40f62c608fb54f0cc9736a30edcd07.zip |
mac80211: always use wpa_supplicant for client connections (patch by Stijn Tintel)
Since client mode in mac80211is unreliable without using wpa_supplicant,
it would be better to enable wpa_supplicant by default.
With this patch, wpa_supplicant will always be used for mac80211-based
drivers in client mode. This will break client mode for images that
don't include wpa_supplicant or wpad, so maybe I need to add a check
somewhere to see if wpa_supplicant is available, and show the user a
warning if he tries client mode without wpa_supplicant. Suggestions on
where to add this check are welcome.
Tested with ath5k in client mode on open and wpa2-psk network, and
tested on my ath9k based AP as well to make sure it doesn't break AP mode.
SVN-Revision: 19718
Diffstat (limited to 'package/hostapd/files/wpa_supplicant.sh')
-rw-r--r-- | package/hostapd/files/wpa_supplicant.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh index ccf31baa90..97a00829da 100644 --- a/package/hostapd/files/wpa_supplicant.sh +++ b/package/hostapd/files/wpa_supplicant.sh @@ -6,7 +6,10 @@ wpa_supplicant_setup_vif() { # wpa_supplicant should use wext for mac80211 cards [ "$driver" = "mac80211" ] && driver='wext' - # make sure we have the psk + # make sure we have the encryption type and the psk + [ -n "$enc" ] || { + config_get enc "$vif" encryption + } [ -n "$key" ] || { config_get key "$vif" key } |