wmi.h 65 KB

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