diff options
author | Marek Vasut <marex@denx.de> | 2016-06-09 21:21:00 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2016-06-17 15:39:42 +0200 |
commit | 21aedfdf092b0ceaf717e89495505052f8346362 (patch) | |
tree | 014d74bb9feda44a4d8803eb1e6abb84dded71a5 /drivers/net/can | |
parent | 7da29f97d6c816f5f95f964f4ced0dae14968cce (diff) | |
download | linux-rpi-21aedfdf092b0ceaf717e89495505052f8346362.tar.gz linux-rpi-21aedfdf092b0ceaf717e89495505052f8346362.tar.bz2 linux-rpi-21aedfdf092b0ceaf717e89495505052f8346362.zip |
can: slcan: Replace sizeof struct can_frame with CAN_MTU
Use CAN_MTU macro instead of sizeof(struct can_frame) just like the
other drivers do.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/slcan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 9a3f15cb7ef4..eb7173713bbc 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -354,7 +354,7 @@ static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) { struct slcan *sl = netdev_priv(dev); - if (skb->len != sizeof(struct can_frame)) + if (skb->len != CAN_MTU) goto out; spin_lock(&sl->lock); @@ -442,7 +442,7 @@ static void slc_setup(struct net_device *dev) dev->addr_len = 0; dev->tx_queue_len = 10; - dev->mtu = sizeof(struct can_frame); + dev->mtu = CAN_MTU; dev->type = ARPHRD_CAN; /* New-style flags. */ |