Developing lightweight computation at the DSG edge

Commit a5e03255 authored by p4u's avatar p4u
Browse files

Fixed qmpinfo: If no wireless device found, show a dummy device but please dont crash

parent c2d2dcf6
......@@ -12,13 +12,24 @@ function qmpinfo.get_modes(dev)
function qmpinfo.get_channels(dev)
local iw = iwinfo[iwinfo.type(dev)]
local clist = {} -- output channel list
local iw = iwinfo[iwinfo.type(dev)]
local ch = {}
-- if there are not wireless cards, returning a dummy value
if iw == nil then
return clist
local freqs = iw.freqlist(dev) --freqs list
local c -- current channel
local nc = 0 -- next channel
local pc = 0 -- previous channel
local clist = {} -- output channel list
local adhoc
local ht40_support = qmpinfo.get_modes(dev).n
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment