wmi.h 106 KB

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