1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
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
19 ******************************************************************************/
21 #ifndef __HAL_PHY_RF_H__
22 #define __HAL_PHY_RF_H__
24 #include "phydm_kfree.h"
25 #if (RTL8814A_SUPPORT == 1)
26 #include "rtl8814a/phydm_iqk_8814a.h"
29 #if (RTL8822B_SUPPORT == 1)
30 #include "rtl8822b/phydm_iqk_8822b.h"
32 #include "phydm_powertracking_win.h"
34 typedef enum _SPUR_CAL_METHOD {
39 typedef enum _PWRTRACK_CONTROL_METHOD {
46 typedef VOID (*FuncSetPwr)(PDM_ODM_T, PWRTRACK_METHOD, u1Byte, u1Byte);
47 typedef VOID(*FuncIQK)(PVOID, u1Byte, u1Byte, u1Byte);
48 typedef VOID (*FuncLCK)(PDM_ODM_T);
49 //refine by YuChen for 8814A
50 typedef VOID (*FuncSwing)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
51 typedef VOID (*FuncSwing8814only)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
53 typedef struct _TXPWRTRACK_CFG {
54 u1Byte SwingTableSize_CCK;
55 u1Byte SwingTableSize_OFDM;
58 u1Byte AverageThermalNum;
60 u4Byte ThermalRegAddr;
61 FuncSetPwr ODM_TxPwrTrackSetPwr;
63 FuncLCK PHY_LCCalibrate;
64 FuncSwing GetDeltaSwingTable;
65 FuncSwing8814only GetDeltaSwingTable8814only;
66 } TXPWRTRACK_CFG, *PTXPWRTRACK_CFG;
69 ConfigureTxpowerTrack(
71 OUT PTXPWRTRACK_CFG pConfig
76 ODM_ClearTxPowerTrackingState(
81 ODM_TXPowerTrackingCallback_ThermalMeter(
82 #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
91 #define ODM_TARGET_CHNL_NUM_2G_5G 59
99 ODM_GetRightChnlPlaceforIQK(
103 VOID odm_IQCalibrate(IN PDM_ODM_T pDM_Odm);
104 VOID phydm_rf_init( IN PDM_ODM_T pDM_Odm);
105 VOID phydm_rf_watchdog( IN PDM_ODM_T pDM_Odm);
107 #endif // #ifndef __HAL_PHY_RF_H__