Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/hal/hal_dm.h
1307 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
#ifndef __HAL_DM_H__
16
#define __HAL_DM_H__
17
18
#define adapter_to_phydm(adapter) (&(GET_HAL_DATA(adapter)->odmpriv))
19
#define dvobj_to_phydm(dvobj) adapter_to_phydm(dvobj_get_primary_adapter(dvobj))
20
#ifdef CONFIG_TDMADIG
21
void rtw_phydm_tdmadig(_adapter *adapter, u8 state);
22
#endif
23
void rtw_phydm_priv_init(_adapter *adapter);
24
void Init_ODM_ComInfo(_adapter *adapter);
25
void rtw_phydm_init(_adapter *adapter);
26
27
void rtw_hal_turbo_edca(_adapter *adapter);
28
u8 rtw_phydm_is_iqk_in_progress(_adapter *adapter);
29
30
void GetHalODMVar(
31
PADAPTER Adapter,
32
HAL_ODM_VARIABLE eVariable,
33
void *pValue1,
34
void *pValue2);
35
void SetHalODMVar(
36
PADAPTER Adapter,
37
HAL_ODM_VARIABLE eVariable,
38
void *pValue1,
39
BOOLEAN bSet);
40
41
void rtw_phydm_ra_registed(_adapter *adapter, struct sta_info *psta);
42
43
#ifdef CONFIG_DYNAMIC_SOML
44
void rtw_dyn_soml_byte_update(_adapter *adapter, u8 data_rate, u32 size);
45
void rtw_dyn_soml_para_set(_adapter *adapter, u8 train_num, u8 intvl,
46
u8 period, u8 delay);
47
void rtw_dyn_soml_config(_adapter *adapter);
48
#endif
49
void rtw_phydm_set_rrsr(_adapter *adapter, u32 rrsr_value, bool write_rrsr);
50
void rtw_phydm_watchdog(_adapter *adapter, bool in_lps);
51
52
void rtw_hal_update_iqk_fw_offload_cap(_adapter *adapter);
53
void dump_sta_info(void *sel, struct sta_info *psta);
54
void dump_sta_traffic(void *sel, _adapter *adapter, struct sta_info *psta);
55
56
#ifdef CONFIG_DBG_RF_CAL
57
void rtw_hal_iqk_test(_adapter *adapter, bool recovery, bool clear, bool segment);
58
void rtw_hal_lck_test(_adapter *adapter);
59
#endif
60
61
s8 rtw_dm_get_min_rssi(_adapter *adapter);
62
s8 rtw_phydm_get_min_rssi(_adapter *adapter);
63
u8 rtw_phydm_get_cur_igi(_adapter *adapter);
64
65
66
#ifdef CONFIG_LPS_LCLK_WD_TIMER
67
extern void phydm_rssi_monitor_check(void *p_dm_void);
68
69
void rtw_phydm_wd_lps_lclk_hdl(_adapter *adapter);
70
void rtw_phydm_watchdog_in_lps_lclk(_adapter *adapter);
71
#endif
72
#ifdef CONFIG_TDMADIG
73
enum rtw_tdmadig_state{
74
TDMADIG_INIT,
75
TDMADIG_NON_INIT,
76
};
77
#endif
78
enum phy_cnt {
79
FA_OFDM,
80
FA_CCK,
81
FA_TOTAL,
82
CCA_OFDM,
83
CCA_CCK,
84
CCA_ALL,
85
CRC32_OK_VHT,
86
CRC32_OK_HT,
87
CRC32_OK_LEGACY,
88
CRC32_OK_CCK,
89
CRC32_ERROR_VHT,
90
CRC32_ERROR_HT,
91
CRC32_ERROR_LEGACY,
92
CRC32_ERROR_CCK,
93
};
94
u32 rtw_phydm_get_phy_cnt(_adapter *adapter, enum phy_cnt cnt);
95
#if ((RTL8822B_SUPPORT == 1) || (RTL8821C_SUPPORT == 1) || (RTL8814B_SUPPORT == 1) || (RTL8822C_SUPPORT == 1))
96
void rtw_phydm_iqk_trigger(_adapter *adapter);
97
#endif
98
void rtw_phydm_read_efuse(_adapter *adapter);
99
bool rtw_phydm_set_crystal_cap(_adapter *adapter, u8 crystal_cap);
100
101
#ifdef CONFIG_SUPPORT_DYNAMIC_TXPWR
102
void rtw_phydm_set_dyntxpwr(_adapter *adapter, u8 *desc, u8 mac_id);
103
#endif
104
105
#ifdef CONFIG_LPS_PG
106
void rtw_phydm_lps_pg_hdl(_adapter *adapter, struct sta_info *sta, bool in_lpspg);
107
#endif
108
#ifdef CONFIG_LPS_PWR_TRACKING
109
void rtw_phydm_pwr_tracking_directly(_adapter *adapter);
110
#endif
111
112
#ifdef CONFIG_CTRL_TXSS_BY_TP
113
void rtw_phydm_trx_cfg(_adapter *adapter, bool tx_1ss);
114
#endif
115
116
#endif /* __HAL_DM_H__ */
117
118