Search Linux Wireless

Re: [PATCH 2/2] brcmfmac: use existing net_device_stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 5 Jan 2012 11:39:34 -0800
"Franky Lin" <frankyl@xxxxxxxxxxxx> wrote:

> On 01/05/2012 11:15 AM, Stephen Hemminger wrote:
> > On Thu, 5 Jan 2012 20:12:12 +0100
> > "Arend van Spriel"<arend@xxxxxxxxxxxx>  wrote:
> >
> >> On 01/05/2012 07:39 PM, Stephen Hemminger wrote:
> >>> Minor space savings. Compile tested only.
> >>>
> >>
> >> This is actually not going to work. The struct brcmf_if represents
> >> individual interfaces which each have their own device statistics.
> >>
> >
> > Why not, if you  look it is only used during the aggregation and return
> > of netdevice stats.
> >
> 
> We only support one primary interface at the moment. But we have plan to 
> add P2P support using virtual interfaces. It would be better to have 
> individual stats for different interfaces.
> 
> Thanks,
> Franky
> 

You are confused. The only place the data in question is used is:
static struct net_device_stats *brcmf_netdev_get_stats

This is a per-network device standard API and it returns per-network device
statistics. Several releases ago, structure element was added to the network_device
struct for common usage by drivers. All this patch does is use that instead of the
private device scratch pad.

If you really want to be more clever, the device should be convert to the
new getstats64 API, but that requires more work (like wrapping updates with
the u64_stats_sync() macros.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux