fw.h 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  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_usb_ep {
  68. MWIFIEX_USB_EP_CMD_EVENT = 1,
  69. MWIFIEX_USB_EP_DATA = 2,
  70. };
  71. enum MWIFIEX_802_11_PRIVACY_FILTER {
  72. MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
  73. MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
  74. };
  75. #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF)))
  76. #define PROPRIETARY_TLV_BASE_ID 0x0100
  77. #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
  78. #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
  79. #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
  80. #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
  81. #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
  82. #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
  83. #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
  84. #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
  85. #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
  86. #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
  87. #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
  88. #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82)
  89. #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83)
  90. #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84)
  91. #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94)
  92. #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105)
  93. #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113)
  94. #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114)
  95. #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
  96. #define SSN_MASK 0xfff0
  97. #define BA_RESULT_SUCCESS 0x0
  98. #define BA_RESULT_TIMEOUT 0x2
  99. #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status)
  100. #define BA_STREAM_NOT_ALLOWED 0xff
  101. #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
  102. priv->adapter->config_bands & BAND_AN) && \
  103. priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
  104. #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
  105. BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
  106. #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096
  107. #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192
  108. #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
  109. /* dev_cap bitmap
  110. * BIT
  111. * 0-16 reserved
  112. * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40
  113. * 18-22 reserved
  114. * 23 IEEE80211_HT_CAP_SGI_20
  115. * 24 IEEE80211_HT_CAP_SGI_40
  116. * 25 IEEE80211_HT_CAP_TX_STBC
  117. * 26 IEEE80211_HT_CAP_RX_STBC
  118. * 27-28 reserved
  119. * 29 IEEE80211_HT_CAP_GRN_FLD
  120. * 30-31 reserved
  121. */
  122. #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
  123. #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
  124. #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
  125. #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
  126. #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
  127. #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
  128. /* httxcfg bitmap
  129. * 0 reserved
  130. * 1 20/40 Mhz enable(1)/disable(0)
  131. * 2-3 reserved
  132. * 4 green field enable(1)/disable(0)
  133. * 5 short GI in 20 Mhz enable(1)/disable(0)
  134. * 6 short GI in 40 Mhz enable(1)/disable(0)
  135. * 7-15 reserved
  136. */
  137. #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
  138. #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
  139. #define SETHT_MCS32(x) (x[4] |= 1)
  140. #define HT_STREAM_2X2 0x22
  141. #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
  142. #define LLC_SNAP_LEN 8
  143. #define MOD_CLASS_HR_DSSS 0x03
  144. #define MOD_CLASS_OFDM 0x07
  145. #define MOD_CLASS_HT 0x08
  146. #define HT_BW_20 0
  147. #define HT_BW_40 1
  148. #define HostCmd_CMD_GET_HW_SPEC 0x0003
  149. #define HostCmd_CMD_802_11_SCAN 0x0006
  150. #define HostCmd_CMD_802_11_GET_LOG 0x000b
  151. #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
  152. #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
  153. #define HostCmd_CMD_802_11_ASSOCIATE 0x0012
  154. #define HostCmd_CMD_802_11_SNMP_MIB 0x0016
  155. #define HostCmd_CMD_MAC_REG_ACCESS 0x0019
  156. #define HostCmd_CMD_BBP_REG_ACCESS 0x001a
  157. #define HostCmd_CMD_RF_REG_ACCESS 0x001b
  158. #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad
  159. #define HostCmd_CMD_802_11_RF_CHANNEL 0x001d
  160. #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
  161. #define HostCmd_CMD_MAC_CONTROL 0x0028
  162. #define HostCmd_CMD_802_11_AD_HOC_START 0x002b
  163. #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c
  164. #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040
  165. #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D
  166. #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b
  167. #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e
  168. #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c
  169. #define HostCmd_CMD_WMM_GET_STATUS 0x0071
  170. #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
  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_ACT_BITWISE_SET 0x0002
  204. #define HostCmd_ACT_BITWISE_CLR 0x0003
  205. #define HostCmd_RESULT_OK 0x0000
  206. #define HostCmd_ACT_MAC_RX_ON 0x0001
  207. #define HostCmd_ACT_MAC_TX_ON 0x0002
  208. #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
  209. #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
  210. #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
  211. #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
  212. #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
  213. #define HostCmd_BSS_MODE_IBSS 0x0002
  214. #define HostCmd_BSS_MODE_ANY 0x0003
  215. #define HostCmd_SCAN_RADIO_TYPE_BG 0
  216. #define HostCmd_SCAN_RADIO_TYPE_A 1
  217. #define HOST_SLEEP_CFG_CANCEL 0xffffffff
  218. #define HOST_SLEEP_CFG_COND_DEF 0x0000000f
  219. #define HOST_SLEEP_CFG_GPIO_DEF 0xff
  220. #define HOST_SLEEP_CFG_GAP_DEF 0
  221. #define CMD_F_HOSTCMD (1 << 0)
  222. #define CMD_F_CANCELED (1 << 1)
  223. #define HostCmd_CMD_ID_MASK 0x0fff
  224. #define HostCmd_SEQ_NUM_MASK 0x00ff
  225. #define HostCmd_BSS_NUM_MASK 0x0f00
  226. #define HostCmd_BSS_TYPE_MASK 0xf000
  227. #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
  228. (((seq) & 0x00ff) | \
  229. (((num) & 0x000f) << 8)) | \
  230. (((type) & 0x000f) << 12); }
  231. #define HostCmd_GET_SEQ_NO(seq) \
  232. ((seq) & HostCmd_SEQ_NUM_MASK)
  233. #define HostCmd_GET_BSS_NO(seq) \
  234. (((seq) & HostCmd_BSS_NUM_MASK) >> 8)
  235. #define HostCmd_GET_BSS_TYPE(seq) \
  236. (((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
  237. #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
  238. #define EVENT_LINK_LOST 0x00000003
  239. #define EVENT_LINK_SENSED 0x00000004
  240. #define EVENT_MIB_CHANGED 0x00000006
  241. #define EVENT_INIT_DONE 0x00000007
  242. #define EVENT_DEAUTHENTICATED 0x00000008
  243. #define EVENT_DISASSOCIATED 0x00000009
  244. #define EVENT_PS_AWAKE 0x0000000a
  245. #define EVENT_PS_SLEEP 0x0000000b
  246. #define EVENT_MIC_ERR_MULTICAST 0x0000000d
  247. #define EVENT_MIC_ERR_UNICAST 0x0000000e
  248. #define EVENT_DEEP_SLEEP_AWAKE 0x00000010
  249. #define EVENT_ADHOC_BCN_LOST 0x00000011
  250. #define EVENT_WMM_STATUS_CHANGE 0x00000017
  251. #define EVENT_BG_SCAN_REPORT 0x00000018
  252. #define EVENT_RSSI_LOW 0x00000019
  253. #define EVENT_SNR_LOW 0x0000001a
  254. #define EVENT_MAX_FAIL 0x0000001b
  255. #define EVENT_RSSI_HIGH 0x0000001c
  256. #define EVENT_SNR_HIGH 0x0000001d
  257. #define EVENT_IBSS_COALESCED 0x0000001e
  258. #define EVENT_DATA_RSSI_LOW 0x00000024
  259. #define EVENT_DATA_SNR_LOW 0x00000025
  260. #define EVENT_DATA_RSSI_HIGH 0x00000026
  261. #define EVENT_DATA_SNR_HIGH 0x00000027
  262. #define EVENT_LINK_QUALITY 0x00000028
  263. #define EVENT_PORT_RELEASE 0x0000002b
  264. #define EVENT_PRE_BEACON_LOST 0x00000031
  265. #define EVENT_ADDBA 0x00000033
  266. #define EVENT_DELBA 0x00000034
  267. #define EVENT_BA_STREAM_TIEMOUT 0x00000037
  268. #define EVENT_AMSDU_AGGR_CTRL 0x00000042
  269. #define EVENT_WEP_ICV_ERR 0x00000046
  270. #define EVENT_HS_ACT_REQ 0x00000047
  271. #define EVENT_BW_CHANGE 0x00000048
  272. #define EVENT_HOSTWAKE_STAIE 0x0000004d
  273. #define EVENT_ID_MASK 0xffff
  274. #define BSS_NUM_MASK 0xf
  275. #define EVENT_GET_BSS_NUM(event_cause) \
  276. (((event_cause) >> 16) & BSS_NUM_MASK)
  277. #define EVENT_GET_BSS_TYPE(event_cause) \
  278. (((event_cause) >> 24) & 0x00ff)
  279. struct mwifiex_ie_types_header {
  280. __le16 type;
  281. __le16 len;
  282. } __packed;
  283. struct mwifiex_ie_types_data {
  284. struct mwifiex_ie_types_header header;
  285. u8 data[1];
  286. } __packed;
  287. #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
  288. #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
  289. struct txpd {
  290. u8 bss_type;
  291. u8 bss_num;
  292. __le16 tx_pkt_length;
  293. __le16 tx_pkt_offset;
  294. __le16 tx_pkt_type;
  295. __le32 tx_control;
  296. u8 priority;
  297. u8 flags;
  298. u8 pkt_delay_2ms;
  299. u8 reserved1;
  300. } __packed;
  301. struct rxpd {
  302. u8 bss_type;
  303. u8 bss_num;
  304. u16 rx_pkt_length;
  305. u16 rx_pkt_offset;
  306. u16 rx_pkt_type;
  307. u16 seq_num;
  308. u8 priority;
  309. u8 rx_rate;
  310. s8 snr;
  311. s8 nf;
  312. /* Ht Info [Bit 0] RxRate format: LG=0, HT=1
  313. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  314. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */
  315. u8 ht_info;
  316. u8 reserved;
  317. } __packed;
  318. enum mwifiex_chan_scan_mode_bitmasks {
  319. MWIFIEX_PASSIVE_SCAN = BIT(0),
  320. MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
  321. };
  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 data_rate[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. __le64 timestamp;
  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_cfg {
  729. /*
  730. * BSS mode to be sent in the firmware command
  731. */
  732. u8 bss_mode;
  733. /* Configure the number of probe requests for active chan scans */
  734. u8 num_probes;
  735. u8 reserved;
  736. /* BSSID filter sent in the firmware command to limit the results */
  737. u8 specific_bssid[ETH_ALEN];
  738. /* SSID filter list used in the firmware to limit the scan results */
  739. struct cfg80211_ssid *ssid_list;
  740. u8 num_ssids;
  741. /* Variable number (fixed maximum) of channels to scan up */
  742. struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
  743. } __packed;
  744. struct ie_body {
  745. u8 grp_key_oui[4];
  746. u8 ptk_cnt[2];
  747. u8 ptk_body[4];
  748. } __packed;
  749. struct host_cmd_ds_802_11_scan {
  750. u8 bss_mode;
  751. u8 bssid[ETH_ALEN];
  752. u8 tlv_buffer[1];
  753. } __packed;
  754. struct host_cmd_ds_802_11_scan_rsp {
  755. __le16 bss_descript_size;
  756. u8 number_of_sets;
  757. u8 bss_desc_and_tlv_buffer[1];
  758. } __packed;
  759. struct host_cmd_ds_802_11_bg_scan_query {
  760. u8 flush;
  761. } __packed;
  762. struct host_cmd_ds_802_11_bg_scan_query_rsp {
  763. u32 report_condition;
  764. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  765. } __packed;
  766. struct mwifiex_ietypes_domain_param_set {
  767. struct mwifiex_ie_types_header header;
  768. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  769. struct ieee80211_country_ie_triplet triplet[1];
  770. } __packed;
  771. struct host_cmd_ds_802_11d_domain_info {
  772. __le16 action;
  773. struct mwifiex_ietypes_domain_param_set domain;
  774. } __packed;
  775. struct host_cmd_ds_802_11d_domain_info_rsp {
  776. __le16 action;
  777. struct mwifiex_ietypes_domain_param_set domain;
  778. } __packed;
  779. struct host_cmd_ds_11n_addba_req {
  780. u8 add_req_result;
  781. u8 peer_mac_addr[ETH_ALEN];
  782. u8 dialog_token;
  783. __le16 block_ack_param_set;
  784. __le16 block_ack_tmo;
  785. __le16 ssn;
  786. } __packed;
  787. struct host_cmd_ds_11n_addba_rsp {
  788. u8 add_rsp_result;
  789. u8 peer_mac_addr[ETH_ALEN];
  790. u8 dialog_token;
  791. __le16 status_code;
  792. __le16 block_ack_param_set;
  793. __le16 block_ack_tmo;
  794. __le16 ssn;
  795. } __packed;
  796. struct host_cmd_ds_11n_delba {
  797. u8 del_result;
  798. u8 peer_mac_addr[ETH_ALEN];
  799. __le16 del_ba_param_set;
  800. __le16 reason_code;
  801. u8 reserved;
  802. } __packed;
  803. struct host_cmd_ds_11n_batimeout {
  804. u8 tid;
  805. u8 peer_mac_addr[ETH_ALEN];
  806. u8 origninator;
  807. } __packed;
  808. struct host_cmd_ds_11n_cfg {
  809. __le16 action;
  810. __le16 ht_tx_cap;
  811. __le16 ht_tx_info;
  812. } __packed;
  813. struct host_cmd_ds_txbuf_cfg {
  814. __le16 action;
  815. __le16 buff_size;
  816. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  817. __le16 reserved3;
  818. } __packed;
  819. struct host_cmd_ds_amsdu_aggr_ctrl {
  820. __le16 action;
  821. __le16 enable;
  822. __le16 curr_buf_size;
  823. } __packed;
  824. struct mwifiex_ie_types_wmm_param_set {
  825. struct mwifiex_ie_types_header header;
  826. u8 wmm_ie[1];
  827. };
  828. struct mwifiex_ie_types_wmm_queue_status {
  829. struct mwifiex_ie_types_header header;
  830. u8 queue_index;
  831. u8 disabled;
  832. u16 medium_time;
  833. u8 flow_required;
  834. u8 flow_created;
  835. u32 reserved;
  836. };
  837. struct ieee_types_vendor_header {
  838. u8 element_id;
  839. u8 len;
  840. u8 oui[4]; /* 0~2: oui, 3: oui_type */
  841. u8 oui_subtype;
  842. u8 version;
  843. } __packed;
  844. struct ieee_types_wmm_ac_parameters {
  845. u8 aci_aifsn_bitmap;
  846. u8 ecw_bitmap;
  847. __le16 tx_op_limit;
  848. } __packed;
  849. struct ieee_types_wmm_parameter {
  850. /*
  851. * WMM Parameter IE - Vendor Specific Header:
  852. * element_id [221/0xdd]
  853. * Len [24]
  854. * Oui [00:50:f2]
  855. * OuiType [2]
  856. * OuiSubType [1]
  857. * Version [1]
  858. */
  859. struct ieee_types_vendor_header vend_hdr;
  860. u8 qos_info_bitmap;
  861. u8 reserved;
  862. struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
  863. } __packed;
  864. struct ieee_types_wmm_info {
  865. /*
  866. * WMM Info IE - Vendor Specific Header:
  867. * element_id [221/0xdd]
  868. * Len [7]
  869. * Oui [00:50:f2]
  870. * OuiType [2]
  871. * OuiSubType [0]
  872. * Version [1]
  873. */
  874. struct ieee_types_vendor_header vend_hdr;
  875. u8 qos_info_bitmap;
  876. } __packed;
  877. struct host_cmd_ds_wmm_get_status {
  878. u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
  879. IEEE80211_NUM_ACS];
  880. u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
  881. } __packed;
  882. struct mwifiex_wmm_ac_status {
  883. u8 disabled;
  884. u8 flow_required;
  885. u8 flow_created;
  886. };
  887. struct mwifiex_ie_types_htcap {
  888. struct mwifiex_ie_types_header header;
  889. struct ieee80211_ht_cap ht_cap;
  890. } __packed;
  891. struct mwifiex_ie_types_htinfo {
  892. struct mwifiex_ie_types_header header;
  893. struct ieee80211_ht_operation ht_oper;
  894. } __packed;
  895. struct mwifiex_ie_types_2040bssco {
  896. struct mwifiex_ie_types_header header;
  897. u8 bss_co_2040;
  898. } __packed;
  899. struct mwifiex_ie_types_extcap {
  900. struct mwifiex_ie_types_header header;
  901. u8 ext_cap;
  902. } __packed;
  903. struct host_cmd_ds_mac_reg_access {
  904. __le16 action;
  905. __le16 offset;
  906. __le32 value;
  907. } __packed;
  908. struct host_cmd_ds_bbp_reg_access {
  909. __le16 action;
  910. __le16 offset;
  911. u8 value;
  912. u8 reserved[3];
  913. } __packed;
  914. struct host_cmd_ds_rf_reg_access {
  915. __le16 action;
  916. __le16 offset;
  917. u8 value;
  918. u8 reserved[3];
  919. } __packed;
  920. struct host_cmd_ds_pmic_reg_access {
  921. __le16 action;
  922. __le16 offset;
  923. u8 value;
  924. u8 reserved[3];
  925. } __packed;
  926. struct host_cmd_ds_802_11_eeprom_access {
  927. __le16 action;
  928. __le16 offset;
  929. __le16 byte_count;
  930. u8 value;
  931. } __packed;
  932. struct host_cmd_ds_802_11_rf_channel {
  933. __le16 action;
  934. __le16 current_channel;
  935. __le16 rf_type;
  936. __le16 reserved;
  937. u8 reserved_1[32];
  938. } __packed;
  939. struct host_cmd_ds_version_ext {
  940. u8 version_str_sel;
  941. char version_str[128];
  942. } __packed;
  943. struct host_cmd_ds_802_11_ibss_status {
  944. __le16 action;
  945. __le16 enable;
  946. u8 bssid[ETH_ALEN];
  947. __le16 beacon_interval;
  948. __le16 atim_window;
  949. __le16 use_g_rate_protect;
  950. } __packed;
  951. #define CONNECTION_TYPE_INFRA 0
  952. #define CONNECTION_TYPE_ADHOC 1
  953. struct host_cmd_ds_set_bss_mode {
  954. u8 con_type;
  955. } __packed;
  956. struct host_cmd_ds_pcie_details {
  957. /* TX buffer descriptor ring address */
  958. u32 txbd_addr_lo;
  959. u32 txbd_addr_hi;
  960. /* TX buffer descriptor ring count */
  961. u32 txbd_count;
  962. /* RX buffer descriptor ring address */
  963. u32 rxbd_addr_lo;
  964. u32 rxbd_addr_hi;
  965. /* RX buffer descriptor ring count */
  966. u32 rxbd_count;
  967. /* Event buffer descriptor ring address */
  968. u32 evtbd_addr_lo;
  969. u32 evtbd_addr_hi;
  970. /* Event buffer descriptor ring count */
  971. u32 evtbd_count;
  972. /* Sleep cookie buffer physical address */
  973. u32 sleep_cookie_addr_lo;
  974. u32 sleep_cookie_addr_hi;
  975. } __packed;
  976. struct mwifiex_ie_types_rssi_threshold {
  977. struct mwifiex_ie_types_header header;
  978. u8 abs_value;
  979. u8 evt_freq;
  980. } __packed;
  981. struct host_cmd_ds_802_11_subsc_evt {
  982. __le16 action;
  983. __le16 events;
  984. } __packed;
  985. struct host_cmd_ds_command {
  986. __le16 command;
  987. __le16 size;
  988. __le16 seq_num;
  989. __le16 result;
  990. union {
  991. struct host_cmd_ds_get_hw_spec hw_spec;
  992. struct host_cmd_ds_mac_control mac_ctrl;
  993. struct host_cmd_ds_802_11_mac_address mac_addr;
  994. struct host_cmd_ds_mac_multicast_adr mc_addr;
  995. struct host_cmd_ds_802_11_get_log get_log;
  996. struct host_cmd_ds_802_11_rssi_info rssi_info;
  997. struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
  998. struct host_cmd_ds_802_11_snmp_mib smib;
  999. struct host_cmd_ds_802_11_rf_channel rf_channel;
  1000. struct host_cmd_ds_tx_rate_query tx_rate;
  1001. struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
  1002. struct host_cmd_ds_txpwr_cfg txp_cfg;
  1003. struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
  1004. struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
  1005. struct host_cmd_ds_802_11_scan scan;
  1006. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1007. struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
  1008. struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
  1009. struct host_cmd_ds_802_11_associate associate;
  1010. struct host_cmd_ds_802_11_associate_rsp associate_rsp;
  1011. struct host_cmd_ds_802_11_deauthenticate deauth;
  1012. struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  1013. struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
  1014. struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
  1015. struct host_cmd_ds_802_11d_domain_info domain_info;
  1016. struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
  1017. struct host_cmd_ds_11n_addba_req add_ba_req;
  1018. struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
  1019. struct host_cmd_ds_11n_delba del_ba;
  1020. struct host_cmd_ds_txbuf_cfg tx_buf;
  1021. struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
  1022. struct host_cmd_ds_11n_cfg htcfg;
  1023. struct host_cmd_ds_wmm_get_status get_wmm_status;
  1024. struct host_cmd_ds_802_11_key_material key_material;
  1025. struct host_cmd_ds_version_ext verext;
  1026. struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
  1027. struct host_cmd_ds_mac_reg_access mac_reg;
  1028. struct host_cmd_ds_bbp_reg_access bbp_reg;
  1029. struct host_cmd_ds_rf_reg_access rf_reg;
  1030. struct host_cmd_ds_pmic_reg_access pmic_reg;
  1031. struct host_cmd_ds_set_bss_mode bss_mode;
  1032. struct host_cmd_ds_pcie_details pcie_host_spec;
  1033. struct host_cmd_ds_802_11_eeprom_access eeprom;
  1034. struct host_cmd_ds_802_11_subsc_evt subsc_evt;
  1035. } params;
  1036. } __packed;
  1037. struct mwifiex_opt_sleep_confirm {
  1038. __le16 command;
  1039. __le16 size;
  1040. __le16 seq_num;
  1041. __le16 result;
  1042. __le16 action;
  1043. __le16 resp_ctrl;
  1044. } __packed;
  1045. #endif /* !_MWIFIEX_FW_H_ */