wmi.h 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875
  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_LINK_NOT_IDLE = 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. enum wmi_resume_trigger {
  2070. WMI_RESUME_TRIGGER_UNKNOWN = 0x0,
  2071. WMI_RESUME_TRIGGER_HOST = 0x1,
  2072. WMI_RESUME_TRIGGER_UCAST_RX = 0x2,
  2073. WMI_RESUME_TRIGGER_BCAST_RX = 0x4,
  2074. WMI_RESUME_TRIGGER_WMI_EVT = 0x8,
  2075. };
  2076. /* WMI_TRAFFIC_RESUME_EVENTID */
  2077. struct wmi_traffic_resume_event {
  2078. /* enum wmi_traffic_resume_status */
  2079. u8 status;
  2080. u8 reserved[3];
  2081. /* enum wmi_resume_trigger bitmap */
  2082. __le32 resume_triggers;
  2083. } __packed;
  2084. /* Power Save command completion status codes */
  2085. enum wmi_ps_cfg_cmd_status {
  2086. WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00,
  2087. WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01,
  2088. /* other error */
  2089. WMI_PS_CFG_CMD_STATUS_ERROR = 0x02,
  2090. };
  2091. /* Device Power Save Profiles */
  2092. enum wmi_ps_profile_type {
  2093. WMI_PS_PROFILE_TYPE_DEFAULT = 0x00,
  2094. WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01,
  2095. WMI_PS_PROFILE_TYPE_MAX_PS = 0x02,
  2096. WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03,
  2097. };
  2098. /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
  2099. struct wmi_ps_dev_profile_cfg_read_cmd {
  2100. /* reserved */
  2101. __le32 reserved;
  2102. } __packed;
  2103. /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
  2104. struct wmi_ps_dev_profile_cfg_read_event {
  2105. /* wmi_ps_profile_type_e */
  2106. u8 ps_profile;
  2107. u8 reserved[3];
  2108. } __packed;
  2109. /* WMI_PS_DEV_PROFILE_CFG_CMDID
  2110. *
  2111. * Power save profile to be used by the device
  2112. *
  2113. * Returned event:
  2114. * - WMI_PS_DEV_PROFILE_CFG_EVENTID
  2115. */
  2116. struct wmi_ps_dev_profile_cfg_cmd {
  2117. /* wmi_ps_profile_type_e */
  2118. u8 ps_profile;
  2119. u8 reserved[3];
  2120. } __packed;
  2121. /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
  2122. struct wmi_ps_dev_profile_cfg_event {
  2123. /* wmi_ps_cfg_cmd_status_e */
  2124. __le32 status;
  2125. } __packed;
  2126. enum wmi_ps_level {
  2127. WMI_PS_LEVEL_DEEP_SLEEP = 0x00,
  2128. WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01,
  2129. /* awake = all PS mechanisms are disabled */
  2130. WMI_PS_LEVEL_AWAKE = 0x02,
  2131. };
  2132. enum wmi_ps_deep_sleep_clk_level {
  2133. /* 33k */
  2134. WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00,
  2135. /* 10k */
  2136. WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01,
  2137. /* @RTC Low latency */
  2138. WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02,
  2139. WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03,
  2140. WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04,
  2141. /* Not Applicable */
  2142. WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF,
  2143. };
  2144. /* Response by the FW to a D3 entry request */
  2145. enum wmi_ps_d3_resp_policy {
  2146. WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00,
  2147. /* debug -D3 req is always denied */
  2148. WMI_PS_D3_RESP_POLICY_DENIED = 0x01,
  2149. /* debug -D3 req is always approved */
  2150. WMI_PS_D3_RESP_POLICY_APPROVED = 0x02,
  2151. };
  2152. #define WMI_AOA_MAX_DATA_SIZE (128)
  2153. enum wmi_aoa_meas_status {
  2154. WMI_AOA_MEAS_SUCCESS = 0x00,
  2155. WMI_AOA_MEAS_PEER_INCAPABLE = 0x01,
  2156. WMI_AOA_MEAS_FAILURE = 0x02,
  2157. };
  2158. /* WMI_AOA_MEAS_EVENTID */
  2159. struct wmi_aoa_meas_event {
  2160. u8 mac_addr[WMI_MAC_LEN];
  2161. /* channels IDs:
  2162. * 0 - 58320 MHz
  2163. * 1 - 60480 MHz
  2164. * 2 - 62640 MHz
  2165. */
  2166. u8 channel;
  2167. /* enum wmi_aoa_meas_type */
  2168. u8 aoa_meas_type;
  2169. /* Measurments are from RFs, defined by the mask */
  2170. __le32 meas_rf_mask;
  2171. /* enum wmi_aoa_meas_status */
  2172. u8 meas_status;
  2173. u8 reserved;
  2174. /* Length of meas_data in bytes */
  2175. __le16 length;
  2176. u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
  2177. } __packed;
  2178. /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
  2179. struct wmi_set_mgmt_retry_limit_event {
  2180. /* enum wmi_fw_status */
  2181. u8 status;
  2182. /* alignment to 32b */
  2183. u8 reserved[3];
  2184. } __packed;
  2185. /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
  2186. struct wmi_get_mgmt_retry_limit_event {
  2187. /* MAC retransmit limit for mgmt frames */
  2188. u8 mgmt_retry_limit;
  2189. /* alignment to 32b */
  2190. u8 reserved[3];
  2191. } __packed;
  2192. /* WMI_TOF_GET_CAPABILITIES_EVENTID */
  2193. struct wmi_tof_get_capabilities_event {
  2194. u8 ftm_capability;
  2195. /* maximum supported number of destination to start TOF */
  2196. u8 max_num_of_dest;
  2197. /* maximum supported number of measurements per burst */
  2198. u8 max_num_of_meas_per_burst;
  2199. u8 reserved;
  2200. /* maximum supported multi bursts */
  2201. __le16 max_multi_bursts_sessions;
  2202. /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
  2203. __le16 max_ftm_burst_duration;
  2204. /* AOA supported types */
  2205. __le32 aoa_supported_types;
  2206. } __packed;
  2207. /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
  2208. struct wmi_set_thermal_throttling_cfg_event {
  2209. /* wmi_fw_status */
  2210. u8 status;
  2211. u8 reserved[3];
  2212. } __packed;
  2213. /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
  2214. struct wmi_get_thermal_throttling_cfg_event {
  2215. /* Status data */
  2216. struct wmi_tt_data tt_data;
  2217. } __packed;
  2218. enum wmi_tof_session_end_status {
  2219. WMI_TOF_SESSION_END_NO_ERROR = 0x00,
  2220. WMI_TOF_SESSION_END_FAIL = 0x01,
  2221. WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02,
  2222. WMI_TOF_SESSION_END_ABORTED = 0x03,
  2223. };
  2224. /* WMI_TOF_SESSION_END_EVENTID */
  2225. struct wmi_tof_session_end_event {
  2226. /* FTM session ID */
  2227. __le32 session_id;
  2228. /* wmi_tof_session_end_status_e */
  2229. u8 status;
  2230. u8 reserved[3];
  2231. } __packed;
  2232. /* WMI_TOF_SET_LCI_EVENTID */
  2233. struct wmi_tof_set_lci_event {
  2234. /* enum wmi_fw_status */
  2235. u8 status;
  2236. u8 reserved[3];
  2237. } __packed;
  2238. /* WMI_TOF_SET_LCR_EVENTID */
  2239. struct wmi_tof_set_lcr_event {
  2240. /* enum wmi_fw_status */
  2241. u8 status;
  2242. u8 reserved[3];
  2243. } __packed;
  2244. /* Responder FTM Results */
  2245. struct wmi_responder_ftm_res {
  2246. u8 t1[6];
  2247. u8 t2[6];
  2248. u8 t3[6];
  2249. u8 t4[6];
  2250. __le16 tod_err;
  2251. __le16 toa_err;
  2252. __le16 tod_err_initiator;
  2253. __le16 toa_err_initiator;
  2254. } __packed;
  2255. enum wmi_tof_ftm_per_dest_res_status {
  2256. WMI_PER_DEST_RES_NO_ERROR = 0x00,
  2257. WMI_PER_DEST_RES_TX_RX_FAIL = 0x01,
  2258. WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02,
  2259. };
  2260. enum wmi_tof_ftm_per_dest_res_flags {
  2261. WMI_PER_DEST_RES_REQ_START = 0x01,
  2262. WMI_PER_DEST_RES_BURST_REPORT_END = 0x02,
  2263. WMI_PER_DEST_RES_REQ_END = 0x04,
  2264. WMI_PER_DEST_RES_PARAM_UPDATE = 0x08,
  2265. };
  2266. /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
  2267. struct wmi_tof_ftm_per_dest_res_event {
  2268. /* FTM session ID */
  2269. __le32 session_id;
  2270. /* destination MAC address */
  2271. u8 dst_mac[WMI_MAC_LEN];
  2272. /* wmi_tof_ftm_per_dest_res_flags_e */
  2273. u8 flags;
  2274. /* wmi_tof_ftm_per_dest_res_status_e */
  2275. u8 status;
  2276. /* responder ASAP */
  2277. u8 responder_asap;
  2278. /* responder number of FTM per burst */
  2279. u8 responder_num_ftm_per_burst;
  2280. /* responder number of FTM burst exponent */
  2281. u8 responder_num_ftm_bursts_exp;
  2282. /* responder burst duration ,wmi_tof_burst_duration_e */
  2283. u8 responder_burst_duration;
  2284. /* responder burst period, indicate interval between two consecutive
  2285. * burst instances, in units of 100 ms
  2286. */
  2287. __le16 responder_burst_period;
  2288. /* receive burst counter */
  2289. __le16 bursts_cnt;
  2290. /* tsf of responder start burst */
  2291. __le32 tsf_sync;
  2292. /* actual received ftm per burst */
  2293. u8 actual_ftm_per_burst;
  2294. /* Measurments are from RFs, defined by the mask */
  2295. __le32 meas_rf_mask;
  2296. u8 reserved0[3];
  2297. struct wmi_responder_ftm_res responder_ftm_res[0];
  2298. } __packed;
  2299. /* WMI_TOF_CFG_RESPONDER_EVENTID */
  2300. struct wmi_tof_cfg_responder_event {
  2301. /* enum wmi_fw_status */
  2302. u8 status;
  2303. u8 reserved[3];
  2304. } __packed;
  2305. enum wmi_tof_channel_info_type {
  2306. WMI_TOF_CHANNEL_INFO_AOA = 0x00,
  2307. WMI_TOF_CHANNEL_INFO_LCI = 0x01,
  2308. WMI_TOF_CHANNEL_INFO_LCR = 0x02,
  2309. WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03,
  2310. WMI_TOF_CHANNEL_INFO_CIR = 0x04,
  2311. WMI_TOF_CHANNEL_INFO_RSSI = 0x05,
  2312. WMI_TOF_CHANNEL_INFO_SNR = 0x06,
  2313. WMI_TOF_CHANNEL_INFO_DEBUG = 0x07,
  2314. };
  2315. /* WMI_TOF_CHANNEL_INFO_EVENTID */
  2316. struct wmi_tof_channel_info_event {
  2317. /* FTM session ID */
  2318. __le32 session_id;
  2319. /* destination MAC address */
  2320. u8 dst_mac[WMI_MAC_LEN];
  2321. /* wmi_tof_channel_info_type_e */
  2322. u8 type;
  2323. /* data report length */
  2324. u8 len;
  2325. /* data report payload */
  2326. u8 report[0];
  2327. } __packed;
  2328. /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
  2329. struct wmi_tof_set_tx_rx_offset_event {
  2330. /* enum wmi_fw_status */
  2331. u8 status;
  2332. u8 reserved[3];
  2333. } __packed;
  2334. /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
  2335. struct wmi_tof_get_tx_rx_offset_event {
  2336. /* enum wmi_fw_status */
  2337. u8 status;
  2338. /* RF index used to read the offsets */
  2339. u8 rf_index;
  2340. u8 reserved1[2];
  2341. /* TX delay offset */
  2342. __le32 tx_offset;
  2343. /* RX delay offset */
  2344. __le32 rx_offset;
  2345. /* Offset to strongest tap of CIR */
  2346. __le32 precursor;
  2347. } __packed;
  2348. /* Result status codes for WMI commands */
  2349. enum wmi_rf_sector_status {
  2350. WMI_RF_SECTOR_STATUS_SUCCESS = 0x00,
  2351. WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01,
  2352. WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02,
  2353. WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03,
  2354. };
  2355. /* Types of the RF sector (TX,RX) */
  2356. enum wmi_rf_sector_type {
  2357. WMI_RF_SECTOR_TYPE_RX = 0x00,
  2358. WMI_RF_SECTOR_TYPE_TX = 0x01,
  2359. };
  2360. /* Content of RF Sector (six 32-bits registers) */
  2361. struct wmi_rf_sector_info {
  2362. /* Phase values for RF Chains[15-0] (2bits per RF chain) */
  2363. __le32 psh_hi;
  2364. /* Phase values for RF Chains[31-16] (2bits per RF chain) */
  2365. __le32 psh_lo;
  2366. /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
  2367. * index
  2368. */
  2369. __le32 etype0;
  2370. /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
  2371. * index
  2372. */
  2373. __le32 etype1;
  2374. /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
  2375. * index
  2376. */
  2377. __le32 etype2;
  2378. /* D-Type values (3bits each) for 8 Distribution amplifiers + X16
  2379. * switch bits
  2380. */
  2381. __le32 dtype_swch_off;
  2382. } __packed;
  2383. #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF)
  2384. #define WMI_MAX_RF_MODULES_NUM (8)
  2385. /* WMI_GET_RF_SECTOR_PARAMS_CMD */
  2386. struct wmi_get_rf_sector_params_cmd {
  2387. /* Sector number to be retrieved */
  2388. __le16 sector_idx;
  2389. /* enum wmi_rf_sector_type - type of requested RF sector */
  2390. u8 sector_type;
  2391. /* bitmask vector specifying destination RF modules */
  2392. u8 rf_modules_vec;
  2393. } __packed;
  2394. /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
  2395. struct wmi_get_rf_sector_params_done_event {
  2396. /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
  2397. * wmi_rf_sector_status)
  2398. */
  2399. u8 status;
  2400. /* align next field to U64 boundary */
  2401. u8 reserved[7];
  2402. /* TSF timestamp when RF sectors where retrieved */
  2403. __le64 tsf;
  2404. /* Content of RF sector retrieved from each RF module */
  2405. struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
  2406. } __packed;
  2407. /* WMI_SET_RF_SECTOR_PARAMS_CMD */
  2408. struct wmi_set_rf_sector_params_cmd {
  2409. /* Sector number to be retrieved */
  2410. __le16 sector_idx;
  2411. /* enum wmi_rf_sector_type - type of requested RF sector */
  2412. u8 sector_type;
  2413. /* bitmask vector specifying destination RF modules */
  2414. u8 rf_modules_vec;
  2415. /* Content of RF sector to be written to each RF module */
  2416. struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
  2417. } __packed;
  2418. /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
  2419. struct wmi_set_rf_sector_params_done_event {
  2420. /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
  2421. * wmi_rf_sector_status)
  2422. */
  2423. u8 status;
  2424. } __packed;
  2425. /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
  2426. * TXSS/BRP for communication with specified CID
  2427. */
  2428. struct wmi_get_selected_rf_sector_index_cmd {
  2429. /* Connection/Station ID in [0:7] range */
  2430. u8 cid;
  2431. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2432. u8 sector_type;
  2433. /* align to U32 boundary */
  2434. u8 reserved[2];
  2435. } __packed;
  2436. /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
  2437. * index selected by TXSS/BRP for communication with specified CID
  2438. */
  2439. struct wmi_get_selected_rf_sector_index_done_event {
  2440. /* Retrieved sector index selected in TXSS (for TX sector request) or
  2441. * BRP (for RX sector request)
  2442. */
  2443. __le16 sector_idx;
  2444. /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
  2445. * wmi_rf_sector_status)
  2446. */
  2447. u8 status;
  2448. /* align next field to U64 boundary */
  2449. u8 reserved[5];
  2450. /* TSF timestamp when result was retrieved */
  2451. __le64 tsf;
  2452. } __packed;
  2453. /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
  2454. * communication with specified CID. Assumes that TXSS/BRP is disabled by
  2455. * other command
  2456. */
  2457. struct wmi_set_selected_rf_sector_index_cmd {
  2458. /* Connection/Station ID in [0:7] range */
  2459. u8 cid;
  2460. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2461. u8 sector_type;
  2462. /* Forced sector index */
  2463. __le16 sector_idx;
  2464. } __packed;
  2465. /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
  2466. * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
  2467. */
  2468. struct wmi_set_selected_rf_sector_index_done_event {
  2469. /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
  2470. * wmi_rf_sector_status)
  2471. */
  2472. u8 status;
  2473. /* align to U32 boundary */
  2474. u8 reserved[3];
  2475. } __packed;
  2476. /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
  2477. * modules
  2478. */
  2479. struct wmi_set_rf_sector_on_cmd {
  2480. /* Sector index to be activated */
  2481. __le16 sector_idx;
  2482. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2483. u8 sector_type;
  2484. /* bitmask vector specifying destination RF modules */
  2485. u8 rf_modules_vec;
  2486. } __packed;
  2487. /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
  2488. * WMI_SET_RF_SECTOR_ON_CMD
  2489. */
  2490. struct wmi_set_rf_sector_on_done_event {
  2491. /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
  2492. * wmi_rf_sector_status)
  2493. */
  2494. u8 status;
  2495. /* align to U32 boundary */
  2496. u8 reserved[3];
  2497. } __packed;
  2498. enum wmi_sector_sweep_type {
  2499. WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00,
  2500. WMI_SECTOR_SWEEP_TYPE_BCON = 0x01,
  2501. WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02,
  2502. WMI_SECTOR_SWEEP_TYPE_NUM = 0x03,
  2503. };
  2504. /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
  2505. *
  2506. * Set the order of TX sectors in TXSS and/or Beacon(AP).
  2507. *
  2508. * Returned event:
  2509. * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
  2510. */
  2511. struct wmi_prio_tx_sectors_order_cmd {
  2512. /* tx sectors order to be applied, 0xFF for end of array */
  2513. u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
  2514. /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
  2515. u8 sector_sweep_type;
  2516. /* needed only for TXSS configuration */
  2517. u8 cid;
  2518. /* alignment to 32b */
  2519. u8 reserved[2];
  2520. } __packed;
  2521. /* completion status codes */
  2522. enum wmi_prio_tx_sectors_cmd_status {
  2523. WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00,
  2524. WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01,
  2525. /* other error */
  2526. WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02,
  2527. };
  2528. /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
  2529. struct wmi_prio_tx_sectors_order_event {
  2530. /* enum wmi_prio_tx_sectors_cmd_status */
  2531. u8 status;
  2532. /* alignment to 32b */
  2533. u8 reserved[3];
  2534. } __packed;
  2535. struct wmi_prio_tx_sectors_num_cmd {
  2536. /* [0-128], 0 = No changes */
  2537. u8 beacon_number_of_sectors;
  2538. /* [0-128], 0 = No changes */
  2539. u8 txss_number_of_sectors;
  2540. /* [0-8] needed only for TXSS configuration */
  2541. u8 cid;
  2542. } __packed;
  2543. /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
  2544. *
  2545. * Set the number of active sectors in TXSS and/or Beacon.
  2546. *
  2547. * Returned event:
  2548. * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
  2549. */
  2550. struct wmi_prio_tx_sectors_number_cmd {
  2551. struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
  2552. /* alignment to 32b */
  2553. u8 reserved;
  2554. } __packed;
  2555. /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
  2556. struct wmi_prio_tx_sectors_number_event {
  2557. /* enum wmi_prio_tx_sectors_cmd_status */
  2558. u8 status;
  2559. /* alignment to 32b */
  2560. u8 reserved[3];
  2561. } __packed;
  2562. /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
  2563. *
  2564. * Set default sectors order and number (hard coded in board file)
  2565. * in TXSS and/or Beacon.
  2566. *
  2567. * Returned event:
  2568. * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
  2569. */
  2570. struct wmi_prio_tx_sectors_set_default_cfg_cmd {
  2571. /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
  2572. u8 sector_sweep_type;
  2573. /* needed only for TXSS configuration */
  2574. u8 cid;
  2575. /* alignment to 32b */
  2576. u8 reserved[2];
  2577. } __packed;
  2578. /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
  2579. struct wmi_prio_tx_sectors_set_default_cfg_event {
  2580. /* enum wmi_prio_tx_sectors_cmd_status */
  2581. u8 status;
  2582. /* alignment to 32b */
  2583. u8 reserved[3];
  2584. } __packed;
  2585. /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
  2586. struct wmi_set_silent_rssi_table_done_event {
  2587. /* enum wmi_silent_rssi_status */
  2588. __le32 status;
  2589. /* enum wmi_silent_rssi_table */
  2590. __le32 table;
  2591. } __packed;
  2592. /* \WMI_COMMAND_NOT_SUPPORTED_EVENTID */
  2593. struct wmi_command_not_supported_event {
  2594. /* device id */
  2595. u8 mid;
  2596. u8 reserved0;
  2597. __le16 command_id;
  2598. /* for UT command only, otherwise reserved */
  2599. __le16 command_subtype;
  2600. __le16 reserved1;
  2601. } __packed;
  2602. #endif /* __WILOCITY_WMI_H__ */