blob: 34263699b643f6e9efa2f9c5758402cac91967c7 [file] [log] [blame]
From 0fc92835634e80f91f065422b9cce14441e44a9f Mon Sep 17 00:00:00 2001
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date: Thu, 4 Oct 2018 12:34:20 +0300
Subject: [PATCH] iw: fix the beacon average signal parsing
NL80211_STA_INFO_BEACON_SIGNAL_AVG is parsed as a u8, but
it should be casted to a int8_t before being printed.
Change-Id: Ieb6fab3b803d8ea82819a450f07cc4b537d8de8b
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
station.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: iw-4.9/station.c
===================================================================
--- iw-4.9.orig/station.c
+++ iw-4.9/station.c
@@ -317,7 +317,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]));