This commit is contained in:
Florian Pose 2015-12-18 12:30:45 +01:00
commit 67c89f9d81
2 changed files with 12 additions and 1 deletions

View File

@ -149,7 +149,12 @@ int ec_gen_device_init(
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;
}

View File

@ -148,7 +148,13 @@ 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 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;