fw.h 42 KB

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