diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-09-26 18:53:01 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-09-26 18:53:01 +0000 |
commit | 37b3416c5d3eb6d3f9e3ca776e8d7afb2caf33e2 (patch) | |
tree | c553d6a88f5bb4bf3e7ef3a982f4528380cfe1a6 /modules/admin-full/luasrc | |
parent | 64b6f98653d16f2baffd3c282e75d6129b9f9dee (diff) |
modules/admin-full: prevent crash in wifi model if no tx power list is available
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua | 4 |
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 613319bfc3..63c23441e9 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) |