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
/******************************************************************************
 *
 * Copyright(c) 2007 - 2020  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.
 *
 * The full GNU General Public License is included in this distribution in the
 * file called LICENSE.
 *
 * Contact Information:
 * wlanfae <wlanfae@realtek.com>
 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
 * Hsinchu 300, Taiwan.
 *
 * Larry Finger <Larry.Finger@lwfinger.net>
 *
 *****************************************************************************/
#ifndef __HALBB_SNIF_EX_H__
#define __HALBB_SNIF_EX_H__
 
 
/*@--------------------------[Define] ---------------------------------------*/
 
/*@--------------------------[Enum]------------------------------------------*/
 
/*@--------------------------[Structure]-------------------------------------*/
/* === [Legacy] ========================*/
struct plcp_hdr_l_sig_info {
   /*B0*/
   u8 rate:4;
   u8 rsvd_bit:1;
   u8 len0_l:3;
   /*B1*/
   u8 len0_m;
   /*B2*/
   u8 len1:1;
   u8 parity_chk:1;
   u8 rsvd_0:6;
};
 
/* === [HT] ============================*/
 
struct plcp_hdr_ht_sig_1_info {
   /*B0*/
   u8 mcs:7;
   u8 cbw:1;
   /*B1*/
   u8 ht_len_l;
   /*B2*/
   u8 ht_len_m;
};
 
struct plcp_hdr_ht_sig_2_info {
   /*B0*/
   u8 smoothing:1;
   u8 not_sounding:1;
   u8 rsvd_bit:1;
   u8 aggre:1;
   u8 stbc:2;
   u8 fec_coding:1;
   u8 sgi:1;
   /*B1*/
   u8 num_ext_ss:2;
   u8 rsvd_0:6;
};
/* === [VHT] ===========================*/
 
struct plcp_hdr_vht_sig_a1_info {
   /*B0*/
   u8 bw:2;
   u8 rsvd_bit:1;
   u8 stbc:1;
   u8 g_id_l:4;
   /*B1*/
   u8 g_id_m:2;
   u8 nsts_paid_l:6;
   /*B2*/
   u8 nsts_paid_m:6;
   u8 txop_ps_not_allow:1;
   u8 rsvd_bit_1:1;
};
 
struct plcp_hdr_vht_sig_a1_ext_su_info {
   /*B0*/
   u8 su_sts:3;
   u8 paid_l:5;
   /*B1*/
   u8 paid_m:4;
   u8 rsvd_0:4;
};
 
struct plcp_hdr_vht_sig_a1_ext_mu_info {
   /*B0*/
   u8 mu_sts_0:3;
   u8 mu_sts_1:3;
   u8 mu_sts_2_l:2;
   /*B1*/
   u8 mu_sts_2_m:1;
   u8 mu_sts_3:3;
   u8 rsvd_0:4;
};
 
struct plcp_hdr_vht_sig_a2_info {
   /*B0*/
   u8 sgi:1;
   u8 sgi_disamb:1;
   u8 su_mu_0_coding:1;
   u8 ldpc_ext_symbol:1;
   u8 mcs_coding_l:4;
   /*B1*/
   u8 mcs_coding_m:1;
   u8 rsvd_bit:1;
   u8 rsvd_0:6;
};
 
struct plcp_hdr_vht_sig_a2_ext_su_info {
   /*B0*/
   u8 su_vht_mcs:4;
   u8 bf:1;
   u8 rsvd_0:3;
};
 
struct plcp_hdr_vht_sig_a2_ext_mu_info {
   /*B0*/
   u8 mu_coding_1:1;
   u8 mu_coding_2:1;
   u8 mu_coding_3:1;
   u8 rsvd_0:5;
};
 
struct plcp_hdr_vht_sig_b_info {
   u32 sigb_len_l;
   u8 vht_mcs; //mu
};
 
/* === [HE] ============================*/
 
