From ccd9cebaa8472373c4c86d78eb8ab3d482c7a487 Mon Sep 17 00:00:00 2001 From: Filippo Copetti Date: Thu, 14 Dec 2023 10:45:48 +0100 Subject: [PATCH 2/2] can: usb: f81604: backport of Fintek F81604 BugLink: https://bugs.launchpad.net/bugs/2045387 F81604 implements USB to 2xCAN interfaces, this is the backporting to kernel 5.15 Signed-off-by: Filippo Copetti --- drivers/net/can/usb/f81604.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/usb/f81604.c b/drivers/net/can/usb/f81604.c index ec8cef7fd2d5..81bb37f2da1b 100644 --- a/drivers/net/can/usb/f81604.c +++ b/drivers/net/can/usb/f81604.c @@ -8,6 +8,8 @@ #include #include +#include + #include #include #include @@ -114,6 +116,7 @@ /* ALC register */ #define F81604_SJA1000_ALC_MASK 0x1f +#define CAN_ERR_CNT 0x00000200U /* table of devices that work with this driver */ static const struct usb_device_id f81604_table[] = { @@ -906,7 +909,7 @@ static netdev_tx_t f81604_start_xmit(struct sk_buff *skb, struct urb *write_urb; int ret; - if (can_dev_dropped_skb(netdev, skb)) + if (can_dropped_invalid_skb(netdev, skb)) return NETDEV_TX_OK; netif_stop_queue(netdev); -- 2.17.1