xref: /freebsd/sys/dev/rtwn/rtl8192c/pci/r92ce.h (revision 19fae0f66023a97a9b464b3beeeabb2081f575b3)
1 /*	$OpenBSD: if_rtwnreg.h,v 1.3 2015/06/14 08:02:47 stsp Exp $	*/
2 
3 /*-
4  * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
5  * Copyright (c) 2015 Stefan Sperling <stsp@openbsd.org>
6  * Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org>
7  *
8  * Permission to use, copy, modify, and distribute this software for any
9  * purpose with or without fee is hereby granted, provided that the above
10  * copyright notice and this permission notice appear in all copies.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19  *
20  * $FreeBSD$
21  */
22 
23 #ifndef RTL8192CE_H
24 #define RTL8192CE_H
25 
26 #include <dev/rtwn/rtl8192c/r92c.h>
27 
28 /*
29  * Global definitions.
30  */
31 #define R92CE_PUBQ_NPAGES	176
32 #define R92CE_HPQ_NPAGES	41
33 #define R92CE_LPQ_NPAGES	28
34 #define R92CE_TX_PAGE_COUNT	\
35 	(R92CE_PUBQ_NPAGES + R92CE_HPQ_NPAGES + R92CE_LPQ_NPAGES)
36 
37 /*
38  * Function declarations.
39  */
40 /* r92ce_calib.c */
41 void	r92ce_iq_calib(struct rtwn_softc *);
42 
43 /* r92ce_fw.c */
44 #ifndef RTWN_WITHOUT_UCODE
45 void	r92ce_fw_reset(struct rtwn_softc *, int);
46 #endif
47 
48 /* r92ce_init.c */
49 void	r92ce_init_intr(struct rtwn_softc *);
50 void	r92ce_init_edca(struct rtwn_softc *);
51 void	r92ce_init_bb(struct rtwn_softc *);
52 int	r92ce_power_on(struct rtwn_softc *);
53 void	r92ce_power_off(struct rtwn_softc *);
54 void	r92ce_init_ampdu(struct rtwn_softc *);
55 void	r92ce_post_init(struct rtwn_softc *);
56 
57 /* r92ce_led.c */
58 void	r92ce_set_led(struct rtwn_softc *, int, int);
59 
60 /* r92ce_rx.c */
61 int	r92ce_get_intr_status(struct rtwn_pci_softc *, int *);
62 void	r92ce_enable_intr(struct rtwn_pci_softc *);
63 void	r92ce_start_xfers(struct rtwn_softc *);
64 
65 /* r92ce_tx.c */
66 void	r92ce_setup_tx_desc(struct rtwn_pci_softc *, void *, uint32_t);
67 void	r92ce_tx_postsetup(struct rtwn_pci_softc *, void *,
68 	    bus_dma_segment_t[]);
69 void	r92ce_copy_tx_desc(void *, const void *);
70 void	r92ce_dump_tx_desc(struct rtwn_softc *, const void *);
71 
72 #endif	/* RTL8192CE_H */
73