summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-08 23:00:54 -0800
committerDavid S. Miller <davem@davemloft.net>2009-11-08 23:00:54 -0800
commitd0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4 (patch)
treedaab7cc0db83226672f76d2fc9277e4355f89e6b /drivers/net/can/dev.c
parent9e0d57fd6dad37d72a3ca6db00ca8c76f2215454 (diff)
parent2606289779cb297320a185db5997729d29b6700b (diff)
downloadop-kernel-dev-d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4.zip
op-kernel-dev-d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4.tar.gz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/can/usb/ems_usb.c
Diffstat (limited to 'drivers/net/can/dev.c')
-rw-r--r--drivers/net/can/dev.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 5fe34d6..26c89aa 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -637,6 +637,22 @@ static int can_changelink(struct net_device *dev,
return 0;
}
+static size_t can_get_size(const struct net_device *dev)
+{
+ struct can_priv *priv = netdev_priv(dev);
+ size_t size;
+
+ size = nla_total_size(sizeof(u32)); /* IFLA_CAN_STATE */
+ size += sizeof(struct can_ctrlmode); /* IFLA_CAN_CTRLMODE */
+ size += nla_total_size(sizeof(u32)); /* IFLA_CAN_RESTART_MS */
+ size += sizeof(struct can_bittiming); /* IFLA_CAN_BITTIMING */
+ size += sizeof(struct can_clock); /* IFLA_CAN_CLOCK */
+ if (priv->bittiming_const) /* IFLA_CAN_BITTIMING_CONST */
+ size += sizeof(struct can_bittiming_const);
+
+ return size;
+}
+
static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)
{
struct can_priv *priv = netdev_priv(dev);
@@ -687,6 +703,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = {
.setup = can_setup,
.newlink = can_newlink,
.changelink = can_changelink,
+ .get_size = can_get_size,
.fill_info = can_fill_info,
.fill_xstats = can_fill_xstats,
};
OpenPOWER on IntegriCloud