diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-10-15 19:55:48 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-10-15 19:55:48 +0000 |
commit | d27322a7d799ede63b48f1e8190ba4eb6466b199 (patch) | |
tree | f6bcd6a80b541d09e6fcba1e649fe2bfc98e9167 /sys/dev/ic/malo.h | |
parent | 7237b595f443856244e1571692d4a872b7b26f6c (diff) |
First stubs for a new driver for the Marvell Libertas chips.
The card correctly loads the firmware and it is possible to send a few
simple commands to the card but that's it. No packet are sent or received.
Only the Netgear WG511v2 cardbus card is tested.
A cheese fondue and a bigger amount of white wine was needed to make the
interrupts work -- until last night the driver was uploading the firmware
to fast and the card garbled the image without moaning. It took us a full
day and hundreds of test kernels to figure that out.
Joint work with mglocker@, fondue by mbalmer@
OK mglocker@, get it in deraadt@
Diffstat (limited to 'sys/dev/ic/malo.h')
-rw-r--r-- | sys/dev/ic/malo.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sys/dev/ic/malo.h b/sys/dev/ic/malo.h new file mode 100644 index 00000000000..c25cccb4e09 --- /dev/null +++ b/sys/dev/ic/malo.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +struct malo_softc { + struct device sc_dev; + struct ieee80211com sc_ic; + + bus_dma_tag_t sc_dmat; + bus_space_tag_t sc_mem1_bt; + bus_space_tag_t sc_mem2_bt; + bus_space_handle_t sc_mem1_bh; + bus_space_handle_t sc_mem2_bh; + + bus_dmamap_t sc_cmd_dmam; + bus_dma_segment_t sc_cmd_dmas; + void *sc_cmd_mem; + bus_addr_t sc_cmd_dmaaddr; + uint32_t *sc_cookie; + bus_addr_t sc_cookie_dmaaddr; + + int (*sc_newstate) + (struct ieee80211com *, + enum ieee80211_state, int); + + int (*sc_enable)(struct malo_softc *); + void (*sc_disable)(struct malo_softc *); +}; + +struct malo_node { + struct ieee80211_node ni; +}; + +int malo_intr(void *arg); +int malo_attach(struct malo_softc *sc); +int malo_detach(void *arg); |