From c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Fri, 7 Mar 2014 09:23:41 +0100 Subject: can: Unify MTU settings for CAN interfaces CAN interfaces only support MTU values of 16 (CAN 2.0) and 72 (CAN FD). Setting the MTU to other values is pointless but it does not really hurt. With the introduction of the CAN FD support in drivers/net/can a new function to switch the MTU for CAN FD has been introduced. This patch makes use of this can_change_mtu() function to check for correct MTU settings also in legacy CAN (2.0) devices. Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde --- drivers/net/can/at91_can.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/can/at91_can.c') diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index 1d00b95f8983..f07fa89b5fd5 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c @@ -1194,6 +1194,7 @@ static const struct net_device_ops at91_netdev_ops = { .ndo_open = at91_open, .ndo_stop = at91_close, .ndo_start_xmit = at91_start_xmit, + .ndo_change_mtu = can_change_mtu, }; static ssize_t at91_sysfs_show_mb0_id(struct device *dev, -- cgit