From f23fba49b31070dc180d0d41d0125ab80f71c09f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 28 Jul 2011 14:08:56 +0200 Subject: ath9k_hw: calculate a much better approximation of channel noise Currently ath9k presents the internal calibrated noise floor as channel noise measurement, however this results in highly chip specific values that are only useful as relative measurements but do not resemble any real channel noise values. In order to give a much better approximation of the real channel noise, add the difference between the measured noise floor and the nominal chip specific noise floor to the default minimum channel noise value, which is currently used to calculate the signal strength from the RSSI value. This may not be 100% accurate, but it's much better than what's there before. Signed-off-by: Felix Fietkau Signed-off-by: John W. Linville --- drivers/net/wireless/ath/ath9k/hw.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/wireless/ath/ath9k/hw.c') diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index cb0b6aab7115..db44e5b0c98b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1486,6 +1486,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, memset(caldata, 0, sizeof(*caldata)); ath9k_init_nfcal_hist_buffer(ah, chan); } + ah->noise = ath9k_hw_getchan_noise(ah, chan); if (bChannelChange && (ah->chip_fullsleep != true) && -- cgit v1.2.3