xref: /wlan-driver/fw-api/hw/qca5332/vht_sig_b_su40_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2022, 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 _VHT_SIG_B_SU40_INFO_H_
27 #define _VHT_SIG_B_SU40_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_VHT_SIG_B_SU40_INFO 2
32 
33 
34 struct vht_sig_b_su40_info {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t length                                                  : 19, // [18:0]
37                       vhtb_reserved                                           :  2, // [20:19]
38                       tail                                                    :  6, // [26:21]
39                       reserved                                                :  4, // [30:27]
40                       rx_ndp                                                  :  1; // [31:31]
41              uint32_t length_copy                                             : 19, // [18:0]
42                       vhtb_reserved_copy                                      :  2, // [20:19]
43                       tail_copy                                               :  6, // [26:21]
44                       reserved_copy                                           :  4, // [30:27]
45                       rx_ndp_copy                                             :  1; // [31:31]
46 #else
47              uint32_t rx_ndp                                                  :  1, // [31:31]
48                       reserved                                                :  4, // [30:27]
49                       tail                                                    :  6, // [26:21]
50                       vhtb_reserved                                           :  2, // [20:19]
51                       length                                                  : 19; // [18:0]
52              uint32_t rx_ndp_copy                                             :  1, // [31:31]
53                       reserved_copy                                           :  4, // [30:27]
54                       tail_copy                                               :  6, // [26:21]
55                       vhtb_reserved_copy                                      :  2, // [20:19]
56                       length_copy                                             : 19; // [18:0]
57 #endif
58 };
59 
60 
61 /* Description		LENGTH
62 
63 			VHT-SIG-B Length (in units of 4 octets) = ceiling (LENGTH/4)
64 
65 			<legal all>
66 */
67 
68 #define VHT_SIG_B_SU40_INFO_LENGTH_OFFSET                                           0x00000000
69 #define VHT_SIG_B_SU40_INFO_LENGTH_LSB                                              0
70 #define VHT_SIG_B_SU40_INFO_LENGTH_MSB                                              18
71 #define VHT_SIG_B_SU40_INFO_LENGTH_MASK                                             0x0007ffff
72 
73 
74 /* Description		VHTB_RESERVED
75 
76 			Reserved:  Set  to all ones and ignored on receive  <legal
77 			 3>
78 */
79 
80 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_OFFSET                                    0x00000000
81 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_LSB                                       19
82 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_MSB                                       20
83 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_MASK                                      0x00180000
84 
85 
86 /* Description		TAIL
87 
88 			Used to terminate the trellis of the convolutional decoder.
89 
90 			Set to 0.  <legal 0>
91 */
92 
93 #define VHT_SIG_B_SU40_INFO_TAIL_OFFSET                                             0x00000000
94 #define VHT_SIG_B_SU40_INFO_TAIL_LSB                                                21
95 #define VHT_SIG_B_SU40_INFO_TAIL_MSB                                                26
96 #define VHT_SIG_B_SU40_INFO_TAIL_MASK                                               0x07e00000
97 
98 
99 /* Description		RESERVED
100 
101 			Not part of VHT-SIG-B.
102 			Reserved: Set to 0 and ignored on receive  <legal 0>
103 */
104 
105 #define VHT_SIG_B_SU40_INFO_RESERVED_OFFSET                                         0x00000000
106 #define VHT_SIG_B_SU40_INFO_RESERVED_LSB                                            27
107 #define VHT_SIG_B_SU40_INFO_RESERVED_MSB                                            30
108 #define VHT_SIG_B_SU40_INFO_RESERVED_MASK                                           0x78000000
109 
110 
111 /* Description		RX_NDP
112 
113 			Not part of VHT-SIG-B.
114 			Used to identify received NDP frame
115 			<legal 0,1>
116 */
117 
118 #define VHT_SIG_B_SU40_INFO_RX_NDP_OFFSET                                           0x00000000
119 #define VHT_SIG_B_SU40_INFO_RX_NDP_LSB                                              31
120 #define VHT_SIG_B_SU40_INFO_RX_NDP_MSB                                              31
121 #define VHT_SIG_B_SU40_INFO_RX_NDP_MASK                                             0x80000000
122 
123 
124 /* Description		LENGTH_COPY
125 
126 			Same as "length" <legal all>
127 */
128 
129 #define VHT_SIG_B_SU40_INFO_LENGTH_COPY_OFFSET                                      0x00000004
130 #define VHT_SIG_B_SU40_INFO_LENGTH_COPY_LSB                                         0
131 #define VHT_SIG_B_SU40_INFO_LENGTH_COPY_MSB                                         18
132 #define VHT_SIG_B_SU40_INFO_LENGTH_COPY_MASK                                        0x0007ffff
133 
134 
135 /* Description		VHTB_RESERVED_COPY
136 
137 			Same as "vhtb_reserved"  <legal 3>
138 */
139 
140 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_COPY_OFFSET                               0x00000004
141 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_COPY_LSB                                  19
142 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_COPY_MSB                                  20
143 #define VHT_SIG_B_SU40_INFO_VHTB_RESERVED_COPY_MASK                                 0x00180000
144 
145 
146 /* Description		TAIL_COPY
147 
148 			Same as "tail"  <legal 0>
149 */
150 
151 #define VHT_SIG_B_SU40_INFO_TAIL_COPY_OFFSET                                        0x00000004
152 #define VHT_SIG_B_SU40_INFO_TAIL_COPY_LSB                                           21
153 #define VHT_SIG_B_SU40_INFO_TAIL_COPY_MSB                                           26
154 #define VHT_SIG_B_SU40_INFO_TAIL_COPY_MASK                                          0x07e00000
155 
156 
157 /* Description		RESERVED_COPY
158 
159 			Same as "reserved"  <legal 0>
160 */
161 
162 #define VHT_SIG_B_SU40_INFO_RESERVED_COPY_OFFSET                                    0x00000004
163 #define VHT_SIG_B_SU40_INFO_RESERVED_COPY_LSB                                       27
164 #define VHT_SIG_B_SU40_INFO_RESERVED_COPY_MSB                                       30
165 #define VHT_SIG_B_SU40_INFO_RESERVED_COPY_MASK                                      0x78000000
166 
167 
168 /* Description		RX_NDP_COPY
169 
170 			Not part of VHT-SIG-B.
171 			Used to identify received NDP frame
172 			<legal 0,1>
173 */
174 
175 #define VHT_SIG_B_SU40_INFO_RX_NDP_COPY_OFFSET                                      0x00000004
176 #define VHT_SIG_B_SU40_INFO_RX_NDP_COPY_LSB                                         31
177 #define VHT_SIG_B_SU40_INFO_RX_NDP_COPY_MSB                                         31
178 #define VHT_SIG_B_SU40_INFO_RX_NDP_COPY_MASK                                        0x80000000
179 
180 
181 
182 #endif   // VHT_SIG_B_SU40_INFO
183