linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: greearb@candelatech.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3 4/4] mac80211: Add more ethtools stats: survey, rates, etc
Date: Sat, 21 Apr 2012 08:16:13 +0200	[thread overview]
Message-ID: <1334988973.3480.0.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1334962432-18620-4-git-send-email-greearb@candelatech.com> (sfid-20120421_005430_129157_D00F3C21)

On Fri, 2012-04-20 at 15:53 -0700, greearb@candelatech.com wrote:

> +	if (last_sta) {
> +		data[i++] = sta->sta_state;
> +
> +		sinfo.filled = 0;
> +		sta_set_sinfo(last_sta, &sinfo);
> +
> +		if (sinfo.filled | STATION_INFO_TX_BITRATE)
> +			data[i] = 100000 *
> +				cfg80211_calculate_bitrate(&sinfo.txrate);
> +		i++;
> +		if (sinfo.filled | STATION_INFO_RX_BITRATE)
> +			data[i] = 100000 *
> +				cfg80211_calculate_bitrate(&sinfo.rxrate);
> +		i++;
> +
> +		if (sinfo.filled | STATION_INFO_SIGNAL_AVG)
> +			data[i] = (u8)sinfo.signal_avg;
> +		i++;

I think you should leave this out unless it's in managed mode because
it'll otherwise just be from a random station.

johannes


      reply	other threads:[~2012-04-21  6:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 22:53 [PATCH v3 0/4] Add ethtool stats support for Wireless Devices greearb
2012-04-20 22:53 ` [PATCH v3 2/4] mac80211: Support getting sta_info stats via ethtool greearb
2012-04-20 22:53 ` [PATCH v3 3/4] mac80211: Framework to get wifi-driver " greearb
2012-04-20 22:53 ` [PATCH v3 4/4] mac80211: Add more ethtools stats: survey, rates, etc greearb
2012-04-21  6:16   ` Johannes Berg [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=1334988973.3480.0.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=greearb@candelatech.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).