xref: /wlan-driver/fw-api/hw/qca5018/he_sig_b2_ofdma_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020, 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_OFDMA_INFO_H_
18 #define _HE_SIG_B2_OFDMA_INFO_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 
23 // ################ START SUMMARY #################
24 //
25 //	Dword	Fields
26 //	0	sta_id[10:0], nsts[13:11], txbf[14], sta_mcs[18:15], sta_dcm[19], sta_coding[20], reserved_0[31:21]
27 //
28 // ################ END SUMMARY #################
29 
30 #define NUM_OF_DWORDS_HE_SIG_B2_OFDMA_INFO 1
31 
32 struct he_sig_b2_ofdma_info {
33              uint32_t sta_id                          : 11, //[10:0]
34                       nsts                            :  3, //[13:11]
35                       txbf                            :  1, //[14]
36                       sta_mcs                         :  4, //[18:15]
37                       sta_dcm                         :  1, //[19]
38                       sta_coding                      :  1, //[20]
39                       reserved_0                      : 11; //[31:21]
40 };
41 
42 /*
43 
44 sta_id
45 
46 			Identifies the STA that is addressed. Details of STA ID
47 			are TBD
48 
49 nsts
50 
51 			MAC RX side usage only:
52 
53 
54 
55 			Number of spatial streams for this user
56 
57 
58 
59 			<enum 0 1_spatial_stream>Single spatial stream
60 
61 			<enum 1 2_spatial_streams>2 spatial streams
62 
63 			<enum 2 3_spatial_streams>3 spatial streams
64 
65 			<enum 3 4_spatial_streams>4 spatial streams
66 
67 			<enum 4 5_spatial_streams>5 spatial streams
68 
69 			<enum 5 6_spatial_streams>6 spatial streams
70 
71 			<enum 6 7_spatial_streams>7 spatial streams
72 
73 			<enum 7 8_spatial_streams>8 spatial streams
74 
75 txbf
76 
77 			Indicates whether beamforming is applied
78 
79 			0: No beamforming
80 
81 			1: beamforming
82 
83 			<legal all>
84 
85 sta_mcs
86 
87 			Indicates the data MCS
88 
89 sta_dcm
90 
91 
92 			0: No DCM
93 
94 			1:DCM
95 
96 			<legal all>
97 
98 sta_coding
99 
100 			Distinguishes between BCC/LDPC
101 
102 
103 
104 			0: BCC
105 
106 			1: LDPC
107 
108 			<legal all>
109 
110 reserved_0
111 
112 			<legal 0>
113 */
114 
115 
116 /* Description		HE_SIG_B2_OFDMA_INFO_0_STA_ID
117 
118 			Identifies the STA that is addressed. Details of STA ID
119 			are TBD
120 */
121 #define HE_SIG_B2_OFDMA_INFO_0_STA_ID_OFFSET                         0x00000000
122 #define HE_SIG_B2_OFDMA_INFO_0_STA_ID_LSB                            0
123 #define HE_SIG_B2_OFDMA_INFO_0_STA_ID_MASK                           0x000007ff
124 
125 /* Description		HE_SIG_B2_OFDMA_INFO_0_NSTS
126 
127 			MAC RX side usage only:
128 
129 
130 
131 			Number of spatial streams for this user
132 
133 
134 
135 			<enum 0 1_spatial_stream>Single spatial stream
136 
137 			<enum 1 2_spatial_streams>2 spatial streams
138 
139 			<enum 2 3_spatial_streams>3 spatial streams
140 
141 			<enum 3 4_spatial_streams>4 spatial streams
142 
143 			<enum 4 5_spatial_streams>5 spatial streams
144 
145 			<enum 5 6_spatial_streams>6 spatial streams
146 
147 			<enum 6 7_spatial_streams>7 spatial streams
148 
149 			<enum 7 8_spatial_streams>8 spatial streams
150 */
151 #define HE_SIG_B2_OFDMA_INFO_0_NSTS_OFFSET                           0x00000000
152 #define HE_SIG_B2_OFDMA_INFO_0_NSTS_LSB                              11
153 #define HE_SIG_B2_OFDMA_INFO_0_NSTS_MASK                             0x00003800
154 
155 /* Description		HE_SIG_B2_OFDMA_INFO_0_TXBF
156 
157 			Indicates whether beamforming is applied
158 
159 			0: No beamforming
160 
161 			1: beamforming
162 
163 			<legal all>
164 */
165 #define HE_SIG_B2_OFDMA_INFO_0_TXBF_OFFSET                           0x00000000
166 #define HE_SIG_B2_OFDMA_INFO_0_TXBF_LSB                              14
167 #define HE_SIG_B2_OFDMA_INFO_0_TXBF_MASK                             0x00004000
168 
169 /* Description		HE_SIG_B2_OFDMA_INFO_0_STA_MCS
170 
171 			Indicates the data MCS
172 */
173 #define HE_SIG_B2_OFDMA_INFO_0_STA_MCS_OFFSET                        0x00000000
174 #define HE_SIG_B2_OFDMA_INFO_0_STA_MCS_LSB                           15
175 #define HE_SIG_B2_OFDMA_INFO_0_STA_MCS_MASK                          0x00078000
176 
177 /* Description		HE_SIG_B2_OFDMA_INFO_0_STA_DCM
178 
179 
180 			0: No DCM
181 
182 			1:DCM
183 
184 			<legal all>
185 */
186 #define HE_SIG_B2_OFDMA_INFO_0_STA_DCM_OFFSET                        0x00000000
187 #define HE_SIG_B2_OFDMA_INFO_0_STA_DCM_LSB                           19
188 #define HE_SIG_B2_OFDMA_INFO_0_STA_DCM_MASK                          0x00080000
189 
190 /* Description		HE_SIG_B2_OFDMA_INFO_0_STA_CODING
191 
192 			Distinguishes between BCC/LDPC
193 
194 
195 
196 			0: BCC
197 
198 			1: LDPC
199 
200 			<legal all>
201 */
202 #define HE_SIG_B2_OFDMA_INFO_0_STA_CODING_OFFSET                     0x00000000
203 #define HE_SIG_B2_OFDMA_INFO_0_STA_CODING_LSB                        20
204 #define HE_SIG_B2_OFDMA_INFO_0_STA_CODING_MASK                       0x00100000
205 
206 /* Description		HE_SIG_B2_OFDMA_INFO_0_RESERVED_0
207 
208 			<legal 0>
209 */
210 #define HE_SIG_B2_OFDMA_INFO_0_RESERVED_0_OFFSET                     0x00000000
211 #define HE_SIG_B2_OFDMA_INFO_0_RESERVED_0_LSB                        21
212 #define HE_SIG_B2_OFDMA_INFO_0_RESERVED_0_MASK                       0xffe00000
213 
214 
215 #endif // _HE_SIG_B2_OFDMA_INFO_H_
216