Commit 4f1a5a4b authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: do not return default noise floor values via survey

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d9891c78
...@@ -2004,15 +2004,17 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx, ...@@ -2004,15 +2004,17 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx,
struct ath_wiphy *aphy = hw->priv; struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc; struct ath_softc *sc = aphy->sc;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
if (idx != 0) if (idx != 0)
return -ENOENT; return -ENOENT;
survey->channel = conf->channel; survey->channel = conf->channel;
survey->filled = SURVEY_INFO_NOISE_DBM; survey->filled = 0;
survey->noise = common->ani.noise_floor; if (ah->curchan && ah->curchan->noisefloor) {
survey->filled |= SURVEY_INFO_NOISE_DBM;
survey->noise = ah->curchan->noisefloor;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment