linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Joe Perches <joe@perches.com>
Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net
Subject: Re: [PATCH] ath9k: Support ethtool getstats api.
Date: Mon, 07 May 2012 10:57:22 -0700	[thread overview]
Message-ID: <4FA80D02.404@candelatech.com> (raw)
In-Reply-To: <1336412033.20924.6.camel@joe2Laptop>

On 05/07/2012 10:33 AM, Joe Perches wrote:
> On Mon, 2012-05-07 at 10:23 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> This returns many of the values that formerly could
>> only be obtained from debugfs.  This should be an
>> improvement when trying to access these counters
>> programatically.  Currently this support is only
>> enabled when DEBUGFS is enabled because otherwise
>> these stats are not accumulated.
>
> trivia:
>
> []
>> +#define ATH9K_SSTATS_LEN ARRAY_SIZE(ath9k_gstrings_stats)
>
> I think there's not much value in this #define
>
>> +static int ath9k_get_et_sset_count(struct ieee80211_hw *hw,
>> +				   struct ieee80211_vif *vif, int sset)
>> +{
>> +	if (sset == ETH_SS_STATS)
>> +		return ATH9K_SSTATS_LEN;
>> +	return 0;
>> +}
>
> Is this the only use?

No, there is a check later that does a BUG_ON if our
we have screwed up the indexing of the stats.

That helps catch trivial problems with adding a stat
but not the string, or vice versa.

Thanks,
Ben


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


  reply	other threads:[~2012-05-07 17:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 17:23 [PATCH] ath9k: Support ethtool getstats api greearb
2012-05-07 17:33 ` Joe Perches
2012-05-07 17:57   ` Ben Greear [this message]
2012-05-08  7:55     ` Kalle Valo
2012-05-08 15:06       ` Ben Greear
2012-05-08 17:43       ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2012-04-12 16:56 greearb

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=4FA80D02.404@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=joe@perches.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).