]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - station.c
iw: fix the beacon average signal parsing
[thirdparty/iw.git] / station.c
index fd38043b1b86bb167970fafa2a899e96c99d684a..dba56b73f3558e91a42bab9cac0a9fea27f2c8aa 100644 (file)
--- a/station.c
+++ b/station.c
@@ -388,7 +388,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
 
        if (sinfo[NL80211_STA_INFO_BEACON_SIGNAL_AVG])
                printf("\n\tbeacon signal avg:\t%d dBm",
-                      nla_get_u8(sinfo[NL80211_STA_INFO_BEACON_SIGNAL_AVG]));
+                      (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_BEACON_SIGNAL_AVG]));
        if (sinfo[NL80211_STA_INFO_T_OFFSET])
                printf("\n\tToffset:\t%llu us",
                       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]));