summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2014-03-07 08:23:41 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:38:27 (GMT)
commit23023807a913050ac2578040f0d329b5a33c08db (patch)
treeb191ba2d149b1553c2ae5b22d926b42586412f9d /drivers/net/can
parent20052f7c162c1c5cad679066fe5160b3e2373627 (diff)
downloadlinux-fsl-qoriq-23023807a913050ac2578040f0d329b5a33c08db.tar.xz
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> --- Cherry-picked from linux-next: c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d Change-Id: I933a13a6c1f0b65fa748ffca352fa061940d8893 Reviewed-on: http://git.am.freescale.net:8181/21841 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/flexcan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 25b94b2..2eb30de 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1008,6 +1008,7 @@ static const struct net_device_ops flexcan_netdev_ops = {
.ndo_open = flexcan_open,
.ndo_stop = flexcan_close,
.ndo_start_xmit = flexcan_start_xmit,
+ .ndo_change_mtu = can_change_mtu,
};
static int register_flexcandev(struct net_device *dev)