Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.com> --- devices/generic.c | 6 +++++- master/debug.c | 6 +++++- master/ethernet.c | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/devices/generic.c b/devices/generic.c index e57bc23..a1f79bb 100644 --- a/devices/generic.c +++ b/devices/generic.c @@ -149,7 +149,11 @@ int ec_gen_device_init( dev->socket = NULL; dev->rx_buf = NULL; - dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null, ether_setup); + dev->netdev = alloc_netdev(sizeof(ec_gen_device_t *), &null, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) + NET_NAME_UNKNOWN, +#endif + ether_setup); if (!dev->netdev) { return -ENOMEM; } diff --git a/master/debug.c b/master/debug.c index 9984c61..4ee36a8 100644 --- a/master/debug.c +++ b/master/debug.c @@ -84,7 +84,11 @@ int ec_debug_init( memset(&dbg->stats, 0, sizeof(struct net_device_stats)); if (!(dbg->dev = - alloc_netdev(sizeof(ec_debug_t *), name, ether_setup))) { + alloc_netdev(sizeof(ec_debug_t *), name, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) + NET_NAME_UNKNOWN, +#endif + ether_setup))) { EC_MASTER_ERR(device->master, "Unable to allocate net_device" " for debug object!\n"); return -ENODEV; diff --git a/master/ethernet.c b/master/ethernet.c index 2ceea12..12f8305 100644 --- a/master/ethernet.c +++ b/master/ethernet.c @@ -148,7 +148,11 @@ int ec_eoe_init( snprintf(eoe->datagram.name, EC_DATAGRAM_NAME_SIZE, name); - if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup))) { + if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) + NET_NAME_UNKNOWN, +#endif + ether_setup))) { EC_SLAVE_ERR(slave, "Unable to allocate net_device %s" " for EoE handler!\n", name); ret = -ENODEV; -- 2.1.1 _______________________________________________ etherlab-dev mailing list etherlab-dev@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-dev