fw.h 43 KB

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