modules/admin-full: ... and another issue, also remove wifi up workaround, its done...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Sep 2011 23:08:47 +0000 (23:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Sep 2011 23:08:47 +0000 (23:08 +0000)
modules/admin-full/luasrc/controller/admin/network.lua
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua

index d151a9a..d76f83f 100644 (file)
@@ -282,23 +282,6 @@ function iface_reconnect()
 
        local net = netmd:get_network(iface)
        if net then
-               local ifn
-               for _, ifn in ipairs(net:get_interfaces()) do
-                       local wnet = ifn:get_wifinet()
-                       if wnet then
-                               local wdev = wnet:get_device()
-                               if wdev then
-                                       luci.sys.call(
-                                               "env -i /sbin/wifi up %q >/dev/null 2>/dev/null"
-                                                       % wdev:name()
-                                       )
-
-                                       luci.http.status(200, "Reconnected")
-                                       return
-                               end
-                       end
-               end
-
                luci.sys.call("env -i /sbin/ifup %q >/dev/null 2>/dev/null" % iface)
                luci.http.status(200, "Reconnected")
                return
index 5b298ea..4b2b88b 100644 (file)
@@ -157,7 +157,7 @@ function ifname_single.write(self, s, val)
                local new_ifs = { }
                local old_ifs = { }
 
-               for _, i in ipairs(n:get_interfaces()) do
+               for _, i in ipairs(n:get_interfaces() or { n:get_interface() }) do
                        old_ifs[#old_ifs+1] = i:name()
                end