aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-09-29 15:16:13 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-09-29 15:16:13 +0000
commit6f8a7385875333275d4ae07d8e9e2cd6a137d268 (patch)
treebc50eb3041b8a7e3aaa445466ca689434b807747 /package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch
parentd328e72247112f169b19b8bf8c7bf3d0ff1cc546 (diff)
downloadupstream-6f8a7385875333275d4ae07d8e9e2cd6a137d268.tar.gz
upstream-6f8a7385875333275d4ae07d8e9e2cd6a137d268.tar.bz2
upstream-6f8a7385875333275d4ae07d8e9e2cd6a137d268.zip
ath9k: fetch survey data for all channels
SVN-Revision: 23154
Diffstat (limited to 'package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch')
-rw-r--r--package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch b/package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch
new file mode 100644
index 0000000000..798e59c3ab
--- /dev/null
+++ b/package/mac80211/patches/512-ath9k_survey_no_bogus_nf.patch
@@ -0,0 +1,23 @@
+--- 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;
+ }