diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-05 15:08:25 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-05 15:08:25 +0000 |
commit | accf71c9a4f2d7de18e4a1f559c3182acced3ec6 (patch) | |
tree | 2d35fa47fdd131456939c268a64fcfd2849d3586 /package | |
parent | 3a5f4940766d1f009055e40c090f6fd7fb5def8a (diff) | |
download | master-187ad058-accf71c9a4f2d7de18e4a1f559c3182acced3ec6.tar.gz master-187ad058-accf71c9a4f2d7de18e4a1f559c3182acced3ec6.tar.bz2 master-187ad058-accf71c9a4f2d7de18e4a1f559c3182acced3ec6.zip |
[package] mac80211: fix wpa handling in sta mode
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18662 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 7a3ed9a682..ef275729c6 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -176,10 +176,10 @@ enable_mac80211() { case "$enc" in wep) config_get keymgmt "$vif" keymgmt - if [ -e "$keymgmt" ]; then + if [ -n "$keymgmt" ]; then for idx in 1 2 3 4; do local zidx - zidx = idx - 1 + zidx = $((idx - 1)) config_get key "$vif" "key${idx}" if [ -n "$key" ]; then append keystring "${zidx}:${key} " @@ -187,7 +187,7 @@ enable_mac80211() { done fi ;; - wpa) + *wpa*|*psk*) config_get key "$vif" key ;; esac @@ -240,7 +240,7 @@ enable_mac80211() { config_get bssid "$vif" bssid case "$enc" in wep) - if [ -e "$keymgmt" ]; then + if [ -n "$keymgmt" ]; then [ -n "$keystring" ] && iw dev "$ifname" connect "$ssid" ${fixed:+$freq} $bssid key "$keystring" else @@ -254,7 +254,7 @@ enable_mac80211() { fi fi ;; - wpa*|psk*) + *wpa*|*psk*) config_get key "$vif" key if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then wpa_supplicant_setup_vif "$vif" wext || { |