fw.h 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626
  1. /*
  2. * Marvell Wireless LAN device driver: Firmware specific macros & structures
  3. *
  4. * Copyright (C) 2011, Marvell International Ltd.
  5. *
  6. * This software file (the "File") is distributed by Marvell International
  7. * Ltd. under the terms of the GNU General Public License Version 2, June 1991
  8. * (the "License"). You may use, redistribute and/or modify this File in
  9. * accordance with the terms and conditions of the License, a copy of which
  10. * is available by writing to the Free Software Foundation, Inc.,
  11. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
  12. * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
  13. *
  14. * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
  15. * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
  16. * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
  17. * this warranty disclaimer.
  18. */
  19. #ifndef _MWIFIEX_FW_H_
  20. #define _MWIFIEX_FW_H_
  21. #include <linux/if_ether.h>
  22. #define INTF_HEADER_LEN 4
  23. struct rfc_1042_hdr {
  24. u8 llc_dsap;
  25. u8 llc_ssap;
  26. u8 llc_ctrl;
  27. u8 snap_oui[3];
  28. u16 snap_type;
  29. };
  30. struct rx_packet_hdr {
  31. struct ethhdr eth803_hdr;
  32. struct rfc_1042_hdr rfc1042_hdr;
  33. };
  34. struct tx_packet_hdr {
  35. struct ethhdr eth803_hdr;
  36. struct rfc_1042_hdr rfc1042_hdr;
  37. };
  38. #define B_SUPPORTED_RATES 5
  39. #define G_SUPPORTED_RATES 9
  40. #define BG_SUPPORTED_RATES 13
  41. #define A_SUPPORTED_RATES 9
  42. #define HOSTCMD_SUPPORTED_RATES 14
  43. #define N_SUPPORTED_RATES 3
  44. #define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \
  45. BAND_AN | BAND_GAC | BAND_AAC)
  46. #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
  47. BIT(12) | BIT(13))
  48. #define IS_SUPPORT_MULTI_BANDS(adapter) \
  49. (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
  50. /* shift bit 12 and bit 13 in fw_cap_info from the firmware to bit 13 and 14
  51. * for 11ac so that bit 11 is for GN, bit 12 for AN, bit 13 for GAC, and bit
  52. * bit 14 for AAC, in order to be compatible with the band capability
  53. * defined in the driver after right shift of 8 bits.
  54. */
  55. #define GET_FW_DEFAULT_BANDS(adapter) \
  56. (((((adapter->fw_cap_info & 0x3000) << 1) | \
  57. (adapter->fw_cap_info & ~0xF000)) >> 8) & \
  58. ALL_802_11_BANDS)
  59. #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
  60. #define KEY_INFO_ENABLED 0x01
  61. enum KEY_TYPE_ID {
  62. KEY_TYPE_ID_WEP = 0,
  63. KEY_TYPE_ID_TKIP,
  64. KEY_TYPE_ID_AES,
  65. KEY_TYPE_ID_WAPI,
  66. KEY_TYPE_ID_AES_CMAC,
  67. };
  68. #define KEY_MCAST BIT(0)
  69. #define KEY_UNICAST BIT(1)
  70. #define KEY_ENABLED BIT(2)
  71. #define KEY_IGTK BIT(10)
  72. #define WAPI_KEY_LEN 50
  73. #define MAX_POLL_TRIES 100
  74. #define MAX_MULTI_INTERFACE_POLL_TRIES 1000
  75. #define MAX_FIRMWARE_POLL_TRIES 100
  76. #define FIRMWARE_READY_SDIO 0xfedc
  77. #define FIRMWARE_READY_PCIE 0xfedcba00
  78. enum mwifiex_usb_ep {
  79. MWIFIEX_USB_EP_CMD_EVENT = 1,
  80. MWIFIEX_USB_EP_DATA = 2,
  81. };
  82. enum MWIFIEX_802_11_PRIVACY_FILTER {
  83. MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
  84. MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
  85. };
  86. #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF)))
  87. #define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR)+(s16)(NF)))
  88. #define UAP_BSS_PARAMS_I 0
  89. #define UAP_CUSTOM_IE_I 1
  90. #define MWIFIEX_AUTO_IDX_MASK 0xffff
  91. #define MWIFIEX_DELETE_MASK 0x0000
  92. #define MGMT_MASK_ASSOC_REQ 0x01
  93. #define MGMT_MASK_REASSOC_REQ 0x04
  94. #define MGMT_MASK_ASSOC_RESP 0x02
  95. #define MGMT_MASK_REASSOC_RESP 0x08
  96. #define MGMT_MASK_PROBE_REQ 0x10
  97. #define MGMT_MASK_PROBE_RESP 0x20
  98. #define MGMT_MASK_BEACON 0x100
  99. #define TLV_TYPE_UAP_SSID 0x0000
  100. #define TLV_TYPE_UAP_RATES 0x0001
  101. #define PROPRIETARY_TLV_BASE_ID 0x0100
  102. #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
  103. #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
  104. #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
  105. #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
  106. #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
  107. #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
  108. #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
  109. #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
  110. #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
  111. #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
  112. #define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32)
  113. #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
  114. #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44)
  115. #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45)
  116. #define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48)
  117. #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51)
  118. #define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57)
  119. #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59)
  120. #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
  121. #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
  122. #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65)
  123. #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70)
  124. #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82)
  125. #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83)
  126. #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84)
  127. #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93)
  128. #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94)
  129. #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104)
  130. #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105)
  131. #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113)
  132. #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114)
  133. #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123)
  134. #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145)
  135. #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146)
  136. #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
  137. #define SSN_MASK 0xfff0
  138. #define BA_RESULT_SUCCESS 0x0
  139. #define BA_RESULT_TIMEOUT 0x2
  140. #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status)
  141. #define BA_STREAM_NOT_ALLOWED 0xff
  142. #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
  143. priv->adapter->config_bands & BAND_AN) && \
  144. priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
  145. #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
  146. BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
  147. #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096
  148. #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192
  149. #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
  150. #define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \
  151. (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \
  152. IEEE80211_HT_CAP_SM_PS)
  153. #define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR
  154. /* dev_cap bitmap
  155. * BIT
  156. * 0-16 reserved
  157. * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40
  158. * 18-22 reserved
  159. * 23 IEEE80211_HT_CAP_SGI_20
  160. * 24 IEEE80211_HT_CAP_SGI_40
  161. * 25 IEEE80211_HT_CAP_TX_STBC
  162. * 26 IEEE80211_HT_CAP_RX_STBC
  163. * 27-28 reserved
  164. * 29 IEEE80211_HT_CAP_GRN_FLD
  165. * 30-31 reserved
  166. */
  167. #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
  168. #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
  169. #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
  170. #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
  171. #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
  172. #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
  173. #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8))
  174. #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))
  175. /* httxcfg bitmap
  176. * 0 reserved
  177. * 1 20/40 Mhz enable(1)/disable(0)
  178. * 2-3 reserved
  179. * 4 green field enable(1)/disable(0)
  180. * 5 short GI in 20 Mhz enable(1)/disable(0)
  181. * 6 short GI in 40 Mhz enable(1)/disable(0)
  182. * 7-15 reserved
  183. */
  184. #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
  185. #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
  186. #define SETHT_MCS32(x) (x[4] |= 1)
  187. #define HT_STREAM_2X2 0x22
  188. #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
  189. #define LLC_SNAP_LEN 8
  190. /* HW_SPEC fw_cap_info */
  191. #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & (BIT(13)|BIT(14)))
  192. #define GET_VHTCAP_MAXMPDULEN(vht_cap_info) (vht_cap_info & 0x3)
  193. #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3)
  194. #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
  195. #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \
  196. (2 * (nss - 1)))
  197. #define NO_NSS_SUPPORT 0x3
  198. /* HW_SPEC: HTC-VHT supported */
  199. #define ISSUPP_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap & BIT(22))
  200. /* HW_SPEC: VHT TXOP PS support */
  201. #define ISSUPP_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap & BIT(21))
  202. /* HW_SPEC: MU RX beamformee support */
  203. #define ISSUPP_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & BIT(20))
  204. /* HW_SPEC: MU TX beamformee support */
  205. #define ISSUPP_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & BIT(19))
  206. /* HW_SPEC: SU Beamformee support */
  207. #define ISSUPP_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & BIT(10))
  208. /* HW_SPEC: SU Beamformer support */
  209. #define ISSUPP_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap & BIT(9))
  210. /* HW_SPEC: Rx STBC support */
  211. #define ISSUPP_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap & BIT(8))
  212. /* HW_SPEC: Tx STBC support */
  213. #define ISSUPP_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap & BIT(7))
  214. /* HW_SPEC: Short GI support for 160MHz BW */
  215. #define ISSUPP_11ACSGI160(Dot11acDevCap) (Dot11acDevCap & BIT(6))
  216. /* HW_SPEC: Short GI support for 80MHz BW */
  217. #define ISSUPP_11ACSGI80(Dot11acDevCap) (Dot11acDevCap & BIT(5))
  218. /* HW_SPEC: LDPC coding support */
  219. #define ISSUPP_11ACLDPC(Dot11acDevCap) (Dot11acDevCap & BIT(4))
  220. /* HW_SPEC: Channel BW 20/40/80/160/80+80 MHz support */
  221. #define ISSUPP_11ACBW8080(Dot11acDevCap) (Dot11acDevCap & BIT(3))
  222. /* HW_SPEC: Channel BW 20/40/80/160 MHz support */
  223. #define ISSUPP_11ACBW160(Dot11acDevCap) (Dot11acDevCap & BIT(2))
  224. #define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16)
  225. #define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF)
  226. #define MOD_CLASS_HR_DSSS 0x03
  227. #define MOD_CLASS_OFDM 0x07
  228. #define MOD_CLASS_HT 0x08
  229. #define HT_BW_20 0
  230. #define HT_BW_40 1
  231. #define HostCmd_CMD_GET_HW_SPEC 0x0003
  232. #define HostCmd_CMD_802_11_SCAN 0x0006
  233. #define HostCmd_CMD_802_11_GET_LOG 0x000b
  234. #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
  235. #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
  236. #define HostCmd_CMD_802_11_ASSOCIATE 0x0012
  237. #define HostCmd_CMD_802_11_SNMP_MIB 0x0016
  238. #define HostCmd_CMD_MAC_REG_ACCESS 0x0019
  239. #define HostCmd_CMD_BBP_REG_ACCESS 0x001a
  240. #define HostCmd_CMD_RF_REG_ACCESS 0x001b
  241. #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad
  242. #define HostCmd_CMD_RF_TX_PWR 0x001e
  243. #define HostCmd_CMD_RF_ANTENNA 0x0020
  244. #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
  245. #define HostCmd_CMD_MAC_CONTROL 0x0028
  246. #define HostCmd_CMD_802_11_AD_HOC_START 0x002b
  247. #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c
  248. #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040
  249. #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D
  250. #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b
  251. #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e
  252. #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c
  253. #define HostCmd_CMD_WMM_GET_STATUS 0x0071
  254. #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
  255. #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f
  256. #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083
  257. #define HostCmd_CMD_VERSION_EXT 0x0097
  258. #define HostCmd_CMD_RSSI_INFO 0x00a4
  259. #define HostCmd_CMD_FUNC_INIT 0x00a9
  260. #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
  261. #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0
  262. #define HostCmd_CMD_UAP_BSS_START 0x00b1
  263. #define HostCmd_CMD_UAP_BSS_STOP 0x00b2
  264. #define HostCmd_CMD_11N_CFG 0x00cd
  265. #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
  266. #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
  267. #define HostCmd_CMD_11N_DELBA 0x00d0
  268. #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
  269. #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
  270. #define HostCmd_CMD_TXPWR_CFG 0x00d1
  271. #define HostCmd_CMD_TX_RATE_CFG 0x00d6
  272. #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4
  273. #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5
  274. #define HostCmd_CMD_P2P_MODE_CFG 0x00eb
  275. #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
  276. #define HostCmd_CMD_SET_BSS_MODE 0x00f7
  277. #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa
  278. #define HostCmd_CMD_MGMT_FRAME_REG 0x010c
  279. #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d
  280. #define PROTOCOL_NO_SECURITY 0x01
  281. #define PROTOCOL_STATIC_WEP 0x02
  282. #define PROTOCOL_WPA 0x08
  283. #define PROTOCOL_WPA2 0x20
  284. #define PROTOCOL_WPA2_MIXED 0x28
  285. #define PROTOCOL_EAP 0x40
  286. #define KEY_MGMT_NONE 0x04
  287. #define KEY_MGMT_PSK 0x02
  288. #define KEY_MGMT_EAP 0x01
  289. #define CIPHER_TKIP 0x04
  290. #define CIPHER_AES_CCMP 0x08
  291. #define VALID_CIPHER_BITMAP 0x0c
  292. enum ENH_PS_MODES {
  293. EN_PS = 1,
  294. DIS_PS = 2,
  295. EN_AUTO_DS = 3,
  296. DIS_AUTO_DS = 4,
  297. SLEEP_CONFIRM = 5,
  298. GET_PS = 0,
  299. EN_AUTO_PS = 0xff,
  300. DIS_AUTO_PS = 0xfe,
  301. };
  302. enum P2P_MODES {
  303. P2P_MODE_DISABLE = 0,
  304. P2P_MODE_DEVICE = 1,
  305. P2P_MODE_GO = 2,
  306. P2P_MODE_CLIENT = 3,
  307. };
  308. #define HostCmd_RET_BIT 0x8000
  309. #define HostCmd_ACT_GEN_GET 0x0000
  310. #define HostCmd_ACT_GEN_SET 0x0001
  311. #define HostCmd_ACT_GEN_REMOVE 0x0004
  312. #define HostCmd_ACT_BITWISE_SET 0x0002
  313. #define HostCmd_ACT_BITWISE_CLR 0x0003
  314. #define HostCmd_RESULT_OK 0x0000
  315. #define HostCmd_ACT_MAC_RX_ON 0x0001
  316. #define HostCmd_ACT_MAC_TX_ON 0x0002
  317. #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
  318. #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
  319. #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
  320. #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
  321. #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
  322. #define HostCmd_BSS_MODE_IBSS 0x0002
  323. #define HostCmd_BSS_MODE_ANY 0x0003
  324. #define HostCmd_SCAN_RADIO_TYPE_BG 0
  325. #define HostCmd_SCAN_RADIO_TYPE_A 1
  326. #define HOST_SLEEP_CFG_CANCEL 0xffffffff
  327. #define HOST_SLEEP_CFG_COND_DEF 0x00000000
  328. #define HOST_SLEEP_CFG_GPIO_DEF 0xff
  329. #define HOST_SLEEP_CFG_GAP_DEF 0
  330. #define MWIFIEX_TIMEOUT_FOR_AP_RESP 0xfffc
  331. #define MWIFIEX_STATUS_CODE_AUTH_TIMEOUT 2
  332. #define CMD_F_HOSTCMD (1 << 0)
  333. #define CMD_F_CANCELED (1 << 1)
  334. #define HostCmd_CMD_ID_MASK 0x0fff
  335. #define HostCmd_SEQ_NUM_MASK 0x00ff
  336. #define HostCmd_BSS_NUM_MASK 0x0f00
  337. #define HostCmd_BSS_TYPE_MASK 0xf000
  338. #define HostCmd_ACT_SET_RX 0x0001
  339. #define HostCmd_ACT_SET_TX 0x0002
  340. #define HostCmd_ACT_SET_BOTH 0x0003
  341. #define RF_ANTENNA_AUTO 0xFFFF
  342. #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
  343. (((seq) & 0x00ff) | \
  344. (((num) & 0x000f) << 8)) | \
  345. (((type) & 0x000f) << 12); }
  346. #define HostCmd_GET_SEQ_NO(seq) \
  347. ((seq) & HostCmd_SEQ_NUM_MASK)
  348. #define HostCmd_GET_BSS_NO(seq) \
  349. (((seq) & HostCmd_BSS_NUM_MASK) >> 8)
  350. #define HostCmd_GET_BSS_TYPE(seq) \
  351. (((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
  352. #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
  353. #define EVENT_LINK_LOST 0x00000003
  354. #define EVENT_LINK_SENSED 0x00000004
  355. #define EVENT_MIB_CHANGED 0x00000006
  356. #define EVENT_INIT_DONE 0x00000007
  357. #define EVENT_DEAUTHENTICATED 0x00000008
  358. #define EVENT_DISASSOCIATED 0x00000009
  359. #define EVENT_PS_AWAKE 0x0000000a
  360. #define EVENT_PS_SLEEP 0x0000000b
  361. #define EVENT_MIC_ERR_MULTICAST 0x0000000d
  362. #define EVENT_MIC_ERR_UNICAST 0x0000000e
  363. #define EVENT_DEEP_SLEEP_AWAKE 0x00000010
  364. #define EVENT_ADHOC_BCN_LOST 0x00000011
  365. #define EVENT_WMM_STATUS_CHANGE 0x00000017
  366. #define EVENT_BG_SCAN_REPORT 0x00000018
  367. #define EVENT_RSSI_LOW 0x00000019
  368. #define EVENT_SNR_LOW 0x0000001a
  369. #define EVENT_MAX_FAIL 0x0000001b
  370. #define EVENT_RSSI_HIGH 0x0000001c
  371. #define EVENT_SNR_HIGH 0x0000001d
  372. #define EVENT_IBSS_COALESCED 0x0000001e
  373. #define EVENT_DATA_RSSI_LOW 0x00000024
  374. #define EVENT_DATA_SNR_LOW 0x00000025
  375. #define EVENT_DATA_RSSI_HIGH 0x00000026
  376. #define EVENT_DATA_SNR_HIGH 0x00000027
  377. #define EVENT_LINK_QUALITY 0x00000028
  378. #define EVENT_PORT_RELEASE 0x0000002b
  379. #define EVENT_UAP_STA_DEAUTH 0x0000002c
  380. #define EVENT_UAP_STA_ASSOC 0x0000002d
  381. #define EVENT_UAP_BSS_START 0x0000002e
  382. #define EVENT_PRE_BEACON_LOST 0x00000031
  383. #define EVENT_ADDBA 0x00000033
  384. #define EVENT_DELBA 0x00000034
  385. #define EVENT_BA_STREAM_TIEMOUT 0x00000037
  386. #define EVENT_AMSDU_AGGR_CTRL 0x00000042
  387. #define EVENT_UAP_BSS_IDLE 0x00000043
  388. #define EVENT_UAP_BSS_ACTIVE 0x00000044
  389. #define EVENT_WEP_ICV_ERR 0x00000046
  390. #define EVENT_HS_ACT_REQ 0x00000047
  391. #define EVENT_BW_CHANGE 0x00000048
  392. #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c
  393. #define EVENT_HOSTWAKE_STAIE 0x0000004d
  394. #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f
  395. #define EVENT_ID_MASK 0xffff
  396. #define BSS_NUM_MASK 0xf
  397. #define EVENT_GET_BSS_NUM(event_cause) \
  398. (((event_cause) >> 16) & BSS_NUM_MASK)
  399. #define EVENT_GET_BSS_TYPE(event_cause) \
  400. (((event_cause) >> 24) & 0x00ff)
  401. struct mwifiex_ie_types_header {
  402. __le16 type;
  403. __le16 len;
  404. } __packed;
  405. struct mwifiex_ie_types_data {
  406. struct mwifiex_ie_types_header header;
  407. u8 data[1];
  408. } __packed;
  409. #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
  410. #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
  411. struct txpd {
  412. u8 bss_type;
  413. u8 bss_num;
  414. __le16 tx_pkt_length;
  415. __le16 tx_pkt_offset;
  416. __le16 tx_pkt_type;
  417. __le32 tx_control;
  418. u8 priority;
  419. u8 flags;
  420. u8 pkt_delay_2ms;
  421. u8 reserved1;
  422. } __packed;
  423. struct rxpd {
  424. u8 bss_type;
  425. u8 bss_num;
  426. __le16 rx_pkt_length;
  427. __le16 rx_pkt_offset;
  428. __le16 rx_pkt_type;
  429. __le16 seq_num;
  430. u8 priority;
  431. u8 rx_rate;
  432. s8 snr;
  433. s8 nf;
  434. /* For: Non-802.11 AC cards
  435. *
  436. * Ht Info [Bit 0] RxRate format: LG=0, HT=1
  437. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  438. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
  439. *
  440. * For: 802.11 AC cards
  441. * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
  442. * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
  443. * BW80 = 10 BW160 = 11
  444. * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
  445. * [Bit 5] STBC support Enabled = 1
  446. * [Bit 6] LDPC support Enabled = 1
  447. * [Bit 7] Reserved
  448. */
  449. u8 ht_info;
  450. u8 reserved;
  451. } __packed;
  452. struct uap_txpd {
  453. u8 bss_type;
  454. u8 bss_num;
  455. __le16 tx_pkt_length;
  456. __le16 tx_pkt_offset;
  457. __le16 tx_pkt_type;
  458. __le32 tx_control;
  459. u8 priority;
  460. u8 flags;
  461. u8 pkt_delay_2ms;
  462. u8 reserved1;
  463. __le32 reserved2;
  464. };
  465. struct uap_rxpd {
  466. u8 bss_type;
  467. u8 bss_num;
  468. __le16 rx_pkt_length;
  469. __le16 rx_pkt_offset;
  470. __le16 rx_pkt_type;
  471. __le16 seq_num;
  472. u8 priority;
  473. u8 reserved1;
  474. };
  475. enum mwifiex_chan_scan_mode_bitmasks {
  476. MWIFIEX_PASSIVE_SCAN = BIT(0),
  477. MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
  478. };
  479. struct mwifiex_chan_scan_param_set {
  480. u8 radio_type;
  481. u8 chan_number;
  482. u8 chan_scan_mode_bitmap;
  483. __le16 min_scan_time;
  484. __le16 max_scan_time;
  485. } __packed;
  486. struct mwifiex_ie_types_chan_list_param_set {
  487. struct mwifiex_ie_types_header header;
  488. struct mwifiex_chan_scan_param_set chan_scan_param[1];
  489. } __packed;
  490. struct chan_band_param_set {
  491. u8 radio_type;
  492. u8 chan_number;
  493. };
  494. struct mwifiex_ie_types_chan_band_list_param_set {
  495. struct mwifiex_ie_types_header header;
  496. struct chan_band_param_set chan_band_param[1];
  497. } __packed;
  498. struct mwifiex_ie_types_rates_param_set {
  499. struct mwifiex_ie_types_header header;
  500. u8 rates[1];
  501. } __packed;
  502. struct mwifiex_ie_types_ssid_param_set {
  503. struct mwifiex_ie_types_header header;
  504. u8 ssid[1];
  505. } __packed;
  506. struct mwifiex_ie_types_num_probes {
  507. struct mwifiex_ie_types_header header;
  508. __le16 num_probes;
  509. } __packed;
  510. struct mwifiex_ie_types_wildcard_ssid_params {
  511. struct mwifiex_ie_types_header header;
  512. u8 max_ssid_length;
  513. u8 ssid[1];
  514. } __packed;
  515. #define TSF_DATA_SIZE 8
  516. struct mwifiex_ie_types_tsf_timestamp {
  517. struct mwifiex_ie_types_header header;
  518. u8 tsf_data[1];
  519. } __packed;
  520. struct mwifiex_cf_param_set {
  521. u8 cfp_cnt;
  522. u8 cfp_period;
  523. u16 cfp_max_duration;
  524. u16 cfp_duration_remaining;
  525. } __packed;
  526. struct mwifiex_ibss_param_set {
  527. u16 atim_window;
  528. } __packed;
  529. struct mwifiex_ie_types_ss_param_set {
  530. struct mwifiex_ie_types_header header;
  531. union {
  532. struct mwifiex_cf_param_set cf_param_set[1];
  533. struct mwifiex_ibss_param_set ibss_param_set[1];
  534. } cf_ibss;
  535. } __packed;
  536. struct mwifiex_fh_param_set {
  537. u16 dwell_time;
  538. u8 hop_set;
  539. u8 hop_pattern;
  540. u8 hop_index;
  541. } __packed;
  542. struct mwifiex_ds_param_set {
  543. u8 current_chan;
  544. } __packed;
  545. struct mwifiex_ie_types_phy_param_set {
  546. struct mwifiex_ie_types_header header;
  547. union {
  548. struct mwifiex_fh_param_set fh_param_set[1];
  549. struct mwifiex_ds_param_set ds_param_set[1];
  550. } fh_ds;
  551. } __packed;
  552. struct mwifiex_ie_types_auth_type {
  553. struct mwifiex_ie_types_header header;
  554. __le16 auth_type;
  555. } __packed;
  556. struct mwifiex_ie_types_vendor_param_set {
  557. struct mwifiex_ie_types_header header;
  558. u8 ie[MWIFIEX_MAX_VSIE_LEN];
  559. };
  560. struct mwifiex_ie_types_rsn_param_set {
  561. struct mwifiex_ie_types_header header;
  562. u8 rsn_ie[1];
  563. } __packed;
  564. #define KEYPARAMSET_FIXED_LEN 6
  565. struct mwifiex_ie_type_key_param_set {
  566. __le16 type;
  567. __le16 length;
  568. __le16 key_type_id;
  569. __le16 key_info;
  570. __le16 key_len;
  571. u8 key[50];
  572. } __packed;
  573. #define IGTK_PN_LEN 8
  574. struct mwifiex_cmac_param {
  575. u8 ipn[IGTK_PN_LEN];
  576. u8 key[WLAN_KEY_LEN_AES_CMAC];
  577. } __packed;
  578. struct host_cmd_ds_802_11_key_material {
  579. __le16 action;
  580. struct mwifiex_ie_type_key_param_set key_param_set;
  581. } __packed;
  582. struct host_cmd_ds_gen {
  583. u16 command;
  584. u16 size;
  585. u16 seq_num;
  586. u16 result;
  587. };
  588. #define S_DS_GEN sizeof(struct host_cmd_ds_gen)
  589. enum sleep_resp_ctrl {
  590. RESP_NOT_NEEDED = 0,
  591. RESP_NEEDED,
  592. };
  593. struct mwifiex_ps_param {
  594. __le16 null_pkt_interval;
  595. __le16 multiple_dtims;
  596. __le16 bcn_miss_timeout;
  597. __le16 local_listen_interval;
  598. __le16 adhoc_wake_period;
  599. __le16 mode;
  600. __le16 delay_to_ps;
  601. };
  602. #define BITMAP_AUTO_DS 0x01
  603. #define BITMAP_STA_PS 0x10
  604. struct mwifiex_ie_types_auto_ds_param {
  605. struct mwifiex_ie_types_header header;
  606. __le16 deep_sleep_timeout;
  607. } __packed;
  608. struct mwifiex_ie_types_ps_param {
  609. struct mwifiex_ie_types_header header;
  610. struct mwifiex_ps_param param;
  611. } __packed;
  612. struct host_cmd_ds_802_11_ps_mode_enh {
  613. __le16 action;
  614. union {
  615. struct mwifiex_ps_param opt_ps;
  616. __le16 ps_bitmap;
  617. } params;
  618. } __packed;
  619. struct host_cmd_ds_get_hw_spec {
  620. __le16 hw_if_version;
  621. __le16 version;
  622. __le16 reserved;
  623. __le16 num_of_mcast_adr;
  624. u8 permanent_addr[ETH_ALEN];
  625. __le16 region_code;
  626. __le16 number_of_antenna;
  627. __le32 fw_release_number;
  628. __le32 reserved_1;
  629. __le32 reserved_2;
  630. __le32 reserved_3;
  631. __le32 fw_cap_info;
  632. __le32 dot_11n_dev_cap;
  633. u8 dev_mcs_support;
  634. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  635. __le16 mgmt_buf_count; /* mgmt IE buffer count */
  636. __le32 reserved_5;
  637. __le32 reserved_6;
  638. __le32 dot_11ac_dev_cap;
  639. __le32 dot_11ac_mcs_support;
  640. } __packed;
  641. struct host_cmd_ds_802_11_rssi_info {
  642. __le16 action;
  643. __le16 ndata;
  644. __le16 nbcn;
  645. __le16 reserved[9];
  646. long long reserved_1;
  647. };
  648. struct host_cmd_ds_802_11_rssi_info_rsp {
  649. __le16 action;
  650. __le16 ndata;
  651. __le16 nbcn;
  652. __le16 data_rssi_last;
  653. __le16 data_nf_last;
  654. __le16 data_rssi_avg;
  655. __le16 data_nf_avg;
  656. __le16 bcn_rssi_last;
  657. __le16 bcn_nf_last;
  658. __le16 bcn_rssi_avg;
  659. __le16 bcn_nf_avg;
  660. long long tsf_bcn;
  661. };
  662. struct host_cmd_ds_802_11_mac_address {
  663. __le16 action;
  664. u8 mac_addr[ETH_ALEN];
  665. };
  666. struct host_cmd_ds_mac_control {
  667. __le16 action;
  668. __le16 reserved;
  669. };
  670. struct host_cmd_ds_mac_multicast_adr {
  671. __le16 action;
  672. __le16 num_of_adrs;
  673. u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
  674. } __packed;
  675. struct host_cmd_ds_802_11_deauthenticate {
  676. u8 mac_addr[ETH_ALEN];
  677. __le16 reason_code;
  678. } __packed;
  679. struct host_cmd_ds_802_11_associate {
  680. u8 peer_sta_addr[ETH_ALEN];
  681. __le16 cap_info_bitmap;
  682. __le16 listen_interval;
  683. __le16 beacon_period;
  684. u8 dtim_period;
  685. } __packed;
  686. struct ieee_types_assoc_rsp {
  687. __le16 cap_info_bitmap;
  688. __le16 status_code;
  689. __le16 a_id;
  690. u8 ie_buffer[1];
  691. } __packed;
  692. struct host_cmd_ds_802_11_associate_rsp {
  693. struct ieee_types_assoc_rsp assoc_rsp;
  694. } __packed;
  695. struct ieee_types_cf_param_set {
  696. u8 element_id;
  697. u8 len;
  698. u8 cfp_cnt;
  699. u8 cfp_period;
  700. u16 cfp_max_duration;
  701. u16 cfp_duration_remaining;
  702. } __packed;
  703. struct ieee_types_ibss_param_set {
  704. u8 element_id;
  705. u8 len;
  706. __le16 atim_window;
  707. } __packed;
  708. union ieee_types_ss_param_set {
  709. struct ieee_types_cf_param_set cf_param_set;
  710. struct ieee_types_ibss_param_set ibss_param_set;
  711. } __packed;
  712. struct ieee_types_fh_param_set {
  713. u8 element_id;
  714. u8 len;
  715. __le16 dwell_time;
  716. u8 hop_set;
  717. u8 hop_pattern;
  718. u8 hop_index;
  719. } __packed;
  720. struct ieee_types_ds_param_set {
  721. u8 element_id;
  722. u8 len;
  723. u8 current_chan;
  724. } __packed;
  725. union ieee_types_phy_param_set {
  726. struct ieee_types_fh_param_set fh_param_set;
  727. struct ieee_types_ds_param_set ds_param_set;
  728. } __packed;
  729. struct ieee_types_oper_mode_ntf {
  730. u8 element_id;
  731. u8 len;
  732. u8 oper_mode;
  733. } __packed;
  734. struct host_cmd_ds_802_11_ad_hoc_start {
  735. u8 ssid[IEEE80211_MAX_SSID_LEN];
  736. u8 bss_mode;
  737. __le16 beacon_period;
  738. u8 dtim_period;
  739. union ieee_types_ss_param_set ss_param_set;
  740. union ieee_types_phy_param_set phy_param_set;
  741. u16 reserved1;
  742. __le16 cap_info_bitmap;
  743. u8 data_rate[HOSTCMD_SUPPORTED_RATES];
  744. } __packed;
  745. struct host_cmd_ds_802_11_ad_hoc_result {
  746. u8 pad[3];
  747. u8 bssid[ETH_ALEN];
  748. } __packed;
  749. struct adhoc_bss_desc {
  750. u8 bssid[ETH_ALEN];
  751. u8 ssid[IEEE80211_MAX_SSID_LEN];
  752. u8 bss_mode;
  753. __le16 beacon_period;
  754. u8 dtim_period;
  755. u8 time_stamp[8];
  756. u8 local_time[8];
  757. union ieee_types_phy_param_set phy_param_set;
  758. union ieee_types_ss_param_set ss_param_set;
  759. __le16 cap_info_bitmap;
  760. u8 data_rates[HOSTCMD_SUPPORTED_RATES];
  761. /*
  762. * DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
  763. * It is used in the Adhoc join command and will cause a
  764. * binary layout mismatch with the firmware
  765. */
  766. } __packed;
  767. struct host_cmd_ds_802_11_ad_hoc_join {
  768. struct adhoc_bss_desc bss_descriptor;
  769. u16 reserved1;
  770. u16 reserved2;
  771. } __packed;
  772. struct host_cmd_ds_802_11_get_log {
  773. __le32 mcast_tx_frame;
  774. __le32 failed;
  775. __le32 retry;
  776. __le32 multi_retry;
  777. __le32 frame_dup;
  778. __le32 rts_success;
  779. __le32 rts_failure;
  780. __le32 ack_failure;
  781. __le32 rx_frag;
  782. __le32 mcast_rx_frame;
  783. __le32 fcs_error;
  784. __le32 tx_frame;
  785. __le32 reserved;
  786. __le32 wep_icv_err_cnt[4];
  787. };
  788. /* Enumeration for rate format */
  789. enum _mwifiex_rate_format {
  790. MWIFIEX_RATE_FORMAT_LG = 0,
  791. MWIFIEX_RATE_FORMAT_HT,
  792. MWIFIEX_RATE_FORMAT_VHT,
  793. MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
  794. };
  795. struct host_cmd_ds_tx_rate_query {
  796. u8 tx_rate;
  797. /* Tx Rate Info: For 802.11 AC cards
  798. *
  799. * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
  800. * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
  801. * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1
  802. *
  803. * For non-802.11 AC cards
  804. * Ht Info [Bit 0] RxRate format: LG=0, HT=1
  805. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  806. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
  807. */
  808. u8 ht_info;
  809. } __packed;
  810. enum Host_Sleep_Action {
  811. HS_CONFIGURE = 0x0001,
  812. HS_ACTIVATE = 0x0002,
  813. };
  814. struct mwifiex_hs_config_param {
  815. __le32 conditions;
  816. u8 gpio;
  817. u8 gap;
  818. } __packed;
  819. struct hs_activate_param {
  820. u16 resp_ctrl;
  821. } __packed;
  822. struct host_cmd_ds_802_11_hs_cfg_enh {
  823. __le16 action;
  824. union {
  825. struct mwifiex_hs_config_param hs_config;
  826. struct hs_activate_param hs_activate;
  827. } params;
  828. } __packed;
  829. enum SNMP_MIB_INDEX {
  830. OP_RATE_SET_I = 1,
  831. DTIM_PERIOD_I = 3,
  832. RTS_THRESH_I = 5,
  833. SHORT_RETRY_LIM_I = 6,
  834. LONG_RETRY_LIM_I = 7,
  835. FRAG_THRESH_I = 8,
  836. DOT11D_I = 9,
  837. };
  838. #define MAX_SNMP_BUF_SIZE 128
  839. struct host_cmd_ds_802_11_snmp_mib {
  840. __le16 query_type;
  841. __le16 oid;
  842. __le16 buf_size;
  843. u8 value[1];
  844. } __packed;
  845. struct mwifiex_rate_scope {
  846. __le16 type;
  847. __le16 length;
  848. __le16 hr_dsss_rate_bitmap;
  849. __le16 ofdm_rate_bitmap;
  850. __le16 ht_mcs_rate_bitmap[8];
  851. } __packed;
  852. struct mwifiex_rate_drop_pattern {
  853. __le16 type;
  854. __le16 length;
  855. __le32 rate_drop_mode;
  856. } __packed;
  857. struct host_cmd_ds_tx_rate_cfg {
  858. __le16 action;
  859. __le16 cfg_index;
  860. } __packed;
  861. struct mwifiex_power_group {
  862. u8 modulation_class;
  863. u8 first_rate_code;
  864. u8 last_rate_code;
  865. s8 power_step;
  866. s8 power_min;
  867. s8 power_max;
  868. u8 ht_bandwidth;
  869. u8 reserved;
  870. } __packed;
  871. struct mwifiex_types_power_group {
  872. u16 type;
  873. u16 length;
  874. } __packed;
  875. struct host_cmd_ds_txpwr_cfg {
  876. __le16 action;
  877. __le16 cfg_index;
  878. __le32 mode;
  879. } __packed;
  880. struct host_cmd_ds_rf_tx_pwr {
  881. __le16 action;
  882. __le16 cur_level;
  883. u8 max_power;
  884. u8 min_power;
  885. } __packed;
  886. struct host_cmd_ds_rf_ant_mimo {
  887. __le16 action_tx;
  888. __le16 tx_ant_mode;
  889. __le16 action_rx;
  890. __le16 rx_ant_mode;
  891. };
  892. struct host_cmd_ds_rf_ant_siso {
  893. __le16 action;
  894. __le16 ant_mode;
  895. };
  896. struct mwifiex_bcn_param {
  897. u8 bssid[ETH_ALEN];
  898. u8 rssi;
  899. __le64 timestamp;
  900. __le16 beacon_period;
  901. __le16 cap_info_bitmap;
  902. } __packed;
  903. #define MWIFIEX_USER_SCAN_CHAN_MAX 50
  904. #define MWIFIEX_MAX_SSID_LIST_LENGTH 10
  905. struct mwifiex_scan_cmd_config {
  906. /*
  907. * BSS mode to be sent in the firmware command
  908. */
  909. u8 bss_mode;
  910. /* Specific BSSID used to filter scan results in the firmware */
  911. u8 specific_bssid[ETH_ALEN];
  912. /* Length of TLVs sent in command starting at tlvBuffer */
  913. u32 tlv_buf_len;
  914. /*
  915. * SSID TLV(s) and ChanList TLVs to be sent in the firmware command
  916. *
  917. * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
  918. * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
  919. */
  920. u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
  921. here */
  922. } __packed;
  923. struct mwifiex_user_scan_chan {
  924. u8 chan_number;
  925. u8 radio_type;
  926. u8 scan_type;
  927. u8 reserved;
  928. u32 scan_time;
  929. } __packed;
  930. struct mwifiex_user_scan_cfg {
  931. /*
  932. * BSS mode to be sent in the firmware command
  933. */
  934. u8 bss_mode;
  935. /* Configure the number of probe requests for active chan scans */
  936. u8 num_probes;
  937. u8 reserved;
  938. /* BSSID filter sent in the firmware command to limit the results */
  939. u8 specific_bssid[ETH_ALEN];
  940. /* SSID filter list used in the firmware to limit the scan results */
  941. struct cfg80211_ssid *ssid_list;
  942. u8 num_ssids;
  943. /* Variable number (fixed maximum) of channels to scan up */
  944. struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
  945. } __packed;
  946. struct ie_body {
  947. u8 grp_key_oui[4];
  948. u8 ptk_cnt[2];
  949. u8 ptk_body[4];
  950. } __packed;
  951. struct host_cmd_ds_802_11_scan {
  952. u8 bss_mode;
  953. u8 bssid[ETH_ALEN];
  954. u8 tlv_buffer[1];
  955. } __packed;
  956. struct host_cmd_ds_802_11_scan_rsp {
  957. __le16 bss_descript_size;
  958. u8 number_of_sets;
  959. u8 bss_desc_and_tlv_buffer[1];
  960. } __packed;
  961. struct host_cmd_ds_802_11_bg_scan_query {
  962. u8 flush;
  963. } __packed;
  964. struct host_cmd_ds_802_11_bg_scan_query_rsp {
  965. u32 report_condition;
  966. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  967. } __packed;
  968. struct mwifiex_ietypes_domain_param_set {
  969. struct mwifiex_ie_types_header header;
  970. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  971. struct ieee80211_country_ie_triplet triplet[1];
  972. } __packed;
  973. struct host_cmd_ds_802_11d_domain_info {
  974. __le16 action;
  975. struct mwifiex_ietypes_domain_param_set domain;
  976. } __packed;
  977. struct host_cmd_ds_802_11d_domain_info_rsp {
  978. __le16 action;
  979. struct mwifiex_ietypes_domain_param_set domain;
  980. } __packed;
  981. struct host_cmd_ds_11n_addba_req {
  982. u8 add_req_result;
  983. u8 peer_mac_addr[ETH_ALEN];
  984. u8 dialog_token;
  985. __le16 block_ack_param_set;
  986. __le16 block_ack_tmo;
  987. __le16 ssn;
  988. } __packed;
  989. struct host_cmd_ds_11n_addba_rsp {
  990. u8 add_rsp_result;
  991. u8 peer_mac_addr[ETH_ALEN];
  992. u8 dialog_token;
  993. __le16 status_code;
  994. __le16 block_ack_param_set;
  995. __le16 block_ack_tmo;
  996. __le16 ssn;
  997. } __packed;
  998. struct host_cmd_ds_11n_delba {
  999. u8 del_result;
  1000. u8 peer_mac_addr[ETH_ALEN];
  1001. __le16 del_ba_param_set;
  1002. __le16 reason_code;
  1003. u8 reserved;
  1004. } __packed;
  1005. struct host_cmd_ds_11n_batimeout {
  1006. u8 tid;
  1007. u8 peer_mac_addr[ETH_ALEN];
  1008. u8 origninator;
  1009. } __packed;
  1010. struct host_cmd_ds_11n_cfg {
  1011. __le16 action;
  1012. __le16 ht_tx_cap;
  1013. __le16 ht_tx_info;
  1014. __le16 misc_config; /* Needed for 802.11AC cards only */
  1015. } __packed;
  1016. struct host_cmd_ds_txbuf_cfg {
  1017. __le16 action;
  1018. __le16 buff_size;
  1019. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  1020. __le16 reserved3;
  1021. } __packed;
  1022. struct host_cmd_ds_amsdu_aggr_ctrl {
  1023. __le16 action;
  1024. __le16 enable;
  1025. __le16 curr_buf_size;
  1026. } __packed;
  1027. struct mwifiex_ie_types_wmm_param_set {
  1028. struct mwifiex_ie_types_header header;
  1029. u8 wmm_ie[1];
  1030. };
  1031. struct mwifiex_ie_types_wmm_queue_status {
  1032. struct mwifiex_ie_types_header header;
  1033. u8 queue_index;
  1034. u8 disabled;
  1035. u16 medium_time;
  1036. u8 flow_required;
  1037. u8 flow_created;
  1038. u32 reserved;
  1039. };
  1040. struct ieee_types_vendor_header {
  1041. u8 element_id;
  1042. u8 len;
  1043. u8 oui[4]; /* 0~2: oui, 3: oui_type */
  1044. u8 oui_subtype;
  1045. u8 version;
  1046. } __packed;
  1047. struct ieee_types_wmm_parameter {
  1048. /*
  1049. * WMM Parameter IE - Vendor Specific Header:
  1050. * element_id [221/0xdd]
  1051. * Len [24]
  1052. * Oui [00:50:f2]
  1053. * OuiType [2]
  1054. * OuiSubType [1]
  1055. * Version [1]
  1056. */
  1057. struct ieee_types_vendor_header vend_hdr;
  1058. u8 qos_info_bitmap;
  1059. u8 reserved;
  1060. struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
  1061. } __packed;
  1062. struct ieee_types_wmm_info {
  1063. /*
  1064. * WMM Info IE - Vendor Specific Header:
  1065. * element_id [221/0xdd]
  1066. * Len [7]
  1067. * Oui [00:50:f2]
  1068. * OuiType [2]
  1069. * OuiSubType [0]
  1070. * Version [1]
  1071. */
  1072. struct ieee_types_vendor_header vend_hdr;
  1073. u8 qos_info_bitmap;
  1074. } __packed;
  1075. struct host_cmd_ds_wmm_get_status {
  1076. u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
  1077. IEEE80211_NUM_ACS];
  1078. u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
  1079. } __packed;
  1080. struct mwifiex_wmm_ac_status {
  1081. u8 disabled;
  1082. u8 flow_required;
  1083. u8 flow_created;
  1084. };
  1085. struct mwifiex_ie_types_htcap {
  1086. struct mwifiex_ie_types_header header;
  1087. struct ieee80211_ht_cap ht_cap;
  1088. } __packed;
  1089. struct mwifiex_ie_types_vhtcap {
  1090. struct mwifiex_ie_types_header header;
  1091. struct ieee80211_vht_cap vht_cap;
  1092. } __packed;
  1093. struct mwifiex_ie_types_oper_mode_ntf {
  1094. struct mwifiex_ie_types_header header;
  1095. u8 oper_mode;
  1096. } __packed;
  1097. /* VHT Operations IE */
  1098. struct mwifiex_ie_types_vht_oper {
  1099. struct mwifiex_ie_types_header header;
  1100. u8 chan_width;
  1101. u8 chan_center_freq_1;
  1102. u8 chan_center_freq_2;
  1103. /* Basic MCS set map, each 2 bits stands for a NSS */
  1104. u16 basic_mcs_map;
  1105. } __packed;
  1106. struct mwifiex_ie_types_wmmcap {
  1107. struct mwifiex_ie_types_header header;
  1108. struct mwifiex_types_wmm_info wmm_info;
  1109. } __packed;
  1110. struct mwifiex_ie_types_htinfo {
  1111. struct mwifiex_ie_types_header header;
  1112. struct ieee80211_ht_operation ht_oper;
  1113. } __packed;
  1114. struct mwifiex_ie_types_2040bssco {
  1115. struct mwifiex_ie_types_header header;
  1116. u8 bss_co_2040;
  1117. } __packed;
  1118. struct mwifiex_ie_types_extcap {
  1119. struct mwifiex_ie_types_header header;
  1120. u8 ext_cap;
  1121. } __packed;
  1122. struct host_cmd_ds_mac_reg_access {
  1123. __le16 action;
  1124. __le16 offset;
  1125. __le32 value;
  1126. } __packed;
  1127. struct host_cmd_ds_bbp_reg_access {
  1128. __le16 action;
  1129. __le16 offset;
  1130. u8 value;
  1131. u8 reserved[3];
  1132. } __packed;
  1133. struct host_cmd_ds_rf_reg_access {
  1134. __le16 action;
  1135. __le16 offset;
  1136. u8 value;
  1137. u8 reserved[3];
  1138. } __packed;
  1139. struct host_cmd_ds_pmic_reg_access {
  1140. __le16 action;
  1141. __le16 offset;
  1142. u8 value;
  1143. u8 reserved[3];
  1144. } __packed;
  1145. struct host_cmd_ds_802_11_eeprom_access {
  1146. __le16 action;
  1147. __le16 offset;
  1148. __le16 byte_count;
  1149. u8 value;
  1150. } __packed;
  1151. struct host_cmd_tlv {
  1152. __le16 type;
  1153. __le16 len;
  1154. } __packed;
  1155. struct mwifiex_assoc_event {
  1156. u8 sta_addr[ETH_ALEN];
  1157. __le16 type;
  1158. __le16 len;
  1159. __le16 frame_control;
  1160. __le16 cap_info;
  1161. __le16 listen_interval;
  1162. u8 data[0];
  1163. } __packed;
  1164. struct host_cmd_ds_sys_config {
  1165. __le16 action;
  1166. u8 tlv[0];
  1167. };
  1168. struct host_cmd_tlv_akmp {
  1169. struct host_cmd_tlv tlv;
  1170. __le16 key_mgmt;
  1171. __le16 key_mgmt_operation;
  1172. } __packed;
  1173. struct host_cmd_tlv_pwk_cipher {
  1174. struct host_cmd_tlv tlv;
  1175. __le16 proto;
  1176. u8 cipher;
  1177. u8 reserved;
  1178. } __packed;
  1179. struct host_cmd_tlv_gwk_cipher {
  1180. struct host_cmd_tlv tlv;
  1181. u8 cipher;
  1182. u8 reserved;
  1183. } __packed;
  1184. struct host_cmd_tlv_passphrase {
  1185. struct host_cmd_tlv tlv;
  1186. u8 passphrase[0];
  1187. } __packed;
  1188. struct host_cmd_tlv_wep_key {
  1189. struct host_cmd_tlv tlv;
  1190. u8 key_index;
  1191. u8 is_default;
  1192. u8 key[1];
  1193. };
  1194. struct host_cmd_tlv_auth_type {
  1195. struct host_cmd_tlv tlv;
  1196. u8 auth_type;
  1197. } __packed;
  1198. struct host_cmd_tlv_encrypt_protocol {
  1199. struct host_cmd_tlv tlv;
  1200. __le16 proto;
  1201. } __packed;
  1202. struct host_cmd_tlv_ssid {
  1203. struct host_cmd_tlv tlv;
  1204. u8 ssid[0];
  1205. } __packed;
  1206. struct host_cmd_tlv_rates {
  1207. struct host_cmd_tlv tlv;
  1208. u8 rates[0];
  1209. } __packed;
  1210. struct host_cmd_tlv_bcast_ssid {
  1211. struct host_cmd_tlv tlv;
  1212. u8 bcast_ctl;
  1213. } __packed;
  1214. struct host_cmd_tlv_beacon_period {
  1215. struct host_cmd_tlv tlv;
  1216. __le16 period;
  1217. } __packed;
  1218. struct host_cmd_tlv_dtim_period {
  1219. struct host_cmd_tlv tlv;
  1220. u8 period;
  1221. } __packed;
  1222. struct host_cmd_tlv_frag_threshold {
  1223. struct host_cmd_tlv tlv;
  1224. __le16 frag_thr;
  1225. } __packed;
  1226. struct host_cmd_tlv_rts_threshold {
  1227. struct host_cmd_tlv tlv;
  1228. __le16 rts_thr;
  1229. } __packed;
  1230. struct host_cmd_tlv_retry_limit {
  1231. struct host_cmd_tlv tlv;
  1232. u8 limit;
  1233. } __packed;
  1234. struct host_cmd_tlv_mac_addr {
  1235. struct host_cmd_tlv tlv;
  1236. u8 mac_addr[ETH_ALEN];
  1237. } __packed;
  1238. struct host_cmd_tlv_channel_band {
  1239. struct host_cmd_tlv tlv;
  1240. u8 band_config;
  1241. u8 channel;
  1242. } __packed;
  1243. struct host_cmd_tlv_ageout_timer {
  1244. struct host_cmd_tlv tlv;
  1245. __le32 sta_ao_timer;
  1246. } __packed;
  1247. struct host_cmd_ds_version_ext {
  1248. u8 version_str_sel;
  1249. char version_str[128];
  1250. } __packed;
  1251. struct host_cmd_ds_mgmt_frame_reg {
  1252. __le16 action;
  1253. __le32 mask;
  1254. } __packed;
  1255. struct host_cmd_ds_p2p_mode_cfg {
  1256. __le16 action;
  1257. __le16 mode;
  1258. } __packed;
  1259. struct host_cmd_ds_remain_on_chan {
  1260. __le16 action;
  1261. u8 status;
  1262. u8 reserved;
  1263. u8 band_cfg;
  1264. u8 channel;
  1265. __le32 duration;
  1266. } __packed;
  1267. struct host_cmd_ds_802_11_ibss_status {
  1268. __le16 action;
  1269. __le16 enable;
  1270. u8 bssid[ETH_ALEN];
  1271. __le16 beacon_interval;
  1272. __le16 atim_window;
  1273. __le16 use_g_rate_protect;
  1274. } __packed;
  1275. #define CONNECTION_TYPE_INFRA 0
  1276. #define CONNECTION_TYPE_ADHOC 1
  1277. #define CONNECTION_TYPE_AP 2
  1278. struct host_cmd_ds_set_bss_mode {
  1279. u8 con_type;
  1280. } __packed;
  1281. struct host_cmd_ds_pcie_details {
  1282. /* TX buffer descriptor ring address */
  1283. u32 txbd_addr_lo;
  1284. u32 txbd_addr_hi;
  1285. /* TX buffer descriptor ring count */
  1286. u32 txbd_count;
  1287. /* RX buffer descriptor ring address */
  1288. u32 rxbd_addr_lo;
  1289. u32 rxbd_addr_hi;
  1290. /* RX buffer descriptor ring count */
  1291. u32 rxbd_count;
  1292. /* Event buffer descriptor ring address */
  1293. u32 evtbd_addr_lo;
  1294. u32 evtbd_addr_hi;
  1295. /* Event buffer descriptor ring count */
  1296. u32 evtbd_count;
  1297. /* Sleep cookie buffer physical address */
  1298. u32 sleep_cookie_addr_lo;
  1299. u32 sleep_cookie_addr_hi;
  1300. } __packed;
  1301. struct mwifiex_ie_types_rssi_threshold {
  1302. struct mwifiex_ie_types_header header;
  1303. u8 abs_value;
  1304. u8 evt_freq;
  1305. } __packed;
  1306. struct host_cmd_ds_802_11_subsc_evt {
  1307. __le16 action;
  1308. __le16 events;
  1309. } __packed;
  1310. struct mwifiex_ie {
  1311. __le16 ie_index;
  1312. __le16 mgmt_subtype_mask;
  1313. __le16 ie_length;
  1314. u8 ie_buffer[IEEE_MAX_IE_SIZE];
  1315. } __packed;
  1316. #define MAX_MGMT_IE_INDEX 16
  1317. struct mwifiex_ie_list {
  1318. __le16 type;
  1319. __le16 len;
  1320. struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX];
  1321. } __packed;
  1322. struct host_cmd_ds_command {
  1323. __le16 command;
  1324. __le16 size;
  1325. __le16 seq_num;
  1326. __le16 result;
  1327. union {
  1328. struct host_cmd_ds_get_hw_spec hw_spec;
  1329. struct host_cmd_ds_mac_control mac_ctrl;
  1330. struct host_cmd_ds_802_11_mac_address mac_addr;
  1331. struct host_cmd_ds_mac_multicast_adr mc_addr;
  1332. struct host_cmd_ds_802_11_get_log get_log;
  1333. struct host_cmd_ds_802_11_rssi_info rssi_info;
  1334. struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
  1335. struct host_cmd_ds_802_11_snmp_mib smib;
  1336. struct host_cmd_ds_tx_rate_query tx_rate;
  1337. struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
  1338. struct host_cmd_ds_txpwr_cfg txp_cfg;
  1339. struct host_cmd_ds_rf_tx_pwr txp;
  1340. struct host_cmd_ds_rf_ant_mimo ant_mimo;
  1341. struct host_cmd_ds_rf_ant_siso ant_siso;
  1342. struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
  1343. struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
  1344. struct host_cmd_ds_802_11_scan scan;
  1345. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1346. struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
  1347. struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
  1348. struct host_cmd_ds_802_11_associate associate;
  1349. struct host_cmd_ds_802_11_associate_rsp associate_rsp;
  1350. struct host_cmd_ds_802_11_deauthenticate deauth;
  1351. struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  1352. struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
  1353. struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
  1354. struct host_cmd_ds_802_11d_domain_info domain_info;
  1355. struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
  1356. struct host_cmd_ds_11n_addba_req add_ba_req;
  1357. struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
  1358. struct host_cmd_ds_11n_delba del_ba;
  1359. struct host_cmd_ds_txbuf_cfg tx_buf;
  1360. struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
  1361. struct host_cmd_ds_11n_cfg htcfg;
  1362. struct host_cmd_ds_wmm_get_status get_wmm_status;
  1363. struct host_cmd_ds_802_11_key_material key_material;
  1364. struct host_cmd_ds_version_ext verext;
  1365. struct host_cmd_ds_mgmt_frame_reg reg_mask;
  1366. struct host_cmd_ds_remain_on_chan roc_cfg;
  1367. struct host_cmd_ds_p2p_mode_cfg mode_cfg;
  1368. struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
  1369. struct host_cmd_ds_mac_reg_access mac_reg;
  1370. struct host_cmd_ds_bbp_reg_access bbp_reg;
  1371. struct host_cmd_ds_rf_reg_access rf_reg;
  1372. struct host_cmd_ds_pmic_reg_access pmic_reg;
  1373. struct host_cmd_ds_set_bss_mode bss_mode;
  1374. struct host_cmd_ds_pcie_details pcie_host_spec;
  1375. struct host_cmd_ds_802_11_eeprom_access eeprom;
  1376. struct host_cmd_ds_802_11_subsc_evt subsc_evt;
  1377. struct host_cmd_ds_sys_config uap_sys_config;
  1378. } params;
  1379. } __packed;
  1380. struct mwifiex_opt_sleep_confirm {
  1381. __le16 command;
  1382. __le16 size;
  1383. __le16 seq_num;
  1384. __le16 result;
  1385. __le16 action;
  1386. __le16 resp_ctrl;
  1387. } __packed;
  1388. #endif /* !_MWIFIEX_FW_H_ */