libs/core: fix status reporting of standalone wifi iface in network model
This commit is contained in:
parent
7c68b7491f
commit
84cbbf3968
1 changed files with 5 additions and 2 deletions
|
@ -847,7 +847,7 @@ function protocol.get_interface(self)
|
||||||
if s.device then
|
if s.device then
|
||||||
num[s.device] = num[s.device] and num[s.device] + 1 or 1
|
num[s.device] = num[s.device] and num[s.device] + 1 or 1
|
||||||
if s.network == self.sid then
|
if s.network == self.sid then
|
||||||
ifn = s.ifname or "%s.network%d" %{ s.device, num[s.device] }
|
ifn = "%s.network%d" %{ s.device, num[s.device] }
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -927,7 +927,10 @@ interface = utl.class()
|
||||||
|
|
||||||
function interface.__init__(self, ifname, network)
|
function interface.__init__(self, ifname, network)
|
||||||
local wif = _wifi_lookup(ifname)
|
local wif = _wifi_lookup(ifname)
|
||||||
if wif then self.wif = wifinet(wif) end
|
if wif then
|
||||||
|
self.wif = wifinet(wif)
|
||||||
|
self.ifname = _uci_state:get("wireless", wif, "ifname")
|
||||||
|
end
|
||||||
|
|
||||||
self.ifname = self.ifname or ifname
|
self.ifname = self.ifname or ifname
|
||||||
self.dev = _interfaces[self.ifname]
|
self.dev = _interfaces[self.ifname]
|
||||||
|
|
Loading…
Reference in a new issue