summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Bader <stefan.bader94@gmail.com>2015-10-12 20:46:22 +0200
committerStefan Bader <stefan.bader94@gmail.com>2015-10-12 20:46:22 +0200
commit9e6e0d4f8f006a4aa897cb98868c22515d80ea1c (patch)
tree429546f71fdb6a885ae01d2c52184c0069e6eb17 /src
parentdc94d6cba8112fa908eaf6de5354a17670f62545 (diff)
Correctly calculate Wireless link quality
Wireless quality was stuck at 100% due to a signed with unsigned integer division.
Diffstat (limited to 'src')
-rw-r--r--src/print_wireless_info.c2
1 files changed, 1 insertions, 1 deletions
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