summaryrefslogtreecommitdiff
path: root/iwinfo_cli.c
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2018-02-14 21:37:44 +0100
committerDaniel Golle <daniel@makrotopia.org>2018-02-15 04:50:28 +0100
commit223e09bf3f180797aeea0f6dc1721e5a55215e66 (patch)
tree83379be65099ee920eccc700e3b9d6139472f056 /iwinfo_cli.c
parentfb749bf51a7855ee955fc221acdc51b94231db2b (diff)
downloadiwinfo-223e09bf3f180797aeea0f6dc1721e5a55215e66.tar.gz
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 <daniel@makrotopia.org>
Diffstat (limited to 'iwinfo_cli.c')
-rw-r--r--iwinfo_cli.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index aab6ae6..49c9035 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -700,10 +700,13 @@ static void print_assoclist(const struct iwinfo_ops *iw, const char *ifname)
e->rx_packets
);
- printf(" TX: %-38s %8d Pkts.\n\n",
+ printf(" TX: %-38s %8d Pkts.\n",
format_assocrate(&e->tx_rate),
e->tx_packets
);
+
+ printf(" expected throughput: %s\n\n",
+ format_rate(e->thr));
}
}