1 /******************************************************************************
3 * Copyright(c) 2007 - 2017 Realtek Corporation.
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 *****************************************************************************/
16 #ifndef __HALPHYRF_H__
17 #define __HALPHYRF_H__
19 #include "halrf/halrf_powertracking_ap.h"
20 #include "halrf/halrf_kfree.h"
22 #if (RTL8814A_SUPPORT == 1)
23 #include "halrf/rtl8814a/halrf_iqk_8814a.h"
26 #if (RTL8822B_SUPPORT == 1)
27 #include "halrf/rtl8822b/halrf_iqk_8822b.h"
30 #if (RTL8821C_SUPPORT == 1)
31 #include "halrf/rtl8821c/halrf_iqk_8821c.h"
34 #if (RTL8195B_SUPPORT == 1)
35 // #include "halrf/rtl8195b/halrf.h"
36 #include "halrf/rtl8195b/halrf_iqk_8195b.h"
37 #include "halrf/rtl8195b/halrf_txgapk_8195b.h"
38 #include "halrf/rtl8195b/halrf_dpk_8195b.h"
40 #if (RTL8198F_SUPPORT == 1)
41 #include "halrf/rtl8198f/halrf_iqk_8198f.h"
42 #include "halrf/rtl8198f/halrf_dpk_8198f.h"
45 enum pwrtrack_method {
52 typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
53 typedef void(*func_iqk)(void *, u8, u8, u8);
54 typedef void (*func_lck)(void *);
55 /* refine by YuChen for 8814A */
56 typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
57 typedef void (*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
58 typedef void (*func_all_swing)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);
59 typedef void (*func_all_swing_ex)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);
61 struct txpwrtrack_cfg {
62 u8 swing_table_size_cck;
63 u8 swing_table_size_ofdm;
66 u8 average_thermal_num;
69 func_set_pwr odm_tx_pwr_track_set_pwr;
71 func_lck phy_lc_calibrate;
72 func_swing get_delta_swing_table;
73 func_swing8814only get_delta_swing_table8814only;
74 func_all_swing get_delta_all_swing_table;
75 func_all_swing_ex get_delta_all_swing_table_ex;
79 configure_txpower_track(
81 struct txpwrtrack_cfg *config
86 odm_txpowertracking_callback_thermal_meter(
90 #if (RTL8192E_SUPPORT == 1)
92 odm_txpowertracking_callback_thermal_meter_92e(
97 #if (RTL8814A_SUPPORT == 1)
99 odm_txpowertracking_callback_thermal_meter_jaguar_series2(
103 #elif ODM_IC_11AC_SERIES_SUPPORT
105 odm_txpowertracking_callback_thermal_meter_jaguar_series(
109 #elif (RTL8197F_SUPPORT == 1 || RTL8822B_SUPPORT == 1)
111 odm_txpowertracking_callback_thermal_meter_jaguar_series3(
117 #define IS_CCK_RATE(_rate) (ODM_MGN_1M == _rate || _rate == ODM_MGN_2M || _rate == ODM_MGN_5_5M || _rate == ODM_MGN_11M)
119 #define ODM_TARGET_CHNL_NUM_2G_5G 59
123 odm_reset_iqk_result(
127 odm_get_right_chnl_place_for_iqk(
131 void phydm_rf_init(void *dm_void);
132 void phydm_rf_watchdog(void *dm_void);
134 #endif /*#ifndef __HALPHYRF_H__*/