diff options
author | imp <imp@FreeBSD.org> | 2001-11-19 06:42:11 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-11-19 06:42:11 +0000 |
commit | 24ee2193e0b1eab67e901bfc29f58dac96fd0351 (patch) | |
tree | ffbe227bf35342aded439b89c1e67fde6f13d4fe /sys/dev/awi | |
parent | 4366b7327e0c93490350f0aedbd068e7b95f0e21 (diff) | |
download | FreeBSD-src-24ee2193e0b1eab67e901bfc29f58dac96fd0351.zip FreeBSD-src-24ee2193e0b1eab67e901bfc29f58dac96fd0351.tar.gz |
Add NEWCARD support to awi.
Devices obtained from NetBSD (+ zoom air 4000, which I added).
Diffstat (limited to 'sys/dev/awi')
-rw-r--r-- | sys/dev/awi/if_awi_pccard.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c index be55de57..78fd011 100644 --- a/sys/dev/awi/if_awi_pccard.c +++ b/sys/dev/awi/if_awi_pccard.c @@ -43,12 +43,15 @@ #include <net/ethernet.h> #include <net/if_ieee80211.h> - #include <dev/awi/am79c930reg.h> #include <dev/awi/am79c930var.h> #include <dev/awi/awireg.h> #include <dev/awi/awivar.h> +#include <dev/pccard/pccardvar.h> +#include <dev/pccard/pccarddevs.h> +#include "card_if.h" + struct awi_pccard_softc { struct awi_softc sc_awi; @@ -63,6 +66,31 @@ struct awi_pccard_softc { int sc_mem_rid; }; +static const struct pccard_product awi_pccard_products[] = { + PCMCIA_CARD(AMD, AM79C930, 0), + PCMCIA_CARD(BAY, STACK_650, 0), + PCMCIA_CARD(BAY, STACK_660, 0), + PCMCIA_CARD(BAY, SURFER_PRO, 0), + PCMCIA_CARD(ICOM, SL200, 0), + PCMCIA_CARD(NOKIA, C020_WLAN, 0), + PCMCIA_CARD(FARALLON, SKYLINE, 0), + PCMCIA_CARD(ZOOM, AIR_4000, 0), + { NULL } +}; + +static int +awi_pccard_match(device_t dev) +{ + const struct pccard_product *pp; + + if ((pp = pccard_product_lookup(dev, awi_pccard_products, + sizeof(awi_pccard_products[0]), NULL)) != NULL) { + device_set_desc(dev, pp->pp_name); + return 0; + } + return ENXIO; +} + /* * Initialize the device - called from Slot manager. */ @@ -232,10 +260,15 @@ awi_pccard_detach(device_t dev) static device_method_t awi_pccard_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, awi_pccard_probe), - DEVMETHOD(device_attach, awi_pccard_attach), + DEVMETHOD(device_probe, pccard_compat_probe), + DEVMETHOD(device_attach, pccard_compat_attach), DEVMETHOD(device_detach, awi_pccard_detach), + /* Card interface */ + DEVMETHOD(card_compat_match, awi_pccard_match), + DEVMETHOD(card_compat_probe, awi_pccard_probe), + DEVMETHOD(card_compat_attach, awi_pccard_attach), + { 0, 0 } }; |