aboutsummaryrefslogtreecommitdiffstats
path: root/package/iwinfo/src/iwinfo_lua.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-02-22 13:39:16 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-02-22 13:39:16 +0000
commit64cc700dccc92924467f6a147a29ceb7550e7059 (patch)
treee75e5d5b3e0ac2625ef3014228a99c22a4c023a4 /package/iwinfo/src/iwinfo_lua.c
parenta18a8217334edd0a00cfb5559c1440cff208fdae (diff)
downloadupstream-64cc700dccc92924467f6a147a29ceb7550e7059.tar.gz
upstream-64cc700dccc92924467f6a147a29ceb7550e7059.tar.bz2
upstream-64cc700dccc92924467f6a147a29ceb7550e7059.zip
iwinfo: add per-station rate and mcs info to assoclist op
SVN-Revision: 30682
Diffstat (limited to 'package/iwinfo/src/iwinfo_lua.c')
-rw-r--r--package/iwinfo/src/iwinfo_lua.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/package/iwinfo/src/iwinfo_lua.c b/package/iwinfo/src/iwinfo_lua.c
index 533236b4d2..6b78cb763c 100644
--- a/package/iwinfo/src/iwinfo_lua.c
+++ b/package/iwinfo/src/iwinfo_lua.c
@@ -265,6 +265,45 @@ static int iwinfo_L_assoclist(lua_State *L, int (*func)(const char *, char *, in
lua_pushnumber(L, e->noise);
lua_setfield(L, -2, "noise");
+ lua_pushnumber(L, e->inactive);
+ lua_setfield(L, -2, "inactive");
+
+ lua_pushnumber(L, e->rx_packets);
+ lua_setfield(L, -2, "rx_packets");
+
+ lua_pushnumber(L, e->tx_packets);
+ lua_setfield(L, -2, "tx_packets");
+
+ lua_pushnumber(L, e->rx_rate.rate);
+ lua_setfield(L, -2, "rx_rate");
+
+ lua_pushnumber(L, e->tx_rate.rate);
+ lua_setfield(L, -2, "tx_rate");
+
+ if (e->rx_rate.mcs >= 0)
+ {
+ lua_pushnumber(L, e->rx_rate.mcs);
+ lua_setfield(L, -2, "rx_mcs");
+
+ lua_pushboolean(L, e->rx_rate.is_40mhz);
+ lua_setfield(L, -2, "rx_40mhz");
+
+ lua_pushboolean(L, e->rx_rate.is_short_gi);
+ lua_setfield(L, -2, "rx_short_gi");
+ }
+
+ if (e->tx_rate.mcs >= 0)
+ {
+ lua_pushnumber(L, e->tx_rate.mcs);
+ lua_setfield(L, -2, "tx_mcs");
+
+ lua_pushboolean(L, e->tx_rate.is_40mhz);
+ lua_setfield(L, -2, "tx_40mhz");
+
+ lua_pushboolean(L, e->tx_rate.is_short_gi);
+ lua_setfield(L, -2, "tx_short_gi");
+ }
+
lua_setfield(L, -2, macstr);
}
}