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