AA: madwifi: merge r37172
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 4 Jul 2013 21:26:07 +0000 (21:26 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 4 Jul 2013 21:26:07 +0000 (21:26 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@37174 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/madwifi/files/lib/wifi/madwifi.sh

index 2e37325..eb68769 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
 }