Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 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 | * |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 9 | * The full GNU General Public License is included in this distribution in the |
| 10 | * file called LICENSE. |
| 11 | * |
| 12 | * Contact Information: |
| 13 | * wlanfae <wlanfae@realtek.com> |
| 14 | ******************************************************************************/ |
| 15 | #ifndef _RTL819XU_HTTYPE_H_ |
| 16 | #define _RTL819XU_HTTYPE_H_ |
| 17 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 18 | #define MIMO_PS_STATIC 0 |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 19 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 20 | #define sHTCLng 4 |
| 21 | |
Larry Finger | 6e57911 | 2011-07-19 18:20:30 -0500 | [diff] [blame] | 22 | enum ht_channel_width { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 23 | HT_CHANNEL_WIDTH_20 = 0, |
| 24 | HT_CHANNEL_WIDTH_20_40 = 1, |
Larry Finger | 6e57911 | 2011-07-19 18:20:30 -0500 | [diff] [blame] | 25 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 26 | |
Larry Finger | b678bd1 | 2011-07-19 18:22:07 -0500 | [diff] [blame] | 27 | enum ht_extchnl_offset { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 28 | HT_EXTCHNL_OFFSET_NO_EXT = 0, |
| 29 | HT_EXTCHNL_OFFSET_UPPER = 1, |
| 30 | HT_EXTCHNL_OFFSET_NO_DEF = 2, |
| 31 | HT_EXTCHNL_OFFSET_LOWER = 3, |
Larry Finger | b678bd1 | 2011-07-19 18:22:07 -0500 | [diff] [blame] | 32 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 33 | |
Larry Finger | e92b71d | 2011-07-18 20:34:19 -0500 | [diff] [blame] | 34 | struct ht_capab_ele { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 35 | |
| 36 | u8 AdvCoding:1; |
| 37 | u8 ChlWidth:1; |
| 38 | u8 MimoPwrSave:2; |
| 39 | u8 GreenField:1; |
| 40 | u8 ShortGI20Mhz:1; |
| 41 | u8 ShortGI40Mhz:1; |
| 42 | u8 TxSTBC:1; |
| 43 | u8 RxSTBC:2; |
| 44 | u8 DelayBA:1; |
| 45 | u8 MaxAMSDUSize:1; |
| 46 | u8 DssCCk:1; |
| 47 | u8 PSMP:1; |
| 48 | u8 Rsvd1:1; |
| 49 | u8 LSigTxopProtect:1; |
| 50 | |
| 51 | u8 MaxRxAMPDUFactor:2; |
| 52 | u8 MPDUDensity:3; |
| 53 | u8 Rsvd2:3; |
| 54 | |
| 55 | u8 MCS[16]; |
| 56 | |
| 57 | |
| 58 | u16 ExtHTCapInfo; |
| 59 | |
| 60 | u8 TxBFCap[4]; |
| 61 | |
| 62 | u8 ASCap; |
| 63 | |
Larry Finger | e92b71d | 2011-07-18 20:34:19 -0500 | [diff] [blame] | 64 | } __packed; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 65 | |
| 66 | |
Larry Finger | 407e998 | 2011-07-18 20:31:44 -0500 | [diff] [blame] | 67 | struct ht_info_ele { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 68 | u8 ControlChl; |
| 69 | |
| 70 | u8 ExtChlOffset:2; |
| 71 | u8 RecommemdedTxWidth:1; |
| 72 | u8 RIFS:1; |
| 73 | u8 PSMPAccessOnly:1; |
| 74 | u8 SrvIntGranularity:3; |
| 75 | |
| 76 | u8 OptMode:2; |
| 77 | u8 NonGFDevPresent:1; |
| 78 | u8 Revd1:5; |
| 79 | u8 Revd2:8; |
| 80 | |
| 81 | u8 Rsvd3:6; |
| 82 | u8 DualBeacon:1; |
| 83 | u8 DualCTSProtect:1; |
| 84 | |
| 85 | u8 SecondaryBeacon:1; |
| 86 | u8 LSigTxopProtectFull:1; |
| 87 | u8 PcoActive:1; |
| 88 | u8 PcoPhase:1; |
| 89 | u8 Rsvd4:4; |
| 90 | |
| 91 | u8 BasicMSC[16]; |
Larry Finger | 407e998 | 2011-07-18 20:31:44 -0500 | [diff] [blame] | 92 | } __packed; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 93 | |
Larry Finger | d2eff5c | 2011-07-19 19:05:23 -0500 | [diff] [blame] | 94 | enum ht_spec_ver { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 95 | HT_SPEC_VER_IEEE = 0, |
| 96 | HT_SPEC_VER_EWC = 1, |
Larry Finger | d2eff5c | 2011-07-19 19:05:23 -0500 | [diff] [blame] | 97 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 98 | |
Larry Finger | d1936af | 2011-07-19 19:06:51 -0500 | [diff] [blame] | 99 | enum ht_aggre_mode { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 100 | HT_AGG_AUTO = 0, |
| 101 | HT_AGG_FORCE_ENABLE = 1, |
| 102 | HT_AGG_FORCE_DISABLE = 2, |
Larry Finger | d1936af | 2011-07-19 19:06:51 -0500 | [diff] [blame] | 103 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 104 | |
| 105 | |
Larry Finger | 7796d93 | 2011-07-18 20:22:19 -0500 | [diff] [blame] | 106 | struct rt_hi_throughput { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 107 | u8 bEnableHT; |
| 108 | u8 bCurrentHTSupport; |
| 109 | |
| 110 | u8 bRegBW40MHz; |
| 111 | u8 bCurBW40MHz; |
| 112 | |
| 113 | u8 bRegShortGI40MHz; |
| 114 | u8 bCurShortGI40MHz; |
| 115 | |
| 116 | u8 bRegShortGI20MHz; |
| 117 | u8 bCurShortGI20MHz; |
| 118 | |
| 119 | u8 bRegSuppCCK; |
| 120 | u8 bCurSuppCCK; |
| 121 | |
Larry Finger | d2eff5c | 2011-07-19 19:05:23 -0500 | [diff] [blame] | 122 | enum ht_spec_ver ePeerHTSpecVer; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 123 | |
| 124 | |
Larry Finger | e92b71d | 2011-07-18 20:34:19 -0500 | [diff] [blame] | 125 | struct ht_capab_ele SelfHTCap; |
Larry Finger | 407e998 | 2011-07-18 20:31:44 -0500 | [diff] [blame] | 126 | struct ht_info_ele SelfHTInfo; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 127 | |
| 128 | u8 PeerHTCapBuf[32]; |
| 129 | u8 PeerHTInfoBuf[32]; |
| 130 | |
| 131 | |
| 132 | u8 bAMSDU_Support; |
| 133 | u16 nAMSDU_MaxSize; |
| 134 | u8 bCurrent_AMSDU_Support; |
| 135 | u16 nCurrent_AMSDU_MaxSize; |
| 136 | |
| 137 | u8 bAMPDUEnable; |
| 138 | u8 bCurrentAMPDUEnable; |
| 139 | u8 AMPDU_Factor; |
| 140 | u8 CurrentAMPDUFactor; |
| 141 | u8 MPDU_Density; |
| 142 | u8 CurrentMPDUDensity; |
| 143 | |
Larry Finger | d1936af | 2011-07-19 19:06:51 -0500 | [diff] [blame] | 144 | enum ht_aggre_mode ForcedAMPDUMode; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 145 | u8 ForcedAMPDUFactor; |
| 146 | u8 ForcedMPDUDensity; |
| 147 | |
Larry Finger | d1936af | 2011-07-19 19:06:51 -0500 | [diff] [blame] | 148 | enum ht_aggre_mode ForcedAMSDUMode; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 149 | u16 ForcedAMSDUMaxSize; |
| 150 | |
| 151 | u8 bForcedShortGI; |
| 152 | |
| 153 | u8 CurrentOpMode; |
| 154 | |
| 155 | u8 SelfMimoPs; |
| 156 | u8 PeerMimoPs; |
| 157 | |
Larry Finger | b678bd1 | 2011-07-19 18:22:07 -0500 | [diff] [blame] | 158 | enum ht_extchnl_offset CurSTAExtChnlOffset; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 159 | u8 bCurTxBW40MHz; |
| 160 | u8 PeerBandwidth; |
| 161 | |
| 162 | u8 bSwBwInProgress; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 163 | u8 SwBwStep; |
| 164 | |
| 165 | u8 bRegRT2RTAggregation; |
| 166 | u8 RT2RT_HT_Mode; |
| 167 | u8 bCurrentRT2RTAggregation; |
| 168 | u8 bCurrentRT2RTLongSlotTime; |
| 169 | u8 szRT2RTAggBuffer[10]; |
| 170 | |
| 171 | u8 bRegRxReorderEnable; |
| 172 | u8 bCurRxReorderEnable; |
| 173 | u8 RxReorderWinSize; |
| 174 | u8 RxReorderPendingTime; |
| 175 | u16 RxReorderDropCounter; |
| 176 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 177 | u8 bIsPeerBcm; |
| 178 | |
| 179 | u8 IOTPeer; |
| 180 | u32 IOTAction; |
| 181 | u8 IOTRaFunc; |
| 182 | |
| 183 | u8 bWAIotBroadcom; |
| 184 | u8 WAIotTH; |
| 185 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 186 | u8 bAcceptAddbaReq; |
Larry Finger | 7796d93 | 2011-07-18 20:22:19 -0500 | [diff] [blame] | 187 | } __packed; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 188 | |
Larry Finger | a15e76a | 2011-07-18 20:26:49 -0500 | [diff] [blame] | 189 | struct bss_ht { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 190 | |
| 191 | u8 bdSupportHT; |
| 192 | |
| 193 | u8 bdHTCapBuf[32]; |
| 194 | u16 bdHTCapLen; |
| 195 | u8 bdHTInfoBuf[32]; |
| 196 | u16 bdHTInfoLen; |
| 197 | |
Larry Finger | d2eff5c | 2011-07-19 19:05:23 -0500 | [diff] [blame] | 198 | enum ht_spec_ver bdHTSpecVer; |
Larry Finger | 6e57911 | 2011-07-19 18:20:30 -0500 | [diff] [blame] | 199 | enum ht_channel_width bdBandWidth; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 200 | |
| 201 | u8 bdRT2RTAggregation; |
| 202 | u8 bdRT2RTLongSlotTime; |
| 203 | u8 RT2RT_HT_Mode; |
| 204 | u8 bdHT1R; |
Larry Finger | a15e76a | 2011-07-18 20:26:49 -0500 | [diff] [blame] | 205 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 206 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 207 | extern u8 MCS_FILTER_ALL[16]; |
| 208 | extern u8 MCS_FILTER_1SS[16]; |
| 209 | |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 210 | #define RATE_ADPT_1SS_MASK 0xFF |
| 211 | #define RATE_ADPT_2SS_MASK 0xF0 |
| 212 | #define RATE_ADPT_MCS32_MASK 0x01 |
| 213 | |
Larry Finger | e660594 | 2011-07-19 21:10:02 -0500 | [diff] [blame] | 214 | enum ht_aggre_size { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 215 | HT_AGG_SIZE_8K = 0, |
| 216 | HT_AGG_SIZE_16K = 1, |
| 217 | HT_AGG_SIZE_32K = 2, |
| 218 | HT_AGG_SIZE_64K = 3, |
Larry Finger | e660594 | 2011-07-19 21:10:02 -0500 | [diff] [blame] | 219 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 220 | |
Larry Finger | a866534 | 2011-07-19 19:12:22 -0500 | [diff] [blame] | 221 | enum ht_iot_peer { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 222 | HT_IOT_PEER_UNKNOWN = 0, |
| 223 | HT_IOT_PEER_REALTEK = 1, |
| 224 | HT_IOT_PEER_REALTEK_92SE = 2, |
| 225 | HT_IOT_PEER_BROADCOM = 3, |
| 226 | HT_IOT_PEER_RALINK = 4, |
| 227 | HT_IOT_PEER_ATHEROS = 5, |
Larry Finger | 831cb9d | 2011-08-25 11:48:17 -0500 | [diff] [blame] | 228 | HT_IOT_PEER_CISCO = 6, |
| 229 | HT_IOT_PEER_MARVELL = 7, |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 230 | HT_IOT_PEER_92U_SOFTAP = 8, |
| 231 | HT_IOT_PEER_SELF_SOFTAP = 9, |
| 232 | HT_IOT_PEER_AIRGO = 10, |
| 233 | HT_IOT_PEER_MAX = 11, |
Larry Finger | a866534 | 2011-07-19 19:12:22 -0500 | [diff] [blame] | 234 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 235 | |
Larry Finger | dd8f8ba | 2011-07-19 19:16:30 -0500 | [diff] [blame] | 236 | enum ht_iot_action { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 237 | HT_IOT_ACT_TX_USE_AMSDU_4K = 0x00000001, |
| 238 | HT_IOT_ACT_TX_USE_AMSDU_8K = 0x00000002, |
| 239 | HT_IOT_ACT_DISABLE_MCS14 = 0x00000004, |
| 240 | HT_IOT_ACT_DISABLE_MCS15 = 0x00000008, |
| 241 | HT_IOT_ACT_DISABLE_ALL_2SS = 0x00000010, |
| 242 | HT_IOT_ACT_DISABLE_EDCA_TURBO = 0x00000020, |
| 243 | HT_IOT_ACT_MGNT_USE_CCK_6M = 0x00000040, |
| 244 | HT_IOT_ACT_CDD_FSYNC = 0x00000080, |
| 245 | HT_IOT_ACT_PURE_N_MODE = 0x00000100, |
| 246 | HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200, |
| 247 | HT_IOT_ACT_FORCED_RTS = 0x00000400, |
| 248 | HT_IOT_ACT_AMSDU_ENABLE = 0x00000800, |
| 249 | HT_IOT_ACT_REJECT_ADDBA_REQ = 0x00001000, |
| 250 | HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT = 0x00002000, |
| 251 | HT_IOT_ACT_EDCA_BIAS_ON_RX = 0x00004000, |
| 252 | |
| 253 | HT_IOT_ACT_HYBRID_AGGREGATION = 0x00010000, |
| 254 | HT_IOT_ACT_DISABLE_SHORT_GI = 0x00020000, |
| 255 | HT_IOT_ACT_DISABLE_HIGH_POWER = 0x00040000, |
| 256 | HT_IOT_ACT_DISABLE_TX_40_MHZ = 0x00080000, |
| 257 | HT_IOT_ACT_TX_NO_AGGREGATION = 0x00100000, |
| 258 | HT_IOT_ACT_DISABLE_TX_2SS = 0x00200000, |
| 259 | |
Larry Finger | 831cb9d | 2011-08-25 11:48:17 -0500 | [diff] [blame] | 260 | HT_IOT_ACT_MID_HIGHPOWER = 0x00400000, |
| 261 | HT_IOT_ACT_NULL_DATA_POWER_SAVING = 0x00800000, |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 262 | |
Larry Finger | 831cb9d | 2011-08-25 11:48:17 -0500 | [diff] [blame] | 263 | HT_IOT_ACT_DISABLE_CCK_RATE = 0x01000000, |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 264 | HT_IOT_ACT_FORCED_ENABLE_BE_TXOP = 0x02000000, |
| 265 | HT_IOT_ACT_WA_IOT_Broadcom = 0x04000000, |
| 266 | |
| 267 | HT_IOT_ACT_DISABLE_RX_40MHZ_SHORT_GI = 0x08000000, |
| 268 | |
Larry Finger | dd8f8ba | 2011-07-19 19:16:30 -0500 | [diff] [blame] | 269 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 270 | |
Larry Finger | d745c10 | 2011-07-19 19:18:03 -0500 | [diff] [blame] | 271 | enum ht_iot_rafunc { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 272 | HT_IOT_RAFUNC_DISABLE_ALL = 0x00, |
| 273 | HT_IOT_RAFUNC_PEER_1R = 0x01, |
| 274 | HT_IOT_RAFUNC_TX_AMSDU = 0x02, |
Larry Finger | d745c10 | 2011-07-19 19:18:03 -0500 | [diff] [blame] | 275 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 276 | |
Larry Finger | bb9a7b3 | 2011-07-19 19:22:37 -0500 | [diff] [blame] | 277 | enum rt_ht_capability { |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 278 | RT_HT_CAP_USE_TURBO_AGGR = 0x01, |
| 279 | RT_HT_CAP_USE_LONG_PREAMBLE = 0x02, |
| 280 | RT_HT_CAP_USE_AMPDU = 0x04, |
| 281 | RT_HT_CAP_USE_WOW = 0x8, |
| 282 | RT_HT_CAP_USE_SOFTAP = 0x10, |
| 283 | RT_HT_CAP_USE_92SE = 0x20, |
Larry Finger | bb9a7b3 | 2011-07-19 19:22:37 -0500 | [diff] [blame] | 284 | }; |
Larry Finger | 94a7994 | 2011-08-23 19:00:42 -0500 | [diff] [blame] | 285 | |
| 286 | #endif |