int net_dev_init(void) { struct device *dev, **dp; /* * Initialise the packet receive queue. */ #ifndef MACH skb_queue_head_init(&backlog); #endif /* * The bridge has to be up before the devices */ #ifdef CONFIG_BRIDGE br_init(); #endif /* * This is Very Ugly(tm). * * Some devices want to be initialized early.. */ #if defined(CONFIG_PI) pi_init(); #endif #if defined(CONFIG_PT) pt_init(); #endif #if defined(CONFIG_DLCI) dlci_setup(); #endif #if defined(CONFIG_SDLA) sdla_setup(); #endif /* * SLHC if present needs attaching so other people see it * even if not opened. */ #if (defined(CONFIG_SLIP) && defined(CONFIG_SLIP_COMPRESSED)) \ || defined(CONFIG_PPP) \ || (defined(CONFIG_ISDN) && defined(CONFIG_ISDN_PPP)) slhc_install(); #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. */ dp = &dev_base; while ((dev = *dp) != NULL) { int i; for (i = 0; i < DEV_NUMBUFFS; i++) { skb_queue_head_init(dev->buffs + i); } if (dev->init && dev->init(dev)) { /* * It failed to come up. Unhook it. */ *dp = dev->next; } else { dp = &dev->next; } } #ifdef CONFIG_PROC_FS proc_net_register(&(struct proc_dir_entry) { PROC_NET_DEV, 3, "dev", S_IFREG | S_IRUGO, 1, 0, 0, 0, &proc_net_inode_operations, dev_get_info });
int init_module(void) { dlci_ioctl_hook = dlci_ioctl; return(dlci_setup()); }