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 *----------------------------------------------------------------------*/
10 /* Operation mode value */
11 #define HT_OPMODE_NO_PROTECT 0
12 #define HT_OPMODE_OPTIONAL 1
13 #define HT_OPMODE_40MHZ_PROTECT 2
14 #define HT_OPMODE_MIXED 3
16 /* MIMO Power Save Settings */
17 #define MIMO_PS_STATIC 0
18 #define MIMO_PS_DYNAMIC 1
19 #define MIMO_PS_NOLIMIT 3
22 /* There should be 128 bits to cover all of the MCS rates. However, since
23 * 8190 does not support too much rates, one integer is quite enough. */
28 #define HT_SUPPORTED_MCS_1SS_BITMAP 0x000000ff
29 #define HT_SUPPORTED_MCS_2SS_BITMAP 0x0000ff00
30 #define HT_SUPPORTED_MCS_1SS_2SS_BITMAP \
31 (HT_MCS_1SS_BITMAP | HT_MCS_1SS_2SS_BITMAP)
34 typedef enum _HT_MCS_RATE {
45 HT_MCS10 = 0x00000400,
46 HT_MCS11 = 0x00000800,
47 HT_MCS12 = 0x00001000,
48 HT_MCS13 = 0x00002000,
49 HT_MCS14 = 0x00004000,
50 HT_MCS15 = 0x00008000,
51 /* Do not define MCS32 here although 8190 support MCS32 */
52 } HT_MCS_RATE, *PHT_MCS_RATE;
54 /* Represent Channel Width in HT Capabilities */
55 typedef enum _HT_CHANNEL_WIDTH {
56 HT_CHANNEL_WIDTH_20 = 0,
57 HT_CHANNEL_WIDTH_20_40 = 1,
58 } HT_CHANNEL_WIDTH, *PHT_CHANNEL_WIDTH;
60 /* Represent Extension Channel Offset in HT Capabilities
61 * This is available only in 40Mhz mode. */
62 typedef enum _HT_EXTCHNL_OFFSET {
63 HT_EXTCHNL_OFFSET_NO_EXT = 0,
64 HT_EXTCHNL_OFFSET_UPPER = 1,
65 HT_EXTCHNL_OFFSET_NO_DEF = 2,
66 HT_EXTCHNL_OFFSET_LOWER = 3,
67 } HT_EXTCHNL_OFFSET, *PHT_EXTCHNL_OFFSET;
69 typedef enum _CHNLOP {
70 CHNLOP_NONE = 0, /* No Action now */
71 CHNLOP_SCAN = 1, /* Scan in progress */
72 CHNLOP_SWBW = 2, /* Bandwidth switching in progress */
73 CHNLOP_SWCHNL = 3, /* Software Channel switching in progress */
76 /* Determine if the Channel Operation is in progress */
77 #define CHHLOP_IN_PROGRESS(_pHTInfo) \
78 (((_pHTInfo)->ChnlOp > CHNLOP_NONE) ? TRUE : FALSE)
81 typedef enum _HT_ACTION {
82 ACT_RECOMMAND_WIDTH = 0,
83 ACT_MIMO_PWR_SAVE = 1,
85 ACT_SET_PCO_PHASE = 3,
86 ACT_MIMO_CHL_MEASURE = 4,
87 ACT_RECIPROCITY_CORRECT = 5,
88 ACT_MIMO_CSI_MATRICS = 6,
89 ACT_MIMO_NOCOMPR_STEER = 7,
90 ACT_MIMO_COMPR_STEER = 8,
91 ACT_ANTENNA_SELECT = 9,
92 } HT_ACTION, *PHT_ACTION;
95 /* Define sub-carrier mode for 40MHZ. */
96 typedef enum _HT_Bandwidth_40MHZ_Sub_Carrier {
97 SC_MODE_DUPLICATE = 0,
100 SC_MODE_FULL40MHZ = 3,
103 typedef struct _HT_CAPABILITY_ELE {
105 /* HT capability info */
119 u8 LSigTxopProtect:1;
121 /* MAC HT parameters info */
122 u8 MaxRxAMPDUFactor:2;
126 /* Supported MCS set */
130 /* Extended HT Capability Info */
133 /* TXBF Capabilities */
136 /* Antenna Selection Capabilities */
139 } __packed HT_CAPABILITY_ELE, *PHT_CAPABILITY_ELE;
141 /*------------------------------------------------------------
142 * The HT Information element is present in beacons
143 * Only AP is required to include this element
144 *------------------------------------------------------------*/
146 typedef struct _HT_INFORMATION_ELE {
150 u8 RecommemdedTxWidth:1;
153 u8 SrvIntGranularity:3;
156 u8 NonGFDevPresent:1;
164 u8 SecondaryBeacon:1;
165 u8 LSigTxopProtectFull:1;
171 } __packed HT_INFORMATION_ELE, *PHT_INFORMATION_ELE;
173 /* MIMO Power Save control field.
174 * This is appear in MIMO Power Save Action Frame */
175 typedef struct _MIMOPS_CTRL {
179 } MIMOPS_CTRL, *PMIMOPS_CTRL;
181 typedef enum _HT_SPEC_VER {
182 HT_SPEC_VER_IEEE = 0,
184 } HT_SPEC_VER, *PHT_SPEC_VER;
186 typedef enum _HT_AGGRE_MODE_E {
188 HT_AGG_FORCE_ENABLE = 1,
189 HT_AGG_FORCE_DISABLE = 2,
190 } HT_AGGRE_MODE_E, *PHT_AGGRE_MODE_E;
192 /*----------------------------------------------------------------------------
193 * The Data structure is used to keep HT related variables when card is
194 * configured as non-AP STA mode.
195 * **Note** Current_xxx should be set to default value in HTInitializeHTInfo()
196 *----------------------------------------------------------------------------*/
198 typedef struct _RT_HIGH_THROUGHPUT {
200 u8 bCurrentHTSupport;
201 /* Tx 40MHz channel capability */
204 /* Tx Short GI for 40Mhz */
207 /* Tx Short GI for 20MHz */
210 /* Tx CCK rate capability */
214 /* 802.11n spec version for "peer" */
215 HT_SPEC_VER ePeerHTSpecVer;
218 /* HT related information for "Self" */
219 /* This is HT cap element sent to peer STA, which also indicate
220 * HT Rx capabilities. */
221 HT_CAPABILITY_ELE SelfHTCap;
222 HT_INFORMATION_ELE SelfHTInfo;
224 /* HT related information for "Peer" */
226 u8 PeerHTInfoBuf[32];
230 /* This indicates Tx A-MSDU capability */
233 u8 bCurrent_AMSDU_Support;
234 u16 nCurrent_AMSDU_MaxSize;
238 /* This indicate Tx A-MPDU capability */
240 u8 bCurrentAMPDUEnable;
242 u8 CurrentAMPDUFactor;
244 u8 CurrentMPDUDensity;
246 /* Forced A-MPDU enable */
247 HT_AGGRE_MODE_E ForcedAMPDUMode;
248 u8 ForcedAMPDUFactor;
249 u8 ForcedMPDUDensity;
251 /* Forced A-MSDU enable */
252 HT_AGGRE_MODE_E ForcedAMSDUMode;
253 u16 ForcedAMSDUMaxSize;
259 /* MIMO PS related */
263 /* 40MHz Channel Offset settings. */
264 HT_EXTCHNL_OFFSET CurSTAExtChnlOffset;
265 u8 bCurTxBW40MHz; /* If we use 40 MHz to Tx */
268 /* For Bandwidth Switching */
270 CHNLOP ChnlOp; /* sw switching channel in progress. */
272 struct timer_list SwBwTimer;
274 /* For Realtek proprietary A-MPDU factor for aggregation */
275 u8 bRegRT2RTAggregation;
276 u8 bCurrentRT2RTAggregation;
277 u8 bCurrentRT2RTLongSlotTime;
278 u8 szRT2RTAggBuffer[10];
280 /* Rx Reorder control */
281 u8 bRegRxReorderEnable;
282 u8 bCurRxReorderEnable;
284 u8 RxReorderPendingTime;
285 u16 RxReorderDropCounter;
287 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
290 #ifdef USB_RX_AGGREGATION_SUPPORT
292 u8 UsbRxFwAggrPageNum;
293 u8 UsbRxFwAggrPacketNum;
294 u8 UsbRxFwAggrTimeout;
297 /* Add for Broadcom(Linksys) IOT. */
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;
352 u8 bdRT2RTAggregation;
353 u8 bdRT2RTLongSlotTime;
356 typedef struct _MIMO_RSSI {
363 } MIMO_RSSI, *PMIMO_RSSI;
365 typedef struct _MIMO_EVM {
368 } MIMO_EVM, *PMIMO_EVM;
370 typedef struct _FALSE_ALARM_STATISTICS {
372 u32 Cnt_Rate_Illegal;
375 } FALSE_ALARM_STATISTICS, *PFALSE_ALARM_STATISTICS;