xref: /wlan-driver/fw-api/hw/qcn6432/he_sig_b2_mu_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_MU_INFO_H_
18 #define _HE_SIG_B2_MU_INFO_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 #define NUM_OF_DWORDS_HE_SIG_B2_MU_INFO 2
23 
24 
25 struct he_sig_b2_mu_info {
26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
27              uint32_t sta_id                                                  : 11, // [10:0]
28                       sta_spatial_config                                      :  4, // [14:11]
29                       sta_mcs                                                 :  4, // [18:15]
30                       reserved_set_to_1                                       :  1, // [19:19]
31                       sta_coding                                              :  1, // [20:20]
32                       reserved_0a                                             :  7, // [27:21]
33                       nsts                                                    :  3, // [30:28]
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                       nsts                                                    :  3, // [30:28]
41                       reserved_0a                                             :  7, // [27:21]
42                       sta_coding                                              :  1, // [20:20]
43                       reserved_set_to_1                                       :  1, // [19:19]
44                       sta_mcs                                                 :  4, // [18:15]
45                       sta_spatial_config                                      :  4, // [14: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_MU_INFO_STA_ID_OFFSET                                             0x00000000
61 #define HE_SIG_B2_MU_INFO_STA_ID_LSB                                                0
62 #define HE_SIG_B2_MU_INFO_STA_ID_MSB                                                10
63 #define HE_SIG_B2_MU_INFO_STA_ID_MASK                                               0x000007ff
64 
65 
66 /* Description		STA_SPATIAL_CONFIG
67 
68 			Number of assigned spatial streams and their corresponding
69 			 index.
70 			Total number of spatial streams assigned for the MU-MIMO
71 			 allocation is also signaled.
72 */
73 
74 #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_OFFSET                                 0x00000000
75 #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_LSB                                    11
76 #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_MSB                                    14
77 #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_MASK                                   0x00007800
78 
79 
80 /* Description		STA_MCS
81 
82 			Indicates the data MCS
83 */
84 
85 #define HE_SIG_B2_MU_INFO_STA_MCS_OFFSET                                            0x00000000
86 #define HE_SIG_B2_MU_INFO_STA_MCS_LSB                                               15
87 #define HE_SIG_B2_MU_INFO_STA_MCS_MSB                                               18
88 #define HE_SIG_B2_MU_INFO_STA_MCS_MASK                                              0x00078000
89 
90 
91 
92 #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_OFFSET                                  0x00000000
93 #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_LSB                                     19
94 #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_MSB                                     19
95 #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_MASK                                    0x00080000
96 
97 
98 /* Description		STA_CODING
99 
100 			Distinguishes between BCC/LDPC
101 
102 			0: BCC
103 			1: LDPC
104 			<legal all>
105 */
106 
107 #define HE_SIG_B2_MU_INFO_STA_CODING_OFFSET                                         0x00000000
108 #define HE_SIG_B2_MU_INFO_STA_CODING_LSB                                            20
109 #define HE_SIG_B2_MU_INFO_STA_CODING_MSB                                            20
110 #define HE_SIG_B2_MU_INFO_STA_CODING_MASK                                           0x00100000
111 
112 
113 /* Description		RESERVED_0A
114 
115 			<legal 0>
116 */
117 
118 #define HE_SIG_B2_MU_INFO_RESERVED_0A_OFFSET                                        0x00000000
119 #define HE_SIG_B2_MU_INFO_RESERVED_0A_LSB                                           21
120 #define HE_SIG_B2_MU_INFO_RESERVED_0A_MSB                                           27
121 #define HE_SIG_B2_MU_INFO_RESERVED_0A_MASK                                          0x0fe00000
122 
123 
124 /* Description		NSTS
125 
126 			MAC RX side usage only:
127 			Needed by RXPCU. Provided by PHY so that RXPCU does not
128 			need to have the RU number decoding logic.
129 
130 			Number of spatial streams for this user
131 
132 			<enum 0 1_spatial_stream>Single spatial stream
133 			<enum 1 2_spatial_streams>2 spatial streams
134 			<enum 2 3_spatial_streams>3 spatial streams
135 			<enum 3 4_spatial_streams>4 spatial streams
136 			<enum 4 5_spatial_streams>5 spatial streams
137 			<enum 5 6_spatial_streams>6 spatial streams
138 			<enum 6 7_spatial_streams>7 spatial streams
139 			<enum 7 8_spatial_streams>8 spatial streams
140 */
141 
142 #define HE_SIG_B2_MU_INFO_NSTS_OFFSET                                               0x00000000
143 #define HE_SIG_B2_MU_INFO_NSTS_LSB                                                  28
144 #define HE_SIG_B2_MU_INFO_NSTS_MSB                                                  30
145 #define HE_SIG_B2_MU_INFO_NSTS_MASK                                                 0x70000000
146 
147 
148 /* Description		RX_INTEGRITY_CHECK_PASSED
149 
150 			TX side: Set to 0
151 			RX side: Set to 1 if PHY determines the CRC check of the
152 			 codeblock containing this HE-SIG-B user info has passed,
153 			else set to 0
154 
155 			<legal all>
156 */
157 
158 #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                          0x00000000
159 #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                             31
160 #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                             31
161 #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                            0x80000000
162 
163 
164 /* Description		USER_ORDER
165 
166 			RX side: Set to 0
167 			TX side: Ordering index of the User field
168 			Gaps between the ordering indices of User fields indicate
169 			 that the microcode shall generate "unallocated RU" User
170 			 fields (STAID=2046) to fill the gaps.
171 			<legal all>
172 */
173 
174 #define HE_SIG_B2_MU_INFO_USER_ORDER_OFFSET                                         0x00000004
175 #define HE_SIG_B2_MU_INFO_USER_ORDER_LSB                                            0
176 #define HE_SIG_B2_MU_INFO_USER_ORDER_MSB                                            7
177 #define HE_SIG_B2_MU_INFO_USER_ORDER_MASK                                           0x000000ff
178 
179 
180 /* Description		CC_MASK
181 
182 			RX side: Set to 0
183 			TX side: Indicates what content channel this User field
184 			can go to
185 			Bit 0: content channel 0
186 			Bit 1: content channel 1
187 			The other bits are unused, but could repeat the above pattern
188 			 for compatibility with 'EHT_SIG_USR_MU_MIMO_INFO.'
189 			<legal all>
190 */
191 
192 #define HE_SIG_B2_MU_INFO_CC_MASK_OFFSET                                            0x00000004
193 #define HE_SIG_B2_MU_INFO_CC_MASK_LSB                                               8
194 #define HE_SIG_B2_MU_INFO_CC_MASK_MSB                                               15
195 #define HE_SIG_B2_MU_INFO_CC_MASK_MASK                                              0x0000ff00
196 
197 
198 /* Description		RESERVED_1A
199 
200 			<legal 0>
201 */
202 
203 #define HE_SIG_B2_MU_INFO_RESERVED_1A_OFFSET                                        0x00000004
204 #define HE_SIG_B2_MU_INFO_RESERVED_1A_LSB                                           16
205 #define HE_SIG_B2_MU_INFO_RESERVED_1A_MSB                                           31
206 #define HE_SIG_B2_MU_INFO_RESERVED_1A_MASK                                          0xffff0000
207 
208 
209 
210 #endif   // HE_SIG_B2_MU_INFO
211