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_iot.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
31
#if (RTL8821C_SUPPORT == 1)
32
#include "halrf/rtl8821c/halrf_iqk_8821c.h"
33
#endif
34
35
#if (RTL8195B_SUPPORT == 1)
36
// #include "halrf/rtl8195b/halrf.h"
37
#include "halrf/rtl8195b/halrf_iqk_8195b.h"
38
#include "halrf/rtl8195b/halrf_txgapk_8195b.h"
39
#include "halrf/rtl8195b/halrf_dpk_8195b.h"
40
#endif
41
42
#if (RTL8710C_SUPPORT == 1)
43
// #include "halrf/rtl8710c/halrf.h"
44
#include "halrf/rtl8710c/halrf_iqk_8710c.h"
45
// #include "halrf/rtl8710c/halrf_txgapk_8710c.h"
46
// #include "halrf/rtl8710c/halrf_dpk_8710c.h"
47
#endif
48
49
#include "halrf/halrf_powertracking_iot.h"
50
51
52
enum spur_cal_method {
53
PLL_RESET,
54
AFE_PHASE_SEL
55
};
56
57
enum pwrtrack_method {
58
BBSWING,
59
TXAGC,
60
MIX_MODE,
61
TSSI_MODE,
62
MIX_2G_TSSI_5G_MODE,
63
MIX_5G_TSSI_2G_MODE,
64
CLEAN_MODE
65
};
66
67
typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
68
typedef void(*func_iqk)(void *, u8, u8, u8);
69
typedef void (*func_lck)(void *);
70
#if (RTL8721D_SUPPORT == 1)
71
typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **,
72
u8 **, u8 **, u8 **, u8 **);
73
#else
74
typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
75
#endif
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_swing get_delta_swing_table;
92
func_swing8814only get_delta_swing_table8814only;
93
func_swing_xtal get_delta_swing_xtal_table;
94
func_set_xtal odm_txxtaltrack_set_xtal;
95
};
96
97
void
98
configure_txpower_track(
99
void *dm_void,
100
struct txpwrtrack_cfg *config
101
);
102
103
104
void
105
odm_clear_txpowertracking_state(
106
void *dm_void
107
);
108
109
void
110
odm_txpowertracking_callback_thermal_meter(
111
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
112
void *dm_void
113
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
114
void *dm
115
#else
116
void *adapter
117
#endif
118
);
119
120
121
122
#define ODM_TARGET_CHNL_NUM_2G_5G 59
123
124
125
void
126
odm_reset_iqk_result(
127
void *dm_void
128
);
129
u8
130
odm_get_right_chnl_place_for_iqk(
131
u8 chnl
132
);
133
134
void phydm_rf_init(void *dm_void);
135
void phydm_rf_watchdog(void *dm_void);
136
137
#endif /*#ifndef __HALPHYRF_H__*/
138
139