Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/ALFA-W1F1/RTL8814AU/include/Hal8812PhyCfg.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 __INC_HAL8812PHYCFG_H__
16
#define __INC_HAL8812PHYCFG_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
27
#ifdef CONFIG_PCI_HCI
28
#define MAX_AGGR_NUM 0x0B
29
#else
30
#define MAX_AGGR_NUM 0x07
31
#endif /* CONFIG_PCI_HCI */
32
33
34
/*--------------------------Define Parameters-------------------------------*/
35
36
/*------------------------------Define structure----------------------------*/
37
38
39
/* BB/RF related */
40
41
/*------------------------------Define structure----------------------------*/
42
43
44
/*------------------------Export global variable----------------------------*/
45
/*------------------------Export global variable----------------------------*/
46
47
48
/*------------------------Export Marco Definition---------------------------*/
49
/*------------------------Export Marco Definition---------------------------*/
50
51
52
/*--------------------------Exported Function prototype---------------------*/
53
/*
54
* BB and RF register read/write
55
* */
56
u32 PHY_QueryBBReg8812(PADAPTER Adapter,
57
u32 RegAddr,
58
u32 BitMask);
59
void PHY_SetBBReg8812(PADAPTER Adapter,
60
u32 RegAddr,
61
u32 BitMask,
62
u32 Data);
63
u32 PHY_QueryRFReg8812(PADAPTER Adapter,
64
enum rf_path eRFPath,
65
u32 RegAddr,
66
u32 BitMask);
67
void PHY_SetRFReg8812(PADAPTER Adapter,
68
enum rf_path eRFPath,
69
u32 RegAddr,
70
u32 BitMask,
71
u32 Data);
72
73
/*
74
* Initialization related function
75
*
76
* MAC/BB/RF HAL config */
77
int PHY_MACConfig8812(PADAPTER Adapter);
78
int PHY_BBConfig8812(PADAPTER Adapter);
79
void PHY_BB8812_Config_1T(PADAPTER Adapter);
80
int PHY_RFConfig8812(PADAPTER Adapter);
81
82
/* RF config */
83
84
s32
85
PHY_SwitchWirelessBand8812(
86
PADAPTER Adapter,
87
u8 Band
88
);
89
90
/*
91
* BB TX Power R/W
92
* */
93
void PHY_SetTxPowerLevel8812(PADAPTER Adapter, u8 Channel);
94
95
u8 PHY_GetTxPowerIndex_8812A(
96
PADAPTER pAdapter,
97
enum rf_path RFPath,
98
u8 Rate,
99
u8 BandWidth,
100
u8 Channel,
101
struct txpwr_idx_comp *tic
102
);
103
104
u32 phy_get_tx_bb_swing_8812a(
105
PADAPTER Adapter,
106
BAND_TYPE Band,
107
enum rf_path RFPath
108
);
109
110
void
111
PHY_SetTxPowerIndex_8812A(
112
PADAPTER Adapter,
113
u32 PowerIndex,
114
enum rf_path RFPath,
115
u8 Rate
116
);
117
118
/*
119
* channel switch related funciton
120
* */
121
void
122
PHY_SetSwChnlBWMode8812(
123
PADAPTER Adapter,
124
u8 channel,
125
enum channel_width Bandwidth,
126
u8 Offset40,
127
u8 Offset80
128
);
129
130
/*
131
* BB/MAC/RF other monitor API
132
* */
133
134
void
135
phy_set_rf_path_switch_8812a(
136
struct dm_struct *phydm,
137
bool bMain
138
);
139
140
/*--------------------------Exported Function prototype---------------------*/
141
#endif /* __INC_HAL8192CPHYCFG_H */
142
143