master/ethernet.c
changeset 2641 535465bf176d
parent 2626 713058b68b43
child 2644 0c3987a1b3ee
equal deleted inserted replaced
2635:42b62867574d 2641:535465bf176d
   174                 "eoe%us%u", slave->master->index, slave->ring_position);
   174                 "eoe%us%u", slave->master->index, slave->ring_position);
   175     }
   175     }
   176 
   176 
   177     snprintf(eoe->datagram.name, EC_DATAGRAM_NAME_SIZE, name);
   177     snprintf(eoe->datagram.name, EC_DATAGRAM_NAME_SIZE, name);
   178 
   178 
   179     if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup))) {
   179 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
       
   180     eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, NET_NAME_UNKNOWN,
       
   181             ether_setup);
       
   182 #else
       
   183     eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup);
       
   184 #endif
       
   185     if (!eoe->dev) {
   180         EC_SLAVE_ERR(slave, "Unable to allocate net_device %s"
   186         EC_SLAVE_ERR(slave, "Unable to allocate net_device %s"
   181                 " for EoE handler!\n", name);
   187                 " for EoE handler!\n", name);
   182         ret = -ENODEV;
   188         ret = -ENODEV;
   183         goto out_return;
   189         goto out_return;
   184     }
   190     }