netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 06/10] mac80211: Add sta_state to ethtool stats.
Date: Thu, 12 Apr 2012 07:48:36 -0700	[thread overview]
Message-ID: <4F86EB44.3080703@candelatech.com> (raw)
In-Reply-To: <1334202554.3788.9.camel@jlt3.sipsolutions.net>

On 04/11/2012 08:49 PM, Johannes Berg wrote:
> On Wed, 2012-04-11 at 10:52 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> Helps to know how the station is doing in it's association
>> attempt.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>> :100644 100644 bbaf564... a63834d... M	net/mac80211/cfg.c
>>   net/mac80211/cfg.c |    6 ++++--
>>   1 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
>> index bbaf564..a63834d 100644
>> --- a/net/mac80211/cfg.c
>> +++ b/net/mac80211/cfg.c
>> @@ -118,7 +118,7 @@ static const char ieee80211_gstrings_sta_stats[][ETH_GSTRING_LEN] = {
>>   	"rx_duplicates", "rx_fragments", "rx_dropped",
>>   	"tx_packets", "tx_bytes", "tx_fragments",
>>   	"tx_filtered", "tx_retry_failed", "tx_retries",
>> -	"beacon_loss", "txrate", "rxrate", "signal",
>> +	"beacon_loss", "sta_state", "txrate", "rxrate", "signal",
>>   	"channel", "noise", "ch_time", "ch_time_busy",
>>   	"ch_time_ext_busy", "ch_time_rx", "ch_time_tx"
>>   };
>> @@ -534,10 +534,12 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
>>   		data[i++] += sta->beacon_loss_count;
>>
>>   		if (!do_once) {
>> -			i += 3;
>> +			i += 4;
>>   			goto after_once;
>>   		}
>>
>> +		data[i++] = sta->sta_state;
>> +
>
> Gee, I wish it was easier to tell if you were adding it to the right
> spot in the list ... any way that could be made easier?

It would be nice, but I haven't thought of an easy way to do this,
and I haven't noticed any other drivers
that found a way.

I *could* add a lot of #defines and do something like: data[STA_STATE_IDX] = sta->state,
and maybe create the strings array at run-time using macros to map string to
an idx define instead of have a static array of char*.  But, I'm not sure if
it's worth the effort.

Thanks,
Ben

>
> johannes


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2012-04-12 14:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 17:52 [PATCH 00/10] Wireless patches for wireless-testing greearb
2012-04-11 17:52 ` [PATCH 01/10] cfg80211: Add framework to support ethtool stats greearb
2012-04-11 17:52 ` [PATCH 02/10] mac80211: Support getting sta_info stats via ethtool greearb
2012-04-11 17:52 ` [PATCH 03/10] mac80211: Framework to get wifi-driver " greearb
2012-04-11 17:52 ` [PATCH 04/10] ath9k: Support ethtool getstats api greearb
2012-04-11 17:52 ` [PATCH 07/10] ath9k: Add tx-failed counter greearb
2012-04-11 17:52 ` [PATCH 10/10] ath9k: Gather and report IRQ sync_cause errors greearb
     [not found] ` <1334166738-28243-1-git-send-email-greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2012-04-11 17:52   ` [PATCH 05/10] mac80211: Add more ethtools stats: survey, rates, etc greearb-my8/4N5VtI7c+919tysfdA
     [not found]     ` <1334166738-28243-6-git-send-email-greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2012-04-11 18:01       ` Ben Greear
2012-04-12  3:46       ` Johannes Berg
     [not found]         ` <1334202406.3788.8.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2012-04-12 14:50           ` Ben Greear
2012-04-12 15:23         ` Ben Greear
2012-04-11 17:52   ` [PATCH 06/10] mac80211: Add sta_state to ethtool stats greearb-my8/4N5VtI7c+919tysfdA
2012-04-12  3:49     ` Johannes Berg
2012-04-12 14:48       ` Ben Greear [this message]
2012-04-11 17:52   ` [PATCH 08/10] mac80211: Support on-channel scan option greearb-my8/4N5VtI7c+919tysfdA
2012-04-12  3:45     ` Johannes Berg
2012-04-12 15:03       ` Ben Greear
2012-04-11 17:52   ` [PATCH 09/10] ath9k: Add more recv stats greearb-my8/4N5VtI7c+919tysfdA
2012-04-12  3:39   ` [PATCH 00/10] Wireless patches for wireless-testing Johannes Berg

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=4F86EB44.3080703@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@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).