fix essid setting in adhoc mode
[openwrt/svn-archive/archive.git] / package / madwifi / files / lib / wifi / madwifi.sh
index 69230a71f1d10cef8a748350be17cc692decf58c..e24730f905dd03a081bdfe97bfe4e159c42ea6d1 100755 (executable)
@@ -148,10 +148,8 @@ enable_atheros() {
                                        iwconfig "$ifname" ap "$addr"
                                }
                        ;;
-                       *)
-                               config_get ssid "$vif" ssid
-                       ;;
                esac
+               config_get ssid "$vif" ssid
 
                [ "$mode" = "sta" ] && {
                        config_get_bool bgscan "$vif" bgscan 1
@@ -194,6 +192,9 @@ enable_atheros() {
                iwconfig "$ifname" essid "$ssid"
                case "$mode" in
                        ap)
+                               config_get_bool isolate "$vif" isolate 0
+                               iwpriv "$ifname" ap_bridge "$((isolate^1))"
+
                                if eval "type hostapd_setup_vif" 2>/dev/null >/dev/null; then
                                        hostapd_setup_vif "$vif" madwifi || {
                                                echo "enable_atheros($device): Failed to set up wpa for interface $ifname" >&2