summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@users.noreply.github.com>2015-04-04 09:03:45 -0700
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2015-04-04 09:03:45 -0700
commit3545e0330171bfdaced25a3fd2e62a98d0d4b1d7 (patch)
tree8ab48932815b534b42504974e7a3fc3527c41663
parent9abe0a9d593548c021c1ab8c3548578bdd58ee32 (diff)
parente91891729e799e45561c707768269bb755ca34e9 (diff)
Merge pull request #22 from jasperla/obsd_signal
Use the maximum rssi, not the scaled percentage for the signal level.
-rw-r--r--src/print_wireless_info.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index eae942b..8b390ab 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -308,10 +308,9 @@ static int get_wireless_info(const char *interface, wireless_info_t *info) {
strlcpy(nr.nr_ifname, interface, sizeof(nr.nr_ifname));
if (ioctl(s, SIOCG80211NODE, &nr) == 0 && nr.nr_rssi) {
+ info->signal_level = nr.nr_rssi;
if (nr.nr_max_rssi)
- info->signal_level_max = IEEE80211_NODEREQ_RSSI(&nr);
- else
- info->signal_level = nr.nr_rssi;
+ info->signal_level_max = nr.nr_max_rssi;
info->flags |= WIRELESS_INFO_FLAG_HAS_SIGNAL;
}