Skip to content

Commit

Permalink
can: add the missing netlink get_xstats_size callback
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
grandwolf authored and davem330 committed Nov 14, 2009
1 parent b93cf3f commit 55369c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/can/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,11 @@ static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)
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);
Expand Down Expand Up @@ -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,
};

Expand Down

0 comments on commit 55369c0

Please sign in to comment.