mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-26 17:50:47 +02:00
3d7914783f
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23154 3c298f89-4303-0410-b956-a3cf2f4a3e73
24 lines
691 B
Diff
24 lines
691 B
Diff
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
@@ -2005,15 +2005,17 @@ static int ath9k_get_survey(struct ieee8
|
|
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;
|
|
}
|