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