diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-08-04 10:47:16 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-08-04 10:47:16 +0000 |
commit | dfddd7aabc250a3b899df1867cd4f075db3a5569 (patch) | |
tree | 8d511b46b20f285cbdf29505af6e2a113d646972 /sys/dev/ic/acx.c | |
parent | 2e14be2ee0d3f179dfcbccdfdf0149429949ba7d (diff) |
Load ACX111 firmware for ACX111.
ok mglocker@ claudio@
Diffstat (limited to 'sys/dev/ic/acx.c')
-rw-r--r-- | sys/dev/ic/acx.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 64721ccebf8..22519ae667e 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.9 2006/08/03 22:56:08 deraadt Exp $ */ +/* $OpenBSD: acx.c,v 1.10 2006/08/04 10:47:15 jsg Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -205,7 +205,7 @@ void acx_free_firmware(struct acx_softc *); int acx_load_firmware(struct acx_softc *, uint32_t, const uint8_t *, int); int acx_load_radio_firmware(struct acx_softc *); -int acx_load_base_firmware(struct acx_softc *); +int acx_load_base_firmware(struct acx_softc *, const char *); struct ieee80211_node *acx_node_alloc(struct ieee80211com *); void acx_node_init(struct acx_softc *, struct acx_node *); @@ -412,7 +412,9 @@ acx_init(struct ifnet *ifp) goto back; } - error = acx_load_base_firmware(sc); + error = acx_load_base_firmware(sc, (sc->sc_flags & ACX_FLAG_ACX111) ? + "tiacx111c16" : "tiacx100"); + if (error) goto back; @@ -433,10 +435,12 @@ acx_init(struct ifnet *ifp) } #endif - /* XXX decide whether firmware is combined */ - error = acx_load_radio_firmware(sc); - if (error) - goto back; + /* ACX111 firmware is combined */ + if (!(sc->sc_flags & ACX_FLAG_ACX111)) { + error = acx_load_radio_firmware(sc); + if (error) + goto back; + } error = sc->chip_init(sc); if (error) @@ -1479,12 +1483,11 @@ acx_free_firmware(struct acx_softc *sc) } int -acx_load_base_firmware(struct acx_softc *sc) +acx_load_base_firmware(struct acx_softc *sc, const char *name) { struct ifnet *ifp = &sc->sc_ic.ic_if; int i, error; uint8_t *ucode; - const char name[]= "tiacx100"; size_t size; error = loadfirmware(name, &ucode, &size); |