can: add the missing netlink get_xstats_size callback
Subsystems (3)
PATCH 1/1 can: add the missing netlink get_xstats_size callback
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.
--- drivers/net/can/dev.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/can/dev.c +6 -0
@@ -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, };
From: Wolfgang Grandegger <[email protected]>
Date: Thu, 12 Nov 2009 16:34:05 +0100
Quoted 5 lines
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 <[email protected]>
Applied.
Quoted 10 lines · David Miller
From: Wolfgang Grandegger <[email protected]>
Date: Thu, 12 Nov 2009 16:34:05 +0100Quoted 5 lines
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 <[email protected]>Applied.
It would make sense to apply this patch to net-2.6 as well.
Wolfgang.
David Miller
maintainerFrom: Wolfgang Grandegger <[email protected]>
Date: Sun, 15 Nov 2009 12:58:04 +0100
Quoted 8 lines
Quoted 7 lines · David Miller
From: Wolfgang Grandegger <[email protected]>
Date: Thu, 12 Nov 2009 16:34:05 +0100Quoted 4 lines
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.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Wolfgang Grandegger <[email protected]>Applied.
It would make sense to apply this patch to net-2.6 as well.
I only applied it to net-2.6