madwifi: fix setup of unencrypted ad-hoc interfaces, regression was introduced with r31082

git-svn-id: svn://svn.openwrt.org/openwrt/packages@37172 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2013-07-04 21:21:14 +00:00
parent 739c1003df
commit e81cedd7a6

View File

@ -390,8 +390,8 @@ enable_atheros() {
txpower="${txpower:-$vif_txpower}" txpower="${txpower:-$vif_txpower}"
[ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}" [ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}"
case "$mode" in case "$mode:$enc" in
ap) ap:*)
config_get_bool isolate "$vif" isolate 0 config_get_bool isolate "$vif" isolate 0
iwpriv "$ifname" ap_bridge "$((isolate^1))" iwpriv "$ifname" ap_bridge "$((isolate^1))"
@ -405,7 +405,7 @@ enable_atheros() {
} }
fi fi
;; ;;
wds|sta) wds:*|sta:*)
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
wpa_supplicant_setup_vif "$vif" wext || { wpa_supplicant_setup_vif "$vif" wext || {
echo "enable_atheros($device): Failed to set up wpa_supplicant for interface $ifname" >&2 echo "enable_atheros($device): Failed to set up wpa_supplicant for interface $ifname" >&2
@ -415,7 +415,7 @@ enable_atheros() {
} }
fi fi
;; ;;
adhoc) adhoc:wep*|adhoc:psk*|adhoc:wpa*)
if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then
wpa_supplicant_setup_vif "$vif" madwifi || { wpa_supplicant_setup_vif "$vif" madwifi || {
echo "enable_atheros($device): Failed to set up wpa" echo "enable_atheros($device): Failed to set up wpa"
@ -424,6 +424,7 @@ enable_atheros() {
continue continue
} }
fi fi
;;
esac esac
done done
} }