Path: blob/master/ALFA-W1F1/RTL8814AU/hal/phydm/phydm_cfotracking.h
1307 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 __PHYDMCFOTRACK_H__26#define __PHYDMCFOTRACK_H__2728/* 2019.03.28 fix 8197G crystal_cap register address*/29#define CFO_TRACKING_VERSION "2.4"3031#define CFO_TRK_ENABLE_TH 20 /* @kHz enable CFO_Track threshold*/32#define CFO_TRK_STOP_TH 10 /* @kHz disable CFO_Track threshold*/33#define CFO_TH_ATC 80 /* @kHz */3435struct phydm_cfo_track_struct {36boolean is_atc_status;37boolean is_adjust; /*@already modify crystal cap*/38u8 crystal_cap;39u8 crystal_cap_default;40u8 def_x_cap;41s32 CFO_tail[4];42u32 CFO_cnt[4];43s32 CFO_ave_pre;44u32 packet_count;45u32 packet_count_pre;46};4748struct phydm_cfo_rpt {49s32 cfo_rpt_s[PHYDM_MAX_RF_PATH];50s32 cfo_rpt_l[PHYDM_MAX_RF_PATH];51s32 cfo_rpt_acq[PHYDM_MAX_RF_PATH];52s32 cfo_rpt_sec[PHYDM_MAX_RF_PATH];53s32 cfo_rpt_end[PHYDM_MAX_RF_PATH];54};5556void phydm_get_cfo_info(void *dm_void, struct phydm_cfo_rpt *cfo);5758boolean phydm_set_crystal_cap_reg(void *dm_void, u8 crystal_cap);5960void phydm_set_crystal_cap(void *dm_void, u8 crystal_cap);6162void phydm_cfo_tracking_init(void *dm_void);6364void phydm_cfo_tracking(void *dm_void);6566void phydm_parsing_cfo(void *dm_void, void *pktinfo_void, s8 *pcfotail,67u8 num_ss);68void phydm_cfo_tracking_debug(void *dm_void, char input[][16], u32 *_used,69char *output, u32 *_out_len);70#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)71void phy_Init_crystal_capacity(void *dm_void, u8 crystal_cap);72#endif73#endif747576