summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rt2661var.h
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-06-08 19:58:45 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-06-08 19:58:45 +0000
commit6b7c1cf0ef8e73d0349042649c5faa460aac5c5b (patch)
tree8dfd3f75e5c707bd7517e1810c5409d82e736f24 /sys/dev/ic/rt2661var.h
parent122179c6dcb81d030d78d185a0de3ab10f101c6a (diff)
Keep track of the average RSSI using an Exponential Moving Average (EMA).
Use it to dynamically tune radio receive sensitivity. The idea is simple: - increase sensitivity when the RSSI is bad to optimize throughput on long distance to the AP, and - decrease sensitivity when the RSSI is good to reduce noise level and optimize throughput on short distance to the AP The EMA allows to smooth RSSI variations so we don't end up changing the sensitivity too frequently. We check if it would be worth updating the sensitivity every one second. RSSI thresholds were taken from the Ralink Tech. Linux driver. Also, clean a few things while I'm here: - account for FCS when determining if RTS protection must be used - fix check for whether WEP encryption is needed or not - encrypt mgmt frames if we need to (shared authmode) - cosmetic tweaks
Diffstat (limited to 'sys/dev/ic/rt2661var.h')
-rw-r--r--sys/dev/ic/rt2661var.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ic/rt2661var.h b/sys/dev/ic/rt2661var.h
index bbfd1071253..3d76c96ea25 100644
--- a/sys/dev/ic/rt2661var.h
+++ b/sys/dev/ic/rt2661var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661var.h,v 1.5 2006/06/01 16:24:22 robert Exp $ */
+/* $OpenBSD: rt2661var.h,v 1.6 2006/06/08 19:58:44 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -141,6 +141,9 @@ struct rt2661_softc {
int rssi_2ghz_corr;
int rssi_5ghz_corr;
+ int ncalls;
+ int avg_rssi;
+
uint8_t bbp18;
uint8_t bbp21;
uint8_t bbp22;