master/ethernet.c
branchstable-1.5
changeset 2631 827abf3c50de
parent 2522 ec403cf308eb
equal deleted inserted replaced
2588:792892ab4806 2631:827abf3c50de
   146                 "eoe%us%u", slave->master->index, slave->ring_position);
   146                 "eoe%us%u", slave->master->index, slave->ring_position);
   147     }
   147     }
   148 
   148 
   149     snprintf(eoe->datagram.name, EC_DATAGRAM_NAME_SIZE, name);
   149     snprintf(eoe->datagram.name, EC_DATAGRAM_NAME_SIZE, name);
   150 
   150 
   151     if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup))) {
   151 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
       
   152     eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, NET_NAME_UNKNOWN,
       
   153             ether_setup);
       
   154 #else
       
   155     eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup);
       
   156 #endif
       
   157     if (!eoe->dev) {
   152         EC_SLAVE_ERR(slave, "Unable to allocate net_device %s"
   158         EC_SLAVE_ERR(slave, "Unable to allocate net_device %s"
   153                 " for EoE handler!\n", name);
   159                 " for EoE handler!\n", name);
   154         ret = -ENODEV;
   160         ret = -ENODEV;
   155         goto out_return;
   161         goto out_return;
   156     }
   162     }