1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -2005,15 +2005,17 @@ static int ath9k_get_survey(struct ieee8
4 struct ath_wiphy *aphy = hw->priv;
5 struct ath_softc *sc = aphy->sc;
6 struct ath_hw *ah = sc->sc_ah;
7 - struct ath_common *common = ath9k_hw_common(ah);
8 struct ieee80211_conf *conf = &hw->conf;
13 survey->channel = conf->channel;
14 - survey->filled = SURVEY_INFO_NOISE_DBM;
15 - survey->noise = common->ani.noise_floor;
17 + if (ah->curchan && ah->curchan->noisefloor) {
18 + survey->filled |= SURVEY_INFO_NOISE_DBM;
19 + survey->noise = ah->curchan->noisefloor;