libs/core: further network model compatibility fixes
This commit is contained in:
parent
e22e6dd9ca
commit
cb6bdd9f50
1 changed files with 3 additions and 6 deletions
|
@ -1173,11 +1173,7 @@ function interface.bridge_stp(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function interface.is_up(self)
|
function interface.is_up(self)
|
||||||
if self.wif then
|
return self:_ubus("up") or false
|
||||||
return self.wif:is_up()
|
|
||||||
else
|
|
||||||
return self:_ubus("up") or false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function interface.is_bridge(self)
|
function interface.is_bridge(self)
|
||||||
|
@ -1425,7 +1421,8 @@ function wifinet.get_device(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function wifinet.is_up(self)
|
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
|
end
|
||||||
|
|
||||||
function wifinet.active_mode(self)
|
function wifinet.active_mode(self)
|
||||||
|
|
Loading…
Reference in a new issue