net: wireless: rockchip_wlan: add rtl8188eu support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8188eu / hal / phydm / phydm_precomp.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *                                        
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20
21 #ifndef __ODM_PRECOMP_H__
22 #define __ODM_PRECOMP_H__
23
24 #include "phydm_types.h"
25 #include "phydm_features.h"
26
27 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
28 #include "Precomp.h"            // We need to include mp_precomp.h due to batch file setting.
29 #else
30 #define         TEST_FALG___            1
31 #endif
32
33 #if (DM_ODM_SUPPORT_TYPE ==ODM_CE) 
34 #define         RTL8192CE_SUPPORT                               0
35 #define         RTL8192CU_SUPPORT                               0
36 #define         RTL8192C_SUPPORT                                0       
37
38 #define         RTL8192DE_SUPPORT                               0
39 #define         RTL8192DU_SUPPORT                               0
40 #define         RTL8192D_SUPPORT                                0       
41
42 #define         RTL8723AU_SUPPORT                               0
43 #define         RTL8723AS_SUPPORT                               0
44 #define         RTL8723AE_SUPPORT                               0
45 #define         RTL8723A_SUPPORT                                0
46 #define         RTL8723_FPGA_VERIFICATION               0
47 #endif
48
49 //2 Config Flags and Structs - defined by each ODM Type
50
51 #if (DM_ODM_SUPPORT_TYPE == ODM_AP)
52         #include "../8192cd_cfg.h"
53         #include "../odm_inc.h"
54
55         #include "../8192cd.h"
56         #include "../8192cd_util.h"
57         #ifdef _BIG_ENDIAN_
58         #define ODM_ENDIAN_TYPE                         ODM_ENDIAN_BIG
59         #else
60         #define ODM_ENDIAN_TYPE                         ODM_ENDIAN_LITTLE
61         #endif
62
63         #ifdef AP_BUILD_WORKAROUND
64         #include "../8192cd_headers.h"
65         #include "../8192cd_debug.h"            
66         #endif
67
68 #elif (DM_ODM_SUPPORT_TYPE ==ODM_CE)
69         #define __PACK
70         #define __WLAN_ATTRIB_PACK__
71 #elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)
72         #include "mp_precomp.h"
73         #define ODM_ENDIAN_TYPE                         ODM_ENDIAN_LITTLE
74         #define __PACK
75         #define __WLAN_ATTRIB_PACK__
76 #endif
77
78 //2 OutSrc Header Files
79  
80 #include "phydm.h" 
81 #include "phydm_hwconfig.h"
82 #include "phydm_debug.h"
83 #include "phydm_regdefine11ac.h"
84 #include "phydm_regdefine11n.h"
85 #include "phydm_interface.h"
86 #include "phydm_reg.h"
87
88
89 #if (DM_ODM_SUPPORT_TYPE & ODM_CE)
90 #define RTL8821B_SUPPORT                0
91 #define RTL8822B_SUPPORT                0
92
93 VOID
94 PHY_SetTxPowerLimit(
95         IN      PDM_ODM_T       pDM_Odm,
96         IN      u8      *Regulation,
97         IN      u8      *Band,
98         IN      u8      *Bandwidth,
99         IN      u8      *RateSection,
100         IN      u8      *RfPath,
101         IN      u8      *Channel,
102         IN      u8      *PowerLimit
103 );
104
105 #endif
106
107 #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
108 #define RTL8821B_SUPPORT                0
109 #define RTL8822B_SUPPORT                0
110 #define RTL8703B_SUPPORT                0
111 #define RTL8188F_SUPPORT                0
112 #endif
113
114 #if RTL8188E_SUPPORT == 1
115 #define RTL8188E_T_SUPPORT 1
116 #ifdef CONFIG_SFW_SUPPORTED
117 #define RTL8188E_S_SUPPORT 1
118 #else
119 #define RTL8188E_S_SUPPORT 0
120 #endif
121 #endif
122
123 #if (RTL8188E_SUPPORT==1) 
124 #include "rtl8188e/hal8188erateadaptive.h"//for  RA,Power training
125 #include "rtl8188e/halhwimg8188e_mac.h"
126 #include "rtl8188e/halhwimg8188e_rf.h"
127 #include "rtl8188e/halhwimg8188e_bb.h"
128 #include "rtl8188e/halhwimg8188e_t_fw.h"
129 #include "rtl8188e/halhwimg8188e_s_fw.h"
130 #include "rtl8188e/phydm_regconfig8188e.h"
131 #include "rtl8188e/phydm_rtl8188e.h"
132 #include "rtl8188e/hal8188ereg.h"
133 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
134         #include "rtl8188e_hal.h" 
135         #include "rtl8188e/halphyrf_8188e_ce.h"
136 #endif
137 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
138         #include "rtl8188e/halphyrf_8188e_win.h"
139 #endif
140 #if (DM_ODM_SUPPORT_TYPE == ODM_AP)
141         #include "rtl8188e/halphyrf_8188e_ap.h"
142 #endif
143 #endif  //88E END
144
145 #if (RTL8192E_SUPPORT==1) 
146
147         #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
148                 #include "rtl8192e/halphyrf_8192e_win.h" /*FOR_8192E_IQK*/
149         #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)
150                 #include "rtl8192e/halphyrf_8192e_ap.h" /*FOR_8192E_IQK*/
151         #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
152                 #include "rtl8192e/halphyrf_8192e_ce.h" /*FOR_8192E_IQK*/
153         #endif
154         
155 #include "rtl8192e/phydm_rtl8192e.h" //FOR_8192E_IQK
156 #if (DM_ODM_SUPPORT_TYPE != ODM_AP)
157         #include "rtl8192e/halhwimg8192e_bb.h"
158         #include "rtl8192e/halhwimg8192e_mac.h"
159         #include "rtl8192e/halhwimg8192e_rf.h"
160         #include "rtl8192e/phydm_regconfig8192e.h"
161         #include "rtl8192e/halhwimg8192e_fw.h"
162         #include "rtl8192e/hal8192ereg.h"
163 #endif
164 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
165         #include "rtl8192e_hal.h"
166 #endif
167 #endif  //92E END
168
169 #if (RTL8812A_SUPPORT==1)
170
171     #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
172         #include "rtl8812a/halphyrf_8812a_win.h"
173     #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)
174         #include "rtl8812a/halphyrf_8812a_ap.h"
175     #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
176         #include "rtl8812a/halphyrf_8812a_ce.h"
177     #endif
178
179     //#include "rtl8812a/HalPhyRf_8812A.h" //FOR_8812_IQK
180     #if (DM_ODM_SUPPORT_TYPE != ODM_AP)
181         #include "rtl8812a/halhwimg8812a_bb.h"
182         #include "rtl8812a/halhwimg8812a_mac.h"
183         #include "rtl8812a/halhwimg8812a_rf.h"
184         #include "rtl8812a/phydm_regconfig8812a.h"
185         #include "rtl8812a/halhwimg8812a_fw.h"
186         #include "rtl8812a/phydm_rtl8812a.h"
187     #endif
188
189     #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
190             #include "rtl8812a_hal.h"
191     #endif
192
193 #endif //8812 END
194
195 #if (RTL8814A_SUPPORT==1)
196
197 #include "rtl8814a/halhwimg8814a_mac.h"
198 #include "rtl8814a/halhwimg8814a_rf.h"
199 #include "rtl8814a/halhwimg8814a_bb.h"
200 #if (DM_ODM_SUPPORT_TYPE != ODM_AP)
201         #include "rtl8814a/halhwimg8814a_fw.h"
202         #include "rtl8814a/phydm_rtl8814a.h"
203 #endif
204 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
205         #include "rtl8814a/halphyrf_8814a_win.h"
206 #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
207         #include "rtl8814a/halphyrf_8814a_ce.h"
208 #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)
209         #include "rtl8814a/halphyrf_8814a_ap.h"
210 #endif
211         #include "rtl8814a/phydm_regconfig8814a.h"
212 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
213         #include "rtl8814a_hal.h"
214         #include "rtl8814a/phydm_iqk_8814a.h"
215 #endif
216 #endif //8814 END
217
218 #if (RTL8881A_SUPPORT==1)//FOR_8881_IQK
219 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
220 #include "rtl8821a/phydm_iqk_8821a_win.h"
221 #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
222 #include "rtl8821a/phydm_iqk_8821a_ce.h"
223 #else
224 #include "rtl8821a/phydm_iqk_8821a_ap.h"
225 #endif
226 //#include "rtl8881a/HalHWImg8881A_BB.h"
227 //#include "rtl8881a/HalHWImg8881A_MAC.h"
228 //#include "rtl8881a/HalHWImg8881A_RF.h"
229 //#include "rtl8881a/odm_RegConfig8881A.h"
230 #endif
231
232 #if (RTL8723B_SUPPORT==1) 
233 #include "rtl8723b/halhwimg8723b_mac.h"
234 #include "rtl8723b/halhwimg8723b_rf.h"
235 #include "rtl8723b/halhwimg8723b_bb.h"
236 #include "rtl8723b/halhwimg8723b_fw.h"
237 #include "rtl8723b/phydm_regconfig8723b.h"
238 #include "rtl8723b/phydm_rtl8723b.h"
239 #include "rtl8723b/hal8723breg.h"
240 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
241     #include "rtl8723b/halphyrf_8723b_win.h"
242 #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
243     #include "rtl8723b/halphyrf_8723b_ce.h"
244     #include "rtl8723b/halhwimg8723b_mp.h"
245     #include "rtl8723b_hal.h"
246 #endif
247 #endif
248
249 #if (RTL8821A_SUPPORT==1) 
250 #include "rtl8821a/halhwimg8821a_mac.h"
251 #include "rtl8821a/halhwimg8821a_rf.h"
252 #include "rtl8821a/halhwimg8821a_bb.h"
253 #include "rtl8821a/halhwimg8821a_fw.h"
254 #include "rtl8821a/phydm_regconfig8821a.h"
255 #include "rtl8821a/phydm_rtl8821a.h"
256 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
257         #include "rtl8821a/halphyrf_8821a_win.h"
258 #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
259         #include "rtl8821a/halphyrf_8821a_ce.h"
260         #include "rtl8821a/phydm_iqk_8821a_ce.h"/*for IQK*/
261         #include "rtl8812a/halphyrf_8812a_ce.h"/*for IQK,LCK,Power-tracking*/
262         #include "rtl8812a_hal.h"
263 #else
264 #endif
265 #endif
266
267 #if (RTL8821B_SUPPORT==1) 
268 #include "rtl8821b/halhwimg8821b_mac.h"
269 #include "rtl8821b/halhwimg8821b_rf.h"
270 #include "rtl8821b/halhwimg8821b_bb.h"
271 #include "rtl8821b/halhwimg8821b_fw.h"
272 #include "rtl8821b/phydm_regconfig8821b.h"
273 #include "rtl8821b/halhwimg8821b_testchip_mac.h"
274 #include "rtl8821b/halhwimg8821b_testchip_rf.h"
275 #include "rtl8821b/halhwimg8821b_testchip_bb.h"
276 #include "rtl8821b/halhwimg8821b_testchip_fw.h"
277 #include "rtl8821b/halphyrf_8821b.h"
278 #endif
279
280 #if (RTL8822B_SUPPORT==1) 
281 #include "rtl8822b/halhwimg8822b_mac.h"
282 #include "rtl8822b/halhwimg8822b_rf.h"
283 #include "rtl8822b/halhwimg8822b_bb.h"
284 /*#include "rtl8822b/halhwimg8822b_fw.h"*/
285 #include "rtl8822b/phydm_regconfig8822b.h"
286 #include "rtl8822b/halphyrf_8822b.h"
287 #include "rtl8822b/phydm_rtl8822b.h"
288 #include "rtl8822b/phydm_hal_api8822b.h"
289 #include "rtl8822b/version_rtl8822b.h"
290 #endif
291
292 #if (RTL8703B_SUPPORT==1) 
293 #include "rtl8703b/phydm_regconfig8703b.h"
294 #include "rtl8703b/halhwimg8703b_mac.h"
295 #include "rtl8703b/halhwimg8703b_rf.h"
296 #include "rtl8703b/halhwimg8703b_bb.h"
297 #include "rtl8703b/halhwimg8703b_fw.h"
298 #include "rtl8703b/halphyrf_8703b.h"
299 #include "rtl8703b/version_rtl8703b.h"
300 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
301 #include "rtl8703b_hal.h"
302 #endif
303 #endif
304
305 #if (RTL8188F_SUPPORT == 1) 
306 #include "rtl8188f/halhwimg8188f_mac.h"
307 #include "rtl8188f/halhwimg8188f_rf.h"
308 #include "rtl8188f/halhwimg8188f_bb.h"
309 #include "rtl8188f/halhwimg8188f_fw.h"
310 #include "rtl8188f/hal8188freg.h"
311 #include "rtl8188f/phydm_rtl8188f.h"
312 #include "rtl8188f/phydm_regconfig8188f.h"
313 #include "rtl8188f/halphyrf_8188f.h" /* for IQK,LCK,Power-tracking */
314 #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
315 #include "rtl8188f_hal.h"
316 #endif
317 #endif
318
319 #endif  // __ODM_PRECOMP_H__
320