linux/net/can/af_can.c's can_send() guarantees this already.
struct elmcan *elm = netdev_priv(dev);
struct can_frame *frame = (struct can_frame *)skb->data;
struct elmcan *elm = netdev_priv(dev);
struct can_frame *frame = (struct can_frame *)skb->data;
- if (skb->len != sizeof(struct can_frame))
- goto out;
-
if (!netif_running(dev)) {
netdev_warn(elm->dev, "xmit: iface is down.\n");
goto out;
if (!netif_running(dev)) {
netdev_warn(elm->dev, "xmit: iface is down.\n");
goto out;