struct plcp_hdr_he_sig_a1_su_info {
   /*B0*/
   u8 fmt:1;
   u8 beam_chg:1;
   u8 ul_dl:1;
   u8 he_mcs:4;
   u8 dcm:1;
   /*B1*/
   u8 bss_color:6;
   u8 rsvd_1:1;
   u8 spatial_reuse_l:1;
   /*B2*/
   u8 spatial_reuse_m:3;
   u8 bw:2;
   u8 gi_ltf_size:2;
   u8 nsts_mid_period_l:1;
   /*B3*/
   u8 nsts_mid_period_m:2;
   u8 rsvd_2:6;
};
 
struct plcp_hdr_he_sig_a2_su_info {
   /*B0*/
   u8 txop:7;
   u8 coding:1;
   /*B1*/
   u8 ldpc_ext_sym:1;
   u8 stbc:1;
   u8 bf:1;
   u8 pre_fec_fac:2;
   u8 pe_dis:1;
   u8 rsvd_1:1;
   u8 doppler:1;
};
 
struct plcp_hdr_he_sig_a1_mu_info {
   /*B0*/
   u8 ul_dl:1;
   u8 he_sig_b_mcs:3;
   u8 he_sig_b_dcm:1;
   u8 bss_color_l:3;
   /*B1*/
   u8 bss_color:3;
   u8 spatial_reuse:4;
   u8 bw_l:1;
   /*B2*/
   u8 bw_m:2;
   u8 num_sig_b_sym_or_mu_user:4;
   u8 sig_b_comp:1;
   u8 gi_ltf_size_l:1;
   /*B3*/
   u8 gi_ltf_size_m:1;
   u8 doppler:1;
   u8 rsvd_1:6;
};
 
struct plcp_hdr_he_sig_a2_mu_info {
   /*B0*/
   u8 txop:7;
   u8 rsvd_1:1;
   /*B1*/
   u8 num_sym_and_mid_period:3;
   u8 ldpc_ext_sym:1;
   u8 stbc:1;
   u8 pre_fec_fac:2;
   u8 pe_dis:1;
};
 
struct plcp_hdr_he_sig_a1_tb_info {
   /*B0*/
   u8 fmt:1;
   u8 bss_color:6;
   u8 spatial_reuse_1_l:1;
   /*B1*/
   u8 spatial_reuse_1_m:3;
   u8 spatial_reuse_2:4;
   u8 spatial_reuse_3_l:1;
   /*B2*/
   u8 spatial_reuse_3_m:3;
   u8 spatial_reuse_4:4;
   u8 rsvd_1:1;
   /*B3*/
   u8 bw:2;
   u8 rsvd_2:6;
};
 
struct plcp_hdr_he_sig_a2_tb_info {
   /*B0*/
   u8 txop:7;
   u8 rsvd_1:1;
   /*B1*/
   u8 rsvd_2;
};
 
struct bb_snif_info {
   bool snif_mode_en;
   u8 snif_rate_mode; /*0~3: Legacy/HT/VHT/HE*/
   u16 snif_rate;
   enum bb_physts_bitmap_t snif_ie_bitmap_type;
   /*LGCY/HT/VHT/HE*/
   u32* snif_l_sig;
   u16 snif_l_sig_len; /*24 Bit*/
   /*HT/VHT/HE*/
   u32* snif_sig_a1; 
   u16 snif_sig_a1_len; /*24/24/26*/
   u32* snif_sig_a2;
   u16 snif_sig_a2_len; /*24/24/26*/
   /*VHT/HE*/
   u32* snif_sig_b;
   u16 snif_sig_b_len; /*max29/N*/
   struct plcp_hdr_vht_sig_b_info plcp_hdr_vht_sig_b_i;
};
 
struct bb_info;
/*@--------------------------[Prptotype]-------------------------------------*/
void halbb_sniffer_mode_en(struct bb_info *bb, bool en);
 
 
#endif