diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-04-06 21:58:13 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-04-06 21:58:13 +0000 |
commit | dcdb02de2463143b14b8f74d6c53b536a87e1219 (patch) | |
tree | 22f775e5b15562d147631ab6970524c9306514d1 /sys/dev/ic/if_wi.c | |
parent | 1ffd2dd0212e07660e093e5bb0ea41c1d79ba481 (diff) |
For PLX-based bridge cards, move printing of pcmcia card CIS strings
out of generic wi_attach() and into wi_pci_attach(). This means
we can't print the CIS info for embedded cards like the NCP130 but
since those don't have a "real" pcmcia card in them this is really
not a problem. Also check to see that there is actually a pcmcia
present and give and error if not. CIS magic number taken from the
Linux orinoco driver; there may be a better way to do this.
Diffstat (limited to 'sys/dev/ic/if_wi.c')
-rw-r--r-- | sys/dev/ic/if_wi.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index 894aedc589c..8fa834a7c4c 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.46 2002/04/06 20:31:56 millert Exp $ */ +/* $OpenBSD: if_wi.c,v 1.47 2002/04/06 21:58:12 millert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.46 2002/04/06 20:31:56 millert Exp $"; + "$OpenBSD: if_wi.c,v 1.47 2002/04/06 21:58:12 millert Exp $"; #endif /* lint */ #ifdef foo @@ -152,7 +152,7 @@ STATIC int wi_seek(struct wi_softc *, int, int, int); STATIC int wi_alloc_nicmem(struct wi_softc *, int, int *); STATIC void wi_inquire(void *); STATIC int wi_setdef(struct wi_softc *, struct wi_req *); -STATIC void wi_get_id(struct wi_softc *, int); +STATIC void wi_get_id(struct wi_softc *); STATIC int wi_media_change(struct ifnet *); STATIC void wi_media_status(struct ifnet *, struct ifmediareq *); @@ -165,7 +165,7 @@ STATIC int wi_set_pm(struct wi_softc *, struct ieee80211_power *); STATIC int wi_get_pm(struct wi_softc *, struct ieee80211_power *); int wi_intr(void *); -int wi_attach(struct wi_softc *, int); +int wi_attach(struct wi_softc *); void wi_init(struct wi_softc *); void wi_stop(struct wi_softc *); @@ -175,9 +175,8 @@ struct cfdriver wi_cd = { }; int -wi_attach(sc, print_cis) +wi_attach(sc) struct wi_softc *sc; - int print_cis; { struct wi_ltv_macaddr mac; struct wi_ltv_gen gen; @@ -199,7 +198,7 @@ wi_attach(sc, print_cis) bcopy((char *)&mac.wi_mac_addr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); - wi_get_id(sc, print_cis); + wi_get_id(sc); printf("address %s", ether_sprintf(sc->arpcom.ac_enaddr)); ifp = &sc->arpcom.ac_if; @@ -1923,36 +1922,13 @@ wi_shutdown(arg) } STATIC void -wi_get_id(sc, print_cis) +wi_get_id(sc) struct wi_softc *sc; - int print_cis; { struct wi_ltv_ver ver; - struct wi_ltv_cis cis; u_int16_t pri_fw_ver[3]; const char *p; - if (print_cis) { - /* - * For PCI attachments the CIS strings won't have been printed - * so print them here. - * XXX - messes up each odd character on Symbol cards - */ - cis.wi_type = WI_RID_CIS; - cis.wi_len = sizeof(cis.wi_cis); - if (wi_read_record(sc, (struct wi_ltv_gen *)&cis) == 0) { - char *cis_strings[3]; - - cis_strings[0] = (char *)&cis.wi_cis[11]; - cis_strings[1] = cis_strings[0] + - strlen(cis_strings[0]) + 1; - cis_strings[2] = cis_strings[1] + - strlen(cis_strings[1]) + 1; - printf("\n%s: \"%s, %s, %s\"", WI_PRT_ARG(sc), - cis_strings[0], cis_strings[1], cis_strings[2]); - } - } - /* get chip identity */ bzero(&ver, sizeof(ver)); ver.wi_type = WI_RID_CARD_ID; |