Commit b8c86835 authored by Chas Williams's avatar Chas Williams Committed by David S. Miller

[ATM]: Get lec net_device names correct.

parent 16ffa71a
...@@ -784,16 +784,20 @@ lecd_attach(struct atm_vcc *vcc, int arg) ...@@ -784,16 +784,20 @@ lecd_attach(struct atm_vcc *vcc, int arg)
size = sizeof(struct lec_priv); size = sizeof(struct lec_priv);
#ifdef CONFIG_TR #ifdef CONFIG_TR
if (is_trdev) if (is_trdev)
dev_lec[i] = init_trdev(NULL, size); dev_lec[i] = alloc_trdev(size);
else else
#endif #endif
dev_lec[i] = init_etherdev(NULL, size); dev_lec[i] = alloc_etherdev(size);
if (!dev_lec[i]) if (!dev_lec[i])
return -ENOMEM; return -ENOMEM;
snprintf(dev_lec[i]->name, IFNAMSIZ, "lec%d", i);
if (register_netdev(dev_lec[i])) {
kfree(dev_lec[i]);
return -EINVAL;
}
priv = dev_lec[i]->priv; priv = dev_lec[i]->priv;
priv->is_trdev = is_trdev; priv->is_trdev = is_trdev;
sprintf(dev_lec[i]->name, "lec%d", i);
lec_init(dev_lec[i]); lec_init(dev_lec[i]);
} else { } else {
priv = dev_lec[i]->priv; priv = dev_lec[i]->priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment