fw.h 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177
  1. /*
  2. * Marvell Wireless LAN device driver: Firmware specific macros & structures
  3. *
  4. * Copyright (C) 2011-2014, 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. __be16 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_AAC)
  46. #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
  47. BIT(13))
  48. #define IS_SUPPORT_MULTI_BANDS(adapter) \
  49. (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
  50. /* bit 13: 11ac BAND_AAC
  51. * bit 12: reserved for lab testing, will be reused for BAND_AN
  52. * bit 11: 11n BAND_GN
  53. * bit 10: 11a BAND_A
  54. * bit 9: 11g BAND_G
  55. * bit 8: 11b BAND_B
  56. * Map these bits to band capability by right shifting 8 bits.
  57. */
  58. #define GET_FW_DEFAULT_BANDS(adapter) \
  59. (((adapter->fw_cap_info & 0x2f00) >> 8) & \
  60. ALL_802_11_BANDS)
  61. #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
  62. #define KEY_INFO_ENABLED 0x01
  63. enum KEY_TYPE_ID {
  64. KEY_TYPE_ID_WEP = 0,
  65. KEY_TYPE_ID_TKIP,
  66. KEY_TYPE_ID_AES,
  67. KEY_TYPE_ID_WAPI,
  68. KEY_TYPE_ID_AES_CMAC,
  69. };
  70. #define WPA_PN_SIZE 8
  71. #define KEY_PARAMS_FIXED_LEN 10
  72. #define KEY_INDEX_MASK 0xf
  73. #define KEY_API_VER_MAJOR_V2 2
  74. #define KEY_MCAST BIT(0)
  75. #define KEY_UNICAST BIT(1)
  76. #define KEY_ENABLED BIT(2)
  77. #define KEY_DEFAULT BIT(3)
  78. #define KEY_TX_KEY BIT(4)
  79. #define KEY_RX_KEY BIT(5)
  80. #define KEY_IGTK BIT(10)
  81. #define WAPI_KEY_LEN (WLAN_KEY_LEN_SMS4 + PN_LEN + 2)
  82. #define MAX_POLL_TRIES 100
  83. #define MAX_FIRMWARE_POLL_TRIES 100
  84. #define FIRMWARE_READY_SDIO 0xfedc
  85. #define FIRMWARE_READY_PCIE 0xfedcba00
  86. #define MWIFIEX_COEX_MODE_TIMESHARE 0x01
  87. #define MWIFIEX_COEX_MODE_SPATIAL 0x82
  88. enum mwifiex_usb_ep {
  89. MWIFIEX_USB_EP_CMD_EVENT = 1,
  90. MWIFIEX_USB_EP_DATA = 2,
  91. MWIFIEX_USB_EP_DATA_CH2 = 3,
  92. };
  93. enum MWIFIEX_802_11_PRIVACY_FILTER {
  94. MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
  95. MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
  96. };
  97. #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF)))
  98. #define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR)+(s16)(NF)))
  99. #define UAP_BSS_PARAMS_I 0
  100. #define UAP_CUSTOM_IE_I 1
  101. #define MWIFIEX_AUTO_IDX_MASK 0xffff
  102. #define MWIFIEX_DELETE_MASK 0x0000
  103. #define MGMT_MASK_ASSOC_REQ 0x01
  104. #define MGMT_MASK_REASSOC_REQ 0x04
  105. #define MGMT_MASK_ASSOC_RESP 0x02
  106. #define MGMT_MASK_REASSOC_RESP 0x08
  107. #define MGMT_MASK_PROBE_REQ 0x10
  108. #define MGMT_MASK_PROBE_RESP 0x20
  109. #define MGMT_MASK_BEACON 0x100
  110. #define TLV_TYPE_UAP_SSID 0x0000
  111. #define TLV_TYPE_UAP_RATES 0x0001
  112. #define TLV_TYPE_PWR_CONSTRAINT 0x0020
  113. #define PROPRIETARY_TLV_BASE_ID 0x0100
  114. #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
  115. #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
  116. #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
  117. #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
  118. #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
  119. #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
  120. #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
  121. #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
  122. #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
  123. #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
  124. #define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32)
  125. #define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35)
  126. #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
  127. #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44)
  128. #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45)
  129. #define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48)
  130. #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51)
  131. #define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57)
  132. #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59)
  133. #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
  134. #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
  135. #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65)
  136. #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70)
  137. #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82)
  138. #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83)
  139. #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84)
  140. #define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86)
  141. #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87)
  142. #define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91)
  143. #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93)
  144. #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94)
  145. #define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 96)
  146. #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104)
  147. #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105)
  148. #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113)
  149. #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114)
  150. #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123)
  151. #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145)
  152. #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146)
  153. #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148)
  154. #define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154)
  155. #define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156)
  156. #define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183)
  157. #define TLV_TYPE_MC_GROUP_INFO (PROPRIETARY_TLV_BASE_ID + 184)
  158. #define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194)
  159. #define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197)
  160. #define TLV_TYPE_API_REV (PROPRIETARY_TLV_BASE_ID + 199)
  161. #define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198)
  162. #define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202)
  163. #define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203)
  164. #define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 206)
  165. #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
  166. #define SSN_MASK 0xfff0
  167. #define BA_RESULT_SUCCESS 0x0
  168. #define BA_RESULT_TIMEOUT 0x2
  169. #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status)
  170. #define BA_STREAM_NOT_ALLOWED 0xff
  171. #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
  172. priv->adapter->config_bands & BAND_AN) && \
  173. priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
  174. #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
  175. BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
  176. #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096
  177. #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192
  178. #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
  179. #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14))
  180. #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15))
  181. #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16))
  182. #define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \
  183. (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \
  184. IEEE80211_HT_CAP_SM_PS)
  185. #define MWIFIEX_DEF_11N_TX_BF_CAP 0x09E1E008
  186. #define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR
  187. #define GET_RXSTBC(x) (x & IEEE80211_HT_CAP_RX_STBC)
  188. #define MWIFIEX_RX_STBC1 0x0100
  189. #define MWIFIEX_RX_STBC12 0x0200
  190. #define MWIFIEX_RX_STBC123 0x0300
  191. /* dev_cap bitmap
  192. * BIT
  193. * 0-16 reserved
  194. * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40
  195. * 18-22 reserved
  196. * 23 IEEE80211_HT_CAP_SGI_20
  197. * 24 IEEE80211_HT_CAP_SGI_40
  198. * 25 IEEE80211_HT_CAP_TX_STBC
  199. * 26 IEEE80211_HT_CAP_RX_STBC
  200. * 27-28 reserved
  201. * 29 IEEE80211_HT_CAP_GRN_FLD
  202. * 30-31 reserved
  203. */
  204. #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
  205. #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
  206. #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
  207. #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
  208. #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
  209. #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
  210. #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8))
  211. #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))
  212. #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30))
  213. #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2))
  214. #define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF)
  215. /* httxcfg bitmap
  216. * 0 reserved
  217. * 1 20/40 Mhz enable(1)/disable(0)
  218. * 2-3 reserved
  219. * 4 green field enable(1)/disable(0)
  220. * 5 short GI in 20 Mhz enable(1)/disable(0)
  221. * 6 short GI in 40 Mhz enable(1)/disable(0)
  222. * 7-15 reserved
  223. */
  224. #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
  225. /* 11AC Tx and Rx MCS map for 1x1 mode:
  226. * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1
  227. * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams
  228. */
  229. #define MWIFIEX_11AC_MCS_MAP_1X1 0xfffefffe
  230. /* 11AC Tx and Rx MCS map for 2x2 mode:
  231. * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2
  232. * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams
  233. */
  234. #define MWIFIEX_11AC_MCS_MAP_2X2 0xfffafffa
  235. #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
  236. #define SETHT_MCS32(x) (x[4] |= 1)
  237. #define HT_STREAM_1X1 0x11
  238. #define HT_STREAM_2X2 0x22
  239. #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
  240. #define LLC_SNAP_LEN 8
  241. /* HW_SPEC fw_cap_info */
  242. #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13))
  243. #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3)
  244. #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
  245. #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \
  246. (2 * (nss - 1)))
  247. #define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16)
  248. #define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF)
  249. /* Clear SU Beanformer, MU beanformer, MU beanformee and
  250. * sounding dimensions bits
  251. */
  252. #define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \
  253. (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \
  254. IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \
  255. IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \
  256. IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK)
  257. #define MOD_CLASS_HR_DSSS 0x03
  258. #define MOD_CLASS_OFDM 0x07
  259. #define MOD_CLASS_HT 0x08
  260. #define HT_BW_20 0
  261. #define HT_BW_40 1
  262. #define DFS_CHAN_MOVE_TIME 10000
  263. #define HostCmd_CMD_GET_HW_SPEC 0x0003
  264. #define HostCmd_CMD_802_11_SCAN 0x0006
  265. #define HostCmd_CMD_802_11_GET_LOG 0x000b
  266. #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
  267. #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
  268. #define HostCmd_CMD_802_11_ASSOCIATE 0x0012
  269. #define HostCmd_CMD_802_11_SNMP_MIB 0x0016
  270. #define HostCmd_CMD_MAC_REG_ACCESS 0x0019
  271. #define HostCmd_CMD_BBP_REG_ACCESS 0x001a
  272. #define HostCmd_CMD_RF_REG_ACCESS 0x001b
  273. #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad
  274. #define HostCmd_CMD_RF_TX_PWR 0x001e
  275. #define HostCmd_CMD_RF_ANTENNA 0x0020
  276. #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
  277. #define HostCmd_CMD_MAC_CONTROL 0x0028
  278. #define HostCmd_CMD_802_11_AD_HOC_START 0x002b
  279. #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c
  280. #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040
  281. #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D
  282. #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b
  283. #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e
  284. #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c
  285. #define HostCmd_CMD_WMM_GET_STATUS 0x0071
  286. #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
  287. #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f
  288. #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083
  289. #define HostCmd_CMD_MEM_ACCESS 0x0086
  290. #define HostCmd_CMD_CFG_DATA 0x008f
  291. #define HostCmd_CMD_VERSION_EXT 0x0097
  292. #define HostCmd_CMD_MEF_CFG 0x009a
  293. #define HostCmd_CMD_RSSI_INFO 0x00a4
  294. #define HostCmd_CMD_FUNC_INIT 0x00a9
  295. #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
  296. #define HOST_CMD_APCMD_SYS_RESET 0x00af
  297. #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0
  298. #define HostCmd_CMD_UAP_BSS_START 0x00b1
  299. #define HostCmd_CMD_UAP_BSS_STOP 0x00b2
  300. #define HOST_CMD_APCMD_STA_LIST 0x00b3
  301. #define HostCmd_CMD_UAP_STA_DEAUTH 0x00b5
  302. #define HostCmd_CMD_11N_CFG 0x00cd
  303. #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
  304. #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
  305. #define HostCmd_CMD_11N_DELBA 0x00d0
  306. #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
  307. #define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd
  308. #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
  309. #define HostCmd_CMD_TXPWR_CFG 0x00d1
  310. #define HostCmd_CMD_TX_RATE_CFG 0x00d6
  311. #define HostCmd_CMD_ROBUST_COEX 0x00e0
  312. #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4
  313. #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5
  314. #define HostCmd_CMD_P2P_MODE_CFG 0x00eb
  315. #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
  316. #define HostCmd_CMD_SET_BSS_MODE 0x00f7
  317. #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa
  318. #define HostCmd_CMD_802_11_SCAN_EXT 0x0107
  319. #define HostCmd_CMD_COALESCE_CFG 0x010a
  320. #define HostCmd_CMD_MGMT_FRAME_REG 0x010c
  321. #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d
  322. #define HostCmd_CMD_11AC_CFG 0x0112
  323. #define HostCmd_CMD_TDLS_CONFIG 0x0100
  324. #define HostCmd_CMD_MC_POLICY 0x0121
  325. #define HostCmd_CMD_TDLS_OPER 0x0122
  326. #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223
  327. #define PROTOCOL_NO_SECURITY 0x01
  328. #define PROTOCOL_STATIC_WEP 0x02
  329. #define PROTOCOL_WPA 0x08
  330. #define PROTOCOL_WPA2 0x20
  331. #define PROTOCOL_WPA2_MIXED 0x28
  332. #define PROTOCOL_EAP 0x40
  333. #define KEY_MGMT_NONE 0x04
  334. #define KEY_MGMT_PSK 0x02
  335. #define KEY_MGMT_EAP 0x01
  336. #define CIPHER_TKIP 0x04
  337. #define CIPHER_AES_CCMP 0x08
  338. #define VALID_CIPHER_BITMAP 0x0c
  339. enum ENH_PS_MODES {
  340. EN_PS = 1,
  341. DIS_PS = 2,
  342. EN_AUTO_DS = 3,
  343. DIS_AUTO_DS = 4,
  344. SLEEP_CONFIRM = 5,
  345. GET_PS = 0,
  346. EN_AUTO_PS = 0xff,
  347. DIS_AUTO_PS = 0xfe,
  348. };
  349. enum P2P_MODES {
  350. P2P_MODE_DISABLE = 0,
  351. P2P_MODE_DEVICE = 1,
  352. P2P_MODE_GO = 2,
  353. P2P_MODE_CLIENT = 3,
  354. };
  355. #define HostCmd_RET_BIT 0x8000
  356. #define HostCmd_ACT_GEN_GET 0x0000
  357. #define HostCmd_ACT_GEN_SET 0x0001
  358. #define HostCmd_ACT_GEN_REMOVE 0x0004
  359. #define HostCmd_ACT_BITWISE_SET 0x0002
  360. #define HostCmd_ACT_BITWISE_CLR 0x0003
  361. #define HostCmd_RESULT_OK 0x0000
  362. #define HostCmd_ACT_MAC_RX_ON 0x0001
  363. #define HostCmd_ACT_MAC_TX_ON 0x0002
  364. #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
  365. #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
  366. #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
  367. #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
  368. #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
  369. #define HostCmd_BSS_MODE_IBSS 0x0002
  370. #define HostCmd_BSS_MODE_ANY 0x0003
  371. #define HostCmd_SCAN_RADIO_TYPE_BG 0
  372. #define HostCmd_SCAN_RADIO_TYPE_A 1
  373. #define HS_CFG_CANCEL 0xffffffff
  374. #define HS_CFG_COND_DEF 0x00000000
  375. #define HS_CFG_GPIO_DEF 0xff
  376. #define HS_CFG_GAP_DEF 0xff
  377. #define HS_CFG_COND_BROADCAST_DATA 0x00000001
  378. #define HS_CFG_COND_UNICAST_DATA 0x00000002
  379. #define HS_CFG_COND_MAC_EVENT 0x00000004
  380. #define HS_CFG_COND_MULTICAST_DATA 0x00000008
  381. #define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB
  382. #define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC
  383. #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD
  384. #define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE
  385. #define CONNECT_ERR_STA_FAILURE 0xFFFF
  386. #define CMD_F_HOSTCMD (1 << 0)
  387. #define HostCmd_CMD_ID_MASK 0x0fff
  388. #define HostCmd_SEQ_NUM_MASK 0x00ff
  389. #define HostCmd_BSS_NUM_MASK 0x0f00
  390. #define HostCmd_BSS_TYPE_MASK 0xf000
  391. #define HostCmd_ACT_SET_RX 0x0001
  392. #define HostCmd_ACT_SET_TX 0x0002
  393. #define HostCmd_ACT_SET_BOTH 0x0003
  394. #define RF_ANTENNA_AUTO 0xFFFF
  395. #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
  396. (((seq) & 0x00ff) | \
  397. (((num) & 0x000f) << 8)) | \
  398. (((type) & 0x000f) << 12); }
  399. #define HostCmd_GET_SEQ_NO(seq) \
  400. ((seq) & HostCmd_SEQ_NUM_MASK)
  401. #define HostCmd_GET_BSS_NO(seq) \
  402. (((seq) & HostCmd_BSS_NUM_MASK) >> 8)
  403. #define HostCmd_GET_BSS_TYPE(seq) \
  404. (((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
  405. #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
  406. #define EVENT_LINK_LOST 0x00000003
  407. #define EVENT_LINK_SENSED 0x00000004
  408. #define EVENT_MIB_CHANGED 0x00000006
  409. #define EVENT_INIT_DONE 0x00000007
  410. #define EVENT_DEAUTHENTICATED 0x00000008
  411. #define EVENT_DISASSOCIATED 0x00000009
  412. #define EVENT_PS_AWAKE 0x0000000a
  413. #define EVENT_PS_SLEEP 0x0000000b
  414. #define EVENT_MIC_ERR_MULTICAST 0x0000000d
  415. #define EVENT_MIC_ERR_UNICAST 0x0000000e
  416. #define EVENT_DEEP_SLEEP_AWAKE 0x00000010
  417. #define EVENT_ADHOC_BCN_LOST 0x00000011
  418. #define EVENT_WMM_STATUS_CHANGE 0x00000017
  419. #define EVENT_BG_SCAN_REPORT 0x00000018
  420. #define EVENT_RSSI_LOW 0x00000019
  421. #define EVENT_SNR_LOW 0x0000001a
  422. #define EVENT_MAX_FAIL 0x0000001b
  423. #define EVENT_RSSI_HIGH 0x0000001c
  424. #define EVENT_SNR_HIGH 0x0000001d
  425. #define EVENT_IBSS_COALESCED 0x0000001e
  426. #define EVENT_DATA_RSSI_LOW 0x00000024
  427. #define EVENT_DATA_SNR_LOW 0x00000025
  428. #define EVENT_DATA_RSSI_HIGH 0x00000026
  429. #define EVENT_DATA_SNR_HIGH 0x00000027
  430. #define EVENT_LINK_QUALITY 0x00000028
  431. #define EVENT_PORT_RELEASE 0x0000002b
  432. #define EVENT_UAP_STA_DEAUTH 0x0000002c
  433. #define EVENT_UAP_STA_ASSOC 0x0000002d
  434. #define EVENT_UAP_BSS_START 0x0000002e
  435. #define EVENT_PRE_BEACON_LOST 0x00000031
  436. #define EVENT_ADDBA 0x00000033
  437. #define EVENT_DELBA 0x00000034
  438. #define EVENT_BA_STREAM_TIEMOUT 0x00000037
  439. #define EVENT_AMSDU_AGGR_CTRL 0x00000042
  440. #define EVENT_UAP_BSS_IDLE 0x00000043
  441. #define EVENT_UAP_BSS_ACTIVE 0x00000044
  442. #define EVENT_WEP_ICV_ERR 0x00000046
  443. #define EVENT_HS_ACT_REQ 0x00000047
  444. #define EVENT_BW_CHANGE 0x00000048
  445. #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c
  446. #define EVENT_HOSTWAKE_STAIE 0x0000004d
  447. #define EVENT_CHANNEL_SWITCH_ANN 0x00000050
  448. #define EVENT_TDLS_GENERIC_EVENT 0x00000052
  449. #define EVENT_RADAR_DETECTED 0x00000053
  450. #define EVENT_CHANNEL_REPORT_RDY 0x00000054
  451. #define EVENT_TX_DATA_PAUSE 0x00000055
  452. #define EVENT_EXT_SCAN_REPORT 0x00000058
  453. #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f
  454. #define EVENT_MULTI_CHAN_INFO 0x0000006a
  455. #define EVENT_TX_STATUS_REPORT 0x00000074
  456. #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076
  457. #define EVENT_ID_MASK 0xffff
  458. #define BSS_NUM_MASK 0xf
  459. #define EVENT_GET_BSS_NUM(event_cause) \
  460. (((event_cause) >> 16) & BSS_NUM_MASK)
  461. #define EVENT_GET_BSS_TYPE(event_cause) \
  462. (((event_cause) >> 24) & 0x00ff)
  463. #define MWIFIEX_MAX_PATTERN_LEN 20
  464. #define MWIFIEX_MAX_OFFSET_LEN 100
  465. #define STACK_NBYTES 100
  466. #define TYPE_DNUM 1
  467. #define TYPE_BYTESEQ 2
  468. #define MAX_OPERAND 0x40
  469. #define TYPE_EQ (MAX_OPERAND+1)
  470. #define TYPE_EQ_DNUM (MAX_OPERAND+2)
  471. #define TYPE_EQ_BIT (MAX_OPERAND+3)
  472. #define TYPE_AND (MAX_OPERAND+4)
  473. #define TYPE_OR (MAX_OPERAND+5)
  474. #define MEF_MODE_HOST_SLEEP 1
  475. #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3
  476. #define MEF_ACTION_AUTO_ARP 0x10
  477. #define MWIFIEX_CRITERIA_BROADCAST BIT(0)
  478. #define MWIFIEX_CRITERIA_UNICAST BIT(1)
  479. #define MWIFIEX_CRITERIA_MULTICAST BIT(3)
  480. #define MWIFIEX_MAX_SUPPORTED_IPADDR 4
  481. #define ACT_TDLS_DELETE 0x00
  482. #define ACT_TDLS_CREATE 0x01
  483. #define ACT_TDLS_CONFIG 0x02
  484. #define TDLS_EVENT_LINK_TEAR_DOWN 3
  485. #define TDLS_EVENT_CHAN_SWITCH_RESULT 7
  486. #define TDLS_EVENT_START_CHAN_SWITCH 8
  487. #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9
  488. #define TDLS_BASE_CHANNEL 0
  489. #define TDLS_OFF_CHANNEL 1
  490. #define ACT_TDLS_CS_ENABLE_CONFIG 0x00
  491. #define ACT_TDLS_CS_INIT 0x06
  492. #define ACT_TDLS_CS_STOP 0x07
  493. #define ACT_TDLS_CS_PARAMS 0x08
  494. #define MWIFIEX_DEF_CS_UNIT_TIME 2
  495. #define MWIFIEX_DEF_CS_THR_OTHERLINK 10
  496. #define MWIFIEX_DEF_THR_DIRECTLINK 0
  497. #define MWIFIEX_DEF_CS_TIME 10
  498. #define MWIFIEX_DEF_CS_TIMEOUT 16
  499. #define MWIFIEX_DEF_CS_REG_CLASS 12
  500. #define MWIFIEX_DEF_CS_PERIODICITY 1
  501. #define MWIFIEX_FW_V15 15
  502. #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1)
  503. struct mwifiex_ie_types_header {
  504. __le16 type;
  505. __le16 len;
  506. } __packed;
  507. struct mwifiex_ie_types_data {
  508. struct mwifiex_ie_types_header header;
  509. u8 data[1];
  510. } __packed;
  511. #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
  512. #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
  513. #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET 0x10
  514. #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET 0x01
  515. #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS 0x20
  516. struct txpd {
  517. u8 bss_type;
  518. u8 bss_num;
  519. __le16 tx_pkt_length;
  520. __le16 tx_pkt_offset;
  521. __le16 tx_pkt_type;
  522. __le32 tx_control;
  523. u8 priority;
  524. u8 flags;
  525. u8 pkt_delay_2ms;
  526. u8 reserved1[2];
  527. u8 tx_token_id;
  528. u8 reserved[2];
  529. } __packed;
  530. struct rxpd {
  531. u8 bss_type;
  532. u8 bss_num;
  533. __le16 rx_pkt_length;
  534. __le16 rx_pkt_offset;
  535. __le16 rx_pkt_type;
  536. __le16 seq_num;
  537. u8 priority;
  538. u8 rx_rate;
  539. s8 snr;
  540. s8 nf;
  541. /* For: Non-802.11 AC cards
  542. *
  543. * Ht Info [Bit 0] RxRate format: LG=0, HT=1
  544. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  545. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
  546. *
  547. * For: 802.11 AC cards
  548. * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
  549. * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
  550. * BW80 = 10 BW160 = 11
  551. * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
  552. * [Bit 5] STBC support Enabled = 1
  553. * [Bit 6] LDPC support Enabled = 1
  554. * [Bit 7] Reserved
  555. */
  556. u8 ht_info;
  557. u8 reserved[3];
  558. u8 flags;
  559. } __packed;
  560. struct uap_txpd {
  561. u8 bss_type;
  562. u8 bss_num;
  563. __le16 tx_pkt_length;
  564. __le16 tx_pkt_offset;
  565. __le16 tx_pkt_type;
  566. __le32 tx_control;
  567. u8 priority;
  568. u8 flags;
  569. u8 pkt_delay_2ms;
  570. u8 reserved1[2];
  571. u8 tx_token_id;
  572. u8 reserved[2];
  573. };
  574. struct uap_rxpd {
  575. u8 bss_type;
  576. u8 bss_num;
  577. __le16 rx_pkt_length;
  578. __le16 rx_pkt_offset;
  579. __le16 rx_pkt_type;
  580. __le16 seq_num;
  581. u8 priority;
  582. u8 rx_rate;
  583. s8 snr;
  584. s8 nf;
  585. u8 ht_info;
  586. u8 reserved[3];
  587. u8 flags;
  588. };
  589. struct mwifiex_fw_chan_stats {
  590. u8 chan_num;
  591. u8 bandcfg;
  592. u8 flags;
  593. s8 noise;
  594. __le16 total_bss;
  595. __le16 cca_scan_dur;
  596. __le16 cca_busy_dur;
  597. } __packed;
  598. enum mwifiex_chan_scan_mode_bitmasks {
  599. MWIFIEX_PASSIVE_SCAN = BIT(0),
  600. MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
  601. MWIFIEX_HIDDEN_SSID_REPORT = BIT(4),
  602. };
  603. struct mwifiex_chan_scan_param_set {
  604. u8 radio_type;
  605. u8 chan_number;
  606. u8 chan_scan_mode_bitmap;
  607. __le16 min_scan_time;
  608. __le16 max_scan_time;
  609. } __packed;
  610. struct mwifiex_ie_types_chan_list_param_set {
  611. struct mwifiex_ie_types_header header;
  612. struct mwifiex_chan_scan_param_set chan_scan_param[1];
  613. } __packed;
  614. struct chan_band_param_set {
  615. u8 radio_type;
  616. u8 chan_number;
  617. };
  618. struct mwifiex_ie_types_chan_band_list_param_set {
  619. struct mwifiex_ie_types_header header;
  620. struct chan_band_param_set chan_band_param[1];
  621. } __packed;
  622. struct mwifiex_ie_types_rates_param_set {
  623. struct mwifiex_ie_types_header header;
  624. u8 rates[1];
  625. } __packed;
  626. struct mwifiex_ie_types_ssid_param_set {
  627. struct mwifiex_ie_types_header header;
  628. u8 ssid[1];
  629. } __packed;
  630. struct mwifiex_ie_types_num_probes {
  631. struct mwifiex_ie_types_header header;
  632. __le16 num_probes;
  633. } __packed;
  634. struct mwifiex_ie_types_scan_chan_gap {
  635. struct mwifiex_ie_types_header header;
  636. /* time gap in TUs to be used between two consecutive channels scan */
  637. __le16 chan_gap;
  638. } __packed;
  639. struct mwifiex_ietypes_chanstats {
  640. struct mwifiex_ie_types_header header;
  641. struct mwifiex_fw_chan_stats chanstats[0];
  642. } __packed;
  643. struct mwifiex_ie_types_wildcard_ssid_params {
  644. struct mwifiex_ie_types_header header;
  645. u8 max_ssid_length;
  646. u8 ssid[1];
  647. } __packed;
  648. #define TSF_DATA_SIZE 8
  649. struct mwifiex_ie_types_tsf_timestamp {
  650. struct mwifiex_ie_types_header header;
  651. u8 tsf_data[1];
  652. } __packed;
  653. struct mwifiex_cf_param_set {
  654. u8 cfp_cnt;
  655. u8 cfp_period;
  656. __le16 cfp_max_duration;
  657. __le16 cfp_duration_remaining;
  658. } __packed;
  659. struct mwifiex_ibss_param_set {
  660. __le16 atim_window;
  661. } __packed;
  662. struct mwifiex_ie_types_ss_param_set {
  663. struct mwifiex_ie_types_header header;
  664. union {
  665. struct mwifiex_cf_param_set cf_param_set[1];
  666. struct mwifiex_ibss_param_set ibss_param_set[1];
  667. } cf_ibss;
  668. } __packed;
  669. struct mwifiex_fh_param_set {
  670. __le16 dwell_time;
  671. u8 hop_set;
  672. u8 hop_pattern;
  673. u8 hop_index;
  674. } __packed;
  675. struct mwifiex_ds_param_set {
  676. u8 current_chan;
  677. } __packed;
  678. struct mwifiex_ie_types_phy_param_set {
  679. struct mwifiex_ie_types_header header;
  680. union {
  681. struct mwifiex_fh_param_set fh_param_set[1];
  682. struct mwifiex_ds_param_set ds_param_set[1];
  683. } fh_ds;
  684. } __packed;
  685. struct mwifiex_ie_types_auth_type {
  686. struct mwifiex_ie_types_header header;
  687. __le16 auth_type;
  688. } __packed;
  689. struct mwifiex_ie_types_vendor_param_set {
  690. struct mwifiex_ie_types_header header;
  691. u8 ie[MWIFIEX_MAX_VSIE_LEN];
  692. };
  693. #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC 60
  694. struct mwifiex_ie_types_tdls_idle_timeout {
  695. struct mwifiex_ie_types_header header;
  696. __le16 value;
  697. } __packed;
  698. struct mwifiex_ie_types_rsn_param_set {
  699. struct mwifiex_ie_types_header header;
  700. u8 rsn_ie[1];
  701. } __packed;
  702. #define KEYPARAMSET_FIXED_LEN 6
  703. struct mwifiex_ie_type_key_param_set {
  704. __le16 type;
  705. __le16 length;
  706. __le16 key_type_id;
  707. __le16 key_info;
  708. __le16 key_len;
  709. u8 key[50];
  710. } __packed;
  711. #define IGTK_PN_LEN 8
  712. struct mwifiex_cmac_param {
  713. u8 ipn[IGTK_PN_LEN];
  714. u8 key[WLAN_KEY_LEN_AES_CMAC];
  715. } __packed;
  716. struct mwifiex_wep_param {
  717. __le16 key_len;
  718. u8 key[WLAN_KEY_LEN_WEP104];
  719. } __packed;
  720. struct mwifiex_tkip_param {
  721. u8 pn[WPA_PN_SIZE];
  722. __le16 key_len;
  723. u8 key[WLAN_KEY_LEN_TKIP];
  724. } __packed;
  725. struct mwifiex_aes_param {
  726. u8 pn[WPA_PN_SIZE];
  727. __le16 key_len;
  728. u8 key[WLAN_KEY_LEN_CCMP];
  729. } __packed;
  730. struct mwifiex_wapi_param {
  731. u8 pn[PN_LEN];
  732. __le16 key_len;
  733. u8 key[WLAN_KEY_LEN_SMS4];
  734. } __packed;
  735. struct mwifiex_cmac_aes_param {
  736. u8 ipn[IGTK_PN_LEN];
  737. __le16 key_len;
  738. u8 key[WLAN_KEY_LEN_AES_CMAC];
  739. } __packed;
  740. struct mwifiex_ie_type_key_param_set_v2 {
  741. __le16 type;
  742. __le16 len;
  743. u8 mac_addr[ETH_ALEN];
  744. u8 key_idx;
  745. u8 key_type;
  746. __le16 key_info;
  747. union {
  748. struct mwifiex_wep_param wep;
  749. struct mwifiex_tkip_param tkip;
  750. struct mwifiex_aes_param aes;
  751. struct mwifiex_wapi_param wapi;
  752. struct mwifiex_cmac_aes_param cmac_aes;
  753. } key_params;
  754. } __packed;
  755. struct host_cmd_ds_802_11_key_material_v2 {
  756. __le16 action;
  757. struct mwifiex_ie_type_key_param_set_v2 key_param_set;
  758. } __packed;
  759. struct host_cmd_ds_802_11_key_material {
  760. __le16 action;
  761. struct mwifiex_ie_type_key_param_set key_param_set;
  762. } __packed;
  763. struct host_cmd_ds_gen {
  764. __le16 command;
  765. __le16 size;
  766. __le16 seq_num;
  767. __le16 result;
  768. };
  769. #define S_DS_GEN sizeof(struct host_cmd_ds_gen)
  770. enum sleep_resp_ctrl {
  771. RESP_NOT_NEEDED = 0,
  772. RESP_NEEDED,
  773. };
  774. struct mwifiex_ps_param {
  775. __le16 null_pkt_interval;
  776. __le16 multiple_dtims;
  777. __le16 bcn_miss_timeout;
  778. __le16 local_listen_interval;
  779. __le16 adhoc_wake_period;
  780. __le16 mode;
  781. __le16 delay_to_ps;
  782. };
  783. #define BITMAP_AUTO_DS 0x01
  784. #define BITMAP_STA_PS 0x10
  785. struct mwifiex_ie_types_auto_ds_param {
  786. struct mwifiex_ie_types_header header;
  787. __le16 deep_sleep_timeout;
  788. } __packed;
  789. struct mwifiex_ie_types_ps_param {
  790. struct mwifiex_ie_types_header header;
  791. struct mwifiex_ps_param param;
  792. } __packed;
  793. struct host_cmd_ds_802_11_ps_mode_enh {
  794. __le16 action;
  795. union {
  796. struct mwifiex_ps_param opt_ps;
  797. __le16 ps_bitmap;
  798. } params;
  799. } __packed;
  800. enum API_VER_ID {
  801. KEY_API_VER_ID = 1,
  802. FW_API_VER_ID = 2,
  803. };
  804. struct hw_spec_api_rev {
  805. struct mwifiex_ie_types_header header;
  806. __le16 api_id;
  807. u8 major_ver;
  808. u8 minor_ver;
  809. } __packed;
  810. struct host_cmd_ds_get_hw_spec {
  811. __le16 hw_if_version;
  812. __le16 version;
  813. __le16 reserved;
  814. __le16 num_of_mcast_adr;
  815. u8 permanent_addr[ETH_ALEN];
  816. __le16 region_code;
  817. __le16 number_of_antenna;
  818. __le32 fw_release_number;
  819. __le32 reserved_1;
  820. __le32 reserved_2;
  821. __le32 reserved_3;
  822. __le32 fw_cap_info;
  823. __le32 dot_11n_dev_cap;
  824. u8 dev_mcs_support;
  825. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  826. __le16 mgmt_buf_count; /* mgmt IE buffer count */
  827. __le32 reserved_5;
  828. __le32 reserved_6;
  829. __le32 dot_11ac_dev_cap;
  830. __le32 dot_11ac_mcs_support;
  831. u8 tlvs[0];
  832. } __packed;
  833. struct host_cmd_ds_802_11_rssi_info {
  834. __le16 action;
  835. __le16 ndata;
  836. __le16 nbcn;
  837. __le16 reserved[9];
  838. long long reserved_1;
  839. };
  840. struct host_cmd_ds_802_11_rssi_info_rsp {
  841. __le16 action;
  842. __le16 ndata;
  843. __le16 nbcn;
  844. __le16 data_rssi_last;
  845. __le16 data_nf_last;
  846. __le16 data_rssi_avg;
  847. __le16 data_nf_avg;
  848. __le16 bcn_rssi_last;
  849. __le16 bcn_nf_last;
  850. __le16 bcn_rssi_avg;
  851. __le16 bcn_nf_avg;
  852. long long tsf_bcn;
  853. };
  854. struct host_cmd_ds_802_11_mac_address {
  855. __le16 action;
  856. u8 mac_addr[ETH_ALEN];
  857. };
  858. struct host_cmd_ds_mac_control {
  859. __le16 action;
  860. __le16 reserved;
  861. };
  862. struct host_cmd_ds_mac_multicast_adr {
  863. __le16 action;
  864. __le16 num_of_adrs;
  865. u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
  866. } __packed;
  867. struct host_cmd_ds_802_11_deauthenticate {
  868. u8 mac_addr[ETH_ALEN];
  869. __le16 reason_code;
  870. } __packed;
  871. struct host_cmd_ds_802_11_associate {
  872. u8 peer_sta_addr[ETH_ALEN];
  873. __le16 cap_info_bitmap;
  874. __le16 listen_interval;
  875. __le16 beacon_period;
  876. u8 dtim_period;
  877. } __packed;
  878. struct ieee_types_assoc_rsp {
  879. __le16 cap_info_bitmap;
  880. __le16 status_code;
  881. __le16 a_id;
  882. u8 ie_buffer[1];
  883. } __packed;
  884. struct host_cmd_ds_802_11_associate_rsp {
  885. struct ieee_types_assoc_rsp assoc_rsp;
  886. } __packed;
  887. struct ieee_types_cf_param_set {
  888. u8 element_id;
  889. u8 len;
  890. u8 cfp_cnt;
  891. u8 cfp_period;
  892. __le16 cfp_max_duration;
  893. __le16 cfp_duration_remaining;
  894. } __packed;
  895. struct ieee_types_ibss_param_set {
  896. u8 element_id;
  897. u8 len;
  898. __le16 atim_window;
  899. } __packed;
  900. union ieee_types_ss_param_set {
  901. struct ieee_types_cf_param_set cf_param_set;
  902. struct ieee_types_ibss_param_set ibss_param_set;
  903. } __packed;
  904. struct ieee_types_fh_param_set {
  905. u8 element_id;
  906. u8 len;
  907. __le16 dwell_time;
  908. u8 hop_set;
  909. u8 hop_pattern;
  910. u8 hop_index;
  911. } __packed;
  912. struct ieee_types_ds_param_set {
  913. u8 element_id;
  914. u8 len;
  915. u8 current_chan;
  916. } __packed;
  917. union ieee_types_phy_param_set {
  918. struct ieee_types_fh_param_set fh_param_set;
  919. struct ieee_types_ds_param_set ds_param_set;
  920. } __packed;
  921. struct ieee_types_oper_mode_ntf {
  922. u8 element_id;
  923. u8 len;
  924. u8 oper_mode;
  925. } __packed;
  926. struct host_cmd_ds_802_11_ad_hoc_start {
  927. u8 ssid[IEEE80211_MAX_SSID_LEN];
  928. u8 bss_mode;
  929. __le16 beacon_period;
  930. u8 dtim_period;
  931. union ieee_types_ss_param_set ss_param_set;
  932. union ieee_types_phy_param_set phy_param_set;
  933. u16 reserved1;
  934. __le16 cap_info_bitmap;
  935. u8 data_rate[HOSTCMD_SUPPORTED_RATES];
  936. } __packed;
  937. struct host_cmd_ds_802_11_ad_hoc_result {
  938. u8 pad[3];
  939. u8 bssid[ETH_ALEN];
  940. } __packed;
  941. struct adhoc_bss_desc {
  942. u8 bssid[ETH_ALEN];
  943. u8 ssid[IEEE80211_MAX_SSID_LEN];
  944. u8 bss_mode;
  945. __le16 beacon_period;
  946. u8 dtim_period;
  947. u8 time_stamp[8];
  948. u8 local_time[8];
  949. union ieee_types_phy_param_set phy_param_set;
  950. union ieee_types_ss_param_set ss_param_set;
  951. __le16 cap_info_bitmap;
  952. u8 data_rates[HOSTCMD_SUPPORTED_RATES];
  953. /*
  954. * DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
  955. * It is used in the Adhoc join command and will cause a
  956. * binary layout mismatch with the firmware
  957. */
  958. } __packed;
  959. struct host_cmd_ds_802_11_ad_hoc_join {
  960. struct adhoc_bss_desc bss_descriptor;
  961. u16 reserved1;
  962. u16 reserved2;
  963. } __packed;
  964. struct host_cmd_ds_802_11_get_log {
  965. __le32 mcast_tx_frame;
  966. __le32 failed;
  967. __le32 retry;
  968. __le32 multi_retry;
  969. __le32 frame_dup;
  970. __le32 rts_success;
  971. __le32 rts_failure;
  972. __le32 ack_failure;
  973. __le32 rx_frag;
  974. __le32 mcast_rx_frame;
  975. __le32 fcs_error;
  976. __le32 tx_frame;
  977. __le32 reserved;
  978. __le32 wep_icv_err_cnt[4];
  979. __le32 bcn_rcv_cnt;
  980. __le32 bcn_miss_cnt;
  981. };
  982. /* Enumeration for rate format */
  983. enum _mwifiex_rate_format {
  984. MWIFIEX_RATE_FORMAT_LG = 0,
  985. MWIFIEX_RATE_FORMAT_HT,
  986. MWIFIEX_RATE_FORMAT_VHT,
  987. MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
  988. };
  989. struct host_cmd_ds_tx_rate_query {
  990. u8 tx_rate;
  991. /* Tx Rate Info: For 802.11 AC cards
  992. *
  993. * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
  994. * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
  995. * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1
  996. *
  997. * For non-802.11 AC cards
  998. * Ht Info [Bit 0] RxRate format: LG=0, HT=1
  999. * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
  1000. * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
  1001. */
  1002. u8 ht_info;
  1003. } __packed;
  1004. struct mwifiex_tx_pause_tlv {
  1005. struct mwifiex_ie_types_header header;
  1006. u8 peermac[ETH_ALEN];
  1007. u8 tx_pause;
  1008. u8 pkt_cnt;
  1009. } __packed;
  1010. enum Host_Sleep_Action {
  1011. HS_CONFIGURE = 0x0001,
  1012. HS_ACTIVATE = 0x0002,
  1013. };
  1014. struct mwifiex_hs_config_param {
  1015. __le32 conditions;
  1016. u8 gpio;
  1017. u8 gap;
  1018. } __packed;
  1019. struct hs_activate_param {
  1020. __le16 resp_ctrl;
  1021. } __packed;
  1022. struct host_cmd_ds_802_11_hs_cfg_enh {
  1023. __le16 action;
  1024. union {
  1025. struct mwifiex_hs_config_param hs_config;
  1026. struct hs_activate_param hs_activate;
  1027. } params;
  1028. } __packed;
  1029. enum SNMP_MIB_INDEX {
  1030. OP_RATE_SET_I = 1,
  1031. DTIM_PERIOD_I = 3,
  1032. RTS_THRESH_I = 5,
  1033. SHORT_RETRY_LIM_I = 6,
  1034. LONG_RETRY_LIM_I = 7,
  1035. FRAG_THRESH_I = 8,
  1036. DOT11D_I = 9,
  1037. DOT11H_I = 10,
  1038. };
  1039. enum mwifiex_assocmd_failurepoint {
  1040. MWIFIEX_ASSOC_CMD_SUCCESS = 0,
  1041. MWIFIEX_ASSOC_CMD_FAILURE_ASSOC,
  1042. MWIFIEX_ASSOC_CMD_FAILURE_AUTH,
  1043. MWIFIEX_ASSOC_CMD_FAILURE_JOIN
  1044. };
  1045. #define MAX_SNMP_BUF_SIZE 128
  1046. struct host_cmd_ds_802_11_snmp_mib {
  1047. __le16 query_type;
  1048. __le16 oid;
  1049. __le16 buf_size;
  1050. u8 value[1];
  1051. } __packed;
  1052. struct mwifiex_rate_scope {
  1053. __le16 type;
  1054. __le16 length;
  1055. __le16 hr_dsss_rate_bitmap;
  1056. __le16 ofdm_rate_bitmap;
  1057. __le16 ht_mcs_rate_bitmap[8];
  1058. __le16 vht_mcs_rate_bitmap[8];
  1059. } __packed;
  1060. struct mwifiex_rate_drop_pattern {
  1061. __le16 type;
  1062. __le16 length;
  1063. __le32 rate_drop_mode;
  1064. } __packed;
  1065. struct host_cmd_ds_tx_rate_cfg {
  1066. __le16 action;
  1067. __le16 cfg_index;
  1068. } __packed;
  1069. struct mwifiex_power_group {
  1070. u8 modulation_class;
  1071. u8 first_rate_code;
  1072. u8 last_rate_code;
  1073. s8 power_step;
  1074. s8 power_min;
  1075. s8 power_max;
  1076. u8 ht_bandwidth;
  1077. u8 reserved;
  1078. } __packed;
  1079. struct mwifiex_types_power_group {
  1080. __le16 type;
  1081. __le16 length;
  1082. } __packed;
  1083. struct host_cmd_ds_txpwr_cfg {
  1084. __le16 action;
  1085. __le16 cfg_index;
  1086. __le32 mode;
  1087. } __packed;
  1088. struct host_cmd_ds_rf_tx_pwr {
  1089. __le16 action;
  1090. __le16 cur_level;
  1091. u8 max_power;
  1092. u8 min_power;
  1093. } __packed;
  1094. struct host_cmd_ds_rf_ant_mimo {
  1095. __le16 action_tx;
  1096. __le16 tx_ant_mode;
  1097. __le16 action_rx;
  1098. __le16 rx_ant_mode;
  1099. };
  1100. struct host_cmd_ds_rf_ant_siso {
  1101. __le16 action;
  1102. __le16 ant_mode;
  1103. };
  1104. struct host_cmd_ds_tdls_oper {
  1105. __le16 tdls_action;
  1106. __le16 reason;
  1107. u8 peer_mac[ETH_ALEN];
  1108. } __packed;
  1109. struct mwifiex_tdls_config {
  1110. __le16 enable;
  1111. };
  1112. struct mwifiex_tdls_config_cs_params {
  1113. u8 unit_time;
  1114. u8 thr_otherlink;
  1115. u8 thr_directlink;
  1116. };
  1117. struct mwifiex_tdls_init_cs_params {
  1118. u8 peer_mac[ETH_ALEN];
  1119. u8 primary_chan;
  1120. u8 second_chan_offset;
  1121. u8 band;
  1122. __le16 switch_time;
  1123. __le16 switch_timeout;
  1124. u8 reg_class;
  1125. u8 periodicity;
  1126. } __packed;
  1127. struct mwifiex_tdls_stop_cs_params {
  1128. u8 peer_mac[ETH_ALEN];
  1129. };
  1130. struct host_cmd_ds_tdls_config {
  1131. __le16 tdls_action;
  1132. u8 tdls_data[1];
  1133. } __packed;
  1134. struct mwifiex_chan_desc {
  1135. __le16 start_freq;
  1136. u8 chan_width;
  1137. u8 chan_num;
  1138. } __packed;
  1139. struct host_cmd_ds_chan_rpt_req {
  1140. struct mwifiex_chan_desc chan_desc;
  1141. __le32 msec_dwell_time;
  1142. } __packed;
  1143. struct host_cmd_ds_chan_rpt_event {
  1144. __le32 result;
  1145. __le64 start_tsf;
  1146. __le32 duration;
  1147. u8 tlvbuf[0];
  1148. } __packed;
  1149. struct host_cmd_sdio_sp_rx_aggr_cfg {
  1150. u8 action;
  1151. u8 enable;
  1152. __le16 block_size;
  1153. } __packed;
  1154. struct mwifiex_fixed_bcn_param {
  1155. __le64 timestamp;
  1156. __le16 beacon_period;
  1157. __le16 cap_info_bitmap;
  1158. } __packed;
  1159. struct mwifiex_event_scan_result {
  1160. __le16 event_id;
  1161. u8 bss_index;
  1162. u8 bss_type;
  1163. u8 more_event;
  1164. u8 reserved[3];
  1165. __le16 buf_size;
  1166. u8 num_of_set;
  1167. } __packed;
  1168. struct tx_status_event {
  1169. u8 packet_type;
  1170. u8 tx_token_id;
  1171. u8 status;
  1172. } __packed;
  1173. #define MWIFIEX_USER_SCAN_CHAN_MAX 50
  1174. #define MWIFIEX_MAX_SSID_LIST_LENGTH 10
  1175. struct mwifiex_scan_cmd_config {
  1176. /*
  1177. * BSS mode to be sent in the firmware command
  1178. */
  1179. u8 bss_mode;
  1180. /* Specific BSSID used to filter scan results in the firmware */
  1181. u8 specific_bssid[ETH_ALEN];
  1182. /* Length of TLVs sent in command starting at tlvBuffer */
  1183. u32 tlv_buf_len;
  1184. /*
  1185. * SSID TLV(s) and ChanList TLVs to be sent in the firmware command
  1186. *
  1187. * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
  1188. * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
  1189. */
  1190. u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
  1191. here */
  1192. } __packed;
  1193. struct mwifiex_user_scan_chan {
  1194. u8 chan_number;
  1195. u8 radio_type;
  1196. u8 scan_type;
  1197. u8 reserved;
  1198. u32 scan_time;
  1199. } __packed;
  1200. struct mwifiex_user_scan_cfg {
  1201. /*
  1202. * BSS mode to be sent in the firmware command
  1203. */
  1204. u8 bss_mode;
  1205. /* Configure the number of probe requests for active chan scans */
  1206. u8 num_probes;
  1207. u8 reserved;
  1208. /* BSSID filter sent in the firmware command to limit the results */
  1209. u8 specific_bssid[ETH_ALEN];
  1210. /* SSID filter list used in the firmware to limit the scan results */
  1211. struct cfg80211_ssid *ssid_list;
  1212. u8 num_ssids;
  1213. /* Variable number (fixed maximum) of channels to scan up */
  1214. struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
  1215. u16 scan_chan_gap;
  1216. } __packed;
  1217. struct ie_body {
  1218. u8 grp_key_oui[4];
  1219. u8 ptk_cnt[2];
  1220. u8 ptk_body[4];
  1221. } __packed;
  1222. struct host_cmd_ds_802_11_scan {
  1223. u8 bss_mode;
  1224. u8 bssid[ETH_ALEN];
  1225. u8 tlv_buffer[1];
  1226. } __packed;
  1227. struct host_cmd_ds_802_11_scan_rsp {
  1228. __le16 bss_descript_size;
  1229. u8 number_of_sets;
  1230. u8 bss_desc_and_tlv_buffer[1];
  1231. } __packed;
  1232. struct host_cmd_ds_802_11_scan_ext {
  1233. u32 reserved;
  1234. u8 tlv_buffer[1];
  1235. } __packed;
  1236. struct mwifiex_ie_types_bss_mode {
  1237. struct mwifiex_ie_types_header header;
  1238. u8 bss_mode;
  1239. } __packed;
  1240. struct mwifiex_ie_types_bss_scan_rsp {
  1241. struct mwifiex_ie_types_header header;
  1242. u8 bssid[ETH_ALEN];
  1243. u8 frame_body[1];
  1244. } __packed;
  1245. struct mwifiex_ie_types_bss_scan_info {
  1246. struct mwifiex_ie_types_header header;
  1247. __le16 rssi;
  1248. __le16 anpi;
  1249. u8 cca_busy_fraction;
  1250. u8 radio_type;
  1251. u8 channel;
  1252. u8 reserved;
  1253. __le64 tsf;
  1254. } __packed;
  1255. struct host_cmd_ds_802_11_bg_scan_query {
  1256. u8 flush;
  1257. } __packed;
  1258. struct host_cmd_ds_802_11_bg_scan_query_rsp {
  1259. __le32 report_condition;
  1260. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1261. } __packed;
  1262. struct mwifiex_ietypes_domain_param_set {
  1263. struct mwifiex_ie_types_header header;
  1264. u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
  1265. struct ieee80211_country_ie_triplet triplet[1];
  1266. } __packed;
  1267. struct host_cmd_ds_802_11d_domain_info {
  1268. __le16 action;
  1269. struct mwifiex_ietypes_domain_param_set domain;
  1270. } __packed;
  1271. struct host_cmd_ds_802_11d_domain_info_rsp {
  1272. __le16 action;
  1273. struct mwifiex_ietypes_domain_param_set domain;
  1274. } __packed;
  1275. struct host_cmd_ds_11n_addba_req {
  1276. u8 add_req_result;
  1277. u8 peer_mac_addr[ETH_ALEN];
  1278. u8 dialog_token;
  1279. __le16 block_ack_param_set;
  1280. __le16 block_ack_tmo;
  1281. __le16 ssn;
  1282. } __packed;
  1283. struct host_cmd_ds_11n_addba_rsp {
  1284. u8 add_rsp_result;
  1285. u8 peer_mac_addr[ETH_ALEN];
  1286. u8 dialog_token;
  1287. __le16 status_code;
  1288. __le16 block_ack_param_set;
  1289. __le16 block_ack_tmo;
  1290. __le16 ssn;
  1291. } __packed;
  1292. struct host_cmd_ds_11n_delba {
  1293. u8 del_result;
  1294. u8 peer_mac_addr[ETH_ALEN];
  1295. __le16 del_ba_param_set;
  1296. __le16 reason_code;
  1297. u8 reserved;
  1298. } __packed;
  1299. struct host_cmd_ds_11n_batimeout {
  1300. u8 tid;
  1301. u8 peer_mac_addr[ETH_ALEN];
  1302. u8 origninator;
  1303. } __packed;
  1304. struct host_cmd_ds_11n_cfg {
  1305. __le16 action;
  1306. __le16 ht_tx_cap;
  1307. __le16 ht_tx_info;
  1308. __le16 misc_config; /* Needed for 802.11AC cards only */
  1309. } __packed;
  1310. struct host_cmd_ds_txbuf_cfg {
  1311. __le16 action;
  1312. __le16 buff_size;
  1313. __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
  1314. __le16 reserved3;
  1315. } __packed;
  1316. struct host_cmd_ds_amsdu_aggr_ctrl {
  1317. __le16 action;
  1318. __le16 enable;
  1319. __le16 curr_buf_size;
  1320. } __packed;
  1321. struct host_cmd_ds_sta_deauth {
  1322. u8 mac[ETH_ALEN];
  1323. __le16 reason;
  1324. } __packed;
  1325. struct mwifiex_ie_types_sta_info {
  1326. struct mwifiex_ie_types_header header;
  1327. u8 mac[ETH_ALEN];
  1328. u8 power_mfg_status;
  1329. s8 rssi;
  1330. };
  1331. struct host_cmd_ds_sta_list {
  1332. u16 sta_count;
  1333. u8 tlv[0];
  1334. } __packed;
  1335. struct mwifiex_ie_types_pwr_capability {
  1336. struct mwifiex_ie_types_header header;
  1337. s8 min_pwr;
  1338. s8 max_pwr;
  1339. };
  1340. struct mwifiex_ie_types_local_pwr_constraint {
  1341. struct mwifiex_ie_types_header header;
  1342. u8 chan;
  1343. u8 constraint;
  1344. };
  1345. struct mwifiex_ie_types_wmm_param_set {
  1346. struct mwifiex_ie_types_header header;
  1347. u8 wmm_ie[1];
  1348. };
  1349. struct mwifiex_ie_types_wmm_queue_status {
  1350. struct mwifiex_ie_types_header header;
  1351. u8 queue_index;
  1352. u8 disabled;
  1353. __le16 medium_time;
  1354. u8 flow_required;
  1355. u8 flow_created;
  1356. u32 reserved;
  1357. };
  1358. struct ieee_types_vendor_header {
  1359. u8 element_id;
  1360. u8 len;
  1361. u8 oui[4]; /* 0~2: oui, 3: oui_type */
  1362. u8 oui_subtype;
  1363. u8 version;
  1364. } __packed;
  1365. struct ieee_types_wmm_parameter {
  1366. /*
  1367. * WMM Parameter IE - Vendor Specific Header:
  1368. * element_id [221/0xdd]
  1369. * Len [24]
  1370. * Oui [00:50:f2]
  1371. * OuiType [2]
  1372. * OuiSubType [1]
  1373. * Version [1]
  1374. */
  1375. struct ieee_types_vendor_header vend_hdr;
  1376. u8 qos_info_bitmap;
  1377. u8 reserved;
  1378. struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
  1379. } __packed;
  1380. struct ieee_types_wmm_info {
  1381. /*
  1382. * WMM Info IE - Vendor Specific Header:
  1383. * element_id [221/0xdd]
  1384. * Len [7]
  1385. * Oui [00:50:f2]
  1386. * OuiType [2]
  1387. * OuiSubType [0]
  1388. * Version [1]
  1389. */
  1390. struct ieee_types_vendor_header vend_hdr;
  1391. u8 qos_info_bitmap;
  1392. } __packed;
  1393. struct host_cmd_ds_wmm_get_status {
  1394. u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
  1395. IEEE80211_NUM_ACS];
  1396. u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
  1397. } __packed;
  1398. struct mwifiex_wmm_ac_status {
  1399. u8 disabled;
  1400. u8 flow_required;
  1401. u8 flow_created;
  1402. };
  1403. struct mwifiex_ie_types_htcap {
  1404. struct mwifiex_ie_types_header header;
  1405. struct ieee80211_ht_cap ht_cap;
  1406. } __packed;
  1407. struct mwifiex_ie_types_vhtcap {
  1408. struct mwifiex_ie_types_header header;
  1409. struct ieee80211_vht_cap vht_cap;
  1410. } __packed;
  1411. struct mwifiex_ie_types_aid {
  1412. struct mwifiex_ie_types_header header;
  1413. __le16 aid;
  1414. } __packed;
  1415. struct mwifiex_ie_types_oper_mode_ntf {
  1416. struct mwifiex_ie_types_header header;
  1417. u8 oper_mode;
  1418. } __packed;
  1419. /* VHT Operations IE */
  1420. struct mwifiex_ie_types_vht_oper {
  1421. struct mwifiex_ie_types_header header;
  1422. u8 chan_width;
  1423. u8 chan_center_freq_1;
  1424. u8 chan_center_freq_2;
  1425. /* Basic MCS set map, each 2 bits stands for a NSS */
  1426. __le16 basic_mcs_map;
  1427. } __packed;
  1428. struct mwifiex_ie_types_wmmcap {
  1429. struct mwifiex_ie_types_header header;
  1430. struct mwifiex_types_wmm_info wmm_info;
  1431. } __packed;
  1432. struct mwifiex_ie_types_htinfo {
  1433. struct mwifiex_ie_types_header header;
  1434. struct ieee80211_ht_operation ht_oper;
  1435. } __packed;
  1436. struct mwifiex_ie_types_2040bssco {
  1437. struct mwifiex_ie_types_header header;
  1438. u8 bss_co_2040;
  1439. } __packed;
  1440. struct mwifiex_ie_types_extcap {
  1441. struct mwifiex_ie_types_header header;
  1442. u8 ext_capab[0];
  1443. } __packed;
  1444. struct host_cmd_ds_mem_access {
  1445. __le16 action;
  1446. __le16 reserved;
  1447. __le32 addr;
  1448. __le32 value;
  1449. };
  1450. struct mwifiex_ie_types_qos_info {
  1451. struct mwifiex_ie_types_header header;
  1452. u8 qos_info;
  1453. } __packed;
  1454. struct host_cmd_ds_mac_reg_access {
  1455. __le16 action;
  1456. __le16 offset;
  1457. __le32 value;
  1458. } __packed;
  1459. struct host_cmd_ds_bbp_reg_access {
  1460. __le16 action;
  1461. __le16 offset;
  1462. u8 value;
  1463. u8 reserved[3];
  1464. } __packed;
  1465. struct host_cmd_ds_rf_reg_access {
  1466. __le16 action;
  1467. __le16 offset;
  1468. u8 value;
  1469. u8 reserved[3];
  1470. } __packed;
  1471. struct host_cmd_ds_pmic_reg_access {
  1472. __le16 action;
  1473. __le16 offset;
  1474. u8 value;
  1475. u8 reserved[3];
  1476. } __packed;
  1477. struct host_cmd_ds_802_11_eeprom_access {
  1478. __le16 action;
  1479. __le16 offset;
  1480. __le16 byte_count;
  1481. u8 value;
  1482. } __packed;
  1483. struct mwifiex_assoc_event {
  1484. u8 sta_addr[ETH_ALEN];
  1485. __le16 type;
  1486. __le16 len;
  1487. __le16 frame_control;
  1488. __le16 cap_info;
  1489. __le16 listen_interval;
  1490. u8 data[0];
  1491. } __packed;
  1492. struct host_cmd_ds_sys_config {
  1493. __le16 action;
  1494. u8 tlv[0];
  1495. };
  1496. struct host_cmd_11ac_vht_cfg {
  1497. __le16 action;
  1498. u8 band_config;
  1499. u8 misc_config;
  1500. __le32 cap_info;
  1501. __le32 mcs_tx_set;
  1502. __le32 mcs_rx_set;
  1503. } __packed;
  1504. struct host_cmd_tlv_akmp {
  1505. struct mwifiex_ie_types_header header;
  1506. __le16 key_mgmt;
  1507. __le16 key_mgmt_operation;
  1508. } __packed;
  1509. struct host_cmd_tlv_pwk_cipher {
  1510. struct mwifiex_ie_types_header header;
  1511. __le16 proto;
  1512. u8 cipher;
  1513. u8 reserved;
  1514. } __packed;
  1515. struct host_cmd_tlv_gwk_cipher {
  1516. struct mwifiex_ie_types_header header;
  1517. u8 cipher;
  1518. u8 reserved;
  1519. } __packed;
  1520. struct host_cmd_tlv_passphrase {
  1521. struct mwifiex_ie_types_header header;
  1522. u8 passphrase[0];
  1523. } __packed;
  1524. struct host_cmd_tlv_wep_key {
  1525. struct mwifiex_ie_types_header header;
  1526. u8 key_index;
  1527. u8 is_default;
  1528. u8 key[1];
  1529. };
  1530. struct host_cmd_tlv_auth_type {
  1531. struct mwifiex_ie_types_header header;
  1532. u8 auth_type;
  1533. } __packed;
  1534. struct host_cmd_tlv_encrypt_protocol {
  1535. struct mwifiex_ie_types_header header;
  1536. __le16 proto;
  1537. } __packed;
  1538. struct host_cmd_tlv_ssid {
  1539. struct mwifiex_ie_types_header header;
  1540. u8 ssid[0];
  1541. } __packed;
  1542. struct host_cmd_tlv_rates {
  1543. struct mwifiex_ie_types_header header;
  1544. u8 rates[0];
  1545. } __packed;
  1546. struct mwifiex_ie_types_bssid_list {
  1547. struct mwifiex_ie_types_header header;
  1548. u8 bssid[ETH_ALEN];
  1549. } __packed;
  1550. struct host_cmd_tlv_bcast_ssid {
  1551. struct mwifiex_ie_types_header header;
  1552. u8 bcast_ctl;
  1553. } __packed;
  1554. struct host_cmd_tlv_beacon_period {
  1555. struct mwifiex_ie_types_header header;
  1556. __le16 period;
  1557. } __packed;
  1558. struct host_cmd_tlv_dtim_period {
  1559. struct mwifiex_ie_types_header header;
  1560. u8 period;
  1561. } __packed;
  1562. struct host_cmd_tlv_frag_threshold {
  1563. struct mwifiex_ie_types_header header;
  1564. __le16 frag_thr;
  1565. } __packed;
  1566. struct host_cmd_tlv_rts_threshold {
  1567. struct mwifiex_ie_types_header header;
  1568. __le16 rts_thr;
  1569. } __packed;
  1570. struct host_cmd_tlv_retry_limit {
  1571. struct mwifiex_ie_types_header header;
  1572. u8 limit;
  1573. } __packed;
  1574. struct host_cmd_tlv_mac_addr {
  1575. struct mwifiex_ie_types_header header;
  1576. u8 mac_addr[ETH_ALEN];
  1577. } __packed;
  1578. struct host_cmd_tlv_channel_band {
  1579. struct mwifiex_ie_types_header header;
  1580. u8 band_config;
  1581. u8 channel;
  1582. } __packed;
  1583. struct host_cmd_tlv_ageout_timer {
  1584. struct mwifiex_ie_types_header header;
  1585. __le32 sta_ao_timer;
  1586. } __packed;
  1587. struct host_cmd_tlv_power_constraint {
  1588. struct mwifiex_ie_types_header header;
  1589. u8 constraint;
  1590. } __packed;
  1591. struct mwifiex_ie_types_btcoex_scan_time {
  1592. struct mwifiex_ie_types_header header;
  1593. u8 coex_scan;
  1594. u8 reserved;
  1595. u16 min_scan_time;
  1596. u16 max_scan_time;
  1597. } __packed;
  1598. struct mwifiex_ie_types_btcoex_aggr_win_size {
  1599. struct mwifiex_ie_types_header header;
  1600. u8 coex_win_size;
  1601. u8 tx_win_size;
  1602. u8 rx_win_size;
  1603. u8 reserved;
  1604. } __packed;
  1605. struct mwifiex_ie_types_robust_coex {
  1606. struct mwifiex_ie_types_header header;
  1607. __le32 mode;
  1608. } __packed;
  1609. struct host_cmd_ds_version_ext {
  1610. u8 version_str_sel;
  1611. char version_str[128];
  1612. } __packed;
  1613. struct host_cmd_ds_mgmt_frame_reg {
  1614. __le16 action;
  1615. __le32 mask;
  1616. } __packed;
  1617. struct host_cmd_ds_p2p_mode_cfg {
  1618. __le16 action;
  1619. __le16 mode;
  1620. } __packed;
  1621. struct host_cmd_ds_remain_on_chan {
  1622. __le16 action;
  1623. u8 status;
  1624. u8 reserved;
  1625. u8 band_cfg;
  1626. u8 channel;
  1627. __le32 duration;
  1628. } __packed;
  1629. struct host_cmd_ds_802_11_ibss_status {
  1630. __le16 action;
  1631. __le16 enable;
  1632. u8 bssid[ETH_ALEN];
  1633. __le16 beacon_interval;
  1634. __le16 atim_window;
  1635. __le16 use_g_rate_protect;
  1636. } __packed;
  1637. struct mwifiex_fw_mef_entry {
  1638. u8 mode;
  1639. u8 action;
  1640. __le16 exprsize;
  1641. u8 expr[0];
  1642. } __packed;
  1643. struct host_cmd_ds_mef_cfg {
  1644. __le32 criteria;
  1645. __le16 num_entries;
  1646. struct mwifiex_fw_mef_entry mef_entry[0];
  1647. } __packed;
  1648. #define CONNECTION_TYPE_INFRA 0
  1649. #define CONNECTION_TYPE_ADHOC 1
  1650. #define CONNECTION_TYPE_AP 2
  1651. struct host_cmd_ds_set_bss_mode {
  1652. u8 con_type;
  1653. } __packed;
  1654. struct host_cmd_ds_pcie_details {
  1655. /* TX buffer descriptor ring address */
  1656. u32 txbd_addr_lo;
  1657. u32 txbd_addr_hi;
  1658. /* TX buffer descriptor ring count */
  1659. u32 txbd_count;
  1660. /* RX buffer descriptor ring address */
  1661. u32 rxbd_addr_lo;
  1662. u32 rxbd_addr_hi;
  1663. /* RX buffer descriptor ring count */
  1664. u32 rxbd_count;
  1665. /* Event buffer descriptor ring address */
  1666. u32 evtbd_addr_lo;
  1667. u32 evtbd_addr_hi;
  1668. /* Event buffer descriptor ring count */
  1669. u32 evtbd_count;
  1670. /* Sleep cookie buffer physical address */
  1671. u32 sleep_cookie_addr_lo;
  1672. u32 sleep_cookie_addr_hi;
  1673. } __packed;
  1674. struct mwifiex_ie_types_rssi_threshold {
  1675. struct mwifiex_ie_types_header header;
  1676. u8 abs_value;
  1677. u8 evt_freq;
  1678. } __packed;
  1679. #define MWIFIEX_DFS_REC_HDR_LEN 8
  1680. #define MWIFIEX_DFS_REC_HDR_NUM 10
  1681. #define MWIFIEX_BIN_COUNTER_LEN 7
  1682. struct mwifiex_radar_det_event {
  1683. __le32 detect_count;
  1684. u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/
  1685. u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/
  1686. __le16 pw_chirp_type;
  1687. u8 pw_chirp_idx;
  1688. u8 pw_value;
  1689. u8 pri_radar_type;
  1690. u8 pri_bincnt;
  1691. u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN];
  1692. u8 num_dfs_records;
  1693. u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN];
  1694. __le32 passed;
  1695. } __packed;
  1696. struct mwifiex_ie_types_multi_chan_info {
  1697. struct mwifiex_ie_types_header header;
  1698. __le16 status;
  1699. u8 tlv_buffer[0];
  1700. } __packed;
  1701. struct mwifiex_ie_types_mc_group_info {
  1702. struct mwifiex_ie_types_header header;
  1703. u8 chan_group_id;
  1704. u8 chan_buf_weight;
  1705. u8 band_config;
  1706. u8 chan_num;
  1707. u32 chan_time;
  1708. u32 reserved;
  1709. union {
  1710. u8 sdio_func_num;
  1711. u8 usb_ep_num;
  1712. } hid_num;
  1713. u8 intf_num;
  1714. u8 bss_type_numlist[0];
  1715. } __packed;
  1716. struct meas_rpt_map {
  1717. u8 rssi:3;
  1718. u8 unmeasured:1;
  1719. u8 radar:1;
  1720. u8 unidentified_sig:1;
  1721. u8 ofdm_preamble:1;
  1722. u8 bss:1;
  1723. } __packed;
  1724. struct mwifiex_ie_types_chan_rpt_data {
  1725. struct mwifiex_ie_types_header header;
  1726. struct meas_rpt_map map;
  1727. } __packed;
  1728. struct host_cmd_ds_802_11_subsc_evt {
  1729. __le16 action;
  1730. __le16 events;
  1731. } __packed;
  1732. struct chan_switch_result {
  1733. u8 cur_chan;
  1734. u8 status;
  1735. u8 reason;
  1736. } __packed;
  1737. struct mwifiex_tdls_generic_event {
  1738. __le16 type;
  1739. u8 peer_mac[ETH_ALEN];
  1740. union {
  1741. struct chan_switch_result switch_result;
  1742. u8 cs_stop_reason;
  1743. __le16 reason_code;
  1744. __le16 reserved;
  1745. } u;
  1746. } __packed;
  1747. struct mwifiex_ie {
  1748. __le16 ie_index;
  1749. __le16 mgmt_subtype_mask;
  1750. __le16 ie_length;
  1751. u8 ie_buffer[IEEE_MAX_IE_SIZE];
  1752. } __packed;
  1753. #define MAX_MGMT_IE_INDEX 16
  1754. struct mwifiex_ie_list {
  1755. __le16 type;
  1756. __le16 len;
  1757. struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX];
  1758. } __packed;
  1759. struct coalesce_filt_field_param {
  1760. u8 operation;
  1761. u8 operand_len;
  1762. __le16 offset;
  1763. u8 operand_byte_stream[4];
  1764. };
  1765. struct coalesce_receive_filt_rule {
  1766. struct mwifiex_ie_types_header header;
  1767. u8 num_of_fields;
  1768. u8 pkt_type;
  1769. __le16 max_coalescing_delay;
  1770. struct coalesce_filt_field_param params[0];
  1771. } __packed;
  1772. struct host_cmd_ds_coalesce_cfg {
  1773. __le16 action;
  1774. __le16 num_of_rules;
  1775. struct coalesce_receive_filt_rule rule[0];
  1776. } __packed;
  1777. struct host_cmd_ds_multi_chan_policy {
  1778. __le16 action;
  1779. __le16 policy;
  1780. } __packed;
  1781. struct host_cmd_ds_robust_coex {
  1782. __le16 action;
  1783. __le16 reserved;
  1784. } __packed;
  1785. struct host_cmd_ds_command {
  1786. __le16 command;
  1787. __le16 size;
  1788. __le16 seq_num;
  1789. __le16 result;
  1790. union {
  1791. struct host_cmd_ds_get_hw_spec hw_spec;
  1792. struct host_cmd_ds_mac_control mac_ctrl;
  1793. struct host_cmd_ds_802_11_mac_address mac_addr;
  1794. struct host_cmd_ds_mac_multicast_adr mc_addr;
  1795. struct host_cmd_ds_802_11_get_log get_log;
  1796. struct host_cmd_ds_802_11_rssi_info rssi_info;
  1797. struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
  1798. struct host_cmd_ds_802_11_snmp_mib smib;
  1799. struct host_cmd_ds_tx_rate_query tx_rate;
  1800. struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
  1801. struct host_cmd_ds_txpwr_cfg txp_cfg;
  1802. struct host_cmd_ds_rf_tx_pwr txp;
  1803. struct host_cmd_ds_rf_ant_mimo ant_mimo;
  1804. struct host_cmd_ds_rf_ant_siso ant_siso;
  1805. struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
  1806. struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
  1807. struct host_cmd_ds_802_11_scan scan;
  1808. struct host_cmd_ds_802_11_scan_ext ext_scan;
  1809. struct host_cmd_ds_802_11_scan_rsp scan_resp;
  1810. struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
  1811. struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
  1812. struct host_cmd_ds_802_11_associate associate;
  1813. struct host_cmd_ds_802_11_associate_rsp associate_rsp;
  1814. struct host_cmd_ds_802_11_deauthenticate deauth;
  1815. struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
  1816. struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
  1817. struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
  1818. struct host_cmd_ds_802_11d_domain_info domain_info;
  1819. struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
  1820. struct host_cmd_ds_11n_addba_req add_ba_req;
  1821. struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
  1822. struct host_cmd_ds_11n_delba del_ba;
  1823. struct host_cmd_ds_txbuf_cfg tx_buf;
  1824. struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
  1825. struct host_cmd_ds_11n_cfg htcfg;
  1826. struct host_cmd_ds_wmm_get_status get_wmm_status;
  1827. struct host_cmd_ds_802_11_key_material key_material;
  1828. struct host_cmd_ds_802_11_key_material_v2 key_material_v2;
  1829. struct host_cmd_ds_version_ext verext;
  1830. struct host_cmd_ds_mgmt_frame_reg reg_mask;
  1831. struct host_cmd_ds_remain_on_chan roc_cfg;
  1832. struct host_cmd_ds_p2p_mode_cfg mode_cfg;
  1833. struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
  1834. struct host_cmd_ds_mef_cfg mef_cfg;
  1835. struct host_cmd_ds_mem_access mem;
  1836. struct host_cmd_ds_mac_reg_access mac_reg;
  1837. struct host_cmd_ds_bbp_reg_access bbp_reg;
  1838. struct host_cmd_ds_rf_reg_access rf_reg;
  1839. struct host_cmd_ds_pmic_reg_access pmic_reg;
  1840. struct host_cmd_ds_set_bss_mode bss_mode;
  1841. struct host_cmd_ds_pcie_details pcie_host_spec;
  1842. struct host_cmd_ds_802_11_eeprom_access eeprom;
  1843. struct host_cmd_ds_802_11_subsc_evt subsc_evt;
  1844. struct host_cmd_ds_sys_config uap_sys_config;
  1845. struct host_cmd_ds_sta_deauth sta_deauth;
  1846. struct host_cmd_ds_sta_list sta_list;
  1847. struct host_cmd_11ac_vht_cfg vht_cfg;
  1848. struct host_cmd_ds_coalesce_cfg coalesce_cfg;
  1849. struct host_cmd_ds_tdls_config tdls_config;
  1850. struct host_cmd_ds_tdls_oper tdls_oper;
  1851. struct host_cmd_ds_chan_rpt_req chan_rpt_req;
  1852. struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg;
  1853. struct host_cmd_ds_multi_chan_policy mc_policy;
  1854. struct host_cmd_ds_robust_coex coex;
  1855. } params;
  1856. } __packed;
  1857. struct mwifiex_opt_sleep_confirm {
  1858. __le16 command;
  1859. __le16 size;
  1860. __le16 seq_num;
  1861. __le16 result;
  1862. __le16 action;
  1863. __le16 resp_ctrl;
  1864. } __packed;
  1865. #endif /* !_MWIFIEX_FW_H_ */