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_win.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
*****************************************************************************/
15
16
#ifndef __HALPHYRF_H__
17
#define __HALPHYRF_H__
18
19
#if (RTL8814A_SUPPORT == 1)
20
#include "halrf/rtl8814a/halrf_iqk_8814a.h"
21
#endif
22
23
#if (RTL8822B_SUPPORT == 1)
24
#include "halrf/rtl8822b/halrf_iqk_8822b.h"
25
#include "../mac/Halmac_type.h"
26
#endif
27
#include "halrf/halrf_powertracking_win.h"
28
#include "halrf/halrf_kfree.h"
29
#include "halrf/halrf_txgapcal.h"
30
#if (RTL8821C_SUPPORT == 1)
31
#include "halrf/rtl8821c/halrf_iqk_8821c.h"
32
#endif
33
34
#if (RTL8195B_SUPPORT == 1)
35
// #include "halrf/rtl8195b/halrf.h"
36
#include "halrf/rtl8195b/halrf_iqk_8195b.h"
37
#include "halrf/rtl8195b/halrf_txgapk_8195b.h"
38
#include "halrf/rtl8195b/halrf_dpk_8195b.h"
39
#endif
40
41
#if (RTL8814B_SUPPORT == 1)
42
#include "halrf/rtl8814b/halrf_iqk_8814b.h"
43
#endif
44
45
enum spur_cal_method {
46
PLL_RESET,
47
AFE_PHASE_SEL
48
};
49
50
enum pwrtrack_method {
51
BBSWING,
52
TXAGC,
53
MIX_MODE,
54
TSSI_MODE,
55
MIX_2G_TSSI_5G_MODE,
56
MIX_5G_TSSI_2G_MODE,
57
CLEAN_MODE
58
};
59
60
typedef void(*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
61
typedef void(*func_iqk)(void *, u8, u8, u8);
62
typedef void(*func_lck)(void *);
63
typedef void(*func_tssi_dck)(void *, u8);
64
typedef void(*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
65
typedef void(*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
66
typedef void (*func_swing_xtal)(void *, s8 **, s8 **);
67
typedef void (*func_set_xtal)(void *);
68
typedef void(*func_all_swing)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);
69
70
struct txpwrtrack_cfg {
71
u8 swing_table_size_cck;
72
u8 swing_table_size_ofdm;
73
u8 threshold_iqk;
74
u8 threshold_dpk;
75
u8 average_thermal_num;
76
u8 rf_path_count;
77
u32 thermal_reg_addr;
78
func_set_pwr odm_tx_pwr_track_set_pwr;
79
func_iqk do_iqk;
80
func_lck phy_lc_calibrate;
81
func_tssi_dck do_tssi_dck;
82
func_swing get_delta_swing_table;
83
func_swing8814only get_delta_swing_table8814only;
84
func_swing_xtal get_delta_swing_xtal_table;
85
func_set_xtal odm_txxtaltrack_set_xtal;
86
func_all_swing get_delta_all_swing_table;
87
};
88
89
void
90
configure_txpower_track(
91
struct dm_struct *dm,
92
struct txpwrtrack_cfg *config
93
);
94
95
96
void
97
odm_clear_txpowertracking_state(
98
struct dm_struct *dm
99
);
100
101
void
102
odm_txpowertracking_callback_thermal_meter(
103
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
104
struct dm_struct *dm
105
#else
106
void *adapter
107
#endif
108
);
109
110
#if (RTL8822C_SUPPORT == 1 || RTL8814B_SUPPORT == 1)
111
void
112
odm_txpowertracking_new_callback_thermal_meter(void *dm_void);
113
#endif
114
115
#define ODM_TARGET_CHNL_NUM_2G_5G 59
116
117
118
void
119
odm_reset_iqk_result(
120
struct dm_struct *dm
121
);
122
u8
123
odm_get_right_chnl_place_for_iqk(
124
u8 chnl
125
);
126
127
void odm_iq_calibrate(struct dm_struct *dm);
128
void phydm_rf_init(struct dm_struct *dm);
129
void phydm_rf_watchdog(struct dm_struct *dm);
130
131
#endif /*#ifndef __HALPHYRF_H__*/
132
133