modules/admin-full: ... and another issue, also remove wifi up workaround, its done...
[project/luci.git] / modules / admin-full / luasrc / controller / admin / network.lua
index e701d1d..d76f83f 100644 (file)
@@ -247,7 +247,7 @@ function iface_status()
                                }
                        end
 
-                       for _, device in ipairs(net:get_interfaces()) do
+                       for _, device in ipairs(net:get_interfaces() or {}) do
                                data.subdevices[#data.subdevices+1] = {
                                        name       = device:shortname(),
                                        type       = device:type(),
@@ -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