diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2014-03-07 03:23:41 -0500 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-03-17 04:20:16 -0400 |
commit | c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d (patch) | |
tree | e7591c23ccbc262aa5c4ff76dc516a66e58b9486 /drivers/net/can/c_can | |
parent | e7ef085d0a9dc1cc72e7d8108ed3b4e1a5e8d938 (diff) |
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>
Diffstat (limited to 'drivers/net/can/c_can')
-rw-r--r-- | drivers/net/can/c_can/c_can.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 951bfede8f3d..9c32e9ef7694 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c | |||
@@ -1277,6 +1277,7 @@ static const struct net_device_ops c_can_netdev_ops = { | |||
1277 | .ndo_open = c_can_open, | 1277 | .ndo_open = c_can_open, |
1278 | .ndo_stop = c_can_close, | 1278 | .ndo_stop = c_can_close, |
1279 | .ndo_start_xmit = c_can_start_xmit, | 1279 | .ndo_start_xmit = c_can_start_xmit, |
1280 | .ndo_change_mtu = can_change_mtu, | ||
1280 | }; | 1281 | }; |
1281 | 1282 | ||
1282 | int register_c_can_dev(struct net_device *dev) | 1283 | int register_c_can_dev(struct net_device *dev) |