aboutsummaryrefslogtreecommitdiffstats
path: root/package/hostapd/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-06 15:25:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-06-06 15:25:52 +0000
commitbcd4209323f29e5b50cdbfe372dc75ef1fdd014e (patch)
tree18b9eaaecefc77f65389df0a5414142ebacd1287 /package/hostapd/files
parent93a883d7fb635202e0d0aa02e9986c62102a4597 (diff)
downloadupstream-bcd4209323f29e5b50cdbfe372dc75ef1fdd014e.tar.gz
upstream-bcd4209323f29e5b50cdbfe372dc75ef1fdd014e.tar.bz2
upstream-bcd4209323f29e5b50cdbfe372dc75ef1fdd014e.zip
hostapd: fix driver setting for wpa_s in IBSS/WPA-NONE
This fix is needed to correctly set the driver to use with wpa_s in case of IBSS/WPA-NONE. The current setting is not made correctly. Signed-off-by: Antonio Quartulli <ordex@autistici.org> SVN-Revision: 32084
Diffstat (limited to 'package/hostapd/files')
-rw-r--r--package/hostapd/files/wpa_supplicant.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh
index 9c475a8fb1..8caad77c20 100644
--- a/package/hostapd/files/wpa_supplicant.sh
+++ b/package/hostapd/files/wpa_supplicant.sh
@@ -6,9 +6,6 @@ wpa_supplicant_setup_vif() {
local freq=""
[ -n "$4" ] && freq="frequency=$4"
- # wpa_supplicant should use wext for mac80211 cards
- [ "$driver" = "mac80211" ] && driver='wext'
-
# make sure we have the encryption type and the psk
[ -n "$enc" ] || {
config_get enc "$vif" encryption
@@ -60,7 +57,12 @@ wpa_supplicant_setup_vif() {
;;
*psk*)
key_mgmt='WPA-PSK'
- [ "$mode" = "adhoc" -a "$driver" != "nl80211" ] && key_mgmt='WPA-NONE'
+ # if you want to use PSK with a non-nl80211 driver you
+ # have to use WPA-NONE and wext driver for wpa_s
+ [ "$mode" = "adhoc" -a "$driver" != "nl80211" ] && {
+ key_mgmt='WPA-NONE'
+ driver='wext'
+ }
config_get_bool usepassphrase "$vif" usepassphrase 1
if [ "$usepassphrase" = "1" ]; then
passphrase="psk=\"${key}\""