modules/niu: remove usage of wifi.channels()
[project/luci.git] / modules / niu / luasrc / model / cbi / niu / wireless / ap1.lua
index 2b748ad..3ecbf5f 100644 (file)
@@ -30,13 +30,13 @@ local nsantenna = cursor:get("wireless", device, "antenna")
 
 local iw = nil
 local tx_powers = {}
-local chan = sys.wifi.channels()
+local chan = {}
 
 state:foreach("wireless", "wifi-iface",
        function(s)
                if s.device == device and not iw then
                        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 { }
                end
        end)