X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Fhostapd%2Ffiles%2Fwpa_supplicant.sh;fp=package%2Fhostapd%2Ffiles%2Fwpa_supplicant.sh;h=84f6eaa95e9da5130f033c4171459b214f5ce55c;hp=8b1de169414d8511d5d4fcdcdd25544d1889fbde;hb=ed51e86a5d6d4a64f3506cbdae5f3a960170e181;hpb=59ecf97ec41c07d35ad8fe4bacd3845d806c2744 diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh index 8b1de16941..84f6eaa95e 100644 --- a/package/hostapd/files/wpa_supplicant.sh +++ b/package/hostapd/files/wpa_supplicant.sh @@ -3,6 +3,8 @@ wpa_supplicant_setup_vif() { local driver="$2" local key="$key" local options="$3" + local freq + [ -n "$4" ] && freq="frequency=$4" # wpa_supplicant should use wext for mac80211 cards [ "$driver" = "mac80211" ] && driver='wext' @@ -59,6 +61,7 @@ wpa_supplicant_setup_vif() { ;; *psk*) key_mgmt='WPA-PSK' + [ "$mode" = "adhoc" -a "$driver" != "nl80211" ] && key_mgmt='WPA-NONE' config_get_bool usepassphrase "$vif" usepassphrase 1 if [ "$usepassphrase" = "1" ]; then passphrase="psk=\"${key}\"" @@ -123,11 +126,13 @@ wpa_supplicant_setup_vif() { cat > /var/run/wpa_supplicant-$ifname.conf <