xref: /wlan-driver/fw-api/hw/qcn6432/he_sig_b2_ofdma_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 _HE_SIG_B2_OFDMA_INFO_H_
18 #define _HE_SIG_B2_OFDMA_INFO_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 #define NUM_OF_DWORDS_HE_SIG_B2_OFDMA_INFO 2
23 
24 
25 struct he_sig_b2_ofdma_info {
26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
27              uint32_t sta_id                                                  : 11, // [10:0]
28                       nsts                                                    :  3, // [13:11]
29                       txbf                                                    :  1, // [14:14]
30                       sta_mcs                                                 :  4, // [18:15]
31                       sta_dcm                                                 :  1, // [19:19]
32                       sta_coding                                              :  1, // [20:20]
33                       reserved_0                                              : 10, // [30:21]
34                       rx_integrity_check_passed                               :  1; // [31:31]
35              uint32_t user_order                                              :  8, // [7:0]
36                       cc_mask                                                 :  8, // [15:8]
37                       reserved_1a                                             : 16; // [31:16]
38 #else
39              uint32_t rx_integrity_check_passed                               :  1, // [31:31]
40                       reserved_0                                              : 10, // [30:21]
41                       sta_coding                                              :  1, // [20:20]
42                       sta_dcm                                                 :  1, // [19:19]
43                       sta_mcs                                                 :  4, // [18:15]
44                       txbf                                                    :  1, // [14:14]
45                       nsts                                                    :  3, // [13:11]
46                       sta_id                                                  : 11; // [10:0]
47              uint32_t reserved_1a                                             : 16, // [31:16]
48                       cc_mask                                                 :  8, // [15:8]
49                       user_order                                              :  8; // [7:0]
50 #endif
51 };
52 
53 
54 /* Description		STA_ID
55 
56 			Identifies the STA that is addressed. Details of STA ID
57 			are TBD
58 */
59 
60 #define HE_SIG_B2_OFDMA_INFO_STA_ID_OFFSET                                          0x00000000
61 #define HE_SIG_B2_OFDMA_INFO_STA_ID_LSB                                             0
62 #define HE_SIG_B2_OFDMA_INFO_STA_ID_MSB                                             10
63 #define HE_SIG_B2_OFDMA_INFO_STA_ID_MASK                                            0x000007ff
64 
65 
66 /* Description		NSTS
67 
68 			MAC RX side usage only:
69 
70 			Number of spatial streams for this user
71 
72 			<enum 0 1_spatial_stream>Single spatial stream
73 			<enum 1 2_spatial_streams>2 spatial streams
74 			<enum 2 3_spatial_streams>3 spatial streams
75 			<enum 3 4_spatial_streams>4 spatial streams
76 			<enum 4 5_spatial_streams>5 spatial streams
77 			<enum 5 6_spatial_streams>6 spatial streams
78 			<enum 6 7_spatial_streams>7 spatial streams
79 			<enum 7 8_spatial_streams>8 spatial streams
80 */
81 
82 #define HE_SIG_B2_OFDMA_INFO_NSTS_OFFSET                                            0x00000000
83 #define HE_SIG_B2_OFDMA_INFO_NSTS_LSB                                               11
84 #define HE_SIG_B2_OFDMA_INFO_NSTS_MSB                                               13
85 #define HE_SIG_B2_OFDMA_INFO_NSTS_MASK                                              0x00003800
86 
87 
88 /* Description		TXBF
89 
90 			Indicates whether beamforming is applied
91 			0: No beamforming
92 			1: beamforming
93 			<legal all>
94 */
95 
96 #define HE_SIG_B2_OFDMA_INFO_TXBF_OFFSET                                            0x00000000
97 #define HE_SIG_B2_OFDMA_INFO_TXBF_LSB                                               14
98 #define HE_SIG_B2_OFDMA_INFO_TXBF_MSB                                               14
99 #define HE_SIG_B2_OFDMA_INFO_TXBF_MASK                                              0x00004000
100 
101 
102 /* Description		STA_MCS
103 
104 			Indicates the data MCS
105 */
106 
107 #define HE_SIG_B2_OFDMA_INFO_STA_MCS_OFFSET                                         0x00000000
108 #define HE_SIG_B2_OFDMA_INFO_STA_MCS_LSB                                            15
109 #define HE_SIG_B2_OFDMA_INFO_STA_MCS_MSB                                            18
110 #define HE_SIG_B2_OFDMA_INFO_STA_MCS_MASK                                           0x00078000
111 
112 
113 /* Description		STA_DCM
114 
115 			Indicates whether dual sub-carrier modulation is applied
116 
117 			0: No DCM
118 			1:DCM
119 			<legal all>
120 */
121 
122 #define HE_SIG_B2_OFDMA_INFO_STA_DCM_OFFSET                                         0x00000000
123 #define HE_SIG_B2_OFDMA_INFO_STA_DCM_LSB                                            19
124 #define HE_SIG_B2_OFDMA_INFO_STA_DCM_MSB                                            19
125 #define HE_SIG_B2_OFDMA_INFO_STA_DCM_MASK                                           0x00080000
126 
127 
128 /* Description		STA_CODING
129 
130 			Distinguishes between BCC/LDPC
131 
132 			0: BCC
133 			1: LDPC
134 			<legal all>
135 */
136 
137 #define HE_SIG_B2_OFDMA_INFO_STA_CODING_OFFSET                                      0x00000000
138 #define HE_SIG_B2_OFDMA_INFO_STA_CODING_LSB                                         20
139 #define HE_SIG_B2_OFDMA_INFO_STA_CODING_MSB                                         20
140 #define HE_SIG_B2_OFDMA_INFO_STA_CODING_MASK                                        0x00100000
141 
142 
143 /* Description		RESERVED_0
144 
145 			<legal 0>
146 */
147 
148 #define HE_SIG_B2_OFDMA_INFO_RESERVED_0_OFFSET                                      0x00000000
149 #define HE_SIG_B2_OFDMA_INFO_RESERVED_0_LSB                                         21
150 #define HE_SIG_B2_OFDMA_INFO_RESERVED_0_MSB                                         30
151 #define HE_SIG_B2_OFDMA_INFO_RESERVED_0_MASK                                        0x7fe00000
152 
153 
154 /* Description		RX_INTEGRITY_CHECK_PASSED
155 
156 			TX side: Set to 0
157 			RX side: Set to 1 if PHY determines the CRC check of the
158 			 codeblock containing this HE-SIG-B user info has passed,
159 			else set to 0
160 
161 			<legal all>
162 */
163 
164 #define HE_SIG_B2_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                       0x00000000
165 #define HE_SIG_B2_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                          31
166 #define HE_SIG_B2_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                          31
167 #define HE_SIG_B2_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                         0x80000000
168 
169 
170 /* Description		USER_ORDER
171 
172 			RX side: Set to 0
173 			TX side: Ordering index of the User field
174 			Gaps between the ordering indices of User fields indicate
175 			 that the microcode shall generate "unallocated RU" User
176 			 fields (STAID=2046) to fill the gaps.
177 			<legal all>
178 */
179 
180 #define HE_SIG_B2_OFDMA_INFO_USER_ORDER_OFFSET                                      0x00000004
181 #define HE_SIG_B2_OFDMA_INFO_USER_ORDER_LSB                                         0
182 #define HE_SIG_B2_OFDMA_INFO_USER_ORDER_MSB                                         7
183 #define HE_SIG_B2_OFDMA_INFO_USER_ORDER_MASK                                        0x000000ff
184 
185 
186 /* Description		CC_MASK
187 
188 			RX side: Set to 0
189 			TX side: Indicates what content channel this User field
190 			can go to
191 			Bit 0: content channel 0
192 			Bit 1: content channel 1
193 			The other bits are unused, but could repeat the above pattern
194 			 for compatibility with 'EHT_SIG_USR_OFDMA_INFO.'
195 			<legal all>
196 */
197 
198 #define HE_SIG_B2_OFDMA_INFO_CC_MASK_OFFSET                                         0x00000004
199 #define HE_SIG_B2_OFDMA_INFO_CC_MASK_LSB                                            8
200 #define HE_SIG_B2_OFDMA_INFO_CC_MASK_MSB                                            15
201 #define HE_SIG_B2_OFDMA_INFO_CC_MASK_MASK                                           0x0000ff00
202 
203 
204 /* Description		RESERVED_1A
205 
206 			<legal 0>
207 */
208 
209 #define HE_SIG_B2_OFDMA_INFO_RESERVED_1A_OFFSET                                     0x00000004
210 #define HE_SIG_B2_OFDMA_INFO_RESERVED_1A_LSB                                        16
211 #define HE_SIG_B2_OFDMA_INFO_RESERVED_1A_MSB                                        31
212 #define HE_SIG_B2_OFDMA_INFO_RESERVED_1A_MASK                                       0xffff0000
213 
214 
215 
216 #endif   // HE_SIG_B2_OFDMA_INFO
217