1 #ifndef _R819XU_HTTYPE_H_
2 #define _R819XU_HTTYPE_H_
5 //------------------------------------------------------------
6 // The HT Capability element is present in beacons, association request,
7 // reassociation request and probe response frames
8 //------------------------------------------------------------
11 // Operation mode value
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
19 // MIMO Power Save Setings
21 #define MIMO_PS_STATIC 0
22 #define MIMO_PS_DYNAMIC 1
23 #define MIMO_PS_NOLIMIT 3
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.
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
39 typedef enum _HT_MCS_RATE{
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
57 }HT_MCS_RATE,*PHT_MCS_RATE;
60 // Represent Channel Width in HT Capabilities
62 typedef enum _HT_CHANNEL_WIDTH{
63 HT_CHANNEL_WIDTH_20 = 0,
64 HT_CHANNEL_WIDTH_20_40 = 1,
65 }HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH;
68 // Represent Extention Channel Offset in HT Capabilities
69 // This is available only in 40Mhz mode.
71 typedef enum _HT_EXTCHNL_OFFSET{
72 HT_EXTCHNL_OFFSET_NO_EXT = 0,
73 HT_EXTCHNL_OFFSET_UPPER = 1,
74 HT_EXTCHNL_OFFSET_NO_DEF = 2,
75 HT_EXTCHNL_OFFSET_LOWER = 3,
76 }HT_EXTCHNL_OFFSET, *PHT_EXTCHNL_OFFSET;
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
85 // Determine if the Channel Operation is in progress
86 #define CHHLOP_IN_PROGRESS(_pHTInfo) \
87 ((_pHTInfo)->ChnlOp > CHNLOP_NONE) ? TRUE : FALSE
90 typedef enum _HT_ACTION{
91 ACT_RECOMMAND_WIDTH = 0,
92 ACT_MIMO_PWR_SAVE = 1,
94 ACT_SET_PCO_PHASE = 3,
95 ACT_MIMO_CHL_MEASURE = 4,
96 ACT_RECIPROCITY_CORRECT = 5,
97 ACT_MIMO_CSI_MATRICS = 6,
98 ACT_MIMO_NOCOMPR_STEER = 7,
99 ACT_MIMO_COMPR_STEER = 8,
100 ACT_ANTENNA_SELECT = 9,
101 } HT_ACTION, *PHT_ACTION;
104 /* 2007/06/07 MH Define sub-carrier mode for 40MHZ. */
105 typedef enum _HT_Bandwidth_40MHZ_Sub_Carrier{
106 SC_MODE_DUPLICATE = 0,
109 SC_MODE_FULL40MHZ = 3,
112 typedef struct _HT_CAPABILITY_ELE{
128 u8 LSigTxopProtect:1;
130 //MAC HT parameters info
131 u8 MaxRxAMPDUFactor:2;
139 //Extended HT Capability Info
145 //Antenna Selection Capabilities
148 }__attribute__((packed)) HT_CAPABILITY_ELE, *PHT_CAPABILITY_ELE;
150 //------------------------------------------------------------
151 // The HT Information element is present in beacons
152 // Only AP is required to include this element
153 //------------------------------------------------------------
155 typedef struct _HT_INFORMATION_ELE{
159 u8 RecommemdedTxWidth:1;
162 u8 SrvIntGranularity:3;
165 u8 NonGFDevPresent:1;
173 u8 SecondaryBeacon:1;
174 u8 LSigTxopProtectFull:1;
180 }__attribute__((packed)) HT_INFORMATION_ELE, *PHT_INFORMATION_ELE;
183 // MIMO Power Save control field.
184 // This is appear in MIMO Power Save Action Frame
186 typedef struct _MIMOPS_CTRL{
190 } MIMOPS_CTRL, *PMIMOPS_CTRL;
192 typedef enum _HT_SPEC_VER{
193 HT_SPEC_VER_IEEE = 0,
195 }HT_SPEC_VER, *PHT_SPEC_VER;
197 typedef enum _HT_AGGRE_MODE_E{
199 HT_AGG_FORCE_ENABLE = 1,
200 HT_AGG_FORCE_DISABLE = 2,
201 }HT_AGGRE_MODE_E, *PHT_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 //------------------------------------------------------------
209 typedef struct _RT_HIGH_THROUGHPUT{
210 // DECLARE_RT_OBJECT(_RT_HIGH_THROUGHPUT);
212 u8 bCurrentHTSupport;
214 u8 bRegBW40MHz; // Tx 40MHz channel capablity
215 u8 bCurBW40MHz; // Tx 40MHz channel capability
217 u8 bRegShortGI40MHz; // Tx Short GI for 40Mhz
218 u8 bCurShortGI40MHz; // Tx Short GI for 40MHz
220 u8 bRegShortGI20MHz; // Tx Short GI for 20MHz
221 u8 bCurShortGI20MHz; // Tx Short GI for 20MHz
223 u8 bRegSuppCCK; // Tx CCK rate capability
224 u8 bCurSuppCCK; // Tx CCK rate capability
226 // 802.11n spec version for "peer"
227 HT_SPEC_VER ePeerHTSpecVer;
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.
234 // HT related information for "Peer"
236 u8 PeerHTInfoBuf[32];
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
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
254 // Forced A-MPDU enable
255 HT_AGGRE_MODE_E ForcedAMPDUMode;
256 u8 ForcedAMPDUFactor;
257 u8 ForcedMPDUDensity;
259 // Forced A-MSDU enable
260 HT_AGGRE_MODE_E ForcedAMSDUMode;
261 u16 ForcedAMSDUMaxSize;
271 // 40MHz Channel Offset settings.
272 HT_EXTCHNL_OFFSET CurSTAExtChnlOffset;
273 u8 bCurTxBW40MHz; // If we use 40 MHz to Tx
276 // For Bandwidth Switching
278 CHNLOP ChnlOp; // software switching channel in progress. By Bruce, 2008-02-15.
280 //RT_TIMER SwBwTimer;
281 struct timer_list SwBwTimer;
283 // For Realtek proprietary A-MPDU factor for aggregation
284 u8 bRegRT2RTAggregation;
285 u8 bCurrentRT2RTAggregation;
286 u8 bCurrentRT2RTLongSlotTime;
287 u8 szRT2RTAggBuffer[10];
289 // Rx Reorder control
290 u8 bRegRxReorderEnable;
291 u8 bCurRxReorderEnable;
293 u8 RxReorderPendingTime;
294 u16 RxReorderDropCounter;
297 // Add for Broadcom(Linksys) IOT. Joseph
302 }RT_HIGH_THROUGHPUT, *PRT_HIGH_THROUGHPUT;
305 //------------------------------------------------------------
306 // The Data structure is used to keep HT related variable for "each Sta"
307 // when card is configured as "AP mode"
308 //------------------------------------------------------------
310 typedef struct _RT_HTINFO_STA_ENTRY{
320 u8 HTHighestOperaRate;
329 }RT_HTINFO_STA_ENTRY, *PRT_HTINFO_STA_ENTRY;
335 //------------------------------------------------------------
336 // The Data structure is used to keep HT related variable for "each AP"
337 // when card is configured as "STA mode"
338 //------------------------------------------------------------
340 typedef struct _BSS_HT{
344 // HT related elements
350 HT_SPEC_VER bdHTSpecVer;
351 //HT_CAPABILITY_ELE bdHTCapEle;
352 //HT_INFORMATION_ELE bdHTInfoEle;
354 u8 bdRT2RTAggregation;
355 u8 bdRT2RTLongSlotTime;
359 typedef struct _MIMO_RSSI{
366 }MIMO_RSSI, *PMIMO_RSSI;
368 typedef struct _MIMO_EVM{
371 }MIMO_EVM, *PMIMO_EVM;
373 typedef struct _FALSE_ALARM_STATISTICS{
375 u32 Cnt_Rate_Illegal;
378 }FALSE_ALARM_STATISTICS, *PFALSE_ALARM_STATISTICS;
382 #endif //__INC_HTTYPE_H