• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2017 Realtek Corporation.
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  *****************************************************************************/
15 
16 #ifndef	__PHYDM_FEATURES_AP_H__
17 #define __PHYDM_FEATURES_AP_H__
18 
19 #if (RTL8814A_SUPPORT || RTL8821C_SUPPORT || RTL8822B_SUPPORT ||\
20 	RTL8197F_SUPPORT || RTL8192F_SUPPORT || RTL8198F_SUPPORT ||\
21 	RTL8822C_SUPPORT || RTL8812F_SUPPORT || RTL8814B_SUPPORT ||\
22 	RTL8197G_SUPPORT || RTL8723F_SUPPORT)
23 	#define PHYDM_LA_MODE_SUPPORT			1
24 #else
25 	#define PHYDM_LA_MODE_SUPPORT			0
26 #endif
27 
28 #if (RTL8822B_SUPPORT || RTL8812A_SUPPORT || RTL8197F_SUPPORT ||\
29 	RTL8192F_SUPPORT)
30 	#define DYN_ANT_WEIGHTING_SUPPORT
31 #endif
32 
33 #if (RTL8822B_SUPPORT || RTL8198F_SUPPORT || RTL8814B_SUPPORT ||\
34      RTL8197G_SUPPORT || RTL8812F_SUPPORT || RTL8723F_SUPPORT)
35 	#define FAHM_SUPPORT
36 #endif
37 
38 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT || RTL8723F_SUPPORT)
39 	#define IFS_CLM_SUPPORT
40 #endif
41 	#define NHM_SUPPORT
42 	#define CLM_SUPPORT
43 
44 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT)
45 	#define EDCCA_CLM_SUPPORT
46 #endif
47 
48 #if (RTL8812F_SUPPORT)
49 	/*#define PHYDM_PHYSTAUS_AUTO_SWITCH*/
50 #endif
51 
52 #if (RTL8197F_SUPPORT)
53 	/*#define PHYDM_TDMA_DIG_SUPPORT*/
54 #endif
55 
56 #if (RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT ||\
57 	RTL8197G_SUPPORT || RTL8723F_SUPPORT)
58 	#define PHYDM_TDMA_DIG_SUPPORT 1
59 	#ifdef PHYDM_TDMA_DIG_SUPPORT
60 	#define IS_USE_NEW_TDMA /*new tdma dig test*/
61 	#endif
62 #endif
63 
64 #if (RTL8197F_SUPPORT || RTL8822B_SUPPORT ||\
65 	RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT)
66 	#define PHYDM_LNA_SAT_CHK_SUPPORT
67 	#ifdef PHYDM_LNA_SAT_CHK_SUPPORT
68 
69 		#if (RTL8197F_SUPPORT)
70 		/*#define PHYDM_LNA_SAT_CHK_SUPPORT_TYPE1*/
71 		#endif
72 
73 		#if (RTL8822B_SUPPORT)
74 		/*#define PHYDM_LNA_SAT_CHK_TYPE2*/
75 		#endif
76 
77 		#if (RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT)
78 		#define PHYDM_LNA_SAT_CHK_TYPE1
79 		#endif
80 	#endif
81 #endif
82 
83 #if (RTL8822B_SUPPORT)
84 	/*#define PHYDM_POWER_TRAINING_SUPPORT*/
85 #endif
86 
87 #if (RTL8814B_SUPPORT || RTL8198F_SUPPORT || RTL8822C_SUPPORT ||\
88 	RTL8812F_SUPPORT || RTL8197G_SUPPORT || RTL8723F_SUPPORT)
89 	#define PHYDM_PMAC_TX_SETTING_SUPPORT
90 #endif
91 
92 #if (RTL8814B_SUPPORT || RTL8198F_SUPPORT || RTL8822C_SUPPORT ||\
93 	RTL8812F_SUPPORT || RTL8197G_SUPPORT || RTL8723F_SUPPORT)
94 	#define PHYDM_MP_SUPPORT
95 #endif
96 
97 #if (RTL8822B_SUPPORT)
98 	#define PHYDM_TXA_CALIBRATION
99 #endif
100 
101 #if (RTL8188E_SUPPORT || RTL8197F_SUPPORT || RTL8192F_SUPPORT)
102 	#define	PHYDM_PRIMARY_CCA
103 #endif
104 
105 #if (RTL8188F_SUPPORT || RTL8710B_SUPPORT || RTL8821C_SUPPORT ||\
106 	RTL8822B_SUPPORT || RTL8192F_SUPPORT)
107 	#define	PHYDM_DC_CANCELLATION
108 #endif
109 
110 #if (RTL8822B_SUPPORT || RTL8197F_SUPPORT || RTL8192F_SUPPORT)
111 	#define	CONFIG_ADAPTIVE_SOML
112 #endif
113 
114 #if (RTL8812A_SUPPORT || RTL8821A_SUPPORT || RTL8881A_SUPPORT ||\
115 	RTL8192E_SUPPORT || RTL8723B_SUPPORT)
116 	/*#define	CONFIG_RA_FW_DBG_CODE*/
117 #endif
118 
119 #if (RTL8192F_SUPPORT == 1)
120 	/*#define	CONFIG_8912F_SPUR_CALIBRATION*/
121 #endif
122 
123 #if (RTL8822B_SUPPORT == 1)
124 	/* #define	CONFIG_8822B_SPUR_CALIBRATION */
125 #endif
126 
127 #if (RTL8197G_SUPPORT)
128 	#define CONFIG_DIRECTIONAL_BF
129 #endif
130 
131 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT || RTL8814B_SUPPORT)
132 	#define CONFIG_DYNAMIC_TX_TWR
133 #endif
134 
135 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT)
136 	#define PHYDM_HW_IGI
137 #endif
138 
139 #if (RTL8197G_SUPPORT || RTL8812F_SUPPORT)
140 	#define CONFIG_DYNAMIC_TXCOLLISION_TH
141 #endif
142 
143 /*#define	CONFIG_PSD_TOOL*/
144 #define PHYDM_SUPPORT_CCKPD
145 #define PHYDM_SUPPORT_ADAPTIVITY
146 /*#define	CONFIG_PATH_DIVERSITY*/
147 /*#define	CONFIG_RA_DYNAMIC_RTY_LIMIT*/
148 /*#define	CONFIG_RA_DYNAMIC_RATE_ID*/
149 #define	CONFIG_BB_TXBF_API
150 /*#define	ODM_CONFIG_BT_COEXIST*/
151 #define	PHYDM_SUPPORT_RSSI_MONITOR
152 #if !defined(CONFIG_DISABLE_PHYDM_DEBUG_FUNCTION)
153 	#define CONFIG_PHYDM_DEBUG_FUNCTION
154 #endif
155 
156 /* [ Configure Antenna Diversity ] */
157 #if (RTL8188F_SUPPORT)
158 	#ifdef CONFIG_ANTENNA_DIVERSITY
159 		#define CONFIG_PHYDM_ANTENNA_DIVERSITY
160 		#define CONFIG_S0S1_SW_ANTENNA_DIVERSITY
161 	#endif
162 #endif
163 
164 #if defined(CONFIG_RTL_8881A_ANT_SWITCH) || defined(CONFIG_SLOT_0_ANT_SWITCH) || defined(CONFIG_SLOT_1_ANT_SWITCH) || defined(CONFIG_RTL_8197F_ANT_SWITCH) || defined(CONFIG_RTL_8197G_ANT_SWITCH)
165 	#define CONFIG_PHYDM_ANTENNA_DIVERSITY
166 	#define ODM_EVM_ENHANCE_ANTDIV
167 	/*#define SKIP_EVM_ANTDIV_TRAINING_PATCH*/
168 
169 	/*----------*/
170 	#ifdef CONFIG_NO_2G_DIVERSITY_8197F
171 		#define CONFIG_NO_2G_DIVERSITY
172 	#elif defined(CONFIG_2G_CGCS_RX_DIVERSITY_8197F)
173 		#define CONFIG_2G_CGCS_RX_DIVERSITY
174 	#elif defined(CONFIG_2G_CG_TRX_DIVERSITY_8197F)
175 		#define CONFIG_2G_CG_TRX_DIVERSITY
176 	#endif
177 
178 	/*----------*/
179 	#ifdef CONFIG_NO_2G_DIVERSITY_8197G
180 		#define CONFIG_NO_2G_DIVERSITY
181 	#elif defined(CONFIG_2G_CGCS_RX_DIVERSITY_8197G)
182 		#define CONFIG_2G_CGCS_RX_DIVERSITY
183 	#elif defined(CONFIG_2G_CG_TRX_DIVERSITY_8197G)
184 		#define CONFIG_2G_CG_TRX_DIVERSITY
185 	#endif
186 
187 	#if (!defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_2G5G_CG_TRX_DIVERSITY_8881A) && !defined(CONFIG_2G_CGCS_RX_DIVERSITY) && !defined(CONFIG_2G_CG_TRX_DIVERSITY) && !defined(CONFIG_2G_CG_SMART_ANT_DIVERSITY))
188 		#define CONFIG_NO_2G_DIVERSITY
189 	#endif
190 
191 	#ifdef CONFIG_NO_5G_DIVERSITY_8881A
192 		#define CONFIG_NO_5G_DIVERSITY
193 	#elif defined(CONFIG_5G_CGCS_RX_DIVERSITY_8881A)
194 		#define CONFIG_5G_CGCS_RX_DIVERSITY
195 	#elif defined(CONFIG_5G_CG_TRX_DIVERSITY_8881A)
196 		#define CONFIG_5G_CG_TRX_DIVERSITY
197 	#elif defined(CONFIG_2G5G_CG_TRX_DIVERSITY_8881A)
198 		#define CONFIG_2G5G_CG_TRX_DIVERSITY
199 	#endif
200 	#if (!defined(CONFIG_NO_5G_DIVERSITY) && !defined(CONFIG_5G_CGCS_RX_DIVERSITY) && !defined(CONFIG_5G_CG_TRX_DIVERSITY) && !defined(CONFIG_2G5G_CG_TRX_DIVERSITY) && !defined(CONFIG_5G_CG_SMART_ANT_DIVERSITY))
201 		#define CONFIG_NO_5G_DIVERSITY
202 	#endif
203 	/*----------*/
204 	#if (defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY))
205 		#define CONFIG_NOT_SUPPORT_ANTDIV
206 	#elif (!defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY))
207 		#define CONFIG_2G_SUPPORT_ANTDIV
208 	#elif (defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY))
209 		#define CONFIG_5G_SUPPORT_ANTDIV
210 	#elif ((!defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY)) || defined(CONFIG_2G5G_CG_TRX_DIVERSITY))
211 			#define CONFIG_2G5G_SUPPORT_ANTDIV
212 	#endif
213 		/*----------*/
214 #endif /*Antenna Diveristy*/
215 
216 /*[SmartAntenna]*/
217 /*#define	CONFIG_SMART_ANTENNA*/
218 #ifdef CONFIG_SMART_ANTENNA
219 	/*#define	CONFIG_CUMITEK_SMART_ANTENNA*/
220 #endif
221 #define CFG_DIG_DAMPING_CHK
222 /* --------------------------------------------------*/
223 #ifdef PHYDM_BEAMFORMING_SUPPORT
224 	#if (RTL8192F_SUPPORT || RTL8195B_SUPPORT || RTL8821C_SUPPORT ||\
225 	     RTL8822B_SUPPORT || RTL8197F_SUPPORT || RTL8198F_SUPPORT ||\
226 	     RTL8814B_SUPPORT || RTL8812F_SUPPORT)
227 		#define	DRIVER_BEAMFORMING_VERSION2
228 	#endif
229 #endif
230 
231 #endif
232