summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb/peak_usb/pcan_usb_core.c
diff options
context:
space:
mode:
authorStephane Grosjean <s.grosjean@peak-system.com>2021-03-09 11:21:26 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-03-30 12:14:47 +0300
commita7e8511ffda6a81ba6b49c22d0ed296caeff438c (patch)
treef87a21d1148fac74a3bcc2cb51ced63a54796d9f /drivers/net/can/usb/peak_usb/pcan_usb_core.c
parentcfe2a4ca1e0691c3e1f899e04e883c3d584e89fd (diff)
downloadlinux-a7e8511ffda6a81ba6b49c22d0ed296caeff438c.tar.xz
can: peak_usb: add support of ethtool set_phys_id()
This patch makes it possible to specifically flash the LED of a CAN port of the CAN-USB interfaces of PEAK-System. Link: https://lore.kernel.org/r/20210309122141.3276927-1-mkl@pengutronix.de Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> [mkl: use common prefix PCAN_ for defines] 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.c4
1 files changed, 4 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 29227b5851fe..ad006edf474d 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/usb.h>
+#include <linux/ethtool.h>
#include <linux/can.h>
#include <linux/can/dev.h>
@@ -820,6 +821,9 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter,
netdev->flags |= IFF_ECHO; /* we support local echo */
+ /* add ethtool support */
+ netdev->ethtool_ops = peak_usb_adapter->ethtool_ops;
+
init_usb_anchor(&dev->rx_submitted);
init_usb_anchor(&dev->tx_submitted);