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