diff options
author | Felix Fietkau | 2010-09-29 17:15:28 +0200 |
---|---|---|
committer | John W. Linville | 2010-10-05 19:35:22 +0200 |
commit | 4f1a5a4b62c5335aafd5830866320c8918103a3a (patch) | |
tree | 0a48a03e76b90a75ce380de8ab1508f78c855429 /drivers/net/wireless/ath/ath9k/main.c | |
parent | ath9k_hw: keep calibrated noise floor values per channel (diff) | |
download | kernel-qcow2-linux-4f1a5a4b62c5335aafd5830866320c8918103a3a.tar.gz kernel-qcow2-linux-4f1a5a4b62c5335aafd5830866320c8918103a3a.tar.xz kernel-qcow2-linux-4f1a5a4b62c5335aafd5830866320c8918103a3a.zip |
ath9k: do not return default noise floor values via survey
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a13387882636..fcba402d5a1e 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -2004,15 +2004,17 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx, struct ath_wiphy *aphy = hw->priv; struct ath_softc *sc = aphy->sc; struct ath_hw *ah = sc->sc_ah; - struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_conf *conf = &hw->conf; if (idx != 0) return -ENOENT; survey->channel = conf->channel; - survey->filled = SURVEY_INFO_NOISE_DBM; - survey->noise = common->ani.noise_floor; + survey->filled = 0; + if (ah->curchan && ah->curchan->noisefloor) { + survey->filled |= SURVEY_INFO_NOISE_DBM; + survey->noise = ah->curchan->noisefloor; + } return 0; } |