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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
/******************************************************************************
 *
 * Copyright(c) 2019 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 _HALBB_RA_L_ENDIAN_H_
#define _HALBB_RA_L_ENDIAN_H_
/*@--------------------------[Define] ---------------------------------------*/
 
 
 
/*@--------------------------[Enum]------------------------------------------*/
 
 
 
/*@--------------------------[Structure]-------------------------------------*/
 
struct bb_fw_cmac_rpt_info {
   /* dword 0 */
   u32 rpt_sel: 5;
   u32 polluted: 1;
   u32 tx_state: 2;
   u32 sw_define: 4;
   u32 rsvd0: 2;
   u32 try_rate: 1;
   u32 fix_rate: 1;
   u32 macid: 7;
   u32 rsvd1: 1;
   u32 qsel: 6;
   u32 rsvd2: 1;
   u32 txop_start: 1;
   /* dword 1 */
   u32 queue_time: 16;
   u32 acc_tx_time: 8;
   u32 rsvd3: 5;
   u32 bmc: 1;
   u32 bitmap_short: 2;
   /* dword 2 */
   u32 final_rate: 9;
   u32 final_gi_ltf: 3;
   u32 data_bw: 2;
   u32 mu2su: 1;
   u32 mu_lmt: 1;
   u32 final_rts_rate: 9;
   u32 final_rts_gi_ltf: 3;
   u32 rts_tx_state: 2;
   u32 collision_head: 1;
   u32 collision_tail: 1;
   /* dword 3 */
   u32 total_pkt_num: 8;
   u32 data_tx_cnt: 6;
   u32 bpri: 1;
   u32 bbar: 1;
   u32 pkt_ok_num: 8;
   u32 rts_tx_count: 6;
   u32 rsvd4: 2;
   /* dword 4 */
   u32 init_rate: 9;
   u32 init_gi_ltf: 3;
   u32 ppdu_type: 2;
   u32 he_tb_ppdu_flag: 1;
   u32 ppdu_fst_rpt: 1;
   u32 su_txpwr: 6;
   u32 rsvd5: 2;
   u32 diff_pkt_num: 4;
   u32 user_define_ext_l: 4;
   /* dword 5 */
   u32 user_define: 8;
   u32 fw_define: 8;
   u32 txpwr_pd: 5;
   u32 bsr: 1;
   u32 rsvd6: 2;
   u32 sr_rx_count: 4;
   u32 user_define_ext_h: 4;
};
 
struct bb_h2c_ra_cfg_info {
   u8 is_dis_ra:1;
   u8 mode_ctrl:5;
   /*
   @ Bit0 : CCK
   @ Bit1 : OFDM
   @ Bit2 : HT
   @ Bit3 : VHT
   @ Bit4 : HE
   */
   u8 bw_cap:2;
 
   u8 macid;
 
   u8 dcm_cap:1;
   u8 er_cap:1;
   u8 init_rate_lv:2;
   u8 upd_all:1;
   u8 en_sgi:1;
   u8 ldpc_cap:1;
   u8 stbc_cap:1;
 
   u8 ss_num:3;
   u8 giltf_cap:3;
   u8 upd_bw_nss_mask:1;
   u8 upd_mask:1;
 
   u8 ramask[8]; /* ramask[7] bit 7 is for indicate bfee csi rate ctrl */
 
   /* BFee CSI rate ctrl */
   u8 band_num;
 
   u8 ra_csi_rate_en:1;
   u8 fixed_csi_rate_en:1;
   u8 cr_tbl_sel:1;
   u8 fix_giltf_en:1;
   u8 fix_giltf:3;
   u8 partial_bw_su_er:1;
 
   u8 fixed_csi_rate_l;
 
   u8 is_noisy:1; /*nhm_ratio >= 1% then disable ra bw switch for 92XB, WLANBB-2227*/
   u8 rsvd0:4;
   u8 band:2;
   u8 is_new_bb_ra_dbgreg:1;
};
 
struct bb_h2c_rssi_setting {
   u8 macid;
   u8 rssi_a; /* BIT(7) : parse rssi_b*/
   u8 bcn_rssi_a; /* BIT(7) : parse bcn_rssi*/
   u8 bcn_rssi_b;
 
   u8 dtp_lv: 2;
   u8 rsvd1: 6;
 
   u8 is_fixed_rate:1;
   u8 fixed_rate:6;
   u8 fixed_is_mu:1;
 
   u8 fixed_rate_md:2;
   u8 fixed_giltf:3;
   u8 fixed_bw:2;
   u8 rsvd2_M:1;
 
   u8 rssi_b:7;
   u8 endcmd:1;
};
 
struct bb_h2c_ra_cfg_info_wifi7 {
   struct bb_h2c_ra_cfg_info bb_h2c_ra_cmn;
 
   u8 mode_ctrl_eht:7;
   u8 rsvd0:1;
 
   u8 bw_cap_eht:3;
   u8 rsvd1:5;
 
