1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
| /******************************************************************************
| *
| * Copyright(c) 2007 - 2017 Realtek Corporation.
| *
| * This program is free software; you can redistribute it and/or modify it
| * under the terms of version 2 of the GNU General Public License as
| * published by the Free Software Foundation.
| *
| * This program is distributed in the hope that it will be useful, but WITHOUT
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
| * more details.
| *
| *****************************************************************************/
|
|
| #ifndef __PHYDM_API_H__
| #define __PHYDM_API_H__
|
| #define PHYDM_API_VERSION "1.0" /* 2017.07.10 Dino, Add phydm_api.h*/
|
|
| /* 1 ============================================================
| * 1 Definition
| * 1 ============================================================ */
|
|
| #define FUNC_ENABLE 1
| #define FUNC_DISABLE 2
|
| /*NBI API------------------------------------*/
| #define NBI_TABLE_SIZE_128 27
| #define NBI_TABLE_SIZE_256 59
|
| #define NUM_START_CH_80M 7
| #define NUM_START_CH_40M 14
|
| #define CH_OFFSET_40M 2
| #define CH_OFFSET_80M 6
|
| #define FFT_128_TYPE 1
| #define FFT_256_TYPE 2
|
| #define FREQ_POSITIVE 1
| #define FREQ_NEGATIVE 2
| /*------------------------------------------------*/
|
| /* 1 ============================================================
| * 1 structure
| * 1 ============================================================ */
|
| struct phydm_api_stuc {
|
| u32 rx_iqc_reg_1; /*N-mode: for pathA REG0xc14*/
| u32 rx_iqc_reg_2; /*N-mode: for pathB REG0xc1c*/
| u8 tx_queue_bitmap;/*REG0x520[23:16]*/
|
| };
|
| /* 1 ============================================================
| * 1 enumeration
| * 1 ============================================================ */
|
|
|
| /* 1 ============================================================
| * 1 function prototype
| * 1 ============================================================ */
|
| void
| phydm_init_trx_antenna_setting(
| void *p_dm_void
| );
|
| void
| phydm_config_ofdm_rx_path(
| void *p_dm_void,
| u32 path
| );
|
| void
| phydm_config_cck_rx_path(
| void *p_dm_void,
| enum bb_path path
| );
|
| void
| phydm_config_cck_rx_antenna_init(
| void *p_dm_void
| );
|
| void
| phydm_config_trx_path(
| void *p_dm_void,
| u32 *const dm_value,
| u32 *_used,
| char *output,
| u32 *_out_len
| );
|
| void
| phydm_stop_3_wire(
| void *p_dm_void,
| u8 set_type
| );
|
| u8
| phydm_stop_ic_trx(
| void *p_dm_void,
| u8 set_type
| );
|
| void
| phydm_set_ext_switch(
| void *p_dm_void,
| u32 *const dm_value,
| u32 *_used,
| char *output,
| u32 *_out_len
| );
|
| void
| phydm_nbi_enable(
| void *p_dm_void,
| u32 enable
| );
|
| u8
| phydm_csi_mask_setting(
| void *p_dm_void,
| u32 enable,
| u32 channel,
| u32 bw,
| u32 f_interference,
| u32 Second_ch
| );
|
| u8
| phydm_nbi_setting(
| void *p_dm_void,
| u32 enable,
| u32 channel,
| u32 bw,
| u32 f_interference,
| u32 second_ch
| );
|
|
| void
| phydm_api_debug(
| void *p_dm_void,
| u32 function_map,
| u32 *const dm_value,
| u32 *_used,
| char *output,
| u32 *_out_len
| );
|
| void
| phydm_stop_ck320(
| void *p_dm_void,
| u8 enable
| );
|
| #ifdef PHYDM_COMMON_API_SUPPORT
|
| boolean
| phydm_api_set_txagc(
| void *p_dm_void,
| u32 power_index,
| enum rf_path path,
| u8 hw_rate,
| boolean is_single_rate
| );
|
| u8
| phydm_api_get_txagc(
| void *p_dm_void,
| enum rf_path path,
| u8 hw_rate
| );
|
| boolean
| phydm_api_switch_bw_channel(
| void *p_dm_void,
| u8 central_ch,
| u8 primary_ch_idx,
| enum channel_width bandwidth
| );
|
| boolean
| phydm_api_trx_mode(
| void *p_dm_void,
| enum bb_path tx_path,
| enum bb_path rx_path,
| boolean is_tx2_path
| );
|
| #endif
|
| #endif
|
|