1 /*
2  * Indices for 802.11 a/b/g/n/ac 1-3 chain symmetric transmit rates
3  *
4  * Copyright (C) 1999-2013, Broadcom Corporation
5  *
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  *
18  * $Id: bcmwifi_rates.h 5187 2012-06-29 06:17:50Z $
19  */
20 
21 #ifndef _bcmwifi_rates_h_
22 #define _bcmwifi_rates_h_
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 
28 
29 #define WL_RATESET_SZ_DSSS		4
30 #define WL_RATESET_SZ_OFDM		8
31 #define WL_RATESET_SZ_HT_MCS	8
32 #define WL_RATESET_SZ_VHT_MCS	10
33 
34 #define WL_TX_CHAINS_MAX	3
35 
36 #define WL_RATE_DISABLED		(-128) /* Power value corresponding to unsupported rate */
37 
38 /* Transmit channel bandwidths */
39 typedef enum wl_tx_bw {
40 	WL_TX_BW_20,
41 	WL_TX_BW_40,
42 	WL_TX_BW_80,
43 	WL_TX_BW_20IN40,
44 	WL_TX_BW_20IN80,
45 	WL_TX_BW_40IN80
46 } wl_tx_bw_t;
47 
48 
49 /*
50  * Transmit modes.
51  * Not all modes are listed here, only those required for disambiguation. e.g. SPEXP is not listed
52  */
53 typedef enum wl_tx_mode {
54 	WL_TX_MODE_NONE,
55 	WL_TX_MODE_STBC,
56 	WL_TX_MODE_CDD,
57 	WL_TX_MODE_TXBF,
58 	WL_NUM_TX_MODES
59 } wl_tx_mode_t;
60 
61 
62 /* Number of transmit chains */
63 typedef enum wl_tx_chains {
64 	WL_TX_CHAINS_1 = 1,
65 	WL_TX_CHAINS_2,
66 	WL_TX_CHAINS_3
67 } wl_tx_chains_t;
68 
69 
70 /* Number of transmit streams */
71 typedef enum wl_tx_nss {
72 	WL_TX_NSS_1 = 1,
73 	WL_TX_NSS_2,
74 	WL_TX_NSS_3
75 } wl_tx_nss_t;
76 
77 
78 typedef enum clm_rates {
79 	/************
80 	* 1 chain  *
81 	************
82 	*/
83 
84 	/* 1 Stream */
85 	WL_RATE_1X1_DSSS_1         = 0,
86 	WL_RATE_1X1_DSSS_2         = 1,
87 	WL_RATE_1X1_DSSS_5_5       = 2,
88 	WL_RATE_1X1_DSSS_11        = 3,
89 
90 	WL_RATE_1X1_OFDM_6         = 4,
91 	WL_RATE_1X1_OFDM_9         = 5,
92 	WL_RATE_1X1_OFDM_12        = 6,
93 	WL_RATE_1X1_OFDM_18        = 7,
94 	WL_RATE_1X1_OFDM_24        = 8,
95 	WL_RATE_1X1_OFDM_36        = 9,
96 	WL_RATE_1X1_OFDM_48        = 10,
97 	WL_RATE_1X1_OFDM_54        = 11,
98 
99 	WL_RATE_1X1_MCS0           = 12,
100 	WL_RATE_1X1_MCS1           = 13,
101 	WL_RATE_1X1_MCS2           = 14,
102 	WL_RATE_1X1_MCS3           = 15,
103 	WL_RATE_1X1_MCS4           = 16,
104 	WL_RATE_1X1_MCS5           = 17,
105 	WL_RATE_1X1_MCS6           = 18,
106 	WL_RATE_1X1_MCS7           = 19,
107 
108 	WL_RATE_1X1_VHT0SS1        = 12,
109 	WL_RATE_1X1_VHT1SS1        = 13,
110 	WL_RATE_1X1_VHT2SS1        = 14,
111 	WL_RATE_1X1_VHT3SS1        = 15,
112 	WL_RATE_1X1_VHT4SS1        = 16,
113 	WL_RATE_1X1_VHT5SS1        = 17,
114 	WL_RATE_1X1_VHT6SS1        = 18,
115 	WL_RATE_1X1_VHT7SS1        = 19,
116 	WL_RATE_1X1_VHT8SS1        = 20,
117 	WL_RATE_1X1_VHT9SS1        = 21,
118 
119 
120 	/************
121 	* 2 chains *
122 	************
123 	*/
124 
125 	/* 1 Stream expanded + 1 */
126 	WL_RATE_1X2_DSSS_1         = 22,
127 	WL_RATE_1X2_DSSS_2         = 23,
128 	WL_RATE_1X2_DSSS_5_5       = 24,
129 	WL_RATE_1X2_DSSS_11        = 25,
130 
131 	WL_RATE_1X2_CDD_OFDM_6     = 26,
132 	WL_RATE_1X2_CDD_OFDM_9     = 27,
133 	WL_RATE_1X2_CDD_OFDM_12    = 28,
134 	WL_RATE_1X2_CDD_OFDM_18    = 29,
135 	WL_RATE_1X2_CDD_OFDM_24    = 30,
136 	WL_RATE_1X2_CDD_OFDM_36    = 31,
137 	WL_RATE_1X2_CDD_OFDM_48    = 32,
138 	WL_RATE_1X2_CDD_OFDM_54    = 33,
139 
140 	WL_RATE_1X2_CDD_MCS0       = 34,
141 	WL_RATE_1X2_CDD_MCS1       = 35,
142 	WL_RATE_1X2_CDD_MCS2       = 36,
143 	WL_RATE_1X2_CDD_MCS3       = 37,
144 	WL_RATE_1X2_CDD_MCS4       = 38,
145 	WL_RATE_1X2_CDD_MCS5       = 39,
146 	WL_RATE_1X2_CDD_MCS6       = 40,
147 	WL_RATE_1X2_CDD_MCS7       = 41,
148 
149 	WL_RATE_1X2_VHT0SS1        = 34,
150 	WL_RATE_1X2_VHT1SS1        = 35,
151 	WL_RATE_1X2_VHT2SS1        = 36,
152 	WL_RATE_1X2_VHT3SS1        = 37,
153 	WL_RATE_1X2_VHT4SS1        = 38,
154 	WL_RATE_1X2_VHT5SS1        = 39,
155 	WL_RATE_1X2_VHT6SS1        = 40,
156 	WL_RATE_1X2_VHT7SS1        = 41,
157 	WL_RATE_1X2_VHT8SS1        = 42,
158 	WL_RATE_1X2_VHT9SS1        = 43,
159 
160 	/* 2 Streams */
161 	WL_RATE_2X2_STBC_MCS0      = 44,
162 	WL_RATE_2X2_STBC_MCS1      = 45,
163 	WL_RATE_2X2_STBC_MCS2      = 46,
164 	WL_RATE_2X2_STBC_MCS3      = 47,
165 	WL_RATE_2X2_STBC_MCS4      = 48,
166 	WL_RATE_2X2_STBC_MCS5      = 49,
167 	WL_RATE_2X2_STBC_MCS6      = 50,
168 	WL_RATE_2X2_STBC_MCS7      = 51,
169 
170 	WL_RATE_2X2_STBC_VHT0SS1   = 44,
171 	WL_RATE_2X2_STBC_VHT1SS1   = 45,
172 	WL_RATE_2X2_STBC_VHT2SS1   = 46,
173 	WL_RATE_2X2_STBC_VHT3SS1   = 47,
174 	WL_RATE_2X2_STBC_VHT4SS1   = 48,
175 	WL_RATE_2X2_STBC_VHT5SS1   = 49,
176 	WL_RATE_2X2_STBC_VHT6SS1   = 50,
177 	WL_RATE_2X2_STBC_VHT7SS1   = 51,
178 	WL_RATE_2X2_STBC_VHT8SS1   = 52,
179 	WL_RATE_2X2_STBC_VHT9SS1   = 53,
180 
181 	WL_RATE_2X2_SDM_MCS8       = 54,
182 	WL_RATE_2X2_SDM_MCS9       = 55,
183 	WL_RATE_2X2_SDM_MCS10      = 56,
184 	WL_RATE_2X2_SDM_MCS11      = 57,
185 	WL_RATE_2X2_SDM_MCS12      = 58,
186 	WL_RATE_2X2_SDM_MCS13      = 59,
187 	WL_RATE_2X2_SDM_MCS14      = 60,
188 	WL_RATE_2X2_SDM_MCS15      = 61,
189 
190 	WL_RATE_2X2_VHT0SS2        = 54,
191 	WL_RATE_2X2_VHT1SS2        = 55,
192 	WL_RATE_2X2_VHT2SS2        = 56,
193 	WL_RATE_2X2_VHT3SS2        = 57,
194 	WL_RATE_2X2_VHT4SS2        = 58,
195 	WL_RATE_2X2_VHT5SS2        = 59,
196 	WL_RATE_2X2_VHT6SS2        = 60,
197 	WL_RATE_2X2_VHT7SS2        = 61,
198 	WL_RATE_2X2_VHT8SS2        = 62,
199 	WL_RATE_2X2_VHT9SS2        = 63,
200 
201 	/************
202 	* 3 chains *
203 	************
204 	*/
205 
206 	/* 1 Stream expanded + 2 */
207 	WL_RATE_1X3_DSSS_1         = 64,
208 	WL_RATE_1X3_DSSS_2         = 65,
209 	WL_RATE_1X3_DSSS_5_5       = 66,
210 	WL_RATE_1X3_DSSS_11        = 67,
211 
212 	WL_RATE_1X3_CDD_OFDM_6     = 68,
213 	WL_RATE_1X3_CDD_OFDM_9     = 69,
214 	WL_RATE_1X3_CDD_OFDM_12    = 70,
215 	WL_RATE_1X3_CDD_OFDM_18    = 71,
216 	WL_RATE_1X3_CDD_OFDM_24    = 72,
217 	WL_RATE_1X3_CDD_OFDM_36    = 73,
218 	WL_RATE_1X3_CDD_OFDM_48    = 74,
219 	WL_RATE_1X3_CDD_OFDM_54    = 75,
220 
221 	WL_RATE_1X3_CDD_MCS0       = 76,
222 	WL_RATE_1X3_CDD_MCS1       = 77,
223 	WL_RATE_1X3_CDD_MCS2       = 78,
224 	WL_RATE_1X3_CDD_MCS3       = 79,
225 	WL_RATE_1X3_CDD_MCS4       = 80,
226 	WL_RATE_1X3_CDD_MCS5       = 81,
227 	WL_RATE_1X3_CDD_MCS6       = 82,
228 	WL_RATE_1X3_CDD_MCS7       = 83,
229 
230 	WL_RATE_1X3_VHT0SS1        = 76,
231 	WL_RATE_1X3_VHT1SS1        = 77,
232 	WL_RATE_1X3_VHT2SS1        = 78,
233 	WL_RATE_1X3_VHT3SS1        = 79,
234 	WL_RATE_1X3_VHT4SS1        = 80,
235 	WL_RATE_1X3_VHT5SS1        = 81,
236 	WL_RATE_1X3_VHT6SS1        = 82,
237 	WL_RATE_1X3_VHT7SS1        = 83,
238 	WL_RATE_1X3_VHT8SS1        = 84,
239 	WL_RATE_1X3_VHT9SS1        = 85,
240 
241 	/* 2 Streams expanded + 1 */
242 	WL_RATE_2X3_STBC_MCS0      = 86,
243 	WL_RATE_2X3_STBC_MCS1      = 87,
244 	WL_RATE_2X3_STBC_MCS2      = 88,
245 	WL_RATE_2X3_STBC_MCS3      = 89,
246 	WL_RATE_2X3_STBC_MCS4      = 90,
247 	WL_RATE_2X3_STBC_MCS5      = 91,
248 	WL_RATE_2X3_STBC_MCS6      = 92,
249 	WL_RATE_2X3_STBC_MCS7      = 93,
250 
251 	WL_RATE_2X3_STBC_VHT0SS1   = 86,
252 	WL_RATE_2X3_STBC_VHT1SS1   = 87,
253 	WL_RATE_2X3_STBC_VHT2SS1   = 88,
254 	WL_RATE_2X3_STBC_VHT3SS1   = 89,
255 	WL_RATE_2X3_STBC_VHT4SS1   = 90,
256 	WL_RATE_2X3_STBC_VHT5SS1   = 91,
257 	WL_RATE_2X3_STBC_VHT6SS1   = 92,
258 	WL_RATE_2X3_STBC_VHT7SS1   = 93,
259 	WL_RATE_2X3_STBC_VHT8SS1   = 94,
260 	WL_RATE_2X3_STBC_VHT9SS1   = 95,
261 
262 	WL_RATE_2X3_SDM_MCS8       = 96,
263 	WL_RATE_2X3_SDM_MCS9       = 97,
264 	WL_RATE_2X3_SDM_MCS10      = 98,
265 	WL_RATE_2X3_SDM_MCS11      = 99,
266 	WL_RATE_2X3_SDM_MCS12      = 100,
267 	WL_RATE_2X3_SDM_MCS13      = 101,
268 	WL_RATE_2X3_SDM_MCS14      = 102,
269 	WL_RATE_2X3_SDM_MCS15      = 103,
270 
271 	WL_RATE_2X3_VHT0SS2        = 96,
272 	WL_RATE_2X3_VHT1SS2        = 97,
273 	WL_RATE_2X3_VHT2SS2        = 98,
274 	WL_RATE_2X3_VHT3SS2        = 99,
275 	WL_RATE_2X3_VHT4SS2        = 100,
276 	WL_RATE_2X3_VHT5SS2        = 101,
277 	WL_RATE_2X3_VHT6SS2        = 102,
278 	WL_RATE_2X3_VHT7SS2        = 103,
279 	WL_RATE_2X3_VHT8SS2        = 104,
280 	WL_RATE_2X3_VHT9SS2        = 105,
281 
282 	/* 3 Streams */
283 	WL_RATE_3X3_SDM_MCS16      = 106,
284 	WL_RATE_3X3_SDM_MCS17      = 107,
285 	WL_RATE_3X3_SDM_MCS18      = 108,
286 	WL_RATE_3X3_SDM_MCS19      = 109,
287 	WL_RATE_3X3_SDM_MCS20      = 110,
288 	WL_RATE_3X3_SDM_MCS21      = 111,
289 	WL_RATE_3X3_SDM_MCS22      = 112,
290 	WL_RATE_3X3_SDM_MCS23      = 113,
291 
292 	WL_RATE_3X3_VHT0SS3        = 106,
293 	WL_RATE_3X3_VHT1SS3        = 107,
294 	WL_RATE_3X3_VHT2SS3        = 108,
295 	WL_RATE_3X3_VHT3SS3        = 109,
296 	WL_RATE_3X3_VHT4SS3        = 110,
297 	WL_RATE_3X3_VHT5SS3        = 111,
298 	WL_RATE_3X3_VHT6SS3        = 112,
299 	WL_RATE_3X3_VHT7SS3        = 113,
300 	WL_RATE_3X3_VHT8SS3        = 114,
301 	WL_RATE_3X3_VHT9SS3        = 115,
302 
303 
304 	/****************************
305 	 * TX Beamforming, 2 chains *
306 	 ****************************
307 	 */
308 
309 	/* 1 Stream expanded + 1 */
310 
311 	WL_RATE_1X2_TXBF_OFDM_6    = 116,
312 	WL_RATE_1X2_TXBF_OFDM_9    = 117,
313 	WL_RATE_1X2_TXBF_OFDM_12   = 118,
314 	WL_RATE_1X2_TXBF_OFDM_18   = 119,
315 	WL_RATE_1X2_TXBF_OFDM_24   = 120,
316 	WL_RATE_1X2_TXBF_OFDM_36   = 121,
317 	WL_RATE_1X2_TXBF_OFDM_48   = 122,
318 	WL_RATE_1X2_TXBF_OFDM_54   = 123,
319 
320 	WL_RATE_1X2_TXBF_MCS0      = 124,
321 	WL_RATE_1X2_TXBF_MCS1      = 125,
322 	WL_RATE_1X2_TXBF_MCS2      = 126,
323 	WL_RATE_1X2_TXBF_MCS3      = 127,
324 	WL_RATE_1X2_TXBF_MCS4      = 128,
325 	WL_RATE_1X2_TXBF_MCS5      = 129,
326 	WL_RATE_1X2_TXBF_MCS6      = 130,
327 	WL_RATE_1X2_TXBF_MCS7      = 131,
328 
329 	WL_RATE_1X2_TXBF_VHT0SS1   = 124,
330 	WL_RATE_1X2_TXBF_VHT1SS1   = 125,
331 	WL_RATE_1X2_TXBF_VHT2SS1   = 126,
332 	WL_RATE_1X2_TXBF_VHT3SS1   = 127,
333 	WL_RATE_1X2_TXBF_VHT4SS1   = 128,
334 	WL_RATE_1X2_TXBF_VHT5SS1   = 129,
335 	WL_RATE_1X2_TXBF_VHT6SS1   = 130,
336 	WL_RATE_1X2_TXBF_VHT7SS1   = 131,
337 	WL_RATE_1X2_TXBF_VHT8SS1   = 132,
338 	WL_RATE_1X2_TXBF_VHT9SS1   = 133,
339 
340 	/* 2 Streams */
341 
342 	WL_RATE_2X2_TXBF_SDM_MCS8  = 134,
343 	WL_RATE_2X2_TXBF_SDM_MCS9  = 135,
344 	WL_RATE_2X2_TXBF_SDM_MCS10 = 136,
345 	WL_RATE_2X2_TXBF_SDM_MCS11 = 137,
346 	WL_RATE_2X2_TXBF_SDM_MCS12 = 138,
347 	WL_RATE_2X2_TXBF_SDM_MCS13 = 139,
348 	WL_RATE_2X2_TXBF_SDM_MCS14 = 140,
349 	WL_RATE_2X2_TXBF_SDM_MCS15 = 141,
350 
351 	WL_RATE_2X2_TXBF_VHT0SS2   = 134,
352 	WL_RATE_2X2_TXBF_VHT1SS2   = 135,
353 	WL_RATE_2X2_TXBF_VHT2SS2   = 136,
354 	WL_RATE_2X2_TXBF_VHT3SS2   = 137,
355 	WL_RATE_2X2_TXBF_VHT4SS2   = 138,
356 	WL_RATE_2X2_TXBF_VHT5SS2   = 139,
357 	WL_RATE_2X2_TXBF_VHT6SS2   = 140,
358 	WL_RATE_2X2_TXBF_VHT7SS2   = 141,
359 
360 
361 	/****************************
362 	 * TX Beamforming, 3 chains *
363 	 ****************************
364 	 */
365 
366 	/* 1 Stream expanded + 2 */
367 
368 	WL_RATE_1X3_TXBF_OFDM_6    = 142,
369 	WL_RATE_1X3_TXBF_OFDM_9    = 143,
370 	WL_RATE_1X3_TXBF_OFDM_12   = 144,
371 	WL_RATE_1X3_TXBF_OFDM_18   = 145,
372 	WL_RATE_1X3_TXBF_OFDM_24   = 146,
373 	WL_RATE_1X3_TXBF_OFDM_36   = 147,
374 	WL_RATE_1X3_TXBF_OFDM_48   = 148,
375 	WL_RATE_1X3_TXBF_OFDM_54   = 149,
376 
377 	WL_RATE_1X3_TXBF_MCS0      = 150,
378 	WL_RATE_1X3_TXBF_MCS1      = 151,
379 	WL_RATE_1X3_TXBF_MCS2      = 152,
380 	WL_RATE_1X3_TXBF_MCS3      = 153,
381 	WL_RATE_1X3_TXBF_MCS4      = 154,
382 	WL_RATE_1X3_TXBF_MCS5      = 155,
383 	WL_RATE_1X3_TXBF_MCS6      = 156,
384 	WL_RATE_1X3_TXBF_MCS7      = 157,
385 
386 	WL_RATE_1X3_TXBF_VHT0SS1   = 150,
387 	WL_RATE_1X3_TXBF_VHT1SS1   = 151,
388 	WL_RATE_1X3_TXBF_VHT2SS1   = 152,
389 	WL_RATE_1X3_TXBF_VHT3SS1   = 153,
390 	WL_RATE_1X3_TXBF_VHT4SS1   = 154,
391 	WL_RATE_1X3_TXBF_VHT5SS1   = 155,
392 	WL_RATE_1X3_TXBF_VHT6SS1   = 156,
393 	WL_RATE_1X3_TXBF_VHT7SS1   = 157,
394 	WL_RATE_1X3_TXBF_VHT8SS1   = 158,
395 	WL_RATE_1X3_TXBF_VHT9SS1   = 159,
396 
397 	/* 2 Streams expanded + 1 */
398 
399 	WL_RATE_2X3_TXBF_SDM_MCS8  = 160,
400 	WL_RATE_2X3_TXBF_SDM_MCS9  = 161,
401 	WL_RATE_2X3_TXBF_SDM_MCS10 = 162,
402 	WL_RATE_2X3_TXBF_SDM_MCS11 = 163,
403 	WL_RATE_2X3_TXBF_SDM_MCS12 = 164,
404 	WL_RATE_2X3_TXBF_SDM_MCS13 = 165,
405 	WL_RATE_2X3_TXBF_SDM_MCS14 = 166,
406 	WL_RATE_2X3_TXBF_SDM_MCS15 = 167,
407 
408 	WL_RATE_2X3_TXBF_VHT0SS2   = 160,
409 	WL_RATE_2X3_TXBF_VHT1SS2   = 161,
410 	WL_RATE_2X3_TXBF_VHT2SS2   = 162,
411 	WL_RATE_2X3_TXBF_VHT3SS2   = 163,
412 	WL_RATE_2X3_TXBF_VHT4SS2   = 164,
413 	WL_RATE_2X3_TXBF_VHT5SS2   = 165,
414 	WL_RATE_2X3_TXBF_VHT6SS2   = 166,
415 	WL_RATE_2X3_TXBF_VHT7SS2   = 167,
416 	WL_RATE_2X3_TXBF_VHT8SS2   = 168,
417 	WL_RATE_2X3_TXBF_VHT9SS2   = 169,
418 
419 	/* 3 Streams */
420 
421 	WL_RATE_3X3_TXBF_SDM_MCS16 = 170,
422 	WL_RATE_3X3_TXBF_SDM_MCS17 = 171,
423 	WL_RATE_3X3_TXBF_SDM_MCS18 = 172,
424 	WL_RATE_3X3_TXBF_SDM_MCS19 = 173,
425 	WL_RATE_3X3_TXBF_SDM_MCS20 = 174,
426 	WL_RATE_3X3_TXBF_SDM_MCS21 = 175,
427 	WL_RATE_3X3_TXBF_SDM_MCS22 = 176,
428 	WL_RATE_3X3_TXBF_SDM_MCS23 = 177,
429 
430 	WL_RATE_3X3_TXBF_VHT0SS3   = 170,
431 	WL_RATE_3X3_TXBF_VHT1SS3   = 171,
432 	WL_RATE_3X3_TXBF_VHT2SS3   = 172,
433 	WL_RATE_3X3_TXBF_VHT3SS3   = 173,
434 	WL_RATE_3X3_TXBF_VHT4SS3   = 174,
435 	WL_RATE_3X3_TXBF_VHT5SS3   = 175,
436 	WL_RATE_3X3_TXBF_VHT6SS3   = 176,
437 	WL_RATE_3X3_TXBF_VHT7SS3   = 177
438 } clm_rates_t;
439 
440 /* Number of rate codes */
441 #define WL_NUMRATES 178
442 
443 #ifdef __cplusplus
444 }
445 #endif /* __cplusplus */
446 
447 #endif /* _bcmwifi_rates_h_ */
448