aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-09 02:00:54 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-09 02:00:54 -0500
commitd0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4 (patch)
treedaab7cc0db83226672f76d2fc9277e4355f89e6b /drivers/net/can/dev.c
parent9e0d57fd6dad37d72a3ca6db00ca8c76f2215454 (diff)
parent2606289779cb297320a185db5997729d29b6700b (diff)
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 5fe34d64ca2a..26c89aaeba62 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,
637 return 0; 637 return 0;
638} 638}
639 639
640static size_t can_get_size(const struct net_device *dev)
641{
642 struct can_priv *priv = netdev_priv(dev);
643 size_t size;
644
645 size = nla_total_size(sizeof(u32)); /* IFLA_CAN_STATE */
646 size += sizeof(struct can_ctrlmode); /* IFLA_CAN_CTRLMODE */
647 size += nla_total_size(sizeof(u32)); /* IFLA_CAN_RESTART_MS */
648 size += sizeof(struct can_bittiming); /* IFLA_CAN_BITTIMING */
649 size += sizeof(struct can_clock); /* IFLA_CAN_CLOCK */
650 if (priv->bittiming_const) /* IFLA_CAN_BITTIMING_CONST */
651 size += sizeof(struct can_bittiming_const);
652
653 return size;
654}
655
640static int can_fill_info(struct sk_buff *skb, const struct net_device *dev) 656static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)
641{ 657{
642 struct can_priv *priv = netdev_priv(dev); 658 struct can_priv *priv = netdev_priv(dev);
@@ -687,6 +703,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = {
687 .setup = can_setup, 703 .setup = can_setup,
688 .newlink = can_newlink, 704 .newlink = can_newlink,
689 .changelink = can_changelink, 705 .changelink = can_changelink,
706 .get_size = can_get_size,
690 .fill_info = can_fill_info, 707 .fill_info = can_fill_info,
691 .fill_xstats = can_fill_xstats, 708 .fill_xstats = can_fill_xstats,
692}; 709};