fw.h 35 KB

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