madwifi: fix setup of unencrypted ad-hoc interfaces, regression was introduced with...
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 4 Jul 2013 21:21:14 +0000 (21:21 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 4 Jul 2013 21:21:14 +0000 (21:21 +0000)
SVN-Revision: 37172

net/madwifi/files/lib/wifi/madwifi.sh

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