fw.h 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662
  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_MEF_CFG 0x009a
  259. #define HostCmd_CMD_RSSI_INFO 0x00a4
  260. #define HostCmd_CMD_FUNC_INIT 0x00a9
  261. #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
  262. #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0
  263. #define HostCmd_CMD_UAP_BSS_START 0x00b1
  264. #define HostCmd_CMD_UAP_BSS_STOP 0x00b2
  265. #define HostCmd_CMD_11N_CFG 0x00cd
  266. #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
  267. #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
  268. #define HostCmd_CMD_11N_DELBA 0x00d0
  269. #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
  270. #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
  271. #define HostCmd_CMD_TXPWR_CFG 0x00d1
  272. #define HostCmd_CMD_TX_RATE_CFG 0x00d6
  273. #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4
  274. #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5
  275. #define HostCmd_CMD_P2P_MODE_CFG 0x00eb
  276. #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
  277. #define HostCmd_CMD_SET_BSS_MODE 0x00f7
  278. #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa
  279. #define HostCmd_CMD_MGMT_FRAME_REG 0x010c
  280. #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d
  281. #define PROTOCOL_NO_SECURITY 0x01
  282. #define PROTOCOL_STATIC_WEP 0x02
  283. #define PROTOCOL_WPA 0x08
  284. #define PROTOCOL_WPA2 0x20
  285. #define PROTOCOL_WPA2_MIXED 0x28
  286. #define PROTOCOL_EAP 0x40
  287. #define KEY_MGMT_NONE 0x04
  288. #define KEY_MGMT_PSK 0x02
  289. #define KEY_MGMT_EAP 0x01
  290. #define CIPHER_TKIP 0x04
  291. #define CIPHER_AES_CCMP 0x08
  292. #define VALID_CIPHER_BITMAP 0x0c
  293. enum ENH_PS_MODES {
  294. EN_PS = 1,
  295. DIS_PS = 2,
  296. EN_AUTO_DS = 3,
  297. DIS_AUTO_DS = 4,
  298. SLEEP_CONFIRM = 5,
  299. GET_PS = 0,
  300. EN_AUTO_PS = 0xff,
  301. DIS_AUTO_PS = 0xfe,
  302. };
  303. enum P2P_MODES {
  304. P2P_MODE_DISABLE = 0,
  305. P2P_MODE_DEVICE = 1,
  306. P2P_MODE_GO = 2,
  307. P2P_MODE_CLIENT = 3,
  308. };
  309. #define HostCmd_RET_BIT 0x8000
  310. #define HostCmd_ACT_GEN_GET 0x0000
  311. #define HostCmd_ACT_GEN_SET 0x0001
  312. #define HostCmd_ACT_GEN_REMOVE 0x0004
  313. #define HostCmd_ACT_BITWISE_SET 0x0002
  314. #define HostCmd_ACT_BITWISE_CLR 0x0003
  315. #define HostCmd_RESULT_OK 0x0000
  316. #define HostCmd_ACT_MAC_RX_ON 0x0001
  317. #define HostCmd_ACT_MAC_TX_ON 0x0002
  318. #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
  319. #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
  320. #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
  321. #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
  322. #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
  323. #define HostCmd_BSS_MODE_IBSS 0x0002
  324. #define HostCmd_BSS_MODE_ANY 0x0003
  325. #define HostCmd_SCAN_RADIO_TYPE_BG 0
  326. #define HostCmd_SCAN_RADIO_TYPE_A 1
  327. #define HS_CFG_CANCEL 0xffffffff
  328. #define HS_CFG_COND_DEF 0x00000000
  329. #define HS_CFG_GPIO_DEF 0xff
  330. #define HS_CFG_GAP_DEF 0
  331. #define HS_CFG_COND_BROADCAST_DATA 0x00000001
  332. #define HS_CFG_COND_UNICAST_DATA 0x00000002
  333. #define HS_CFG_COND_MAC_EVENT 0x00000004
  334. #define HS_CFG_COND_MULTICAST_DATA 0x00000008
  335. #define MWIFIEX_TIMEOUT_FOR_AP_RESP 0xfffc
  336. #define MWIFIEX_STATUS_CODE_AUTH_TIMEOUT 2
  337. #define CMD_F_HOSTCMD (1 << 0)
  338. #define CMD_F_CANCELED (1 << 1)
  339. #define HostCmd_CMD_ID_MASK 0x0fff
  340. #define HostCmd_SEQ_NUM_MASK 0x00ff
  341. #define HostCmd_BSS_NUM_MASK 0x0f00
  342. #define HostCmd_BSS_TYPE_MASK 0xf000
  343. #define HostCmd_ACT_SET_RX 0x0001
  344. #define HostCmd_ACT_SET_TX 0x0002
  345. #define HostCmd_ACT_SET_BOTH 0x0003
  346. #define RF_ANTENNA_AUTO 0xFFFF
  347. #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
  348. (((seq) & 0x00ff) | \
  349. (((num) & 0x000f) << 8)) | \
  350. (((type) & 0x000f) << 12); }
  351. #define HostCmd_GET_SEQ_NO(seq) \
  352. ((seq) & HostCmd_SEQ_NUM_MASK)
  353. #define HostCmd_GET_BSS_NO(seq) \
  354. (((seq) & HostCmd_BSS_NUM_MASK) >> 8)
  355. #define HostCmd_GET_BSS_TYPE(seq) \
  356. (((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
  357. #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
  358. #define EVENT_LINK_LOST 0x00000003
  359. #define EVENT_LINK_SENSED 0x00000004
  360. #define EVENT_MIB_CHANGED 0x00000006
  361. #define EVENT_INIT_DONE 0x00000007
  362. #define EVENT_DEAUTHENTICATED 0x00000008
  363. #define EVENT_DISASSOCIATED 0x00000009
  364. #define EVENT_PS_AWAKE 0x0000000a
  365. #define EVENT_PS_SLEEP 0x0000000b
  366. #define EVENT_MIC_ERR_MULTICAST 0x0000000d
  367. #define EVENT_MIC_ERR_UNICAST 0x0000000e
  368. #define EVENT_DEEP_SLEEP_AWAKE 0x00000010
  369. #define EVENT_ADHOC_BCN_LOST 0x00000011
  370. #define EVENT_WMM_STATUS_CHANGE 0x00000017
  371. #define EVENT_BG_SCAN_REPORT 0x00000018
  372. #define EVENT_RSSI_LOW 0x00000019
  373. #define EVENT_SNR_LOW 0x0000001a
  374. #define EVENT_MAX_FAIL 0x0000001b
  375. #define EVENT_RSSI_HIGH 0x0000001c
  376. #define EVENT_SNR_HIGH 0x0000001d
  377. #define EVENT_IBSS_COALESCED 0x0000001e
  378. #define EVENT_DATA_RSSI_LOW 0x00000024
  379. #define EVENT_DATA_SNR_LOW 0x00000025
  380. #define EVENT_DATA_RSSI_HIGH 0x00000026
  381. #define EVENT_DATA_SNR_HIGH 0x00000027
  382. #define EVENT_LINK_QUALITY 0x00000028
  383. #define EVENT_PORT_RELEASE 0x0000002b
  384. #define EVENT_UAP_STA_DEAUTH 0x0000002c
  385. #define EVENT_UAP_STA_ASSOC 0x0000002d
  386. #define EVENT_UAP_BSS_START 0x0000002e
  387. #define EVENT_PRE_BEACON_LOST 0x00000031
  388. #define EVENT_ADDBA 0x00000033
  389. #define EVENT_DELBA 0x00000034
  390. #define EVENT_BA_STREAM_TIEMOUT 0x00000037
  391. #define EVENT_AMSDU_AGGR_CTRL 0x00000042
  392. #define EVENT_UAP_BSS_IDLE 0x00000043
  393. #define EVENT_UAP_BSS_ACTIVE 0x00000044
  394. #define EVENT_WEP_ICV_ERR 0x00000046
  395. #define EVENT_HS_ACT_REQ 0x00000047
  396. #define EVENT_BW_CHANGE 0x00000048
  397. #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c
  398. #define EVENT_HOSTWAKE_STAIE 0x0000004d
  399. #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f
  400. #define EVENT_ID_MASK 0xffff
  401. #define BSS_NUM_MASK 0xf
  402. #define EVENT_GET_BSS_NUM(event_cause) \
  403. (((event_cause) >> 16) & BSS_NUM_MASK)
  404. #define EVENT_GET_BSS_TYPE(event_cause) \
  405. (((event_cause) >> 24) & 0x00ff)
  406. #define MWIFIEX_MAX_PATTERN_LEN 20
  407. #define MWIFIEX_MAX_OFFSET_LEN 50
  408. #define STACK_NBYTES 100
  409. #define TYPE_DNUM 1
  410. #define TYPE_BYTESEQ 2
  411. #define MAX_OPERAND 0x40
  412. #define TYPE_EQ (MAX_OPERAND+1)
  413. #define TYPE_EQ_DNUM (MAX_OPERAND+2)
  414. #define TYPE_EQ_BIT (MAX_OPERAND+3)
  415. #define TYPE_AND (MAX_OPERAND+4)
  416. #define TYPE_OR (MAX_OPERAND+5)
  417. #define MEF_MODE_HOST_SLEEP 1
  418. #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3
  419. #define MWIFIEX_CRITERIA_BROADCAST BIT(0)
  420. #define MWIFIEX_CRITERIA_UNICAST BIT(1)
  421. #define MWIFIEX_CRITERIA_MULTICAST BIT(3)
  422. struct mwifiex_ie_types_header {
  423. __le16 type;
  424. __le16 len;
  425. } __packed;
  426. struct mwifiex_ie_types_data {
  427. struct mwifiex_ie_types_header header;
  428. u8 data[1];
  429. } __packed;
  430. #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
  431. #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
  432. struct txpd {
  433. u8 bss_type;
  434. u8 bss_num;
  435. __le16 tx_pkt_length;
  436. __le16 tx_pkt_offset;
  437. __le16 tx_pkt_type;
  438. __le32 tx_control;
  439. u8 priority;
  440. u8 flags;
  441. u8 pkt_delay_2ms;
  442. u8 reserved1;
  443. } __packed;
  444. struct rxpd {
  445. u8 bss_type;
  446. u8 bss_num;
  447. __le16 rx_pkt_length;
  448. __le16 rx_pkt_offset;
  449. __le16 rx_pkt_type;
  450. __le16 seq_num;
  451. u8 priority;
  452. u8 rx_rate;
  453. s8 snr;
  454. s8 nf;
  455. /* For: Non-802.11 AC cards
  456. *
  457. * Ht Info [Bit 0] RxRate format: LG=0, HT=1
  458. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  459. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
  460. *
  461. * For: 802.11 AC cards
  462. * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
  463. * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
  464. * BW80 = 10 BW160 = 11
  465. * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
  466. * [Bit 5] STBC support Enabled = 1
  467. * [Bit 6] LDPC support Enabled = 1
  468. * [Bit 7] Reserved
  469. */
  470. u8 ht_info;
  471. u8 reserved;
  472. } __packed;
  473. struct uap_txpd {
  474. u8 bss_type;
  475. u8 bss_num;
  476. __le16 tx_pkt_length;
  477. __le16 tx_pkt_offset;
  478. __le16 tx_pkt_type;
  479. __le32 tx_control;
  480. u8 priority;
  481. u8 flags;
  482. u8 pkt_delay_2ms;
  483. u8 reserved1;
  484. __le32 reserved2;
  485. };
  486. struct uap_rxpd {
  487. u8 bss_type;
  488. u8 bss_num;
  489. __le16 rx_pkt_length;
  490. __le16 rx_pkt_offset;
  491. __le16 rx_pkt_type;
  492. __le16 seq_num;
  493. u8 priority;
  494. u8 reserved1;
  495. };
  496. enum mwifiex_chan_scan_mode_bitmasks {
  497. MWIFIEX_PASSIVE_SCAN = BIT(0),
  498. MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
  499. };
  500. struct mwifiex_chan_scan_param_set {
  501. u8 radio_type;
  502. u8 chan_number;
  503. u8 chan_scan_mode_bitmap;
  504. __le16 min_scan_time;
  505. __le16 max_scan_time;
  506. } __packed;
  507. struct mwifiex_ie_types_chan_list_param_set {
  508. struct mwifiex_ie_types_header header;
  509. struct mwifiex_chan_scan_param_set chan_scan_param[1];
  510. } __packed;
  511. struct chan_band_param_set {
  512. u8 radio_type;
  513. u8 chan_number;
  514. };
  515. struct mwifiex_ie_types_chan_band_list_param_set {
  516. struct mwifiex_ie_types_header header;
  517. struct chan_band_param_set chan_band_param[1];
  518. } __packed;
  519. struct mwifiex_ie_types_rates_param_set {
  520. struct mwifiex_ie_types_header header;
  521. u8 rates[1];
  522. } __packed;
  523. struct mwifiex_ie_types_ssid_param_set {
  524. struct mwifiex_ie_types_header header;
  525. u8 ssid[1];
  526. } __packed;
  527. struct mwifiex_ie_types_num_probes {
  528. struct mwifiex_ie_types_header header;
  529. __le16 num_probes;
  530. } __packed;
  531. struct mwifiex_ie_types_wildcard_ssid_params {
  532. struct mwifiex_ie_types_header header;
  533. u8 max_ssid_length;
  534. u8 ssid[1];
  535. } __packed;
  536. #define TSF_DATA_SIZE 8
  537. struct mwifiex_ie_types_tsf_timestamp {
  538. struct mwifiex_ie_types_header header;
  539. u8 tsf_data[1];
  540. } __packed;
  541. struct mwifiex_cf_param_set {
  542. u8 cfp_cnt;
  543. u8 cfp_period;
  544. u16 cfp_max_duration;
  545. u16 cfp_duration_remaining;
  546. } __packed;
  547. struct mwifiex_ibss_param_set {
  548. u16 atim_window;
  549. } __packed;
  550. struct mwifiex_ie_types_ss_param_set {
  551. struct mwifiex_ie_types_header header;
  552. union {
  553. struct mwifiex_cf_param_set cf_param_set[1];
  554. struct mwifiex_ibss_param_set ibss_param_set[1];
  555. } cf_ibss;
  556. } __packed;
  557. struct mwifiex_fh_param_set {
  558. u16 dwell_time;
  559. u8 hop_set;
  560. u8 hop_pattern;
  561. u8 hop_index;
  562. } __packed;
  563. struct mwifiex_ds_param_set {
  564. u8 current_chan;
  565. } __packed;
  566. struct mwifiex_ie_types_phy_param_set {
  567. struct mwifiex_ie_types_header header;
  568. union {
  569. struct mwifiex_fh_param_set fh_param_set[1];
  570. struct mwifiex_ds_param_set ds_param_set[1];
  571. } fh_ds;
  572. } __packed;
  573. struct mwifiex_ie_types_auth_type {
  574. struct mwifiex_ie_types_header header;
  575. __le16 auth_type;
  576. } __packed;
  577. struct mwifiex_ie_types_vendor_param_set {
  578. struct mwifiex_ie_types_header header;
  579. u8 ie[MWIFIEX_MAX_VSIE_LEN];
  580. };
  581. struct mwifiex_ie_types_rsn_param_set {
  582. struct mwifiex_ie_types_header header;
  583. u8 rsn_ie[1];
  584. } __packed;
  585. #define KEYPARAMSET_FIXED_LEN 6
  586. struct mwifiex_ie_type_key_param_set {
  587. __le16 type;
  588. __le16 length;
  589. __le16 key_type_id;
  590. __le16 key_info;
  591. __le16 key_len;
  592. u8 key[50];
  593. } __packed;
  594. #define IGTK_PN_LEN 8
  595. struct mwifiex_cmac_param {
  596. u8 ipn[IGTK_PN_LEN];
  597. u8 key[WLAN_KEY_LEN_AES_CMAC];
  598. } __packed;
  599. struct host_cmd_ds_802_11_key_material {
  600. __le16 action;
  601. struct mwifiex_ie_type_key_param_set key_param_set;
  602. } __packed;
  603. struct host_cmd_ds_gen {
  604. u16 command;
  605. u16 size;
  606. u16 seq_num;
  607. u16 result;
  608. };
  609. #define S_DS_GEN sizeof(struct host_cmd_ds_gen)
  610. enum sleep_resp_ctrl {
  611. RESP_NOT_NEEDED = 0,
  612. RESP_NEEDED,
  613. };
  614. struct mwifiex_ps_param {
  615. __le16 null_pkt_interval;
  616. __le16 multiple_dtims;
  617. __le16 bcn_miss_timeout;
  618. __le16 local_listen_interval;
  619. __le16 adhoc_wake_period;
  620. __le16 mode;
  621. __le16 delay_to_ps;
  622. };
  623. #define BITMAP_AUTO_DS 0x01
  624. #define BITMAP_STA_PS 0x10
  625. struct mwifiex_ie_types_auto_ds_param {
  626. struct mwifiex_ie_types_header header;
  627. __le16 deep_sleep_timeout;
  628. } __packed;
  629. struct mwifiex_ie_types_ps_param {
  630. struct mwifiex_ie_types_header header;
  631. struct mwifiex_ps_param param;
  632. } __packed;
  633. struct host_cmd_ds_802_11_ps_mode_enh {
  634. __le16 action;
  635. union {
  636. struct mwifiex_ps_param opt_ps;
  637. __le16 ps_bitmap;
  638. } params;
  639. } __packed;
  640. struct host_cmd_ds_get_hw_spec {
  641. __le16 hw_if_version;
  642. __le16 version;
  643. __le16 reserved;
  644. __le16 num_of_mcast_adr;
  645. u8 permanent_addr[ETH_ALEN];
  646. __le16 region_code;
  647. __le16 number_of_antenna;
  648. __le32 fw_release_number;
  649. __le32 reserved_1;
  650. __le32 reserved_2;
  651. __le32 reserved_3;
  652. __le32 fw_cap_info;
  653. __le32 dot_11n_dev_cap;
  654. u8 dev_mcs_support;
  655. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  656. __le16 mgmt_buf_count; /* mgmt IE buffer count */
  657. __le32 reserved_5;
  658. __le32 reserved_6;
  659. __le32 dot_11ac_dev_cap;
  660. __le32 dot_11ac_mcs_support;
  661. } __packed;
  662. struct host_cmd_ds_802_11_rssi_info {
  663. __le16 action;
  664. __le16 ndata;
  665. __le16 nbcn;
  666. __le16 reserved[9];
  667. long long reserved_1;
  668. };
  669. struct host_cmd_ds_802_11_rssi_info_rsp {
  670. __le16 action;
  671. __le16 ndata;
  672. __le16 nbcn;
  673. __le16 data_rssi_last;
  674. __le16 data_nf_last;
  675. __le16 data_rssi_avg;
  676. __le16 data_nf_avg;
  677. __le16 bcn_rssi_last;
  678. __le16 bcn_nf_last;
  679. __le16 bcn_rssi_avg;
  680. __le16 bcn_nf_avg;
  681. long long tsf_bcn;
  682. };
  683. struct host_cmd_ds_802_11_mac_address {
  684. __le16 action;
  685. u8 mac_addr[ETH_ALEN];
  686. };
  687. struct host_cmd_ds_mac_control {
  688. __le16 action;
  689. __le16 reserved;
  690. };
  691. struct host_cmd_ds_mac_multicast_adr {
  692. __le16 action;
  693. __le16 num_of_adrs;
  694. u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
  695. } __packed;
  696. struct host_cmd_ds_802_11_deauthenticate {
  697. u8 mac_addr[ETH_ALEN];
  698. __le16 reason_code;
  699. } __packed;
  700. struct host_cmd_ds_802_11_associate {
  701. u8 peer_sta_addr[ETH_ALEN];
  702. __le16 cap_info_bitmap;
  703. __le16 listen_interval;
  704. __le16 beacon_period;
  705. u8 dtim_period;
  706. } __packed;
  707. struct ieee_types_assoc_rsp {
  708. __le16 cap_info_bitmap;
  709. __le16 status_code;
  710. __le16 a_id;
  711. u8 ie_buffer[1];
  712. } __packed;
  713. struct host_cmd_ds_802_11_associate_rsp {
  714. struct ieee_types_assoc_rsp assoc_rsp;
  715. } __packed;
  716. struct ieee_types_cf_param_set {
  717. u8 element_id;
  718. u8 len;
  719. u8 cfp_cnt;
  720. u8 cfp_period;
  721. u16 cfp_max_duration;
  722. u16 cfp_duration_remaining;
  723. } __packed;
  724. struct ieee_types_ibss_param_set {
  725. u8 element_id;
  726. u8 len;
  727. __le16 atim_window;
  728. } __packed;
  729. union ieee_types_ss_param_set {
  730. struct ieee_types_cf_param_set cf_param_set;
  731. struct ieee_types_ibss_param_set ibss_param_set;
  732. } __packed;
  733. struct ieee_types_fh_param_set {
  734. u8 element_id;
  735. u8 len;
  736. __le16 dwell_time;
  737. u8 hop_set;
  738. u8 hop_pattern;
  739. u8 hop_index;
  740. } __packed;
  741. struct ieee_types_ds_param_set {
  742. u8 element_id;
  743. u8 len;
  744. u8 current_chan;
  745. } __packed;
  746. union ieee_types_phy_param_set {
  747. struct ieee_types_fh_param_set fh_param_set;
  748. struct ieee_types_ds_param_set ds_param_set;
  749. } __packed;
  750. struct ieee_types_oper_mode_ntf {
  751. u8 element_id;
  752. u8 len;
  753. u8 oper_mode;
  754. } __packed;
  755. struct host_cmd_ds_802_11_ad_hoc_start {
  756. u8 ssid[IEEE80211_MAX_SSID_LEN];
  757. u8 bss_mode;
  758. __le16 beacon_period;
  759. u8 dtim_period;
  760. union ieee_types_ss_param_set ss_param_set;
  761. union ieee_types_phy_param_set phy_param_set;
  762. u16 reserved1;
  763. __le16 cap_info_bitmap;
  764. u8 data_rate[HOSTCMD_SUPPORTED_RATES];
  765. } __packed;
  766. struct host_cmd_ds_802_11_ad_hoc_result {
  767. u8 pad[3];
  768. u8 bssid[ETH_ALEN];
  769. } __packed;
  770. struct adhoc_bss_desc {
  771. u8 bssid[ETH_ALEN];
  772. u8 ssid[IEEE80211_MAX_SSID_LEN];
  773. u8 bss_mode;
  774. __le16 beacon_period;
  775. u8 dtim_period;
  776. u8 time_stamp[8];
  777. u8 local_time[8];
  778. union ieee_types_phy_param_set phy_param_set;
  779. union ieee_types_ss_param_set ss_param_set;
  780. __le16 cap_info_bitmap;
  781. u8 data_rates[HOSTCMD_SUPPORTED_RATES];
  782. /*
  783. * DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
  784. * It is used in the Adhoc join command and will cause a
  785. * binary layout mismatch with the firmware
  786. */
  787. } __packed;
  788. struct host_cmd_ds_802_11_ad_hoc_join {
  789. struct adhoc_bss_desc bss_descriptor;
  790. u16 reserved1;
  791. u16 reserved2;
  792. } __packed;
  793. struct host_cmd_ds_802_11_get_log {
  794. __le32 mcast_tx_frame;
  795. __le32 failed;
  796. __le32 retry;
  797. __le32 multi_retry;
  798. __le32 frame_dup;
  799. __le32 rts_success;
  800. __le32 rts_failure;
  801. __le32 ack_failure;
  802. __le32 rx_frag;
  803. __le32 mcast_rx_frame;
  804. __le32 fcs_error;
  805. __le32 tx_frame;
  806. __le32 reserved;
  807. __le32 wep_icv_err_cnt[4];
  808. };
  809. /* Enumeration for rate format */
  810. enum _mwifiex_rate_format {
  811. MWIFIEX_RATE_FORMAT_LG = 0,
  812. MWIFIEX_RATE_FORMAT_HT,
  813. MWIFIEX_RATE_FORMAT_VHT,
  814. MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
  815. };
  816. struct host_cmd_ds_tx_rate_query {
  817. u8 tx_rate;
  818. /* Tx Rate Info: For 802.11 AC cards
  819. *
  820. * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
  821. * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
  822. * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1
  823. *
  824. * For non-802.11 AC cards
  825. * Ht Info [Bit 0] RxRate format: LG=0, HT=1
  826. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  827. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
  828. */
  829. u8 ht_info;
  830. } __packed;
  831. enum Host_Sleep_Action {
  832. HS_CONFIGURE = 0x0001,
  833. HS_ACTIVATE = 0x0002,
  834. };
  835. struct mwifiex_hs_config_param {
  836. __le32 conditions;
  837. u8 gpio;
  838. u8 gap;
  839. } __packed;
  840. struct hs_activate_param {
  841. u16 resp_ctrl;
  842. } __packed;
  843. struct host_cmd_ds_802_11_hs_cfg_enh {
  844. __le16 action;
  845. union {
  846. struct mwifiex_hs_config_param hs_config;
  847. struct hs_activate_param hs_activate;
  848. } params;
  849. } __packed;
  850. enum SNMP_MIB_INDEX {
  851. OP_RATE_SET_I = 1,
  852. DTIM_PERIOD_I = 3,
  853. RTS_THRESH_I = 5,
  854. SHORT_RETRY_LIM_I = 6,
  855. LONG_RETRY_LIM_I = 7,
  856. FRAG_THRESH_I = 8,
  857. DOT11D_I = 9,
  858. };
  859. #define MAX_SNMP_BUF_SIZE 128
  860. struct host_cmd_ds_802_11_snmp_mib {
  861. __le16 query_type;
  862. __le16 oid;
  863. __le16 buf_size;
  864. u8 value[1];
  865. } __packed;
  866. struct mwifiex_rate_scope {
  867. __le16 type;
  868. __le16 length;
  869. __le16 hr_dsss_rate_bitmap;
  870. __le16 ofdm_rate_bitmap;
  871. __le16 ht_mcs_rate_bitmap[8];
  872. } __packed;
  873. struct mwifiex_rate_drop_pattern {
  874. __le16 type;
  875. __le16 length;
  876. __le32 rate_drop_mode;
  877. } __packed;
  878. struct host_cmd_ds_tx_rate_cfg {
  879. __le16 action;
  880. __le16 cfg_index;
  881. } __packed;
  882. struct mwifiex_power_group {
  883. u8 modulation_class;
  884. u8 first_rate_code;
  885. u8 last_rate_code;
  886. s8 power_step;
  887. s8 power_min;
  888. s8 power_max;
  889. u8 ht_bandwidth;
  890. u8 reserved;
  891. } __packed;
  892. struct mwifiex_types_power_group {
  893. u16 type;
  894. u16 length;
  895. } __packed;
  896. struct host_cmd_ds_txpwr_cfg {
  897. __le16 action;
  898. __le16 cfg_index;
  899. __le32 mode;
  900. } __packed;
  901. struct host_cmd_ds_rf_tx_pwr {
  902. __le16 action;
  903. __le16 cur_level;
  904. u8 max_power;
  905. u8 min_power;
  906. } __packed;
  907. struct host_cmd_ds_rf_ant_mimo {
  908. __le16 action_tx;
  909. __le16 tx_ant_mode;
  910. __le16 action_rx;
  911. __le16 rx_ant_mode;
  912. };
  913. struct host_cmd_ds_rf_ant_siso {
  914. __le16 action;
  915. __le16 ant_mode;
  916. };
  917. struct mwifiex_bcn_param {
  918. u8 bssid[ETH_ALEN];
  919. u8 rssi;
  920. __le64 timestamp;
  921. __le16 beacon_period;
  922. __le16 cap_info_bitmap;
  923. } __packed;
  924. #define MWIFIEX_USER_SCAN_CHAN_MAX 50
  925. #define MWIFIEX_MAX_SSID_LIST_LENGTH 10
  926. struct mwifiex_scan_cmd_config {
  927. /*
  928. * BSS mode to be sent in the firmware command
  929. */
  930. u8 bss_mode;
  931. /* Specific BSSID used to filter scan results in the firmware */
  932. u8 specific_bssid[ETH_ALEN];
  933. /* Length of TLVs sent in command starting at tlvBuffer */
  934. u32 tlv_buf_len;
  935. /*
  936. * SSID TLV(s) and ChanList TLVs to be sent in the firmware command
  937. *
  938. * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
  939. * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
  940. */
  941. u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
  942. here */
  943. } __packed;
  944. struct mwifiex_user_scan_chan {
  945. u8 chan_number;
  946. u8 radio_type;
  947. u8 scan_type;
  948. u8 reserved;
  949. u32 scan_time;
  950. } __packed;
  951. struct mwifiex_user_scan_cfg {
  952. /*
  953. * BSS mode to be sent in the firmware command
  954. */
  955. u8 bss_mode;
  956. /* Configure the number of probe requests for active chan scans */
  957. u8 num_probes;
  958. u8 reserved;
  959. /* BSSID filter sent in the firmware command to limit the results */
  960. u8 specific_bssid[ETH_ALEN];
  961. /* SSID filter list used in the firmware to limit the scan results */
  962. struct cfg80211_ssid *ssid_list;
  963. u8 num_ssids;
  964. /* Variable number (fixed maximum) of channels to scan up */
  965. struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
  966. } __packed;
  967. struct ie_body {
  968. u8 grp_key_oui[4];
  969. u8 ptk_cnt[2];
  970. u8 ptk_body[4];
  971. } __packed;
  972. struct host_cmd_ds_802_11_scan {
  973. u8 bss_mode;
  974. u8 bssid[ETH_ALEN];
  975. u8 tlv_buffer[1];
  976. } __packed;
  977. struct host_cmd_ds_802_11_scan_rsp {
  978. __le16 bss_descript_size;
  979. u8 number_of_sets;
  980. u8 bss_desc_and_tlv_buffer[1];
  981. } __packed;
  982. struct host_cmd_ds_802_11_bg_scan_query {
  983. u8 flush;
  984. } __packed;
  985. struct host_cmd_ds_802_11_bg_scan_query_rsp {
  986. u32 report_condition;
  987. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  988. } __packed;
  989. struct mwifiex_ietypes_domain_param_set {
  990. struct mwifiex_ie_types_header header;
  991. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  992. struct ieee80211_country_ie_triplet triplet[1];
  993. } __packed;
  994. struct host_cmd_ds_802_11d_domain_info {
  995. __le16 action;
  996. struct mwifiex_ietypes_domain_param_set domain;
  997. } __packed;
  998. struct host_cmd_ds_802_11d_domain_info_rsp {
  999. __le16 action;
  1000. struct mwifiex_ietypes_domain_param_set domain;
  1001. } __packed;
  1002. struct host_cmd_ds_11n_addba_req {
  1003. u8 add_req_result;
  1004. u8 peer_mac_addr[ETH_ALEN];
  1005. u8 dialog_token;
  1006. __le16 block_ack_param_set;
  1007. __le16 block_ack_tmo;
  1008. __le16 ssn;
  1009. } __packed;
  1010. struct host_cmd_ds_11n_addba_rsp {
  1011. u8 add_rsp_result;
  1012. u8 peer_mac_addr[ETH_ALEN];
  1013. u8 dialog_token;
  1014. __le16 status_code;
  1015. __le16 block_ack_param_set;
  1016. __le16 block_ack_tmo;
  1017. __le16 ssn;
  1018. } __packed;
  1019. struct host_cmd_ds_11n_delba {
  1020. u8 del_result;
  1021. u8 peer_mac_addr[ETH_ALEN];
  1022. __le16 del_ba_param_set;
  1023. __le16 reason_code;
  1024. u8 reserved;
  1025. } __packed;
  1026. struct host_cmd_ds_11n_batimeout {
  1027. u8 tid;
  1028. u8 peer_mac_addr[ETH_ALEN];
  1029. u8 origninator;
  1030. } __packed;
  1031. struct host_cmd_ds_11n_cfg {
  1032. __le16 action;
  1033. __le16 ht_tx_cap;
  1034. __le16 ht_tx_info;
  1035. __le16 misc_config; /* Needed for 802.11AC cards only */
  1036. } __packed;
  1037. struct host_cmd_ds_txbuf_cfg {
  1038. __le16 action;
  1039. __le16 buff_size;
  1040. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  1041. __le16 reserved3;
  1042. } __packed;
  1043. struct host_cmd_ds_amsdu_aggr_ctrl {
  1044. __le16 action;
  1045. __le16 enable;
  1046. __le16 curr_buf_size;
  1047. } __packed;
  1048. struct mwifiex_ie_types_wmm_param_set {
  1049. struct mwifiex_ie_types_header header;
  1050. u8 wmm_ie[1];
  1051. };
  1052. struct mwifiex_ie_types_wmm_queue_status {
  1053. struct mwifiex_ie_types_header header;
  1054. u8 queue_index;
  1055. u8 disabled;
  1056. u16 medium_time;
  1057. u8 flow_required;
  1058. u8 flow_created;
  1059. u32 reserved;
  1060. };
  1061. struct ieee_types_vendor_header {
  1062. u8 element_id;
  1063. u8 len;
  1064. u8 oui[4]; /* 0~2: oui, 3: oui_type */
  1065. u8 oui_subtype;
  1066. u8 version;
  1067. } __packed;
  1068. struct ieee_types_wmm_parameter {
  1069. /*
  1070. * WMM Parameter IE - Vendor Specific Header:
  1071. * element_id [221/0xdd]
  1072. * Len [24]
  1073. * Oui [00:50:f2]
  1074. * OuiType [2]
  1075. * OuiSubType [1]
  1076. * Version [1]
  1077. */
  1078. struct ieee_types_vendor_header vend_hdr;
  1079. u8 qos_info_bitmap;
  1080. u8 reserved;
  1081. struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
  1082. } __packed;
  1083. struct ieee_types_wmm_info {
  1084. /*
  1085. * WMM Info IE - Vendor Specific Header:
  1086. * element_id [221/0xdd]
  1087. * Len [7]
  1088. * Oui [00:50:f2]
  1089. * OuiType [2]
  1090. * OuiSubType [0]
  1091. * Version [1]
  1092. */
  1093. struct ieee_types_vendor_header vend_hdr;
  1094. u8 qos_info_bitmap;
  1095. } __packed;
  1096. struct host_cmd_ds_wmm_get_status {
  1097. u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
  1098. IEEE80211_NUM_ACS];
  1099. u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
  1100. } __packed;
  1101. struct mwifiex_wmm_ac_status {
  1102. u8 disabled;
  1103. u8 flow_required;
  1104. u8 flow_created;
  1105. };
  1106. struct mwifiex_ie_types_htcap {
  1107. struct mwifiex_ie_types_header header;
  1108. struct ieee80211_ht_cap ht_cap;
  1109. } __packed;
  1110. struct mwifiex_ie_types_vhtcap {
  1111. struct mwifiex_ie_types_header header;
  1112. struct ieee80211_vht_cap vht_cap;
  1113. } __packed;
  1114. struct mwifiex_ie_types_oper_mode_ntf {
  1115. struct mwifiex_ie_types_header header;
  1116. u8 oper_mode;
  1117. } __packed;
  1118. /* VHT Operations IE */
  1119. struct mwifiex_ie_types_vht_oper {
  1120. struct mwifiex_ie_types_header header;
  1121. u8 chan_width;
  1122. u8 chan_center_freq_1;
  1123. u8 chan_center_freq_2;
  1124. /* Basic MCS set map, each 2 bits stands for a NSS */
  1125. u16 basic_mcs_map;
  1126. } __packed;
  1127. struct mwifiex_ie_types_wmmcap {
  1128. struct mwifiex_ie_types_header header;
  1129. struct mwifiex_types_wmm_info wmm_info;
  1130. } __packed;
  1131. struct mwifiex_ie_types_htinfo {
  1132. struct mwifiex_ie_types_header header;
  1133. struct ieee80211_ht_operation ht_oper;
  1134. } __packed;
  1135. struct mwifiex_ie_types_2040bssco {
  1136. struct mwifiex_ie_types_header header;
  1137. u8 bss_co_2040;
  1138. } __packed;
  1139. struct mwifiex_ie_types_extcap {
  1140. struct mwifiex_ie_types_header header;
  1141. u8 ext_cap;
  1142. } __packed;
  1143. struct host_cmd_ds_mac_reg_access {
  1144. __le16 action;
  1145. __le16 offset;
  1146. __le32 value;
  1147. } __packed;
  1148. struct host_cmd_ds_bbp_reg_access {
  1149. __le16 action;
  1150. __le16 offset;
  1151. u8 value;
  1152. u8 reserved[3];
  1153. } __packed;
  1154. struct host_cmd_ds_rf_reg_access {
  1155. __le16 action;
  1156. __le16 offset;
  1157. u8 value;
  1158. u8 reserved[3];
  1159. } __packed;
  1160. struct host_cmd_ds_pmic_reg_access {
  1161. __le16 action;
  1162. __le16 offset;
  1163. u8 value;
  1164. u8 reserved[3];
  1165. } __packed;
  1166. struct host_cmd_ds_802_11_eeprom_access {
  1167. __le16 action;
  1168. __le16 offset;
  1169. __le16 byte_count;
  1170. u8 value;
  1171. } __packed;
  1172. struct host_cmd_tlv {
  1173. __le16 type;
  1174. __le16 len;
  1175. } __packed;
  1176. struct mwifiex_assoc_event {
  1177. u8 sta_addr[ETH_ALEN];
  1178. __le16 type;
  1179. __le16 len;
  1180. __le16 frame_control;
  1181. __le16 cap_info;
  1182. __le16 listen_interval;
  1183. u8 data[0];
  1184. } __packed;
  1185. struct host_cmd_ds_sys_config {
  1186. __le16 action;
  1187. u8 tlv[0];
  1188. };
  1189. struct host_cmd_tlv_akmp {
  1190. struct host_cmd_tlv tlv;
  1191. __le16 key_mgmt;
  1192. __le16 key_mgmt_operation;
  1193. } __packed;
  1194. struct host_cmd_tlv_pwk_cipher {
  1195. struct host_cmd_tlv tlv;
  1196. __le16 proto;
  1197. u8 cipher;
  1198. u8 reserved;
  1199. } __packed;
  1200. struct host_cmd_tlv_gwk_cipher {
  1201. struct host_cmd_tlv tlv;
  1202. u8 cipher;
  1203. u8 reserved;
  1204. } __packed;
  1205. struct host_cmd_tlv_passphrase {
  1206. struct host_cmd_tlv tlv;
  1207. u8 passphrase[0];
  1208. } __packed;
  1209. struct host_cmd_tlv_wep_key {
  1210. struct host_cmd_tlv tlv;
  1211. u8 key_index;
  1212. u8 is_default;
  1213. u8 key[1];
  1214. };
  1215. struct host_cmd_tlv_auth_type {
  1216. struct host_cmd_tlv tlv;
  1217. u8 auth_type;
  1218. } __packed;
  1219. struct host_cmd_tlv_encrypt_protocol {
  1220. struct host_cmd_tlv tlv;
  1221. __le16 proto;
  1222. } __packed;
  1223. struct host_cmd_tlv_ssid {
  1224. struct host_cmd_tlv tlv;
  1225. u8 ssid[0];
  1226. } __packed;
  1227. struct host_cmd_tlv_rates {
  1228. struct host_cmd_tlv tlv;
  1229. u8 rates[0];
  1230. } __packed;
  1231. struct host_cmd_tlv_bcast_ssid {
  1232. struct host_cmd_tlv tlv;
  1233. u8 bcast_ctl;
  1234. } __packed;
  1235. struct host_cmd_tlv_beacon_period {
  1236. struct host_cmd_tlv tlv;
  1237. __le16 period;
  1238. } __packed;
  1239. struct host_cmd_tlv_dtim_period {
  1240. struct host_cmd_tlv tlv;
  1241. u8 period;
  1242. } __packed;
  1243. struct host_cmd_tlv_frag_threshold {
  1244. struct host_cmd_tlv tlv;
  1245. __le16 frag_thr;
  1246. } __packed;
  1247. struct host_cmd_tlv_rts_threshold {
  1248. struct host_cmd_tlv tlv;
  1249. __le16 rts_thr;
  1250. } __packed;
  1251. struct host_cmd_tlv_retry_limit {
  1252. struct host_cmd_tlv tlv;
  1253. u8 limit;
  1254. } __packed;
  1255. struct host_cmd_tlv_mac_addr {
  1256. struct host_cmd_tlv tlv;
  1257. u8 mac_addr[ETH_ALEN];
  1258. } __packed;
  1259. struct host_cmd_tlv_channel_band {
  1260. struct host_cmd_tlv tlv;
  1261. u8 band_config;
  1262. u8 channel;
  1263. } __packed;
  1264. struct host_cmd_tlv_ageout_timer {
  1265. struct host_cmd_tlv tlv;
  1266. __le32 sta_ao_timer;
  1267. } __packed;
  1268. struct host_cmd_ds_version_ext {
  1269. u8 version_str_sel;
  1270. char version_str[128];
  1271. } __packed;
  1272. struct host_cmd_ds_mgmt_frame_reg {
  1273. __le16 action;
  1274. __le32 mask;
  1275. } __packed;
  1276. struct host_cmd_ds_p2p_mode_cfg {
  1277. __le16 action;
  1278. __le16 mode;
  1279. } __packed;
  1280. struct host_cmd_ds_remain_on_chan {
  1281. __le16 action;
  1282. u8 status;
  1283. u8 reserved;
  1284. u8 band_cfg;
  1285. u8 channel;
  1286. __le32 duration;
  1287. } __packed;
  1288. struct host_cmd_ds_802_11_ibss_status {
  1289. __le16 action;
  1290. __le16 enable;
  1291. u8 bssid[ETH_ALEN];
  1292. __le16 beacon_interval;
  1293. __le16 atim_window;
  1294. __le16 use_g_rate_protect;
  1295. } __packed;
  1296. struct mwifiex_fw_mef_entry {
  1297. u8 mode;
  1298. u8 action;
  1299. __le16 exprsize;
  1300. u8 expr[0];
  1301. } __packed;
  1302. struct host_cmd_ds_mef_cfg {
  1303. __le32 criteria;
  1304. __le16 num_entries;
  1305. struct mwifiex_fw_mef_entry mef_entry[0];
  1306. } __packed;
  1307. #define CONNECTION_TYPE_INFRA 0
  1308. #define CONNECTION_TYPE_ADHOC 1
  1309. #define CONNECTION_TYPE_AP 2
  1310. struct host_cmd_ds_set_bss_mode {
  1311. u8 con_type;
  1312. } __packed;
  1313. struct host_cmd_ds_pcie_details {
  1314. /* TX buffer descriptor ring address */
  1315. u32 txbd_addr_lo;
  1316. u32 txbd_addr_hi;
  1317. /* TX buffer descriptor ring count */
  1318. u32 txbd_count;
  1319. /* RX buffer descriptor ring address */
  1320. u32 rxbd_addr_lo;
  1321. u32 rxbd_addr_hi;
  1322. /* RX buffer descriptor ring count */
  1323. u32 rxbd_count;
  1324. /* Event buffer descriptor ring address */
  1325. u32 evtbd_addr_lo;
  1326. u32 evtbd_addr_hi;
  1327. /* Event buffer descriptor ring count */
  1328. u32 evtbd_count;
  1329. /* Sleep cookie buffer physical address */
  1330. u32 sleep_cookie_addr_lo;
  1331. u32 sleep_cookie_addr_hi;
  1332. } __packed;
  1333. struct mwifiex_ie_types_rssi_threshold {
  1334. struct mwifiex_ie_types_header header;
  1335. u8 abs_value;
  1336. u8 evt_freq;
  1337. } __packed;
  1338. struct host_cmd_ds_802_11_subsc_evt {
  1339. __le16 action;
  1340. __le16 events;
  1341. } __packed;
  1342. struct mwifiex_ie {
  1343. __le16 ie_index;
  1344. __le16 mgmt_subtype_mask;
  1345. __le16 ie_length;
  1346. u8 ie_buffer[IEEE_MAX_IE_SIZE];
  1347. } __packed;
  1348. #define MAX_MGMT_IE_INDEX 16
  1349. struct mwifiex_ie_list {
  1350. __le16 type;
  1351. __le16 len;
  1352. struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX];
  1353. } __packed;
  1354. struct host_cmd_ds_command {
  1355. __le16 command;
  1356. __le16 size;
  1357. __le16 seq_num;
  1358. __le16 result;
  1359. union {
  1360. struct host_cmd_ds_get_hw_spec hw_spec;
  1361. struct host_cmd_ds_mac_control mac_ctrl;
  1362. struct host_cmd_ds_802_11_mac_address mac_addr;
  1363. struct host_cmd_ds_mac_multicast_adr mc_addr;
  1364. struct host_cmd_ds_802_11_get_log get_log;
  1365. struct host_cmd_ds_802_11_rssi_info rssi_info;
  1366. struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
  1367. struct host_cmd_ds_802_11_snmp_mib smib;
  1368. struct host_cmd_ds_tx_rate_query tx_rate;
  1369. struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
  1370. struct host_cmd_ds_txpwr_cfg txp_cfg;
  1371. struct host_cmd_ds_rf_tx_pwr txp;
  1372. struct host_cmd_ds_rf_ant_mimo ant_mimo;
  1373. struct host_cmd_ds_rf_ant_siso ant_siso;
  1374. struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
  1375. struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
  1376. struct host_cmd_ds_802_11_scan scan;
  1377. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1378. struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
  1379. struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
  1380. struct host_cmd_ds_802_11_associate associate;
  1381. struct host_cmd_ds_802_11_associate_rsp associate_rsp;
  1382. struct host_cmd_ds_802_11_deauthenticate deauth;
  1383. struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  1384. struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
  1385. struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
  1386. struct host_cmd_ds_802_11d_domain_info domain_info;
  1387. struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
  1388. struct host_cmd_ds_11n_addba_req add_ba_req;
  1389. struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
  1390. struct host_cmd_ds_11n_delba del_ba;
  1391. struct host_cmd_ds_txbuf_cfg tx_buf;
  1392. struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
  1393. struct host_cmd_ds_11n_cfg htcfg;
  1394. struct host_cmd_ds_wmm_get_status get_wmm_status;
  1395. struct host_cmd_ds_802_11_key_material key_material;
  1396. struct host_cmd_ds_version_ext verext;
  1397. struct host_cmd_ds_mgmt_frame_reg reg_mask;
  1398. struct host_cmd_ds_remain_on_chan roc_cfg;
  1399. struct host_cmd_ds_p2p_mode_cfg mode_cfg;
  1400. struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
  1401. struct host_cmd_ds_mef_cfg mef_cfg;
  1402. struct host_cmd_ds_mac_reg_access mac_reg;
  1403. struct host_cmd_ds_bbp_reg_access bbp_reg;
  1404. struct host_cmd_ds_rf_reg_access rf_reg;
  1405. struct host_cmd_ds_pmic_reg_access pmic_reg;
  1406. struct host_cmd_ds_set_bss_mode bss_mode;
  1407. struct host_cmd_ds_pcie_details pcie_host_spec;
  1408. struct host_cmd_ds_802_11_eeprom_access eeprom;
  1409. struct host_cmd_ds_802_11_subsc_evt subsc_evt;
  1410. struct host_cmd_ds_sys_config uap_sys_config;
  1411. } params;
  1412. } __packed;
  1413. struct mwifiex_opt_sleep_confirm {
  1414. __le16 command;
  1415. __le16 size;
  1416. __le16 seq_num;
  1417. __le16 result;
  1418. __le16 action;
  1419. __le16 resp_ctrl;
  1420. } __packed;
  1421. #endif /* !_MWIFIEX_FW_H_ */