]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: Add signal average to station dump information
authorBruno Randolf <br1@einfach.org>
Tue, 11 Jan 2011 00:51:23 +0000 (09:51 +0900)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 Jan 2011 08:32:40 +0000 (09:32 +0100)
Print station signal average in station dump.

Signed-off-by: Bruno Randolf <br1@einfach.org>
station.c

index be2301f538eefb8d6abb93226d69b912da90b8f7..6581d5006f0d3fd53d86e32eb379f260335794d3 100644 (file)
--- a/station.c
+++ b/station.c
@@ -107,6 +107,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
        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,