xref: /wlan-driver/fw-api/hw/qcn9224/v1/ht_sig_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2021, 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 
19 
20 
21 
22 
23 
24 
25 
26 #ifndef _HT_SIG_INFO_H_
27 #define _HT_SIG_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_HT_SIG_INFO 2
32 
33 
34 struct ht_sig_info {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t mcs                                                     :  7,
37                       cbw                                                     :  1,
38                       length                                                  : 16,
39                       reserved_0                                              :  8;
40              uint32_t smoothing                                               :  1,
41                       not_sounding                                            :  1,
42                       ht_reserved                                             :  1,
43                       aggregation                                             :  1,
44                       stbc                                                    :  2,
45                       fec_coding                                              :  1,
46                       short_gi                                                :  1,
47                       num_ext_sp_str                                          :  2,
48                       crc                                                     :  8,
49                       signal_tail                                             :  6,
50                       reserved_1                                              :  7,
51                       rx_integrity_check_passed                               :  1;
52 #else
53              uint32_t reserved_0                                              :  8,
54                       length                                                  : 16,
55                       cbw                                                     :  1,
56                       mcs                                                     :  7;
57              uint32_t rx_integrity_check_passed                               :  1,
58                       reserved_1                                              :  7,
59                       signal_tail                                             :  6,
60                       crc                                                     :  8,
61                       num_ext_sp_str                                          :  2,
62                       short_gi                                                :  1,
63                       fec_coding                                              :  1,
64                       stbc                                                    :  2,
65                       aggregation                                             :  1,
66                       ht_reserved                                             :  1,
67                       not_sounding                                            :  1,
68                       smoothing                                               :  1;
69 #endif
70 };
71 
72 
73 
74 
75 #define HT_SIG_INFO_MCS_OFFSET                                                      0x00000000
76 #define HT_SIG_INFO_MCS_LSB                                                         0
77 #define HT_SIG_INFO_MCS_MSB                                                         6
78 #define HT_SIG_INFO_MCS_MASK                                                        0x0000007f
79 
80 
81 
82 
83 #define HT_SIG_INFO_CBW_OFFSET                                                      0x00000000
84 #define HT_SIG_INFO_CBW_LSB                                                         7
85 #define HT_SIG_INFO_CBW_MSB                                                         7
86 #define HT_SIG_INFO_CBW_MASK                                                        0x00000080
87 
88 
89 
90 
91 #define HT_SIG_INFO_LENGTH_OFFSET                                                   0x00000000
92 #define HT_SIG_INFO_LENGTH_LSB                                                      8
93 #define HT_SIG_INFO_LENGTH_MSB                                                      23
94 #define HT_SIG_INFO_LENGTH_MASK                                                     0x00ffff00
95 
96 
97 
98 
99 #define HT_SIG_INFO_RESERVED_0_OFFSET                                               0x00000000
100 #define HT_SIG_INFO_RESERVED_0_LSB                                                  24
101 #define HT_SIG_INFO_RESERVED_0_MSB                                                  31
102 #define HT_SIG_INFO_RESERVED_0_MASK                                                 0xff000000
103 
104 
105 
106 
107 #define HT_SIG_INFO_SMOOTHING_OFFSET                                                0x00000004
108 #define HT_SIG_INFO_SMOOTHING_LSB                                                   0
109 #define HT_SIG_INFO_SMOOTHING_MSB                                                   0
110 #define HT_SIG_INFO_SMOOTHING_MASK                                                  0x00000001
111 
112 
113 
114 
115 #define HT_SIG_INFO_NOT_SOUNDING_OFFSET                                             0x00000004
116 #define HT_SIG_INFO_NOT_SOUNDING_LSB                                                1
117 #define HT_SIG_INFO_NOT_SOUNDING_MSB                                                1
118 #define HT_SIG_INFO_NOT_SOUNDING_MASK                                               0x00000002
119 
120 
121 
122 
123 #define HT_SIG_INFO_HT_RESERVED_OFFSET                                              0x00000004
124 #define HT_SIG_INFO_HT_RESERVED_LSB                                                 2
125 #define HT_SIG_INFO_HT_RESERVED_MSB                                                 2
126 #define HT_SIG_INFO_HT_RESERVED_MASK                                                0x00000004
127 
128 
129 
130 
131 #define HT_SIG_INFO_AGGREGATION_OFFSET                                              0x00000004
132 #define HT_SIG_INFO_AGGREGATION_LSB                                                 3
133 #define HT_SIG_INFO_AGGREGATION_MSB                                                 3
134 #define HT_SIG_INFO_AGGREGATION_MASK                                                0x00000008
135 
136 
137 
138 
139 #define HT_SIG_INFO_STBC_OFFSET                                                     0x00000004
140 #define HT_SIG_INFO_STBC_LSB                                                        4
141 #define HT_SIG_INFO_STBC_MSB                                                        5
142 #define HT_SIG_INFO_STBC_MASK                                                       0x00000030
143 
144 
145 
146 
147 #define HT_SIG_INFO_FEC_CODING_OFFSET                                               0x00000004
148 #define HT_SIG_INFO_FEC_CODING_LSB                                                  6
149 #define HT_SIG_INFO_FEC_CODING_MSB                                                  6
150 #define HT_SIG_INFO_FEC_CODING_MASK                                                 0x00000040
151 
152 
153 
154 
155 #define HT_SIG_INFO_SHORT_GI_OFFSET                                                 0x00000004
156 #define HT_SIG_INFO_SHORT_GI_LSB                                                    7
157 #define HT_SIG_INFO_SHORT_GI_MSB                                                    7
158 #define HT_SIG_INFO_SHORT_GI_MASK                                                   0x00000080
159 
160 
161 
162 
163 #define HT_SIG_INFO_NUM_EXT_SP_STR_OFFSET                                           0x00000004
164 #define HT_SIG_INFO_NUM_EXT_SP_STR_LSB                                              8
165 #define HT_SIG_INFO_NUM_EXT_SP_STR_MSB                                              9
166 #define HT_SIG_INFO_NUM_EXT_SP_STR_MASK                                             0x00000300
167 
168 
169 
170 
171 #define HT_SIG_INFO_CRC_OFFSET                                                      0x00000004
172 #define HT_SIG_INFO_CRC_LSB                                                         10
173 #define HT_SIG_INFO_CRC_MSB                                                         17
174 #define HT_SIG_INFO_CRC_MASK                                                        0x0003fc00
175 
176 
177 
178 
179 #define HT_SIG_INFO_SIGNAL_TAIL_OFFSET                                              0x00000004
180 #define HT_SIG_INFO_SIGNAL_TAIL_LSB                                                 18
181 #define HT_SIG_INFO_SIGNAL_TAIL_MSB                                                 23
182 #define HT_SIG_INFO_SIGNAL_TAIL_MASK                                                0x00fc0000
183 
184 
185 
186 
187 #define HT_SIG_INFO_RESERVED_1_OFFSET                                               0x00000004
188 #define HT_SIG_INFO_RESERVED_1_LSB                                                  24
189 #define HT_SIG_INFO_RESERVED_1_MSB                                                  30
190 #define HT_SIG_INFO_RESERVED_1_MASK                                                 0x7f000000
191 
192 
193 
194 
195 #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                                0x00000004
196 #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                                   31
197 #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                                   31
198 #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                                  0x80000000
199 
200 
201 
202 #endif
203