fw.h 31 KB

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