can: Unify MTU settings for CAN interfaces
commitc971fa2ae42e73e9ccc2f5e93f268c8742da4c5d
authorOliver Hartkopp <socketcan@hartkopp.net>
Fri, 7 Mar 2014 08:23:41 +0000 (7 09:23 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 17 Mar 2014 08:20:16 +0000 (17 09:20 +0100)
treee7591c23ccbc262aa5c4ff76dc516a66e58b9486
parente7ef085d0a9dc1cc72e7d8108ed3b4e1a5e8d938
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 <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
19 files changed:
drivers/net/can/at91_can.c
drivers/net/can/bfin_can.c
drivers/net/can/c_can/c_can.c
drivers/net/can/cc770/cc770.c
drivers/net/can/flexcan.c
drivers/net/can/grcan.c
drivers/net/can/janz-ican3.c
drivers/net/can/mcp251x.c
drivers/net/can/mscan/mscan.c
drivers/net/can/pch_can.c
drivers/net/can/sja1000/sja1000.c
drivers/net/can/slcan.c
drivers/net/can/softing/softing_main.c
drivers/net/can/ti_hecc.c
drivers/net/can/usb/ems_usb.c
drivers/net/can/usb/esd_usb2.c
drivers/net/can/usb/kvaser_usb.c
drivers/net/can/usb/peak_usb/pcan_usb_core.c
drivers/net/can/usb/usb_8dev.c