]> Pileus Git - ~andy/linux/blobdiff - drivers/net/can/usb/ems_usb.c
can: Unify droping of invalid tx skbs and netdev stats
[~andy/linux] / drivers / net / can / usb / ems_usb.c
index efbb05c71bf47fdde6af69fb13d1a38fdd80f032..ddb17e256656172a89de71a22c6de100e98d0ef1 100644 (file)
@@ -767,6 +767,9 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
        size_t size = CPC_HEADER_SIZE + CPC_MSG_HEADER_LEN
                        + sizeof(struct cpc_can_msg);
 
+       if (can_dropped_invalid_skb(netdev, skb))
+               return NETDEV_TX_OK;
+
        /* create a URB, and a buffer for it, and copy the data to the URB */
        urb = usb_alloc_urb(0, GFP_ATOMIC);
        if (!urb) {