diff options
| author | Nick Sayer <nsayer@FreeBSD.org> | 2001-08-23 00:57:40 +0000 |
|---|---|---|
| committer | Nick Sayer <nsayer@FreeBSD.org> | 2001-08-23 00:57:40 +0000 |
| commit | 84031c85e544cdfc2adf41d5503259e5ffb5b824 (patch) | |
| tree | ac5e9f5b203d5672873a58df06ca4f5fbece83b1 /sys/dev | |
| parent | 91d88849e36bfc3587bfd2dce537a70f313978e3 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/wi/if_wi.c | 19 | ||||
| -rw-r--r-- | sys/dev/wi/if_wireg.h | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 40cdbc509385..164fcf41e094 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -203,6 +203,15 @@ static driver_t wi_pci_driver = { sizeof(struct wi_softc) }; +struct { + unsigned int vendor,device; + char *desc; +} pci_ids[] = { + {0x1638, 0x1100, "PRISM2STA PCI WaveLAN/IEEE 802.11"}, + {0x1385, 0x4100, "Netgear MA301 PCI IEEE 802.11b"}, + {0, 0, NULL} +}; + static devclass_t wi_pccard_devclass; static devclass_t wi_pci_devclass; @@ -257,14 +266,16 @@ wi_pci_probe(dev) device_t dev; { struct wi_softc *sc; + int i; sc = device_get_softc(dev); - if ((pci_get_vendor(dev) == WI_PCI_VENDOR_EUMITCOM) && - (pci_get_device(dev) == WI_PCI_DEVICE_PRISM2STA)) { + for(i=0; pci_ids[i].vendor != 0; i++) { + if ((pci_get_vendor(dev) == pci_ids[i].vendor) && + (pci_get_device(dev) == pci_ids[i].device)) { sc->wi_prism2 = 1; - device_set_desc(dev, - "PRISM2STA PCI WaveLAN/IEEE 802.11"); + device_set_desc(dev, pci_ids[i].desc); return (0); + } } return(ENXIO); } diff --git a/sys/dev/wi/if_wireg.h b/sys/dev/wi/if_wireg.h index 6b0dbfa6aa86..0fa1c0c9d110 100644 --- a/sys/dev/wi/if_wireg.h +++ b/sys/dev/wi/if_wireg.h @@ -149,8 +149,6 @@ struct wi_softc { #define WI_PCI_MEMRES 0x18 #define WI_PCI_IORES 0x1C -#define WI_PCI_VENDOR_EUMITCOM 0x1638 -#define WI_PCI_DEVICE_PRISM2STA 0x1100 #define WI_HFA384X_SWSUPPORT0_OFF 0x28 #define WI_PRISM2STA_MAGIC 0x4A2D |
