diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-02 23:38:13 -0800 | 
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-02 23:38:13 -0800 | 
| commit | 467832032cc07626880363efa8625719c16c04eb (patch) | |
| tree | ee9a62c04f0b3106e412bc1b2dd1cea5566d5ca7 /drivers/net/can/dev.c | |
| parent | 66d2a5952eab875f1286e04f738ef029afdaf013 (diff) | |
| parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) | |
| download | olio-linux-3.10-467832032cc07626880363efa8625719c16c04eb.tar.xz olio-linux-3.10-467832032cc07626880363efa8625719c16c04eb.zip  | |
Merge commit 'v2.6.32' into next
Diffstat (limited to 'drivers/net/can/dev.c')
| -rw-r--r-- | drivers/net/can/dev.c | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index f0b9a1e1db4..2868fe842a4 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -589,6 +589,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); @@ -613,6 +629,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); @@ -639,7 +660,9 @@ 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, +	.get_xstats_size = can_get_xstats_size,  	.fill_xstats	= can_fill_xstats,  };  |