diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2009-11-12 00:34:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-13 22:56:55 -0500 |
commit | 55369c0a6441e95062cfaeef6eefcfb357a31e8c (patch) | |
tree | 1bd9907dad60ea1cd7ff388466da6f00d0f44d38 /drivers | |
parent | b93cf3f0bb45560d2ce62bdcc2181c40660cfdbf (diff) |
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.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 564e31c9fee4..2868fe842a41 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c | |||
@@ -629,6 +629,11 @@ nla_put_failure: | |||
629 | return -EMSGSIZE; | 629 | return -EMSGSIZE; |
630 | } | 630 | } |
631 | 631 | ||
632 | static size_t can_get_xstats_size(const struct net_device *dev) | ||
633 | { | ||
634 | return sizeof(struct can_device_stats); | ||
635 | } | ||
636 | |||
632 | static int can_fill_xstats(struct sk_buff *skb, const struct net_device *dev) | 637 | static int can_fill_xstats(struct sk_buff *skb, const struct net_device *dev) |
633 | { | 638 | { |
634 | struct can_priv *priv = netdev_priv(dev); | 639 | struct can_priv *priv = netdev_priv(dev); |
@@ -657,6 +662,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = { | |||
657 | .changelink = can_changelink, | 662 | .changelink = can_changelink, |
658 | .get_size = can_get_size, | 663 | .get_size = can_get_size, |
659 | .fill_info = can_fill_info, | 664 | .fill_info = can_fill_info, |
665 | .get_xstats_size = can_get_xstats_size, | ||
660 | .fill_xstats = can_fill_xstats, | 666 | .fill_xstats = can_fill_xstats, |
661 | }; | 667 | }; |
662 | 668 | ||