xref: /wlan-driver/fw-api/hw/peach/v2/he_sig_a_mu_dl_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 
18 #ifndef _HE_SIG_A_MU_DL_INFO_H_
19 #define _HE_SIG_A_MU_DL_INFO_H_
20 
21 #define NUM_OF_DWORDS_HE_SIG_A_MU_DL_INFO 2
22 
23 struct he_sig_a_mu_dl_info {
24 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25              uint32_t dl_ul_flag                                              :  1,
26                       mcs_of_sig_b                                            :  3,
27                       dcm_of_sig_b                                            :  1,
28                       bss_color_id                                            :  6,
29                       spatial_reuse                                           :  4,
30                       transmit_bw                                             :  3,
31                       num_sig_b_symbols                                       :  4,
32                       comp_mode_sig_b                                         :  1,
33                       cp_ltf_size                                             :  2,
34                       doppler_indication                                      :  1,
35                       reserved_0a                                             :  6;
36              uint32_t txop_duration                                           :  7,
37                       reserved_1a                                             :  1,
38                       num_ltf_symbols                                         :  3,
39                       ldpc_extra_symbol                                       :  1,
40                       stbc                                                    :  1,
41                       packet_extension_a_factor                               :  2,
42                       packet_extension_pe_disambiguity                        :  1,
43                       crc                                                     :  4,
44                       tail                                                    :  6,
45                       reserved_1b                                             :  5,
46                       rx_integrity_check_passed                               :  1;
47 #else
48              uint32_t reserved_0a                                             :  6,
49                       doppler_indication                                      :  1,
50                       cp_ltf_size                                             :  2,
51                       comp_mode_sig_b                                         :  1,
52                       num_sig_b_symbols                                       :  4,
53                       transmit_bw                                             :  3,
54                       spatial_reuse                                           :  4,
55                       bss_color_id                                            :  6,
56                       dcm_of_sig_b                                            :  1,
57                       mcs_of_sig_b                                            :  3,
58                       dl_ul_flag                                              :  1;
59              uint32_t rx_integrity_check_passed                               :  1,
60                       reserved_1b                                             :  5,
61                       tail                                                    :  6,
62                       crc                                                     :  4,
63                       packet_extension_pe_disambiguity                        :  1,
64                       packet_extension_a_factor                               :  2,
65                       stbc                                                    :  1,
66                       ldpc_extra_symbol                                       :  1,
67                       num_ltf_symbols                                         :  3,
68                       reserved_1a                                             :  1,
69                       txop_duration                                           :  7;
70 #endif
71 };
72 
73 #define HE_SIG_A_MU_DL_INFO_DL_UL_FLAG_OFFSET                                       0x00000000
74 #define HE_SIG_A_MU_DL_INFO_DL_UL_FLAG_LSB                                          0
75 #define HE_SIG_A_MU_DL_INFO_DL_UL_FLAG_MSB                                          0
76 #define HE_SIG_A_MU_DL_INFO_DL_UL_FLAG_MASK                                         0x00000001
77 
78 #define HE_SIG_A_MU_DL_INFO_MCS_OF_SIG_B_OFFSET                                     0x00000000
79 #define HE_SIG_A_MU_DL_INFO_MCS_OF_SIG_B_LSB                                        1
80 #define HE_SIG_A_MU_DL_INFO_MCS_OF_SIG_B_MSB                                        3
81 #define HE_SIG_A_MU_DL_INFO_MCS_OF_SIG_B_MASK                                       0x0000000e
82 
83 #define HE_SIG_A_MU_DL_INFO_DCM_OF_SIG_B_OFFSET                                     0x00000000
84 #define HE_SIG_A_MU_DL_INFO_DCM_OF_SIG_B_LSB                                        4
85 #define HE_SIG_A_MU_DL_INFO_DCM_OF_SIG_B_MSB                                        4
86 #define HE_SIG_A_MU_DL_INFO_DCM_OF_SIG_B_MASK                                       0x00000010
87 
88 #define HE_SIG_A_MU_DL_INFO_BSS_COLOR_ID_OFFSET                                     0x00000000
89 #define HE_SIG_A_MU_DL_INFO_BSS_COLOR_ID_LSB                                        5
90 #define HE_SIG_A_MU_DL_INFO_BSS_COLOR_ID_MSB                                        10
91 #define HE_SIG_A_MU_DL_INFO_BSS_COLOR_ID_MASK                                       0x000007e0
92 
93 #define HE_SIG_A_MU_DL_INFO_SPATIAL_REUSE_OFFSET                                    0x00000000
94 #define HE_SIG_A_MU_DL_INFO_SPATIAL_REUSE_LSB                                       11
95 #define HE_SIG_A_MU_DL_INFO_SPATIAL_REUSE_MSB                                       14
96 #define HE_SIG_A_MU_DL_INFO_SPATIAL_REUSE_MASK                                      0x00007800
97 
98 #define HE_SIG_A_MU_DL_INFO_TRANSMIT_BW_OFFSET                                      0x00000000
99 #define HE_SIG_A_MU_DL_INFO_TRANSMIT_BW_LSB                                         15
100 #define HE_SIG_A_MU_DL_INFO_TRANSMIT_BW_MSB                                         17
101 #define HE_SIG_A_MU_DL_INFO_TRANSMIT_BW_MASK                                        0x00038000
102 
103 #define HE_SIG_A_MU_DL_INFO_NUM_SIG_B_SYMBOLS_OFFSET                                0x00000000
104 #define HE_SIG_A_MU_DL_INFO_NUM_SIG_B_SYMBOLS_LSB                                   18
105 #define HE_SIG_A_MU_DL_INFO_NUM_SIG_B_SYMBOLS_MSB                                   21
106 #define HE_SIG_A_MU_DL_INFO_NUM_SIG_B_SYMBOLS_MASK                                  0x003c0000
107 
108 #define HE_SIG_A_MU_DL_INFO_COMP_MODE_SIG_B_OFFSET                                  0x00000000
109 #define HE_SIG_A_MU_DL_INFO_COMP_MODE_SIG_B_LSB                                     22
110 #define HE_SIG_A_MU_DL_INFO_COMP_MODE_SIG_B_MSB                                     22
111 #define HE_SIG_A_MU_DL_INFO_COMP_MODE_SIG_B_MASK                                    0x00400000
112 
113 #define HE_SIG_A_MU_DL_INFO_CP_LTF_SIZE_OFFSET                                      0x00000000
114 #define HE_SIG_A_MU_DL_INFO_CP_LTF_SIZE_LSB                                         23
115 #define HE_SIG_A_MU_DL_INFO_CP_LTF_SIZE_MSB                                         24
116 #define HE_SIG_A_MU_DL_INFO_CP_LTF_SIZE_MASK                                        0x01800000
117 
118 #define HE_SIG_A_MU_DL_INFO_DOPPLER_INDICATION_OFFSET                               0x00000000
119 #define HE_SIG_A_MU_DL_INFO_DOPPLER_INDICATION_LSB                                  25
120 #define HE_SIG_A_MU_DL_INFO_DOPPLER_INDICATION_MSB                                  25
121 #define HE_SIG_A_MU_DL_INFO_DOPPLER_INDICATION_MASK                                 0x02000000
122 
123 #define HE_SIG_A_MU_DL_INFO_RESERVED_0A_OFFSET                                      0x00000000
124 #define HE_SIG_A_MU_DL_INFO_RESERVED_0A_LSB                                         26
125 #define HE_SIG_A_MU_DL_INFO_RESERVED_0A_MSB                                         31
126 #define HE_SIG_A_MU_DL_INFO_RESERVED_0A_MASK                                        0xfc000000
127 
128 #define HE_SIG_A_MU_DL_INFO_TXOP_DURATION_OFFSET                                    0x00000004
129 #define HE_SIG_A_MU_DL_INFO_TXOP_DURATION_LSB                                       0
130 #define HE_SIG_A_MU_DL_INFO_TXOP_DURATION_MSB                                       6
131 #define HE_SIG_A_MU_DL_INFO_TXOP_DURATION_MASK                                      0x0000007f
132 
133 #define HE_SIG_A_MU_DL_INFO_RESERVED_1A_OFFSET                                      0x00000004
134 #define HE_SIG_A_MU_DL_INFO_RESERVED_1A_LSB                                         7
135 #define HE_SIG_A_MU_DL_INFO_RESERVED_1A_MSB                                         7
136 #define HE_SIG_A_MU_DL_INFO_RESERVED_1A_MASK                                        0x00000080
137 
138 #define HE_SIG_A_MU_DL_INFO_NUM_LTF_SYMBOLS_OFFSET                                  0x00000004
139 #define HE_SIG_A_MU_DL_INFO_NUM_LTF_SYMBOLS_LSB                                     8
140 #define HE_SIG_A_MU_DL_INFO_NUM_LTF_SYMBOLS_MSB                                     10
141 #define HE_SIG_A_MU_DL_INFO_NUM_LTF_SYMBOLS_MASK                                    0x00000700
142 
143 #define HE_SIG_A_MU_DL_INFO_LDPC_EXTRA_SYMBOL_OFFSET                                0x00000004
144 #define HE_SIG_A_MU_DL_INFO_LDPC_EXTRA_SYMBOL_LSB                                   11
145 #define HE_SIG_A_MU_DL_INFO_LDPC_EXTRA_SYMBOL_MSB                                   11
146 #define HE_SIG_A_MU_DL_INFO_LDPC_EXTRA_SYMBOL_MASK                                  0x00000800
147 
148 #define HE_SIG_A_MU_DL_INFO_STBC_OFFSET                                             0x00000004
149 #define HE_SIG_A_MU_DL_INFO_STBC_LSB                                                12
150 #define HE_SIG_A_MU_DL_INFO_STBC_MSB                                                12
151 #define HE_SIG_A_MU_DL_INFO_STBC_MASK                                               0x00001000
152 
153 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_A_FACTOR_OFFSET                        0x00000004
154 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_A_FACTOR_LSB                           13
155 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_A_FACTOR_MSB                           14
156 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_A_FACTOR_MASK                          0x00006000
157 
158 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_OFFSET                 0x00000004
159 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_LSB                    15
160 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_MSB                    15
161 #define HE_SIG_A_MU_DL_INFO_PACKET_EXTENSION_PE_DISAMBIGUITY_MASK                   0x00008000
162 
163 #define HE_SIG_A_MU_DL_INFO_CRC_OFFSET                                              0x00000004
164 #define HE_SIG_A_MU_DL_INFO_CRC_LSB                                                 16
165 #define HE_SIG_A_MU_DL_INFO_CRC_MSB                                                 19
166 #define HE_SIG_A_MU_DL_INFO_CRC_MASK                                                0x000f0000
167 
168 #define HE_SIG_A_MU_DL_INFO_TAIL_OFFSET                                             0x00000004
169 #define HE_SIG_A_MU_DL_INFO_TAIL_LSB                                                20
170 #define HE_SIG_A_MU_DL_INFO_TAIL_MSB                                                25
171 #define HE_SIG_A_MU_DL_INFO_TAIL_MASK                                               0x03f00000
172 
173 #define HE_SIG_A_MU_DL_INFO_RESERVED_1B_OFFSET                                      0x00000004
174 #define HE_SIG_A_MU_DL_INFO_RESERVED_1B_LSB                                         26
175 #define HE_SIG_A_MU_DL_INFO_RESERVED_1B_MSB                                         30
176 #define HE_SIG_A_MU_DL_INFO_RESERVED_1B_MASK                                        0x7c000000
177 
178 #define HE_SIG_A_MU_DL_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                        0x00000004
179 #define HE_SIG_A_MU_DL_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                           31
180 #define HE_SIG_A_MU_DL_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                           31
181 #define HE_SIG_A_MU_DL_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                          0x80000000
182 
183 #endif
184