diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-12-10 17:03:17 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-12-11 00:49:54 +0400 |
commit | b7c0c238898d200e80487516e2b67aba2a522cc0 (patch) | |
tree | 21ac93c97d933eb26fb4f07f08d57f5e1cd67eb8 /drivers/net/wireless/ath/ath9k/calib.h | |
parent | cbbc0138efe1dcd5426b8fc5d87741f5057aee72 (diff) | |
download | linux-b7c0c238898d200e80487516e2b67aba2a522cc0.tar.xz |
ath9k_hw: Fix signal strength / channel noise reporting
While AR_PHY_CCA_NOM_VAL_* does contain the expected internal noise floor
for a chip measured in clean air, it refers to the lowest expected reading.
Depending on the frequency, this measurement can vary by about 6db, thus
causing a higher reported channel noise and signal strength.
Factor in the 6db offset when converting internal noisefloor to channel noise.
This patch makes the reported values more accurate for all chips without
affecting NF calibration behavior.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/calib.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/calib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.h b/drivers/net/wireless/ath/ath9k/calib.h index 1060c19a5012..60dcb6c22db9 100644 --- a/drivers/net/wireless/ath/ath9k/calib.h +++ b/drivers/net/wireless/ath/ath9k/calib.h @@ -21,6 +21,9 @@ #define AR_PHY_CCA_FILTERWINDOW_LENGTH 5 +/* Internal noise floor can vary by about 6db depending on the frequency */ +#define ATH9K_NF_CAL_NOISE_THRESH 6 + #define NUM_NF_READINGS 6 #define ATH9K_NF_CAL_HIST_MAX 5 |