Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
r819xU_HTType.h
Go to the documentation of this file.
1 #ifndef _R819XU_HTTYPE_H_
2 #define _R819XU_HTTYPE_H_
3 
4 
5 //------------------------------------------------------------
6 // The HT Capability element is present in beacons, association request,
7 // reassociation request and probe response frames
8 //------------------------------------------------------------
9 
10 //
11 // Operation mode value
12 //
13 #define HT_OPMODE_NO_PROTECT 0
14 #define HT_OPMODE_OPTIONAL 1
15 #define HT_OPMODE_40MHZ_PROTECT 2
16 #define HT_OPMODE_MIXED 3
17 
18 //
19 // MIMO Power Save Settings
20 //
21 #define MIMO_PS_STATIC 0
22 #define MIMO_PS_DYNAMIC 1
23 #define MIMO_PS_NOLIMIT 3
24 
25 
26 //
27 // There should be 128 bits to cover all of the MCS rates. However, since
28 // 8190 does not support too much rates, one integer is quite enough.
29 //
30 
31 #define sHTCLng 4
32 
33 
34 #define HT_SUPPORTED_MCS_1SS_BITMAP 0x000000ff
35 #define HT_SUPPORTED_MCS_2SS_BITMAP 0x0000ff00
36 #define HT_SUPPORTED_MCS_1SS_2SS_BITMAP HT_MCS_1SS_BITMAP|HT_MCS_1SS_2SS_BITMAP
37 
38 
39 typedef enum _HT_MCS_RATE{
40  HT_MCS0 = 0x00000001,
41  HT_MCS1 = 0x00000002,
42  HT_MCS2 = 0x00000004,
43  HT_MCS3 = 0x00000008,
44  HT_MCS4 = 0x00000010,
45  HT_MCS5 = 0x00000020,
46  HT_MCS6 = 0x00000040,
47  HT_MCS7 = 0x00000080,
48  HT_MCS8 = 0x00000100,
49  HT_MCS9 = 0x00000200,
50  HT_MCS10 = 0x00000400,
51  HT_MCS11 = 0x00000800,
52  HT_MCS12 = 0x00001000,
53  HT_MCS13 = 0x00002000,
54  HT_MCS14 = 0x00004000,
55  HT_MCS15 = 0x00008000,
56  // Do not define MCS32 here although 8190 support MCS32
58 
59 //
60 // Represent Channel Width in HT Capabilities
61 //
62 typedef enum _HT_CHANNEL_WIDTH{
66 
67 //
68 // Represent Extension Channel Offset in HT Capabilities
69 // This is available only in 40Mhz mode.
70 //
71 typedef enum _HT_EXTCHNL_OFFSET{
77 
78 typedef enum _CHNLOP{
79  CHNLOP_NONE = 0, // No Action now
80  CHNLOP_SCAN = 1, // Scan in progress
81  CHNLOP_SWBW = 2, // Bandwidth switching in progress
82  CHNLOP_SWCHNL = 3, // Software Channel switching in progress
83 } CHNLOP, *PCHNLOP;
84 
85 // Determine if the Channel Operation is in progress
86 #define CHHLOP_IN_PROGRESS(_pHTInfo) \
87  ((_pHTInfo)->ChnlOp > CHNLOP_NONE) ? TRUE : FALSE
88 
89 
90 typedef enum _HT_ACTION{
93  ACT_PSMP = 2,
102 
103 
104 /* 2007/06/07 MH Define sub-carrier mode for 40MHZ. */
110 }HT_BW40_SC_E;
111 
112 typedef struct _HT_CAPABILITY_ELE{
113 
114  //HT capability info
115  u8 AdvCoding:1;
116  u8 ChlWidth:1;
117  u8 MimoPwrSave:2;
118  u8 GreenField:1;
119  u8 ShortGI20Mhz:1;
120  u8 ShortGI40Mhz:1;
121  u8 TxSTBC:1;
122  u8 RxSTBC:2;
123  u8 DelayBA:1;
124  u8 MaxAMSDUSize:1;
125  u8 DssCCk:1;
126  u8 PSMP:1;
127  u8 Rsvd1:1;
129 
130  //MAC HT parameters info
132  u8 MPDUDensity:3;
133  u8 Rsvd2:3;
134 
135  //Supported MCS set
136  u8 MCS[16];
137 
138 
139  //Extended HT Capability Info
141 
142  //TXBF Capabilities
143  u8 TxBFCap[4];
144 
145  //Antenna Selection Capabilities
146  u8 ASCap;
147 
148 }__attribute__((packed)) HT_CAPABILITY_ELE, *PHT_CAPABILITY_ELE;
149 
150 //------------------------------------------------------------
151 // The HT Information element is present in beacons
152 // Only AP is required to include this element
153 //------------------------------------------------------------
160  u8 RIFS:1;
166  u8 Revd1:5;
170  u8 DualBeacon:1;
171  u8 DualCTSProtect:1;
175  u8 PcoActive:1;
177  u8 Rsvd4:4;
178 
180 }__attribute__((packed)) HT_INFORMATION_ELE, *PHT_INFORMATION_ELE;
182 //
183 // MIMO Power Save control field.
184 // This is appear in MIMO Power Save Action Frame
185 //
187  u8 MimoPsEnable:1;
188  u8 MimoPsMode:1;
192 typedef enum _HT_SPEC_VER{
197 typedef enum _HT_AGGRE_MODE_E{
203 //------------------------------------------------------------
204 // The Data structure is used to keep HT related variables when card is
205 // configured as non-AP STA mode. **Note** Current_xxx should be set
206 // to default value in HTInitializeHTInfo()
207 //------------------------------------------------------------
208 
209 typedef struct _RT_HIGH_THROUGHPUT{
210 // DECLARE_RT_OBJECT(_RT_HIGH_THROUGHPUT);
211  u8 bEnableHT;
213 
214  u8 bRegBW40MHz; // Tx 40MHz channel capability
215  u8 bCurBW40MHz; // Tx 40MHz channel capability
216 
217  u8 bRegShortGI40MHz; // Tx Short GI for 40Mhz
218  u8 bCurShortGI40MHz; // Tx Short GI for 40MHz
219 
220  u8 bRegShortGI20MHz; // Tx Short GI for 20MHz
221  u8 bCurShortGI20MHz; // Tx Short GI for 20MHz
222 
223  u8 bRegSuppCCK; // Tx CCK rate capability
224  u8 bCurSuppCCK; // Tx CCK rate capability
225 
226  // 802.11n spec version for "peer"
228 
229 
230  // HT related information for "Self"
231  HT_CAPABILITY_ELE SelfHTCap; // This is HT cap element sent to peer STA, which also indicate HT Rx capabilities.
232  HT_INFORMATION_ELE SelfHTInfo; // This is HT info element sent to peer STA, which also indicate HT Rx capabilities.
233 
234  // HT related information for "Peer"
235  u8 PeerHTCapBuf[32];
236  u8 PeerHTInfoBuf[32];
237 
238 
239  // A-MSDU related
240  u8 bAMSDU_Support; // This indicates Tx A-MSDU capability
241  u16 nAMSDU_MaxSize; // This indicates Tx A-MSDU capability
242  u8 bCurrent_AMSDU_Support; // This indicates Tx A-MSDU capability
243  u16 nCurrent_AMSDU_MaxSize; // This indicates Tx A-MSDU capability
244 
245 
246  // AMPDU related <2006.08.10 Emily>
247  u8 bAMPDUEnable; // This indicate Tx A-MPDU capability
248  u8 bCurrentAMPDUEnable; // This indicate Tx A-MPDU capability
249  u8 AMPDU_Factor; // This indicate Tx A-MPDU capability
250  u8 CurrentAMPDUFactor; // This indicate Tx A-MPDU capability
251  u8 MPDU_Density; // This indicate Tx A-MPDU capability
252  u8 CurrentMPDUDensity; // This indicate Tx A-MPDU capability
253 
254  // Forced A-MPDU enable
258 
259  // Forced A-MSDU enable
262 
264 
266 
267  // MIMO PS related
268  u8 SelfMimoPs;
269  u8 PeerMimoPs;
270 
271  // 40MHz Channel Offset settings.
273  u8 bCurTxBW40MHz; // If we use 40 MHz to Tx
275 
276  // For Bandwidth Switching
278  CHNLOP ChnlOp; // software switching channel in progress. By Bruce, 2008-02-15.
279  u8 SwBwStep;
280  //RT_TIMER SwBwTimer;
282 
283  // For Realtek proprietary A-MPDU factor for aggregation
287  u8 szRT2RTAggBuffer[10];
288 
289  // Rx Reorder control
295 
296 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
297  u8 UsbTxAggrNum;
298 #endif
299 #ifdef USB_RX_AGGREGATION_SUPPORT
300  u8 UsbRxFwAggrEn;
301  u8 UsbRxFwAggrPageNum;
302  u8 UsbRxFwAggrPacketNum;
303  u8 UsbRxFwAggrTimeout;
304 #endif
305 
306  // Add for Broadcom(Linksys) IOT. Joseph
307  u8 bIsPeerBcm;
308 
309  // For IOT issue.
310  u32 IOTAction;
312 
313 
314 //------------------------------------------------------------
315 // The Data structure is used to keep HT related variable for "each Sta"
316 // when card is configured as "AP mode"
317 //------------------------------------------------------------
318 
319 typedef struct _RT_HTINFO_STA_ENTRY{
320  u8 bEnableHT;
321 
322  u8 bSupportCck;
323 
325 
328 
330 
331  u8 bBw40MHz;
332 
333  u8 MimoPs;
334 
335  u8 McsRateSet[16];
336 
337 
339 
340 
341 
342 
343 
344 //------------------------------------------------------------
345 // The Data structure is used to keep HT related variable for "each AP"
346 // when card is configured as "STA mode"
347 //------------------------------------------------------------
348 
349 typedef struct _BSS_HT{
350 
351  u8 bdSupportHT;
352 
353  // HT related elements
354  u8 bdHTCapBuf[32];
355  u16 bdHTCapLen;
356  u8 bdHTInfoBuf[32];
358 
360  //HT_CAPABILITY_ELE bdHTCapEle;
361  //HT_INFORMATION_ELE bdHTInfoEle;
362 
365 }BSS_HT, *PBSS_HT;
366 
367 typedef struct _MIMO_RSSI{
369  u32 AntennaA;
370  u32 AntennaB;
371  u32 AntennaC;
372  u32 AntennaD;
373  u32 Average;
375 
376 typedef struct _MIMO_EVM{
377  u32 EVM1;
378  u32 EVM2;
380 
381 typedef struct _FALSE_ALARM_STATISTICS{
385  u32 Cnt_all;
387 
388 
389 
390 #endif //__INC_HTTYPE_H
391