diff options
-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 40cdbc5..164fcf4 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 6b0dbfa..0fa1c0c 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 |