Skip to content

Commit

Permalink
Correctly calculate Wireless link quality
Browse files Browse the repository at this point in the history
Wireless quality was stuck at 100% due to
a signed with unsigned integer division.
  • Loading branch information
StefaBa committed Oct 12, 2015
1 parent dc94d6c commit 9e6e0d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/print_wireless_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9e6e0d4

Please sign in to comment.