From: Wolfgang Grandegger Date: Thu, 12 Nov 2009 05:34:05 +0000 (+0000) Subject: can: add the missing netlink get_xstats_size callback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=55369c0a6441e95062cfaeef6eefcfb357a31e8c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: David S. Miller --- 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: 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); @@ -657,6 +662,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = { .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, };