summaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1ac07dc5077e..8a598f7f300c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2981,7 +2981,6 @@ int unregister_netdevice(struct net_device *dev)
*/
static int __init net_dev_init(void)
{
- struct net_device *dev, **dp;
int i, rc = -ENOMEM;
BUG_ON(!dev_boot_phase);
@@ -3027,75 +3026,6 @@ static int __init net_dev_init(void)
add_timer(&samp_timer);
#endif
- /*
- * Add the devices.
- * If the call to dev->init fails, the dev is removed
- * from the chain disconnecting the device until the
- * next reboot.
- *
- * NB At boot phase networking is dead. No locking is required.
- * But we still preserve dev_base_lock for sanity.
- */
-
- dp = &dev_base;
- while ((dev = *dp) != NULL) {
- spin_lock_init(&dev->queue_lock);
- spin_lock_init(&dev->xmit_lock);
-#ifdef CONFIG_NET_FASTROUTE
- dev->fastpath_lock = RW_LOCK_UNLOCKED;
-#endif
- dev->xmit_lock_owner = -1;
- dev->iflink = -1;
- dev_hold(dev);
-
- /*
- * Allocate name. If the init() fails
- * the name will be reissued correctly.
- */
- if (strchr(dev->name, '%'))
- dev_alloc_name(dev, dev->name);
-
- /*
- * Check boot time settings for the device.
- */
- netdev_boot_setup_check(dev);
-
- if ( (dev->init && dev->init(dev)) ||
- netdev_register_sysfs(dev) ) {
- /*
- * It failed to come up. It will be unhooked later.
- * dev_alloc_name can now advance to next suitable
- * name that is checked next.
- */
- dp = &dev->next;
- } else {
- dp = &dev->next;
- dev->ifindex = dev_new_index();
- dev->reg_state = NETREG_REGISTERED;
- if (dev->iflink == -1)
- dev->iflink = dev->ifindex;
- if (!dev->rebuild_header)
- dev->rebuild_header = default_rebuild_header;
- dev_init_scheduler(dev);
- set_bit(__LINK_STATE_PRESENT, &dev->state);
- }
- }
-
- /*
- * Unhook devices that failed to come up
- */
- dp = &dev_base;
- while ((dev = *dp) != NULL) {
- if (dev->reg_state != NETREG_REGISTERED) {
- write_lock_bh(&dev_base_lock);
- *dp = dev->next;
- write_unlock_bh(&dev_base_lock);
- dev_put(dev);
- } else {
- dp = &dev->next;
- }
- }
-
dev_boot_phase = 0;
probe_old_netdevs();