fw.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227
  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. #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11))
  46. #define IS_SUPPORT_MULTI_BANDS(adapter) \
  47. (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
  48. #define GET_FW_DEFAULT_BANDS(adapter) \
  49. ((adapter->fw_cap_info >> 8) & ALL_802_11_BANDS)
  50. #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
  51. #define KEY_INFO_ENABLED 0x01
  52. enum KEY_TYPE_ID {
  53. KEY_TYPE_ID_WEP = 0,
  54. KEY_TYPE_ID_TKIP,
  55. KEY_TYPE_ID_AES,
  56. KEY_TYPE_ID_WAPI,
  57. };
  58. #define KEY_MCAST BIT(0)
  59. #define KEY_UNICAST BIT(1)
  60. #define KEY_ENABLED BIT(2)
  61. #define WAPI_KEY_LEN 50
  62. #define MAX_POLL_TRIES 100
  63. #define MAX_MULTI_INTERFACE_POLL_TRIES 1000
  64. #define MAX_FIRMWARE_POLL_TRIES 100
  65. #define FIRMWARE_READY_SDIO 0xfedc
  66. #define FIRMWARE_READY_PCIE 0xfedcba00
  67. enum MWIFIEX_802_11_PRIVACY_FILTER {
  68. MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
  69. MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
  70. };
  71. #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF)))
  72. #define PROPRIETARY_TLV_BASE_ID 0x0100
  73. #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
  74. #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
  75. #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
  76. #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
  77. #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
  78. #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
  79. #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
  80. #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
  81. #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
  82. #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
  83. #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
  84. #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82)
  85. #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83)
  86. #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84)
  87. #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94)
  88. #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105)
  89. #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113)
  90. #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114)
  91. #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
  92. #define SSN_MASK 0xfff0
  93. #define BA_RESULT_SUCCESS 0x0
  94. #define BA_RESULT_TIMEOUT 0x2
  95. #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status)
  96. #define BA_STREAM_NOT_ALLOWED 0xff
  97. #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
  98. priv->adapter->config_bands & BAND_AN) && \
  99. priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
  100. #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
  101. BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
  102. #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096
  103. #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192
  104. #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
  105. /* dev_cap bitmap
  106. * BIT
  107. * 0-16 reserved
  108. * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40
  109. * 18-22 reserved
  110. * 23 IEEE80211_HT_CAP_SGI_20
  111. * 24 IEEE80211_HT_CAP_SGI_40
  112. * 25 IEEE80211_HT_CAP_TX_STBC
  113. * 26 IEEE80211_HT_CAP_RX_STBC
  114. * 27-28 reserved
  115. * 29 IEEE80211_HT_CAP_GRN_FLD
  116. * 30-31 reserved
  117. */
  118. #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
  119. #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
  120. #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
  121. #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
  122. #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
  123. #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
  124. /* httxcfg bitmap
  125. * 0 reserved
  126. * 1 20/40 Mhz enable(1)/disable(0)
  127. * 2-3 reserved
  128. * 4 green field enable(1)/disable(0)
  129. * 5 short GI in 20 Mhz enable(1)/disable(0)
  130. * 6 short GI in 40 Mhz enable(1)/disable(0)
  131. * 7-15 reserved
  132. */
  133. #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
  134. #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
  135. #define SETHT_MCS32(x) (x[4] |= 1)
  136. #define HT_STREAM_2X2 0x22
  137. #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
  138. #define LLC_SNAP_LEN 8
  139. #define MOD_CLASS_HR_DSSS 0x03
  140. #define MOD_CLASS_OFDM 0x07
  141. #define MOD_CLASS_HT 0x08
  142. #define HT_BW_20 0
  143. #define HT_BW_40 1
  144. #define HostCmd_CMD_GET_HW_SPEC 0x0003
  145. #define HostCmd_CMD_802_11_SCAN 0x0006
  146. #define HostCmd_CMD_802_11_GET_LOG 0x000b
  147. #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
  148. #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
  149. #define HostCmd_CMD_802_11_ASSOCIATE 0x0012
  150. #define HostCmd_CMD_802_11_SNMP_MIB 0x0016
  151. #define HostCmd_CMD_MAC_REG_ACCESS 0x0019
  152. #define HostCmd_CMD_BBP_REG_ACCESS 0x001a
  153. #define HostCmd_CMD_RF_REG_ACCESS 0x001b
  154. #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad
  155. #define HostCmd_CMD_802_11_RF_CHANNEL 0x001d
  156. #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
  157. #define HostCmd_CMD_MAC_CONTROL 0x0028
  158. #define HostCmd_CMD_802_11_AD_HOC_START 0x002b
  159. #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c
  160. #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040
  161. #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D
  162. #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b
  163. #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e
  164. #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c
  165. #define HostCmd_CMD_WMM_GET_STATUS 0x0071
  166. #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
  167. #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f
  168. #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083
  169. #define HostCmd_CMD_VERSION_EXT 0x0097
  170. #define HostCmd_CMD_RSSI_INFO 0x00a4
  171. #define HostCmd_CMD_FUNC_INIT 0x00a9
  172. #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
  173. #define HostCmd_CMD_11N_CFG 0x00cd
  174. #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
  175. #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
  176. #define HostCmd_CMD_11N_DELBA 0x00d0
  177. #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
  178. #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
  179. #define HostCmd_CMD_TXPWR_CFG 0x00d1
  180. #define HostCmd_CMD_TX_RATE_CFG 0x00d6
  181. #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4
  182. #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5
  183. #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
  184. #define HostCmd_CMD_SET_BSS_MODE 0x00f7
  185. #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa
  186. enum ENH_PS_MODES {
  187. EN_PS = 1,
  188. DIS_PS = 2,
  189. EN_AUTO_DS = 3,
  190. DIS_AUTO_DS = 4,
  191. SLEEP_CONFIRM = 5,
  192. GET_PS = 0,
  193. EN_AUTO_PS = 0xff,
  194. DIS_AUTO_PS = 0xfe,
  195. };
  196. #define HostCmd_RET_BIT 0x8000
  197. #define HostCmd_ACT_GEN_GET 0x0000
  198. #define HostCmd_ACT_GEN_SET 0x0001
  199. #define HostCmd_ACT_BITWISE_SET 0x0002
  200. #define HostCmd_ACT_BITWISE_CLR 0x0003
  201. #define HostCmd_RESULT_OK 0x0000
  202. #define HostCmd_ACT_MAC_RX_ON 0x0001
  203. #define HostCmd_ACT_MAC_TX_ON 0x0002
  204. #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
  205. #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
  206. #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
  207. #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
  208. #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
  209. #define HostCmd_BSS_MODE_IBSS 0x0002
  210. #define HostCmd_BSS_MODE_ANY 0x0003
  211. #define HostCmd_SCAN_RADIO_TYPE_BG 0
  212. #define HostCmd_SCAN_RADIO_TYPE_A 1
  213. #define HOST_SLEEP_CFG_CANCEL 0xffffffff
  214. #define HOST_SLEEP_CFG_COND_DEF 0x0000000f
  215. #define HOST_SLEEP_CFG_GPIO_DEF 0xff
  216. #define HOST_SLEEP_CFG_GAP_DEF 0
  217. #define CMD_F_HOSTCMD (1 << 0)
  218. #define CMD_F_CANCELED (1 << 1)
  219. #define HostCmd_CMD_ID_MASK 0x0fff
  220. #define HostCmd_SEQ_NUM_MASK 0x00ff
  221. #define HostCmd_BSS_NUM_MASK 0x0f00
  222. #define HostCmd_BSS_TYPE_MASK 0xf000
  223. #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
  224. (((seq) & 0x00ff) | \
  225. (((num) & 0x000f) << 8)) | \
  226. (((type) & 0x000f) << 12); }
  227. #define HostCmd_GET_SEQ_NO(seq) \
  228. ((seq) & HostCmd_SEQ_NUM_MASK)
  229. #define HostCmd_GET_BSS_NO(seq) \
  230. (((seq) & HostCmd_BSS_NUM_MASK) >> 8)
  231. #define HostCmd_GET_BSS_TYPE(seq) \
  232. (((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
  233. #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
  234. #define EVENT_LINK_LOST 0x00000003
  235. #define EVENT_LINK_SENSED 0x00000004
  236. #define EVENT_MIB_CHANGED 0x00000006
  237. #define EVENT_INIT_DONE 0x00000007
  238. #define EVENT_DEAUTHENTICATED 0x00000008
  239. #define EVENT_DISASSOCIATED 0x00000009
  240. #define EVENT_PS_AWAKE 0x0000000a
  241. #define EVENT_PS_SLEEP 0x0000000b
  242. #define EVENT_MIC_ERR_MULTICAST 0x0000000d
  243. #define EVENT_MIC_ERR_UNICAST 0x0000000e
  244. #define EVENT_DEEP_SLEEP_AWAKE 0x00000010
  245. #define EVENT_ADHOC_BCN_LOST 0x00000011
  246. #define EVENT_WMM_STATUS_CHANGE 0x00000017
  247. #define EVENT_BG_SCAN_REPORT 0x00000018
  248. #define EVENT_RSSI_LOW 0x00000019
  249. #define EVENT_SNR_LOW 0x0000001a
  250. #define EVENT_MAX_FAIL 0x0000001b
  251. #define EVENT_RSSI_HIGH 0x0000001c
  252. #define EVENT_SNR_HIGH 0x0000001d
  253. #define EVENT_IBSS_COALESCED 0x0000001e
  254. #define EVENT_DATA_RSSI_LOW 0x00000024
  255. #define EVENT_DATA_SNR_LOW 0x00000025
  256. #define EVENT_DATA_RSSI_HIGH 0x00000026
  257. #define EVENT_DATA_SNR_HIGH 0x00000027
  258. #define EVENT_LINK_QUALITY 0x00000028
  259. #define EVENT_PORT_RELEASE 0x0000002b
  260. #define EVENT_PRE_BEACON_LOST 0x00000031
  261. #define EVENT_ADDBA 0x00000033
  262. #define EVENT_DELBA 0x00000034
  263. #define EVENT_BA_STREAM_TIEMOUT 0x00000037
  264. #define EVENT_AMSDU_AGGR_CTRL 0x00000042
  265. #define EVENT_WEP_ICV_ERR 0x00000046
  266. #define EVENT_HS_ACT_REQ 0x00000047
  267. #define EVENT_BW_CHANGE 0x00000048
  268. #define EVENT_HOSTWAKE_STAIE 0x0000004d
  269. #define EVENT_ID_MASK 0xffff
  270. #define BSS_NUM_MASK 0xf
  271. #define EVENT_GET_BSS_NUM(event_cause) \
  272. (((event_cause) >> 16) & BSS_NUM_MASK)
  273. #define EVENT_GET_BSS_TYPE(event_cause) \
  274. (((event_cause) >> 24) & 0x00ff)
  275. struct mwifiex_ie_types_header {
  276. __le16 type;
  277. __le16 len;
  278. } __packed;
  279. struct mwifiex_ie_types_data {
  280. struct mwifiex_ie_types_header header;
  281. u8 data[1];
  282. } __packed;
  283. #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
  284. #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
  285. struct txpd {
  286. u8 bss_type;
  287. u8 bss_num;
  288. __le16 tx_pkt_length;
  289. __le16 tx_pkt_offset;
  290. __le16 tx_pkt_type;
  291. __le32 tx_control;
  292. u8 priority;
  293. u8 flags;
  294. u8 pkt_delay_2ms;
  295. u8 reserved1;
  296. } __packed;
  297. struct rxpd {
  298. u8 bss_type;
  299. u8 bss_num;
  300. u16 rx_pkt_length;
  301. u16 rx_pkt_offset;
  302. u16 rx_pkt_type;
  303. u16 seq_num;
  304. u8 priority;
  305. u8 rx_rate;
  306. s8 snr;
  307. s8 nf;
  308. /* Ht Info [Bit 0] RxRate format: LG=0, HT=1
  309. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  310. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */
  311. u8 ht_info;
  312. u8 reserved;
  313. } __packed;
  314. enum mwifiex_chan_scan_mode_bitmasks {
  315. MWIFIEX_PASSIVE_SCAN = BIT(0),
  316. MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
  317. };
  318. struct mwifiex_chan_scan_param_set {
  319. u8 radio_type;
  320. u8 chan_number;
  321. u8 chan_scan_mode_bitmap;
  322. __le16 min_scan_time;
  323. __le16 max_scan_time;
  324. } __packed;
  325. struct mwifiex_ie_types_chan_list_param_set {
  326. struct mwifiex_ie_types_header header;
  327. struct mwifiex_chan_scan_param_set chan_scan_param[1];
  328. } __packed;
  329. struct chan_band_param_set {
  330. u8 radio_type;
  331. u8 chan_number;
  332. };
  333. struct mwifiex_ie_types_chan_band_list_param_set {
  334. struct mwifiex_ie_types_header header;
  335. struct chan_band_param_set chan_band_param[1];
  336. } __packed;
  337. struct mwifiex_ie_types_rates_param_set {
  338. struct mwifiex_ie_types_header header;
  339. u8 rates[1];
  340. } __packed;
  341. struct mwifiex_ie_types_ssid_param_set {
  342. struct mwifiex_ie_types_header header;
  343. u8 ssid[1];
  344. } __packed;
  345. struct mwifiex_ie_types_num_probes {
  346. struct mwifiex_ie_types_header header;
  347. __le16 num_probes;
  348. } __packed;
  349. struct mwifiex_ie_types_wildcard_ssid_params {
  350. struct mwifiex_ie_types_header header;
  351. u8 max_ssid_length;
  352. u8 ssid[1];
  353. } __packed;
  354. #define TSF_DATA_SIZE 8
  355. struct mwifiex_ie_types_tsf_timestamp {
  356. struct mwifiex_ie_types_header header;
  357. u8 tsf_data[1];
  358. } __packed;
  359. struct mwifiex_cf_param_set {
  360. u8 cfp_cnt;
  361. u8 cfp_period;
  362. u16 cfp_max_duration;
  363. u16 cfp_duration_remaining;
  364. } __packed;
  365. struct mwifiex_ibss_param_set {
  366. u16 atim_window;
  367. } __packed;
  368. struct mwifiex_ie_types_ss_param_set {
  369. struct mwifiex_ie_types_header header;
  370. union {
  371. struct mwifiex_cf_param_set cf_param_set[1];
  372. struct mwifiex_ibss_param_set ibss_param_set[1];
  373. } cf_ibss;
  374. } __packed;
  375. struct mwifiex_fh_param_set {
  376. u16 dwell_time;
  377. u8 hop_set;
  378. u8 hop_pattern;
  379. u8 hop_index;
  380. } __packed;
  381. struct mwifiex_ds_param_set {
  382. u8 current_chan;
  383. } __packed;
  384. struct mwifiex_ie_types_phy_param_set {
  385. struct mwifiex_ie_types_header header;
  386. union {
  387. struct mwifiex_fh_param_set fh_param_set[1];
  388. struct mwifiex_ds_param_set ds_param_set[1];
  389. } fh_ds;
  390. } __packed;
  391. struct mwifiex_ie_types_auth_type {
  392. struct mwifiex_ie_types_header header;
  393. __le16 auth_type;
  394. } __packed;
  395. struct mwifiex_ie_types_vendor_param_set {
  396. struct mwifiex_ie_types_header header;
  397. u8 ie[MWIFIEX_MAX_VSIE_LEN];
  398. };
  399. struct mwifiex_ie_types_rsn_param_set {
  400. struct mwifiex_ie_types_header header;
  401. u8 rsn_ie[1];
  402. } __packed;
  403. #define KEYPARAMSET_FIXED_LEN 6
  404. struct mwifiex_ie_type_key_param_set {
  405. __le16 type;
  406. __le16 length;
  407. __le16 key_type_id;
  408. __le16 key_info;
  409. __le16 key_len;
  410. u8 key[50];
  411. } __packed;
  412. struct host_cmd_ds_802_11_key_material {
  413. __le16 action;
  414. struct mwifiex_ie_type_key_param_set key_param_set;
  415. } __packed;
  416. struct host_cmd_ds_gen {
  417. u16 command;
  418. u16 size;
  419. u16 seq_num;
  420. u16 result;
  421. };
  422. #define S_DS_GEN sizeof(struct host_cmd_ds_gen)
  423. enum sleep_resp_ctrl {
  424. RESP_NOT_NEEDED = 0,
  425. RESP_NEEDED,
  426. };
  427. struct mwifiex_ps_param {
  428. __le16 null_pkt_interval;
  429. __le16 multiple_dtims;
  430. __le16 bcn_miss_timeout;
  431. __le16 local_listen_interval;
  432. __le16 adhoc_wake_period;
  433. __le16 mode;
  434. __le16 delay_to_ps;
  435. };
  436. #define BITMAP_AUTO_DS 0x01
  437. #define BITMAP_STA_PS 0x10
  438. struct mwifiex_ie_types_auto_ds_param {
  439. struct mwifiex_ie_types_header header;
  440. __le16 deep_sleep_timeout;
  441. } __packed;
  442. struct mwifiex_ie_types_ps_param {
  443. struct mwifiex_ie_types_header header;
  444. struct mwifiex_ps_param param;
  445. } __packed;
  446. struct host_cmd_ds_802_11_ps_mode_enh {
  447. __le16 action;
  448. union {
  449. struct mwifiex_ps_param opt_ps;
  450. __le16 ps_bitmap;
  451. } params;
  452. } __packed;
  453. struct host_cmd_ds_get_hw_spec {
  454. __le16 hw_if_version;
  455. __le16 version;
  456. __le16 reserved;
  457. __le16 num_of_mcast_adr;
  458. u8 permanent_addr[ETH_ALEN];
  459. __le16 region_code;
  460. __le16 number_of_antenna;
  461. __le32 fw_release_number;
  462. __le32 reserved_1;
  463. __le32 reserved_2;
  464. __le32 reserved_3;
  465. __le32 fw_cap_info;
  466. __le32 dot_11n_dev_cap;
  467. u8 dev_mcs_support;
  468. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  469. __le16 reserved_4;
  470. } __packed;
  471. struct host_cmd_ds_802_11_rssi_info {
  472. __le16 action;
  473. __le16 ndata;
  474. __le16 nbcn;
  475. __le16 reserved[9];
  476. long long reserved_1;
  477. };
  478. struct host_cmd_ds_802_11_rssi_info_rsp {
  479. __le16 action;
  480. __le16 ndata;
  481. __le16 nbcn;
  482. __le16 data_rssi_last;
  483. __le16 data_nf_last;
  484. __le16 data_rssi_avg;
  485. __le16 data_nf_avg;
  486. __le16 bcn_rssi_last;
  487. __le16 bcn_nf_last;
  488. __le16 bcn_rssi_avg;
  489. __le16 bcn_nf_avg;
  490. long long tsf_bcn;
  491. };
  492. struct host_cmd_ds_802_11_mac_address {
  493. __le16 action;
  494. u8 mac_addr[ETH_ALEN];
  495. };
  496. struct host_cmd_ds_mac_control {
  497. __le16 action;
  498. __le16 reserved;
  499. };
  500. struct host_cmd_ds_mac_multicast_adr {
  501. __le16 action;
  502. __le16 num_of_adrs;
  503. u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
  504. } __packed;
  505. struct host_cmd_ds_802_11_deauthenticate {
  506. u8 mac_addr[ETH_ALEN];
  507. __le16 reason_code;
  508. } __packed;
  509. struct host_cmd_ds_802_11_associate {
  510. u8 peer_sta_addr[ETH_ALEN];
  511. __le16 cap_info_bitmap;
  512. __le16 listen_interval;
  513. __le16 beacon_period;
  514. u8 dtim_period;
  515. } __packed;
  516. struct ieee_types_assoc_rsp {
  517. __le16 cap_info_bitmap;
  518. __le16 status_code;
  519. __le16 a_id;
  520. u8 ie_buffer[1];
  521. } __packed;
  522. struct host_cmd_ds_802_11_associate_rsp {
  523. struct ieee_types_assoc_rsp assoc_rsp;
  524. } __packed;
  525. struct ieee_types_cf_param_set {
  526. u8 element_id;
  527. u8 len;
  528. u8 cfp_cnt;
  529. u8 cfp_period;
  530. u16 cfp_max_duration;
  531. u16 cfp_duration_remaining;
  532. } __packed;
  533. struct ieee_types_ibss_param_set {
  534. u8 element_id;
  535. u8 len;
  536. __le16 atim_window;
  537. } __packed;
  538. union ieee_types_ss_param_set {
  539. struct ieee_types_cf_param_set cf_param_set;
  540. struct ieee_types_ibss_param_set ibss_param_set;
  541. } __packed;
  542. struct ieee_types_fh_param_set {
  543. u8 element_id;
  544. u8 len;
  545. __le16 dwell_time;
  546. u8 hop_set;
  547. u8 hop_pattern;
  548. u8 hop_index;
  549. } __packed;
  550. struct ieee_types_ds_param_set {
  551. u8 element_id;
  552. u8 len;
  553. u8 current_chan;
  554. } __packed;
  555. union ieee_types_phy_param_set {
  556. struct ieee_types_fh_param_set fh_param_set;
  557. struct ieee_types_ds_param_set ds_param_set;
  558. } __packed;
  559. struct host_cmd_ds_802_11_ad_hoc_start {
  560. u8 ssid[IEEE80211_MAX_SSID_LEN];
  561. u8 bss_mode;
  562. __le16 beacon_period;
  563. u8 dtim_period;
  564. union ieee_types_ss_param_set ss_param_set;
  565. union ieee_types_phy_param_set phy_param_set;
  566. u16 reserved1;
  567. __le16 cap_info_bitmap;
  568. u8 data_rate[HOSTCMD_SUPPORTED_RATES];
  569. } __packed;
  570. struct host_cmd_ds_802_11_ad_hoc_result {
  571. u8 pad[3];
  572. u8 bssid[ETH_ALEN];
  573. } __packed;
  574. struct adhoc_bss_desc {
  575. u8 bssid[ETH_ALEN];
  576. u8 ssid[IEEE80211_MAX_SSID_LEN];
  577. u8 bss_mode;
  578. __le16 beacon_period;
  579. u8 dtim_period;
  580. u8 time_stamp[8];
  581. u8 local_time[8];
  582. union ieee_types_phy_param_set phy_param_set;
  583. union ieee_types_ss_param_set ss_param_set;
  584. __le16 cap_info_bitmap;
  585. u8 data_rates[HOSTCMD_SUPPORTED_RATES];
  586. /*
  587. * DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
  588. * It is used in the Adhoc join command and will cause a
  589. * binary layout mismatch with the firmware
  590. */
  591. } __packed;
  592. struct host_cmd_ds_802_11_ad_hoc_join {
  593. struct adhoc_bss_desc bss_descriptor;
  594. u16 reserved1;
  595. u16 reserved2;
  596. } __packed;
  597. struct host_cmd_ds_802_11_get_log {
  598. __le32 mcast_tx_frame;
  599. __le32 failed;
  600. __le32 retry;
  601. __le32 multi_retry;
  602. __le32 frame_dup;
  603. __le32 rts_success;
  604. __le32 rts_failure;
  605. __le32 ack_failure;
  606. __le32 rx_frag;
  607. __le32 mcast_rx_frame;
  608. __le32 fcs_error;
  609. __le32 tx_frame;
  610. __le32 reserved;
  611. __le32 wep_icv_err_cnt[4];
  612. };
  613. struct host_cmd_ds_tx_rate_query {
  614. u8 tx_rate;
  615. /* Ht Info [Bit 0] RxRate format: LG=0, HT=1
  616. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  617. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */
  618. u8 ht_info;
  619. } __packed;
  620. enum Host_Sleep_Action {
  621. HS_CONFIGURE = 0x0001,
  622. HS_ACTIVATE = 0x0002,
  623. };
  624. struct mwifiex_hs_config_param {
  625. __le32 conditions;
  626. u8 gpio;
  627. u8 gap;
  628. } __packed;
  629. struct hs_activate_param {
  630. u16 resp_ctrl;
  631. } __packed;
  632. struct host_cmd_ds_802_11_hs_cfg_enh {
  633. __le16 action;
  634. union {
  635. struct mwifiex_hs_config_param hs_config;
  636. struct hs_activate_param hs_activate;
  637. } params;
  638. } __packed;
  639. enum SNMP_MIB_INDEX {
  640. OP_RATE_SET_I = 1,
  641. DTIM_PERIOD_I = 3,
  642. RTS_THRESH_I = 5,
  643. SHORT_RETRY_LIM_I = 6,
  644. LONG_RETRY_LIM_I = 7,
  645. FRAG_THRESH_I = 8,
  646. DOT11D_I = 9,
  647. };
  648. #define MAX_SNMP_BUF_SIZE 128
  649. struct host_cmd_ds_802_11_snmp_mib {
  650. __le16 query_type;
  651. __le16 oid;
  652. __le16 buf_size;
  653. u8 value[1];
  654. } __packed;
  655. struct mwifiex_rate_scope {
  656. __le16 type;
  657. __le16 length;
  658. __le16 hr_dsss_rate_bitmap;
  659. __le16 ofdm_rate_bitmap;
  660. __le16 ht_mcs_rate_bitmap[8];
  661. } __packed;
  662. struct mwifiex_rate_drop_pattern {
  663. __le16 type;
  664. __le16 length;
  665. __le32 rate_drop_mode;
  666. } __packed;
  667. struct host_cmd_ds_tx_rate_cfg {
  668. __le16 action;
  669. __le16 cfg_index;
  670. } __packed;
  671. struct mwifiex_power_group {
  672. u8 modulation_class;
  673. u8 first_rate_code;
  674. u8 last_rate_code;
  675. s8 power_step;
  676. s8 power_min;
  677. s8 power_max;
  678. u8 ht_bandwidth;
  679. u8 reserved;
  680. } __packed;
  681. struct mwifiex_types_power_group {
  682. u16 type;
  683. u16 length;
  684. } __packed;
  685. struct host_cmd_ds_txpwr_cfg {
  686. __le16 action;
  687. __le16 cfg_index;
  688. __le32 mode;
  689. } __packed;
  690. struct mwifiex_bcn_param {
  691. u8 bssid[ETH_ALEN];
  692. u8 rssi;
  693. __le32 timestamp[2];
  694. __le16 beacon_period;
  695. __le16 cap_info_bitmap;
  696. } __packed;
  697. #define MWIFIEX_USER_SCAN_CHAN_MAX 50
  698. #define MWIFIEX_MAX_SSID_LIST_LENGTH 10
  699. struct mwifiex_scan_cmd_config {
  700. /*
  701. * BSS mode to be sent in the firmware command
  702. */
  703. u8 bss_mode;
  704. /* Specific BSSID used to filter scan results in the firmware */
  705. u8 specific_bssid[ETH_ALEN];
  706. /* Length of TLVs sent in command starting at tlvBuffer */
  707. u32 tlv_buf_len;
  708. /*
  709. * SSID TLV(s) and ChanList TLVs to be sent in the firmware command
  710. *
  711. * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
  712. * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
  713. */
  714. u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
  715. here */
  716. } __packed;
  717. struct mwifiex_user_scan_chan {
  718. u8 chan_number;
  719. u8 radio_type;
  720. u8 scan_type;
  721. u8 reserved;
  722. u32 scan_time;
  723. } __packed;
  724. struct mwifiex_user_scan_cfg {
  725. /*
  726. * BSS mode to be sent in the firmware command
  727. */
  728. u8 bss_mode;
  729. /* Configure the number of probe requests for active chan scans */
  730. u8 num_probes;
  731. u8 reserved;
  732. /* BSSID filter sent in the firmware command to limit the results */
  733. u8 specific_bssid[ETH_ALEN];
  734. /* SSID filter list used in the firmware to limit the scan results */
  735. struct cfg80211_ssid *ssid_list;
  736. u8 num_ssids;
  737. /* Variable number (fixed maximum) of channels to scan up */
  738. struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
  739. } __packed;
  740. struct ie_body {
  741. u8 grp_key_oui[4];
  742. u8 ptk_cnt[2];
  743. u8 ptk_body[4];
  744. } __packed;
  745. struct host_cmd_ds_802_11_scan {
  746. u8 bss_mode;
  747. u8 bssid[ETH_ALEN];
  748. u8 tlv_buffer[1];
  749. } __packed;
  750. struct host_cmd_ds_802_11_scan_rsp {
  751. __le16 bss_descript_size;
  752. u8 number_of_sets;
  753. u8 bss_desc_and_tlv_buffer[1];
  754. } __packed;
  755. struct host_cmd_ds_802_11_bg_scan_query {
  756. u8 flush;
  757. } __packed;
  758. struct host_cmd_ds_802_11_bg_scan_query_rsp {
  759. u32 report_condition;
  760. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  761. } __packed;
  762. struct mwifiex_ietypes_domain_param_set {
  763. struct mwifiex_ie_types_header header;
  764. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  765. struct ieee80211_country_ie_triplet triplet[1];
  766. } __packed;
  767. struct host_cmd_ds_802_11d_domain_info {
  768. __le16 action;
  769. struct mwifiex_ietypes_domain_param_set domain;
  770. } __packed;
  771. struct host_cmd_ds_802_11d_domain_info_rsp {
  772. __le16 action;
  773. struct mwifiex_ietypes_domain_param_set domain;
  774. } __packed;
  775. struct host_cmd_ds_11n_addba_req {
  776. u8 add_req_result;
  777. u8 peer_mac_addr[ETH_ALEN];
  778. u8 dialog_token;
  779. __le16 block_ack_param_set;
  780. __le16 block_ack_tmo;
  781. __le16 ssn;
  782. } __packed;
  783. struct host_cmd_ds_11n_addba_rsp {
  784. u8 add_rsp_result;
  785. u8 peer_mac_addr[ETH_ALEN];
  786. u8 dialog_token;
  787. __le16 status_code;
  788. __le16 block_ack_param_set;
  789. __le16 block_ack_tmo;
  790. __le16 ssn;
  791. } __packed;
  792. struct host_cmd_ds_11n_delba {
  793. u8 del_result;
  794. u8 peer_mac_addr[ETH_ALEN];
  795. __le16 del_ba_param_set;
  796. __le16 reason_code;
  797. u8 reserved;
  798. } __packed;
  799. struct host_cmd_ds_11n_batimeout {
  800. u8 tid;
  801. u8 peer_mac_addr[ETH_ALEN];
  802. u8 origninator;
  803. } __packed;
  804. struct host_cmd_ds_11n_cfg {
  805. __le16 action;
  806. __le16 ht_tx_cap;
  807. __le16 ht_tx_info;
  808. } __packed;
  809. struct host_cmd_ds_txbuf_cfg {
  810. __le16 action;
  811. __le16 buff_size;
  812. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  813. __le16 reserved3;
  814. } __packed;
  815. struct host_cmd_ds_amsdu_aggr_ctrl {
  816. __le16 action;
  817. __le16 enable;
  818. __le16 curr_buf_size;
  819. } __packed;
  820. struct mwifiex_ie_types_wmm_param_set {
  821. struct mwifiex_ie_types_header header;
  822. u8 wmm_ie[1];
  823. };
  824. struct mwifiex_ie_types_wmm_queue_status {
  825. struct mwifiex_ie_types_header header;
  826. u8 queue_index;
  827. u8 disabled;
  828. u16 medium_time;
  829. u8 flow_required;
  830. u8 flow_created;
  831. u32 reserved;
  832. };
  833. struct ieee_types_vendor_header {
  834. u8 element_id;
  835. u8 len;
  836. u8 oui[3];
  837. u8 oui_type;
  838. u8 oui_subtype;
  839. u8 version;
  840. } __packed;
  841. struct ieee_types_wmm_ac_parameters {
  842. u8 aci_aifsn_bitmap;
  843. u8 ecw_bitmap;
  844. __le16 tx_op_limit;
  845. } __packed;
  846. struct ieee_types_wmm_parameter {
  847. /*
  848. * WMM Parameter IE - Vendor Specific Header:
  849. * element_id [221/0xdd]
  850. * Len [24]
  851. * Oui [00:50:f2]
  852. * OuiType [2]
  853. * OuiSubType [1]
  854. * Version [1]
  855. */
  856. struct ieee_types_vendor_header vend_hdr;
  857. u8 qos_info_bitmap;
  858. u8 reserved;
  859. struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
  860. } __packed;
  861. struct ieee_types_wmm_info {
  862. /*
  863. * WMM Info IE - Vendor Specific Header:
  864. * element_id [221/0xdd]
  865. * Len [7]
  866. * Oui [00:50:f2]
  867. * OuiType [2]
  868. * OuiSubType [0]
  869. * Version [1]
  870. */
  871. struct ieee_types_vendor_header vend_hdr;
  872. u8 qos_info_bitmap;
  873. } __packed;
  874. struct host_cmd_ds_wmm_get_status {
  875. u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
  876. IEEE80211_NUM_ACS];
  877. u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
  878. } __packed;
  879. struct mwifiex_wmm_ac_status {
  880. u8 disabled;
  881. u8 flow_required;
  882. u8 flow_created;
  883. };
  884. struct mwifiex_ie_types_htcap {
  885. struct mwifiex_ie_types_header header;
  886. struct ieee80211_ht_cap ht_cap;
  887. } __packed;
  888. struct mwifiex_ie_types_htinfo {
  889. struct mwifiex_ie_types_header header;
  890. struct ieee80211_ht_operation ht_oper;
  891. } __packed;
  892. struct mwifiex_ie_types_2040bssco {
  893. struct mwifiex_ie_types_header header;
  894. u8 bss_co_2040;
  895. } __packed;
  896. struct mwifiex_ie_types_extcap {
  897. struct mwifiex_ie_types_header header;
  898. u8 ext_cap;
  899. } __packed;
  900. struct host_cmd_ds_mac_reg_access {
  901. __le16 action;
  902. __le16 offset;
  903. __le32 value;
  904. } __packed;
  905. struct host_cmd_ds_bbp_reg_access {
  906. __le16 action;
  907. __le16 offset;
  908. u8 value;
  909. u8 reserved[3];
  910. } __packed;
  911. struct host_cmd_ds_rf_reg_access {
  912. __le16 action;
  913. __le16 offset;
  914. u8 value;
  915. u8 reserved[3];
  916. } __packed;
  917. struct host_cmd_ds_pmic_reg_access {
  918. __le16 action;
  919. __le16 offset;
  920. u8 value;
  921. u8 reserved[3];
  922. } __packed;
  923. struct host_cmd_ds_802_11_eeprom_access {
  924. __le16 action;
  925. __le16 offset;
  926. __le16 byte_count;
  927. u8 value;
  928. } __packed;
  929. struct host_cmd_ds_802_11_rf_channel {
  930. __le16 action;
  931. __le16 current_channel;
  932. __le16 rf_type;
  933. __le16 reserved;
  934. u8 reserved_1[32];
  935. } __packed;
  936. struct host_cmd_ds_version_ext {
  937. u8 version_str_sel;
  938. char version_str[128];
  939. } __packed;
  940. struct host_cmd_ds_802_11_ibss_status {
  941. __le16 action;
  942. __le16 enable;
  943. u8 bssid[ETH_ALEN];
  944. __le16 beacon_interval;
  945. __le16 atim_window;
  946. __le16 use_g_rate_protect;
  947. } __packed;
  948. #define CONNECTION_TYPE_INFRA 0
  949. #define CONNECTION_TYPE_ADHOC 1
  950. struct host_cmd_ds_set_bss_mode {
  951. u8 con_type;
  952. } __packed;
  953. struct host_cmd_ds_pcie_details {
  954. /* TX buffer descriptor ring address */
  955. u32 txbd_addr_lo;
  956. u32 txbd_addr_hi;
  957. /* TX buffer descriptor ring count */
  958. u32 txbd_count;
  959. /* RX buffer descriptor ring address */
  960. u32 rxbd_addr_lo;
  961. u32 rxbd_addr_hi;
  962. /* RX buffer descriptor ring count */
  963. u32 rxbd_count;
  964. /* Event buffer descriptor ring address */
  965. u32 evtbd_addr_lo;
  966. u32 evtbd_addr_hi;
  967. /* Event buffer descriptor ring count */
  968. u32 evtbd_count;
  969. /* Sleep cookie buffer physical address */
  970. u32 sleep_cookie_addr_lo;
  971. u32 sleep_cookie_addr_hi;
  972. } __packed;
  973. struct mwifiex_ie_types_rssi_threshold {
  974. struct mwifiex_ie_types_header header;
  975. u8 abs_value;
  976. u8 evt_freq;
  977. } __packed;
  978. struct host_cmd_ds_802_11_subsc_evt {
  979. __le16 action;
  980. __le16 events;
  981. } __packed;
  982. struct host_cmd_ds_command {
  983. __le16 command;
  984. __le16 size;
  985. __le16 seq_num;
  986. __le16 result;
  987. union {
  988. struct host_cmd_ds_get_hw_spec hw_spec;
  989. struct host_cmd_ds_mac_control mac_ctrl;
  990. struct host_cmd_ds_802_11_mac_address mac_addr;
  991. struct host_cmd_ds_mac_multicast_adr mc_addr;
  992. struct host_cmd_ds_802_11_get_log get_log;
  993. struct host_cmd_ds_802_11_rssi_info rssi_info;
  994. struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
  995. struct host_cmd_ds_802_11_snmp_mib smib;
  996. struct host_cmd_ds_802_11_rf_channel rf_channel;
  997. struct host_cmd_ds_tx_rate_query tx_rate;
  998. struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
  999. struct host_cmd_ds_txpwr_cfg txp_cfg;
  1000. struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
  1001. struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
  1002. struct host_cmd_ds_802_11_scan scan;
  1003. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1004. struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
  1005. struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
  1006. struct host_cmd_ds_802_11_associate associate;
  1007. struct host_cmd_ds_802_11_associate_rsp associate_rsp;
  1008. struct host_cmd_ds_802_11_deauthenticate deauth;
  1009. struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  1010. struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
  1011. struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
  1012. struct host_cmd_ds_802_11d_domain_info domain_info;
  1013. struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
  1014. struct host_cmd_ds_11n_addba_req add_ba_req;
  1015. struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
  1016. struct host_cmd_ds_11n_delba del_ba;
  1017. struct host_cmd_ds_txbuf_cfg tx_buf;
  1018. struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
  1019. struct host_cmd_ds_11n_cfg htcfg;
  1020. struct host_cmd_ds_wmm_get_status get_wmm_status;
  1021. struct host_cmd_ds_802_11_key_material key_material;
  1022. struct host_cmd_ds_version_ext verext;
  1023. struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
  1024. struct host_cmd_ds_mac_reg_access mac_reg;
  1025. struct host_cmd_ds_bbp_reg_access bbp_reg;
  1026. struct host_cmd_ds_rf_reg_access rf_reg;
  1027. struct host_cmd_ds_pmic_reg_access pmic_reg;
  1028. struct host_cmd_ds_set_bss_mode bss_mode;
  1029. struct host_cmd_ds_pcie_details pcie_host_spec;
  1030. struct host_cmd_ds_802_11_eeprom_access eeprom;
  1031. struct host_cmd_ds_802_11_subsc_evt subsc_evt;
  1032. } params;
  1033. } __packed;
  1034. struct mwifiex_opt_sleep_confirm {
  1035. __le16 command;
  1036. __le16 size;
  1037. __le16 seq_num;
  1038. __le16 result;
  1039. __le16 action;
  1040. __le16 resp_ctrl;
  1041. } __packed;
  1042. #endif /* !_MWIFIEX_FW_H_ */