/* insert new receiver (dev,canid,mask) -> (func,data) */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ if (dev && dev->type != ARPHRD_CAN)
+ return -ENODEV;
+#endif
+
r = kmem_cache_alloc(rcv_cache, GFP_KERNEL);
if (!r)
return -ENOMEM;
struct hlist_node *next;
struct dev_rcv_lists *d;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+ if (dev && dev->type != ARPHRD_CAN)
+ return;
+#endif
+
spin_lock(&can_rcvlists_lock);
d = find_dev_rcv_lists(dev);