modules/niu: remove usage of wifi.channels()

This commit is contained in:
Jo-Philipp Wich 2012-08-08 20:25:00 +00:00
parent 11aa473423
commit 92fc96f6fd

View file

@ -30,13 +30,13 @@ local nsantenna = cursor:get("wireless", device, "antenna")
local iw = nil local iw = nil
local tx_powers = {} local tx_powers = {}
local chan = sys.wifi.channels() local chan = {}
state:foreach("wireless", "wifi-iface", state:foreach("wireless", "wifi-iface",
function(s) function(s)
if s.device == device and not iw then if s.device == device and not iw then
iw = sys.wifi.getiwinfo(s.ifname or s.device) iw = sys.wifi.getiwinfo(s.ifname or s.device)
chan = sys.wifi.channels(s.ifname or s.device) chan = iw and iw.freqlist or { }
tx_powers = iw.txpwrlist or { } tx_powers = iw.txpwrlist or { }
end end
end) end)