diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-04 22:56:53 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-04 22:56:53 +0000 |
commit | 0de4e42997d7c9bd7834ceded1422a0b5814f7b0 (patch) | |
tree | 762a0c46bae9af8622c614ddbe26bbb6b53b267c /sys/net/pf_if.c | |
parent | 2107286fcd3b0aa210f88b6f533da7921e9f92c9 (diff) |
remove the half-baked and bogus pfi_dynamic_drivers() which tries to guess
which drivers are hotpluggable. since we removed the stupid check from pfctl
a few days ago nothing relies on this any more.
ok pb@ mcbride@
Diffstat (limited to 'sys/net/pf_if.c')
-rw-r--r-- | sys/net/pf_if.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 6a5c9be4bb2..60f16b9beeb 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.15 2004/06/25 00:54:27 tholo Exp $ */ +/* $OpenBSD: pf_if.c,v 1.16 2004/07/04 22:56:52 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -85,7 +85,6 @@ void pfi_address_add(struct sockaddr *, int, int); int pfi_if_compare(struct pfi_kif *, struct pfi_kif *); struct pfi_kif *pfi_if_create(const char *, struct pfi_kif *, int); void pfi_copy_group(char *, const char *, int); -void pfi_dynamic_drivers(void); void pfi_newgroup(const char *, int); int pfi_skip_if(const char *, struct pfi_kif *, int); int pfi_unmask(void *); @@ -94,7 +93,6 @@ void pfi_dohooks(struct pfi_kif *); RB_PROTOTYPE(pfi_ifhead, pfi_kif, pfik_tree, pfi_if_compare); RB_GENERATE(pfi_ifhead, pfi_kif, pfik_tree, pfi_if_compare); -#define PFI_DYNAMIC_BUSES { "pcmcia", "cardbus", "uhub" } #define PFI_BUFFER_MAX 0x10000 #define PFI_MTYPE M_IFADDR @@ -111,7 +109,6 @@ pfi_initialize(void) pfi_buffer = malloc(pfi_buffer_max * sizeof(*pfi_buffer), PFI_MTYPE, M_WAITOK); pfi_self = pfi_if_create("self", NULL, PFI_IFLAG_GROUP); - pfi_dynamic_drivers(); } void @@ -620,46 +617,6 @@ pfi_copy_group(char *p, const char *q, int m) } void -pfi_dynamic_drivers(void) -{ - char *buses[] = PFI_DYNAMIC_BUSES; - int nbuses = sizeof(buses)/sizeof(buses[0]); - int enabled[sizeof(buses)/sizeof(buses[0])]; - struct device *dev; - struct cfdata *cf; - struct cfdriver *drv; - short *p; - int i; - - bzero(enabled, sizeof(enabled)); - TAILQ_FOREACH(dev, &alldevs, dv_list) { - if (!(dev->dv_flags & DVF_ACTIVE)) - continue; - for (i = 0; i < nbuses; i++) - if (!enabled[i] && !strcmp(buses[i], - dev->dv_cfdata->cf_driver->cd_name)) - enabled[i] = 1; - } - for (cf = cfdata; cf->cf_driver; cf++) { - if (cf->cf_driver->cd_class != DV_IFNET) - continue; - for (p = cf->cf_parents; p && *p >= 0; p++) { - if ((drv = cfdata[*p].cf_driver) == NULL) - continue; - for (i = 0; i < nbuses; i++) - if (enabled[i] && - !strcmp(drv->cd_name, buses[i])) - break; - if (i < nbuses) { - pfi_newgroup(cf->cf_driver->cd_name, - PFI_IFLAG_DYNAMIC); - break; - } - } - } -} - -void pfi_newgroup(const char *name, int flags) { struct pfi_kif *p; |