diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2015-01-09 20:34:22 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2015-01-09 20:34:22 +0000 |
commit | f8ad0c7539518af71e02e3195f03636492dfa6c9 (patch) | |
tree | f64027a4675f1c96cdb8aba432b3ffa5ef1225a9 /sys | |
parent | 649afe36843829c90ff02a09f695f113fef73bc0 (diff) |
Change rssi passed to ifconfig(8) to a signed value to fix printing signal
strengths on 802.11 interfaces. ok stsp@
Power on wireless interfaces is usually scaled in dBm. rssi (received signal
strength) is expected to be a -ve dBm values (i.e. [much] <1mW). Some (though
not all!) drivers store this as negative values, so it needs to be passed to
ifconfig that way for printing, not cast to an unsigned value. Valid range is
something like -40 to -90dBm, so the range available with a signed char is
reasonable whether it's stored as a +ve or -ve number.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index e408da7c0cc..1779c2455ee 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.h,v 1.20 2014/08/24 18:01:27 zhuk Exp $ */ +/* $OpenBSD: ieee80211_ioctl.h,v 1.21 2015/01/09 20:34:21 sthen Exp $ */ /* $NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $ */ /*- @@ -295,8 +295,8 @@ struct ieee80211_nodereq { u_int8_t nr_rates[IEEE80211_RATE_MAXSIZE]; /* rate set */ /* Node status information */ - u_int8_t nr_rssi; /* received signal strength */ - u_int8_t nr_max_rssi; /* maximum rssi */ + int8_t nr_rssi; /* received signal strength */ + int8_t nr_max_rssi; /* maximum rssi */ u_int8_t nr_tstamp[8]; /* from last received beacon */ u_int16_t nr_intval; /* beacon interval */ u_int16_t nr_capinfo; /* capabilities */ |