From 223e09bf3f180797aeea0f6dc1721e5a55215e66 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 14 Feb 2018 21:37:44 +0100 Subject: add support for expected throughput cfg80211 allows drivers to announce the to-be-expected layer-2 datarate using the NL80211_STA_INFO_EXPECTED_THROUGHPUT field. This information is useful as a metric for user-space routing daemons, so grab it via nl80211 and make it available in both C and Lua APIs, and show expected throughput on CLI interface assoclist. Signed-off-by: Daniel Golle --- iwinfo_lua.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'iwinfo_lua.c') diff --git a/iwinfo_lua.c b/iwinfo_lua.c index 1421111..eebab8e 100644 --- a/iwinfo_lua.c +++ b/iwinfo_lua.c @@ -328,6 +328,11 @@ static int iwinfo_L_assoclist(lua_State *L, int (*func)(const char *, char *, in set_rateinfo(L, &e->rx_rate, true); set_rateinfo(L, &e->tx_rate, false); + if (e->thr) { + lua_pushnumber(L, e->thr); + lua_setfield(L, -2, "expected_throughput"); + } + lua_setfield(L, -2, macstr); } } -- cgit v1.2.1