Skip to content

Commit

Permalink
hostapd: fix driver setting for wpa_s in IBSS/WPA-NONE
Browse files Browse the repository at this point in the history
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>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32084 3c298f89-4303-0410-b956-a3cf2f4a3e73
  • Loading branch information
nbd committed Jun 6, 2012
1 parent 1f7ad48 commit dc7944e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions package/hostapd/files/wpa_supplicant.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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}\""
Expand Down

0 comments on commit dc7944e

Please sign in to comment.