xref: /freebsd/sys/dev/rtwn/rtl8192c/pci/r92ce.h (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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  */
21 
22 #ifndef RTL8192CE_H
23 #define RTL8192CE_H
24 
25 #include <dev/rtwn/rtl8192c/r92c.h>
26 
27 /*
28  * Global definitions.
29  */
30 #define R92CE_PUBQ_NPAGES	176
31 #define R92CE_HPQ_NPAGES	41
32 #define R92CE_LPQ_NPAGES	28
33 #define R92CE_TX_PAGE_COUNT	\
34 	(R92CE_PUBQ_NPAGES + R92CE_HPQ_NPAGES + R92CE_LPQ_NPAGES)
35 
36 /*
37  * Function declarations.
38  */
39 /* r92ce_calib.c */
40 void	r92ce_iq_calib(struct rtwn_softc *);
41 
42 /* r92ce_fw.c */
43 #ifndef RTWN_WITHOUT_UCODE
44 void	r92ce_fw_reset(struct rtwn_softc *, int);
45 #endif
46 
47 /* r92ce_init.c */
48 void	r92ce_init_intr(struct rtwn_softc *);
49 void	r92ce_init_edca(struct rtwn_softc *);
50 void	r92ce_init_bb(struct rtwn_softc *);
51 int	r92ce_power_on(struct rtwn_softc *);
52 void	r92ce_power_off(struct rtwn_softc *);
53 void	r92ce_init_ampdu(struct rtwn_softc *);
54 void	r92ce_post_init(struct rtwn_softc *);
55 
56 /* r92ce_led.c */
57 void	r92ce_set_led(struct rtwn_softc *, int, int);
58 
59 /* r92ce_rx.c */
60 int	r92ce_get_intr_status(struct rtwn_pci_softc *, int *);
61 void	r92ce_enable_intr(struct rtwn_pci_softc *);
62 void	r92ce_start_xfers(struct rtwn_softc *);
63 
64 /* r92ce_tx.c */
65 void	r92ce_setup_tx_desc(struct rtwn_pci_softc *, void *, uint32_t);
66 void	r92ce_tx_postsetup(struct rtwn_pci_softc *, void *,
67 	    bus_dma_segment_t[]);
68 void	r92ce_copy_tx_desc(void *, const void *);
69 void	r92ce_dump_tx_desc(struct rtwn_softc *, const void *);
70 
71 #endif	/* RTL8192CE_H */
72