summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-09-22 05:11:50 +0000
committerimp <imp@FreeBSD.org>2005-09-22 05:11:50 +0000
commit84eb58cdc39b619b893d38d1a889d64f0fcb0351 (patch)
treebf875edb8054f4668d8ff20e40843f452f1d9830
parent362978b3c45f088265068cec2523dc91c8c88b20 (diff)
downloadFreeBSD-src-84eb58cdc39b619b893d38d1a889d64f0fcb0351.zip
FreeBSD-src-84eb58cdc39b619b893d38d1a889d64f0fcb0351.tar.gz
MFp4: save mac addr hint, eliminage OLDCARD shims
-rw-r--r--sys/dev/wi/if_wi_pccard.c45
-rw-r--r--sys/dev/wi/if_wivar.h1
2 files changed, 11 insertions, 35 deletions
diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c
index 765e31d..fd21856 100644
--- a/sys/dev/wi/if_wi_pccard.c
+++ b/sys/dev/wi/if_wi_pccard.c
@@ -81,20 +81,13 @@ __FBSDID("$FreeBSD$");
static int wi_pccard_probe(device_t);
static int wi_pccard_attach(device_t);
-static int wi_pccard_match(device_t);
-
static device_method_t wi_pccard_methods[] = {
/* Device interface */
- DEVMETHOD(device_probe, pccard_compat_probe),
- DEVMETHOD(device_attach, pccard_compat_attach),
+ DEVMETHOD(device_probe, wi_pccard_probe),
+ DEVMETHOD(device_attach, wi_pccard_attach),
DEVMETHOD(device_detach, wi_detach),
DEVMETHOD(device_shutdown, wi_shutdown),
- /* Card interface */
- DEVMETHOD(card_compat_match, wi_pccard_match),
- DEVMETHOD(card_compat_probe, wi_pccard_probe),
- DEVMETHOD(card_compat_attach, wi_pccard_attach),
-
{ 0, 0 }
};
@@ -163,8 +156,7 @@ static const struct pccard_product wi_pccard_products[] = {
};
static int
-wi_pccard_match(dev)
- device_t dev;
+wi_pccard_probe(device_t dev)
{
const struct pccard_product *pp;
u_int32_t fcn = PCCARD_FUNCTION_UNSPEC;
@@ -186,12 +178,13 @@ wi_pccard_match(dev)
return (ENXIO);
}
+
static int
-wi_pccard_probe(dev)
- device_t dev;
+wi_pccard_attach(device_t dev)
{
struct wi_softc *sc;
int error;
+ uint32_t vendor, product;
sc = device_get_softc(dev);
sc->wi_gone = 0;
@@ -205,25 +198,6 @@ wi_pccard_probe(dev)
CSR_WRITE_2(sc, WI_INT_EN, 0);
CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF);
- wi_free(dev);
-
- return (0);
-}
-
-static int
-wi_pccard_attach(device_t dev)
-{
- int error;
- uint32_t vendor;
- uint32_t product;
- int retval;
-
- error = wi_alloc(dev, 0);
- if (error) {
- device_printf(dev, "wi_alloc() failed! (%d)\n", error);
- return (error);
- }
-
/*
* The cute little Symbol LA4100-series CF cards need to have
* code downloaded to them.
@@ -246,8 +220,9 @@ wi_pccard_attach(device_t dev)
return (ENXIO);
#endif
}
- retval = wi_attach(dev);
- if (retval != 0)
+ pccard_get_ether(dev, sc->sc_hintmacaddr);
+ error = wi_attach(dev);
+ if (error != 0)
wi_free(dev);
- return (retval);
+ return (error);
}
diff --git a/sys/dev/wi/if_wivar.h b/sys/dev/wi/if_wivar.h
index f1fda24..be90399 100644
--- a/sys/dev/wi/if_wivar.h
+++ b/sys/dev/wi/if_wivar.h
@@ -125,6 +125,7 @@ struct wi_softc {
int sc_nodelen;
char sc_nodename[IEEE80211_NWID_LEN];
char sc_net_name[IEEE80211_NWID_LEN];
+ uint8_t sc_hintmacaddr[IEEE80211_ADDR_LEN];
int sc_buflen; /* TX buffer size */
int sc_ntxbuf;
OpenPOWER on IntegriCloud