refcount = tonumber(refcnt, 16),
usecount = tonumber(usecnt, 16),
flags = tonumber(flags, 16),
- device = dev
+ device = dev,
+
+ -- lua number is too small for storing the metric
+ -- add a metric_raw field with the original content
+ metric_raw = metric
}
if callback then
-- @param iface Wireless interface (optional)
-- @return Table of available channels
function wifi.channels(iface)
- local t = iwinfo.type(iface)
+ local t = iwinfo.type(iface or "")
local cns
if t and iwinfo[t] then
cns = iwinfo[t].freqlist(iface)