2 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
3 * Copyright (c) 2015-2016 Andriy Voskoboinyk <avos@FreeBSD.org>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $
21 #ifndef R88E_RX_DESC_H
22 #define R88E_RX_DESC_H
24 #include <dev/rtwn/rtl8192c/r92c_rx_desc.h>
26 /* Rx MAC descriptor defines (chip-specific). */
28 #define R88E_RXDW3_RPT_M 0x0000c000
29 #define R88E_RXDW3_RPT_S 14
30 #define R88E_RXDW3_RPT_RX 0
31 #define R88E_RXDW3_RPT_TX1 1
32 #define R88E_RXDW3_RPT_TX2 2
33 #define R88E_RXDW3_RPT_HIS 3
35 /* Rx PHY descriptor. */
36 struct r88e_rx_phystat {
45 uint8_t path_cfotail[2];
47 uint8_t stream_rxevm[2];
48 uint8_t path_rxsnr[2];
49 uint8_t noise_power_db_lsb;
51 uint8_t stream_csi[2];
52 uint8_t stream_target_csi[2];
56 /* Tx report (type 1). */
57 struct r88e_tx_rpt_ccx {
59 #define R88E_RPTB6_PKT_NUM_M 0x0e
60 #define R88E_RPTB6_PKT_NUM_S 1
61 #define R88E_RPTB0_INT_CCX 0x80
64 #define R88E_RPTB1_MACID_M 0x3f
65 #define R88E_RPTB1_MACID_S 0
66 #define R88E_RPTB1_PKT_OK 0x40
67 #define R88E_RPTB1_BMC 0x80
70 #define R88E_RPTB2_RETRY_CNT_M 0x3f
71 #define R88E_RPTB2_RETRY_CNT_S 0
72 #define R88E_RPTB2_LIFE_EXPIRE 0x40
73 #define R88E_RPTB2_RETRY_OVER 0x80
75 uint8_t queue_time_low;
76 uint8_t queue_time_high;
79 #define R88E_RPTB6_QSEL_M 0xf0
80 #define R88E_RPTB6_QSEL_S 4
85 /* Interrupt message format. */
87 struct r88e_intr_msg {
91 uint8_t reserved1[13];
95 uint8_t reserved3[27];
100 #endif /* R88E_RX_DESC_H */