   u8 ramask[4];
};
 
struct bb_h2c_rssi_setting_wifi7 {
   u8 macid;
   u8 rssi_a; /* BIT(7) : parse rssi_b*/
   u8 bcn_rssi_a; /* BIT(7) : parse bcn_rssi*/
   u8 bcn_rssi_b;
 
   u8 fixed_rate_M:1;
   u8 fixed_bw_M:1;
   u8 fixed_rate_md_M:1;
   u8 rsvd0_M:5;
 
   u8 is_fixed_rate:1;
   u8 fixed_rate:7;
 
   u8 fixed_rate_md:2;
   u8 fixed_giltf:3;
   u8 fixed_bw:2;
   u8 fixed_is_mu:1;
 
   u8 rssi_b:7;
   u8 endcmd:1;
};
 
struct bb_h2c_ra_mask {
   u8 macid;
 
   u8 mask_or_reveal:1;
   u8 mask_rate:7;
 
   u8 mask_rate_md:2;
   u8 is_manual_adjust_ra_mask:1;
   u8 rsvd1:5;
 
   u8 rsvd2;
};
 
struct bb_h2c_ra_adjust {
   u8 macid;
 
   u8 drv_shift_value:7;
   u8 drv_shift_en:1;
 
   u8 rsvd[2];
};
 
struct bb_h2c_ra_d_o_timer {
   u8 macid;
 
   u8 d_o_timer_value:7;
   u8 d_o_timer_en:1;
 
   u8 rsvd[2];
};
 
struct bb_h2c_ra_shift_dafc_tc {
   u8 enable;
 
   u8 init_fb_cnt[24]; /*1ss MCS0 ~ 2ss MCS11*/
 
   u8 rsvd[3];
};
 
struct bb_h2c_mu_cfg {
   u8 cmd_type;
   u8 entry;
   u8 macid;
   u8 en_256q:1;
   u8 en_1024q:1;
   u8 rsvd3:6;
};
 
struct bb_h2c_ra_tx_info {
   u16 macid;
   u16 rsvd0;
};
 
struct halbb_c2h_dbg_rpt_wifi7 {
   u8 per;
   u8 rdr;
   u8 r4;
   u8 cls;
   u8 rate_up_lmt_cnt;
   u8 per_ma;
   u8 var;
   u8 d_o_n;
   u8 d_o_p;
   u8 rd_th;
   u8 ru_th;
   u8 try_per;
   u8 try_rdr;
   u8 try_r4;
   u8 txrpt_tot;
   u8 ra_timer;
   u8 tot_disra_trying_return;
   u8 r4_return;
   u8 highest_rate;
   u8 lowest_rate;
   u32 macid:16;
   u32 rsvd0:16;
   u32 cmac_tbl;
   u32 ra_mask_h;
   u32 ra_mask_l;
   u32 upd_all_h2c_0;
   u32 upd_all_h2c_1;
   u32 upd_all_h2c_2;
   u32 upd_all_h2c_3;
};
 
struct halbb_ra_rpt_info {
   u8 rpt_macid_l;
   u8 rpt_macid_m;
 
   u8 retry_ratio;
 
   u8 u0_muidx: 3;
   u8 u1_muidx: 3;
   u8 en_stbc: 1;
   u8 rpt_mcs_nss_M: 1;
 
   u8 rpt_mcs_nss: 7;
   u8 is_mu: 1;
 
   u8 rpt_md_sel: 2;
   u8 rpt_gi_ltf: 3;
   u8 rpt_bw: 2;
   u8 rpt_md_sel_M: 1;
 
   u8 rpt_bw_M: 1;
   u8 rsvd0: 7;
 
   u8 rsvd1;
};
 
struct halbb_txsts_info {
   u8 rpt_macid_l;
   u8 rpt_macid_m;
 
   u8 avg_agg;
   u8 rsvd0;
 
   u8 tx_ok_be_l;
   u8 tx_ok_be_m;
   u8 tx_ok_bk_l;
   u8 tx_ok_bk_m;
   u8 tx_ok_vi_l;
   u8 tx_ok_vi_m;
   u8 tx_ok_vo_l;
   u8 tx_ok_vo_m;
 
   u8 tx_retry_be_l;
   u8 tx_retry_be_m;
   u8 tx_retry_bk_l;
   u8 tx_retry_bk_m;
   u8 tx_retry_vi_l;
   u8 tx_retry_vi_m;
   u8 tx_retry_vo_l;
   u8 tx_retry_vo_m;
 
   u8 tx_rate_l;
   u8 tx_rate_m;
   u8 retry_ratio;
   u8 rsvd1;
 
   u8 tx_total_l;
   u8 tx_total_m;
   u8 rsvd2;
   u8 rsvd3;
 
   u8 rsvd4;
   u8 rsvd5;
   u8 rsvd6;
   u8 rsvd7;
};
/*@--------------------------[Prptotype]-------------------------------------*/
 
#endif