From: Bruno Randolf <br1@einfach.org>
To: Jonathan Guerin <jonathan@guerin.id.au>
Cc: linville@tuxdriver.com, ath5k-devel@lists.ath5k.org,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] ath5k: Add channel time to survey data
Date: Thu, 16 Dec 2010 16:23:21 +0900 [thread overview]
Message-ID: <201012161623.21990.br1@einfach.org> (raw)
In-Reply-To: <AANLkTimPEAXpvdp2-MMA65=dO_-YZzcS9VbWCNOhVO1q@mail.gmail.com>
On Fri November 19 2010 21:28:52 Jonathan Guerin wrote:
> I'm not sure if I'm understanding the way the data is represented. I'm
> pulling it via nl80211 (or even if just using iw to poll the values
> regularly). They just appear to go back and forwards in time, as well
> as being very large values. Am I missing something? Is the count not
> supposed to be the amount of time for the measure since the card was
> brought up?
>
> Also, what does the 'channel time' value actually mean by 'time the
> station spent on this channel'? How is this different to the 'Channel
> busy time'? If it's not just busy time, but time the station was
> locked on this channel, why is the value FAR smaller than the channel
> busy time...?
Jonathan,
Yeah, the old implementation was all broken. Please check my patch from today
- I verified it works now.
bruno
> --
> Jonathan Guerin
>
> On Tue, Oct 19, 2010 at 5:56 PM, Bruno Randolf <br1@einfach.org> wrote:
> > Include the channel utilization (busy, rx, tx) in the survey results.
> >
> > Signed-off-by: Bruno Randolf <br1@einfach.org>
> > ---
> > drivers/net/wireless/ath/ath5k/base.c | 20 +++++++++++++++++++-
> > 1 files changed, 19 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath5k/base.c
> > b/drivers/net/wireless/ath/ath5k/base.c index 8251946..484aad5 100644
> > --- a/drivers/net/wireless/ath/ath5k/base.c
> > +++ b/drivers/net/wireless/ath/ath5k/base.c
> > @@ -3206,14 +3206,32 @@ static int ath5k_get_survey(struct ieee80211_hw
> > *hw, int idx, {
> > struct ath5k_softc *sc = hw->priv;
> > struct ieee80211_conf *conf = &hw->conf;
> > + struct ath_common *common = ath5k_hw_common(sc->ah);
> > + struct ath_cycle_counters *cc = &common->cc_survey;
> > + unsigned int div = common->clockrate * 1000;
> >
> > - if (idx != 0)
> > + if (idx != 0)
> > return -ENOENT;
> >
> > survey->channel = conf->channel;
> > survey->filled = SURVEY_INFO_NOISE_DBM;
> > survey->noise = sc->ah->ah_noise_floor;
> >
> > + spin_lock_bh(&common->cc_lock);
> > + ath_hw_cycle_counters_update(common);
> > + if (cc->cycles > 0) {
> > + survey->filled |= SURVEY_INFO_CHANNEL_TIME |
> > + SURVEY_INFO_CHANNEL_TIME_BUSY |
> > + SURVEY_INFO_CHANNEL_TIME_RX |
> > + SURVEY_INFO_CHANNEL_TIME_TX;
> > + survey->channel_time += cc->cycles / div;
> > + survey->channel_time_busy += cc->rx_busy / div;
> > + survey->channel_time_rx += cc->rx_frame / div;
> > + survey->channel_time_tx += cc->tx_frame / div;
> > + }
> > + memset(cc, 0, sizeof(*cc));
> > + spin_unlock_bh(&common->cc_lock);
> > +
> > return 0;
> > }
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-wireless"
> > in the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-12-16 7:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 7:56 [PATCH 1/2] ath5k: Optimize descriptor alignment Bruno Randolf
2010-10-19 7:56 ` [PATCH 2/2] ath5k: Add channel time to survey data Bruno Randolf
2010-11-19 12:28 ` Jonathan Guerin
2010-12-16 7:23 ` Bruno Randolf [this message]
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=201012161623.21990.br1@einfach.org \
--to=br1@einfach.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jonathan@guerin.id.au \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).