diff options
Diffstat (limited to 'sys/dev/wi/if_wi_pccard.c')
-rw-r--r-- | sys/dev/wi/if_wi_pccard.c | 63 |
1 files changed, 17 insertions, 46 deletions
diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c index 53f067b97ba1..ad1b5082680f 100644 --- a/sys/dev/wi/if_wi_pccard.c +++ b/sys/dev/wi/if_wi_pccard.c @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); #include <dev/wi/if_wavelan_ieee.h> #include <dev/wi/if_wireg.h> #include <dev/wi/if_wivar.h> -#ifdef WI_SYMBOL_FIRMWARE -#include <dev/wi/spectrum24t_cf.h> -#endif #include "card_if.h" #include "pccarddevs.h" @@ -152,7 +149,6 @@ static const struct pccard_product wi_pccard_products[] = { PCMCIA_CARD(SIEMENS, SS1021), PCMCIA_CARD(SIMPLETECH, SPECTRUM24_ALT), PCMCIA_CARD(SOCKET, LP_WLAN_CF), - PCMCIA_CARD(SYMBOL, LA4100), PCMCIA_CARD(TDK, LAK_CD011WL), { NULL } }; @@ -167,64 +163,39 @@ wi_pccard_probe(device_t dev) /* Make sure we're a network driver */ error = pccard_get_function(dev, &fcn); if (error != 0) - return (error); + return error; if (fcn != PCCARD_FUNCTION_NETWORK) - return (ENXIO); + return ENXIO; - if ((pp = pccard_product_lookup(dev, wi_pccard_products, - sizeof(wi_pccard_products[0]), NULL)) != NULL) { + pp = pccard_product_lookup(dev, wi_pccard_products, + sizeof(wi_pccard_products[0]), NULL); + if (pp != NULL) { if (pp->pp_name != NULL) device_set_desc(dev, pp->pp_name); - return (0); + return 0; } - return (ENXIO); + return ENXIO; } - static int wi_pccard_attach(device_t dev) { struct wi_softc *sc; - int error; - uint32_t vendor, product; + int error; sc = device_get_softc(dev); sc->wi_gone = 0; sc->wi_bus_type = WI_BUS_PCCARD; error = wi_alloc(dev, 0); - if (error) - return (error); - - /* Make sure interrupts are disabled. */ - CSR_WRITE_2(sc, WI_INT_EN, 0); - CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); - - /* - * The cute little Symbol LA4100-series CF cards need to have - * code downloaded to them. - */ - pccard_get_vendor(dev, &vendor); - pccard_get_product(dev, &product); - if (vendor == PCMCIA_VENDOR_SYMBOL && - product == PCMCIA_PRODUCT_SYMBOL_LA4100) { -#ifdef WI_SYMBOL_FIRMWARE - if (wi_symbol_load_firm(device_get_softc(dev), - spectrum24t_primsym, sizeof(spectrum24t_primsym), - spectrum24t_secsym, sizeof(spectrum24t_secsym))) { - device_printf(dev, "couldn't load firmware\n"); - return (ENXIO); - } -#else - device_printf(dev, - "Symbol LA4100 needs 'option WI_SYMBOL_FIRMWARE'\n"); - wi_free(dev); - return (ENXIO); -#endif + if (error == 0) { + /* Make sure interrupts are disabled. */ + CSR_WRITE_2(sc, WI_INT_EN, 0); + CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); + + error = wi_attach(dev); + if (error != 0) + wi_free(dev); } - pccard_get_ether(dev, sc->sc_hintmacaddr); - error = wi_attach(dev); - if (error != 0) - wi_free(dev); - return (error); + return error; } |