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