Path: blob/master/ALFA-W1F1/RTL8814AU/hal/phydm/halrf/halphyrf_ce.h
1308 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13* The full GNU General Public License is included in this distribution in the14* file called LICENSE.15*16* Contact Information:17* wlanfae <[email protected]>18* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,19* Hsinchu 300, Taiwan.20*21* Larry Finger <[email protected]>22*23*****************************************************************************/2425#ifndef __HALPHYRF_H__26#define __HALPHYRF_H__2728#include "halrf/halrf_kfree.h"29#if (RTL8814A_SUPPORT == 1)30#include "halrf/rtl8814a/halrf_iqk_8814a.h"31#endif3233#if (RTL8822B_SUPPORT == 1)34#include "halrf/rtl8822b/halrf_iqk_8822b.h"35#endif3637#if (RTL8821C_SUPPORT == 1)38#include "halrf/rtl8821c/halrf_iqk_8821c.h"39#endif4041#if (RTL8195B_SUPPORT == 1)42/* #include "halrf/rtl8195b/halrf.h" */43#include "halrf/rtl8195b/halrf_iqk_8195b.h"44#include "halrf/rtl8195b/halrf_txgapk_8195b.h"45#include "halrf/rtl8195b/halrf_dpk_8195b.h"46#endif4748#if (RTL8814B_SUPPORT == 1)49#include "halrf/rtl8814b/halrf_iqk_8814b.h"50#include "halrf/rtl8814b/halrf_dpk_8814b.h"51#endif5253#include "halrf/halrf_powertracking_ce.h"5455enum spur_cal_method {56PLL_RESET,57AFE_PHASE_SEL58};5960enum pwrtrack_method {61BBSWING,62TXAGC,63MIX_MODE,64TSSI_MODE,65MIX_2G_TSSI_5G_MODE,66MIX_5G_TSSI_2G_MODE,67CLEAN_MODE68};6970typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);71typedef void (*func_iqk)(void *, u8, u8, u8);72typedef void (*func_lck)(void *);73typedef void (*func_tssi_dck)(void *, u8);74typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);75typedef void (*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);76typedef void (*func_swing_xtal)(void *, s8 **, s8 **);77typedef void (*func_set_xtal)(void *);7879struct txpwrtrack_cfg {80u8 swing_table_size_cck;81u8 swing_table_size_ofdm;82u8 threshold_iqk;83u8 threshold_dpk;84u8 average_thermal_num;85u8 rf_path_count;86u32 thermal_reg_addr;87func_set_pwr odm_tx_pwr_track_set_pwr;88func_iqk do_iqk;89func_lck phy_lc_calibrate;90func_tssi_dck do_tssi_dck;91func_swing get_delta_swing_table;92func_swing8814only get_delta_swing_table8814only;93func_swing_xtal get_delta_swing_xtal_table;94func_set_xtal odm_txxtaltrack_set_xtal;95};9697void configure_txpower_track(void *dm_void, struct txpwrtrack_cfg *config);9899void odm_clear_txpowertracking_state(void *dm_void);100101#if (DM_ODM_SUPPORT_TYPE & ODM_AP)102void odm_txpowertracking_callback_thermal_meter(void *dm_void);103#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)104void odm_txpowertracking_callback_thermal_meter(void *dm);105#else106void odm_txpowertracking_callback_thermal_meter(void *adapter);107#endif108109#if (RTL8822C_SUPPORT == 1 || RTL8814B_SUPPORT == 1)110void odm_txpowertracking_new_callback_thermal_meter(void *dm_void);111#endif112113#define ODM_TARGET_CHNL_NUM_2G_5G 59114115void odm_reset_iqk_result(void *dm_void);116u8 odm_get_right_chnl_place_for_iqk(u8 chnl);117118void phydm_rf_init(void *dm_void);119void phydm_rf_watchdog(void *dm_void);120121#endif /*__HALPHYRF_H__*/122123124