diff options
-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, | |||
2004 | struct ath_wiphy *aphy = hw->priv; | 2004 | struct ath_wiphy *aphy = hw->priv; |
2005 | struct ath_softc *sc = aphy->sc; | 2005 | struct ath_softc *sc = aphy->sc; |
2006 | struct ath_hw *ah = sc->sc_ah; | 2006 | struct ath_hw *ah = sc->sc_ah; |
2007 | struct ath_common *common = ath9k_hw_common(ah); | ||
2008 | struct ieee80211_conf *conf = &hw->conf; | 2007 | struct ieee80211_conf *conf = &hw->conf; |
2009 | 2008 | ||
2010 | if (idx != 0) | 2009 | if (idx != 0) |
2011 | return -ENOENT; | 2010 | return -ENOENT; |
2012 | 2011 | ||
2013 | survey->channel = conf->channel; | 2012 | survey->channel = conf->channel; |
2014 | survey->filled = SURVEY_INFO_NOISE_DBM; | 2013 | survey->filled = 0; |
2015 | survey->noise = common->ani.noise_floor; | 2014 | if (ah->curchan && ah->curchan->noisefloor) { |
2015 | survey->filled |= SURVEY_INFO_NOISE_DBM; | ||
2016 | survey->noise = ah->curchan->noisefloor; | ||
2017 | } | ||
2016 | 2018 | ||
2017 | return 0; | 2019 | return 0; |
2018 | } | 2020 | } |