aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/vxcan.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2017-06-02 19:37:30 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-06-09 14:39:02 +0200
commit97edec3a11cf6f73f2e45c3035b5ff8e4c3543dd (patch)
tree4231aed948a530fa6d91b9be50b072f84fdf02bf /drivers/net/can/vxcan.c
parentcan: af_can: namespace support: fix lockdep splat: properly initialize spin_lock (diff)
downloadlinux-dev-97edec3a11cf6f73f2e45c3035b5ff8e4c3543dd.tar.xz
linux-dev-97edec3a11cf6f73f2e45c3035b5ff8e4c3543dd.zip
can: enable CAN FD for virtual CAN devices by default
CAN FD capable CAN interfaces can handle (classic) CAN 2.0 frames too. New users usually fail at their first attempt to explore CAN FD on virtual CAN interfaces due to the current CAN_MTU default. Set the MTU to CANFD_MTU by default to reduce this confusion. If someone *really* needs a 'classic CAN'-only device this can be set with the 'ip' tool with e.g. 'ip link set vcan0 mtu 16' as before. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/vxcan.c')
-rw-r--r--drivers/net/can/vxcan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c
index 30cf2368becf..cfe889e8f172 100644
--- a/drivers/net/can/vxcan.c
+++ b/drivers/net/can/vxcan.c
@@ -150,7 +150,7 @@ static const struct net_device_ops vxcan_netdev_ops = {
static void vxcan_setup(struct net_device *dev)
{
dev->type = ARPHRD_CAN;
- dev->mtu = CAN_MTU;
+ dev->mtu = CANFD_MTU;
dev->hard_header_len = 0;
dev->addr_len = 0;
dev->tx_queue_len = 0;