Message ID | 4AFC2AED.1090607@grandegger.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Wolfgang Grandegger <wg@grandegger.com> Date: Thu, 12 Nov 2009 16:34:05 +0100 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller wrote: > From: Wolfgang Grandegger <wg@grandegger.com> > Date: Thu, 12 Nov 2009 16:34:05 +0100 > >> 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> > > Applied. It would make sense to apply this patch to net-2.6 as well. Wolfgang. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Wolfgang Grandegger <wg@grandegger.com> Date: Sun, 15 Nov 2009 12:58:04 +0100 > David Miller wrote: >> From: Wolfgang Grandegger <wg@grandegger.com> >> Date: Thu, 12 Nov 2009 16:34:05 +0100 >> >>> 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> >> >> Applied. > > It would make sense to apply this patch to net-2.6 as well. I only applied it to net-2.6 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: net-next-2.6/drivers/net/can/dev.c =================================================================== --- net-next-2.6.orig/drivers/net/can/dev.c +++ net-next-2.6/drivers/net/can/dev.c @@ -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, };
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> --- drivers/net/can/dev.c | 6 ++++++ 1 file changed, 6 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html