From 9e6e0d4f8f006a4aa897cb98868c22515d80ea1c Mon Sep 17 00:00:00 2001 From: Stefan Bader Date: Mon, 12 Oct 2015 20:46:22 +0200 Subject: [PATCH] Correctly calculate Wireless link quality Wireless quality was stuck at 100% due to a signed with unsigned integer division. --- src/print_wireless_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c index a3ab670..aff0438 100644 --- a/src/print_wireless_info.c +++ b/src/print_wireless_info.c @@ -104,7 +104,7 @@ static void print_bitrate(char *buffer, int buflen, int bitrate) { } // Based on NetworkManager/src/platform/wifi/wifi-utils-nl80211.c -static uint32_t nl80211_xbm_to_percent(int32_t xbm, uint32_t divisor) { +static uint32_t nl80211_xbm_to_percent(int32_t xbm, int32_t divisor) { #define NOISE_FLOOR_DBM -90 #define SIGNAL_MAX_DBM -20