From 775b235696ae07bf126a355ebe3b9d7fb7fa3aa0 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 3 Sep 2003 10:37:09 -0700 Subject: [PATCH] [NET]: Add probe_old_netdevs() hook. This set of patches is a mixture of Al's work to device initialization, and some of my own to complete it for all the ether, tr, sbni, and loopback devices. The first patch adds the hook for converting old driver initialization code over to dynamic allocation. This part extracted from Al viro's set of net driver changes for ethertap. --- drivers/net/Space.c | 6 ++++++ include/linux/netdevice.h | 1 + net/core/dev.c | 2 ++ 3 files changed, 9 insertions(+) diff --git a/drivers/net/Space.c b/drivers/net/Space.c index 46777c8dcf189..275c326275073 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c @@ -382,6 +382,12 @@ static int __init ethif_probe(struct net_device *dev) return -ENODEV; } +/* Statically configured drivers -- order matters here. */ +void probe_old_netdevs(void) +{ + +} + #ifdef CONFIG_SDLA extern int sdla_init(struct net_device *); static struct net_device sdla0_dev = { diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index dfc1aa47f35c0..f2a63e8004d6d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -498,6 +498,7 @@ extern struct net_device loopback_dev; /* The loopback */ extern struct net_device *dev_base; /* All devices */ extern rwlock_t dev_base_lock; /* Device list lock */ +extern void probe_old_netdevs(void); extern int netdev_boot_setup_add(char *name, struct ifmap *map); extern int netdev_boot_setup_check(struct net_device *dev); extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr); diff --git a/net/core/dev.c b/net/core/dev.c index fe8976f4e757b..1ac07dc5077e2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3098,6 +3098,8 @@ static int __init net_dev_init(void) dev_boot_phase = 0; + probe_old_netdevs(); + open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL); open_softirq(NET_RX_SOFTIRQ, net_rx_action, NULL); -- 2.53.0