xref: /wlan-driver/fw-api/hw/qcn6432/mactx_he_sig_b2_ofdma.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 _MACTX_HE_SIG_B2_OFDMA_H_
18 #define _MACTX_HE_SIG_B2_OFDMA_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 #include "he_sig_b2_ofdma_info.h"
23 #define NUM_OF_DWORDS_MACTX_HE_SIG_B2_OFDMA 2
24 
25 #define NUM_OF_QWORDS_MACTX_HE_SIG_B2_OFDMA 1
26 
27 
28 struct mactx_he_sig_b2_ofdma {
29 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
30              struct   he_sig_b2_ofdma_info                                      mactx_he_sig_b2_ofdma_info_details;
31 #else
32              struct   he_sig_b2_ofdma_info                                      mactx_he_sig_b2_ofdma_info_details;
33 #endif
34 };
35 
36 
37 /* Description		MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS
38 
39 			See detailed description of the STRUCT
40 */
41 
42 
43 /* Description		STA_ID
44 
45 			Identifies the STA that is addressed. Details of STA ID
46 			are TBD
47 */
48 
49 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_ID_OFFSET      0x0000000000000000
50 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_ID_LSB         0
51 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_ID_MSB         10
52 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_ID_MASK        0x00000000000007ff
53 
54 
55 /* Description		NSTS
56 
57 			MAC RX side usage only:
58 
59 			Number of spatial streams for this user
60 
61 			<enum 0 1_spatial_stream>Single spatial stream
62 			<enum 1 2_spatial_streams>2 spatial streams
63 			<enum 2 3_spatial_streams>3 spatial streams
64 			<enum 3 4_spatial_streams>4 spatial streams
65 			<enum 4 5_spatial_streams>5 spatial streams
66 			<enum 5 6_spatial_streams>6 spatial streams
67 			<enum 6 7_spatial_streams>7 spatial streams
68 			<enum 7 8_spatial_streams>8 spatial streams
69 */
70 
71 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_NSTS_OFFSET        0x0000000000000000
72 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_NSTS_LSB           11
73 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_NSTS_MSB           13
74 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_NSTS_MASK          0x0000000000003800
75 
76 
77 /* Description		TXBF
78 
79 			Indicates whether beamforming is applied
80 			0: No beamforming
81 			1: beamforming
82 			<legal all>
83 */
84 
85 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_TXBF_OFFSET        0x0000000000000000
86 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_TXBF_LSB           14
87 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_TXBF_MSB           14
88 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_TXBF_MASK          0x0000000000004000
89 
90 
91 /* Description		STA_MCS
92 
93 			Indicates the data MCS
94 */
95 
96 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_MCS_OFFSET     0x0000000000000000
97 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_MCS_LSB        15
98 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_MCS_MSB        18
99 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_MCS_MASK       0x0000000000078000
100 
101 
102 /* Description		STA_DCM
103 
104 			Indicates whether dual sub-carrier modulation is applied
105 
106 			0: No DCM
107 			1:DCM
108 			<legal all>
109 */
110 
111 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_DCM_OFFSET     0x0000000000000000
112 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_DCM_LSB        19
113 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_DCM_MSB        19
114 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_DCM_MASK       0x0000000000080000
115 
116 
117 /* Description		STA_CODING
118 
119 			Distinguishes between BCC/LDPC
120 
121 			0: BCC
122 			1: LDPC
123 			<legal all>
124 */
125 
126 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_CODING_OFFSET  0x0000000000000000
127 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_CODING_LSB     20
128 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_CODING_MSB     20
129 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_STA_CODING_MASK    0x0000000000100000
130 
131 
132 /* Description		RESERVED_0
133 
134 			<legal 0>
135 */
136 
137 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_0_OFFSET  0x0000000000000000
138 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_0_LSB     21
139 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_0_MSB     30
140 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_0_MASK    0x000000007fe00000
141 
142 
143 /* Description		RX_INTEGRITY_CHECK_PASSED
144 
145 			TX side: Set to 0
146 			RX side: Set to 1 if PHY determines the CRC check of the
147 			 codeblock containing this HE-SIG-B user info has passed,
148 			else set to 0
149 
150 			<legal all>
151 */
152 
153 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000
154 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 31
155 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 31
156 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x0000000080000000
157 
158 
159 /* Description		USER_ORDER
160 
161 			RX side: Set to 0
162 			TX side: Ordering index of the User field
163 			Gaps between the ordering indices of User fields indicate
164 			 that the microcode shall generate "unallocated RU" User
165 			 fields (STAID=2046) to fill the gaps.
166 			<legal all>
167 */
168 
169 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_USER_ORDER_OFFSET  0x0000000000000000
170 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_USER_ORDER_LSB     32
171 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_USER_ORDER_MSB     39
172 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_USER_ORDER_MASK    0x000000ff00000000
173 
174 
175 /* Description		CC_MASK
176 
177 			RX side: Set to 0
178 			TX side: Indicates what content channel this User field
179 			can go to
180 			Bit 0: content channel 0
181 			Bit 1: content channel 1
182 			The other bits are unused, but could repeat the above pattern
183 			 for compatibility with 'EHT_SIG_USR_OFDMA_INFO.'
184 			<legal all>
185 */
186 
187 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_CC_MASK_OFFSET     0x0000000000000000
188 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_CC_MASK_LSB        40
189 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_CC_MASK_MSB        47
190 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_CC_MASK_MASK       0x0000ff0000000000
191 
192 
193 /* Description		RESERVED_1A
194 
195 			<legal 0>
196 */
197 
198 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_1A_OFFSET 0x0000000000000000
199 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_1A_LSB    48
200 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_1A_MSB    63
201 #define MACTX_HE_SIG_B2_OFDMA_MACTX_HE_SIG_B2_OFDMA_INFO_DETAILS_RESERVED_1A_MASK   0xffff000000000000
202 
203 
204 
205 #endif   // MACTX_HE_SIG_B2_OFDMA
206