fw.h 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
  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[3];
  841. u8 oui_type;
  842. u8 oui_subtype;
  843. u8 version;
  844. } __packed;
  845. struct ieee_types_wmm_ac_parameters {
  846. u8 aci_aifsn_bitmap;
  847. u8 ecw_bitmap;
  848. __le16 tx_op_limit;
  849. } __packed;
  850. struct ieee_types_wmm_parameter {
  851. /*
  852. * WMM Parameter IE - Vendor Specific Header:
  853. * element_id [221/0xdd]
  854. * Len [24]
  855. * Oui [00:50:f2]
  856. * OuiType [2]
  857. * OuiSubType [1]
  858. * Version [1]
  859. */
  860. struct ieee_types_vendor_header vend_hdr;
  861. u8 qos_info_bitmap;
  862. u8 reserved;
  863. struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
  864. } __packed;
  865. struct ieee_types_wmm_info {
  866. /*
  867. * WMM Info IE - Vendor Specific Header:
  868. * element_id [221/0xdd]
  869. * Len [7]
  870. * Oui [00:50:f2]
  871. * OuiType [2]
  872. * OuiSubType [0]
  873. * Version [1]
  874. */
  875. struct ieee_types_vendor_header vend_hdr;
  876. u8 qos_info_bitmap;
  877. } __packed;
  878. struct host_cmd_ds_wmm_get_status {
  879. u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
  880. IEEE80211_NUM_ACS];
  881. u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
  882. } __packed;
  883. struct mwifiex_wmm_ac_status {
  884. u8 disabled;
  885. u8 flow_required;
  886. u8 flow_created;
  887. };
  888. struct mwifiex_ie_types_htcap {
  889. struct mwifiex_ie_types_header header;
  890. struct ieee80211_ht_cap ht_cap;
  891. } __packed;
  892. struct mwifiex_ie_types_htinfo {
  893. struct mwifiex_ie_types_header header;
  894. struct ieee80211_ht_operation ht_oper;
  895. } __packed;
  896. struct mwifiex_ie_types_2040bssco {
  897. struct mwifiex_ie_types_header header;
  898. u8 bss_co_2040;
  899. } __packed;
  900. struct mwifiex_ie_types_extcap {
  901. struct mwifiex_ie_types_header header;
  902. u8 ext_cap;
  903. } __packed;
  904. struct host_cmd_ds_mac_reg_access {
  905. __le16 action;
  906. __le16 offset;
  907. __le32 value;
  908. } __packed;
  909. struct host_cmd_ds_bbp_reg_access {
  910. __le16 action;
  911. __le16 offset;
  912. u8 value;
  913. u8 reserved[3];
  914. } __packed;
  915. struct host_cmd_ds_rf_reg_access {
  916. __le16 action;
  917. __le16 offset;
  918. u8 value;
  919. u8 reserved[3];
  920. } __packed;
  921. struct host_cmd_ds_pmic_reg_access {
  922. __le16 action;
  923. __le16 offset;
  924. u8 value;
  925. u8 reserved[3];
  926. } __packed;
  927. struct host_cmd_ds_802_11_eeprom_access {
  928. __le16 action;
  929. __le16 offset;
  930. __le16 byte_count;
  931. u8 value;
  932. } __packed;
  933. struct host_cmd_ds_802_11_rf_channel {
  934. __le16 action;
  935. __le16 current_channel;
  936. __le16 rf_type;
  937. __le16 reserved;
  938. u8 reserved_1[32];
  939. } __packed;
  940. struct host_cmd_ds_version_ext {
  941. u8 version_str_sel;
  942. char version_str[128];
  943. } __packed;
  944. struct host_cmd_ds_802_11_ibss_status {
  945. __le16 action;
  946. __le16 enable;
  947. u8 bssid[ETH_ALEN];
  948. __le16 beacon_interval;
  949. __le16 atim_window;
  950. __le16 use_g_rate_protect;
  951. } __packed;
  952. #define CONNECTION_TYPE_INFRA 0
  953. #define CONNECTION_TYPE_ADHOC 1
  954. struct host_cmd_ds_set_bss_mode {
  955. u8 con_type;
  956. } __packed;
  957. struct host_cmd_ds_pcie_details {
  958. /* TX buffer descriptor ring address */
  959. u32 txbd_addr_lo;
  960. u32 txbd_addr_hi;
  961. /* TX buffer descriptor ring count */
  962. u32 txbd_count;
  963. /* RX buffer descriptor ring address */
  964. u32 rxbd_addr_lo;
  965. u32 rxbd_addr_hi;
  966. /* RX buffer descriptor ring count */
  967. u32 rxbd_count;
  968. /* Event buffer descriptor ring address */
  969. u32 evtbd_addr_lo;
  970. u32 evtbd_addr_hi;
  971. /* Event buffer descriptor ring count */
  972. u32 evtbd_count;
  973. /* Sleep cookie buffer physical address */
  974. u32 sleep_cookie_addr_lo;
  975. u32 sleep_cookie_addr_hi;
  976. } __packed;
  977. struct mwifiex_ie_types_rssi_threshold {
  978. struct mwifiex_ie_types_header header;
  979. u8 abs_value;
  980. u8 evt_freq;
  981. } __packed;
  982. struct host_cmd_ds_802_11_subsc_evt {
  983. __le16 action;
  984. __le16 events;
  985. } __packed;
  986. struct host_cmd_ds_command {
  987. __le16 command;
  988. __le16 size;
  989. __le16 seq_num;
  990. __le16 result;
  991. union {
  992. struct host_cmd_ds_get_hw_spec hw_spec;
  993. struct host_cmd_ds_mac_control mac_ctrl;
  994. struct host_cmd_ds_802_11_mac_address mac_addr;
  995. struct host_cmd_ds_mac_multicast_adr mc_addr;
  996. struct host_cmd_ds_802_11_get_log get_log;
  997. struct host_cmd_ds_802_11_rssi_info rssi_info;
  998. struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
  999. struct host_cmd_ds_802_11_snmp_mib smib;
  1000. struct host_cmd_ds_802_11_rf_channel rf_channel;
  1001. struct host_cmd_ds_tx_rate_query tx_rate;
  1002. struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
  1003. struct host_cmd_ds_txpwr_cfg txp_cfg;
  1004. struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
  1005. struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
  1006. struct host_cmd_ds_802_11_scan scan;
  1007. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1008. struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
  1009. struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
  1010. struct host_cmd_ds_802_11_associate associate;
  1011. struct host_cmd_ds_802_11_associate_rsp associate_rsp;
  1012. struct host_cmd_ds_802_11_deauthenticate deauth;
  1013. struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  1014. struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
  1015. struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
  1016. struct host_cmd_ds_802_11d_domain_info domain_info;
  1017. struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
  1018. struct host_cmd_ds_11n_addba_req add_ba_req;
  1019. struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
  1020. struct host_cmd_ds_11n_delba del_ba;
  1021. struct host_cmd_ds_txbuf_cfg tx_buf;
  1022. struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
  1023. struct host_cmd_ds_11n_cfg htcfg;
  1024. struct host_cmd_ds_wmm_get_status get_wmm_status;
  1025. struct host_cmd_ds_802_11_key_material key_material;
  1026. struct host_cmd_ds_version_ext verext;
  1027. struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
  1028. struct host_cmd_ds_mac_reg_access mac_reg;
  1029. struct host_cmd_ds_bbp_reg_access bbp_reg;
  1030. struct host_cmd_ds_rf_reg_access rf_reg;
  1031. struct host_cmd_ds_pmic_reg_access pmic_reg;
  1032. struct host_cmd_ds_set_bss_mode bss_mode;
  1033. struct host_cmd_ds_pcie_details pcie_host_spec;
  1034. struct host_cmd_ds_802_11_eeprom_access eeprom;
  1035. struct host_cmd_ds_802_11_subsc_evt subsc_evt;
  1036. } params;
  1037. } __packed;
  1038. struct mwifiex_opt_sleep_confirm {
  1039. __le16 command;
  1040. __le16 size;
  1041. __le16 seq_num;
  1042. __le16 result;
  1043. __le16 action;
  1044. __le16 resp_ctrl;
  1045. } __packed;
  1046. #endif /* !_MWIFIEX_FW_H_ */