Merged CCAT driver v0.14. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 16 Feb 2016 15:18:34 +0100
branchstable-1.5
changeset 2639 3bedfc5ecd74
parent 2632 08aa7305b9ba (diff)
parent 2638 5995331a55fe (current diff)
child 2640 b11e1014edfe
child 2654 b3f6b3e5ef29
Merged CCAT driver v0.14.
--- a/devices/generic.c	Thu Nov 05 16:54:49 2015 +0100
+++ b/devices/generic.c	Tue Feb 16 15:18:34 2016 +0100
@@ -149,7 +149,12 @@
     dev->socket = NULL;
     dev->rx_buf = NULL;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
+    dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null,
+            NET_NAME_UNKNOWN, ether_setup);
+#else
     dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null, ether_setup);
+#endif
     if (!dev->netdev) {
         return -ENOMEM;
     }
--- a/master/ethernet.c	Thu Nov 05 16:54:49 2015 +0100
+++ b/master/ethernet.c	Tue Feb 16 15:18:34 2016 +0100
@@ -148,7 +148,13 @@
 
     snprintf(eoe->datagram.name, EC_DATAGRAM_NAME_SIZE, name);
 
-    if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup))) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
+    eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, NET_NAME_UNKNOWN,
+            ether_setup);
+#else
+    eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup);
+#endif
+    if (!eoe->dev) {
         EC_SLAVE_ERR(slave, "Unable to allocate net_device %s"
                 " for EoE handler!\n", name);
         ret = -ENODEV;