fw.h 42 KB

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