hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
/** @file */
/******************************************************************************
 *
 * Copyright(c) 2019 Realtek Corporation. All rights reserved.
 *
 * 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 _MAC_AX_HDR_CONV_H_
#define _MAC_AX_HDR_CONV_H_
 
#include "../type.h"
 
#define HW_HDR_CONV_HTC_ORDER_ENABLE 0x1
#define HW_HDR_CONV_VLANTAG_VALID_ENABLE 0x1
#define HW_HDR_CONV_QOS_FIELD_ENABLE 0x1
 
enum {
   R_AX_ETH_TYPE_IDX_0 = 0,
   R_AX_ETH_TYPE_IDX_1 = 1,
   R_AX_ETH_TYPE_IDX_2 = 2,
};
 
enum {
   R_AX_OUI_IDX_0 = 0,
   R_AX_OUI_IDX_1 = 1,
   R_AX_OUI_IDX_2 = 2,
   R_AX_OUI_IDX_3 = 3,
};
 
enum {
   R_AX_OUI_CFG_DISABLE = 0,
   R_AX_OUI_CFG_ENABLE = 1,
};
 
/**
 * @struct mac_ax_en_hdr_conv
 * @brief mac_ax_en_hdr_conv
 *
 * @var mac_ax_en_hdr_conv::enable
 * Please Place Description here.
 * @var mac_ax_en_hdr_conv::rsvd0
 * Please Place Description here.
 */
struct mac_ax_en_hdr_conv {
   u32 enable: 1;
   u32 rsvd0: 31;
};
 
/**
 * @brief mac_hdr_conv_tx_set_eth_type
 *
 * @param adapter
 * @param eth_type_idx
 * @param eth_type
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_set_eth_type(struct mac_ax_adapter *adapter,
                u8 eth_type_idx, u16 eth_type);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_eth_type
 *
 * @param adapter
 * @param eth_type_idx
 * @param *eth_type
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_get_eth_type(struct mac_ax_adapter *adapter,
                u8 eth_type_idx, u16 *eth_type);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_set_oui
 *
 * @param adapter
 * @param oui_idx
 * @param oui_val
 * @param enable
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_set_oui(struct mac_ax_adapter *adapter,
               u8 oui_idx, u32 oui_val, u8 enable);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_oui
 *
 * @param adapter
 * @param oui_idx
 * @param *oui_val
 * @param *enable
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_get_oui(struct mac_ax_adapter *adapter,
               u8 oui_idx, u32 *oui_val, u8 *enable);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_en
 *
 * @param adapter
 * @param en_tx_hdr_conv
 */
u32 mac_hdr_conv_en(struct mac_ax_adapter *adapter, u8 en_hdr_conv);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_macid_en
 *
 * @param adapter
 * @param macid
 * @param dctl_hdr_conv_cfg
 */
u32 mac_hdr_conv_tx_macid_en(struct mac_ax_adapter *adapter,
                u8 macid, struct mac_ax_hdr_conv_dctl_cfg hdr_conv_dctl_cfg);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_vlan_tag_valid_en
 *
 * @param adapter
 * @param macid
 * @param vlan_tag_valid_en
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_vlan_tag_valid_en(struct mac_ax_adapter *adapter,
                     u8 macid, u8 vlan_tag_valid_en);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_vlan_tag_valid
 *
 * @param adapter
 * @param macid
 * @return Please Place Description here.
 * @retval u8
 */
u8 mac_hdr_conv_tx_get_vlan_tag_valid(struct mac_ax_adapter *adapter, u8 macid);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_qos_field_en
 *
 * @param adapter
 * @param macid
 * @param wlan_with_qosc_en
 * @param qos_field_h
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_qos_field_en(struct mac_ax_adapter *adapter,
                u8 macid, u8 wlan_with_qosc_en, u8 qos_field_h);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_qos_field_en
 *
 * @param adapter
 * @param macid
 * @return Please Place Description here.
 * @retval u8
 */
u8 mac_hdr_conv_tx_get_qos_field_en(struct mac_ax_adapter *adapter, u8 macid);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_qos_field_h
 *
 * @param adapter
 * @param macid
 * @return Please Place Description here.
 * @retval u8
 */
u8 mac_hdr_conv_tx_get_qos_field_h(struct mac_ax_adapter *adapter, u8 macid);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_htc_en
 *
 * @param adapter
 * @param macid
 * @param wlan_with_htc_en
 * @param htc_lb
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_htc_en(struct mac_ax_adapter *adapter,
              u8 macid, u8 wlan_with_htc_en, u8 htc_lb);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_htc_en
 *
 * @param adapter
 * @param macid
 * @return Please Place Description here.
 * @retval u8
 */
u8 mac_hdr_conv_tx_get_htc_en(struct mac_ax_adapter *adapter, u8 macid);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_htc_lb
 *
 * @param adapter
 * @param macid
 * @return Please Place Description here.
 * @retval u8
 */
u8 mac_hdr_conv_tx_get_htc_lb(struct mac_ax_adapter *adapter, u8 macid);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_target_wlan_hdr_len
 *
 * @param adapter
 * @param macid
 * @param wlan_hdr_len
 * @return Please Place Description here.
 * @retval u32
 */
u32 mac_hdr_conv_tx_target_wlan_hdr_len(struct mac_ax_adapter *adapter,
                   u8 macid, u8 wlan_hdr_len);
/**
 * @}
 * @}
 */
 
/**
 * @brief mac_hdr_conv_tx_get_target_wlan_hdr_len
 *
 * @param adapter
 * @param macid
 * @return Please Place Description here.
 * @retval u8
 */
u8 mac_hdr_conv_tx_get_target_wlan_hdr_len(struct mac_ax_adapter *adapter, u8 macid);
/**
 * @}
 * @}
 */
#endif