summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-21 21:33:24 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-21 21:33:24 +0000
commit7590cd25f4bdc1c54088dadab973037c96f3b4d3 (patch)
tree0dab8d9ed345cc9626a0042dc0f66b720d89359e /libs
parentb2994995af60a64f1d16bec4f22b95df7cb05259 (diff)
- Add support for hostap driver
- Retrieve channels from all available wireless interfaces - Add channel "auto" to channel list Thanks Vasilis Tsiligiannis
Diffstat (limited to 'libs')
-rw-r--r--libs/sys/luasrc/sys.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index ad80ae5ba..9910ed37c 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -691,13 +691,14 @@ function wifi.channels(iface)
local fd = io.popen(cmd)
if fd then
local ln, c, f
- repeat
- ln = fd:read("*l") or ""
+ while true do
+ ln = fd:read("*l")
+ if not ln then break end
c, f = ln:match("Channel (%d+) : (%d+%.%d+) GHz")
if c and f then
cns[tonumber(c)] = tonumber(f)
end
- until not ( #ln > 0 )
+ end
fd:close()
end