* [PATCH] can: add the missing netlink get_xstats_size callback
@ 2009-11-12 15:34 Wolfgang Grandegger
2009-11-14 3:58 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2009-11-12 15:34 UTC (permalink / raw)
To: Linux Netdev List; +Cc: SocketCAN Core Mailing List
This patch adds the missing "get_xstats_size" callback for the
netlink interface, which is required if "fill_xstats" is used,
as pointed out by Patrick McHardy.
Signed-off-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
---
drivers/net/can/dev.c | 6 ++++++
1 file changed, 6 insertions(+)
Index: net-next-2.6/drivers/net/can/dev.c
===================================================================
--- net-next-2.6.orig/drivers/net/can/dev.c
+++ net-next-2.6/drivers/net/can/dev.c
@@ -677,6 +677,11 @@ nla_put_failure:
return -EMSGSIZE;
}
+static size_t can_get_xstats_size(const struct net_device *dev)
+{
+ return sizeof(struct can_device_stats);
+}
+
static int can_fill_xstats(struct sk_buff *skb, const struct net_device *dev)
{
struct can_priv *priv = netdev_priv(dev);
@@ -705,6 +710,7 @@ static struct rtnl_link_ops can_link_ops
.changelink = can_changelink,
.get_size = can_get_size,
.fill_info = can_fill_info,
+ .get_xstats_size = can_get_xstats_size,
.fill_xstats = can_fill_xstats,
};
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can: add the missing netlink get_xstats_size callback
2009-11-12 15:34 [PATCH] can: add the missing netlink get_xstats_size callback Wolfgang Grandegger
@ 2009-11-14 3:58 ` David Miller
[not found] ` <20091113.195824.48418352.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-11-14 3:58 UTC (permalink / raw)
To: wg; +Cc: netdev, socketcan-core
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Thu, 12 Nov 2009 16:34:05 +0100
> This patch adds the missing "get_xstats_size" callback for the
> netlink interface, which is required if "fill_xstats" is used,
> as pointed out by Patrick McHardy.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can: add the missing netlink get_xstats_size callback
[not found] ` <20091113.195824.48418352.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
@ 2009-11-15 11:58 ` Wolfgang Grandegger
2009-11-16 5:16 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2009-11-15 11:58 UTC (permalink / raw)
To: David Miller
Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA
David Miller wrote:
> From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
> Date: Thu, 12 Nov 2009 16:34:05 +0100
>
>> This patch adds the missing "get_xstats_size" callback for the
>> netlink interface, which is required if "fill_xstats" is used,
>> as pointed out by Patrick McHardy.
>>
>> Signed-off-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
>
> Applied.
It would make sense to apply this patch to net-2.6 as well.
Wolfgang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can: add the missing netlink get_xstats_size callback
2009-11-15 11:58 ` Wolfgang Grandegger
@ 2009-11-16 5:16 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-11-16 5:16 UTC (permalink / raw)
To: wg; +Cc: netdev, socketcan-core
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Sun, 15 Nov 2009 12:58:04 +0100
> David Miller wrote:
>> From: Wolfgang Grandegger <wg@grandegger.com>
>> Date: Thu, 12 Nov 2009 16:34:05 +0100
>>
>>> This patch adds the missing "get_xstats_size" callback for the
>>> netlink interface, which is required if "fill_xstats" is used,
>>> as pointed out by Patrick McHardy.
>>>
>>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>>
>> Applied.
>
> It would make sense to apply this patch to net-2.6 as well.
I only applied it to net-2.6
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-16 5:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-12 15:34 [PATCH] can: add the missing netlink get_xstats_size callback Wolfgang Grandegger
2009-11-14 3:58 ` David Miller
[not found] ` <20091113.195824.48418352.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-11-15 11:58 ` Wolfgang Grandegger
2009-11-16 5:16 ` David Miller
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).