diff options
-rw-r--r-- | drivers/net/can/dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index f9cba4123c66..1870c4731a57 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c | |||
@@ -705,14 +705,14 @@ static size_t can_get_size(const struct net_device *dev) | |||
705 | size_t size; | 705 | size_t size; |
706 | 706 | ||
707 | size = nla_total_size(sizeof(u32)); /* IFLA_CAN_STATE */ | 707 | size = nla_total_size(sizeof(u32)); /* IFLA_CAN_STATE */ |
708 | size += sizeof(struct can_ctrlmode); /* IFLA_CAN_CTRLMODE */ | 708 | size += nla_total_size(sizeof(struct can_ctrlmode)); /* IFLA_CAN_CTRLMODE */ |
709 | size += nla_total_size(sizeof(u32)); /* IFLA_CAN_RESTART_MS */ | 709 | size += nla_total_size(sizeof(u32)); /* IFLA_CAN_RESTART_MS */ |
710 | size += sizeof(struct can_bittiming); /* IFLA_CAN_BITTIMING */ | 710 | size += nla_total_size(sizeof(struct can_bittiming)); /* IFLA_CAN_BITTIMING */ |
711 | size += sizeof(struct can_clock); /* IFLA_CAN_CLOCK */ | 711 | size += nla_total_size(sizeof(struct can_clock)); /* IFLA_CAN_CLOCK */ |
712 | if (priv->do_get_berr_counter) /* IFLA_CAN_BERR_COUNTER */ | 712 | if (priv->do_get_berr_counter) /* IFLA_CAN_BERR_COUNTER */ |
713 | size += sizeof(struct can_berr_counter); | 713 | size += nla_total_size(sizeof(struct can_berr_counter)); |
714 | if (priv->bittiming_const) /* IFLA_CAN_BITTIMING_CONST */ | 714 | if (priv->bittiming_const) /* IFLA_CAN_BITTIMING_CONST */ |
715 | size += sizeof(struct can_bittiming_const); | 715 | size += nla_total_size(sizeof(struct can_bittiming_const)); |
716 | 716 | ||
717 | return size; | 717 | return size; |
718 | } | 718 | } |