summaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-11-10 22:35:56 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-11-10 22:35:56 +0000
commit3890c691c2710d3e2ad619d0726afef7684e89a4 (patch)
treeffe37cd80e1f1230dcf3f7d15be7bcb0cb22198b /contrib
parentc67d7b2a435d392afacc49f7d9f3e08a240e98b2 (diff)
libiwinfo: show noise and snr in assoclist
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/package/iwinfo/src/iwinfo.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/package/iwinfo/src/iwinfo.lua b/contrib/package/iwinfo/src/iwinfo.lua
index 4a982dd994..811022052b 100755
--- a/contrib/package/iwinfo/src/iwinfo.lua
+++ b/contrib/package/iwinfo/src/iwinfo.lua
@@ -140,11 +140,13 @@ end
function print_assoclist(api, dev)
local iw = iwinfo[api]
local al = iw.assoclist(dev)
+ local ns = iw.noise(dev)
local ai, ae
if al and next(al) then
for ai, ae in pairs(al) do
- printf("%s %s dBm", ai, s(ae.signal))
+ printf("%s %s dBm / %d dBm (SNR %d)",
+ ai, s(ae.signal), ns, n(ae.signal) - ns)
end
else
print("No client connected or no information available")