Skip to content
Snippets Groups Projects
Commit 4ca3a279 authored by Florian Pose's avatar Florian Pose
Browse files

Create network interfaces for EoE devices with alias as eoeXaY.

parent 39dd1c4e
No related branches found
No related tags found
No related merge requests found
...@@ -117,12 +117,16 @@ int ec_eoe_init( ...@@ -117,12 +117,16 @@ int ec_eoe_init(
eoe->tx_rate = 0; eoe->tx_rate = 0;
eoe->rate_jiffies = 0; eoe->rate_jiffies = 0;
/* device name eoe<MASTER>s<SLAVE>, because system tools don't like /* device name eoe<MASTER>[as]<SLAVE>, because networking scripts don't
* hyphens etc. in interface names. */ * like hyphens etc. in interface names. */
sprintf(name, "eoe%us%u", slave->master->index, slave->ring_position); if (slave->sii_alias) {
sprintf(name, "eoe%ua%u", slave->master->index, slave->sii_alias);
} else {
sprintf(name, "eoe%us%u", slave->master->index, slave->ring_position);
}
if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup))) { if (!(eoe->dev = alloc_netdev(sizeof(ec_eoe_t *), name, ether_setup))) {
EC_ERR("Unable to allocate net_device for EoE handler!\n"); EC_ERR("Unable to allocate net_device %s for EoE handler!\n", name);
goto out_return; goto out_return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment