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