2011-01-26 11:34:08 +00:00
|
|
|
iw: add signal average to station information
|
|
|
|
|
|
|
|
From: Bruno Randolf <br1@einfach.org>
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
nl80211.h | 1 +
|
|
|
|
station.c | 3 +++
|
|
|
|
2 files changed, 4 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
--- a/nl80211.h
|
|
|
|
+++ b/nl80211.h
|
2011-01-27 08:56:14 +00:00
|
|
|
@@ -1183,6 +1183,7 @@ enum nl80211_sta_info {
|
2011-01-26 11:34:08 +00:00
|
|
|
NL80211_STA_INFO_TX_PACKETS,
|
|
|
|
NL80211_STA_INFO_TX_RETRIES,
|
|
|
|
NL80211_STA_INFO_TX_FAILED,
|
|
|
|
+ NL80211_STA_INFO_SIGNAL_AVG,
|
|
|
|
|
|
|
|
/* keep last */
|
|
|
|
__NL80211_STA_INFO_AFTER_LAST,
|
|
|
|
--- a/station.c
|
|
|
|
+++ b/station.c
|
2011-01-27 08:56:14 +00:00
|
|
|
@@ -107,6 +107,9 @@ static int print_sta_handler(struct nl_m
|
2011-01-26 11:34:08 +00:00
|
|
|
if (sinfo[NL80211_STA_INFO_SIGNAL])
|
|
|
|
printf("\n\tsignal: \t%d dBm",
|
|
|
|
(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
|
|
|
|
+ if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
|
|
|
|
+ printf("\n\tsignal avg:\t%d dBm",
|
|
|
|
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
|
|
|
|
|
|
|
|
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
|
|
|
|
if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,
|