diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2001-01-17 12:31:59 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2001-01-17 12:31:59 +0000 |
| commit | 2ca37b5a4f09092eb0626d56af67b399b9136cbf (patch) | |
| tree | 9cada94c82ededee908e9a1d916297c16cbe7ef2 /sys/dev/wi | |
| parent | 6164dd813714079e26eca9b29a62fcba1cec7dfd (diff) | |
Notes
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 76f7d4c6dc46..70330f1798ab 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; { |
