summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb/peak_usb/pcan_usb_core.c
diff options
context:
space:
mode:
authorOliver Hartkopp2014-03-07 09:23:41 +0100
committerMarc Kleine-Budde2014-03-17 09:20:16 +0100
commitc971fa2ae42e73e9ccc2f5e93f268c8742da4c5d (patch)
treee7591c23ccbc262aa5c4ff76dc516a66e58b9486 /drivers/net/can/usb/peak_usb/pcan_usb_core.c
parentMerge branch 'napi_budget_zero' (diff)
downloadkernel-qcow2-linux-c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d.tar.gz
kernel-qcow2-linux-c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d.tar.xz
kernel-qcow2-linux-c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d.zip
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/usb/peak_usb/pcan_usb_core.c')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 0b7a4c3b01a2..93e4a55a6c23 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -702,6 +702,7 @@ static const struct net_device_ops peak_usb_netdev_ops = {
.ndo_open = peak_usb_ndo_open,
.ndo_stop = peak_usb_ndo_stop,
.ndo_start_xmit = peak_usb_ndo_start_xmit,
+ .ndo_change_mtu = can_change_mtu,
};
/*