CVSROOT: /cvs Module name: src Changes by: st...@cvs.openbsd.org 2015/01/09 13:34:21
Modified files: sys/net80211 : ieee80211_ioctl.h sbin/ifconfig : ifconfig.c Log message: 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.