diff options
author | peter <peter@FreeBSD.org> | 2001-01-17 12:31:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-01-17 12:31:59 +0000 |
commit | 79a0dc74e0ecb5d0d77f5938fce23257e296b02e (patch) | |
tree | bf670317e1b95408e18204aa428650ff8fadbe5f /sys/dev/wi | |
parent | 346e52a57b001b9c67c2b1ad13ff054b729dd18b (diff) | |
download | FreeBSD-src-79a0dc74e0ecb5d0d77f5938fce23257e296b02e.zip FreeBSD-src-79a0dc74e0ecb5d0d77f5938fce23257e296b02e.tar.gz |
Add NEWCARD hooks. This seems to work just fine.
Diffstat (limited to 'sys/dev/wi')
-rw-r--r-- | sys/dev/wi/if_wi.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 76f7d4c..70330f1 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -100,9 +100,14 @@ #include <net/bpf.h> +#include <dev/pccard/pccardvar.h> +#include <dev/pccard/pccarddevs.h> + #include <dev/wi/if_wavelan_ieee.h> #include <dev/wi/if_wireg.h> +#include "card_if.h" + #if !defined(lint) static const char rcsid[] = "$FreeBSD$"; @@ -143,6 +148,7 @@ void wi_cache_store __P((struct wi_softc *, struct ether_header *, struct mbuf *, unsigned short)); #endif +static int wi_pccard_match __P((device_t)); static int wi_pccard_probe __P((device_t)); static int wi_pccard_attach __P((device_t)); static int wi_pccard_detach __P((device_t)); @@ -153,11 +159,16 @@ static void wi_free __P((device_t)); static device_method_t wi_pccard_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, wi_pccard_probe), - DEVMETHOD(device_attach, wi_pccard_attach), + DEVMETHOD(device_probe, pccard_compat_probe), + DEVMETHOD(device_attach, pccard_compat_attach), DEVMETHOD(device_detach, wi_pccard_detach), DEVMETHOD(device_shutdown, wi_shutdown), + /* Card interface */ + DEVMETHOD(card_compat_match, wi_pccard_match), + DEVMETHOD(card_compat_probe, wi_pccard_probe), + DEVMETHOD(card_compat_attach, wi_pccard_attach), + { 0, 0 } }; @@ -171,6 +182,25 @@ static devclass_t wi_pccard_devclass; DRIVER_MODULE(if_wi, pccard, wi_pccard_driver, wi_pccard_devclass, 0, 0); +static const struct pccard_product wi_pccard_products[] = { + { PCCARD_STR_LUCENT_WAVELAN_IEEE, PCCARD_VENDOR_LUCENT, + PCCARD_PRODUCT_LUCENT_WAVELAN_IEEE, 0, NULL, NULL }, + { NULL } +}; + +static int wi_pccard_match(dev) + device_t dev; +{ + const struct pccard_product *pp; + + if ((pp = pccard_product_lookup(dev, wi_pccard_products, + sizeof(wi_pccard_products[0]), NULL)) != NULL) { + device_set_desc(dev, pp->pp_name); + return 0; + } + return ENXIO; +} + static int wi_pccard_probe(dev) device_t dev; { |