提交 8383f6b9 编写于 作者: J Jo-Philipp Wich

luci-0.10: merge r6757

上级 29b6de2d
......@@ -722,10 +722,14 @@ end
-- @param iface Wireless interface (optional)
-- @return Table of available channels
function wifi.channels(iface)
local t = iwinfo.type(iface or "")
local stat, iwinfo = pcall(require, "iwinfo")
local cns
if iface and t and iwinfo[t] then
cns = iwinfo[t].freqlist(iface)
if stat then
local t = iwinfo.type(iface or "")
if iface and t and iwinfo[t] then
cns = iwinfo[t].freqlist(iface)
end
end
if not cns or #cns == 0 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册