Skip to content

Commit

Permalink
ath9k: do not return default noise floor values via survey
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Oct 5, 2010
1 parent d9891c7 commit 4f1a5a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4f1a5a4

Please sign in to comment.