summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-09-26 18:53:01 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-09-26 18:53:01 +0000
commit37b3416c5d3eb6d3f9e3ca776e8d7afb2caf33e2 (patch)
treec553d6a88f5bb4bf3e7ef3a982f4528380cfe1a6
parent64b6f98653d16f2baffd3c282e75d6129b9f9dee (diff)
modules/admin-full: prevent crash in wifi model if no tx power list is available
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
index 613319bfc..63c23441e 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -25,8 +25,8 @@ local tx_powers = nil
m.uci:foreach("wireless", "wifi-iface",
function(s)
- if s.device == arg[1] and s.ifname and not iw then
- iw = luci.sys.wifi.getiwinfo(s.ifname)
+ if s.device == arg[1] and not iw then
+ iw = luci.sys.wifi.getiwinfo(s.ifname or s.device)
tx_powers = iw.txpwrlist or { }
end
end)