xref: /linux/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/def.h (revision f1d2b4d338bf090296f67830025228872fd52513)
1*f1d2b4d3SLarry Finger /******************************************************************************
2*f1d2b4d3SLarry Finger  *
3*f1d2b4d3SLarry Finger  * Copyright(c) 2009-2010  Realtek Corporation.
4*f1d2b4d3SLarry Finger  *
5*f1d2b4d3SLarry Finger  * This program is free software; you can redistribute it and/or modify it
6*f1d2b4d3SLarry Finger  * under the terms of version 2 of the GNU General Public License as
7*f1d2b4d3SLarry Finger  * published by the Free Software Foundation.
8*f1d2b4d3SLarry Finger  *
9*f1d2b4d3SLarry Finger  * This program is distributed in the hope that it will be useful, but WITHOUT
10*f1d2b4d3SLarry Finger  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11*f1d2b4d3SLarry Finger  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12*f1d2b4d3SLarry Finger  * more details.
13*f1d2b4d3SLarry Finger  *
14*f1d2b4d3SLarry Finger  * The full GNU General Public License is included in this distribution in the
15*f1d2b4d3SLarry Finger  * file called LICENSE.
16*f1d2b4d3SLarry Finger  *
17*f1d2b4d3SLarry Finger  * Contact Information:
18*f1d2b4d3SLarry Finger  * wlanfae <wlanfae@realtek.com>
19*f1d2b4d3SLarry Finger  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20*f1d2b4d3SLarry Finger  * Hsinchu 300, Taiwan.
21*f1d2b4d3SLarry Finger  *
22*f1d2b4d3SLarry Finger  * Larry Finger <Larry.Finger@lwfinger.net>
23*f1d2b4d3SLarry Finger  *
24*f1d2b4d3SLarry Finger  *****************************************************************************/
25*f1d2b4d3SLarry Finger 
26*f1d2b4d3SLarry Finger #ifndef __RTL8821AE_DEF_H__
27*f1d2b4d3SLarry Finger #define __RTL8821AE_DEF_H__
28*f1d2b4d3SLarry Finger 
29*f1d2b4d3SLarry Finger /*--------------------------Define -------------------------------------------*/
30*f1d2b4d3SLarry Finger #define	USE_SPECIFIC_FW_TO_SUPPORT_WOWLAN	1
31*f1d2b4d3SLarry Finger 
32*f1d2b4d3SLarry Finger /* BIT 7 HT Rate*/
33*f1d2b4d3SLarry Finger /*TxHT = 0*/
34*f1d2b4d3SLarry Finger #define	MGN_1M				0x02
35*f1d2b4d3SLarry Finger #define	MGN_2M				0x04
36*f1d2b4d3SLarry Finger #define	MGN_5_5M			0x0b
37*f1d2b4d3SLarry Finger #define	MGN_11M				0x16
38*f1d2b4d3SLarry Finger 
39*f1d2b4d3SLarry Finger #define	MGN_6M				0x0c
40*f1d2b4d3SLarry Finger #define	MGN_9M				0x12
41*f1d2b4d3SLarry Finger #define	MGN_12M				0x18
42*f1d2b4d3SLarry Finger #define	MGN_18M				0x24
43*f1d2b4d3SLarry Finger #define	MGN_24M				0x30
44*f1d2b4d3SLarry Finger #define	MGN_36M				0x48
45*f1d2b4d3SLarry Finger #define	MGN_48M				0x60
46*f1d2b4d3SLarry Finger #define	MGN_54M				0x6c
47*f1d2b4d3SLarry Finger 
48*f1d2b4d3SLarry Finger /* TxHT = 1 */
49*f1d2b4d3SLarry Finger #define	MGN_MCS0			0x80
50*f1d2b4d3SLarry Finger #define	MGN_MCS1			0x81
51*f1d2b4d3SLarry Finger #define	MGN_MCS2			0x82
52*f1d2b4d3SLarry Finger #define	MGN_MCS3			0x83
53*f1d2b4d3SLarry Finger #define	MGN_MCS4			0x84
54*f1d2b4d3SLarry Finger #define	MGN_MCS5			0x85
55*f1d2b4d3SLarry Finger #define	MGN_MCS6			0x86
56*f1d2b4d3SLarry Finger #define	MGN_MCS7			0x87
57*f1d2b4d3SLarry Finger #define	MGN_MCS8			0x88
58*f1d2b4d3SLarry Finger #define	MGN_MCS9			0x89
59*f1d2b4d3SLarry Finger #define	MGN_MCS10			0x8a
60*f1d2b4d3SLarry Finger #define	MGN_MCS11			0x8b
61*f1d2b4d3SLarry Finger #define	MGN_MCS12			0x8c
62*f1d2b4d3SLarry Finger #define	MGN_MCS13			0x8d
63*f1d2b4d3SLarry Finger #define	MGN_MCS14			0x8e
64*f1d2b4d3SLarry Finger #define	MGN_MCS15			0x8f
65*f1d2b4d3SLarry Finger /* VHT rate */
66*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS0		0x90
67*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS1		0x91
68*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS2		0x92
69*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS3		0x93
70*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS4		0x94
71*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS5		0x95
72*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS6		0x96
73*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS7		0x97
74*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS8		0x98
75*f1d2b4d3SLarry Finger #define	MGN_VHT1SS_MCS9		0x99
76*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS0		0x9a
77*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS1		0x9b
78*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS2		0x9c
79*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS3		0x9d
80*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS4		0x9e
81*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS5		0x9f
82*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS6		0xa0
83*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS7		0xa1
84*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS8		0xa2
85*f1d2b4d3SLarry Finger #define	MGN_VHT2SS_MCS9		0xa3
86*f1d2b4d3SLarry Finger 
87*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS0		0xa4
88*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS1		0xa5
89*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS2		0xa6
90*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS3		0xa7
91*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS4		0xa8
92*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS5		0xa9
93*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS6		0xaa
94*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS7		0xab
95*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS8		0xac
96*f1d2b4d3SLarry Finger #define	MGN_VHT3SS_MCS9		0xad
97*f1d2b4d3SLarry Finger 
98*f1d2b4d3SLarry Finger #define	MGN_MCS0_SG			0xc0
99*f1d2b4d3SLarry Finger #define	MGN_MCS1_SG			0xc1
100*f1d2b4d3SLarry Finger #define	MGN_MCS2_SG			0xc2
101*f1d2b4d3SLarry Finger #define	MGN_MCS3_SG			0xc3
102*f1d2b4d3SLarry Finger #define	MGN_MCS4_SG			0xc4
103*f1d2b4d3SLarry Finger #define	MGN_MCS5_SG			0xc5
104*f1d2b4d3SLarry Finger #define	MGN_MCS6_SG			0xc6
105*f1d2b4d3SLarry Finger #define	MGN_MCS7_SG			0xc7
106*f1d2b4d3SLarry Finger #define	MGN_MCS8_SG			0xc8
107*f1d2b4d3SLarry Finger #define	MGN_MCS9_SG			0xc9
108*f1d2b4d3SLarry Finger #define	MGN_MCS10_SG		0xca
109*f1d2b4d3SLarry Finger #define	MGN_MCS11_SG		0xcb
110*f1d2b4d3SLarry Finger #define	MGN_MCS12_SG		0xcc
111*f1d2b4d3SLarry Finger #define	MGN_MCS13_SG		0xcd
112*f1d2b4d3SLarry Finger #define	MGN_MCS14_SG		0xce
113*f1d2b4d3SLarry Finger #define	MGN_MCS15_SG		0xcf
114*f1d2b4d3SLarry Finger 
115*f1d2b4d3SLarry Finger #define	MGN_UNKNOWN			0xff
116*f1d2b4d3SLarry Finger 
117*f1d2b4d3SLarry Finger /* 30 ms */
118*f1d2b4d3SLarry Finger #define	WIFI_NAV_UPPER_US				30000
119*f1d2b4d3SLarry Finger #define HAL_92C_NAV_UPPER_UNIT			128
120*f1d2b4d3SLarry Finger 
121*f1d2b4d3SLarry Finger #define MAX_RX_DMA_BUFFER_SIZE				0x3E80
122*f1d2b4d3SLarry Finger 
123*f1d2b4d3SLarry Finger #define HAL_PRIME_CHNL_OFFSET_DONT_CARE		0
124*f1d2b4d3SLarry Finger #define HAL_PRIME_CHNL_OFFSET_LOWER			1
125*f1d2b4d3SLarry Finger #define HAL_PRIME_CHNL_OFFSET_UPPER			2
126*f1d2b4d3SLarry Finger 
127*f1d2b4d3SLarry Finger #define RX_MPDU_QUEUE						0
128*f1d2b4d3SLarry Finger #define RX_CMD_QUEUE						1
129*f1d2b4d3SLarry Finger 
130*f1d2b4d3SLarry Finger #define MAX_RX_DMA_BUFFER_SIZE_8812	0x3E80
131*f1d2b4d3SLarry Finger 
132*f1d2b4d3SLarry Finger #define	C2H_RX_CMD_HDR_LEN					8
133*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_CMD_LEN(__prxhdr)		\
134*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__prxhdr), 0, 16)
135*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_ELEMENT_ID(__prxhdr)	\
136*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__prxhdr), 16, 8)
137*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_CMD_SEQ(__prxhdr)		\
138*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__prxhdr), 24, 7)
139*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_CONTINUE(__prxhdr)		\
140*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__prxhdr), 31, 1)
141*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_CONTENT(__prxhdr)		\
142*f1d2b4d3SLarry Finger 	((u8 *)(__prxhdr) + C2H_RX_CMD_HDR_LEN)
143*f1d2b4d3SLarry Finger 
144*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_ELEMENT_ID(__pcmdfbhdr)	\
145*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__pcmdfbhdr), 0, 8)
146*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_LEN(__pcmdfbhdr)		\
147*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__pcmdfbhdr), 8, 8)
148*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_CMD_CNT(__pcmdfbhdr)	\
149*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE((__pcmdfbhdr), 16, 16)
150*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_MAC_ID(__pcmdfbhdr)	\
151*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 0, 5)
152*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_VALID(__pcmdfbhdr)		\
153*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 7, 1)
154*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_RETRY_CNT(__pcmdfbhdr)	\
155*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 8, 5)
156*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_TOK(__pcmdfbhdr)		\
157*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 15, 1)
158*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_QSEL(__pcmdfbhdr)		\
159*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 16, 4)
160*f1d2b4d3SLarry Finger #define	GET_C2H_CMD_FEEDBACK_CCX_SEQ(__pcmdfbhdr)		\
161*f1d2b4d3SLarry Finger 	LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 20, 12)
162*f1d2b4d3SLarry Finger 
163*f1d2b4d3SLarry Finger #define CHIP_BONDING_IDENTIFIER(_value)	(((_value)>>22)&0x3)
164*f1d2b4d3SLarry Finger 
165*f1d2b4d3SLarry Finger #define CHIP_8812				BIT(2)
166*f1d2b4d3SLarry Finger #define CHIP_8821				(BIT(0)|BIT(2))
167*f1d2b4d3SLarry Finger 
168*f1d2b4d3SLarry Finger #define CHIP_8821A				(BIT(0)|BIT(2))
169*f1d2b4d3SLarry Finger #define NORMAL_CHIP				BIT(3)
170*f1d2b4d3SLarry Finger #define RF_TYPE_1T1R				(~(BIT(4)|BIT(5)|BIT(6)))
171*f1d2b4d3SLarry Finger #define RF_TYPE_1T2R				BIT(4)
172*f1d2b4d3SLarry Finger #define RF_TYPE_2T2R				BIT(5)
173*f1d2b4d3SLarry Finger #define CHIP_VENDOR_UMC				BIT(7)
174*f1d2b4d3SLarry Finger #define B_CUT_VERSION				BIT(12)
175*f1d2b4d3SLarry Finger #define C_CUT_VERSION				BIT(13)
176*f1d2b4d3SLarry Finger #define D_CUT_VERSION				((BIT(12)|BIT(13)))
177*f1d2b4d3SLarry Finger #define E_CUT_VERSION				BIT(14)
178*f1d2b4d3SLarry Finger #define	RF_RL_ID			(BIT(31)|BIT(30)|BIT(29)|BIT(28))
179*f1d2b4d3SLarry Finger 
180*f1d2b4d3SLarry Finger enum version_8821ae {
181*f1d2b4d3SLarry Finger 	VERSION_TEST_CHIP_1T1R_8812 = 0x0004,
182*f1d2b4d3SLarry Finger 	VERSION_TEST_CHIP_2T2R_8812 = 0x0024,
183*f1d2b4d3SLarry Finger 	VERSION_NORMAL_TSMC_CHIP_1T1R_8812 = 0x100c,
184*f1d2b4d3SLarry Finger 	VERSION_NORMAL_TSMC_CHIP_2T2R_8812 = 0x102c,
185*f1d2b4d3SLarry Finger 	VERSION_NORMAL_TSMC_CHIP_1T1R_8812_C_CUT = 0x200c,
186*f1d2b4d3SLarry Finger 	VERSION_NORMAL_TSMC_CHIP_2T2R_8812_C_CUT = 0x202c,
187*f1d2b4d3SLarry Finger 	VERSION_TEST_CHIP_8821 = 0x0005,
188*f1d2b4d3SLarry Finger 	VERSION_NORMAL_TSMC_CHIP_8821 = 0x000d,
189*f1d2b4d3SLarry Finger 	VERSION_NORMAL_TSMC_CHIP_8821_B_CUT = 0x100d,
190*f1d2b4d3SLarry Finger 	VERSION_UNKNOWN = 0xFF,
191*f1d2b4d3SLarry Finger };
192*f1d2b4d3SLarry Finger 
193*f1d2b4d3SLarry Finger enum vht_data_sc {
194*f1d2b4d3SLarry Finger 	VHT_DATA_SC_DONOT_CARE = 0,
195*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_UPPER_OF_80MHZ = 1,
196*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_LOWER_OF_80MHZ = 2,
197*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_UPPERST_OF_80MHZ = 3,
198*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_LOWEST_OF_80MHZ = 4,
199*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_RECV1 = 5,
200*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_RECV2 = 6,
201*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_RECV3 = 7,
202*f1d2b4d3SLarry Finger 	VHT_DATA_SC_20_RECV4 = 8,
203*f1d2b4d3SLarry Finger 	VHT_DATA_SC_40_UPPER_OF_80MHZ = 9,
204*f1d2b4d3SLarry Finger 	VHT_DATA_SC_40_LOWER_OF_80MHZ = 10,
205*f1d2b4d3SLarry Finger };
206*f1d2b4d3SLarry Finger 
207*f1d2b4d3SLarry Finger /* MASK */
208*f1d2b4d3SLarry Finger #define IC_TYPE_MASK			(BIT(0)|BIT(1)|BIT(2))
209*f1d2b4d3SLarry Finger #define CHIP_TYPE_MASK			BIT(3)
210*f1d2b4d3SLarry Finger #define RF_TYPE_MASK			(BIT(4)|BIT(5)|BIT(6))
211*f1d2b4d3SLarry Finger #define MANUFACTUER_MASK		BIT(7)
212*f1d2b4d3SLarry Finger #define ROM_VERSION_MASK		(BIT(11)|BIT(10)|BIT(9)|BIT(8))
213*f1d2b4d3SLarry Finger #define CUT_VERSION_MASK		(BIT(15)|BIT(14)|BIT(13)|BIT(12))
214*f1d2b4d3SLarry Finger 
215*f1d2b4d3SLarry Finger /* Get element */
216*f1d2b4d3SLarry Finger #define GET_CVID_IC_TYPE(version)	((version) & IC_TYPE_MASK)
217*f1d2b4d3SLarry Finger #define GET_CVID_CHIP_TYPE(version)	((version) & CHIP_TYPE_MASK)
218*f1d2b4d3SLarry Finger #define GET_CVID_RF_TYPE(version)	((version) & RF_TYPE_MASK)
219*f1d2b4d3SLarry Finger #define GET_CVID_MANUFACTUER(version)	((version) & MANUFACTUER_MASK)
220*f1d2b4d3SLarry Finger #define GET_CVID_ROM_VERSION(version)	((version) & ROM_VERSION_MASK)
221*f1d2b4d3SLarry Finger #define GET_CVID_CUT_VERSION(version)	((version) & CUT_VERSION_MASK)
222*f1d2b4d3SLarry Finger 
223*f1d2b4d3SLarry Finger #define IS_1T1R(version)	((GET_CVID_RF_TYPE(version)) ? false : true)
224*f1d2b4d3SLarry Finger #define IS_1T2R(version)	((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R)\
225*f1d2b4d3SLarry Finger 							? true : false)
226*f1d2b4d3SLarry Finger #define IS_2T2R(version)	((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R)\
227*f1d2b4d3SLarry Finger 							? true : false)
228*f1d2b4d3SLarry Finger 
229*f1d2b4d3SLarry Finger #define IS_8812_SERIES(version)	((GET_CVID_IC_TYPE(version) == CHIP_8812) ? \
230*f1d2b4d3SLarry Finger 								true : false)
231*f1d2b4d3SLarry Finger #define IS_8821_SERIES(version)	((GET_CVID_IC_TYPE(version) == CHIP_8821) ? \
232*f1d2b4d3SLarry Finger 								true : false)
233*f1d2b4d3SLarry Finger 
234*f1d2b4d3SLarry Finger #define IS_VENDOR_8812A_TEST_CHIP(version)	((IS_8812_SERIES(version)) ? \
235*f1d2b4d3SLarry Finger 					((IS_NORMAL_CHIP(version)) ? \
236*f1d2b4d3SLarry Finger 						false : true) : false)
237*f1d2b4d3SLarry Finger #define IS_VENDOR_8812A_MP_CHIP(version)	((IS_8812_SERIES(version)) ? \
238*f1d2b4d3SLarry Finger 					((IS_NORMAL_CHIP(version)) ? \
239*f1d2b4d3SLarry Finger 						true : false) : false)
240*f1d2b4d3SLarry Finger #define IS_VENDOR_8812A_C_CUT(version)		((IS_8812_SERIES(version)) ? \
241*f1d2b4d3SLarry Finger 					((GET_CVID_CUT_VERSION(version) == \
242*f1d2b4d3SLarry Finger 					C_CUT_VERSION) ? \
243*f1d2b4d3SLarry Finger 					true : false) : false)
244*f1d2b4d3SLarry Finger 
245*f1d2b4d3SLarry Finger #define IS_VENDOR_8821A_TEST_CHIP(version)	((IS_8821_SERIES(version)) ? \
246*f1d2b4d3SLarry Finger 					((IS_NORMAL_CHIP(version)) ? \
247*f1d2b4d3SLarry Finger 					false : true) : false)
248*f1d2b4d3SLarry Finger #define IS_VENDOR_8821A_MP_CHIP(version)	((IS_8821_SERIES(version)) ? \
249*f1d2b4d3SLarry Finger 					((IS_NORMAL_CHIP(version)) ? \
250*f1d2b4d3SLarry Finger 						true : false) : false)
251*f1d2b4d3SLarry Finger #define IS_VENDOR_8821A_B_CUT(version)		((IS_8821_SERIES(version)) ? \
252*f1d2b4d3SLarry Finger 					((GET_CVID_CUT_VERSION(version) == \
253*f1d2b4d3SLarry Finger 					B_CUT_VERSION) ? \
254*f1d2b4d3SLarry Finger 					true : false) : false)
255*f1d2b4d3SLarry Finger enum board_type {
256*f1d2b4d3SLarry Finger 	ODM_BOARD_DEFAULT = 0,	  /* The DEFAULT case. */
257*f1d2b4d3SLarry Finger 	ODM_BOARD_MINICARD = BIT(0), /* 0 = non-mini card, 1 = mini card. */
258*f1d2b4d3SLarry Finger 	ODM_BOARD_SLIM = BIT(1), /* 0 = non-slim card, 1 = slim card */
259*f1d2b4d3SLarry Finger 	ODM_BOARD_BT = BIT(2), /* 0 = without BT card, 1 = with BT */
260*f1d2b4d3SLarry Finger 	ODM_BOARD_EXT_PA = BIT(3), /* 1 = existing 2G ext-PA */
261*f1d2b4d3SLarry Finger 	ODM_BOARD_EXT_LNA = BIT(4), /* 1 = existing 2G ext-LNA */
262*f1d2b4d3SLarry Finger 	ODM_BOARD_EXT_TRSW = BIT(5), /* 1 = existing ext-TRSW */
263*f1d2b4d3SLarry Finger 	ODM_BOARD_EXT_PA_5G = BIT(6), /* 1 = existing 5G ext-PA */
264*f1d2b4d3SLarry Finger 	ODM_BOARD_EXT_LNA_5G = BIT(7), /* 1 = existing 5G ext-LNA */
265*f1d2b4d3SLarry Finger };
266*f1d2b4d3SLarry Finger 
267*f1d2b4d3SLarry Finger enum rf_optype {
268*f1d2b4d3SLarry Finger 	RF_OP_BY_SW_3WIRE = 0,
269*f1d2b4d3SLarry Finger 	RF_OP_BY_FW,
270*f1d2b4d3SLarry Finger 	RF_OP_MAX
271*f1d2b4d3SLarry Finger };
272*f1d2b4d3SLarry Finger 
273*f1d2b4d3SLarry Finger enum rf_power_state {
274*f1d2b4d3SLarry Finger 	RF_ON,
275*f1d2b4d3SLarry Finger 	RF_OFF,
276*f1d2b4d3SLarry Finger 	RF_SLEEP,
277*f1d2b4d3SLarry Finger 	RF_SHUT_DOWN,
278*f1d2b4d3SLarry Finger };
279*f1d2b4d3SLarry Finger 
280*f1d2b4d3SLarry Finger enum power_save_mode {
281*f1d2b4d3SLarry Finger 	POWER_SAVE_MODE_ACTIVE,
282*f1d2b4d3SLarry Finger 	POWER_SAVE_MODE_SAVE,
283*f1d2b4d3SLarry Finger };
284*f1d2b4d3SLarry Finger 
285*f1d2b4d3SLarry Finger enum power_polocy_config {
286*f1d2b4d3SLarry Finger 	POWERCFG_MAX_POWER_SAVINGS,
287*f1d2b4d3SLarry Finger 	POWERCFG_GLOBAL_POWER_SAVINGS,
288*f1d2b4d3SLarry Finger 	POWERCFG_LOCAL_POWER_SAVINGS,
289*f1d2b4d3SLarry Finger 	POWERCFG_LENOVO,
290*f1d2b4d3SLarry Finger };
291*f1d2b4d3SLarry Finger 
292*f1d2b4d3SLarry Finger enum interface_select_pci {
293*f1d2b4d3SLarry Finger 	INTF_SEL1_MINICARD = 0,
294*f1d2b4d3SLarry Finger 	INTF_SEL0_PCIE = 1,
295*f1d2b4d3SLarry Finger 	INTF_SEL2_RSV = 2,
296*f1d2b4d3SLarry Finger 	INTF_SEL3_RSV = 3,
297*f1d2b4d3SLarry Finger };
298*f1d2b4d3SLarry Finger 
299*f1d2b4d3SLarry Finger enum hal_fw_c2h_cmd_id {
300*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_READ_MACREG = 0,
301*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_READ_BBREG = 1,
302*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_READ_RFREG = 2,
303*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_READ_EEPROM = 3,
304*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_READ_EFUSE = 4,
305*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_READ_CAM = 5,
306*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_GET_BASICRATE = 6,
307*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_GET_DATARATE = 7,
308*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_SURVEY = 8,
309*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_SURVEYDONE = 9,
310*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_JOINBSS = 10,
311*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_ADDSTA = 11,
312*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_DELSTA = 12,
313*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_ATIMDONE = 13,
314*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_TX_REPORT = 14,
315*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_CCX_REPORT = 15,
316*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_DTM_REPORT = 16,
317*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_TX_RATE_STATISTICS = 17,
318*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_C2HLBK = 18,
319*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_C2HDBG = 19,
320*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_C2HFEEDBACK = 20,
321*f1d2b4d3SLarry Finger 	HAL_FW_C2H_CMD_MAX
322*f1d2b4d3SLarry Finger };
323*f1d2b4d3SLarry Finger 
324*f1d2b4d3SLarry Finger enum rtl_desc_qsel {
325*f1d2b4d3SLarry Finger 	QSLT_BK = 0x2,
326*f1d2b4d3SLarry Finger 	QSLT_BE = 0x0,
327*f1d2b4d3SLarry Finger 	QSLT_VI = 0x5,
328*f1d2b4d3SLarry Finger 	QSLT_VO = 0x7,
329*f1d2b4d3SLarry Finger 	QSLT_BEACON = 0x10,
330*f1d2b4d3SLarry Finger 	QSLT_HIGH = 0x11,
331*f1d2b4d3SLarry Finger 	QSLT_MGNT = 0x12,
332*f1d2b4d3SLarry Finger 	QSLT_CMD = 0x13,
333*f1d2b4d3SLarry Finger };
334*f1d2b4d3SLarry Finger 
335*f1d2b4d3SLarry Finger enum rx_packet_type {
336*f1d2b4d3SLarry Finger 	NORMAL_RX,
337*f1d2b4d3SLarry Finger 	TX_REPORT1,
338*f1d2b4d3SLarry Finger 	TX_REPORT2,
339*f1d2b4d3SLarry Finger 	HIS_REPORT,
340*f1d2b4d3SLarry Finger 	C2H_PACKET,
341*f1d2b4d3SLarry Finger };
342*f1d2b4d3SLarry Finger 
343*f1d2b4d3SLarry Finger struct phy_sts_cck_8821ae_t {
344*f1d2b4d3SLarry Finger 	u8 adc_pwdb_X[4];
345*f1d2b4d3SLarry Finger 	u8 sq_rpt;
346*f1d2b4d3SLarry Finger 	u8 cck_agc_rpt;
347*f1d2b4d3SLarry Finger };
348*f1d2b4d3SLarry Finger 
349*f1d2b4d3SLarry Finger struct h2c_cmd_8821ae {
350*f1d2b4d3SLarry Finger 	u8 element_id;
351*f1d2b4d3SLarry Finger 	u32 cmd_len;
352*f1d2b4d3SLarry Finger 	u8 *p_cmdbuffer;
353*f1d2b4d3SLarry Finger };
354*f1d2b4d3SLarry Finger 
355*f1d2b4d3SLarry Finger #endif
356