madwifi: don't try to set an interface essid with an empty value
authorNicolas Thill <nico@openwrt.org>
Sun, 17 May 2009 02:01:03 +0000 (02:01 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 17 May 2009 02:01:03 +0000 (02:01 +0000)
SVN-Revision: 15886

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

index a3cf4d75e16035d5013438535f96fd87ee0b14ce..47c298486a2d66dd1edb7a407f470c7bab6c8c84 100755 (executable)
@@ -300,8 +300,10 @@ enable_atheros() {
                        config_set "$vif" bridge "$bridge"
                        start_net "$ifname" "$net_cfg"
                }
-               [ -n "$ssid" ] && iwconfig "$ifname" essid on
-               iwconfig "$ifname" essid "$ssid"
+               [ -n "$ssid" ] && {
+                       iwconfig "$ifname" essid on
+                       iwconfig "$ifname" essid "$ssid"
+               }
                set_wifi_up "$vif" "$ifname"
 
                # TXPower settings only work if device is up already