rtl819x_HT.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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. *
  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. #define MIMO_PS_STATIC 0
  18. #define sHTCLng 4
  19. enum ht_channel_width {
  20. HT_CHANNEL_WIDTH_20 = 0,
  21. HT_CHANNEL_WIDTH_20_40 = 1,
  22. };
  23. enum ht_extchnl_offset {
  24. HT_EXTCHNL_OFFSET_NO_EXT = 0,
  25. HT_EXTCHNL_OFFSET_UPPER = 1,
  26. HT_EXTCHNL_OFFSET_NO_DEF = 2,
  27. HT_EXTCHNL_OFFSET_LOWER = 3,
  28. };
  29. struct ht_capab_ele {
  30. u8 AdvCoding:1;
  31. u8 ChlWidth:1;
  32. u8 MimoPwrSave:2;
  33. u8 GreenField:1;
  34. u8 ShortGI20Mhz:1;
  35. u8 ShortGI40Mhz:1;
  36. u8 TxSTBC:1;
  37. u8 RxSTBC:2;
  38. u8 DelayBA:1;
  39. u8 MaxAMSDUSize:1;
  40. u8 DssCCk:1;
  41. u8 PSMP:1;
  42. u8 Rsvd1:1;
  43. u8 LSigTxopProtect:1;
  44. u8 MaxRxAMPDUFactor:2;
  45. u8 MPDUDensity:3;
  46. u8 Rsvd2:3;
  47. u8 MCS[16];
  48. u16 ExtHTCapInfo;
  49. u8 TxBFCap[4];
  50. u8 ASCap;
  51. } __packed;
  52. struct ht_info_ele {
  53. u8 ControlChl;
  54. u8 ExtChlOffset:2;
  55. u8 RecommemdedTxWidth:1;
  56. u8 RIFS:1;
  57. u8 PSMPAccessOnly:1;
  58. u8 SrvIntGranularity:3;
  59. u8 OptMode:2;
  60. u8 NonGFDevPresent:1;
  61. u8 Revd1:5;
  62. u8 Revd2:8;
  63. u8 Rsvd3:6;
  64. u8 DualBeacon:1;
  65. u8 DualCTSProtect:1;
  66. u8 SecondaryBeacon:1;
  67. u8 LSigTxopProtectFull:1;
  68. u8 PcoActive:1;
  69. u8 PcoPhase:1;
  70. u8 Rsvd4:4;
  71. u8 BasicMSC[16];
  72. } __packed;
  73. enum ht_spec_ver {
  74. HT_SPEC_VER_IEEE = 0,
  75. HT_SPEC_VER_EWC = 1,
  76. };
  77. enum ht_aggre_mode {
  78. HT_AGG_AUTO = 0,
  79. HT_AGG_FORCE_ENABLE = 1,
  80. HT_AGG_FORCE_DISABLE = 2,
  81. };
  82. struct rt_hi_throughput {
  83. u8 bEnableHT;
  84. u8 bCurrentHTSupport;
  85. u8 bRegBW40MHz;
  86. u8 bCurBW40MHz;
  87. u8 bRegShortGI40MHz;
  88. u8 bCurShortGI40MHz;
  89. u8 bRegShortGI20MHz;
  90. u8 bCurShortGI20MHz;
  91. u8 bRegSuppCCK;
  92. u8 bCurSuppCCK;
  93. enum ht_spec_ver ePeerHTSpecVer;
  94. struct ht_capab_ele SelfHTCap;
  95. struct ht_info_ele SelfHTInfo;
  96. u8 PeerHTCapBuf[32];
  97. u8 PeerHTInfoBuf[32];
  98. u8 bAMSDU_Support;
  99. u16 nAMSDU_MaxSize;
  100. u8 bCurrent_AMSDU_Support;
  101. u16 nCurrent_AMSDU_MaxSize;
  102. u8 bAMPDUEnable;
  103. u8 bCurrentAMPDUEnable;
  104. u8 AMPDU_Factor;
  105. u8 CurrentAMPDUFactor;
  106. u8 MPDU_Density;
  107. u8 CurrentMPDUDensity;
  108. enum ht_aggre_mode ForcedAMPDUMode;
  109. u8 ForcedAMPDUFactor;
  110. u8 ForcedMPDUDensity;
  111. enum ht_aggre_mode ForcedAMSDUMode;
  112. u16 ForcedAMSDUMaxSize;
  113. u8 bForcedShortGI;
  114. u8 CurrentOpMode;
  115. u8 SelfMimoPs;
  116. u8 PeerMimoPs;
  117. enum ht_extchnl_offset CurSTAExtChnlOffset;
  118. u8 bCurTxBW40MHz;
  119. u8 PeerBandwidth;
  120. u8 bSwBwInProgress;
  121. u8 SwBwStep;
  122. u8 bRegRT2RTAggregation;
  123. u8 RT2RT_HT_Mode;
  124. u8 bCurrentRT2RTAggregation;
  125. u8 bCurrentRT2RTLongSlotTime;
  126. u8 szRT2RTAggBuffer[10];
  127. u8 bRegRxReorderEnable;
  128. u8 bCurRxReorderEnable;
  129. u8 RxReorderWinSize;
  130. u8 RxReorderPendingTime;
  131. u16 RxReorderDropCounter;
  132. u8 bIsPeerBcm;
  133. u8 IOTPeer;
  134. u32 IOTAction;
  135. u8 IOTRaFunc;
  136. u8 bWAIotBroadcom;
  137. u8 WAIotTH;
  138. u8 bAcceptAddbaReq;
  139. } __packed;
  140. struct bss_ht {
  141. u8 bdSupportHT;
  142. u8 bdHTCapBuf[32];
  143. u16 bdHTCapLen;
  144. u8 bdHTInfoBuf[32];
  145. u16 bdHTInfoLen;
  146. enum ht_spec_ver bdHTSpecVer;
  147. enum ht_channel_width bdBandWidth;
  148. u8 bdRT2RTAggregation;
  149. u8 bdRT2RTLongSlotTime;
  150. u8 RT2RT_HT_Mode;
  151. u8 bdHT1R;
  152. };
  153. extern u8 MCS_FILTER_ALL[16];
  154. extern u8 MCS_FILTER_1SS[16];
  155. #define RATE_ADPT_1SS_MASK 0xFF
  156. #define RATE_ADPT_2SS_MASK 0xF0
  157. #define RATE_ADPT_MCS32_MASK 0x01
  158. enum ht_aggre_size {
  159. HT_AGG_SIZE_8K = 0,
  160. HT_AGG_SIZE_16K = 1,
  161. HT_AGG_SIZE_32K = 2,
  162. HT_AGG_SIZE_64K = 3,
  163. };
  164. enum ht_iot_peer {
  165. HT_IOT_PEER_UNKNOWN = 0,
  166. HT_IOT_PEER_REALTEK = 1,
  167. HT_IOT_PEER_REALTEK_92SE = 2,
  168. HT_IOT_PEER_BROADCOM = 3,
  169. HT_IOT_PEER_RALINK = 4,
  170. HT_IOT_PEER_ATHEROS = 5,
  171. HT_IOT_PEER_CISCO = 6,
  172. HT_IOT_PEER_MARVELL = 7,
  173. HT_IOT_PEER_92U_SOFTAP = 8,
  174. HT_IOT_PEER_SELF_SOFTAP = 9,
  175. HT_IOT_PEER_AIRGO = 10,
  176. HT_IOT_PEER_MAX = 11,
  177. };
  178. enum ht_iot_action {
  179. HT_IOT_ACT_TX_USE_AMSDU_4K = 0x00000001,
  180. HT_IOT_ACT_TX_USE_AMSDU_8K = 0x00000002,
  181. HT_IOT_ACT_DISABLE_MCS14 = 0x00000004,
  182. HT_IOT_ACT_DISABLE_MCS15 = 0x00000008,
  183. HT_IOT_ACT_DISABLE_ALL_2SS = 0x00000010,
  184. HT_IOT_ACT_DISABLE_EDCA_TURBO = 0x00000020,
  185. HT_IOT_ACT_MGNT_USE_CCK_6M = 0x00000040,
  186. HT_IOT_ACT_CDD_FSYNC = 0x00000080,
  187. HT_IOT_ACT_PURE_N_MODE = 0x00000100,
  188. HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200,
  189. HT_IOT_ACT_FORCED_RTS = 0x00000400,
  190. HT_IOT_ACT_AMSDU_ENABLE = 0x00000800,
  191. HT_IOT_ACT_REJECT_ADDBA_REQ = 0x00001000,
  192. HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT = 0x00002000,
  193. HT_IOT_ACT_EDCA_BIAS_ON_RX = 0x00004000,
  194. HT_IOT_ACT_HYBRID_AGGREGATION = 0x00010000,
  195. HT_IOT_ACT_DISABLE_SHORT_GI = 0x00020000,
  196. HT_IOT_ACT_DISABLE_HIGH_POWER = 0x00040000,
  197. HT_IOT_ACT_DISABLE_TX_40_MHZ = 0x00080000,
  198. HT_IOT_ACT_TX_NO_AGGREGATION = 0x00100000,
  199. HT_IOT_ACT_DISABLE_TX_2SS = 0x00200000,
  200. HT_IOT_ACT_MID_HIGHPOWER = 0x00400000,
  201. HT_IOT_ACT_NULL_DATA_POWER_SAVING = 0x00800000,
  202. HT_IOT_ACT_DISABLE_CCK_RATE = 0x01000000,
  203. HT_IOT_ACT_FORCED_ENABLE_BE_TXOP = 0x02000000,
  204. HT_IOT_ACT_WA_IOT_Broadcom = 0x04000000,
  205. HT_IOT_ACT_DISABLE_RX_40MHZ_SHORT_GI = 0x08000000,
  206. };
  207. enum ht_iot_rafunc {
  208. HT_IOT_RAFUNC_DISABLE_ALL = 0x00,
  209. HT_IOT_RAFUNC_PEER_1R = 0x01,
  210. HT_IOT_RAFUNC_TX_AMSDU = 0x02,
  211. };
  212. enum rt_ht_capability {
  213. RT_HT_CAP_USE_TURBO_AGGR = 0x01,
  214. RT_HT_CAP_USE_LONG_PREAMBLE = 0x02,
  215. RT_HT_CAP_USE_AMPDU = 0x04,
  216. RT_HT_CAP_USE_WOW = 0x8,
  217. RT_HT_CAP_USE_SOFTAP = 0x10,
  218. RT_HT_CAP_USE_92SE = 0x20,
  219. };
  220. #endif