Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/hal/phydm/halrf/halphyrf_ce.h
1308 views
1
/******************************************************************************
2
*
3
* Copyright(c) 2007 - 2017 Realtek Corporation.
4
*
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.
8
*
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
12
* more details.
13
*
14
* The full GNU General Public License is included in this distribution in the
15
* file called LICENSE.
16
*
17
* Contact Information:
18
* wlanfae <[email protected]>
19
* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20
* Hsinchu 300, Taiwan.
21
*
22
* Larry Finger <[email protected]>
23
*
24
*****************************************************************************/
25
26
#ifndef __HALPHYRF_H__
27
#define __HALPHYRF_H__
28
29
#include "halrf/halrf_kfree.h"
30
#if (RTL8814A_SUPPORT == 1)
31
#include "halrf/rtl8814a/halrf_iqk_8814a.h"
32
#endif
33
34
#if (RTL8822B_SUPPORT == 1)
35
#include "halrf/rtl8822b/halrf_iqk_8822b.h"
36
#endif
37
38
#if (RTL8821C_SUPPORT == 1)
39
#include "halrf/rtl8821c/halrf_iqk_8821c.h"
40
#endif
41
42
#if (RTL8195B_SUPPORT == 1)
43
/* #include "halrf/rtl8195b/halrf.h" */
44
#include "halrf/rtl8195b/halrf_iqk_8195b.h"
45
#include "halrf/rtl8195b/halrf_txgapk_8195b.h"
46
#include "halrf/rtl8195b/halrf_dpk_8195b.h"
47
#endif
48
49
#if (RTL8814B_SUPPORT == 1)
50
#include "halrf/rtl8814b/halrf_iqk_8814b.h"
51
#include "halrf/rtl8814b/halrf_dpk_8814b.h"
52
#endif
53
54
#include "halrf/halrf_powertracking_ce.h"
55
56
enum spur_cal_method {
57
PLL_RESET,
58
AFE_PHASE_SEL
59
};
60
61
enum pwrtrack_method {
62
BBSWING,
63
TXAGC,
64
MIX_MODE,
65
TSSI_MODE,
66
MIX_2G_TSSI_5G_MODE,
67
MIX_5G_TSSI_2G_MODE,
68
CLEAN_MODE
69
};
70
71
typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
72
typedef void (*func_iqk)(void *, u8, u8, u8);
73
typedef void (*func_lck)(void *);
74
typedef void (*func_tssi_dck)(void *, u8);
75
typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
76
typedef void (*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
77
typedef void (*func_swing_xtal)(void *, s8 **, s8 **);
78
typedef void (*func_set_xtal)(void *);
79
80
struct txpwrtrack_cfg {
81
u8 swing_table_size_cck;
82
u8 swing_table_size_ofdm;
83
u8 threshold_iqk;
84
u8 threshold_dpk;
85
u8 average_thermal_num;
86
u8 rf_path_count;
87
u32 thermal_reg_addr;
88
func_set_pwr odm_tx_pwr_track_set_pwr;
89
func_iqk do_iqk;
90
func_lck phy_lc_calibrate;
91
func_tssi_dck do_tssi_dck;
92
func_swing get_delta_swing_table;
93
func_swing8814only get_delta_swing_table8814only;
94
func_swing_xtal get_delta_swing_xtal_table;
95
func_set_xtal odm_txxtaltrack_set_xtal;
96
};
97
98
void configure_txpower_track(void *dm_void, struct txpwrtrack_cfg *config);
99
100
void odm_clear_txpowertracking_state(void *dm_void);
101
102
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
103
void odm_txpowertracking_callback_thermal_meter(void *dm_void);
104
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
105
void odm_txpowertracking_callback_thermal_meter(void *dm);
106
#else
107
void odm_txpowertracking_callback_thermal_meter(void *adapter);
108
#endif
109
110
#if (RTL8822C_SUPPORT == 1 || RTL8814B_SUPPORT == 1)
111
void odm_txpowertracking_new_callback_thermal_meter(void *dm_void);
112
#endif
113
114
#define ODM_TARGET_CHNL_NUM_2G_5G 59
115
116
void odm_reset_iqk_result(void *dm_void);
117
u8 odm_get_right_chnl_place_for_iqk(u8 chnl);
118
119
void phydm_rf_init(void *dm_void);
120
void phydm_rf_watchdog(void *dm_void);
121
122
#endif /*__HALPHYRF_H__*/
123
124