1 /*
2  * Copyright (c) 2019, The Linux Foundation. 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 
23 // ################ START SUMMARY #################
24 //
25 //	Dword	Fields
26 //	0	sta_id[10:0], sta_spatial_config[14:11], sta_mcs[18:15], reserved_set_to_1[19], sta_coding[20], reserved_0a[28:21], nsts[31:29]
27 //
28 // ################ END SUMMARY #################
29 
30 #define NUM_OF_DWORDS_HE_SIG_B2_MU_INFO 1
31 
32 struct he_sig_b2_mu_info {
33              uint32_t sta_id                          : 11, //[10:0]
34                       sta_spatial_config              :  4, //[14:11]
35                       sta_mcs                         :  4, //[18:15]
36                       reserved_set_to_1               :  1, //[19]
37                       sta_coding                      :  1, //[20]
38                       reserved_0a                     :  8, //[28:21]
39                       nsts                            :  3; //[31:29]
40 };
41 
42 /*
43 
44 sta_id
45 
46 			Identifies the STA that is addressed. Details of STA ID
47 			are TBD
48 
49 sta_spatial_config
50 
51 			Number of assigned spatial streams and their
52 			corresponding index.
53 
54 			Total number of spatial streams assigned for the MU-MIMO
55 			allocation is also signaled.
56 
57 sta_mcs
58 
59 			Indicates the data MCS
60 
61 reserved_set_to_1
62 
63 			<legal 1>
64 
65 sta_coding
66 
67 			Distinguishes between BCC/LDPC
68 
69 
70 
71 			0: BCC
72 
73 			1: LDPC
74 
75 			<legal all>
76 
77 reserved_0a
78 
79 			<legal 0>
80 
81 nsts
82 
83 			MAC RX side usage only:
84 
85 			Needed by RXPCU. Provided by PHY so that RXPCU does not
86 			need to have the RU number decoding logic.
87 
88 
89 
90 			Number of spatial streams for this user
91 
92 
93 
94 			<enum 0 1_spatial_stream>Single spatial stream
95 
96 			<enum 1 2_spatial_streams>2 spatial streams
97 
98 			<enum 2 3_spatial_streams>3 spatial streams
99 
100 			<enum 3 4_spatial_streams>4 spatial streams
101 
102 			<enum 4 5_spatial_streams>5 spatial streams
103 
104 			<enum 5 6_spatial_streams>6 spatial streams
105 
106 			<enum 6 7_spatial_streams>7 spatial streams
107 
108 			<enum 7 8_spatial_streams>8 spatial streams
109 */
110 
111 
112 /* Description		HE_SIG_B2_MU_INFO_0_STA_ID
113 
114 			Identifies the STA that is addressed. Details of STA ID
115 			are TBD
116 */
117 #define HE_SIG_B2_MU_INFO_0_STA_ID_OFFSET                            0x00000000
118 #define HE_SIG_B2_MU_INFO_0_STA_ID_LSB                               0
119 #define HE_SIG_B2_MU_INFO_0_STA_ID_MASK                              0x000007ff
120 
121 /* Description		HE_SIG_B2_MU_INFO_0_STA_SPATIAL_CONFIG
122 
123 			Number of assigned spatial streams and their
124 			corresponding index.
125 
126 			Total number of spatial streams assigned for the MU-MIMO
127 			allocation is also signaled.
128 */
129 #define HE_SIG_B2_MU_INFO_0_STA_SPATIAL_CONFIG_OFFSET                0x00000000
130 #define HE_SIG_B2_MU_INFO_0_STA_SPATIAL_CONFIG_LSB                   11
131 #define HE_SIG_B2_MU_INFO_0_STA_SPATIAL_CONFIG_MASK                  0x00007800
132 
133 /* Description		HE_SIG_B2_MU_INFO_0_STA_MCS
134 
135 			Indicates the data MCS
136 */
137 #define HE_SIG_B2_MU_INFO_0_STA_MCS_OFFSET                           0x00000000
138 #define HE_SIG_B2_MU_INFO_0_STA_MCS_LSB                              15
139 #define HE_SIG_B2_MU_INFO_0_STA_MCS_MASK                             0x00078000
140 
141 /* Description		HE_SIG_B2_MU_INFO_0_RESERVED_SET_TO_1
142 
143 			<legal 1>
144 */
145 #define HE_SIG_B2_MU_INFO_0_RESERVED_SET_TO_1_OFFSET                 0x00000000
146 #define HE_SIG_B2_MU_INFO_0_RESERVED_SET_TO_1_LSB                    19
147 #define HE_SIG_B2_MU_INFO_0_RESERVED_SET_TO_1_MASK                   0x00080000
148 
149 /* Description		HE_SIG_B2_MU_INFO_0_STA_CODING
150 
151 			Distinguishes between BCC/LDPC
152 
153 
154 
155 			0: BCC
156 
157 			1: LDPC
158 
159 			<legal all>
160 */
161 #define HE_SIG_B2_MU_INFO_0_STA_CODING_OFFSET                        0x00000000
162 #define HE_SIG_B2_MU_INFO_0_STA_CODING_LSB                           20
163 #define HE_SIG_B2_MU_INFO_0_STA_CODING_MASK                          0x00100000
164 
165 /* Description		HE_SIG_B2_MU_INFO_0_RESERVED_0A
166 
167 			<legal 0>
168 */
169 #define HE_SIG_B2_MU_INFO_0_RESERVED_0A_OFFSET                       0x00000000
170 #define HE_SIG_B2_MU_INFO_0_RESERVED_0A_LSB                          21
171 #define HE_SIG_B2_MU_INFO_0_RESERVED_0A_MASK                         0x1fe00000
172 
173 /* Description		HE_SIG_B2_MU_INFO_0_NSTS
174 
175 			MAC RX side usage only:
176 
177 			Needed by RXPCU. Provided by PHY so that RXPCU does not
178 			need to have the RU number decoding logic.
179 
180 
181 
182 			Number of spatial streams for this user
183 
184 
185 
186 			<enum 0 1_spatial_stream>Single spatial stream
187 
188 			<enum 1 2_spatial_streams>2 spatial streams
189 
190 			<enum 2 3_spatial_streams>3 spatial streams
191 
192 			<enum 3 4_spatial_streams>4 spatial streams
193 
194 			<enum 4 5_spatial_streams>5 spatial streams
195 
196 			<enum 5 6_spatial_streams>6 spatial streams
197 
198 			<enum 6 7_spatial_streams>7 spatial streams
199 
200 			<enum 7 8_spatial_streams>8 spatial streams
201 */
202 #define HE_SIG_B2_MU_INFO_0_NSTS_OFFSET                              0x00000000
203 #define HE_SIG_B2_MU_INFO_0_NSTS_LSB                                 29
204 #define HE_SIG_B2_MU_INFO_0_NSTS_MASK                                0xe0000000
205 
206 
207 #endif // _HE_SIG_B2_MU_INFO_H_
208