xref: /wlan-driver/fw-api/hw/kiwi/v2/he_sig_a_su_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /*
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 
21 
22 #ifndef _HE_SIG_A_SU_INFO_H_
23 #define _HE_SIG_A_SU_INFO_H_
24 #if !defined(__ASSEMBLER__)
25 #endif
26 
27 #define NUM_OF_DWORDS_HE_SIG_A_SU_INFO 2
28 
29 struct he_sig_a_su_info {
30 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
31              uint32_t format_indication                                       :  1,
32                       beam_change                                             :  1,
33                       dl_ul_flag                                              :  1,
34                       transmit_mcs                                            :  4,
35                       dcm                                                     :  1,
36                       bss_color_id                                            :  6,
37                       reserved_0a                                             :  1,
38                       spatial_reuse                                           :  4,
39                       transmit_bw                                             :  2,
40                       cp_ltf_size                                             :  2,
41                       nsts                                                    :  3,
42                       reserved_0b                                             :  6;
43              uint32_t txop_duration                                           :  7,
44                       coding                                                  :  1,
45                       ldpc_extra_symbol                                       :  1,
46                       stbc                                                    :  1,
47                       txbf                                                    :  1,
48                       packet_extension_a_factor                               :  2,
49                       packet_extension_pe_disambiguity                        :  1,
50                       reserved_1a                                             :  1,
51                       doppler_indication                                      :  1,
52                       crc                                                     :  4,
53                       tail                                                    :  6,
54                       dot11ax_su_extended                                     :  1,
55                       dot11ax_ext_ru_size                                     :  3,
56                       rx_ndp                                                  :  1,
57                       rx_integrity_check_passed                               :  1;
58 #else
59              uint32_t reserved_0b                                             :  6,
60                       nsts                                                    :  3,
61                       cp_ltf_size                                             :  2,
62                       transmit_bw                                             :  2,
63                       spatial_reuse                                           :  4,
64                       reserved_0a                                             :  1,
65                       bss_color_id                                            :  6,
66                       dcm                                                     :  1,
67                       transmit_mcs                                            :  4,
68                       dl_ul_flag                                              :  1,
69                       beam_change                                             :  1,
70                       format_indication                                       :  1;
71              uint32_t rx_integrity_check_passed                               :  1,
72                       rx_ndp                                                  :  1,
73                       dot11ax_ext_ru_size                                     :  3,
74                       dot11ax_su_extended                                     :  1,
75                       tail                                                    :  6,
76                       crc                                                     :  4,
77                       doppler_indication                                      :  1,
78                       reserved_1a                                             :  1,
79                       packet_extension_pe_disambiguity                        :  1,
80                       packet_extension_a_factor                               :  2,
81                       txbf                                                    :  1,
82                       stbc                                                    :  1,
83                       ldpc_extra_symbol                                       :  1,
84                       coding                                                  :  1,
85                       txop_duration                                           :  7;
86 #endif
87 };
88 
89 #define HE_SIG_A_SU_INFO_FORMAT_INDICATION_OFFSET                                   0x00000000
90 #define HE_SIG_A_SU_INFO_FORMAT_INDICATION_LSB                                      0
91 #define HE_SIG_A_SU_INFO_FORMAT_INDICATION_MSB                                      0
92 #define HE_SIG_A_SU_INFO_FORMAT_INDICATION_MASK                                     0x00000001
93 
94 #define HE_SIG_A_SU_INFO_BEAM_CHANGE_OFFSET                                         0x00000000
95 #define HE_SIG_A_SU_INFO_BEAM_CHANGE_LSB                                            1
96 #define HE_SIG_A_SU_INFO_BEAM_CHANGE_MSB                                            1
97 #define HE_SIG_A_SU_INFO_BEAM_CHANGE_MASK                                           0x00000002
98 
99 #define HE_SIG_A_SU_INFO_DL_UL_FLAG_OFFSET                                          0x00000000
100 #define HE_SIG_A_SU_INFO_DL_UL_FLAG_LSB                                             2
101 #define HE_SIG_A_SU_INFO_DL_UL_FLAG_MSB                                             2
102 #define HE_SIG_A_SU_INFO_DL_UL_FLAG_MASK                                            0x00000004
103 
104 #define HE_SIG_A_SU_INFO_TRANSMIT_MCS_OFFSET                                        0x00000000
105 #define HE_SIG_A_SU_INFO_TRANSMIT_MCS_LSB                                           3
106 #define HE_SIG_A_SU_INFO_TRANSMIT_MCS_MSB                                           6
107 #define HE_SIG_A_SU_INFO_TRANSMIT_MCS_MASK                                          0x00000078
108 
109 #define HE_SIG_A_SU_INFO_DCM_OFFSET                                                 0x00000000
110 #define HE_SIG_A_SU_INFO_DCM_LSB                                                    7
111 #define HE_SIG_A_SU_INFO_DCM_MSB                                                    7
112 #define HE_SIG_A_SU_INFO_DCM_MASK                                                   0x00000080
113 
114 #define HE_SIG_A_SU_INFO_BSS_COLOR_ID_OFFSET                                        0x00000000
115 #define HE_SIG_A_SU_INFO_BSS_COLOR_ID_LSB                                           8
116 #define HE_SIG_A_SU_INFO_BSS_COLOR_ID_MSB                                           13
117 #define HE_SIG_A_SU_INFO_BSS_COLOR_ID_MASK                                          0x00003f00
118 
119 #define HE_SIG_A_SU_INFO_RESERVED_0A_OFFSET                                         0x00000000
120 #define HE_SIG_A_SU_INFO_RESERVED_0A_LSB                                            14
121 #define HE_SIG_A_SU_INFO_RESERVED_0A_MSB                                            14
122 #define HE_SIG_A_SU_INFO_RESERVED_0A_MASK                                           0x00004000
123 
124 #define HE_SIG_A_SU_INFO_SPATIAL_REUSE_OFFSET                                       0x00000000
125 #define HE_SIG_A_SU_INFO_SPATIAL_REUSE_LSB                                          15
126 #define HE_SIG_A_SU_INFO_SPATIAL_REUSE_MSB                                          18
127 #define HE_SIG_A_SU_INFO_SPATIAL_REUSE_MASK                                         0x00078000
128 
129 #define HE_SIG_A_SU_INFO_TRANSMIT_BW_OFFSET                                         0x00000000
130 #define HE_SIG_A_SU_INFO_TRANSMIT_BW_LSB                                            19
131 #define HE_SIG_A_SU_INFO_TRANSMIT_BW_MSB                                            20
132 #define HE_SIG_A_SU_INFO_TRANSMIT_BW_MASK                                           0x00180000
133 
134 #define HE_SIG_A_SU_INFO_CP_LTF_SIZE_OFFSET                                         0x00000000
135 #define HE_SIG_A_SU_INFO_CP_LTF_SIZE_LSB                                            21
136 #define HE_SIG_A_SU_INFO_CP_LTF_SIZE_MSB                                            22
137 #define HE_SIG_A_SU_INFO_CP_LTF_SIZE_MASK                                           0x00600000
138 
139 #define HE_SIG_A_SU_INFO_NSTS_OFFSET                                                0x00000000
140 #define HE_SIG_A_SU_INFO_NSTS_LSB                                                   23
141 #define HE_SIG_A_SU_INFO_NSTS_MSB                                                   25
142 #define HE_SIG_A_SU_INFO_NSTS_MASK                                                  0x03800000
143 
144 #define HE_SIG_A_SU_INFO_RESERVED_0B_OFFSET                                         0x00000000
145 #define HE_SIG_A_SU_INFO_RESERVED_0B_LSB                                            26
146 #define HE_SIG_A_SU_INFO_RESERVED_0B_MSB                                            31
147 #define HE_SIG_A_SU_INFO_RESERVED_0B_MASK                                           0xfc000000
148 
149 #define HE_SIG_A_SU_INFO_TXOP_DURATION_OFFSET                                       0x00000004
150 #define HE_SIG_A_SU_INFO_TXOP_DURATION_LSB                                          0
151 #define HE_SIG_A_SU_INFO_TXOP_DURATION_MSB                                          6
152 #define HE_SIG_A_SU_INFO_TXOP_DURATION_MASK                                         0x0000007f
153 
154 #define HE_SIG_A_SU_INFO_CODING_OFFSET                                              0x00000004
155 #define HE_SIG_A_SU_INFO_CODING_LSB                                                 7
156 #define HE_SIG_A_SU_INFO_CODING_MSB                                                 7
157 #define HE_SIG_A_SU_INFO_CODING_MASK                                                0x00000080
158 
159 #define HE_SIG_A_SU_INFO_LDPC_EXTRA_SYMBOL_OFFSET                                   0x00000004
160 #define HE_SIG_A_SU_INFO_LDPC_EXTRA_SYMBOL_LSB                                      8
161 #define HE_SIG_A_SU_INFO_LDPC_EXTRA_SYMBOL_MSB                                      8
162 #define HE_SIG_A_SU_INFO_LDPC_EXTRA_SYMBOL_MASK                                     0x00000100
163 
164 #define HE_SIG_A_SU_INFO_STBC_OFFSET                                                0x00000004
165 #define HE_SIG_A_SU_INFO_STBC_LSB                                                   9
166 #define HE_SIG_A_SU_INFO_STBC_MSB                                                   9
167 #define HE_SIG_A_SU_INFO_STBC_MASK                                                  0x00000200
168 
169 #define HE_SIG_A_SU_INFO_TXBF_OFFSET                                                0x00000004
170 #define HE_SIG_A_SU_INFO_TXBF_LSB                                                   10
171 #define HE_SIG_A_SU_INFO_TXBF_MSB                                                   10
172 #define HE_SIG_A_SU_INFO_TXBF_MASK                                                  0x00000400
173 
174 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_A_FACTOR_OFFSET                           0x00000004
175 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_A_FACTOR_LSB                              11
176 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_A_FACTOR_MSB                              12
177 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_A_FACTOR_MASK                             0x00001800
178 
179 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_OFFSET                    0x00000004
180 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_LSB                       13
181 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_MSB                       13
182 #define HE_SIG_A_SU_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_MASK                      0x00002000
183 
184 #define HE_SIG_A_SU_INFO_RESERVED_1A_OFFSET                                         0x00000004
185 #define HE_SIG_A_SU_INFO_RESERVED_1A_LSB                                            14
186 #define HE_SIG_A_SU_INFO_RESERVED_1A_MSB                                            14
187 #define HE_SIG_A_SU_INFO_RESERVED_1A_MASK                                           0x00004000
188 
189 #define HE_SIG_A_SU_INFO_DOPPLER_INDICATION_OFFSET                                  0x00000004
190 #define HE_SIG_A_SU_INFO_DOPPLER_INDICATION_LSB                                     15
191 #define HE_SIG_A_SU_INFO_DOPPLER_INDICATION_MSB                                     15
192 #define HE_SIG_A_SU_INFO_DOPPLER_INDICATION_MASK                                    0x00008000
193 
194 #define HE_SIG_A_SU_INFO_CRC_OFFSET                                                 0x00000004
195 #define HE_SIG_A_SU_INFO_CRC_LSB                                                    16
196 #define HE_SIG_A_SU_INFO_CRC_MSB                                                    19
197 #define HE_SIG_A_SU_INFO_CRC_MASK                                                   0x000f0000
198 
199 #define HE_SIG_A_SU_INFO_TAIL_OFFSET                                                0x00000004
200 #define HE_SIG_A_SU_INFO_TAIL_LSB                                                   20
201 #define HE_SIG_A_SU_INFO_TAIL_MSB                                                   25
202 #define HE_SIG_A_SU_INFO_TAIL_MASK                                                  0x03f00000
203 
204 #define HE_SIG_A_SU_INFO_DOT11AX_SU_EXTENDED_OFFSET                                 0x00000004
205 #define HE_SIG_A_SU_INFO_DOT11AX_SU_EXTENDED_LSB                                    26
206 #define HE_SIG_A_SU_INFO_DOT11AX_SU_EXTENDED_MSB                                    26
207 #define HE_SIG_A_SU_INFO_DOT11AX_SU_EXTENDED_MASK                                   0x04000000
208 
209 #define HE_SIG_A_SU_INFO_DOT11AX_EXT_RU_SIZE_OFFSET                                 0x00000004
210 #define HE_SIG_A_SU_INFO_DOT11AX_EXT_RU_SIZE_LSB                                    27
211 #define HE_SIG_A_SU_INFO_DOT11AX_EXT_RU_SIZE_MSB                                    29
212 #define HE_SIG_A_SU_INFO_DOT11AX_EXT_RU_SIZE_MASK                                   0x38000000
213 
214 #define HE_SIG_A_SU_INFO_RX_NDP_OFFSET                                              0x00000004
215 #define HE_SIG_A_SU_INFO_RX_NDP_LSB                                                 30
216 #define HE_SIG_A_SU_INFO_RX_NDP_MSB                                                 30
217 #define HE_SIG_A_SU_INFO_RX_NDP_MASK                                                0x40000000
218 
219 #define HE_SIG_A_SU_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                           0x00000004
220 #define HE_SIG_A_SU_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                              31
221 #define HE_SIG_A_SU_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                              31
222 #define HE_SIG_A_SU_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                             0x80000000
223 
224 #endif
225