Path: blob/master/ALFA-W1F1/RTL8814AU/hal/phydm/halrf/halphyrf_win.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*****************************************************************************/1415#ifndef __HALPHYRF_H__16#define __HALPHYRF_H__1718#if (RTL8814A_SUPPORT == 1)19#include "halrf/rtl8814a/halrf_iqk_8814a.h"20#endif2122#if (RTL8822B_SUPPORT == 1)23#include "halrf/rtl8822b/halrf_iqk_8822b.h"24#include "../mac/Halmac_type.h"25#endif26#include "halrf/halrf_powertracking_win.h"27#include "halrf/halrf_kfree.h"28#include "halrf/halrf_txgapcal.h"29#if (RTL8821C_SUPPORT == 1)30#include "halrf/rtl8821c/halrf_iqk_8821c.h"31#endif3233#if (RTL8195B_SUPPORT == 1)34// #include "halrf/rtl8195b/halrf.h"35#include "halrf/rtl8195b/halrf_iqk_8195b.h"36#include "halrf/rtl8195b/halrf_txgapk_8195b.h"37#include "halrf/rtl8195b/halrf_dpk_8195b.h"38#endif3940#if (RTL8814B_SUPPORT == 1)41#include "halrf/rtl8814b/halrf_iqk_8814b.h"42#endif4344enum spur_cal_method {45PLL_RESET,46AFE_PHASE_SEL47};4849enum pwrtrack_method {50BBSWING,51TXAGC,52MIX_MODE,53TSSI_MODE,54MIX_2G_TSSI_5G_MODE,55MIX_5G_TSSI_2G_MODE,56CLEAN_MODE57};5859typedef void(*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);60typedef void(*func_iqk)(void *, u8, u8, u8);61typedef void(*func_lck)(void *);62typedef void(*func_tssi_dck)(void *, u8);63typedef void(*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);64typedef void(*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);65typedef void (*func_swing_xtal)(void *, s8 **, s8 **);66typedef void (*func_set_xtal)(void *);67typedef void(*func_all_swing)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);6869struct txpwrtrack_cfg {70u8 swing_table_size_cck;71u8 swing_table_size_ofdm;72u8 threshold_iqk;73u8 threshold_dpk;74u8 average_thermal_num;75u8 rf_path_count;76u32 thermal_reg_addr;77func_set_pwr odm_tx_pwr_track_set_pwr;78func_iqk do_iqk;79func_lck phy_lc_calibrate;80func_tssi_dck do_tssi_dck;81func_swing get_delta_swing_table;82func_swing8814only get_delta_swing_table8814only;83func_swing_xtal get_delta_swing_xtal_table;84func_set_xtal odm_txxtaltrack_set_xtal;85func_all_swing get_delta_all_swing_table;86};8788void89configure_txpower_track(90struct dm_struct *dm,91struct txpwrtrack_cfg *config92);939495void96odm_clear_txpowertracking_state(97struct dm_struct *dm98);99100void101odm_txpowertracking_callback_thermal_meter(102#if (DM_ODM_SUPPORT_TYPE & ODM_AP)103struct dm_struct *dm104#else105void *adapter106#endif107);108109#if (RTL8822C_SUPPORT == 1 || RTL8814B_SUPPORT == 1)110void111odm_txpowertracking_new_callback_thermal_meter(void *dm_void);112#endif113114#define ODM_TARGET_CHNL_NUM_2G_5G 59115116117void118odm_reset_iqk_result(119struct dm_struct *dm120);121u8122odm_get_right_chnl_place_for_iqk(123u8 chnl124);125126void odm_iq_calibrate(struct dm_struct *dm);127void phydm_rf_init(struct dm_struct *dm);128void phydm_rf_watchdog(struct dm_struct *dm);129130#endif /*#ifndef __HALPHYRF_H__*/131132133