diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-27 13:29:41 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-03-27 13:29:41 +0000 |
commit | 3405a9bc2238454496d0c5bde9524947eb116ecc (patch) | |
tree | 162c1df84d8cc3e9facc3d5c6c2fd8b86419b8a2 /package | |
parent | edba77a97dc6bf1bef531057bd0a8f7c59a206b6 (diff) | |
download | upstream-3405a9bc2238454496d0c5bde9524947eb116ecc.tar.gz upstream-3405a9bc2238454496d0c5bde9524947eb116ecc.tar.bz2 upstream-3405a9bc2238454496d0c5bde9524947eb116ecc.zip |
wpa_supplicant: modify wpa_supplicant.sh in order to support IBSS-RSN/WPA-NONE
Based on patch by: Antonio Quartulli <ordex@autistici.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31085 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/hostapd/files/wpa_supplicant.sh | 5 |
1 files changed, 5 insertions, 0 deletions
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 <<EOF ctrl_interface=/var/run/wpa_supplicant-$ifname network={ + $mode scan_ssid=1 ssid="$ssid" $bssid key_mgmt=$key_mgmt $proto + $freq $ieee80211w $passphrase $pairwise |