From patchwork Thu Nov 12 15:34:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Grandegger X-Patchwork-Id: 38255 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 44750B7B3E for ; Fri, 13 Nov 2009 02:34:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753152AbZKLPeg (ORCPT ); Thu, 12 Nov 2009 10:34:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753096AbZKLPeg (ORCPT ); Thu, 12 Nov 2009 10:34:36 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:45433 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753043AbZKLPeg (ORCPT ); Thu, 12 Nov 2009 10:34:36 -0500 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id AC90A1C15CBC; Thu, 12 Nov 2009 16:34:40 +0100 (CET) X-Auth-Info: A3xGQ0KAI/TO8naP7jh+C9yQdr5e7oZuCpaAMhIHZQA= Received: from lancy.mylan.de (p4FF07852.dip.t-dialin.net [79.240.120.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTP id 8FA9290275; Thu, 12 Nov 2009 16:34:40 +0100 (CET) Message-ID: <4AFC2AED.1090607@grandegger.com> Date: Thu, 12 Nov 2009 16:34:05 +0100 From: Wolfgang Grandegger User-Agent: Thunderbird 2.0.0.23 (X11/20090812) MIME-Version: 1.0 To: Linux Netdev List CC: SocketCAN Core Mailing List Subject: [PATCH] can: add the missing netlink get_xstats_size callback X-Enigmail-Version: 0.96.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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 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, };