Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / drivers / net / setup.c
blob823836cbbee8f66a01b63339eb587202eda38c3f
2 /*
3 * New style setup code for the network devices
4 */
6 #include <linux/config.h>
7 #include <linux/netdevice.h>
8 #include <linux/errno.h>
9 #include <linux/init.h>
10 #include <linux/netlink.h>
12 externintmkiss_init_ctrl_dev(void);
13 externintslip_init_ctrl_dev(void);
14 externintstrip_init_ctrl_dev(void);
15 externintx25_asy_init_ctrl_dev(void);
17 externintdmascc_init(void);
18 externintyam_init(void);
20 externintawc4500_pci_probe(void);
21 externintawc4500_isa_probe(void);
22 externintawc4500_pnp_probe(void);
23 externintawc4500_365_probe(void);
24 externintarcnet_init(void);
25 externintscc_enet_init(void);
26 externintfec_enet_init(void);
27 externintdlci_setup(void);
28 externintlapbeth_init(void);
29 externintsdla_setup(void);
30 externintsdla_c_setup(void);
31 externintcomx_init(void);
32 externintlmc_setup(void);
34 externintmadgemc_probe(void);
36 /* Pad device name to IFNAMSIZ=16. F.e. __PAD6 is string of 9 zeros. */
37 #define __PAD6"\0\0\0\0\0\0\0\0\0"
38 #define __PAD5 __PAD6"\0"
39 #define __PAD4 __PAD5"\0"
40 #define __PAD3 __PAD4"\0"
41 #define __PAD2 __PAD3"\0"
45 * Devices in this list must do new style probing. That is they must
46 * allocate their own device objects and do their own bus scans.
49 struct net_probe
51 int(*probe)(void);
52 int status;/* non-zero if autoprobe has failed */
55 struct net_probe pci_probes[] __initdata = {
57 * Early setup devices
60 #if defined(CONFIG_DMASCC)
61 {dmascc_init,0},
62 #endif
63 #if defined(CONFIG_DLCI)
64 {dlci_setup,0},
65 #endif
66 #if defined(CONFIG_SDLA)
67 {sdla_c_setup,0},
68 #endif
69 #if defined(CONFIG_LAPBETHER)
70 {lapbeth_init,0},
71 #endif
72 #if defined(CONFIG_ARCNET)
73 {arcnet_init,0},
74 #endif
75 #if defined(CONFIG_SCC_ENET)
76 {scc_enet_init,0},
77 #endif
78 #if defined(CONFIG_FEC_ENET)
79 {fec_enet_init,0},
80 #endif
81 #if defined(CONFIG_COMX)
82 {comx_init,0},
83 #endif
85 #if defined(CONFIG_LANMEDIA)
86 {lmc_setup,0},
87 #endif
91 * Wireless non-HAM
94 #ifdef CONFIG_AIRONET4500_NONCS
96 #ifdef CONFIG_AIRONET4500_PCI
97 {awc4500_pci_probe,0},
98 #endif
100 #ifdef CONFIG_AIRONET4500_PNP
101 {awc4500_pnp_probe,0},
102 #endif
104 #endif
106 * Amateur Radio Drivers
109 #ifdef CONFIG_YAM
110 {yam_init,0},
111 #endif/* CONFIG_YAM */
114 * Token Ring Drivers
116 #ifdef CONFIG_MADGEMC
117 {madgemc_probe,0},
118 #endif
119 {NULL,0},
124 * Run the updated device probes. These do not need a device passed
125 * into them.
128 static void __init network_probe(void)
130 struct net_probe *p = pci_probes;
132 while(p->probe != NULL)
134 p->status = p->probe();
135 p++;
141 * Initialise the line discipline drivers
144 static void __init network_ldisc_init(void)
146 #if defined(CONFIG_SLIP)
147 slip_init_ctrl_dev();
148 #endif
149 #if defined(CONFIG_X25_ASY)
150 x25_asy_init_ctrl_dev();
151 #endif
152 #if defined(CONFIG_MKISS)
153 mkiss_init_ctrl_dev();
154 #endif
155 #if defined(CONFIG_STRIP)
156 strip_init_ctrl_dev();
157 #endif
161 static void __init special_device_init(void)
163 #ifdef CONFIG_NET_SB1000
165 externintsb1000_probe(struct net_device *dev);
166 static struct net_device sb1000_dev =
168 "cm0" __PAD3,0x0,0x0,0x0,0x0,0,0,0,0,0, NULL, sb1000_probe
170 register_netdev(&sb1000_dev);
172 #endif
176 * Initialise network devices
179 void __init net_device_init(void)
181 /* Devices supporting the new probing API */
182 network_probe();
183 /* Line disciplines */
184 network_ldisc_init();
185 /* Special devices */
186 special_device_init();
187 /* That kicks off the legacy init functions */
close