Naming interfaces within NIC driver
Hello:
I have been trying to create my own names for interfaces. I set the name just before registering a newly created netdevice object in the driver's probe routine. However, using a series of printk's I can see that another thread changes the names to the "standard" strings, e.g. eth0, eth1, eth2, etc.
I have found some userspace commands that are useful and should allow me to rename the interfaces, but I am still curious as to what is changing these names on me.
Code snippet from probe():
sprintf(netdev->name, "eth%d", eth_count);
err = register_netdev(netdev);
printk("NETDEV NAME: %s\n", netdev->name);
printk("NETDEV NAME: %s\n", netdev->name);
Where eth_count is a global that I initialize to 4 and increment. The first printk displays the name I set. The second one displays the "standardized" name!
Thanks,
Zack
|