diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-08-08 20:16:46 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-08-08 20:16:46 +0000 |
commit | d1fd6e702ee2ee9f2637c29dec2870ce308a9ba9 (patch) | |
tree | d773a4587ccebd87ae6354ac93b8681962a723e9 /libs | |
parent | a521cddcf89bb47c1dd20581c428bc4566d478e4 (diff) |
libs/sys: remove wifi.getiwconfig() and wifi.getiwscan()
Diffstat (limited to 'libs')
-rw-r--r-- | libs/sys/luasrc/sys.lua | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index f6f95625d6..a5c5ab1ec2 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -836,56 +836,6 @@ function wifi.getiwinfo(ifname) end end ---- Get iwconfig output for all wireless devices. --- @return Table of tables containing the iwconfing output for each wifi device -function wifi.getiwconfig() - local cnt = luci.util.exec("PATH=/sbin:/usr/sbin iwconfig 2>/dev/null") - local iwc = {} - - for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do - local k = l:match("^(.-) ") - l = l:gsub("^(.-) +", "", 1) - if k then - local entry, flags = _parse_mixed_record(l) - if entry then - entry.flags = flags - end - iwc[k] = entry - end - end - - return iwc -end - ---- Get iwlist scan output from all wireless devices. --- @return Table of tables contaiing all scan results -function wifi.iwscan(iface) - local siface = iface or "" - local cnt = luci.util.exec("iwlist "..siface.." scan 2>/dev/null") - local iws = {} - - for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do - local k = l:match("^(.-) ") - l = l:gsub("^[^\n]+", "", 1) - l = luci.util.trim(l) - if k then - iws[k] = {} - for j, c in pairs(luci.util.split(l, "\n Cell")) do - c = c:gsub("^(.-)- ", "", 1) - c = luci.util.split(c, "\n", 7) - c = table.concat(c, "\n", 1) - local entry, flags = _parse_mixed_record(c) - if entry then - entry.flags = flags - end - table.insert(iws[k], entry) - end - end - end - - return iface and (iws[iface] or {}) or iws -end - --- Get available channels from given wireless iface. -- @param iface Wireless interface (optional) -- @return Table of available channels |