wmi.h 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939
  1. /*
  2. * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
  3. * Copyright (c) 2006-2012 Wilocity
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. /*
  18. * This file contains the definitions of the WMI protocol specified in the
  19. * Wireless Module Interface (WMI) for the Qualcomm
  20. * 60 GHz wireless solution.
  21. * It includes definitions of all the commands and events.
  22. * Commands are messages from the host to the WM.
  23. * Events are messages from the WM to the host.
  24. *
  25. * This is an automatically generated file.
  26. */
  27. #ifndef __WILOCITY_WMI_H__
  28. #define __WILOCITY_WMI_H__
  29. /* General */
  30. #define WMI_MAX_ASSOC_STA (8)
  31. #define WMI_DEFAULT_ASSOC_STA (1)
  32. #define WMI_MAC_LEN (6)
  33. #define WMI_PROX_RANGE_NUM (3)
  34. #define WMI_MAX_LOSS_DMG_BEACONS (20)
  35. #define MAX_NUM_OF_SECTORS (128)
  36. #define WMI_SCHED_MAX_ALLOCS_PER_CMD (4)
  37. #define WMI_RF_DTYPE_LENGTH (3)
  38. #define WMI_RF_ETYPE_LENGTH (3)
  39. #define WMI_RF_RX2TX_LENGTH (3)
  40. #define WMI_RF_ETYPE_VAL_PER_RANGE (5)
  41. /* Mailbox interface
  42. * used for commands and events
  43. */
  44. enum wmi_mid {
  45. MID_DEFAULT = 0x00,
  46. FIRST_DBG_MID_ID = 0x10,
  47. LAST_DBG_MID_ID = 0xFE,
  48. MID_BROADCAST = 0xFF,
  49. };
  50. /* FW capability IDs
  51. * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
  52. * the host
  53. */
  54. enum wmi_fw_capability {
  55. WMI_FW_CAPABILITY_FTM = 0,
  56. WMI_FW_CAPABILITY_PS_CONFIG = 1,
  57. WMI_FW_CAPABILITY_RF_SECTORS = 2,
  58. WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3,
  59. WMI_FW_CAPABILITY_DISABLE_AP_SME = 4,
  60. WMI_FW_CAPABILITY_WMI_ONLY = 5,
  61. WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7,
  62. WMI_FW_CAPABILITY_D3_SUSPEND = 8,
  63. WMI_FW_CAPABILITY_LONG_RANGE = 9,
  64. WMI_FW_CAPABILITY_FIXED_SCHEDULING = 10,
  65. WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS = 11,
  66. WMI_FW_CAPABILITY_RSSI_REPORTING = 12,
  67. WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13,
  68. WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14,
  69. WMI_FW_CAPABILITY_PNO = 15,
  70. WMI_FW_CAPABILITY_REF_CLOCK_CONTROL = 18,
  71. WMI_FW_CAPABILITY_MAX,
  72. };
  73. /* WMI_CMD_HDR */
  74. struct wmi_cmd_hdr {
  75. u8 mid;
  76. u8 reserved;
  77. __le16 command_id;
  78. __le32 fw_timestamp;
  79. } __packed;
  80. /* List of Commands */
  81. enum wmi_command_id {
  82. WMI_CONNECT_CMDID = 0x01,
  83. WMI_DISCONNECT_CMDID = 0x03,
  84. WMI_DISCONNECT_STA_CMDID = 0x04,
  85. WMI_START_SCHED_SCAN_CMDID = 0x05,
  86. WMI_STOP_SCHED_SCAN_CMDID = 0x06,
  87. WMI_START_SCAN_CMDID = 0x07,
  88. WMI_SET_BSS_FILTER_CMDID = 0x09,
  89. WMI_SET_PROBED_SSID_CMDID = 0x0A,
  90. /* deprecated */
  91. WMI_SET_LISTEN_INT_CMDID = 0x0B,
  92. WMI_BCON_CTRL_CMDID = 0x0F,
  93. WMI_ADD_CIPHER_KEY_CMDID = 0x16,
  94. WMI_DELETE_CIPHER_KEY_CMDID = 0x17,
  95. WMI_PCP_CONF_CMDID = 0x18,
  96. WMI_SET_APPIE_CMDID = 0x3F,
  97. WMI_SET_WSC_STATUS_CMDID = 0x41,
  98. WMI_PXMT_RANGE_CFG_CMDID = 0x42,
  99. WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43,
  100. WMI_MEM_READ_CMDID = 0x800,
  101. WMI_MEM_WR_CMDID = 0x801,
  102. WMI_ECHO_CMDID = 0x803,
  103. WMI_DEEP_ECHO_CMDID = 0x804,
  104. WMI_CONFIG_MAC_CMDID = 0x805,
  105. /* deprecated */
  106. WMI_CONFIG_PHY_DEBUG_CMDID = 0x806,
  107. WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808,
  108. WMI_PHY_GET_STATISTICS_CMDID = 0x809,
  109. /* deprecated */
  110. WMI_FS_TUNE_CMDID = 0x80A,
  111. /* deprecated */
  112. WMI_CORR_MEASURE_CMDID = 0x80B,
  113. WMI_READ_RSSI_CMDID = 0x80C,
  114. WMI_TEMP_SENSE_CMDID = 0x80E,
  115. WMI_DC_CALIB_CMDID = 0x80F,
  116. /* deprecated */
  117. WMI_SEND_TONE_CMDID = 0x810,
  118. /* deprecated */
  119. WMI_IQ_TX_CALIB_CMDID = 0x811,
  120. /* deprecated */
  121. WMI_IQ_RX_CALIB_CMDID = 0x812,
  122. WMI_SET_WORK_MODE_CMDID = 0x815,
  123. WMI_LO_LEAKAGE_CALIB_CMDID = 0x816,
  124. WMI_LO_POWER_CALIB_FROM_OTP_CMDID = 0x817,
  125. WMI_SILENT_RSSI_CALIB_CMDID = 0x81D,
  126. /* deprecated */
  127. WMI_RF_RX_TEST_CMDID = 0x81E,
  128. WMI_CFG_RX_CHAIN_CMDID = 0x820,
  129. WMI_VRING_CFG_CMDID = 0x821,
  130. WMI_BCAST_VRING_CFG_CMDID = 0x822,
  131. WMI_VRING_BA_EN_CMDID = 0x823,
  132. WMI_VRING_BA_DIS_CMDID = 0x824,
  133. WMI_RCP_ADDBA_RESP_CMDID = 0x825,
  134. WMI_RCP_DELBA_CMDID = 0x826,
  135. WMI_SET_SSID_CMDID = 0x827,
  136. WMI_GET_SSID_CMDID = 0x828,
  137. WMI_SET_PCP_CHANNEL_CMDID = 0x829,
  138. WMI_GET_PCP_CHANNEL_CMDID = 0x82A,
  139. WMI_SW_TX_REQ_CMDID = 0x82B,
  140. WMI_MLME_PUSH_CMDID = 0x835,
  141. WMI_BEAMFORMING_MGMT_CMDID = 0x836,
  142. WMI_BF_TXSS_MGMT_CMDID = 0x837,
  143. WMI_BF_SM_MGMT_CMDID = 0x838,
  144. WMI_BF_RXSS_MGMT_CMDID = 0x839,
  145. WMI_BF_TRIG_CMDID = 0x83A,
  146. WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842,
  147. WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843,
  148. WMI_SET_SECTORS_CMDID = 0x849,
  149. WMI_MAINTAIN_PAUSE_CMDID = 0x850,
  150. WMI_MAINTAIN_RESUME_CMDID = 0x851,
  151. WMI_RS_MGMT_CMDID = 0x852,
  152. WMI_RF_MGMT_CMDID = 0x853,
  153. WMI_RF_XPM_READ_CMDID = 0x856,
  154. WMI_RF_XPM_WRITE_CMDID = 0x857,
  155. WMI_LED_CFG_CMDID = 0x858,
  156. WMI_SET_CONNECT_SNR_THR_CMDID = 0x85B,
  157. WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID = 0x85C,
  158. WMI_RF_PWR_ON_DELAY_CMDID = 0x85D,
  159. WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID = 0x85E,
  160. /* Performance monitoring commands */
  161. WMI_BF_CTRL_CMDID = 0x862,
  162. WMI_NOTIFY_REQ_CMDID = 0x863,
  163. WMI_GET_STATUS_CMDID = 0x864,
  164. WMI_GET_RF_STATUS_CMDID = 0x866,
  165. WMI_GET_BASEBAND_TYPE_CMDID = 0x867,
  166. WMI_UNIT_TEST_CMDID = 0x900,
  167. WMI_FLASH_READ_CMDID = 0x902,
  168. WMI_FLASH_WRITE_CMDID = 0x903,
  169. /* Power management */
  170. WMI_TRAFFIC_SUSPEND_CMDID = 0x904,
  171. WMI_TRAFFIC_RESUME_CMDID = 0x905,
  172. /* P2P */
  173. WMI_P2P_CFG_CMDID = 0x910,
  174. WMI_PORT_ALLOCATE_CMDID = 0x911,
  175. WMI_PORT_DELETE_CMDID = 0x912,
  176. WMI_POWER_MGMT_CFG_CMDID = 0x913,
  177. WMI_START_LISTEN_CMDID = 0x914,
  178. WMI_START_SEARCH_CMDID = 0x915,
  179. WMI_DISCOVERY_START_CMDID = 0x916,
  180. WMI_DISCOVERY_STOP_CMDID = 0x917,
  181. WMI_PCP_START_CMDID = 0x918,
  182. WMI_PCP_STOP_CMDID = 0x919,
  183. WMI_GET_PCP_FACTOR_CMDID = 0x91B,
  184. /* Power Save Configuration Commands */
  185. WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C,
  186. WMI_RS_CFG_CMDID = 0x921,
  187. WMI_GET_DETAILED_RS_RES_CMDID = 0x922,
  188. WMI_AOA_MEAS_CMDID = 0x923,
  189. WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924,
  190. WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930,
  191. WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931,
  192. WMI_NEW_STA_CMDID = 0x935,
  193. WMI_DEL_STA_CMDID = 0x936,
  194. WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940,
  195. WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941,
  196. /* Read Power Save profile type */
  197. WMI_PS_DEV_PROFILE_CFG_READ_CMDID = 0x942,
  198. WMI_TOF_SESSION_START_CMDID = 0x991,
  199. WMI_TOF_GET_CAPABILITIES_CMDID = 0x992,
  200. WMI_TOF_SET_LCR_CMDID = 0x993,
  201. WMI_TOF_SET_LCI_CMDID = 0x994,
  202. WMI_TOF_CFG_RESPONDER_CMDID = 0x996,
  203. WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997,
  204. WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998,
  205. WMI_TOF_CHANNEL_INFO_CMDID = 0x999,
  206. WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0,
  207. WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1,
  208. WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2,
  209. WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3,
  210. WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4,
  211. WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5,
  212. WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6,
  213. WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7,
  214. WMI_SCHEDULING_SCHEME_CMDID = 0xA01,
  215. WMI_FIXED_SCHEDULING_CONFIG_CMDID = 0xA02,
  216. WMI_ENABLE_FIXED_SCHEDULING_CMDID = 0xA03,
  217. WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID = 0xA04,
  218. WMI_SET_LONG_RANGE_CONFIG_CMDID = 0xA05,
  219. WMI_SET_MAC_ADDRESS_CMDID = 0xF003,
  220. WMI_ABORT_SCAN_CMDID = 0xF007,
  221. WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041,
  222. /* deprecated */
  223. WMI_GET_PMK_CMDID = 0xF048,
  224. WMI_SET_PASSPHRASE_CMDID = 0xF049,
  225. /* deprecated */
  226. WMI_SEND_ASSOC_RES_CMDID = 0xF04A,
  227. /* deprecated */
  228. WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B,
  229. WMI_MAC_ADDR_REQ_CMDID = 0xF04D,
  230. WMI_FW_VER_CMDID = 0xF04E,
  231. WMI_PMC_CMDID = 0xF04F,
  232. };
  233. /* WMI_CONNECT_CMDID */
  234. enum wmi_network_type {
  235. WMI_NETTYPE_INFRA = 0x01,
  236. WMI_NETTYPE_ADHOC = 0x02,
  237. WMI_NETTYPE_ADHOC_CREATOR = 0x04,
  238. WMI_NETTYPE_AP = 0x10,
  239. WMI_NETTYPE_P2P = 0x20,
  240. /* PCIE over 60g */
  241. WMI_NETTYPE_WBE = 0x40,
  242. };
  243. enum wmi_dot11_auth_mode {
  244. WMI_AUTH11_OPEN = 0x01,
  245. WMI_AUTH11_SHARED = 0x02,
  246. WMI_AUTH11_LEAP = 0x04,
  247. WMI_AUTH11_WSC = 0x08,
  248. };
  249. enum wmi_auth_mode {
  250. WMI_AUTH_NONE = 0x01,
  251. WMI_AUTH_WPA = 0x02,
  252. WMI_AUTH_WPA2 = 0x04,
  253. WMI_AUTH_WPA_PSK = 0x08,
  254. WMI_AUTH_WPA2_PSK = 0x10,
  255. WMI_AUTH_WPA_CCKM = 0x20,
  256. WMI_AUTH_WPA2_CCKM = 0x40,
  257. };
  258. enum wmi_crypto_type {
  259. WMI_CRYPT_NONE = 0x01,
  260. WMI_CRYPT_AES_GCMP = 0x20,
  261. };
  262. enum wmi_connect_ctrl_flag_bits {
  263. WMI_CONNECT_ASSOC_POLICY_USER = 0x01,
  264. WMI_CONNECT_SEND_REASSOC = 0x02,
  265. WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04,
  266. WMI_CONNECT_PROFILE_MATCH_DONE = 0x08,
  267. WMI_CONNECT_IGNORE_AAC_BEACON = 0x10,
  268. WMI_CONNECT_CSA_FOLLOW_BSS = 0x20,
  269. WMI_CONNECT_DO_WPA_OFFLOAD = 0x40,
  270. WMI_CONNECT_DO_NOT_DEAUTH = 0x80,
  271. };
  272. #define WMI_MAX_SSID_LEN (32)
  273. /* WMI_CONNECT_CMDID */
  274. struct wmi_connect_cmd {
  275. u8 network_type;
  276. u8 dot11_auth_mode;
  277. u8 auth_mode;
  278. u8 pairwise_crypto_type;
  279. u8 pairwise_crypto_len;
  280. u8 group_crypto_type;
  281. u8 group_crypto_len;
  282. u8 ssid_len;
  283. u8 ssid[WMI_MAX_SSID_LEN];
  284. u8 channel;
  285. u8 reserved0;
  286. u8 bssid[WMI_MAC_LEN];
  287. __le32 ctrl_flags;
  288. u8 dst_mac[WMI_MAC_LEN];
  289. u8 reserved1[2];
  290. } __packed;
  291. /* WMI_DISCONNECT_STA_CMDID */
  292. struct wmi_disconnect_sta_cmd {
  293. u8 dst_mac[WMI_MAC_LEN];
  294. __le16 disconnect_reason;
  295. } __packed;
  296. #define WMI_MAX_KEY_INDEX (3)
  297. #define WMI_MAX_KEY_LEN (32)
  298. #define WMI_PASSPHRASE_LEN (64)
  299. /* WMI_SET_PASSPHRASE_CMDID */
  300. struct wmi_set_passphrase_cmd {
  301. u8 ssid[WMI_MAX_SSID_LEN];
  302. u8 passphrase[WMI_PASSPHRASE_LEN];
  303. u8 ssid_len;
  304. u8 passphrase_len;
  305. } __packed;
  306. /* WMI_ADD_CIPHER_KEY_CMDID */
  307. enum wmi_key_usage {
  308. WMI_KEY_USE_PAIRWISE = 0x00,
  309. WMI_KEY_USE_RX_GROUP = 0x01,
  310. WMI_KEY_USE_TX_GROUP = 0x02,
  311. };
  312. struct wmi_add_cipher_key_cmd {
  313. u8 key_index;
  314. u8 key_type;
  315. /* enum wmi_key_usage */
  316. u8 key_usage;
  317. u8 key_len;
  318. /* key replay sequence counter */
  319. u8 key_rsc[8];
  320. u8 key[WMI_MAX_KEY_LEN];
  321. /* Additional Key Control information */
  322. u8 key_op_ctrl;
  323. u8 mac[WMI_MAC_LEN];
  324. } __packed;
  325. /* WMI_DELETE_CIPHER_KEY_CMDID */
  326. struct wmi_delete_cipher_key_cmd {
  327. u8 key_index;
  328. u8 mac[WMI_MAC_LEN];
  329. } __packed;
  330. /* WMI_START_SCAN_CMDID
  331. *
  332. * Start L1 scan operation
  333. *
  334. * Returned events:
  335. * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
  336. * - WMI_SCAN_COMPLETE_EVENTID
  337. */
  338. enum wmi_scan_type {
  339. WMI_ACTIVE_SCAN = 0x00,
  340. WMI_SHORT_SCAN = 0x01,
  341. WMI_PASSIVE_SCAN = 0x02,
  342. WMI_DIRECT_SCAN = 0x03,
  343. WMI_LONG_SCAN = 0x04,
  344. };
  345. /* WMI_START_SCAN_CMDID */
  346. struct wmi_start_scan_cmd {
  347. u8 direct_scan_mac_addr[WMI_MAC_LEN];
  348. /* run scan with discovery beacon. Relevant for ACTIVE scan only. */
  349. u8 discovery_mode;
  350. u8 reserved;
  351. /* Max duration in the home channel(ms) */
  352. __le32 dwell_time;
  353. /* Time interval between scans (ms) */
  354. __le32 force_scan_interval;
  355. /* enum wmi_scan_type */
  356. u8 scan_type;
  357. /* how many channels follow */
  358. u8 num_channels;
  359. /* channels ID's:
  360. * 0 - 58320 MHz
  361. * 1 - 60480 MHz
  362. * 2 - 62640 MHz
  363. */
  364. struct {
  365. u8 channel;
  366. u8 reserved;
  367. } channel_list[0];
  368. } __packed;
  369. #define WMI_MAX_PNO_SSID_NUM (16)
  370. #define WMI_MAX_CHANNEL_NUM (6)
  371. #define WMI_MAX_PLANS_NUM (2)
  372. /* WMI_START_SCHED_SCAN_CMDID */
  373. struct wmi_sched_scan_ssid_match {
  374. u8 ssid_len;
  375. u8 ssid[WMI_MAX_SSID_LEN];
  376. s8 rssi_threshold;
  377. /* boolean */
  378. u8 add_ssid_to_probe;
  379. u8 reserved;
  380. } __packed;
  381. /* WMI_START_SCHED_SCAN_CMDID */
  382. struct wmi_sched_scan_plan {
  383. __le16 interval_sec;
  384. __le16 num_of_iterations;
  385. } __packed;
  386. /* WMI_START_SCHED_SCAN_CMDID */
  387. struct wmi_start_sched_scan_cmd {
  388. struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
  389. u8 num_of_ssids;
  390. s8 min_rssi_threshold;
  391. u8 channel_list[WMI_MAX_CHANNEL_NUM];
  392. u8 num_of_channels;
  393. u8 reserved;
  394. __le16 initial_delay_sec;
  395. struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
  396. } __packed;
  397. /* WMI_SET_PROBED_SSID_CMDID */
  398. #define MAX_PROBED_SSID_INDEX (3)
  399. enum wmi_ssid_flag {
  400. /* disables entry */
  401. WMI_SSID_FLAG_DISABLE = 0x00,
  402. /* probes specified ssid */
  403. WMI_SSID_FLAG_SPECIFIC = 0x01,
  404. /* probes for any ssid */
  405. WMI_SSID_FLAG_ANY = 0x02,
  406. };
  407. struct wmi_probed_ssid_cmd {
  408. /* 0 to MAX_PROBED_SSID_INDEX */
  409. u8 entry_index;
  410. /* enum wmi_ssid_flag */
  411. u8 flag;
  412. u8 ssid_len;
  413. u8 ssid[WMI_MAX_SSID_LEN];
  414. } __packed;
  415. /* WMI_SET_APPIE_CMDID
  416. * Add Application specified IE to a management frame
  417. */
  418. #define WMI_MAX_IE_LEN (1024)
  419. /* Frame Types */
  420. enum wmi_mgmt_frame_type {
  421. WMI_FRAME_BEACON = 0x00,
  422. WMI_FRAME_PROBE_REQ = 0x01,
  423. WMI_FRAME_PROBE_RESP = 0x02,
  424. WMI_FRAME_ASSOC_REQ = 0x03,
  425. WMI_FRAME_ASSOC_RESP = 0x04,
  426. WMI_NUM_MGMT_FRAME = 0x05,
  427. };
  428. struct wmi_set_appie_cmd {
  429. /* enum wmi_mgmt_frame_type */
  430. u8 mgmt_frm_type;
  431. u8 reserved;
  432. /* Length of the IE to be added to MGMT frame */
  433. __le16 ie_len;
  434. u8 ie_info[0];
  435. } __packed;
  436. /* WMI_PXMT_RANGE_CFG_CMDID */
  437. struct wmi_pxmt_range_cfg_cmd {
  438. u8 dst_mac[WMI_MAC_LEN];
  439. __le16 range;
  440. } __packed;
  441. /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
  442. struct wmi_pxmt_snr2_range_cfg_cmd {
  443. s8 snr2range_arr[2];
  444. } __packed;
  445. /* WMI_RF_MGMT_CMDID */
  446. enum wmi_rf_mgmt_type {
  447. WMI_RF_MGMT_W_DISABLE = 0x00,
  448. WMI_RF_MGMT_W_ENABLE = 0x01,
  449. WMI_RF_MGMT_GET_STATUS = 0x02,
  450. };
  451. /* WMI_RF_MGMT_CMDID */
  452. struct wmi_rf_mgmt_cmd {
  453. __le32 rf_mgmt_type;
  454. } __packed;
  455. /* WMI_CORR_MEASURE_CMDID */
  456. struct wmi_corr_measure_cmd {
  457. __le32 freq_mhz;
  458. __le32 length_samples;
  459. __le32 iterations;
  460. } __packed;
  461. /* WMI_SET_SSID_CMDID */
  462. struct wmi_set_ssid_cmd {
  463. __le32 ssid_len;
  464. u8 ssid[WMI_MAX_SSID_LEN];
  465. } __packed;
  466. /* WMI_SET_PCP_CHANNEL_CMDID */
  467. struct wmi_set_pcp_channel_cmd {
  468. u8 channel;
  469. u8 reserved[3];
  470. } __packed;
  471. /* WMI_BCON_CTRL_CMDID */
  472. struct wmi_bcon_ctrl_cmd {
  473. __le16 bcon_interval;
  474. __le16 frag_num;
  475. __le64 ss_mask;
  476. u8 network_type;
  477. u8 pcp_max_assoc_sta;
  478. u8 disable_sec_offload;
  479. u8 disable_sec;
  480. u8 hidden_ssid;
  481. u8 is_go;
  482. u8 reserved[2];
  483. } __packed;
  484. /* WMI_PORT_ALLOCATE_CMDID */
  485. enum wmi_port_role {
  486. WMI_PORT_STA = 0x00,
  487. WMI_PORT_PCP = 0x01,
  488. WMI_PORT_AP = 0x02,
  489. WMI_PORT_P2P_DEV = 0x03,
  490. WMI_PORT_P2P_CLIENT = 0x04,
  491. WMI_PORT_P2P_GO = 0x05,
  492. };
  493. /* WMI_PORT_ALLOCATE_CMDID */
  494. struct wmi_port_allocate_cmd {
  495. u8 mac[WMI_MAC_LEN];
  496. u8 port_role;
  497. u8 mid;
  498. } __packed;
  499. /* WMI_PORT_DELETE_CMDID */
  500. struct wmi_port_delete_cmd {
  501. u8 mid;
  502. u8 reserved[3];
  503. } __packed;
  504. /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
  505. enum wmi_wakeup_trigger {
  506. WMI_WAKEUP_TRIGGER_UCAST = 0x01,
  507. WMI_WAKEUP_TRIGGER_BCAST = 0x02,
  508. };
  509. /* WMI_TRAFFIC_SUSPEND_CMDID */
  510. struct wmi_traffic_suspend_cmd {
  511. /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
  512. u8 wakeup_trigger;
  513. } __packed;
  514. /* WMI_P2P_CFG_CMDID */
  515. enum wmi_discovery_mode {
  516. WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00,
  517. WMI_DISCOVERY_MODE_OFFLOAD = 0x01,
  518. WMI_DISCOVERY_MODE_PEER2PEER = 0x02,
  519. };
  520. struct wmi_p2p_cfg_cmd {
  521. /* enum wmi_discovery_mode */
  522. u8 discovery_mode;
  523. u8 channel;
  524. /* base to listen/search duration calculation */
  525. __le16 bcon_interval;
  526. } __packed;
  527. /* WMI_POWER_MGMT_CFG_CMDID */
  528. enum wmi_power_source_type {
  529. WMI_POWER_SOURCE_BATTERY = 0x00,
  530. WMI_POWER_SOURCE_OTHER = 0x01,
  531. };
  532. struct wmi_power_mgmt_cfg_cmd {
  533. /* enum wmi_power_source_type */
  534. u8 power_source;
  535. u8 reserved[3];
  536. } __packed;
  537. /* WMI_PCP_START_CMDID */
  538. struct wmi_pcp_start_cmd {
  539. __le16 bcon_interval;
  540. u8 pcp_max_assoc_sta;
  541. u8 hidden_ssid;
  542. u8 is_go;
  543. u8 reserved0[5];
  544. /* A-BFT length override if non-0 */
  545. u8 abft_len;
  546. u8 disable_ap_sme;
  547. u8 network_type;
  548. u8 channel;
  549. u8 disable_sec_offload;
  550. u8 disable_sec;
  551. } __packed;
  552. /* WMI_SW_TX_REQ_CMDID */
  553. struct wmi_sw_tx_req_cmd {
  554. u8 dst_mac[WMI_MAC_LEN];
  555. __le16 len;
  556. u8 payload[0];
  557. } __packed;
  558. struct wmi_sw_ring_cfg {
  559. __le64 ring_mem_base;
  560. __le16 ring_size;
  561. __le16 max_mpdu_size;
  562. } __packed;
  563. /* wmi_vring_cfg_schd */
  564. struct wmi_vring_cfg_schd {
  565. __le16 priority;
  566. __le16 timeslot_us;
  567. } __packed;
  568. enum wmi_vring_cfg_encap_trans_type {
  569. WMI_VRING_ENC_TYPE_802_3 = 0x00,
  570. WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01,
  571. };
  572. enum wmi_vring_cfg_ds_cfg {
  573. WMI_VRING_DS_PBSS = 0x00,
  574. WMI_VRING_DS_STATION = 0x01,
  575. WMI_VRING_DS_AP = 0x02,
  576. WMI_VRING_DS_ADDR4 = 0x03,
  577. };
  578. enum wmi_vring_cfg_nwifi_ds_trans_type {
  579. WMI_NWIFI_TX_TRANS_MODE_NO = 0x00,
  580. WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01,
  581. WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02,
  582. };
  583. enum wmi_vring_cfg_schd_params_priority {
  584. WMI_SCH_PRIO_REGULAR = 0x00,
  585. WMI_SCH_PRIO_HIGH = 0x01,
  586. };
  587. #define CIDXTID_CID_POS (0)
  588. #define CIDXTID_CID_LEN (4)
  589. #define CIDXTID_CID_MSK (0xF)
  590. #define CIDXTID_TID_POS (4)
  591. #define CIDXTID_TID_LEN (4)
  592. #define CIDXTID_TID_MSK (0xF0)
  593. #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0)
  594. #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1)
  595. #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1)
  596. #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1)
  597. #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1)
  598. #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2)
  599. #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0)
  600. #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6)
  601. #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F)
  602. struct wmi_vring_cfg {
  603. struct wmi_sw_ring_cfg tx_sw_ring;
  604. /* 0-23 vrings */
  605. u8 ringid;
  606. u8 cidxtid;
  607. u8 encap_trans_type;
  608. /* 802.3 DS cfg */
  609. u8 ds_cfg;
  610. u8 nwifi_ds_trans_type;
  611. u8 mac_ctrl;
  612. u8 to_resolution;
  613. u8 agg_max_wsize;
  614. struct wmi_vring_cfg_schd schd_params;
  615. } __packed;
  616. enum wmi_vring_cfg_cmd_action {
  617. WMI_VRING_CMD_ADD = 0x00,
  618. WMI_VRING_CMD_MODIFY = 0x01,
  619. WMI_VRING_CMD_DELETE = 0x02,
  620. };
  621. /* WMI_VRING_CFG_CMDID */
  622. struct wmi_vring_cfg_cmd {
  623. __le32 action;
  624. struct wmi_vring_cfg vring_cfg;
  625. } __packed;
  626. struct wmi_bcast_vring_cfg {
  627. struct wmi_sw_ring_cfg tx_sw_ring;
  628. /* 0-23 vrings */
  629. u8 ringid;
  630. u8 encap_trans_type;
  631. /* 802.3 DS cfg */
  632. u8 ds_cfg;
  633. u8 nwifi_ds_trans_type;
  634. } __packed;
  635. /* WMI_BCAST_VRING_CFG_CMDID */
  636. struct wmi_bcast_vring_cfg_cmd {
  637. __le32 action;
  638. struct wmi_bcast_vring_cfg vring_cfg;
  639. } __packed;
  640. /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
  641. struct wmi_lo_power_calib_from_otp_cmd {
  642. /* index to read from OTP. zero based */
  643. u8 index;
  644. u8 reserved[3];
  645. } __packed;
  646. /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
  647. struct wmi_lo_power_calib_from_otp_event {
  648. /* wmi_fw_status */
  649. u8 status;
  650. u8 reserved[3];
  651. } __packed;
  652. /* WMI_VRING_BA_EN_CMDID */
  653. struct wmi_vring_ba_en_cmd {
  654. u8 ringid;
  655. u8 agg_max_wsize;
  656. __le16 ba_timeout;
  657. u8 amsdu;
  658. u8 reserved[3];
  659. } __packed;
  660. /* WMI_VRING_BA_DIS_CMDID */
  661. struct wmi_vring_ba_dis_cmd {
  662. u8 ringid;
  663. u8 reserved;
  664. __le16 reason;
  665. } __packed;
  666. /* WMI_NOTIFY_REQ_CMDID */
  667. struct wmi_notify_req_cmd {
  668. u8 cid;
  669. u8 year;
  670. u8 month;
  671. u8 day;
  672. __le32 interval_usec;
  673. u8 hour;
  674. u8 minute;
  675. u8 second;
  676. u8 miliseconds;
  677. } __packed;
  678. /* WMI_CFG_RX_CHAIN_CMDID */
  679. enum wmi_sniffer_cfg_mode {
  680. WMI_SNIFFER_OFF = 0x00,
  681. WMI_SNIFFER_ON = 0x01,
  682. };
  683. /* WMI_SILENT_RSSI_TABLE */
  684. enum wmi_silent_rssi_table {
  685. RF_TEMPERATURE_CALIB_DEFAULT_DB = 0x00,
  686. RF_TEMPERATURE_CALIB_HIGH_POWER_DB = 0x01,
  687. };
  688. /* WMI_SILENT_RSSI_STATUS */
  689. enum wmi_silent_rssi_status {
  690. SILENT_RSSI_SUCCESS = 0x00,
  691. SILENT_RSSI_FAILURE = 0x01,
  692. };
  693. /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
  694. struct wmi_set_active_silent_rssi_table_cmd {
  695. /* enum wmi_silent_rssi_table */
  696. __le32 table;
  697. } __packed;
  698. enum wmi_sniffer_cfg_phy_info_mode {
  699. WMI_SNIFFER_PHY_INFO_DISABLED = 0x00,
  700. WMI_SNIFFER_PHY_INFO_ENABLED = 0x01,
  701. };
  702. enum wmi_sniffer_cfg_phy_support {
  703. WMI_SNIFFER_CP = 0x00,
  704. WMI_SNIFFER_DP = 0x01,
  705. WMI_SNIFFER_BOTH_PHYS = 0x02,
  706. };
  707. /* wmi_sniffer_cfg */
  708. struct wmi_sniffer_cfg {
  709. /* enum wmi_sniffer_cfg_mode */
  710. __le32 mode;
  711. /* enum wmi_sniffer_cfg_phy_info_mode */
  712. __le32 phy_info_mode;
  713. /* enum wmi_sniffer_cfg_phy_support */
  714. __le32 phy_support;
  715. u8 channel;
  716. u8 reserved[3];
  717. } __packed;
  718. enum wmi_cfg_rx_chain_cmd_action {
  719. WMI_RX_CHAIN_ADD = 0x00,
  720. WMI_RX_CHAIN_DEL = 0x01,
  721. };
  722. enum wmi_cfg_rx_chain_cmd_decap_trans_type {
  723. WMI_DECAP_TYPE_802_3 = 0x00,
  724. WMI_DECAP_TYPE_NATIVE_WIFI = 0x01,
  725. WMI_DECAP_TYPE_NONE = 0x02,
  726. };
  727. enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
  728. WMI_NWIFI_RX_TRANS_MODE_NO = 0x00,
  729. WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01,
  730. WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02,
  731. };
  732. enum wmi_cfg_rx_chain_cmd_reorder_type {
  733. WMI_RX_HW_REORDER = 0x00,
  734. WMI_RX_SW_REORDER = 0x01,
  735. };
  736. #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0)
  737. #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1)
  738. #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1)
  739. #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1)
  740. #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1)
  741. #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2)
  742. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0)
  743. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1)
  744. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1)
  745. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1)
  746. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1)
  747. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2)
  748. #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0)
  749. #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1)
  750. #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1)
  751. #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1)
  752. #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1)
  753. #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2)
  754. #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0)
  755. #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1)
  756. #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1)
  757. #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1)
  758. #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1)
  759. #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2)
  760. #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2)
  761. #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1)
  762. #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4)
  763. #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3)
  764. #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1)
  765. #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8)
  766. /* WMI_CFG_RX_CHAIN_CMDID */
  767. struct wmi_cfg_rx_chain_cmd {
  768. __le32 action;
  769. struct wmi_sw_ring_cfg rx_sw_ring;
  770. u8 mid;
  771. u8 decap_trans_type;
  772. u8 l2_802_3_offload_ctrl;
  773. u8 l2_nwifi_offload_ctrl;
  774. u8 vlan_id;
  775. u8 nwifi_ds_trans_type;
  776. u8 l3_l4_ctrl;
  777. u8 ring_ctrl;
  778. __le16 prefetch_thrsh;
  779. __le16 wb_thrsh;
  780. __le32 itr_value;
  781. __le16 host_thrsh;
  782. u8 reorder_type;
  783. u8 reserved;
  784. struct wmi_sniffer_cfg sniffer_cfg;
  785. __le16 max_rx_pl_per_desc;
  786. } __packed;
  787. /* WMI_RCP_ADDBA_RESP_CMDID */
  788. struct wmi_rcp_addba_resp_cmd {
  789. u8 cidxtid;
  790. u8 dialog_token;
  791. __le16 status_code;
  792. /* ieee80211_ba_parameterset field to send */
  793. __le16 ba_param_set;
  794. __le16 ba_timeout;
  795. } __packed;
  796. /* WMI_RCP_DELBA_CMDID */
  797. struct wmi_rcp_delba_cmd {
  798. u8 cidxtid;
  799. u8 reserved;
  800. __le16 reason;
  801. } __packed;
  802. /* WMI_RCP_ADDBA_REQ_CMDID */
  803. struct wmi_rcp_addba_req_cmd {
  804. u8 cidxtid;
  805. u8 dialog_token;
  806. /* ieee80211_ba_parameterset field as it received */
  807. __le16 ba_param_set;
  808. __le16 ba_timeout;
  809. /* ieee80211_ba_seqstrl field as it received */
  810. __le16 ba_seq_ctrl;
  811. } __packed;
  812. /* WMI_SET_MAC_ADDRESS_CMDID */
  813. struct wmi_set_mac_address_cmd {
  814. u8 mac[WMI_MAC_LEN];
  815. u8 reserved[2];
  816. } __packed;
  817. /* WMI_ECHO_CMDID
  818. * Check FW is alive
  819. * WMI_DEEP_ECHO_CMDID
  820. * Check FW and ucode are alive
  821. * Returned event: WMI_ECHO_RSP_EVENTID
  822. * same event for both commands
  823. */
  824. struct wmi_echo_cmd {
  825. __le32 value;
  826. } __packed;
  827. /* WMI_RF_PWR_ON_DELAY_CMDID
  828. * set FW time parameters used through RF resetting
  829. * RF reset consists of bringing its power down for a period of time, then
  830. * bringing the power up
  831. * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
  832. */
  833. struct wmi_rf_pwr_on_delay_cmd {
  834. /* time in usec the FW waits after bringing the RF PWR down,
  835. * set 0 for default
  836. */
  837. __le16 down_delay_usec;
  838. /* time in usec the FW waits after bringing the RF PWR up,
  839. * set 0 for default
  840. */
  841. __le16 up_delay_usec;
  842. } __packed;
  843. /* \WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
  844. * This API controls the Tx and Rx gain over temperature.
  845. * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
  846. * It also controls the Tx gain index, by controlling the Rx to Tx gain index
  847. * offset.
  848. * The control is divided by 3 temperature values to 4 temperature ranges.
  849. * Each parameter uses its own temperature values.
  850. * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
  851. */
  852. struct wmi_set_high_power_table_params_cmd {
  853. /* Temperature range for Tx D-type parameters */
  854. u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
  855. u8 reserved0;
  856. /* Tx D-type values to be used for each temperature range */
  857. __le32 tx_dtype_conf[WMI_RF_DTYPE_LENGTH + 1];
  858. /* Temperature range for Rx D-type parameters */
  859. u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
  860. u8 reserved1;
  861. /* Rx D-type values to be used for each temperature range */
  862. __le32 rx_dtype_conf[WMI_RF_DTYPE_LENGTH + 1];
  863. /* Temperature range for Rx E-type parameters */
  864. u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
  865. u8 reserved2;
  866. /* Rx E-type values to be used for each temperature range.
  867. * The last 4 values of any range are the first 4 values of the next
  868. * range and so on
  869. */
  870. __le32 rx_etype_conf[WMI_RF_ETYPE_VAL_PER_RANGE + WMI_RF_ETYPE_LENGTH];
  871. /* Temperature range for rx_2_tx_offs parameters */
  872. u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
  873. u8 reserved3;
  874. /* Rx to Tx gain index offset */
  875. s8 rx_2_tx_offs[WMI_RF_RX2TX_LENGTH + 1];
  876. } __packed;
  877. /* CMD: WMI_RF_XPM_READ_CMDID */
  878. struct wmi_rf_xpm_read_cmd {
  879. u8 rf_id;
  880. u8 reserved[3];
  881. /* XPM bit start address in range [0,8191]bits - rounded by FW to
  882. * multiple of 8bits
  883. */
  884. __le32 xpm_bit_address;
  885. __le32 num_bytes;
  886. } __packed;
  887. /* CMD: WMI_RF_XPM_WRITE_CMDID */
  888. struct wmi_rf_xpm_write_cmd {
  889. u8 rf_id;
  890. u8 reserved0[3];
  891. /* XPM bit start address in range [0,8191]bits - rounded by FW to
  892. * multiple of 8bits
  893. */
  894. __le32 xpm_bit_address;
  895. __le32 num_bytes;
  896. /* boolean flag indicating whether FW should verify the write
  897. * operation
  898. */
  899. u8 verify;
  900. u8 reserved1[3];
  901. /* actual size=num_bytes */
  902. u8 data_bytes[0];
  903. } __packed;
  904. /* WMI_TEMP_SENSE_CMDID
  905. *
  906. * Measure MAC and radio temperatures
  907. *
  908. * Possible modes for temperature measurement
  909. */
  910. enum wmi_temperature_measure_mode {
  911. TEMPERATURE_USE_OLD_VALUE = 0x01,
  912. TEMPERATURE_MEASURE_NOW = 0x02,
  913. };
  914. /* WMI_TEMP_SENSE_CMDID */
  915. struct wmi_temp_sense_cmd {
  916. __le32 measure_baseband_en;
  917. __le32 measure_rf_en;
  918. __le32 measure_mode;
  919. } __packed;
  920. enum wmi_pmc_op {
  921. WMI_PMC_ALLOCATE = 0x00,
  922. WMI_PMC_RELEASE = 0x01,
  923. };
  924. /* WMI_PMC_CMDID */
  925. struct wmi_pmc_cmd {
  926. /* enum wmi_pmc_cmd_op_type */
  927. u8 op;
  928. u8 reserved;
  929. __le16 ring_size;
  930. __le64 mem_base;
  931. } __packed;
  932. enum wmi_aoa_meas_type {
  933. WMI_AOA_PHASE_MEAS = 0x00,
  934. WMI_AOA_PHASE_AMP_MEAS = 0x01,
  935. };
  936. /* WMI_AOA_MEAS_CMDID */
  937. struct wmi_aoa_meas_cmd {
  938. u8 mac_addr[WMI_MAC_LEN];
  939. /* channels IDs:
  940. * 0 - 58320 MHz
  941. * 1 - 60480 MHz
  942. * 2 - 62640 MHz
  943. */
  944. u8 channel;
  945. /* enum wmi_aoa_meas_type */
  946. u8 aoa_meas_type;
  947. __le32 meas_rf_mask;
  948. } __packed;
  949. /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
  950. struct wmi_set_mgmt_retry_limit_cmd {
  951. /* MAC retransmit limit for mgmt frames */
  952. u8 mgmt_retry_limit;
  953. /* alignment to 32b */
  954. u8 reserved[3];
  955. } __packed;
  956. /* Zones: HIGH, MAX, CRITICAL */
  957. #define WMI_NUM_OF_TT_ZONES (3)
  958. struct wmi_tt_zone_limits {
  959. /* Above this temperature this zone is active */
  960. u8 temperature_high;
  961. /* Below this temperature the adjacent lower zone is active */
  962. u8 temperature_low;
  963. u8 reserved[2];
  964. } __packed;
  965. /* Struct used for both configuration and status commands of thermal
  966. * throttling
  967. */
  968. struct wmi_tt_data {
  969. /* Enable/Disable TT algorithm for baseband */
  970. u8 bb_enabled;
  971. u8 reserved0[3];
  972. /* Define zones for baseband */
  973. struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
  974. /* Enable/Disable TT algorithm for radio */
  975. u8 rf_enabled;
  976. u8 reserved1[3];
  977. /* Define zones for all radio chips */
  978. struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
  979. } __packed;
  980. /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
  981. struct wmi_set_thermal_throttling_cfg_cmd {
  982. /* Command data */
  983. struct wmi_tt_data tt_data;
  984. } __packed;
  985. /* WMI_NEW_STA_CMDID */
  986. struct wmi_new_sta_cmd {
  987. u8 dst_mac[WMI_MAC_LEN];
  988. u8 aid;
  989. } __packed;
  990. /* WMI_DEL_STA_CMDID */
  991. struct wmi_del_sta_cmd {
  992. u8 dst_mac[WMI_MAC_LEN];
  993. __le16 disconnect_reason;
  994. } __packed;
  995. enum wmi_tof_burst_duration {
  996. WMI_TOF_BURST_DURATION_250_USEC = 2,
  997. WMI_TOF_BURST_DURATION_500_USEC = 3,
  998. WMI_TOF_BURST_DURATION_1_MSEC = 4,
  999. WMI_TOF_BURST_DURATION_2_MSEC = 5,
  1000. WMI_TOF_BURST_DURATION_4_MSEC = 6,
  1001. WMI_TOF_BURST_DURATION_8_MSEC = 7,
  1002. WMI_TOF_BURST_DURATION_16_MSEC = 8,
  1003. WMI_TOF_BURST_DURATION_32_MSEC = 9,
  1004. WMI_TOF_BURST_DURATION_64_MSEC = 10,
  1005. WMI_TOF_BURST_DURATION_128_MSEC = 11,
  1006. WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15,
  1007. };
  1008. enum wmi_tof_session_start_flags {
  1009. WMI_TOF_SESSION_START_FLAG_SECURED = 0x1,
  1010. WMI_TOF_SESSION_START_FLAG_ASAP = 0x2,
  1011. WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4,
  1012. WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8,
  1013. };
  1014. /* WMI_TOF_SESSION_START_CMDID */
  1015. struct wmi_ftm_dest_info {
  1016. u8 channel;
  1017. /* wmi_tof_session_start_flags_e */
  1018. u8 flags;
  1019. u8 initial_token;
  1020. u8 num_of_ftm_per_burst;
  1021. u8 num_of_bursts_exp;
  1022. /* wmi_tof_burst_duration_e */
  1023. u8 burst_duration;
  1024. /* Burst Period indicate interval between two consecutive burst
  1025. * instances, in units of 100 ms
  1026. */
  1027. __le16 burst_period;
  1028. u8 dst_mac[WMI_MAC_LEN];
  1029. u8 reserved;
  1030. u8 num_burst_per_aoa_meas;
  1031. } __packed;
  1032. /* WMI_TOF_SESSION_START_CMDID */
  1033. struct wmi_tof_session_start_cmd {
  1034. __le32 session_id;
  1035. u8 reserved1;
  1036. u8 aoa_type;
  1037. __le16 num_of_dest;
  1038. u8 reserved[4];
  1039. struct wmi_ftm_dest_info ftm_dest_info[0];
  1040. } __packed;
  1041. /* WMI_TOF_CFG_RESPONDER_CMDID */
  1042. struct wmi_tof_cfg_responder_cmd {
  1043. u8 enable;
  1044. u8 reserved[3];
  1045. } __packed;
  1046. enum wmi_tof_channel_info_report_type {
  1047. WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1,
  1048. WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2,
  1049. WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4,
  1050. WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8,
  1051. WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10,
  1052. };
  1053. /* WMI_TOF_CHANNEL_INFO_CMDID */
  1054. struct wmi_tof_channel_info_cmd {
  1055. /* wmi_tof_channel_info_report_type_e */
  1056. __le32 channel_info_report_request;
  1057. } __packed;
  1058. /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
  1059. struct wmi_tof_set_tx_rx_offset_cmd {
  1060. /* TX delay offset */
  1061. __le32 tx_offset;
  1062. /* RX delay offset */
  1063. __le32 rx_offset;
  1064. /* Mask to define which RFs to configure. 0 means all RFs */
  1065. __le32 rf_mask;
  1066. /* Offset to strongest tap of CIR */
  1067. __le32 precursor;
  1068. } __packed;
  1069. /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
  1070. struct wmi_tof_get_tx_rx_offset_cmd {
  1071. /* rf index to read offsets from */
  1072. u8 rf_index;
  1073. u8 reserved[3];
  1074. } __packed;
  1075. /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
  1076. struct wmi_map_mcs_to_schd_params {
  1077. u8 mcs;
  1078. /* time in usec from start slot to start tx flow - default 15 */
  1079. u8 time_in_usec_before_initiate_tx;
  1080. /* RD enable - if yes consider RD according to STA mcs */
  1081. u8 rd_enabled;
  1082. u8 reserved;
  1083. /* time in usec from start slot to stop vring */
  1084. __le16 time_in_usec_to_stop_vring;
  1085. /* timeout to force flush from start of slot */
  1086. __le16 flush_to_in_usec;
  1087. /* per mcs the mac buffer limit size in bytes */
  1088. __le32 mac_buff_size_in_bytes;
  1089. } __packed;
  1090. /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
  1091. struct wmi_fixed_scheduling_config_complete_event {
  1092. /* wmi_fw_status */
  1093. u8 status;
  1094. u8 reserved[3];
  1095. } __packed;
  1096. #define WMI_NUM_MCS (13)
  1097. /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
  1098. struct wmi_fixed_scheduling_config_cmd {
  1099. /* defaults in the SAS table */
  1100. struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
  1101. /* default 150 uSec */
  1102. __le16 max_sta_rd_ppdu_duration_in_usec;
  1103. /* default 300 uSec */
  1104. __le16 max_sta_grant_ppdu_duration_in_usec;
  1105. /* default 1000 uSec */
  1106. __le16 assoc_slot_duration_in_usec;
  1107. /* default 360 uSec */
  1108. __le16 virtual_slot_duration_in_usec;
  1109. /* each this field value slots start with grant frame to the station
  1110. * - default 2
  1111. */
  1112. u8 number_of_ap_slots_for_initiate_grant;
  1113. u8 reserved[3];
  1114. } __packed;
  1115. /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
  1116. struct wmi_enable_fixed_scheduling_cmd {
  1117. __le32 reserved;
  1118. } __packed;
  1119. /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
  1120. struct wmi_enable_fixed_scheduling_complete_event {
  1121. /* wmi_fw_status */
  1122. u8 status;
  1123. u8 reserved[3];
  1124. } __packed;
  1125. /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
  1126. struct wmi_set_multi_directed_omnis_config_cmd {
  1127. /* number of directed omnis at destination AP */
  1128. u8 dest_ap_num_directed_omnis;
  1129. u8 reserved[3];
  1130. } __packed;
  1131. /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
  1132. struct wmi_set_multi_directed_omnis_config_event {
  1133. /* wmi_fw_status */
  1134. u8 status;
  1135. u8 reserved[3];
  1136. } __packed;
  1137. /* WMI_SET_LONG_RANGE_CONFIG_CMDID */
  1138. struct wmi_set_long_range_config_cmd {
  1139. __le32 reserved;
  1140. } __packed;
  1141. /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
  1142. struct wmi_set_long_range_config_complete_event {
  1143. /* wmi_fw_status */
  1144. u8 status;
  1145. u8 reserved[3];
  1146. } __packed;
  1147. /* WMI Events
  1148. * List of Events (target to host)
  1149. */
  1150. enum wmi_event_id {
  1151. WMI_READY_EVENTID = 0x1001,
  1152. WMI_CONNECT_EVENTID = 0x1002,
  1153. WMI_DISCONNECT_EVENTID = 0x1003,
  1154. WMI_START_SCHED_SCAN_EVENTID = 0x1005,
  1155. WMI_STOP_SCHED_SCAN_EVENTID = 0x1006,
  1156. WMI_SCHED_SCAN_RESULT_EVENTID = 0x1007,
  1157. WMI_SCAN_COMPLETE_EVENTID = 0x100A,
  1158. WMI_REPORT_STATISTICS_EVENTID = 0x100B,
  1159. WMI_RD_MEM_RSP_EVENTID = 0x1800,
  1160. WMI_FW_READY_EVENTID = 0x1801,
  1161. WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200,
  1162. WMI_ECHO_RSP_EVENTID = 0x1803,
  1163. /* deprecated */
  1164. WMI_FS_TUNE_DONE_EVENTID = 0x180A,
  1165. /* deprecated */
  1166. WMI_CORR_MEASURE_EVENTID = 0x180B,
  1167. WMI_READ_RSSI_EVENTID = 0x180C,
  1168. WMI_TEMP_SENSE_DONE_EVENTID = 0x180E,
  1169. WMI_DC_CALIB_DONE_EVENTID = 0x180F,
  1170. /* deprecated */
  1171. WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811,
  1172. /* deprecated */
  1173. WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812,
  1174. WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815,
  1175. WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816,
  1176. WMI_LO_POWER_CALIB_FROM_OTP_EVENTID = 0x1817,
  1177. WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D,
  1178. /* deprecated */
  1179. WMI_RF_RX_TEST_DONE_EVENTID = 0x181E,
  1180. WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820,
  1181. WMI_VRING_CFG_DONE_EVENTID = 0x1821,
  1182. WMI_BA_STATUS_EVENTID = 0x1823,
  1183. WMI_RCP_ADDBA_REQ_EVENTID = 0x1824,
  1184. WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825,
  1185. WMI_DELBA_EVENTID = 0x1826,
  1186. WMI_GET_SSID_EVENTID = 0x1828,
  1187. WMI_GET_PCP_CHANNEL_EVENTID = 0x182A,
  1188. WMI_SW_TX_COMPLETE_EVENTID = 0x182B,
  1189. WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836,
  1190. WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837,
  1191. WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839,
  1192. WMI_RS_MGMT_DONE_EVENTID = 0x1852,
  1193. WMI_RF_MGMT_STATUS_EVENTID = 0x1853,
  1194. WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838,
  1195. WMI_RX_MGMT_PACKET_EVENTID = 0x1840,
  1196. WMI_TX_MGMT_PACKET_EVENTID = 0x1841,
  1197. WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842,
  1198. WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843,
  1199. WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856,
  1200. WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857,
  1201. WMI_LED_CFG_DONE_EVENTID = 0x1858,
  1202. WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID = 0x185C,
  1203. WMI_RF_PWR_ON_DELAY_RSP_EVENTID = 0x185D,
  1204. WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID = 0x185E,
  1205. /* Performance monitoring events */
  1206. WMI_DATA_PORT_OPEN_EVENTID = 0x1860,
  1207. WMI_WBE_LINK_DOWN_EVENTID = 0x1861,
  1208. WMI_BF_CTRL_DONE_EVENTID = 0x1862,
  1209. WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863,
  1210. WMI_GET_STATUS_DONE_EVENTID = 0x1864,
  1211. WMI_VRING_EN_EVENTID = 0x1865,
  1212. WMI_GET_RF_STATUS_EVENTID = 0x1866,
  1213. WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867,
  1214. WMI_UNIT_TEST_EVENTID = 0x1900,
  1215. WMI_FLASH_READ_DONE_EVENTID = 0x1902,
  1216. WMI_FLASH_WRITE_DONE_EVENTID = 0x1903,
  1217. /* Power management */
  1218. WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904,
  1219. WMI_TRAFFIC_RESUME_EVENTID = 0x1905,
  1220. /* P2P */
  1221. WMI_P2P_CFG_DONE_EVENTID = 0x1910,
  1222. WMI_PORT_ALLOCATED_EVENTID = 0x1911,
  1223. WMI_PORT_DELETED_EVENTID = 0x1912,
  1224. WMI_LISTEN_STARTED_EVENTID = 0x1914,
  1225. WMI_SEARCH_STARTED_EVENTID = 0x1915,
  1226. WMI_DISCOVERY_STARTED_EVENTID = 0x1916,
  1227. WMI_DISCOVERY_STOPPED_EVENTID = 0x1917,
  1228. WMI_PCP_STARTED_EVENTID = 0x1918,
  1229. WMI_PCP_STOPPED_EVENTID = 0x1919,
  1230. WMI_PCP_FACTOR_EVENTID = 0x191A,
  1231. /* Power Save Configuration Events */
  1232. WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C,
  1233. WMI_RS_CFG_DONE_EVENTID = 0x1921,
  1234. WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922,
  1235. WMI_AOA_MEAS_EVENTID = 0x1923,
  1236. WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924,
  1237. WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930,
  1238. WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931,
  1239. WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940,
  1240. WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941,
  1241. /* return the Power Save profile */
  1242. WMI_PS_DEV_PROFILE_CFG_READ_EVENTID = 0x1942,
  1243. WMI_TOF_SESSION_END_EVENTID = 0x1991,
  1244. WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992,
  1245. WMI_TOF_SET_LCR_EVENTID = 0x1993,
  1246. WMI_TOF_SET_LCI_EVENTID = 0x1994,
  1247. WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995,
  1248. WMI_TOF_CFG_RESPONDER_EVENTID = 0x1996,
  1249. WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997,
  1250. WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998,
  1251. WMI_TOF_CHANNEL_INFO_EVENTID = 0x1999,
  1252. WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0,
  1253. WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1,
  1254. WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2,
  1255. WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3,
  1256. WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4,
  1257. WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5,
  1258. WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6,
  1259. WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7,
  1260. WMI_SCHEDULING_SCHEME_EVENTID = 0x1A01,
  1261. WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID = 0x1A02,
  1262. WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID = 0x1A03,
  1263. WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID = 0x1A04,
  1264. WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID = 0x1A05,
  1265. WMI_SET_CHANNEL_EVENTID = 0x9000,
  1266. WMI_ASSOC_REQ_EVENTID = 0x9001,
  1267. WMI_EAPOL_RX_EVENTID = 0x9002,
  1268. WMI_MAC_ADDR_RESP_EVENTID = 0x9003,
  1269. WMI_FW_VER_EVENTID = 0x9004,
  1270. WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005,
  1271. WMI_COMMAND_NOT_SUPPORTED_EVENTID = 0xFFFF,
  1272. };
  1273. /* Events data structures */
  1274. enum wmi_fw_status {
  1275. WMI_FW_STATUS_SUCCESS = 0x00,
  1276. WMI_FW_STATUS_FAILURE = 0x01,
  1277. };
  1278. /* WMI_RF_MGMT_STATUS_EVENTID */
  1279. enum wmi_rf_status {
  1280. WMI_RF_ENABLED = 0x00,
  1281. WMI_RF_DISABLED_HW = 0x01,
  1282. WMI_RF_DISABLED_SW = 0x02,
  1283. WMI_RF_DISABLED_HW_SW = 0x03,
  1284. };
  1285. /* WMI_RF_MGMT_STATUS_EVENTID */
  1286. struct wmi_rf_mgmt_status_event {
  1287. __le32 rf_status;
  1288. } __packed;
  1289. /* WMI_GET_STATUS_DONE_EVENTID */
  1290. struct wmi_get_status_done_event {
  1291. __le32 is_associated;
  1292. u8 cid;
  1293. u8 reserved0[3];
  1294. u8 bssid[WMI_MAC_LEN];
  1295. u8 channel;
  1296. u8 reserved1;
  1297. u8 network_type;
  1298. u8 reserved2[3];
  1299. __le32 ssid_len;
  1300. u8 ssid[WMI_MAX_SSID_LEN];
  1301. __le32 rf_status;
  1302. __le32 is_secured;
  1303. } __packed;
  1304. /* WMI_FW_VER_EVENTID */
  1305. struct wmi_fw_ver_event {
  1306. /* FW image version */
  1307. __le32 fw_major;
  1308. __le32 fw_minor;
  1309. __le32 fw_subminor;
  1310. __le32 fw_build;
  1311. /* FW image build time stamp */
  1312. __le32 hour;
  1313. __le32 minute;
  1314. __le32 second;
  1315. __le32 day;
  1316. __le32 month;
  1317. __le32 year;
  1318. /* Boot Loader image version */
  1319. __le32 bl_major;
  1320. __le32 bl_minor;
  1321. __le32 bl_subminor;
  1322. __le32 bl_build;
  1323. /* The number of entries in the FW capabilities array */
  1324. u8 fw_capabilities_len;
  1325. u8 reserved[3];
  1326. /* FW capabilities info
  1327. * Must be the last member of the struct
  1328. */
  1329. __le32 fw_capabilities[0];
  1330. } __packed;
  1331. /* WMI_GET_RF_STATUS_EVENTID */
  1332. enum rf_type {
  1333. RF_UNKNOWN = 0x00,
  1334. RF_MARLON = 0x01,
  1335. RF_SPARROW = 0x02,
  1336. };
  1337. /* WMI_GET_RF_STATUS_EVENTID */
  1338. enum board_file_rf_type {
  1339. BF_RF_MARLON = 0x00,
  1340. BF_RF_SPARROW = 0x01,
  1341. };
  1342. /* WMI_GET_RF_STATUS_EVENTID */
  1343. enum rf_status {
  1344. RF_OK = 0x00,
  1345. RF_NO_COMM = 0x01,
  1346. RF_WRONG_BOARD_FILE = 0x02,
  1347. };
  1348. /* WMI_GET_RF_STATUS_EVENTID */
  1349. struct wmi_get_rf_status_event {
  1350. /* enum rf_type */
  1351. __le32 rf_type;
  1352. /* attached RFs bit vector */
  1353. __le32 attached_rf_vector;
  1354. /* enabled RFs bit vector */
  1355. __le32 enabled_rf_vector;
  1356. /* enum rf_status, refers to enabled RFs */
  1357. u8 rf_status[32];
  1358. /* enum board file RF type */
  1359. __le32 board_file_rf_type;
  1360. /* board file platform type */
  1361. __le32 board_file_platform_type;
  1362. /* board file version */
  1363. __le32 board_file_version;
  1364. /* enabled XIFs bit vector */
  1365. __le32 enabled_xif_vector;
  1366. __le32 reserved;
  1367. } __packed;
  1368. /* WMI_GET_BASEBAND_TYPE_EVENTID */
  1369. enum baseband_type {
  1370. BASEBAND_UNKNOWN = 0x00,
  1371. BASEBAND_SPARROW_M_A0 = 0x03,
  1372. BASEBAND_SPARROW_M_A1 = 0x04,
  1373. BASEBAND_SPARROW_M_B0 = 0x05,
  1374. BASEBAND_SPARROW_M_C0 = 0x06,
  1375. BASEBAND_SPARROW_M_D0 = 0x07,
  1376. BASEBAND_TALYN_M_A0 = 0x08,
  1377. };
  1378. /* WMI_GET_BASEBAND_TYPE_EVENTID */
  1379. struct wmi_get_baseband_type_event {
  1380. /* enum baseband_type */
  1381. __le32 baseband_type;
  1382. } __packed;
  1383. /* WMI_MAC_ADDR_RESP_EVENTID */
  1384. struct wmi_mac_addr_resp_event {
  1385. u8 mac[WMI_MAC_LEN];
  1386. u8 auth_mode;
  1387. u8 crypt_mode;
  1388. __le32 offload_mode;
  1389. } __packed;
  1390. /* WMI_EAPOL_RX_EVENTID */
  1391. struct wmi_eapol_rx_event {
  1392. u8 src_mac[WMI_MAC_LEN];
  1393. __le16 eapol_len;
  1394. u8 eapol[0];
  1395. } __packed;
  1396. /* WMI_READY_EVENTID */
  1397. enum wmi_phy_capability {
  1398. WMI_11A_CAPABILITY = 0x01,
  1399. WMI_11G_CAPABILITY = 0x02,
  1400. WMI_11AG_CAPABILITY = 0x03,
  1401. WMI_11NA_CAPABILITY = 0x04,
  1402. WMI_11NG_CAPABILITY = 0x05,
  1403. WMI_11NAG_CAPABILITY = 0x06,
  1404. WMI_11AD_CAPABILITY = 0x07,
  1405. WMI_11N_CAPABILITY_OFFSET = 0x03,
  1406. };
  1407. struct wmi_ready_event {
  1408. __le32 sw_version;
  1409. __le32 abi_version;
  1410. u8 mac[WMI_MAC_LEN];
  1411. /* enum wmi_phy_capability */
  1412. u8 phy_capability;
  1413. u8 numof_additional_mids;
  1414. /* rfc read calibration result. 5..15 */
  1415. u8 rfc_read_calib_result;
  1416. u8 reserved[3];
  1417. } __packed;
  1418. /* WMI_NOTIFY_REQ_DONE_EVENTID */
  1419. struct wmi_notify_req_done_event {
  1420. /* beamforming status, 0: fail; 1: OK; 2: retrying */
  1421. __le32 status;
  1422. __le64 tsf;
  1423. s8 rssi;
  1424. u8 reserved0[3];
  1425. __le32 tx_tpt;
  1426. __le32 tx_goodput;
  1427. __le32 rx_goodput;
  1428. __le16 bf_mcs;
  1429. __le16 my_rx_sector;
  1430. __le16 my_tx_sector;
  1431. __le16 other_rx_sector;
  1432. __le16 other_tx_sector;
  1433. __le16 range;
  1434. u8 sqi;
  1435. u8 reserved[3];
  1436. } __packed;
  1437. /* WMI_CONNECT_EVENTID */
  1438. struct wmi_connect_event {
  1439. u8 channel;
  1440. u8 reserved0;
  1441. u8 bssid[WMI_MAC_LEN];
  1442. __le16 listen_interval;
  1443. __le16 beacon_interval;
  1444. u8 network_type;
  1445. u8 reserved1[3];
  1446. u8 beacon_ie_len;
  1447. u8 assoc_req_len;
  1448. u8 assoc_resp_len;
  1449. u8 cid;
  1450. u8 aid;
  1451. u8 reserved2[2];
  1452. /* not in use */
  1453. u8 assoc_info[0];
  1454. } __packed;
  1455. /* disconnect_reason */
  1456. enum wmi_disconnect_reason {
  1457. WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01,
  1458. /* bmiss */
  1459. WMI_DIS_REASON_LOST_LINK = 0x02,
  1460. WMI_DIS_REASON_DISCONNECT_CMD = 0x03,
  1461. WMI_DIS_REASON_BSS_DISCONNECTED = 0x04,
  1462. WMI_DIS_REASON_AUTH_FAILED = 0x05,
  1463. WMI_DIS_REASON_ASSOC_FAILED = 0x06,
  1464. WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07,
  1465. WMI_DIS_REASON_CSERV_DISCONNECT = 0x08,
  1466. WMI_DIS_REASON_INVALID_PROFILE = 0x0A,
  1467. WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B,
  1468. WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C,
  1469. WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D,
  1470. WMI_DIS_REASON_IBSS_MERGE = 0x0E,
  1471. };
  1472. /* WMI_DISCONNECT_EVENTID */
  1473. struct wmi_disconnect_event {
  1474. /* reason code, see 802.11 spec. */
  1475. __le16 protocol_reason_status;
  1476. /* set if known */
  1477. u8 bssid[WMI_MAC_LEN];
  1478. /* see enum wmi_disconnect_reason */
  1479. u8 disconnect_reason;
  1480. /* last assoc req may passed to host - not in used */
  1481. u8 assoc_resp_len;
  1482. /* last assoc req may passed to host - not in used */
  1483. u8 assoc_info[0];
  1484. } __packed;
  1485. /* WMI_SCAN_COMPLETE_EVENTID */
  1486. enum scan_status {
  1487. WMI_SCAN_SUCCESS = 0x00,
  1488. WMI_SCAN_FAILED = 0x01,
  1489. WMI_SCAN_ABORTED = 0x02,
  1490. WMI_SCAN_REJECTED = 0x03,
  1491. WMI_SCAN_ABORT_REJECTED = 0x04,
  1492. };
  1493. struct wmi_scan_complete_event {
  1494. /* enum scan_status */
  1495. __le32 status;
  1496. } __packed;
  1497. /* wmi_rx_mgmt_info */
  1498. struct wmi_rx_mgmt_info {
  1499. u8 mcs;
  1500. s8 rssi;
  1501. u8 range;
  1502. u8 sqi;
  1503. __le16 stype;
  1504. __le16 status;
  1505. __le32 len;
  1506. /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
  1507. u8 qid;
  1508. /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
  1509. u8 mid;
  1510. u8 cid;
  1511. /* From Radio MNGR */
  1512. u8 channel;
  1513. } __packed;
  1514. /* WMI_START_SCHED_SCAN_EVENTID */
  1515. enum wmi_pno_result {
  1516. WMI_PNO_SUCCESS = 0x00,
  1517. WMI_PNO_REJECT = 0x01,
  1518. WMI_PNO_INVALID_PARAMETERS = 0x02,
  1519. WMI_PNO_NOT_ENABLED = 0x03,
  1520. };
  1521. struct wmi_start_sched_scan_event {
  1522. /* pno_result */
  1523. u8 result;
  1524. u8 reserved[3];
  1525. } __packed;
  1526. struct wmi_stop_sched_scan_event {
  1527. /* pno_result */
  1528. u8 result;
  1529. u8 reserved[3];
  1530. } __packed;
  1531. struct wmi_sched_scan_result_event {
  1532. struct wmi_rx_mgmt_info info;
  1533. u8 payload[0];
  1534. } __packed;
  1535. /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
  1536. enum wmi_acs_info_bitmask {
  1537. WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01,
  1538. WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02,
  1539. WMI_ACS_INFO_BITMASK_TX_TIME = 0x04,
  1540. WMI_ACS_INFO_BITMASK_RX_TIME = 0x08,
  1541. WMI_ACS_INFO_BITMASK_NOISE = 0x10,
  1542. };
  1543. struct scan_acs_info {
  1544. u8 channel;
  1545. u8 beacon_found;
  1546. /* msec */
  1547. __le16 busy_time;
  1548. __le16 tx_time;
  1549. __le16 rx_time;
  1550. u8 noise;
  1551. u8 reserved[3];
  1552. } __packed;
  1553. struct wmi_acs_passive_scan_complete_event {
  1554. __le32 dwell_time;
  1555. /* valid fields within channel info according to
  1556. * their appearance in struct order
  1557. */
  1558. __le16 filled;
  1559. u8 num_scanned_channels;
  1560. u8 reserved;
  1561. struct scan_acs_info scan_info_list[0];
  1562. } __packed;
  1563. /* WMI_BA_STATUS_EVENTID */
  1564. enum wmi_vring_ba_status {
  1565. WMI_BA_AGREED = 0x00,
  1566. WMI_BA_NON_AGREED = 0x01,
  1567. /* BA_EN in middle of teardown flow */
  1568. WMI_BA_TD_WIP = 0x02,
  1569. /* BA_DIS or BA_EN in middle of BA SETUP flow */
  1570. WMI_BA_SETUP_WIP = 0x03,
  1571. /* BA_EN when the BA session is already active */
  1572. WMI_BA_SESSION_ACTIVE = 0x04,
  1573. /* BA_DIS when the BA session is not active */
  1574. WMI_BA_SESSION_NOT_ACTIVE = 0x05,
  1575. };
  1576. struct wmi_ba_status_event {
  1577. /* enum wmi_vring_ba_status */
  1578. __le16 status;
  1579. u8 reserved[2];
  1580. u8 ringid;
  1581. u8 agg_wsize;
  1582. __le16 ba_timeout;
  1583. u8 amsdu;
  1584. } __packed;
  1585. /* WMI_DELBA_EVENTID */
  1586. struct wmi_delba_event {
  1587. u8 cidxtid;
  1588. u8 from_initiator;
  1589. __le16 reason;
  1590. } __packed;
  1591. /* WMI_VRING_CFG_DONE_EVENTID */
  1592. struct wmi_vring_cfg_done_event {
  1593. u8 ringid;
  1594. u8 status;
  1595. u8 reserved[2];
  1596. __le32 tx_vring_tail_ptr;
  1597. } __packed;
  1598. /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
  1599. struct wmi_rcp_addba_resp_sent_event {
  1600. u8 cidxtid;
  1601. u8 reserved;
  1602. __le16 status;
  1603. } __packed;
  1604. /* WMI_RCP_ADDBA_REQ_EVENTID */
  1605. struct wmi_rcp_addba_req_event {
  1606. u8 cidxtid;
  1607. u8 dialog_token;
  1608. /* ieee80211_ba_parameterset as it received */
  1609. __le16 ba_param_set;
  1610. __le16 ba_timeout;
  1611. /* ieee80211_ba_seqstrl field as it received */
  1612. __le16 ba_seq_ctrl;
  1613. } __packed;
  1614. /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
  1615. enum wmi_cfg_rx_chain_done_event_status {
  1616. WMI_CFG_RX_CHAIN_SUCCESS = 0x01,
  1617. };
  1618. struct wmi_cfg_rx_chain_done_event {
  1619. /* V-Ring Tail pointer */
  1620. __le32 rx_ring_tail_ptr;
  1621. __le32 status;
  1622. } __packed;
  1623. /* WMI_WBE_LINK_DOWN_EVENTID */
  1624. enum wmi_wbe_link_down_event_reason {
  1625. WMI_WBE_REASON_USER_REQUEST = 0x00,
  1626. WMI_WBE_REASON_RX_DISASSOC = 0x01,
  1627. WMI_WBE_REASON_BAD_PHY_LINK = 0x02,
  1628. };
  1629. /* WMI_WBE_LINK_DOWN_EVENTID */
  1630. struct wmi_wbe_link_down_event {
  1631. u8 cid;
  1632. u8 reserved[3];
  1633. __le32 reason;
  1634. } __packed;
  1635. /* WMI_DATA_PORT_OPEN_EVENTID */
  1636. struct wmi_data_port_open_event {
  1637. u8 cid;
  1638. u8 reserved[3];
  1639. } __packed;
  1640. /* WMI_VRING_EN_EVENTID */
  1641. struct wmi_vring_en_event {
  1642. u8 vring_index;
  1643. u8 reserved[3];
  1644. } __packed;
  1645. /* WMI_GET_PCP_CHANNEL_EVENTID */
  1646. struct wmi_get_pcp_channel_event {
  1647. u8 channel;
  1648. u8 reserved[3];
  1649. } __packed;
  1650. /* WMI_P2P_CFG_DONE_EVENTID */
  1651. struct wmi_p2p_cfg_done_event {
  1652. /* wmi_fw_status */
  1653. u8 status;
  1654. u8 reserved[3];
  1655. } __packed;
  1656. /* WMI_PORT_ALLOCATED_EVENTID */
  1657. struct wmi_port_allocated_event {
  1658. /* wmi_fw_status */
  1659. u8 status;
  1660. u8 reserved[3];
  1661. } __packed;
  1662. /* WMI_PORT_DELETED_EVENTID */
  1663. struct wmi_port_deleted_event {
  1664. /* wmi_fw_status */
  1665. u8 status;
  1666. u8 reserved[3];
  1667. } __packed;
  1668. /* WMI_LISTEN_STARTED_EVENTID */
  1669. struct wmi_listen_started_event {
  1670. /* wmi_fw_status */
  1671. u8 status;
  1672. u8 reserved[3];
  1673. } __packed;
  1674. /* WMI_SEARCH_STARTED_EVENTID */
  1675. struct wmi_search_started_event {
  1676. /* wmi_fw_status */
  1677. u8 status;
  1678. u8 reserved[3];
  1679. } __packed;
  1680. /* WMI_PCP_STARTED_EVENTID */
  1681. struct wmi_pcp_started_event {
  1682. /* wmi_fw_status */
  1683. u8 status;
  1684. u8 reserved[3];
  1685. } __packed;
  1686. /* WMI_PCP_FACTOR_EVENTID */
  1687. struct wmi_pcp_factor_event {
  1688. __le32 pcp_factor;
  1689. } __packed;
  1690. enum wmi_sw_tx_status {
  1691. WMI_TX_SW_STATUS_SUCCESS = 0x00,
  1692. WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01,
  1693. WMI_TX_SW_STATUS_FAILED_TX = 0x02,
  1694. };
  1695. /* WMI_SW_TX_COMPLETE_EVENTID */
  1696. struct wmi_sw_tx_complete_event {
  1697. /* enum wmi_sw_tx_status */
  1698. u8 status;
  1699. u8 reserved[3];
  1700. } __packed;
  1701. /* WMI_CORR_MEASURE_EVENTID - deprecated */
  1702. struct wmi_corr_measure_event {
  1703. /* signed */
  1704. __le32 i;
  1705. /* signed */
  1706. __le32 q;
  1707. /* signed */
  1708. __le32 image_i;
  1709. /* signed */
  1710. __le32 image_q;
  1711. } __packed;
  1712. /* WMI_READ_RSSI_EVENTID */
  1713. struct wmi_read_rssi_event {
  1714. __le32 ina_rssi_adc_dbm;
  1715. } __packed;
  1716. /* WMI_GET_SSID_EVENTID */
  1717. struct wmi_get_ssid_event {
  1718. __le32 ssid_len;
  1719. u8 ssid[WMI_MAX_SSID_LEN];
  1720. } __packed;
  1721. /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
  1722. struct wmi_rf_xpm_read_result_event {
  1723. /* enum wmi_fw_status_e - success=0 or fail=1 */
  1724. u8 status;
  1725. u8 reserved[3];
  1726. /* requested num_bytes of data */
  1727. u8 data_bytes[0];
  1728. } __packed;
  1729. /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
  1730. struct wmi_rf_xpm_write_result_event {
  1731. /* enum wmi_fw_status_e - success=0 or fail=1 */
  1732. u8 status;
  1733. u8 reserved[3];
  1734. } __packed;
  1735. /* WMI_TX_MGMT_PACKET_EVENTID */
  1736. struct wmi_tx_mgmt_packet_event {
  1737. u8 payload[0];
  1738. } __packed;
  1739. /* WMI_RX_MGMT_PACKET_EVENTID */
  1740. struct wmi_rx_mgmt_packet_event {
  1741. struct wmi_rx_mgmt_info info;
  1742. u8 payload[0];
  1743. } __packed;
  1744. /* WMI_ECHO_RSP_EVENTID */
  1745. struct wmi_echo_rsp_event {
  1746. __le32 echoed_value;
  1747. } __packed;
  1748. /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
  1749. struct wmi_rf_pwr_on_delay_rsp_event {
  1750. /* wmi_fw_status */
  1751. u8 status;
  1752. u8 reserved[3];
  1753. } __packed;
  1754. /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
  1755. struct wmi_set_high_power_table_params_event {
  1756. /* wmi_fw_status */
  1757. u8 status;
  1758. u8 reserved[3];
  1759. } __packed;
  1760. /* WMI_TEMP_SENSE_DONE_EVENTID
  1761. *
  1762. * Measure MAC and radio temperatures
  1763. */
  1764. struct wmi_temp_sense_done_event {
  1765. /* Temperature times 1000 (actual temperature will be achieved by
  1766. * dividing the value by 1000)
  1767. */
  1768. __le32 baseband_t1000;
  1769. /* Temperature times 1000 (actual temperature will be achieved by
  1770. * dividing the value by 1000)
  1771. */
  1772. __le32 rf_t1000;
  1773. } __packed;
  1774. #define WMI_SCAN_DWELL_TIME_MS (100)
  1775. #define WMI_SURVEY_TIMEOUT_MS (10000)
  1776. enum wmi_hidden_ssid {
  1777. WMI_HIDDEN_SSID_DISABLED = 0x00,
  1778. WMI_HIDDEN_SSID_SEND_EMPTY = 0x10,
  1779. WMI_HIDDEN_SSID_CLEAR = 0xFE,
  1780. };
  1781. /* WMI_LED_CFG_CMDID
  1782. *
  1783. * Configure LED On\Off\Blinking operation
  1784. *
  1785. * Returned events:
  1786. * - WMI_LED_CFG_DONE_EVENTID
  1787. */
  1788. enum led_mode {
  1789. LED_DISABLE = 0x00,
  1790. LED_ENABLE = 0x01,
  1791. };
  1792. /* The names of the led as
  1793. * described on HW schemes.
  1794. */
  1795. enum wmi_led_id {
  1796. WMI_LED_WLAN = 0x00,
  1797. WMI_LED_WPAN = 0x01,
  1798. WMI_LED_WWAN = 0x02,
  1799. };
  1800. /* Led polarity mode. */
  1801. enum wmi_led_polarity {
  1802. LED_POLARITY_HIGH_ACTIVE = 0x00,
  1803. LED_POLARITY_LOW_ACTIVE = 0x01,
  1804. };
  1805. /* Combination of on and off
  1806. * creates the blinking period
  1807. */
  1808. struct wmi_led_blink_mode {
  1809. __le32 blink_on;
  1810. __le32 blink_off;
  1811. } __packed;
  1812. /* WMI_LED_CFG_CMDID */
  1813. struct wmi_led_cfg_cmd {
  1814. /* enum led_mode_e */
  1815. u8 led_mode;
  1816. /* enum wmi_led_id_e */
  1817. u8 id;
  1818. /* slow speed blinking combination */
  1819. struct wmi_led_blink_mode slow_blink_cfg;
  1820. /* medium speed blinking combination */
  1821. struct wmi_led_blink_mode medium_blink_cfg;
  1822. /* high speed blinking combination */
  1823. struct wmi_led_blink_mode fast_blink_cfg;
  1824. /* polarity of the led */
  1825. u8 led_polarity;
  1826. /* reserved */
  1827. u8 reserved;
  1828. } __packed;
  1829. /* \WMI_SET_CONNECT_SNR_THR_CMDID */
  1830. struct wmi_set_connect_snr_thr_cmd {
  1831. u8 enable;
  1832. u8 reserved;
  1833. /* 1/4 Db units */
  1834. __le16 omni_snr_thr;
  1835. /* 1/4 Db units */
  1836. __le16 direct_snr_thr;
  1837. } __packed;
  1838. /* WMI_LED_CFG_DONE_EVENTID */
  1839. struct wmi_led_cfg_done_event {
  1840. /* led config status */
  1841. __le32 status;
  1842. } __packed;
  1843. /* Rate search parameters configuration per connection */
  1844. struct wmi_rs_cfg {
  1845. /* The maximal allowed PER for each MCS
  1846. * MCS will be considered as failed if PER during RS is higher
  1847. */
  1848. u8 per_threshold[WMI_NUM_MCS];
  1849. /* Number of MPDUs for each MCS
  1850. * this is the minimal statistic required to make an educated
  1851. * decision
  1852. */
  1853. u8 min_frame_cnt[WMI_NUM_MCS];
  1854. /* stop threshold [0-100] */
  1855. u8 stop_th;
  1856. /* MCS1 stop threshold [0-100] */
  1857. u8 mcs1_fail_th;
  1858. u8 max_back_failure_th;
  1859. /* Debug feature for disabling internal RS trigger (which is
  1860. * currently triggered by BF Done)
  1861. */
  1862. u8 dbg_disable_internal_trigger;
  1863. __le32 back_failure_mask;
  1864. __le32 mcs_en_vec;
  1865. } __packed;
  1866. /* Slot types */
  1867. enum wmi_sched_scheme_slot_type {
  1868. WMI_SCHED_SLOT_SP = 0x0,
  1869. WMI_SCHED_SLOT_CBAP = 0x1,
  1870. WMI_SCHED_SLOT_IDLE = 0x2,
  1871. WMI_SCHED_SLOT_ANNOUNCE_NO_ACK = 0x3,
  1872. WMI_SCHED_SLOT_DISCOVERY = 0x4,
  1873. };
  1874. enum wmi_sched_scheme_slot_flags {
  1875. WMI_SCHED_SCHEME_SLOT_PERIODIC = 0x1,
  1876. };
  1877. struct wmi_sched_scheme_slot {
  1878. /* in microsecond */
  1879. __le32 tbtt_offset;
  1880. /* wmi_sched_scheme_slot_flags */
  1881. u8 flags;
  1882. /* wmi_sched_scheme_slot_type */
  1883. u8 type;
  1884. /* in microsecond */
  1885. __le16 duration;
  1886. /* frame_exchange_sequence_duration */
  1887. __le16 tx_op;
  1888. /* time in microseconds between two consecutive slots
  1889. * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
  1890. */
  1891. __le16 period;
  1892. /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
  1893. * number of times to repeat allocation
  1894. */
  1895. u8 num_of_blocks;
  1896. /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
  1897. * every idle_period allocation will be idle
  1898. */
  1899. u8 idle_period;
  1900. u8 src_aid;
  1901. u8 dest_aid;
  1902. __le32 reserved;
  1903. } __packed;
  1904. enum wmi_sched_scheme_flags {
  1905. /* should not be set when clearing scheduling scheme */
  1906. WMI_SCHED_SCHEME_ENABLE = 0x01,
  1907. WMI_SCHED_PROTECTED_SP = 0x02,
  1908. /* should be set only on first WMI fragment of scheme */
  1909. WMI_SCHED_FIRST = 0x04,
  1910. /* should be set only on last WMI fragment of scheme */
  1911. WMI_SCHED_LAST = 0x08,
  1912. WMI_SCHED_IMMEDIATE_START = 0x10,
  1913. };
  1914. enum wmi_sched_scheme_advertisment {
  1915. /* ESE is not advertised at all, STA has to be configured with WMI
  1916. * also
  1917. */
  1918. WMI_ADVERTISE_ESE_DISABLED = 0x0,
  1919. WMI_ADVERTISE_ESE_IN_BEACON = 0x1,
  1920. WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME = 0x2,
  1921. };
  1922. /* WMI_SCHEDULING_SCHEME_CMD */
  1923. struct wmi_scheduling_scheme_cmd {
  1924. u8 serial_num;
  1925. /* wmi_sched_scheme_advertisment */
  1926. u8 ese_advertisment;
  1927. /* wmi_sched_scheme_flags */
  1928. __le16 flags;
  1929. u8 num_allocs;
  1930. u8 reserved[3];
  1931. __le64 start_tbtt;
  1932. /* allocations list */
  1933. struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
  1934. } __packed;
  1935. enum wmi_sched_scheme_failure_type {
  1936. WMI_SCHED_SCHEME_FAILURE_NO_ERROR = 0x00,
  1937. WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR = 0x01,
  1938. };
  1939. /* WMI_SCHEDULING_SCHEME_EVENTID */
  1940. struct wmi_scheduling_scheme_event {
  1941. /* wmi_fw_status_e */
  1942. u8 status;
  1943. /* serial number given in command */
  1944. u8 serial_num;
  1945. /* wmi_sched_scheme_failure_type */
  1946. u8 failure_type;
  1947. /* alignment to 32b */
  1948. u8 reserved[1];
  1949. } __packed;
  1950. /* WMI_RS_CFG_CMDID */
  1951. struct wmi_rs_cfg_cmd {
  1952. /* connection id */
  1953. u8 cid;
  1954. /* enable or disable rate search */
  1955. u8 rs_enable;
  1956. /* rate search configuration */
  1957. struct wmi_rs_cfg rs_cfg;
  1958. } __packed;
  1959. /* WMI_RS_CFG_DONE_EVENTID */
  1960. struct wmi_rs_cfg_done_event {
  1961. u8 cid;
  1962. /* enum wmi_fw_status */
  1963. u8 status;
  1964. u8 reserved[2];
  1965. } __packed;
  1966. /* WMI_GET_DETAILED_RS_RES_CMDID */
  1967. struct wmi_get_detailed_rs_res_cmd {
  1968. /* connection id */
  1969. u8 cid;
  1970. u8 reserved[3];
  1971. } __packed;
  1972. /* RS results status */
  1973. enum wmi_rs_results_status {
  1974. WMI_RS_RES_VALID = 0x00,
  1975. WMI_RS_RES_INVALID = 0x01,
  1976. };
  1977. /* Rate search results */
  1978. struct wmi_rs_results {
  1979. /* number of sent MPDUs */
  1980. u8 num_of_tx_pkt[WMI_NUM_MCS];
  1981. /* number of non-acked MPDUs */
  1982. u8 num_of_non_acked_pkt[WMI_NUM_MCS];
  1983. /* RS timestamp */
  1984. __le32 tsf;
  1985. /* RS selected MCS */
  1986. u8 mcs;
  1987. } __packed;
  1988. /* WMI_GET_DETAILED_RS_RES_EVENTID */
  1989. struct wmi_get_detailed_rs_res_event {
  1990. u8 cid;
  1991. /* enum wmi_rs_results_status */
  1992. u8 status;
  1993. /* detailed rs results */
  1994. struct wmi_rs_results rs_results;
  1995. u8 reserved[3];
  1996. } __packed;
  1997. /* BRP antenna limit mode */
  1998. enum wmi_brp_ant_limit_mode {
  1999. /* Disable BRP force antenna limit */
  2000. WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00,
  2001. /* Define maximal antennas limit. Only effective antennas will be
  2002. * actually used
  2003. */
  2004. WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01,
  2005. /* Force a specific number of antennas */
  2006. WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02,
  2007. /* number of BRP antenna limit modes */
  2008. WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03,
  2009. };
  2010. /* WMI_BRP_SET_ANT_LIMIT_CMDID */
  2011. struct wmi_brp_set_ant_limit_cmd {
  2012. /* connection id */
  2013. u8 cid;
  2014. /* enum wmi_brp_ant_limit_mode */
  2015. u8 limit_mode;
  2016. /* antenna limit count, 1-27
  2017. * disable_mode - ignored
  2018. * effective_mode - upper limit to number of antennas to be used
  2019. * force_mode - exact number of antennas to be used
  2020. */
  2021. u8 ant_limit;
  2022. u8 reserved;
  2023. } __packed;
  2024. /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
  2025. struct wmi_brp_set_ant_limit_event {
  2026. /* wmi_fw_status */
  2027. u8 status;
  2028. u8 reserved[3];
  2029. } __packed;
  2030. /* broadcast connection ID */
  2031. #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF)
  2032. /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
  2033. enum wmi_link_maintain_cfg_type {
  2034. /* AP/PCP default normal (non-FST) configuration settings */
  2035. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00,
  2036. /* AP/PCP default FST configuration settings */
  2037. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01,
  2038. /* STA default normal (non-FST) configuration settings */
  2039. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02,
  2040. /* STA default FST configuration settings */
  2041. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03,
  2042. /* custom configuration settings */
  2043. WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04,
  2044. /* number of defined configuration types */
  2045. WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05,
  2046. };
  2047. /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
  2048. enum wmi_link_maintain_cfg_response_status {
  2049. /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
  2050. */
  2051. WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00,
  2052. /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
  2053. * command request
  2054. */
  2055. WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01,
  2056. };
  2057. /* Link Loss and Keep Alive configuration */
  2058. struct wmi_link_maintain_cfg {
  2059. /* link_loss_enable_detectors_vec */
  2060. __le32 link_loss_enable_detectors_vec;
  2061. /* detectors check period usec */
  2062. __le32 check_link_loss_period_usec;
  2063. /* max allowed tx ageing */
  2064. __le32 tx_ageing_threshold_usec;
  2065. /* keep alive period for high SNR */
  2066. __le32 keep_alive_period_usec_high_snr;
  2067. /* keep alive period for low SNR */
  2068. __le32 keep_alive_period_usec_low_snr;
  2069. /* lower snr limit for keep alive period update */
  2070. __le32 keep_alive_snr_threshold_low_db;
  2071. /* upper snr limit for keep alive period update */
  2072. __le32 keep_alive_snr_threshold_high_db;
  2073. /* num of successive bad bcons causing link-loss */
  2074. __le32 bad_beacons_num_threshold;
  2075. /* SNR limit for bad_beacons_detector */
  2076. __le32 bad_beacons_snr_threshold_db;
  2077. } __packed;
  2078. /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
  2079. struct wmi_link_maintain_cfg_write_cmd {
  2080. /* enum wmi_link_maintain_cfg_type_e - type of requested default
  2081. * configuration to be applied
  2082. */
  2083. __le32 cfg_type;
  2084. /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
  2085. __le32 cid;
  2086. /* custom configuration settings to be applied (relevant only if
  2087. * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
  2088. */
  2089. struct wmi_link_maintain_cfg lm_cfg;
  2090. } __packed;
  2091. /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
  2092. struct wmi_link_maintain_cfg_read_cmd {
  2093. /* connection ID which configuration settings are requested */
  2094. __le32 cid;
  2095. } __packed;
  2096. /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
  2097. struct wmi_link_maintain_cfg_write_done_event {
  2098. /* requested connection ID */
  2099. __le32 cid;
  2100. /* wmi_link_maintain_cfg_response_status_e - write status */
  2101. __le32 status;
  2102. } __packed;
  2103. /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
  2104. struct wmi_link_maintain_cfg_read_done_event {
  2105. /* requested connection ID */
  2106. __le32 cid;
  2107. /* wmi_link_maintain_cfg_response_status_e - read status */
  2108. __le32 status;
  2109. /* Retrieved configuration settings */
  2110. struct wmi_link_maintain_cfg lm_cfg;
  2111. } __packed;
  2112. enum wmi_traffic_suspend_status {
  2113. WMI_TRAFFIC_SUSPEND_APPROVED = 0x0,
  2114. WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1,
  2115. };
  2116. /* WMI_TRAFFIC_SUSPEND_EVENTID */
  2117. struct wmi_traffic_suspend_event {
  2118. /* enum wmi_traffic_suspend_status_e */
  2119. u8 status;
  2120. } __packed;
  2121. enum wmi_traffic_resume_status {
  2122. WMI_TRAFFIC_RESUME_SUCCESS = 0x0,
  2123. WMI_TRAFFIC_RESUME_FAILED = 0x1,
  2124. };
  2125. enum wmi_resume_trigger {
  2126. WMI_RESUME_TRIGGER_UNKNOWN = 0x0,
  2127. WMI_RESUME_TRIGGER_HOST = 0x1,
  2128. WMI_RESUME_TRIGGER_UCAST_RX = 0x2,
  2129. WMI_RESUME_TRIGGER_BCAST_RX = 0x4,
  2130. WMI_RESUME_TRIGGER_WMI_EVT = 0x8,
  2131. };
  2132. /* WMI_TRAFFIC_RESUME_EVENTID */
  2133. struct wmi_traffic_resume_event {
  2134. /* enum wmi_traffic_resume_status */
  2135. u8 status;
  2136. u8 reserved[3];
  2137. /* enum wmi_resume_trigger bitmap */
  2138. __le32 resume_triggers;
  2139. } __packed;
  2140. /* Power Save command completion status codes */
  2141. enum wmi_ps_cfg_cmd_status {
  2142. WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00,
  2143. WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01,
  2144. /* other error */
  2145. WMI_PS_CFG_CMD_STATUS_ERROR = 0x02,
  2146. };
  2147. /* Device Power Save Profiles */
  2148. enum wmi_ps_profile_type {
  2149. WMI_PS_PROFILE_TYPE_DEFAULT = 0x00,
  2150. WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01,
  2151. WMI_PS_PROFILE_TYPE_MAX_PS = 0x02,
  2152. WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03,
  2153. };
  2154. /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
  2155. struct wmi_ps_dev_profile_cfg_read_cmd {
  2156. /* reserved */
  2157. __le32 reserved;
  2158. } __packed;
  2159. /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
  2160. struct wmi_ps_dev_profile_cfg_read_event {
  2161. /* wmi_ps_profile_type_e */
  2162. u8 ps_profile;
  2163. u8 reserved[3];
  2164. } __packed;
  2165. /* WMI_PS_DEV_PROFILE_CFG_CMDID
  2166. *
  2167. * Power save profile to be used by the device
  2168. *
  2169. * Returned event:
  2170. * - WMI_PS_DEV_PROFILE_CFG_EVENTID
  2171. */
  2172. struct wmi_ps_dev_profile_cfg_cmd {
  2173. /* wmi_ps_profile_type_e */
  2174. u8 ps_profile;
  2175. u8 reserved[3];
  2176. } __packed;
  2177. /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
  2178. struct wmi_ps_dev_profile_cfg_event {
  2179. /* wmi_ps_cfg_cmd_status_e */
  2180. __le32 status;
  2181. } __packed;
  2182. enum wmi_ps_level {
  2183. WMI_PS_LEVEL_DEEP_SLEEP = 0x00,
  2184. WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01,
  2185. /* awake = all PS mechanisms are disabled */
  2186. WMI_PS_LEVEL_AWAKE = 0x02,
  2187. };
  2188. enum wmi_ps_deep_sleep_clk_level {
  2189. /* 33k */
  2190. WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00,
  2191. /* 10k */
  2192. WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01,
  2193. /* @RTC Low latency */
  2194. WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02,
  2195. WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03,
  2196. WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04,
  2197. /* Not Applicable */
  2198. WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF,
  2199. };
  2200. /* Response by the FW to a D3 entry request */
  2201. enum wmi_ps_d3_resp_policy {
  2202. WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00,
  2203. /* debug -D3 req is always denied */
  2204. WMI_PS_D3_RESP_POLICY_DENIED = 0x01,
  2205. /* debug -D3 req is always approved */
  2206. WMI_PS_D3_RESP_POLICY_APPROVED = 0x02,
  2207. };
  2208. #define WMI_AOA_MAX_DATA_SIZE (128)
  2209. enum wmi_aoa_meas_status {
  2210. WMI_AOA_MEAS_SUCCESS = 0x00,
  2211. WMI_AOA_MEAS_PEER_INCAPABLE = 0x01,
  2212. WMI_AOA_MEAS_FAILURE = 0x02,
  2213. };
  2214. /* WMI_AOA_MEAS_EVENTID */
  2215. struct wmi_aoa_meas_event {
  2216. u8 mac_addr[WMI_MAC_LEN];
  2217. /* channels IDs:
  2218. * 0 - 58320 MHz
  2219. * 1 - 60480 MHz
  2220. * 2 - 62640 MHz
  2221. */
  2222. u8 channel;
  2223. /* enum wmi_aoa_meas_type */
  2224. u8 aoa_meas_type;
  2225. /* Measurments are from RFs, defined by the mask */
  2226. __le32 meas_rf_mask;
  2227. /* enum wmi_aoa_meas_status */
  2228. u8 meas_status;
  2229. u8 reserved;
  2230. /* Length of meas_data in bytes */
  2231. __le16 length;
  2232. u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
  2233. } __packed;
  2234. /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
  2235. struct wmi_set_mgmt_retry_limit_event {
  2236. /* enum wmi_fw_status */
  2237. u8 status;
  2238. /* alignment to 32b */
  2239. u8 reserved[3];
  2240. } __packed;
  2241. /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
  2242. struct wmi_get_mgmt_retry_limit_event {
  2243. /* MAC retransmit limit for mgmt frames */
  2244. u8 mgmt_retry_limit;
  2245. /* alignment to 32b */
  2246. u8 reserved[3];
  2247. } __packed;
  2248. /* WMI_TOF_GET_CAPABILITIES_EVENTID */
  2249. struct wmi_tof_get_capabilities_event {
  2250. u8 ftm_capability;
  2251. /* maximum supported number of destination to start TOF */
  2252. u8 max_num_of_dest;
  2253. /* maximum supported number of measurements per burst */
  2254. u8 max_num_of_meas_per_burst;
  2255. u8 reserved;
  2256. /* maximum supported multi bursts */
  2257. __le16 max_multi_bursts_sessions;
  2258. /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
  2259. __le16 max_ftm_burst_duration;
  2260. /* AOA supported types */
  2261. __le32 aoa_supported_types;
  2262. } __packed;
  2263. /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
  2264. struct wmi_set_thermal_throttling_cfg_event {
  2265. /* wmi_fw_status */
  2266. u8 status;
  2267. u8 reserved[3];
  2268. } __packed;
  2269. /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
  2270. struct wmi_get_thermal_throttling_cfg_event {
  2271. /* Status data */
  2272. struct wmi_tt_data tt_data;
  2273. } __packed;
  2274. enum wmi_tof_session_end_status {
  2275. WMI_TOF_SESSION_END_NO_ERROR = 0x00,
  2276. WMI_TOF_SESSION_END_FAIL = 0x01,
  2277. WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02,
  2278. WMI_TOF_SESSION_END_ABORTED = 0x03,
  2279. };
  2280. /* WMI_TOF_SESSION_END_EVENTID */
  2281. struct wmi_tof_session_end_event {
  2282. /* FTM session ID */
  2283. __le32 session_id;
  2284. /* wmi_tof_session_end_status_e */
  2285. u8 status;
  2286. u8 reserved[3];
  2287. } __packed;
  2288. /* WMI_TOF_SET_LCI_EVENTID */
  2289. struct wmi_tof_set_lci_event {
  2290. /* enum wmi_fw_status */
  2291. u8 status;
  2292. u8 reserved[3];
  2293. } __packed;
  2294. /* WMI_TOF_SET_LCR_EVENTID */
  2295. struct wmi_tof_set_lcr_event {
  2296. /* enum wmi_fw_status */
  2297. u8 status;
  2298. u8 reserved[3];
  2299. } __packed;
  2300. /* Responder FTM Results */
  2301. struct wmi_responder_ftm_res {
  2302. u8 t1[6];
  2303. u8 t2[6];
  2304. u8 t3[6];
  2305. u8 t4[6];
  2306. __le16 tod_err;
  2307. __le16 toa_err;
  2308. __le16 tod_err_initiator;
  2309. __le16 toa_err_initiator;
  2310. } __packed;
  2311. enum wmi_tof_ftm_per_dest_res_status {
  2312. WMI_PER_DEST_RES_NO_ERROR = 0x00,
  2313. WMI_PER_DEST_RES_TX_RX_FAIL = 0x01,
  2314. WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02,
  2315. };
  2316. enum wmi_tof_ftm_per_dest_res_flags {
  2317. WMI_PER_DEST_RES_REQ_START = 0x01,
  2318. WMI_PER_DEST_RES_BURST_REPORT_END = 0x02,
  2319. WMI_PER_DEST_RES_REQ_END = 0x04,
  2320. WMI_PER_DEST_RES_PARAM_UPDATE = 0x08,
  2321. };
  2322. /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
  2323. struct wmi_tof_ftm_per_dest_res_event {
  2324. /* FTM session ID */
  2325. __le32 session_id;
  2326. /* destination MAC address */
  2327. u8 dst_mac[WMI_MAC_LEN];
  2328. /* wmi_tof_ftm_per_dest_res_flags_e */
  2329. u8 flags;
  2330. /* wmi_tof_ftm_per_dest_res_status_e */
  2331. u8 status;
  2332. /* responder ASAP */
  2333. u8 responder_asap;
  2334. /* responder number of FTM per burst */
  2335. u8 responder_num_ftm_per_burst;
  2336. /* responder number of FTM burst exponent */
  2337. u8 responder_num_ftm_bursts_exp;
  2338. /* responder burst duration ,wmi_tof_burst_duration_e */
  2339. u8 responder_burst_duration;
  2340. /* responder burst period, indicate interval between two consecutive
  2341. * burst instances, in units of 100 ms
  2342. */
  2343. __le16 responder_burst_period;
  2344. /* receive burst counter */
  2345. __le16 bursts_cnt;
  2346. /* tsf of responder start burst */
  2347. __le32 tsf_sync;
  2348. /* actual received ftm per burst */
  2349. u8 actual_ftm_per_burst;
  2350. /* Measurments are from RFs, defined by the mask */
  2351. __le32 meas_rf_mask;
  2352. u8 reserved0[3];
  2353. struct wmi_responder_ftm_res responder_ftm_res[0];
  2354. } __packed;
  2355. /* WMI_TOF_CFG_RESPONDER_EVENTID */
  2356. struct wmi_tof_cfg_responder_event {
  2357. /* enum wmi_fw_status */
  2358. u8 status;
  2359. u8 reserved[3];
  2360. } __packed;
  2361. enum wmi_tof_channel_info_type {
  2362. WMI_TOF_CHANNEL_INFO_AOA = 0x00,
  2363. WMI_TOF_CHANNEL_INFO_LCI = 0x01,
  2364. WMI_TOF_CHANNEL_INFO_LCR = 0x02,
  2365. WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03,
  2366. WMI_TOF_CHANNEL_INFO_CIR = 0x04,
  2367. WMI_TOF_CHANNEL_INFO_RSSI = 0x05,
  2368. WMI_TOF_CHANNEL_INFO_SNR = 0x06,
  2369. WMI_TOF_CHANNEL_INFO_DEBUG = 0x07,
  2370. };
  2371. /* WMI_TOF_CHANNEL_INFO_EVENTID */
  2372. struct wmi_tof_channel_info_event {
  2373. /* FTM session ID */
  2374. __le32 session_id;
  2375. /* destination MAC address */
  2376. u8 dst_mac[WMI_MAC_LEN];
  2377. /* wmi_tof_channel_info_type_e */
  2378. u8 type;
  2379. /* data report length */
  2380. u8 len;
  2381. /* data report payload */
  2382. u8 report[0];
  2383. } __packed;
  2384. /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
  2385. struct wmi_tof_set_tx_rx_offset_event {
  2386. /* enum wmi_fw_status */
  2387. u8 status;
  2388. u8 reserved[3];
  2389. } __packed;
  2390. /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
  2391. struct wmi_tof_get_tx_rx_offset_event {
  2392. /* enum wmi_fw_status */
  2393. u8 status;
  2394. /* RF index used to read the offsets */
  2395. u8 rf_index;
  2396. u8 reserved1[2];
  2397. /* TX delay offset */
  2398. __le32 tx_offset;
  2399. /* RX delay offset */
  2400. __le32 rx_offset;
  2401. /* Offset to strongest tap of CIR */
  2402. __le32 precursor;
  2403. } __packed;
  2404. /* Result status codes for WMI commands */
  2405. enum wmi_rf_sector_status {
  2406. WMI_RF_SECTOR_STATUS_SUCCESS = 0x00,
  2407. WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01,
  2408. WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02,
  2409. WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03,
  2410. };
  2411. /* Types of the RF sector (TX,RX) */
  2412. enum wmi_rf_sector_type {
  2413. WMI_RF_SECTOR_TYPE_RX = 0x00,
  2414. WMI_RF_SECTOR_TYPE_TX = 0x01,
  2415. };
  2416. /* Content of RF Sector (six 32-bits registers) */
  2417. struct wmi_rf_sector_info {
  2418. /* Phase values for RF Chains[15-0] (2bits per RF chain) */
  2419. __le32 psh_hi;
  2420. /* Phase values for RF Chains[31-16] (2bits per RF chain) */
  2421. __le32 psh_lo;
  2422. /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
  2423. * index
  2424. */
  2425. __le32 etype0;
  2426. /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
  2427. * index
  2428. */
  2429. __le32 etype1;
  2430. /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
  2431. * index
  2432. */
  2433. __le32 etype2;
  2434. /* D-Type values (3bits each) for 8 Distribution amplifiers + X16
  2435. * switch bits
  2436. */
  2437. __le32 dtype_swch_off;
  2438. } __packed;
  2439. #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF)
  2440. #define WMI_MAX_RF_MODULES_NUM (8)
  2441. /* WMI_GET_RF_SECTOR_PARAMS_CMD */
  2442. struct wmi_get_rf_sector_params_cmd {
  2443. /* Sector number to be retrieved */
  2444. __le16 sector_idx;
  2445. /* enum wmi_rf_sector_type - type of requested RF sector */
  2446. u8 sector_type;
  2447. /* bitmask vector specifying destination RF modules */
  2448. u8 rf_modules_vec;
  2449. } __packed;
  2450. /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
  2451. struct wmi_get_rf_sector_params_done_event {
  2452. /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
  2453. * wmi_rf_sector_status)
  2454. */
  2455. u8 status;
  2456. /* align next field to U64 boundary */
  2457. u8 reserved[7];
  2458. /* TSF timestamp when RF sectors where retrieved */
  2459. __le64 tsf;
  2460. /* Content of RF sector retrieved from each RF module */
  2461. struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
  2462. } __packed;
  2463. /* WMI_SET_RF_SECTOR_PARAMS_CMD */
  2464. struct wmi_set_rf_sector_params_cmd {
  2465. /* Sector number to be retrieved */
  2466. __le16 sector_idx;
  2467. /* enum wmi_rf_sector_type - type of requested RF sector */
  2468. u8 sector_type;
  2469. /* bitmask vector specifying destination RF modules */
  2470. u8 rf_modules_vec;
  2471. /* Content of RF sector to be written to each RF module */
  2472. struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
  2473. } __packed;
  2474. /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
  2475. struct wmi_set_rf_sector_params_done_event {
  2476. /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
  2477. * wmi_rf_sector_status)
  2478. */
  2479. u8 status;
  2480. } __packed;
  2481. /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
  2482. * TXSS/BRP for communication with specified CID
  2483. */
  2484. struct wmi_get_selected_rf_sector_index_cmd {
  2485. /* Connection/Station ID in [0:7] range */
  2486. u8 cid;
  2487. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2488. u8 sector_type;
  2489. /* align to U32 boundary */
  2490. u8 reserved[2];
  2491. } __packed;
  2492. /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
  2493. * index selected by TXSS/BRP for communication with specified CID
  2494. */
  2495. struct wmi_get_selected_rf_sector_index_done_event {
  2496. /* Retrieved sector index selected in TXSS (for TX sector request) or
  2497. * BRP (for RX sector request)
  2498. */
  2499. __le16 sector_idx;
  2500. /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
  2501. * wmi_rf_sector_status)
  2502. */
  2503. u8 status;
  2504. /* align next field to U64 boundary */
  2505. u8 reserved[5];
  2506. /* TSF timestamp when result was retrieved */
  2507. __le64 tsf;
  2508. } __packed;
  2509. /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
  2510. * communication with specified CID. Assumes that TXSS/BRP is disabled by
  2511. * other command
  2512. */
  2513. struct wmi_set_selected_rf_sector_index_cmd {
  2514. /* Connection/Station ID in [0:7] range */
  2515. u8 cid;
  2516. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2517. u8 sector_type;
  2518. /* Forced sector index */
  2519. __le16 sector_idx;
  2520. } __packed;
  2521. /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
  2522. * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
  2523. */
  2524. struct wmi_set_selected_rf_sector_index_done_event {
  2525. /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
  2526. * wmi_rf_sector_status)
  2527. */
  2528. u8 status;
  2529. /* align to U32 boundary */
  2530. u8 reserved[3];
  2531. } __packed;
  2532. /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
  2533. * modules
  2534. */
  2535. struct wmi_set_rf_sector_on_cmd {
  2536. /* Sector index to be activated */
  2537. __le16 sector_idx;
  2538. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2539. u8 sector_type;
  2540. /* bitmask vector specifying destination RF modules */
  2541. u8 rf_modules_vec;
  2542. } __packed;
  2543. /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
  2544. * WMI_SET_RF_SECTOR_ON_CMD
  2545. */
  2546. struct wmi_set_rf_sector_on_done_event {
  2547. /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
  2548. * wmi_rf_sector_status)
  2549. */
  2550. u8 status;
  2551. /* align to U32 boundary */
  2552. u8 reserved[3];
  2553. } __packed;
  2554. enum wmi_sector_sweep_type {
  2555. WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00,
  2556. WMI_SECTOR_SWEEP_TYPE_BCON = 0x01,
  2557. WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02,
  2558. WMI_SECTOR_SWEEP_TYPE_NUM = 0x03,
  2559. };
  2560. /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
  2561. *
  2562. * Set the order of TX sectors in TXSS and/or Beacon(AP).
  2563. *
  2564. * Returned event:
  2565. * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
  2566. */
  2567. struct wmi_prio_tx_sectors_order_cmd {
  2568. /* tx sectors order to be applied, 0xFF for end of array */
  2569. u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
  2570. /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
  2571. u8 sector_sweep_type;
  2572. /* needed only for TXSS configuration */
  2573. u8 cid;
  2574. /* alignment to 32b */
  2575. u8 reserved[2];
  2576. } __packed;
  2577. /* completion status codes */
  2578. enum wmi_prio_tx_sectors_cmd_status {
  2579. WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00,
  2580. WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01,
  2581. /* other error */
  2582. WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02,
  2583. };
  2584. /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
  2585. struct wmi_prio_tx_sectors_order_event {
  2586. /* enum wmi_prio_tx_sectors_cmd_status */
  2587. u8 status;
  2588. /* alignment to 32b */
  2589. u8 reserved[3];
  2590. } __packed;
  2591. struct wmi_prio_tx_sectors_num_cmd {
  2592. /* [0-128], 0 = No changes */
  2593. u8 beacon_number_of_sectors;
  2594. /* [0-128], 0 = No changes */
  2595. u8 txss_number_of_sectors;
  2596. /* [0-8] needed only for TXSS configuration */
  2597. u8 cid;
  2598. } __packed;
  2599. /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
  2600. *
  2601. * Set the number of active sectors in TXSS and/or Beacon.
  2602. *
  2603. * Returned event:
  2604. * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
  2605. */
  2606. struct wmi_prio_tx_sectors_number_cmd {
  2607. struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
  2608. /* alignment to 32b */
  2609. u8 reserved;
  2610. } __packed;
  2611. /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
  2612. struct wmi_prio_tx_sectors_number_event {
  2613. /* enum wmi_prio_tx_sectors_cmd_status */
  2614. u8 status;
  2615. /* alignment to 32b */
  2616. u8 reserved[3];
  2617. } __packed;
  2618. /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
  2619. *
  2620. * Set default sectors order and number (hard coded in board file)
  2621. * in TXSS and/or Beacon.
  2622. *
  2623. * Returned event:
  2624. * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
  2625. */
  2626. struct wmi_prio_tx_sectors_set_default_cfg_cmd {
  2627. /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
  2628. u8 sector_sweep_type;
  2629. /* needed only for TXSS configuration */
  2630. u8 cid;
  2631. /* alignment to 32b */
  2632. u8 reserved[2];
  2633. } __packed;
  2634. /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
  2635. struct wmi_prio_tx_sectors_set_default_cfg_event {
  2636. /* enum wmi_prio_tx_sectors_cmd_status */
  2637. u8 status;
  2638. /* alignment to 32b */
  2639. u8 reserved[3];
  2640. } __packed;
  2641. /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
  2642. struct wmi_set_silent_rssi_table_done_event {
  2643. /* enum wmi_silent_rssi_status */
  2644. __le32 status;
  2645. /* enum wmi_silent_rssi_table */
  2646. __le32 table;
  2647. } __packed;
  2648. /* \WMI_COMMAND_NOT_SUPPORTED_EVENTID */
  2649. struct wmi_command_not_supported_event {
  2650. /* device id */
  2651. u8 mid;
  2652. u8 reserved0;
  2653. __le16 command_id;
  2654. /* for UT command only, otherwise reserved */
  2655. __le16 command_subtype;
  2656. __le16 reserved1;
  2657. } __packed;
  2658. #endif /* __WILOCITY_WMI_H__ */