return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int cc770_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#else
+static netdev_tx_t cc770_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#endif
{
struct cc770_priv *priv = netdev_priv(dev);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
}
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
}
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->netdev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
}
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->netdev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
}
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int ems_usb_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+#else
+static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb,
+ struct net_device *netdev)
+#endif
{
struct ems_usb *dev = netdev_priv(netdev);
struct ems_tx_urb_context *context = NULL;
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cfrm->can_dlc;
}
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int esd331_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#else
+static netdev_tx_t esd331_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+#endif
{
struct esd331_priv *priv = netdev_priv(dev);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
dev_err(&spi->dev, "MCP251x didn't wake-up\n");
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int mcp251x_hard_start_xmit(struct sk_buff *skb, struct net_device *net)
+#else
+static netdev_tx_t mcp251x_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *net)
+#endif
{
struct mcp251x_priv *priv = netdev_priv(net);
struct spi_device *spi = priv->spi;
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#else
+static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#endif
{
struct can_frame *frame = (struct can_frame *)skb->data;
struct mscan_regs *regs = (struct mscan_regs *)dev->base_addr;
}
out_8(®s->canrflg, MSCAN_RXF);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += frame->can_dlc;
} else if (canrflg & MSCAN_ERR_IF) {
* xx xx xx xx ff ll 00 11 22 33 44 55 66 77
* [ can-id ] [flags] [len] [can data (up to 8 bytes]
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int sja1000_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#else
+static netdev_tx_t sja1000_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+#endif
{
struct sja1000_priv *priv = netdev_priv(dev);
struct can_frame *cf = (struct can_frame *)skb->data;
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += dlc;
}
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
&cf, sizeof(struct can_frame));
netif_rx(skb);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
sl->dev->last_rx = jiffies;
+#endif
stats->rx_packets++;
stats->rx_bytes += cf.can_dlc;
}
******************************************/
/* Send a can_frame to a TTY queue. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int slc_xmit(struct sk_buff *skb, struct net_device *dev)
+#else
+static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev)
+#endif
{
struct slcan *sl = netdev_priv(dev);
}
/* trigger the tx queue-ing */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
static int netdev_start_xmit(struct sk_buff *skb, struct net_device *dev)
+#else
+static netdev_tx_t netdev_start_xmit(struct sk_buff *skb,
+ struct net_device *dev)
+#endif
{
struct softing_priv *priv = netdev_priv(dev);
struct softing *card = priv->card;
} else {
++stats->rx_packets;
stats->rx_bytes += msg.can_dlc;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
bus->netdev->last_rx = jiffies;
+#endif
softing_rx(bus->netdev, &msg, ktime);
}
}