applications/luci-meshwizard: use wifi.getiwinfo() to find available channels
This commit is contained in:
parent
e183e134b8
commit
11aa473423
1 changed files with 6 additions and 3 deletions
|
@ -98,9 +98,12 @@ uci:foreach("wireless", "wifi-device", function(section)
|
||||||
chan:depends(device .. "_config", 1)
|
chan:depends(device .. "_config", 1)
|
||||||
chan:value('default')
|
chan:value('default')
|
||||||
|
|
||||||
for _, f in ipairs(sys.wifi.channels(device)) do
|
local iwinfo = sys.wifi.getiwinfo(device)
|
||||||
if not f.restricted then
|
if iwinfo then
|
||||||
chan:value(f.channel)
|
for _, f in ipairs(iwinfo.freqlist) do
|
||||||
|
if not f.restricted then
|
||||||
|
chan:value(f.channel)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- IPv4 address
|
-- IPv4 address
|
||||||
|
|
Loading…
Reference in a new issue