Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/include/Hal8192EPhyCfg.h
1307 views
1
/******************************************************************************
2
*
3
* Copyright(c) 2012 - 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 __INC_HAL8192EPHYCFG_H__
16
#define __INC_HAL8192EPHYCFG_H__
17
18
19
/*--------------------------Define Parameters-------------------------------*/
20
#define LOOP_LIMIT 5
21
#define MAX_STALL_TIME 50 /* us */
22
#define AntennaDiversityValue 0x80 /* (Adapter->bSoftwareAntennaDiversity ? 0x00 : 0x80) */
23
#define MAX_TXPWR_IDX_NMODE_92S 63
24
#define Reset_Cnt_Limit 3
25
26
#ifdef CONFIG_PCI_HCI
27
#define MAX_AGGR_NUM 0x0B
28
#else
29
#define MAX_AGGR_NUM 0x07
30
#endif /* CONFIG_PCI_HCI */
31
32
33
/*--------------------------Define Parameters-------------------------------*/
34
35
/*------------------------------Define structure----------------------------*/
36
37
/* BB/RF related */
38
39
/*------------------------------Define structure----------------------------*/
40
41
42
/*------------------------Export global variable----------------------------*/
43
/*------------------------Export global variable----------------------------*/
44
45
46
/*------------------------Export Marco Definition---------------------------*/
47
/*------------------------Export Marco Definition---------------------------*/
48
49
50
/*--------------------------Exported Function prototype---------------------*/
51
/*
52
* BB and RF register read/write
53
* */
54
u32 PHY_QueryBBReg8192E(PADAPTER Adapter,
55
u32 RegAddr,
56
u32 BitMask);
57
void PHY_SetBBReg8192E(PADAPTER Adapter,
58
u32 RegAddr,
59
u32 BitMask,
60
u32 Data);
61
u32 PHY_QueryRFReg8192E(PADAPTER Adapter,
62
enum rf_path eRFPath,
63
u32 RegAddr,
64
u32 BitMask);
65
void PHY_SetRFReg8192E(PADAPTER Adapter,
66
enum rf_path eRFPath,
67
u32 RegAddr,
68
u32 BitMask,
69
u32 Data);
70
71
/*
72
* Initialization related function
73
*
74
* MAC/BB/RF HAL config */
75
int PHY_MACConfig8192E(PADAPTER Adapter);
76
int PHY_BBConfig8192E(PADAPTER Adapter);
77
int PHY_RFConfig8192E(PADAPTER Adapter);
78
79
/* RF config */
80
81
82
/*
83
* BB TX Power R/W
84
* */
85
void PHY_SetTxPowerLevel8192E(PADAPTER Adapter, u8 channel);
86
87
void
88
PHY_SetTxPowerIndex_8192E(
89
PADAPTER Adapter,
90
u32 PowerIndex,
91
enum rf_path RFPath,
92
u8 Rate
93
);
94
95
u8
96
PHY_GetTxPowerIndex_8192E(
97
PADAPTER pAdapter,
98
enum rf_path RFPath,
99
u8 Rate,
100
u8 BandWidth,
101
u8 Channel,
102
struct txpwr_idx_comp *tic
103
);
104
105
/*
106
* channel switch related funciton
107
* */
108
void
109
PHY_SetSwChnlBWMode8192E(
110
PADAPTER Adapter,
111
u8 channel,
112
enum channel_width Bandwidth,
113
u8 Offset40,
114
u8 Offset80
115
);
116
117
void
118
PHY_SetRFEReg_8192E(
119
PADAPTER Adapter
120
);
121
122
void
123
phy_SpurCalibration_8192E(
124
PADAPTER Adapter,
125
enum spur_cal_method method
126
);
127
void PHY_SpurCalibration_8192E( PADAPTER Adapter);
128
129
#ifdef CONFIG_SPUR_CAL_NBI
130
void
131
phy_SpurCalibration_8192E_NBI(
132
PADAPTER Adapter
133
);
134
#endif
135
/*
136
* BB/MAC/RF other monitor API
137
* */
138
139
void
140
phy_set_rf_path_switch_8192e(
141
struct dm_struct *phydm,
142
bool bMain
143
);
144
145
/*--------------------------Exported Function prototype---------------------*/
146
#endif /* __INC_HAL8192CPHYCFG_H */
147
148