net: wireless: rockchip: add rtl8822be pcie wifi driver
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8822be / hal / phydm / phydm_precomp.h
diff --git a/drivers/net/wireless/rockchip_wlan/rtl8822be/hal/phydm/phydm_precomp.h b/drivers/net/wireless/rockchip_wlan/rtl8822be/hal/phydm/phydm_precomp.h
new file mode 100644 (file)
index 0000000..6dab342
--- /dev/null
@@ -0,0 +1,348 @@
+/******************************************************************************\r
+ *\r
+ * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.\r
+ *                                        \r
+ * This program is free software; you can redistribute it and/or modify it\r
+ * under the terms of version 2 of the GNU General Public License as\r
+ * published by the Free Software Foundation.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, but WITHOUT\r
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
+ * more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License along with\r
+ * this program; if not, write to the Free Software Foundation, Inc.,\r
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA\r
+ *\r
+ *\r
+ ******************************************************************************/\r
+\r
+#ifndef        __ODM_PRECOMP_H__\r
+#define __ODM_PRECOMP_H__\r
+\r
+#include "phydm_types.h"\r
+\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+#include "Precomp.h"           // We need to include mp_precomp.h due to batch file setting.\r
+#else\r
+#define                TEST_FALG___            1\r
+#endif\r
+\r
+//2 Config Flags and Structs - defined by each ODM Type\r
+\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+       #include "../8192cd_cfg.h"\r
+       #include "../odm_inc.h"\r
+\r
+       #include "../8192cd.h"\r
+       #include "../8192cd_util.h"\r
+       #ifdef _BIG_ENDIAN_\r
+       #define ODM_ENDIAN_TYPE                         ODM_ENDIAN_BIG\r
+       #else\r
+       #define ODM_ENDIAN_TYPE                         ODM_ENDIAN_LITTLE\r
+       #endif\r
+\r
+       #ifdef AP_BUILD_WORKAROUND\r
+       #include "../8192cd_headers.h"\r
+       #include "../8192cd_debug.h"            \r
+       #endif\r
+\r
+#elif (DM_ODM_SUPPORT_TYPE ==ODM_CE)\r
+       #define __PACK\r
+       #define __WLAN_ATTRIB_PACK__\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+       #include "mp_precomp.h"\r
+       #define ODM_ENDIAN_TYPE                         ODM_ENDIAN_LITTLE\r
+       #define __PACK\r
+       #define __WLAN_ATTRIB_PACK__\r
+#endif\r
+\r
+//2 OutSrc Header Files\r
\r
+#include "phydm.h" \r
+#include "phydm_hwconfig.h"\r
+#include "phydm_debug.h"\r
+#include "phydm_regdefine11ac.h"\r
+#include "phydm_regdefine11n.h"\r
+#include "phydm_interface.h"\r
+#include "phydm_reg.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+#include "phydm_adc_sampling.h"\r
+#endif\r
+\r
+\r
+#if (DM_ODM_SUPPORT_TYPE & ODM_CE)\r
+VOID\r
+PHY_SetTxPowerLimit(\r
+       IN      PDM_ODM_T       pDM_Odm,\r
+       IN      u8      *Regulation,\r
+       IN      u8      *Band,\r
+       IN      u8      *Bandwidth,\r
+       IN      u8      *RateSection,\r
+       IN      u8      *RfPath,\r
+       IN      u8      *Channel,\r
+       IN      u8      *PowerLimit\r
+);\r
+\r
+#endif\r
+\r
+#if (DM_ODM_SUPPORT_TYPE & ODM_AP)\r
+#define RTL8703B_SUPPORT               0\r
+#define RTL8188F_SUPPORT               0\r
+#define RTL8723D_SUPPORT               0\r
+#endif\r
+\r
+#if RTL8188E_SUPPORT == 1\r
+#define RTL8188E_T_SUPPORT 1\r
+#ifdef CONFIG_SFW_SUPPORTED\r
+#define RTL8188E_S_SUPPORT 1\r
+#else\r
+#define RTL8188E_S_SUPPORT 0\r
+#endif\r
+#endif\r
+\r
+#if (RTL8188E_SUPPORT==1) \r
+#include "rtl8188e/hal8188erateadaptive.h"//for  RA,Power training\r
+#include "rtl8188e/halhwimg8188e_mac.h"\r
+#include "rtl8188e/halhwimg8188e_rf.h"\r
+#include "rtl8188e/halhwimg8188e_bb.h"\r
+#include "rtl8188e/halhwimg8188e_t_fw.h"\r
+#include "rtl8188e/halhwimg8188e_s_fw.h"\r
+#include "rtl8188e/phydm_regconfig8188e.h"\r
+#include "rtl8188e/phydm_rtl8188e.h"\r
+#include "rtl8188e/hal8188ereg.h"\r
+#include "rtl8188e/version_rtl8188e.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8188e_hal.h" \r
+       #include "rtl8188e/halphyrf_8188e_ce.h"\r
+#endif\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+       #include "rtl8188e/halphyrf_8188e_win.h"\r
+#endif\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+       #include "rtl8188e/halphyrf_8188e_ap.h"\r
+#endif\r
+#endif  //88E END\r
+\r
+#if (RTL8192E_SUPPORT==1) \r
+\r
+       #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+               #include "rtl8192e/halphyrf_8192e_win.h" /*FOR_8192E_IQK*/\r
+       #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+               #include "rtl8192e/halphyrf_8192e_ap.h" /*FOR_8192E_IQK*/\r
+       #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+               #include "rtl8192e/halphyrf_8192e_ce.h" /*FOR_8192E_IQK*/\r
+       #endif\r
+       \r
+#include "rtl8192e/phydm_rtl8192e.h" //FOR_8192E_IQK\r
+#include "rtl8192e/version_rtl8192e.h"\r
+#if (DM_ODM_SUPPORT_TYPE != ODM_AP)\r
+       #include "rtl8192e/halhwimg8192e_bb.h"\r
+       #include "rtl8192e/halhwimg8192e_mac.h"\r
+       #include "rtl8192e/halhwimg8192e_rf.h"\r
+       #include "rtl8192e/phydm_regconfig8192e.h"\r
+       #include "rtl8192e/halhwimg8192e_fw.h"\r
+       #include "rtl8192e/hal8192ereg.h"\r
+#endif\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8192e_hal.h"\r
+#endif\r
+#endif  //92E END\r
+\r
+#if (RTL8812A_SUPPORT==1)\r
+\r
+    #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+        #include "rtl8812a/halphyrf_8812a_win.h"\r
+    #elif (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+        #include "rtl8812a/halphyrf_8812a_ap.h"\r
+    #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+        #include "rtl8812a/halphyrf_8812a_ce.h"\r
+    #endif\r
+\r
+    //#include "rtl8812a/HalPhyRf_8812A.h" //FOR_8812_IQK\r
+    #if (DM_ODM_SUPPORT_TYPE != ODM_AP)\r
+        #include "rtl8812a/halhwimg8812a_bb.h"\r
+        #include "rtl8812a/halhwimg8812a_mac.h"\r
+        #include "rtl8812a/halhwimg8812a_rf.h"\r
+        #include "rtl8812a/phydm_regconfig8812a.h"\r
+        #include "rtl8812a/halhwimg8812a_fw.h"\r
+        #include "rtl8812a/phydm_rtl8812a.h"\r
+    #endif\r
+\r
+    #if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+           #include "rtl8812a_hal.h"\r
+    #endif\r
+       #include "rtl8812a/version_rtl8812a.h"\r
+\r
+#endif //8812 END\r
+\r
+#if (RTL8814A_SUPPORT==1)\r
+\r
+#include "rtl8814a/halhwimg8814a_mac.h"\r
+#include "rtl8814a/halhwimg8814a_rf.h"\r
+#include "rtl8814a/halhwimg8814a_bb.h"\r
+#include "rtl8814a/version_rtl8814a.h"\r
+#include "rtl8814a/phydm_rtl8814a.h"\r
+#if (DM_ODM_SUPPORT_TYPE != ODM_AP)\r
+       #include "rtl8814a/halhwimg8814a_fw.h"\r
+#endif\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+       #include "rtl8814a/halphyrf_8814a_win.h"\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8814a/halphyrf_8814a_ce.h"\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+       #include "rtl8814a/halphyrf_8814a_ap.h"\r
+#endif\r
+       #include "rtl8814a/phydm_regconfig8814a.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8814a_hal.h"\r
+       #include "rtl8814a/phydm_iqk_8814a.h"\r
+#endif\r
+#endif //8814 END\r
+\r
+#if (RTL8881A_SUPPORT==1)//FOR_8881_IQK\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+#include "rtl8821a/phydm_iqk_8821a_win.h"\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+#include "rtl8821a/phydm_iqk_8821a_ce.h"\r
+#else\r
+#include "rtl8821a/phydm_iqk_8821a_ap.h"\r
+#endif\r
+//#include "rtl8881a/HalHWImg8881A_BB.h"\r
+//#include "rtl8881a/HalHWImg8881A_MAC.h"\r
+//#include "rtl8881a/HalHWImg8881A_RF.h"\r
+//#include "rtl8881a/odm_RegConfig8881A.h"\r
+#endif\r
+\r
+#if (RTL8723B_SUPPORT==1) \r
+#include "rtl8723b/halhwimg8723b_mac.h"\r
+#include "rtl8723b/halhwimg8723b_rf.h"\r
+#include "rtl8723b/halhwimg8723b_bb.h"\r
+#include "rtl8723b/halhwimg8723b_fw.h"\r
+#include "rtl8723b/phydm_regconfig8723b.h"\r
+#include "rtl8723b/phydm_rtl8723b.h"\r
+#include "rtl8723b/hal8723breg.h"\r
+#include "rtl8723b/version_rtl8723b.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+    #include "rtl8723b/halphyrf_8723b_win.h"\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+    #include "rtl8723b/halphyrf_8723b_ce.h"\r
+    #include "rtl8723b/halhwimg8723b_mp.h"\r
+    #include "rtl8723b_hal.h"\r
+#else\r
+     #include "rtl8723b/halphyrf_8723b_ap.h"\r
+#endif\r
+#endif\r
+\r
+#if (RTL8821A_SUPPORT==1) \r
+#include "rtl8821a/halhwimg8821a_mac.h"\r
+#include "rtl8821a/halhwimg8821a_rf.h"\r
+#include "rtl8821a/halhwimg8821a_bb.h"\r
+#include "rtl8821a/halhwimg8821a_fw.h"\r
+#include "rtl8821a/phydm_regconfig8821a.h"\r
+#include "rtl8821a/phydm_rtl8821a.h"\r
+#include "rtl8821a/version_rtl8821a.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+       #include "rtl8821a/halphyrf_8821a_win.h"\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8821a/halphyrf_8821a_ce.h"\r
+       #include "rtl8821a/phydm_iqk_8821a_ce.h"/*for IQK*/\r
+       #include "rtl8812a/halphyrf_8812a_ce.h"/*for IQK,LCK,Power-tracking*/\r
+       #include "rtl8812a_hal.h"\r
+#else\r
+#endif\r
+#endif\r
+\r
+#if (RTL8822B_SUPPORT==1) \r
+#include "rtl8822b/halhwimg8822b_mac.h"\r
+#include "rtl8822b/halhwimg8822b_rf.h"\r
+#include "rtl8822b/halhwimg8822b_bb.h"\r
+#include "rtl8822b/halhwimg8822b_fw.h"\r
+#include "rtl8822b/phydm_regconfig8822b.h"\r
+#include "rtl8822b/halphyrf_8822b.h"\r
+#include "rtl8822b/phydm_rtl8822b.h"\r
+#include "rtl8822b/phydm_hal_api8822b.h"\r
+#include "rtl8822b/version_rtl8822b.h"\r
+\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+#include <hal_data.h>          /* struct HAL_DATA_TYPE */\r
+#include <rtl8822b_hal.h>      /* Rx_Smooth_Factor, reg definition and etc.*/\r
+#elif (DM_ODM_SUPPORT_TYPE == ODM_AP)\r
+#endif\r
+\r
+#endif\r
+\r
+#if (RTL8703B_SUPPORT==1) \r
+#include "rtl8703b/phydm_regconfig8703b.h"\r
+#include "rtl8703b/halhwimg8703b_mac.h"\r
+#include "rtl8703b/halhwimg8703b_rf.h"\r
+#include "rtl8703b/halhwimg8703b_bb.h"\r
+#include "rtl8703b/halhwimg8703b_fw.h"\r
+#include "rtl8703b/halphyrf_8703b.h"\r
+#include "rtl8703b/version_rtl8703b.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+#include "rtl8703b_hal.h"\r
+#endif\r
+#endif\r
+\r
+#if (RTL8188F_SUPPORT == 1) \r
+#include "rtl8188f/halhwimg8188f_mac.h"\r
+#include "rtl8188f/halhwimg8188f_rf.h"\r
+#include "rtl8188f/halhwimg8188f_bb.h"\r
+#include "rtl8188f/halhwimg8188f_fw.h"\r
+#include "rtl8188f/hal8188freg.h"\r
+#include "rtl8188f/phydm_rtl8188f.h"\r
+#include "rtl8188f/phydm_regconfig8188f.h"\r
+#include "rtl8188f/halphyrf_8188f.h" /* for IQK,LCK,Power-tracking */\r
+#include "rtl8188f/version_rtl8188f.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+#include "rtl8188f_hal.h"\r
+#endif\r
+#endif\r
+\r
+#if (RTL8723D_SUPPORT==1)\r
+  #if (DM_ODM_SUPPORT_TYPE != ODM_AP)\r
+       \r
+       #include "rtl8723d/halhwimg8723d_bb.h"\r
+       #include "rtl8723d/halhwimg8723d_mac.h"\r
+       #include "rtl8723d/halhwimg8723d_rf.h"\r
+       #include "rtl8723d/phydm_regconfig8723d.h"\r
+       #include "rtl8723d/halhwimg8723d_fw.h"\r
+       #include "rtl8723d/hal8723dreg.h"\r
+       #include "rtl8723d/phydm_rtl8723d.h"\r
+       #include "rtl8723d/halphyrf_8723d.h"\r
+       #include "rtl8723d/version_rtl8723d.h"\r
+  #endif\r
+  #if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8723d_hal.h"\r
+  #endif\r
+#endif //8723D End\r
+\r
+#if (RTL8197F_SUPPORT == 1) \r
+#include "rtl8197f/halhwimg8197f_mac.h"\r
+#include "rtl8197f/halhwimg8197f_rf.h"\r
+#include "rtl8197f/halhwimg8197f_bb.h"\r
+#include "rtl8197f/phydm_hal_api8197f.h"\r
+#include "rtl8197f/version_rtl8197f.h"\r
+#include "rtl8197f/phydm_rtl8197f.h"\r
+#include "rtl8197f/phydm_regconfig8197f.h"\r
+#include "rtl8197f/halphyrf_8197f.h"\r
+#include "rtl8197f/phydm_iqk_8197f.h"\r
+#endif\r
+\r
+#if (RTL8821C_SUPPORT==1)\r
+#include "rtl8821c/phydm_hal_api8821c.h"\r
+#include "rtl8821c/halhwimg8821c_testchip_mac.h"\r
+#include "rtl8821c/halhwimg8821c_testchip_rf.h"\r
+#include "rtl8821c/halhwimg8821c_testchip_bb.h"\r
+#include "rtl8821c/phydm_regconfig8821c.h"\r
+#include "rtl8821c/version_rtl8821c.h"\r
+#if (DM_ODM_SUPPORT_TYPE == ODM_CE)\r
+       #include "rtl8821c_hal.h"\r
+#endif\r
+#endif\r
+\r
+#endif // __ODM_PRECOMP_H__\r
+\r