if_iwm - Fix up RSSI calculations for scan results and normal RX operations.
authorImre Vadász <imre@vdsz.com>
Sun, 18 Sep 2016 08:07:27 +0000 (10:07 +0200)
committerImre Vadász <imre@vdsz.com>
Sun, 18 Sep 2016 08:11:38 +0000 (10:11 +0200)
commitd7ecd68be5ad5eebfdec4059c00330235786927f
treef52d829716c21aa4022d689a8acd5b21c00bb1e4
parent60e8fc880e64ac99b7e94889d912dd744ba96932
if_iwm - Fix up RSSI calculations for scan results and normal RX operations.

* hard code a noise floor of -96 for now. The noise floor update code
  returns some "interesting" values that I can't map to anything useful
  right now.
* Ensure a default noise floor is set - otherwise the initial scan results
  have a noise floor of '0'.
* Fix up the RSSI calculation to be correctly relative to the noise floor.
  The RSSI routines return an absolute value in dBm - so fix this up.
* Cap RSSI values appropriately.
* Ensure we pass in a 1/2 dB unit value in to net80211.

Taken-From: FreeBSD (SVN r305917)
sys/dev/netif/iwm/if_iwm.c