+ /* find receive list for this device */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ /*
+ * Since 2.6.26 a new "midlevel private" ml_priv pointer has been
+ * introduced in struct net_device. We use this pointer to omit the
+ * linear walk through the can_rx_dev_list. A similar speedup has been
+ * queued for 2.6.34 mainline but using the new netdev_rcu lists.
+ */
+
+ /* dev == NULL is the indicator for the 'all' filterlist */
+ if (!dev)
+ return &can_rx_alldev_list;
+
+ /* do not search in rcu list when we have a direct reference */
+ if (dev->ml_priv)
+ return (struct dev_rcv_lists *)dev->ml_priv;
+
+ /* fall back to standard behaviour */
+#endif
+