linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ath6kl: make net_device_ops const
       [not found] <20120105183947.295358582@vyatta.com>
@ 2012-01-05 18:39 ` Stephen Hemminger
  2012-01-09 14:40   ` Kalle Valo
  2012-01-05 18:39 ` [PATCH 1/2] brcmf: " Stephen Hemminger
       [not found] ` <20120105184000.572918423@vyatta.com>
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-05 18:39 UTC (permalink / raw)
  To: John W. Linville, Kalle Valo; +Cc: linux-wireless

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/wireless/ath/ath6kl/main.c	2012-01-05 09:50:35.716589669 -0800
+++ b/drivers/net/wireless/ath/ath6kl/main.c	2012-01-05 09:52:58.906118317 -0800
@@ -1456,7 +1456,7 @@ static struct net_device_stats *ath6kl_g
 	return &ar->net_stats;
 }
 
-static struct net_device_ops ath6kl_netdev_ops = {
+static const struct net_device_ops ath6kl_netdev_ops = {
 	.ndo_open               = ath6kl_open,
 	.ndo_stop               = ath6kl_close,
 	.ndo_start_xmit         = ath6kl_data_tx,



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] brcmf: make net_device_ops const
       [not found] <20120105183947.295358582@vyatta.com>
  2012-01-05 18:39 ` [PATCH 1/3] ath6kl: make net_device_ops const Stephen Hemminger
@ 2012-01-05 18:39 ` Stephen Hemminger
       [not found] ` <20120105184000.572918423@vyatta.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-05 18:39 UTC (permalink / raw)
  To: John W. Linville, Arend van Spriel, Roland Vossen; +Cc: linux-wireless


Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c	2012-01-05 09:50:35.768590224 -0800
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c	2012-01-05 10:02:57.488495190 -0800
@@ -1123,7 +1123,7 @@ int brcmf_bus_start(struct brcmf_pub *dr
 	return 0;
 }
 
-static struct net_device_ops brcmf_netdev_ops_pri = {
+static const struct net_device_ops brcmf_netdev_ops_pri = {
 	.ndo_open = brcmf_netdev_open,
 	.ndo_stop = brcmf_netdev_stop,
 	.ndo_get_stats = brcmf_netdev_get_stats,



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] brcmfmac: use existing net_device_stats
       [not found] ` <20120105184000.572918423@vyatta.com>
@ 2012-01-05 19:12   ` Arend van Spriel
  2012-01-05 19:15     ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Arend van Spriel @ 2012-01-05 19:12 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: John W. Linville, linux-wireless@vger.kernel.org,
	Franky (Zhenhui) Lin

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.

> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> 
> --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c	2012-01-05 10:02:57.488495190 -0800
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c	2012-01-05 10:09:58.536972268 -0800
> @@ -56,7 +56,6 @@ struct brcmf_if {
>  	struct brcmf_info *info;	/* back pointer to brcmf_info */
>  	/* OS/stack specifics */
>  	struct net_device *ndev;
> -	struct net_device_stats stats;
>  	int idx;		/* iface idx in dongle */
>  	int state;		/* interface state */
>  	u8 mac_addr[ETH_ALEN];	/* assigned MAC address */
> @@ -526,7 +525,6 @@ static struct net_device_stats *brcmf_ne
>  {
>  	struct brcmf_info *drvr_priv = *(struct brcmf_info **)
>  					netdev_priv(ndev);
> -	struct brcmf_if *ifp;
>  	int ifidx;
>  

Gr. AvS


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] brcmfmac: use existing net_device_stats
  2012-01-05 19:12   ` [PATCH 2/2] brcmfmac: use existing net_device_stats Arend van Spriel
@ 2012-01-05 19:15     ` Stephen Hemminger
  2012-01-05 19:39       ` Franky Lin
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-05 19:15 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: John W. Linville, linux-wireless@vger.kernel.org,
	Franky (Zhenhui) Lin

On Thu, 5 Jan 2012 20:12:12 +0100
"Arend van Spriel" <arend@broadcom.com> 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.
> 
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > 
> > 
> > --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c	2012-01-05 10:02:57.488495190 -0800
> > +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c	2012-01-05 10:09:58.536972268 -0800
> > @@ -56,7 +56,6 @@ struct brcmf_if {
> >  	struct brcmf_info *info;	/* back pointer to brcmf_info */
> >  	/* OS/stack specifics */
> >  	struct net_device *ndev;
> > -	struct net_device_stats stats;
> >  	int idx;		/* iface idx in dongle */
> >  	int state;		/* interface state */
> >  	u8 mac_addr[ETH_ALEN];	/* assigned MAC address */
> > @@ -526,7 +525,6 @@ static struct net_device_stats *brcmf_ne
> >  {
> >  	struct brcmf_info *drvr_priv = *(struct brcmf_info **)
> >  					netdev_priv(ndev);
> > -	struct brcmf_if *ifp;
> >  	int ifidx;
> >  
> 
> Gr. AvS
> 

Why not, if you  look it is only used during the aggregation and return
of netdevice stats.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] brcmfmac: use existing net_device_stats
  2012-01-05 19:15     ` Stephen Hemminger
@ 2012-01-05 19:39       ` Franky Lin
  2012-01-06  5:00         ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Franky Lin @ 2012-01-05 19:39 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Arend Van Spriel, John W. Linville,
	linux-wireless@vger.kernel.org

On 01/05/2012 11:15 AM, Stephen Hemminger wrote:
> On Thu, 5 Jan 2012 20:12:12 +0100
> "Arend van Spriel"<arend@broadcom.com>  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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] brcmfmac: use existing net_device_stats
  2012-01-05 19:39       ` Franky Lin
@ 2012-01-06  5:00         ` Stephen Hemminger
  2012-01-06 20:07           ` Franky Lin
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2012-01-06  5:00 UTC (permalink / raw)
  To: Franky Lin
  Cc: Arend Van Spriel, John W. Linville,
	linux-wireless@vger.kernel.org

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

> On 01/05/2012 11:15 AM, Stephen Hemminger wrote:
> > On Thu, 5 Jan 2012 20:12:12 +0100
> > "Arend van Spriel"<arend@broadcom.com>  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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] brcmfmac: use existing net_device_stats
  2012-01-06  5:00         ` Stephen Hemminger
@ 2012-01-06 20:07           ` Franky Lin
  0 siblings, 0 replies; 8+ messages in thread
From: Franky Lin @ 2012-01-06 20:07 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Arend Van Spriel, John W. Linville,
	linux-wireless@vger.kernel.org

On 01/05/2012 09:00 PM, Stephen Hemminger wrote:
> 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.
>

I misunderstood since the first mail I got of this thread is Arend's 
reply. But I did receive the "brcmf: make net_device_ops const" patch. 
Something wrong with the mail server?

Franky


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] ath6kl: make net_device_ops const
  2012-01-05 18:39 ` [PATCH 1/3] ath6kl: make net_device_ops const Stephen Hemminger
@ 2012-01-09 14:40   ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2012-01-09 14:40 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: John W. Linville, linux-wireless, ath6kl-devel

Thanks, applied to ath6kl.git.

Kalle

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-09 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120105183947.295358582@vyatta.com>
2012-01-05 18:39 ` [PATCH 1/3] ath6kl: make net_device_ops const Stephen Hemminger
2012-01-09 14:40   ` Kalle Valo
2012-01-05 18:39 ` [PATCH 1/2] brcmf: " Stephen Hemminger
     [not found] ` <20120105184000.572918423@vyatta.com>
2012-01-05 19:12   ` [PATCH 2/2] brcmfmac: use existing net_device_stats Arend van Spriel
2012-01-05 19:15     ` Stephen Hemminger
2012-01-05 19:39       ` Franky Lin
2012-01-06  5:00         ` Stephen Hemminger
2012-01-06 20:07           ` Franky Lin

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).