wmi.h 83 KB

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