From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Holger Schurig <holgerschurig@gmail.com>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
Anton Puolakka <Anton.Puolakka@7signal.com>,
Benoit PAPILLAULT <benoit.papillault@free.fr>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Survey mode volunteers
Date: Wed, 14 Apr 2010 10:30:44 -0700 [thread overview]
Message-ID: <20100414173044.GA2841@tux> (raw)
In-Reply-To: <201004140911.11459.holgerschurig@gmail.com>
On Wed, Apr 14, 2010 at 12:11:11AM -0700, Holger Schurig wrote:
> I've some preliminary patch for ath5k.
>
> ---
> Subject: [ath5k] add noise reporting to survey
>
> Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
>
> ---
> drivers/net/wireless/ath/ath5k/base.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> --- compat-wireless-2010-03-15.orig/drivers/net/wireless/ath/ath5k/base.c
> +++ compat-wireless-2010-03-15/drivers/net/wireless/ath/ath5k/base.c
> @@ -273,6 +273,8 @@ static int ath5k_set_key(struct ieee8021
> struct ieee80211_key_conf *key);
> static int ath5k_get_stats(struct ieee80211_hw *hw,
> struct ieee80211_low_level_stats *stats);
> +static int ath5k_get_survey(struct ieee80211_hw *hw,
> + int idx, struct survey_info *survey);
> static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
> static void ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf);
> static void ath5k_reset_tsf(struct ieee80211_hw *hw);
> @@ -298,6 +300,7 @@ static const struct ieee80211_ops ath5k_
> .configure_filter = ath5k_configure_filter,
> .set_key = ath5k_set_key,
> .get_stats = ath5k_get_stats,
> + .get_survey = ath5k_get_survey,
> .conf_tx = NULL,
> .get_tsf = ath5k_get_tsf,
> .set_tsf = ath5k_set_tsf,
> @@ -3250,6 +3253,22 @@ ath5k_get_stats(struct ieee80211_hw *hw,
>
> return 0;
> }
> +
> +static int ath5k_get_survey(struct ieee80211_hw *hw, int idx,
> + struct survey_info *survey)
> +{
> + struct ath5k_softc *sc = hw->priv;
> + struct ieee80211_conf *conf = &hw->conf;
> +
> + if (idx != 0)
> + return -ENOENT;
> +
> + survey->channel = conf->channel;
> + survey->filled = SURVEY_INFO_NOISE_DBM;
> + survey->noise = sc->ah->ah_noise_floor;
> +
> + return 0;
> +}
Nice, it should be very similar for ath9k BTW, one enhancement which we've
been meanint to address but haven't had the time yet is to split noise floor
per channel. This can be seen how its done on the legacy HAL with the code
sprinkled with the ATH_NF_PER_CHAN ifdef.
Luis
next prev parent reply other threads:[~2010-04-14 17:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0290AB2F0A8E124B9FFC144088A1A95609D6029647@EX-MBS04.nbl.local>
[not found] ` <20100401163526.GB2483@tux>
[not found] ` <0290AB2F0A8E124B9FFC144088A1A95609D6096AB9@EX-MBS04.nbl.local>
2010-04-12 18:04 ` Survey mode volunteers Luis R. Rodriguez
2010-04-14 7:11 ` Holger Schurig
2010-04-14 17:30 ` Luis R. Rodriguez [this message]
2010-04-16 6:45 ` Holger Schurig
2010-04-15 11:15 ` Anton Puolakka
2010-04-16 6:47 ` Holger Schurig
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=20100414173044.GA2841@tux \
--to=lrodriguez@atheros.com \
--cc=Anton.Puolakka@7signal.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=benoit.papillault@free.fr \
--cc=holgerschurig@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/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).