Correctly calculate Wireless link quality

Wireless quality was stuck at 100% due to
a signed with unsigned integer division.
This commit is contained in:
Stefan Bader 2015-10-12 20:46:22 +02:00
parent dc94d6cba8
commit 9e6e0d4f8f

View File

@ -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