net: wireless: rockchip: add rtl8822be pcie wifi driver
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8822be / hal / phydm / phydm_features.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 __PHYDM_FEATURES_H__\r
22 #define __PHYDM_FEATURES\r
23 \r
24 #if ((RTL8814A_SUPPORT == 1) || (RTL8821C_SUPPORT == 1) || (RTL8822B_SUPPORT == 1) || (RTL8197F_SUPPORT == 1))\r
25         #if ((DM_ODM_SUPPORT_TYPE == ODM_WIN) || (DM_ODM_SUPPORT_TYPE == ODM_AP))\r
26                 #define PHYDM_LA_MODE_SUPPORT                   1\r
27         #endif\r
28 #else\r
29         #define PHYDM_LA_MODE_SUPPORT                   0\r
30 #endif\r
31 \r
32 #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
33         /*Antenna Diversity*/\r
34         #define CONFIG_PHYDM_ANTENNA_DIVERSITY\r
35         #ifdef CONFIG_PHYDM_ANTENNA_DIVERSITY\r
36         \r
37                 #if (RTL8723B_SUPPORT == 1) || (RTL8821A_SUPPORT == 1) || (RTL8188F_SUPPORT == 1)\r
38                 #define CONFIG_S0S1_SW_ANTENNA_DIVERSITY\r
39                 #endif\r
40                 \r
41                 #if (RTL8821A_SUPPORT == 1)\r
42                 /*#define CONFIG_HL_SMART_ANTENNA_TYPE1*/\r
43                 #define CONFIG_FAT_PATCH\r
44                 #endif\r
45         #endif\r
46         \r
47         #define RA_MASK_PHYDMLIZE_WIN   1\r
48         /*#define CONFIG_PATH_DIVERSITY*/\r
49         /*#define CONFIG_RA_DYNAMIC_RTY_LIMIT*/\r
50         #define CONFIG_ANT_DETECTION\r
51         /*#define CONFIG_RA_DBG_CMD*/\r
52         #define CONFIG_RA_FW_DBG_CODE   1\r
53         /*#define CONFIG_PHYDM_RX_SNIFFER_PARSING*/\r
54         #define CONFIG_BB_TXBF_API\r
55 #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
56 \r
57         #define RA_MASK_PHYDMLIZE_AP    1\r
58 \r
59         /* #define CONFIG_RA_DBG_CMD*/\r
60         #define CONFIG_RA_FW_DBG_CODE   0\r
61         \r
62         /*#define CONFIG_PATH_DIVERSITY*/\r
63         /*#define CONFIG_RA_DYNAMIC_RTY_LIMIT*/\r
64         #define CONFIG_RA_DYNAMIC_RATE_ID\r
65         #define CONFIG_BB_TXBF_API      \r
66         /* [ Configure Antenna Diversity ] */\r
67         #if defined(CONFIG_RTL_8881A_ANT_SWITCH) || defined(CONFIG_SLOT_0_ANT_SWITCH) || defined(CONFIG_SLOT_1_ANT_SWITCH)\r
68                 #define CONFIG_PHYDM_ANTENNA_DIVERSITY \r
69                 #define ODM_EVM_ENHANCE_ANTDIV\r
70 \r
71                 /*----------*/\r
72                 \r
73                 #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))\r
74                         #define CONFIG_NO_2G_DIVERSITY\r
75                 #endif\r
76 \r
77                 #ifdef CONFIG_NO_5G_DIVERSITY_8881A\r
78                         #define CONFIG_NO_5G_DIVERSITY\r
79                 #elif defined(CONFIG_5G_CGCS_RX_DIVERSITY_8881A)\r
80                         #define CONFIG_5G_CGCS_RX_DIVERSITY\r
81                 #elif defined(CONFIG_5G_CG_TRX_DIVERSITY_8881A)\r
82                         #define CONFIG_5G_CG_TRX_DIVERSITY\r
83                 #elif defined(CONFIG_2G5G_CG_TRX_DIVERSITY_8881A)\r
84                         #define CONFIG_2G5G_CG_TRX_DIVERSITY\r
85                 #endif\r
86                 #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))\r
87                         #define CONFIG_NO_5G_DIVERSITY\r
88                 #endif  \r
89                  /*----------*/\r
90                 #if (defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY))\r
91                         #define CONFIG_NOT_SUPPORT_ANTDIV \r
92                 #elif (!defined(CONFIG_NO_2G_DIVERSITY) && defined(CONFIG_NO_5G_DIVERSITY))\r
93                         #define CONFIG_2G_SUPPORT_ANTDIV\r
94                 #elif (defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY))\r
95                         #define CONFIG_5G_SUPPORT_ANTDIV\r
96                 #elif ((!defined(CONFIG_NO_2G_DIVERSITY) && !defined(CONFIG_NO_5G_DIVERSITY)) || defined(CONFIG_2G5G_CG_TRX_DIVERSITY))\r
97                         #define CONFIG_2G5G_SUPPORT_ANTDIV \r
98                 #endif\r
99                  /*----------*/\r
100         #endif\r
101 \r
102 #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
103 \r
104         #define RA_MASK_PHYDMLIZE_CE    1\r
105 \r
106         /*Antenna Diversity*/\r
107         #ifdef CONFIG_ANTENNA_DIVERSITY\r
108                 #define CONFIG_PHYDM_ANTENNA_DIVERSITY\r
109                 \r
110                 #ifdef CONFIG_PHYDM_ANTENNA_DIVERSITY\r
111                 \r
112                         #if (RTL8723B_SUPPORT == 1) || (RTL8821A_SUPPORT == 1) || (RTL8188F_SUPPORT == 1)\r
113                         #define CONFIG_S0S1_SW_ANTENNA_DIVERSITY\r
114                         #endif\r
115                         \r
116                         #if (RTL8821A_SUPPORT == 1)\r
117                         /*#define CONFIG_HL_SMART_ANTENNA_TYPE1*/\r
118                         #endif\r
119                 #endif\r
120         #endif\r
121         \r
122         #ifdef CONFIG_DFS_MASTER\r
123                 #define CONFIG_PHYDM_DFS_MASTER\r
124         #endif\r
125 \r
126         /*#define CONFIG_RA_DBG_CMD*/\r
127         #define CONFIG_RA_FW_DBG_CODE   0\r
128         /*#define CONFIG_ANT_DETECTION*/\r
129         /*#define CONFIG_PATH_DIVERSITY*/\r
130         /*#define CONFIG_RA_DYNAMIC_RTY_LIMIT*/\r
131         #define CONFIG_BB_TXBF_API\r
132         #ifdef CONFIG_BT_COEXIST\r
133                 #define BT_SUPPORT      1\r
134         #endif\r
135 \r
136 \r
137 #endif\r
138 \r
139 \r
140 #endif\r