summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-11-15 06:37:13 +0000
committerimp <imp@FreeBSD.org>2001-11-15 06:37:13 +0000
commit686e52b5ce1d549cff8470765d91c80fc45f6892 (patch)
tree0a04563b6b102945284ed1324e03188286ae1bd5
parent9777457eaf485a93ccbb5de9c511a007ea2e6d0c (diff)
downloadFreeBSD-src-686e52b5ce1d549cff8470765d91c80fc45f6892.zip
FreeBSD-src-686e52b5ce1d549cff8470765d91c80fc45f6892.tar.gz
Hoist the Card/Card2 macros that I invented for the wi driver into
pccard layer and rename them PCMCIA_CARD and PCMCIA_CARD2 respectively (note, this is being done with an eye towards NetBSD integreation so it is easier to keep lists of cards between us and them in sync). Use this in the an and wi drivers.
-rw-r--r--sys/dev/an/if_an_pccard.c13
-rw-r--r--sys/dev/pccard/pccardvar.h10
-rw-r--r--sys/dev/wi/if_wi.c50
3 files changed, 35 insertions, 38 deletions
diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c
index 013642c..d1a19aa 100644
--- a/sys/dev/an/if_an_pccard.c
+++ b/sys/dev/an/if_an_pccard.c
@@ -112,15 +112,10 @@ static devclass_t an_pccard_devclass;
DRIVER_MODULE(if_an, pccard, an_pccard_driver, an_pccard_devclass, 0, 0);
static const struct pccard_product an_pccard_products[] = {
- { PCMCIA_STR_AIRONET_PC4800, PCMCIA_VENDOR_AIRONET,
- PCMCIA_PRODUCT_AIRONET_PC4800, 0,
- PCMCIA_CIS_AIRONET_PC4800 },
- { PCMCIA_STR_AIRONET_PC4500, PCMCIA_VENDOR_AIRONET,
- PCMCIA_PRODUCT_AIRONET_PC4500, 0,
- PCMCIA_CIS_AIRONET_PC4500 },
- { PCMCIA_STR_AIRONET_350, PCMCIA_VENDOR_AIRONET,
- PCMCIA_PRODUCT_AIRONET_350, 0,
- PCMCIA_CIS_AIRONET_350 },
+ PCMCIA_CARD(AIRONET, PC4800, 0),
+ PCMCIA_CARD(AIRONET, PC4500, 0),
+ PCMCIA_CARD(AIRONET, 350, 0),
+ { NULL }
};
static int
diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h
index e75fe3a..8806349 100644
--- a/sys/dev/pccard/pccardvar.h
+++ b/sys/dev/pccard/pccardvar.h
@@ -356,3 +356,13 @@ enum {
#define PCCARD_SOFTC(d) (struct pccard_softc *) device_get_softc(d)
#define PCCARD_IVAR(d) (struct pccard_ivar *) device_get_ivars(d)
+
+#define PCCARD_S(a, b) PCMCIA_STR_ ## a ## _ ## b
+#define PCCARD_P(a, b) PCMCIA_PRODUCT_ ## a ## _ ## b
+#define PCCARD_C(a, b) PCMCIA_CIS_ ## a ## _ ## b
+#define PCMCIA_CARD(v, p, f) { PCCARD_S(v, p), PCMCIA_VENDOR_ ## v, \
+ PCCARD_P(v, p), f, PCCARD_C(v, p) }
+#define PCMCIA_CARD2(v1, p1, p2, f) \
+ { PCMCIA_STR_ ## p2, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \
+ f, PCMCIA_CIS_ ## p2}
+
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 5110290..011acd6 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -230,37 +230,29 @@ DRIVER_MODULE(if_wi, pccard, wi_pccard_driver, wi_devclass, 0, 0);
DRIVER_MODULE(if_wi, pci, wi_pci_driver, wi_devclass, 0, 0);
#endif
-#define S(a, b) PCMCIA_STR_ ## a ## _ ## b
-#define P(a, b) PCMCIA_PRODUCT_ ## a ## _ ## b
-#define C(a, b) PCMCIA_CIS_ ## a ## _ ## b
-#define Card(v, p, f) { S(v, p), PCMCIA_VENDOR_ ## v, P(v, p), f, C(v, p) }
-#define Card2(v1, p1, p2, f) \
- { PCMCIA_STR_ ## p2, PCMCIA_VENDOR_ ## v1, P(v1, p1), f, \
- PCMCIA_CIS_ ## p2}
-
static const struct pccard_product wi_pccard_products[] = {
- Card(3COM, 3CRWE737A, 0),
- Card(BUFFALO, WLI_PCM_S11, 0),
- Card(COMPAQ, NC5004, 0),
- Card(CONTEC, FX_DS110_PCC, 0),
- Card(COREGA, WIRELESS_LAN_PCC_11, 0),
- Card(COREGA, WIRELESS_LAN_PCCA_11, 0),
- Card(COREGA, WIRELESS_LAN_PCCB_11, 0),
- Card(ELSA, XI300_IEEE, 0),
- Card(ELSA, XI800_IEEE, 0),
- Card(EMTAC, WLAN, 0),
- Card(GEMTEK, WLAN, 0),
- Card(INTEL, PRO_WLAN_2011, 0),
- Card(INTERSIL, PRISM2, 0),
- Card(IODATA2, WNB11PCM, 0),
- Card2(LUCENT, WAVELAN_IEEE, NANOSPEED_PRISM2, 0),
- Card2(LUCENT, WAVELAN_IEEE, NEC_CMZ_RT_WP, 0),
- Card2(LUCENT, WAVELAN_IEEE, NTT_ME_WLAN, 0),
- Card2(LUCENT, WAVELAN_IEEE, SMC_2632W, 0),
+ PCMCIA_CARD(3COM, 3CRWE737A, 0),
+ PCMCIA_CARD(BUFFALO, WLI_PCM_S11, 0),
+ PCMCIA_CARD(COMPAQ, NC5004, 0),
+ PCMCIA_CARD(CONTEC, FX_DS110_PCC, 0),
+ PCMCIA_CARD(COREGA, WIRELESS_LAN_PCC_11, 0),
+ PCMCIA_CARD(COREGA, WIRELESS_LAN_PCCA_11, 0),
+ PCMCIA_CARD(COREGA, WIRELESS_LAN_PCCB_11, 0),
+ PCMCIA_CARD(ELSA, XI300_IEEE, 0),
+ PCMCIA_CARD(ELSA, XI800_IEEE, 0),
+ PCMCIA_CARD(EMTAC, WLAN, 0),
+ PCMCIA_CARD(GEMTEK, WLAN, 0),
+ PCMCIA_CARD(INTEL, PRO_WLAN_2011, 0),
+ PCMCIA_CARD(INTERSIL, PRISM2, 0),
+ PCMCIA_CARD(IODATA2, WNB11PCM, 0),
+ PCMCIA_CARD2(LUCENT, WAVELAN_IEEE, NANOSPEED_PRISM2, 0),
+ PCMCIA_CARD2(LUCENT, WAVELAN_IEEE, NEC_CMZ_RT_WP, 0),
+ PCMCIA_CARD2(LUCENT, WAVELAN_IEEE, NTT_ME_WLAN, 0),
+ PCMCIA_CARD2(LUCENT, WAVELAN_IEEE, SMC_2632W, 0),
/* Must be after other LUCENT ones because it is less specific */
- Card(LUCENT, WAVELAN_IEEE, 0),
- Card(SAMSUNG, SWL_2000N, 0),
- Card(TDK, LAK_CD011WL, 0),
+ PCMCIA_CARD(LUCENT, WAVELAN_IEEE, 0),
+ PCMCIA_CARD(SAMSUNG, SWL_2000N, 0),
+ PCMCIA_CARD(TDK, LAK_CD011WL, 0),
{ NULL }
};
OpenPOWER on IntegriCloud