xref: /wlan-driver/fw-api/hw/qcn6432/phyrx_he_sig_b2_mu.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 _PHYRX_HE_SIG_B2_MU_H_
18 #define _PHYRX_HE_SIG_B2_MU_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 #include "he_sig_b2_mu_info.h"
23 #define NUM_OF_DWORDS_PHYRX_HE_SIG_B2_MU 2
24 
25 #define NUM_OF_QWORDS_PHYRX_HE_SIG_B2_MU 1
26 
27 
28 struct phyrx_he_sig_b2_mu {
29 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
30              struct   he_sig_b2_mu_info                                         phyrx_he_sig_b2_mu_info_details;
31 #else
32              struct   he_sig_b2_mu_info                                         phyrx_he_sig_b2_mu_info_details;
33 #endif
34 };
35 
36 
37 /* Description		PHYRX_HE_SIG_B2_MU_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 PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_OFFSET            0x0000000000000000
50 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_LSB               0
51 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_MSB               10
52 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_MASK              0x00000000000007ff
53 
54 
55 /* Description		STA_SPATIAL_CONFIG
56 
57 			Number of assigned spatial streams and their corresponding
58 			 index.
59 			Total number of spatial streams assigned for the MU-MIMO
60 			 allocation is also signaled.
61 */
62 
63 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_OFFSET 0x0000000000000000
64 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_LSB   11
65 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_MSB   14
66 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_MASK  0x0000000000007800
67 
68 
69 /* Description		STA_MCS
70 
71 			Indicates the data MCS
72 */
73 
74 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_OFFSET           0x0000000000000000
75 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_LSB              15
76 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_MSB              18
77 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_MASK             0x0000000000078000
78 
79 
80 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_OFFSET 0x0000000000000000
81 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_LSB    19
82 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_MSB    19
83 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_MASK   0x0000000000080000
84 
85 
86 /* Description		STA_CODING
87 
88 			Distinguishes between BCC/LDPC
89 
90 			0: BCC
91 			1: LDPC
92 			<legal all>
93 */
94 
95 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_OFFSET        0x0000000000000000
96 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_LSB           20
97 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_MSB           20
98 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_MASK          0x0000000000100000
99 
100 
101 /* Description		RESERVED_0A
102 
103 			<legal 0>
104 */
105 
106 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_OFFSET       0x0000000000000000
107 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_LSB          21
108 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_MSB          27
109 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_MASK         0x000000000fe00000
110 
111 
112 /* Description		NSTS
113 
114 			MAC RX side usage only:
115 			Needed by RXPCU. Provided by PHY so that RXPCU does not
116 			need to have the RU number decoding logic.
117 
118 			Number of spatial streams for this user
119 
120 			<enum 0 1_spatial_stream>Single spatial stream
121 			<enum 1 2_spatial_streams>2 spatial streams
122 			<enum 2 3_spatial_streams>3 spatial streams
123 			<enum 3 4_spatial_streams>4 spatial streams
124 			<enum 4 5_spatial_streams>5 spatial streams
125 			<enum 5 6_spatial_streams>6 spatial streams
126 			<enum 6 7_spatial_streams>7 spatial streams
127 			<enum 7 8_spatial_streams>8 spatial streams
128 */
129 
130 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_OFFSET              0x0000000000000000
131 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_LSB                 28
132 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_MSB                 30
133 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_MASK                0x0000000070000000
134 
135 
136 /* Description		RX_INTEGRITY_CHECK_PASSED
137 
138 			TX side: Set to 0
139 			RX side: Set to 1 if PHY determines the CRC check of the
140 			 codeblock containing this HE-SIG-B user info has passed,
141 			else set to 0
142 
143 			<legal all>
144 */
145 
146 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000
147 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 31
148 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 31
149 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x0000000080000000
150 
151 
152 /* Description		USER_ORDER
153 
154 			RX side: Set to 0
155 			TX side: Ordering index of the User field
156 			Gaps between the ordering indices of User fields indicate
157 			 that the microcode shall generate "unallocated RU" User
158 			 fields (STAID=2046) to fill the gaps.
159 			<legal all>
160 */
161 
162 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_USER_ORDER_OFFSET        0x0000000000000000
163 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_USER_ORDER_LSB           32
164 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_USER_ORDER_MSB           39
165 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_USER_ORDER_MASK          0x000000ff00000000
166 
167 
168 /* Description		CC_MASK
169 
170 			RX side: Set to 0
171 			TX side: Indicates what content channel this User field
172 			can go to
173 			Bit 0: content channel 0
174 			Bit 1: content channel 1
175 			The other bits are unused, but could repeat the above pattern
176 			 for compatibility with 'EHT_SIG_USR_MU_MIMO_INFO.'
177 			<legal all>
178 */
179 
180 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_CC_MASK_OFFSET           0x0000000000000000
181 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_CC_MASK_LSB              40
182 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_CC_MASK_MSB              47
183 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_CC_MASK_MASK             0x0000ff0000000000
184 
185 
186 /* Description		RESERVED_1A
187 
188 			<legal 0>
189 */
190 
191 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_1A_OFFSET       0x0000000000000000
192 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_1A_LSB          48
193 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_1A_MSB          63
194 #define PHYRX_HE_SIG_B2_MU_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_1A_MASK         0xffff000000000000
195 
196 
197 
198 #endif   // PHYRX_HE_SIG_B2_MU
199