summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/wlan/if_rsureg.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-09-30 05:19:16 +0000
committeradrian <adrian@FreeBSD.org>2015-09-30 05:19:16 +0000
commit1cc309e311b3c711e016c20dc754a312f6d2a5f6 (patch)
tree626369d5737235a8c461f5a3efa70db2fac1fe4f /sys/dev/usb/wlan/if_rsureg.h
parentcfe011a9e5ef0044a47d46c950f4d7577435a97e (diff)
downloadFreeBSD-src-1cc309e311b3c711e016c20dc754a312f6d2a5f6.zip
FreeBSD-src-1cc309e311b3c711e016c20dc754a312f6d2a5f6.tar.gz
modify the rssi logic a bit to actually return a useful rssi.
The fullmac firmware doesn't seem to populate a useful rssi indicator in the RX descriptor, so if one plotted said values, they'd basically look like garbage. The reference driver implements a "get current rssi" firmware command which I guess is really meant for station operation only (as hostap operation would need rssi per station, not a single firmware read.) So: * populate sc_currssi during each calibration run; * use this in the RX path instead of trying to reconstruct the RSSI value and passing it around as a pointer; * do up a quick hack to map the rssi hardware value to some useful signal level; * the survey results provide an RSSI value between 0..100, so just do another quick hack to map it into some usefulish signal level; * supply a faked noise floor - I haven't yet found how to pull it out of the firmware. The scan results and the station RSSI information is now more useful for indicating signal strength / distance.
Diffstat (limited to 'sys/dev/usb/wlan/if_rsureg.h')
-rw-r--r--sys/dev/usb/wlan/if_rsureg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/usb/wlan/if_rsureg.h b/sys/dev/usb/wlan/if_rsureg.h
index 2880197..ddb29a3 100644
--- a/sys/dev/usb/wlan/if_rsureg.h
+++ b/sys/dev/usb/wlan/if_rsureg.h
@@ -764,6 +764,7 @@ struct rsu_softc {
int sc_ht;
int sc_nendpoints;
int sc_curpwrstate;
+ int sc_currssi;
u_int sc_running:1,
sc_calibrating:1,
OpenPOWER on IntegriCloud