wmi.h 102 KB

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