summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-meshwizard
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-08-08 20:22:18 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-08-08 20:22:18 +0000
commit11aa47342394c538977981b0c68a6c5dd42bfb56 (patch)
tree6b59a47f60053f81828743bd7b65c2f9bed06575 /applications/luci-meshwizard
parente183e134b86025fa301f5a52310993fcdf8f442b (diff)
applications/luci-meshwizard: use wifi.getiwinfo() to find available channels
Diffstat (limited to 'applications/luci-meshwizard')
-rw-r--r--applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua b/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
index 48fb90600..bb65635e1 100644
--- a/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
+++ b/applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua
@@ -98,9 +98,12 @@ uci:foreach("wireless", "wifi-device", function(section)
chan:depends(device .. "_config", 1)
chan:value('default')
- for _, f in ipairs(sys.wifi.channels(device)) do
- if not f.restricted then
- chan:value(f.channel)
+ local iwinfo = sys.wifi.getiwinfo(device)
+ if iwinfo then
+ for _, f in ipairs(iwinfo.freqlist) do
+ if not f.restricted then
+ chan:value(f.channel)
+ end
end
end
-- IPv4 address