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"
31 #include "../mac/Halmac_type.h"
33 #include "phydm_powertracking_win.h"
35 #if (RTL8821C_SUPPORT == 1)
36 #include "rtl8821c/phydm_iqk_8821c.h"
39 enum spur_cal_method {
44 enum pwrtrack_method {
53 typedef void(*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
54 typedef void(*func_iqk)(void *, u8, u8, u8);
55 typedef void(*func_lck)(void *);
56 typedef void(*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
57 typedef void(*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
58 typedef void (*func_swing_xtal)(void *, s8 **, s8 **);
59 typedef void (*func_set_xtal)(void *);
60 typedef void(*func_all_swing)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);
62 struct _TXPWRTRACK_CFG {
63 u8 swing_table_size_cck;
64 u8 swing_table_size_ofdm;
67 u8 average_thermal_num;
70 func_set_pwr odm_tx_pwr_track_set_pwr;
72 func_lck phy_lc_calibrate;
73 func_swing get_delta_swing_table;
74 func_swing8814only get_delta_swing_table8814only;
75 func_swing_xtal get_delta_swing_xtal_table;
76 func_set_xtal odm_txxtaltrack_set_xtal;
77 func_all_swing get_delta_all_swing_table;
81 configure_txpower_track(
82 struct PHY_DM_STRUCT *p_dm_odm,
83 struct _TXPWRTRACK_CFG *p_config
88 odm_clear_txpowertracking_state(
89 struct PHY_DM_STRUCT *p_dm_odm
93 odm_txpowertracking_callback_thermal_meter(
94 #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
95 struct PHY_DM_STRUCT *p_dm_odm
97 struct _ADAPTER *adapter
103 #define ODM_TARGET_CHNL_NUM_2G_5G 59
107 odm_reset_iqk_result(
108 struct PHY_DM_STRUCT *p_dm_odm
111 odm_get_right_chnl_place_for_iqk(
115 void odm_iq_calibrate(struct PHY_DM_STRUCT *p_dm_odm);
116 void phydm_rf_init(struct PHY_DM_STRUCT *p_dm_odm);
117 void phydm_rf_watchdog(struct PHY_DM_STRUCT *p_dm_odm);
119 #endif /* #ifndef __HAL_PHY_RF_H__ */