Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rtl819x_HT.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
3  *
4  * This program is distributed in the hope that it will be useful, but WITHOUT
5  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
7  * more details.
8  *
9  * You should have received a copy of the GNU General Public License along with
10  * this program; if not, write to the Free Software Foundation, Inc.,
11  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
12  *
13  * The full GNU General Public License is included in this distribution in the
14  * file called LICENSE.
15  *
16  * Contact Information:
17  * wlanfae <[email protected]>
18 ******************************************************************************/
19 #ifndef _RTL819XU_HTTYPE_H_
20 #define _RTL819XU_HTTYPE_H_
21 
22 
23 #define HT_OPMODE_NO_PROTECT 0
24 #define HT_OPMODE_OPTIONAL 1
25 #define HT_OPMODE_40MHZ_PROTECT 2
26 #define HT_OPMODE_MIXED 3
27 
28 #define MIMO_PS_STATIC 0
29 #define MIMO_PS_DYNAMIC 1
30 #define MIMO_PS_NOLIMIT 3
31 
32 
33 
34 #define sHTCLng 4
35 
36 
37 #define HT_SUPPORTED_MCS_1SS_BITMAP 0x000000ff
38 #define HT_SUPPORTED_MCS_2SS_BITMAP 0x0000ff00
39 #define HT_SUPPORTED_MCS_1SS_2SS_BITMAP \
40  (HT_MCS_1SS_BITMAP | HT_MCS_1SS_2SS_BITMAP)
41 
43  HT_MCS0 = 0x00000001,
44  HT_MCS1 = 0x00000002,
45  HT_MCS2 = 0x00000004,
46  HT_MCS3 = 0x00000008,
47  HT_MCS4 = 0x00000010,
48  HT_MCS5 = 0x00000020,
49  HT_MCS6 = 0x00000040,
50  HT_MCS7 = 0x00000080,
51  HT_MCS8 = 0x00000100,
52  HT_MCS9 = 0x00000200,
53  HT_MCS10 = 0x00000400,
54  HT_MCS11 = 0x00000800,
55  HT_MCS12 = 0x00001000,
56  HT_MCS13 = 0x00002000,
57  HT_MCS14 = 0x00004000,
58  HT_MCS15 = 0x00008000,
59 };
60 
64 };
65 
71 };
72 
73 enum chnl_op {
78 };
79 
80 #define CHHLOP_IN_PROGRESS(_pHTInfo) \
81  ((_pHTInfo)->ChnlOp > CHNLOP_NONE) ? true : false
82 
83 /*
84 union ht_capability {
85  u16 ShortData;
86  u8 CharData[2];
87  struct
88  {
89  u16 AdvCoding:1;
90  u16 ChlWidth:1;
91  u16 MimoPwrSave:2;
92  u16 GreenField:1;
93  u16 ShortGI20Mhz:1;
94  u16 ShortGI40Mhz:1;
95  u16 STBC:1;
96  u16 BeamForm:1;
97  u16 DelayBA:1;
98  u16 MaxAMSDUSize:1;
99  u16 DssCCk:1;
100  u16 PSMP:1;
101  u16 Rsvd:3;
102  }Field;
103 };
104 
105 union ht_capability_macpara {
106  u8 ShortData;
107  u8 CharData[1];
108  struct
109  {
110  u8 MaxRxAMPDU:2;
111  u8 MPDUDensity:2;
112  u8 Rsvd:4;
113  }Field;
114 };
115 */
116 
117 enum ht_action {
120  ACT_PSMP = 2,
128 };
129 
130 
136 };
137 
138 struct ht_capab_ele {
139 
151  u8 PSMP:1;
154 
158 
159  u8 MCS[16];
160 
161 
163 
165 
167 
168 } __packed;
169 
170 
171 struct ht_info_ele {
173 
176  u8 RIFS:1;
179 
184 
188 
194 
196 } __packed;
197 
198 struct mimops_ctrl {
202 };
203 
207 };
208 
213 };
214 
215 
219 
222 
225 
228 
231 
233 
234 
237 
240 
241 
246 
253 
257 
260 
262 
264 
267 
271 
275 
281 
287 
289 
293 
296 
298 } __packed;
299 
300 
301 
304 
306 
308 
311 
313 
315 
317 
319 
321 
323 
325 
327 
329 
330 };
331 
332 
333 
334 
335 
336 
337 struct bss_ht {
338 
340 
345 
348 
353 };
354 
355 struct mimo_rssi {
362 };
363 
364 struct mimo_evm {
367 };
368 
377 };
378 
379 
380 extern u8 MCS_FILTER_ALL[16];
381 extern u8 MCS_FILTER_1SS[16];
382 
383 #define PICK_RATE(_nLegacyRate, _nMcsRate) \
384  ((_nMcsRate == 0) ? (_nLegacyRate&0x7f) : (_nMcsRate))
385 #define LEGACY_WIRELESS_MODE IEEE_MODE_MASK
386 
387 #define CURRENT_RATE(WirelessMode, LegacyRate, HTRate) \
388  ((WirelessMode & (LEGACY_WIRELESS_MODE)) != 0) ? \
389  (LegacyRate) : (PICK_RATE(LegacyRate, HTRate))
390 
391 
392 
393 #define RATE_ADPT_1SS_MASK 0xFF
394 #define RATE_ADPT_2SS_MASK 0xF0
395 #define RATE_ADPT_MCS32_MASK 0x01
396 
397 #define IS_11N_MCS_RATE(rate) (rate&0x80)
398 
404 };
405 
419 };
420 
423 };
424 
433  HT_IOT_ACT_CDD_FSYNC = 0x00000080,
436  HT_IOT_ACT_FORCED_RTS = 0x00000400,
441 
448 
451 
455 
457 
458 };
459 
464 };
465 
473 };
474 
475 #endif