summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-12-03 15:23:09 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-12-03 15:23:09 +0000
commitcb6bdd9f507f28f3b20e4d7c7fa54c417f562242 (patch)
tree3366e33d54d8e3e45fc05c8a7e33db7b8eaed0a7
parente22e6dd9ca7e6978daa1b064f739538ef723e28f (diff)
libs/core: further network model compatibility fixes
-rw-r--r--libs/core/luasrc/model/network.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua
index c2c49f4c0..a409621f8 100644
--- a/libs/core/luasrc/model/network.lua
+++ b/libs/core/luasrc/model/network.lua
@@ -1173,11 +1173,7 @@ function interface.bridge_stp(self)
end
function interface.is_up(self)
- if self.wif then
- return self.wif:is_up()
- else
- return self:_ubus("up") or false
- end
+ return self:_ubus("up") or false
end
function interface.is_bridge(self)
@@ -1425,7 +1421,8 @@ function wifinet.get_device(self)
end
function wifinet.is_up(self)
- return (_wifi_state("section", self.sid, "up") == true)
+ local ifc = self:get_interface()
+ return (ifc and ifc:is_up() or false)
end
function wifinet.active_mode(self)