/* Reads a CAN message from given mailbox, and put into linux network RX queue, does all housekeeping chores (stats, ...)  */
static void at91_read_msg(struct net_device *dev, unsigned int mb)
/* Reads a CAN message from given mailbox, and put into linux network RX queue, does all housekeeping chores (stats, ...)  */
static void at91_read_msg(struct net_device *dev, unsigned int mb)
{
	struct net_device_stats *stats = &dev->stats;
	struct can_frame *cf;
	struct sk_buff *skb;
	skb = alloc_can_skb(dev, &cf);
	if (unlikely(!skb)) {
		stats->rx_dropped++;
		return;
	}
	at91_read_mb(dev, mb, cf);
	netif_receive_skb(skb);
	stats->rx_packets++;
	stats->rx_bytes += cf->can_dlc;
}