wmi.h 72 KB

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