summaryrefslogtreecommitdiffhomepage
path: root/libs/core
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-10-28 22:36:15 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-10-28 22:36:15 +0000
commit84cbbf39682ebfc5f662d820294c76988110d55c (patch)
treecff483646264ebc9ef4b5dad2fea8708c0d7b3e6 /libs/core
parent7c68b7491f65e7428ffb71703791f4a5639fbc56 (diff)
libs/core: fix status reporting of standalone wifi iface in network model
Diffstat (limited to 'libs/core')
-rw-r--r--libs/core/luasrc/model/network.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua
index dd2bdfb906..eff84f8108 100644
--- a/libs/core/luasrc/model/network.lua
+++ b/libs/core/luasrc/model/network.lua
@@ -847,7 +847,7 @@ function protocol.get_interface(self)
if s.device then
num[s.device] = num[s.device] and num[s.device] + 1 or 1
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
end
end
@@ -927,7 +927,10 @@ interface = utl.class()
function interface.__init__(self, ifname, network)
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.dev = _interfaces[self.ifname]