linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Randolf <br1@einfach.org>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>, vasanth@atheros.com
Cc: linville@tuxdriver.com, nbd@openwrt.org,
	ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 5/5] ath5k: Add busy ratios to survey data
Date: Wed, 6 Oct 2010 11:25:54 +0900	[thread overview]
Message-ID: <201010061125.54247.br1@einfach.org> (raw)
In-Reply-To: <AANLkTimP=R4hsCWU+wP1aemHn1awzNQVWMa-_7OJEQLG@mail.gmail.com>

On Wed October 6 2010 07:38:34 Luis R. Rodriguez wrote:
> On Tue, Oct 5, 2010 at 2:55 AM, 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 |   17 +++++++++++++++++
> >  1 files changed, 17 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/ath/ath5k/base.c
> > b/drivers/net/wireless/ath/ath5k/base.c index c158f2e..a33d9f2 100644
> > --- a/drivers/net/wireless/ath/ath5k/base.c
> > +++ b/drivers/net/wireless/ath/ath5k/base.c
> > @@ -3008,6 +3008,7 @@ 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);
> > 
> >         if (idx != 0)
> >                return -ENOENT;
> > @@ -3016,6 +3017,22 @@ static int ath5k_get_survey(struct ieee80211_hw
> > *hw, int idx, survey->filled = SURVEY_INFO_NOISE_DBM;
> >        survey->noise = sc->ah->ah_noise_floor;
> > 
> > +       ath_hw_cycle_counters_lock(common);
> > +       ath_hw_cycle_counters_update(common);
> > +       if (common->cc_survey.cycles > 0) {
> > +               survey->filled |= SURVEY_INFO_BUSY |
> > +                               SURVEY_INFO_BUSY_TX |
> > SURVEY_INFO_BUSY_RX; +               survey->busy =
> > common->cc_survey.rx_busy * 255 / +                                    
> >   common->cc_survey.cycles; +               survey->busy_tx =
> > common->cc_survey.tx_frame * 255 / +                                    
> >   common->cc_survey.cycles; +               survey->busy_rx =
> > common->cc_survey.rx_frame * 255 / +                                    
> >   common->cc_survey.cycles; +       }
> > +
> > +       memset(&common->cc_survey, 0, sizeof(struct ath_cycle_counters));
> > +       ath_hw_cycle_counters_unlock(common);
> > +
> 
> This is all being sucked out of common, so can we just share the
> filler for the survey between ath5k and ath9k? Note we should split up
> hw code and core driver code on the ath module by file.

sure, that would be good! noise floor comes from ath5k_hw though, but that can 
easily be moved to common. 

there's so much code which could be shared between ath5k and ath9k...

bruno

  reply	other threads:[~2010-10-06  2:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  9:55 [PATCH 1/5] ath: Add common function for reading cycle counters Bruno Randolf
2010-10-05  9:55 ` [PATCH 2/5] ath5k: Use common cycle counters for ANI Bruno Randolf
2010-10-05  9:55 ` [PATCH 3/5] ath9k: Use common cycle counters Bruno Randolf
2010-10-05 20:14   ` [ath5k-devel] " Luis R. Rodriguez
2010-10-06  1:10     ` Bruno Randolf
2010-10-06  1:13       ` Luis R. Rodriguez
2010-10-06  1:18   ` Luis R. Rodriguez
2010-10-06  2:00     ` Bruno Randolf
2010-10-06  2:15       ` [ath5k-devel] " Luis R. Rodriguez
2010-10-05  9:55 ` [PATCH 4/5] nl80211/mac80211: Add channel utilization to survey Bruno Randolf
2010-10-05 22:36   ` Luis R. Rodriguez
2010-10-06  2:35     ` Bruno Randolf
2010-10-06  9:54   ` Helmut Schaa
2010-10-07  1:03     ` Bruno Randolf
2010-10-07  3:02       ` [ath5k-devel] " Luis R. Rodriguez
2010-10-07  6:51       ` Helmut Schaa
2010-10-07  7:06         ` Bruno Randolf
2010-10-07  7:35           ` Jonathan Guerin
2010-10-07  7:44           ` Helmut Schaa
2010-10-07  7:52             ` Johannes Berg
2010-10-08 17:41               ` Helmut Schaa
2010-10-05  9:55 ` [PATCH 5/5] ath5k: Add busy ratios to survey data Bruno Randolf
2010-10-05 22:38   ` Luis R. Rodriguez
2010-10-06  2:25     ` Bruno Randolf [this message]
2010-10-06  2:45       ` Felix Fietkau
2010-10-06  2:50         ` Bruno Randolf
2010-10-06 14:13           ` Luis R. Rodriguez

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=201010061125.54247.br1@einfach.org \
    --to=br1@einfach.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=nbd@openwrt.org \
    --cc=vasanth@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).