modules/admin-full: prevent crash in wifi model if no tx power list is available
This commit is contained in:
parent
64b6f98653
commit
37b3416c5d
1 changed files with 2 additions and 2 deletions
|
@ -25,8 +25,8 @@ local tx_powers = nil
|
||||||
|
|
||||||
m.uci:foreach("wireless", "wifi-iface",
|
m.uci:foreach("wireless", "wifi-iface",
|
||||||
function(s)
|
function(s)
|
||||||
if s.device == arg[1] and s.ifname and not iw then
|
if s.device == arg[1] and not iw then
|
||||||
iw = luci.sys.wifi.getiwinfo(s.ifname)
|
iw = luci.sys.wifi.getiwinfo(s.ifname or s.device)
|
||||||
tx_powers = iw.txpwrlist or { }
|
tx_powers = iw.txpwrlist or { }
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue