Commit | Line | Data |
---|---|---|
18056f34 GKH |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | /* | |
94a79942 LF |
3 | * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved. |
4 | * | |
18056f34 GKH |
5 | * Contact Information: wlanfae <wlanfae@realtek.com> |
6 | */ | |
ecdfa446 GKH |
7 | #ifndef _RTL819XU_HTTYPE_H_ |
8 | #define _RTL819XU_HTTYPE_H_ | |
9 | ||
ecdfa446 | 10 | #define MIMO_PS_STATIC 0 |
ecdfa446 | 11 | |
ecdfa446 GKH |
12 | #define sHTCLng 4 |
13 | ||
6e579119 | 14 | enum ht_channel_width { |
ecdfa446 GKH |
15 | HT_CHANNEL_WIDTH_20 = 0, |
16 | HT_CHANNEL_WIDTH_20_40 = 1, | |
6e579119 | 17 | }; |
ecdfa446 | 18 | |
b678bd1f | 19 | enum ht_extchnl_offset { |
ecdfa446 GKH |
20 | HT_EXTCHNL_OFFSET_NO_EXT = 0, |
21 | HT_EXTCHNL_OFFSET_UPPER = 1, | |
22 | HT_EXTCHNL_OFFSET_NO_DEF = 2, | |
23 | HT_EXTCHNL_OFFSET_LOWER = 3, | |
b678bd1f | 24 | }; |
ecdfa446 | 25 | |
e92b71d5 | 26 | struct ht_capab_ele { |
ecdfa446 GKH |
27 | u8 AdvCoding:1; |
28 | u8 ChlWidth:1; | |
29 | u8 MimoPwrSave:2; | |
30 | u8 GreenField:1; | |
31 | u8 ShortGI20Mhz:1; | |
32 | u8 ShortGI40Mhz:1; | |
33 | u8 TxSTBC:1; | |
34 | u8 RxSTBC:2; | |
35 | u8 DelayBA:1; | |
36 | u8 MaxAMSDUSize:1; | |
37 | u8 DssCCk:1; | |
38 | u8 PSMP:1; | |
39 | u8 Rsvd1:1; | |
40 | u8 LSigTxopProtect:1; | |
41 | ||
ecdfa446 GKH |
42 | u8 MaxRxAMPDUFactor:2; |
43 | u8 MPDUDensity:3; | |
44 | u8 Rsvd2:3; | |
45 | ||
ecdfa446 GKH |
46 | u8 MCS[16]; |
47 | ||
ecdfa446 GKH |
48 | u16 ExtHTCapInfo; |
49 | ||
ecdfa446 GKH |
50 | u8 TxBFCap[4]; |
51 | ||
ecdfa446 GKH |
52 | u8 ASCap; |
53 | ||
e92b71d5 | 54 | } __packed; |
ecdfa446 | 55 | |
407e998e | 56 | struct ht_info_ele { |
ecdfa446 GKH |
57 | u8 ControlChl; |
58 | ||
59 | u8 ExtChlOffset:2; | |
60 | u8 RecommemdedTxWidth:1; | |
61 | u8 RIFS:1; | |
62 | u8 PSMPAccessOnly:1; | |
63 | u8 SrvIntGranularity:3; | |
64 | ||
65 | u8 OptMode:2; | |
66 | u8 NonGFDevPresent:1; | |
67 | u8 Revd1:5; | |
68 | u8 Revd2:8; | |
69 | ||
70 | u8 Rsvd3:6; | |
71 | u8 DualBeacon:1; | |
72 | u8 DualCTSProtect:1; | |
73 | ||
74 | u8 SecondaryBeacon:1; | |
75 | u8 LSigTxopProtectFull:1; | |
76 | u8 PcoActive:1; | |
77 | u8 PcoPhase:1; | |
78 | u8 Rsvd4:4; | |
79 | ||
80 | u8 BasicMSC[16]; | |
407e998e | 81 | } __packed; |
ecdfa446 | 82 | |
d2eff5c3 | 83 | enum ht_spec_ver { |
ecdfa446 GKH |
84 | HT_SPEC_VER_IEEE = 0, |
85 | HT_SPEC_VER_EWC = 1, | |
d2eff5c3 | 86 | }; |
ecdfa446 | 87 | |
d1936afc | 88 | enum ht_aggre_mode { |
ecdfa446 GKH |
89 | HT_AGG_AUTO = 0, |
90 | HT_AGG_FORCE_ENABLE = 1, | |
91 | HT_AGG_FORCE_DISABLE = 2, | |
d1936afc | 92 | }; |
ecdfa446 | 93 | |
7796d93e | 94 | struct rt_hi_throughput { |
ab4bcf79 | 95 | u8 enable_ht; |
ecdfa446 GKH |
96 | u8 bCurrentHTSupport; |
97 | ||
94a79942 LF |
98 | u8 bRegBW40MHz; |
99 | u8 bCurBW40MHz; | |
ecdfa446 | 100 | |
94a79942 LF |
101 | u8 bRegShortGI40MHz; |
102 | u8 bCurShortGI40MHz; | |
ecdfa446 | 103 | |
94a79942 LF |
104 | u8 bRegShortGI20MHz; |
105 | u8 bCurShortGI20MHz; | |
ecdfa446 | 106 | |
94a79942 LF |
107 | u8 bRegSuppCCK; |
108 | u8 bCurSuppCCK; | |
ecdfa446 | 109 | |
d2eff5c3 | 110 | enum ht_spec_ver ePeerHTSpecVer; |
ecdfa446 | 111 | |
e92b71d5 | 112 | struct ht_capab_ele SelfHTCap; |
407e998e | 113 | struct ht_info_ele SelfHTInfo; |
ecdfa446 | 114 | |
ecdfa446 GKH |
115 | u8 PeerHTCapBuf[32]; |
116 | u8 PeerHTInfoBuf[32]; | |
117 | ||
94a79942 LF |
118 | u8 bAMSDU_Support; |
119 | u16 nAMSDU_MaxSize; | |
120 | u8 bCurrent_AMSDU_Support; | |
121 | u16 nCurrent_AMSDU_MaxSize; | |
ecdfa446 | 122 | |
94a79942 LF |
123 | u8 bAMPDUEnable; |
124 | u8 bCurrentAMPDUEnable; | |
125 | u8 AMPDU_Factor; | |
126 | u8 CurrentAMPDUFactor; | |
127 | u8 MPDU_Density; | |
53be6238 | 128 | u8 current_mpdu_density; |
ecdfa446 | 129 | |
d1936afc | 130 | enum ht_aggre_mode ForcedAMPDUMode; |
53be6238 PH |
131 | u8 forced_ampdu_factor; |
132 | u8 forced_mpdu_density; | |
ecdfa446 | 133 | |
d1936afc | 134 | enum ht_aggre_mode ForcedAMSDUMode; |
be13eda5 | 135 | u8 forced_short_gi; |
ecdfa446 | 136 | |
be13eda5 | 137 | u8 current_op_mode; |
ecdfa446 | 138 | |
be13eda5 | 139 | u8 self_mimo_ps; |
9c63f133 | 140 | u8 peer_mimo_ps; |
ecdfa446 | 141 | |
b678bd1f | 142 | enum ht_extchnl_offset CurSTAExtChnlOffset; |
92b2f4b8 | 143 | u8 cur_tx_bw40mhz; |
27dd3f00 | 144 | u8 sw_bw_in_progress; |
27dd3f00 | 145 | u8 reg_rt2rt_aggregation; |
94a79942 | 146 | u8 RT2RT_HT_Mode; |
27dd3f00 | 147 | u8 current_rt2rt_aggregation; |
92b2f4b8 | 148 | u8 current_rt2rt_long_slot_time; |
55bce0ae | 149 | u8 sz_rt2rt_agg_buf[10]; |
ecdfa446 | 150 | |
55bce0ae PH |
151 | u8 reg_rx_reorder_enable; |
152 | u8 cur_rx_reorder_enable; | |
155c89f1 PH |
153 | u8 rx_reorder_win_size; |
154 | u8 rx_reorder_pending_time; | |
155 | u16 rx_reorder_drop_counter; | |
ecdfa446 | 156 | u8 IOTPeer; |
9c63f133 PH |
157 | u32 iot_action; |
158 | u8 iot_ra_func; | |
7796d93e | 159 | } __packed; |
ecdfa446 | 160 | |
a15e76ad | 161 | struct bss_ht { |
70c090af | 162 | u8 bd_support_ht; |
ecdfa446 | 163 | |
70c090af WD |
164 | u8 bd_ht_cap_buf[32]; |
165 | u16 bd_ht_cap_len; | |
166 | u8 bd_ht_info_buf[32]; | |
167 | u16 bd_ht_info_len; | |
ecdfa446 | 168 | |
2fbcd6de | 169 | enum ht_spec_ver bd_ht_spec_ver; |
e6378e21 | 170 | enum ht_channel_width bd_bandwidth; |
ecdfa446 | 171 | |
70c090af WD |
172 | u8 bd_rt2rt_aggregation; |
173 | u8 bd_rt2rt_long_slot_time; | |
174 | u8 rt2rt_ht_mode; | |
175 | u8 bd_ht_1r; | |
a15e76ad | 176 | }; |
ecdfa446 | 177 | |
ecdfa446 GKH |
178 | extern u8 MCS_FILTER_ALL[16]; |
179 | extern u8 MCS_FILTER_1SS[16]; | |
180 | ||
94a79942 LF |
181 | #define RATE_ADPT_1SS_MASK 0xFF |
182 | #define RATE_ADPT_2SS_MASK 0xF0 | |
ecdfa446 GKH |
183 | #define RATE_ADPT_MCS32_MASK 0x01 |
184 | ||
e6605947 | 185 | enum ht_aggre_size { |
ecdfa446 GKH |
186 | HT_AGG_SIZE_8K = 0, |
187 | HT_AGG_SIZE_16K = 1, | |
188 | HT_AGG_SIZE_32K = 2, | |
189 | HT_AGG_SIZE_64K = 3, | |
e6605947 | 190 | }; |
ecdfa446 | 191 | |
a8665346 | 192 | enum ht_iot_peer { |
ecdfa446 GKH |
193 | HT_IOT_PEER_UNKNOWN = 0, |
194 | HT_IOT_PEER_REALTEK = 1, | |
94a79942 LF |
195 | HT_IOT_PEER_REALTEK_92SE = 2, |
196 | HT_IOT_PEER_BROADCOM = 3, | |
197 | HT_IOT_PEER_RALINK = 4, | |
198 | HT_IOT_PEER_ATHEROS = 5, | |
831cb9db LF |
199 | HT_IOT_PEER_CISCO = 6, |
200 | HT_IOT_PEER_MARVELL = 7, | |
94a79942 LF |
201 | HT_IOT_PEER_92U_SOFTAP = 8, |
202 | HT_IOT_PEER_SELF_SOFTAP = 9, | |
203 | HT_IOT_PEER_AIRGO = 10, | |
204 | HT_IOT_PEER_MAX = 11, | |
a8665346 | 205 | }; |
ecdfa446 | 206 | |
dd8f8ba2 | 207 | enum ht_iot_action { |
ecdfa446 GKH |
208 | HT_IOT_ACT_TX_USE_AMSDU_4K = 0x00000001, |
209 | HT_IOT_ACT_TX_USE_AMSDU_8K = 0x00000002, | |
210 | HT_IOT_ACT_DISABLE_MCS14 = 0x00000004, | |
211 | HT_IOT_ACT_DISABLE_MCS15 = 0x00000008, | |
212 | HT_IOT_ACT_DISABLE_ALL_2SS = 0x00000010, | |
213 | HT_IOT_ACT_DISABLE_EDCA_TURBO = 0x00000020, | |
214 | HT_IOT_ACT_MGNT_USE_CCK_6M = 0x00000040, | |
215 | HT_IOT_ACT_CDD_FSYNC = 0x00000080, | |
216 | HT_IOT_ACT_PURE_N_MODE = 0x00000100, | |
217 | HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200, | |
94a79942 LF |
218 | HT_IOT_ACT_FORCED_RTS = 0x00000400, |
219 | HT_IOT_ACT_AMSDU_ENABLE = 0x00000800, | |
220 | HT_IOT_ACT_REJECT_ADDBA_REQ = 0x00001000, | |
221 | HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT = 0x00002000, | |
222 | HT_IOT_ACT_EDCA_BIAS_ON_RX = 0x00004000, | |
223 | ||
224 | HT_IOT_ACT_HYBRID_AGGREGATION = 0x00010000, | |
225 | HT_IOT_ACT_DISABLE_SHORT_GI = 0x00020000, | |
226 | HT_IOT_ACT_DISABLE_HIGH_POWER = 0x00040000, | |
227 | HT_IOT_ACT_DISABLE_TX_40_MHZ = 0x00080000, | |
228 | HT_IOT_ACT_TX_NO_AGGREGATION = 0x00100000, | |
229 | HT_IOT_ACT_DISABLE_TX_2SS = 0x00200000, | |
230 | ||
831cb9db LF |
231 | HT_IOT_ACT_MID_HIGHPOWER = 0x00400000, |
232 | HT_IOT_ACT_NULL_DATA_POWER_SAVING = 0x00800000, | |
94a79942 | 233 | |
831cb9db | 234 | HT_IOT_ACT_DISABLE_CCK_RATE = 0x01000000, |
94a79942 LF |
235 | HT_IOT_ACT_FORCED_ENABLE_BE_TXOP = 0x02000000, |
236 | HT_IOT_ACT_WA_IOT_Broadcom = 0x04000000, | |
237 | ||
238 | HT_IOT_ACT_DISABLE_RX_40MHZ_SHORT_GI = 0x08000000, | |
239 | ||
dd8f8ba2 | 240 | }; |
ecdfa446 | 241 | |
d745c107 | 242 | enum ht_iot_rafunc { |
94a79942 LF |
243 | HT_IOT_RAFUNC_DISABLE_ALL = 0x00, |
244 | HT_IOT_RAFUNC_PEER_1R = 0x01, | |
245 | HT_IOT_RAFUNC_TX_AMSDU = 0x02, | |
d745c107 | 246 | }; |
94a79942 | 247 | |
bb9a7b3f | 248 | enum rt_ht_capability { |
94a79942 LF |
249 | RT_HT_CAP_USE_TURBO_AGGR = 0x01, |
250 | RT_HT_CAP_USE_LONG_PREAMBLE = 0x02, | |
251 | RT_HT_CAP_USE_AMPDU = 0x04, | |
252 | RT_HT_CAP_USE_WOW = 0x8, | |
253 | RT_HT_CAP_USE_SOFTAP = 0x10, | |
254 | RT_HT_CAP_USE_92SE = 0x20, | |
bb9a7b3f | 255 | }; |
ecdfa446 | 256 | |
94a79942 | 257 | #endif |