Commit 55369c0a authored by Wolfgang Grandegger's avatar Wolfgang Grandegger Committed by David S. Miller

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: default avatarWolfgang Grandegger <wg@grandegger.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b93cf3f0
...@@ -629,6 +629,11 @@ nla_put_failure: ...@@ -629,6 +629,11 @@ nla_put_failure:
return -EMSGSIZE; 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) static int can_fill_xstats(struct sk_buff *skb, const struct net_device *dev)
{ {
struct can_priv *priv = netdev_priv(dev); struct can_priv *priv = netdev_priv(dev);
...@@ -657,6 +662,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = { ...@@ -657,6 +662,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = {
.changelink = can_changelink, .changelink = can_changelink,
.get_size = can_get_size, .get_size = can_get_size,
.fill_info = can_fill_info, .fill_info = can_fill_info,
.get_xstats_size = can_get_xstats_size,
.fill_xstats = can_fill_xstats, .fill_xstats = can_fill_xstats,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment