From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, lrodriguez@atheros.com
Subject: [PATCH 3/6] ath9k: do not return default noise floor values via survey
Date: Wed, 29 Sep 2010 17:15:28 +0200 [thread overview]
Message-ID: <1285773331-73439-3-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1285773331-73439-2-git-send-email-nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
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 a133878..fcba402 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,
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;
}
--
1.7.2.2
next prev parent reply other threads:[~2010-09-29 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 15:15 [PATCH 1/6] ath9k_htc: remove use of common->ani.noise_floor Felix Fietkau
2010-09-29 15:15 ` [PATCH 2/6] ath9k_hw: keep calibrated noise floor values per channel Felix Fietkau
2010-09-29 15:15 ` Felix Fietkau [this message]
2010-09-29 15:15 ` [PATCH 4/6] ath9k: remove the noise floor value in the ani struct Felix Fietkau
2010-09-29 15:15 ` [PATCH 5/6] nl80211: allow drivers to indicate whether the survey data channel is in use Felix Fietkau
2010-09-29 15:15 ` [PATCH 6/6] ath9k: return survey data for all channels instead of just the current one Felix Fietkau
[not found] ` <AANLkTim1MuVoJnOqeBQtKzTNLK=2Pf4SpMw4MiQHPeB2@mail.gmail.com>
2010-09-29 17:12 ` [PATCH v2 " Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285773331-73439-3-git-send-email-nbd@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).