wmi_unified_api.h 113 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705
  1. /*
  2. * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * This file contains the API definitions for the Unified Wireless Module
  20. * Interface (WMI).
  21. */
  22. #ifndef _WMI_UNIFIED_API_H_
  23. #define _WMI_UNIFIED_API_H_
  24. #include <osdep.h>
  25. #include "htc_api.h"
  26. #include "wmi_unified_param.h"
  27. #include "service_ready_param.h"
  28. #include "wlan_objmgr_psoc_obj.h"
  29. #include "wlan_mgmt_txrx_utils_api.h"
  30. #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
  31. #include "wmi_unified_pmo_api.h"
  32. #endif
  33. #include "wlan_scan_public_structs.h"
  34. #ifdef WLAN_FEATURE_ACTION_OUI
  35. #include "wlan_action_oui_public_struct.h"
  36. #endif
  37. #ifdef WLAN_SUPPORT_GREEN_AP
  38. #include "wlan_green_ap_api.h"
  39. #endif
  40. #ifdef WLAN_FEATURE_DSRC
  41. #include "wlan_ocb_public_structs.h"
  42. #endif
  43. #ifdef WLAN_SUPPORT_TWT
  44. #include "wmi_unified_twt_param.h"
  45. #include "wmi_unified_twt_api.h"
  46. #endif
  47. #ifdef FEATURE_WLAN_EXTSCAN
  48. #include "wmi_unified_extscan_api.h"
  49. #endif
  50. #ifdef IPA_OFFLOAD
  51. #include "wlan_ipa_public_struct.h"
  52. #endif
  53. #ifdef WMI_SMART_ANT_SUPPORT
  54. #include "wmi_unified_smart_ant_api.h"
  55. #endif
  56. #ifdef WMI_DBR_SUPPORT
  57. #include "wmi_unified_dbr_api.h"
  58. #endif
  59. #ifdef WMI_ATF_SUPPORT
  60. #include "wmi_unified_atf_api.h"
  61. #endif
  62. #ifdef WMI_AP_SUPPORT
  63. #include "wmi_unified_ap_api.h"
  64. #endif
  65. #ifdef WLAN_FEATURE_DSRC
  66. #include "wmi_unified_ocb_api.h"
  67. #endif
  68. #ifdef WLAN_FEATURE_NAN
  69. #include "wmi_unified_nan_api.h"
  70. #endif
  71. #ifdef CONVERGED_P2P_ENABLE
  72. #include <wmi_unified_p2p_api.h>
  73. #endif
  74. #ifdef WMI_ROAM_SUPPORT
  75. #include "wmi_unified_roam_api.h"
  76. #endif
  77. #ifdef WMI_CONCURRENCY_SUPPORT
  78. #include "wmi_unified_concurrency_api.h"
  79. #endif
  80. #ifdef WMI_STA_SUPPORT
  81. #include "wmi_unified_sta_api.h"
  82. #endif
  83. #ifdef WLAN_FW_OFFLOAD
  84. #include "wmi_unified_fwol_api.h"
  85. #endif
  86. typedef qdf_nbuf_t wmi_buf_t;
  87. #define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
  88. #define WMI_LOGD(args ...) \
  89. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args)
  90. #define WMI_LOGI(args ...) \
  91. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args)
  92. #define WMI_LOGW(args ...) \
  93. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args)
  94. #define WMI_LOGE(args ...) \
  95. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args)
  96. #define WMI_LOGP(args ...) \
  97. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args)
  98. /* Number of bits to shift to combine 32 bit integer to 64 bit */
  99. #define WMI_LOWER_BITS_SHIFT_32 0x20
  100. #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000
  101. struct wmi_soc;
  102. struct policy_mgr_dual_mac_config;
  103. /**
  104. * enum wmi_target_type - type of supported wmi command
  105. * @WMI_TLV_TARGET: tlv based target
  106. * @WMI_NON_TLV_TARGET: non-tlv based target
  107. *
  108. */
  109. enum wmi_target_type {
  110. WMI_TLV_TARGET,
  111. WMI_NON_TLV_TARGET,
  112. WMI_MAX_TARGET_TYPE
  113. };
  114. /**
  115. * enum wmi_rx_exec_ctx - wmi rx execution context
  116. * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer
  117. * @WMI_RX_UMAC_CTX: execution context provided by umac layer
  118. * @WMI_RX_SERIALIZER_CTX: Execution context is serialized thread context
  119. *
  120. */
  121. enum wmi_rx_exec_ctx {
  122. WMI_RX_WORK_CTX,
  123. WMI_RX_UMAC_CTX,
  124. WMI_RX_TASKLET_CTX = WMI_RX_UMAC_CTX,
  125. WMI_RX_SERIALIZER_CTX = 2
  126. };
  127. /**
  128. * struct wmi_unified_attach_params - wmi init parameters
  129. * @osdev: NIC device
  130. * @target_type: type of supported wmi command
  131. * @use_cookie: flag to indicate cookie based allocation
  132. * @is_async_ep: queueing interrupt or non-interrupt endpoint
  133. * @rx_ops: handle to wmi ops
  134. * @psoc: objmgr psoc
  135. * @max_commands: max commands
  136. * @soc_id: SoC device instance id
  137. */
  138. struct wmi_unified_attach_params {
  139. osdev_t osdev;
  140. enum wmi_target_type target_type;
  141. bool use_cookie;
  142. bool is_async_ep;
  143. struct wlan_objmgr_psoc *psoc;
  144. uint16_t max_commands;
  145. uint32_t soc_id;
  146. };
  147. /**
  148. * attach for unified WMI
  149. *
  150. * @param scn_handle : handle to SCN.
  151. * @param params : attach params for WMI
  152. *
  153. */
  154. void *wmi_unified_attach(void *scn_handle,
  155. struct wmi_unified_attach_params *params);
  156. /**
  157. * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro
  158. *
  159. * @wmi_handle: wmi handle
  160. * @cmd: mgmt command
  161. * @header: pointer to 802.11 header
  162. * @vdev_id: vdev id
  163. * @chanfreq: channel frequency
  164. *
  165. * Return: none
  166. */
  167. void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
  168. void *header, uint32_t vdev_id, uint32_t chanfreq);
  169. /**
  170. * detach for unified WMI
  171. *
  172. * @param wmi_handle : handle to WMI.
  173. * @return void.
  174. */
  175. void wmi_unified_detach(struct wmi_unified *wmi_handle);
  176. /**
  177. * API to sync time between host and firmware
  178. *
  179. * @wmi_handle: handle to WMI.
  180. *
  181. * Return: none
  182. */
  183. void wmi_send_time_stamp_sync_cmd_tlv(wmi_unified_t wmi_handle);
  184. void
  185. wmi_unified_remove_work(struct wmi_unified *wmi_handle);
  186. /**
  187. * generic function to allocate WMI buffer
  188. *
  189. * @param wmi_handle : handle to WMI.
  190. * @param len : length of the buffer
  191. * @return wmi_buf_t.
  192. */
  193. #ifdef NBUF_MEMORY_DEBUG
  194. #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __func__, __LINE__)
  195. wmi_buf_t
  196. wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint32_t len,
  197. const char *func_name, uint32_t line_num);
  198. #else
  199. /**
  200. * wmi_buf_alloc() - generic function to allocate WMI buffer
  201. * @wmi_handle: handle to WMI.
  202. * @len: length of the buffer
  203. *
  204. * Return: return wmi_buf_t or null if memory alloc fails
  205. */
  206. #define wmi_buf_alloc(wmi_handle, len) \
  207. wmi_buf_alloc_fl(wmi_handle, len, __func__, __LINE__)
  208. wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len,
  209. const char *func, uint32_t line);
  210. #endif
  211. /**
  212. * generic function frees WMI net buffer
  213. *
  214. * @param net_buf : Pointer ot net_buf to be freed
  215. */
  216. void wmi_buf_free(wmi_buf_t net_buf);
  217. /**
  218. * wmi_unified_cmd_send() - generic function to send unified WMI command
  219. * @wmi_handle: handle to WMI.
  220. * @buf: wmi command buffer
  221. * @buflen: wmi command buffer length
  222. * @cmd_id: WMI cmd id
  223. *
  224. * Note, it is NOT safe to access buf after calling this function!
  225. *
  226. * Return: QDF_STATUS
  227. */
  228. #define wmi_unified_cmd_send(wmi_handle, buf, buflen, cmd_id) \
  229. wmi_unified_cmd_send_fl(wmi_handle, buf, buflen, \
  230. cmd_id, __func__, __LINE__)
  231. QDF_STATUS
  232. wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf,
  233. uint32_t buflen, uint32_t cmd_id,
  234. const char *func, uint32_t line);
  235. #ifdef WLAN_FEATURE_WMI_SEND_RECV_QMI
  236. /**
  237. * wmi_unified_cmd_send_over_qmi() - generic function to send unified WMI command
  238. * over QMI
  239. * @wmi_handle: handle to WMI.
  240. * @buf: wmi command buffer
  241. * @buflen: wmi command buffer length
  242. * @cmd_id: WMI cmd id
  243. *
  244. * Return: QDF_STATUS
  245. */
  246. QDF_STATUS wmi_unified_cmd_send_over_qmi(struct wmi_unified *wmi_handle,
  247. wmi_buf_t buf, uint32_t buflen,
  248. uint32_t cmd_id);
  249. /**
  250. * wmi_process_qmi_fw_event() - Process WMI event received over QMI
  251. * @wmi_cb_ctx: WMI handle received as call back context
  252. * @buf: Pointer to WMI event buffer
  253. * @len: Len of WMI buffer received
  254. *
  255. * Return: None
  256. */
  257. int wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len);
  258. #else
  259. static inline
  260. QDF_STATUS wmi_unified_cmd_send_over_qmi(struct wmi_unified *wmi_handle,
  261. wmi_buf_t buf, uint32_t buflen,
  262. uint32_t cmd_id)
  263. {
  264. return QDF_STATUS_E_NOSUPPORT;
  265. }
  266. static inline int wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len)
  267. {
  268. return -EINVAL;
  269. }
  270. #endif
  271. /**
  272. * wmi_unified_register_event() - WMI event handler
  273. * registration function for converged components
  274. *
  275. * @wmi_handle: handle to WMI.
  276. * @event_id: WMI event ID
  277. * @handler_func: Event handler call back function
  278. *
  279. * @return 0 on success and -ve on failure.
  280. */
  281. int
  282. wmi_unified_register_event(wmi_unified_t wmi_handle,
  283. uint32_t event_id,
  284. wmi_unified_event_handler handler_func);
  285. /**
  286. * wmi_unified_register_event_handler() - WMI event handler
  287. * registration function
  288. *
  289. * @wmi_handle: handle to WMI.
  290. * @event_id: WMI event ID
  291. * @handler_func: Event handler call back function
  292. * @rx_ctx: rx event processing context
  293. *
  294. * @return 0 on success and -ve on failure.
  295. */
  296. int
  297. wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
  298. wmi_conv_event_id event_id,
  299. wmi_unified_event_handler handler_func,
  300. uint8_t rx_ctx);
  301. /**
  302. * WMI event handler unregister function for converged componets
  303. *
  304. * @param wmi_handle : handle to WMI.
  305. * @param event_id : WMI event ID
  306. * @return 0 on success and -ve on failure.
  307. */
  308. int
  309. wmi_unified_unregister_event(wmi_unified_t wmi_handle,
  310. uint32_t event_id);
  311. /**
  312. * WMI event handler unregister function
  313. *
  314. * @param wmi_handle : handle to WMI.
  315. * @param event_id : WMI event ID
  316. * @return 0 on success and -ve on failure.
  317. */
  318. int
  319. wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
  320. wmi_conv_event_id event_id);
  321. /**
  322. * wmi_unified_connect_htc_service() - WMI API to get connect to HTC service
  323. * @wmi_handle: handle to WMI.
  324. * @htc_handle: handle to HTC.
  325. *
  326. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAULT for failure
  327. */
  328. QDF_STATUS
  329. wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
  330. HTC_HANDLE htc_handle);
  331. /*
  332. * WMI API to verify the host has enough credits to suspend
  333. * @param wmi_handle : handle to WMI.
  334. */
  335. int wmi_is_suspend_ready(wmi_unified_t wmi_handle);
  336. /**
  337. * WMI API to get updated host_credits
  338. * @param wmi_handle : handle to WMI.
  339. */
  340. int wmi_get_host_credits(wmi_unified_t wmi_handle);
  341. /**
  342. * WMI API to get WMI Pending Commands in the HTC queue
  343. * @param wmi_handle : handle to WMI.
  344. */
  345. int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
  346. /**
  347. * WMI API to set target suspend state
  348. * @param wmi_handle : handle to WMI.
  349. * @param val : suspend state boolean
  350. */
  351. void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
  352. /**
  353. * wmi_is_target_suspended() - WMI API to check target suspend state
  354. * @wmi_handle: handle to WMI.
  355. *
  356. * WMI API to check target suspend state
  357. *
  358. * Return: true if target is suspended, else false.
  359. */
  360. bool wmi_is_target_suspended(struct wmi_unified *wmi_handle);
  361. /**
  362. * WMI API to set bus suspend state
  363. * @param wmi_handle: handle to WMI.
  364. * @param val: suspend state boolean
  365. */
  366. void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val);
  367. /**
  368. * WMI API to set crash injection state
  369. * @param wmi_handle: handle to WMI.
  370. * @param val: crash injection state boolean
  371. */
  372. void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
  373. /**
  374. * WMI API to set target assert
  375. * @param wmi_handle: handle to WMI.
  376. * @param val: target assert config value.
  377. *
  378. * Return: none.
  379. */
  380. void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val);
  381. /**
  382. * generic function to block unified WMI command
  383. * @param wmi_handle : handle to WMI.
  384. * @return 0 on success and -ve on failure.
  385. */
  386. int
  387. wmi_stop(wmi_unified_t wmi_handle);
  388. /**
  389. * generic function to start unified WMI command
  390. * @param wmi_handle : handle to WMI.
  391. * @return 0 on success and -ve on failure.
  392. */
  393. int
  394. wmi_start(wmi_unified_t wmi_handle);
  395. /**
  396. * API to flush all the previous packets associated with the wmi endpoint
  397. *
  398. * @param wmi_handle : handle to WMI.
  399. */
  400. void
  401. wmi_flush_endpoint(wmi_unified_t wmi_handle);
  402. /**
  403. * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
  404. * By default pdev_id conversion is not done in WMI.
  405. * This API can be used enable conversion in WMI.
  406. * @param wmi_handle : handle to WMI
  407. * @param *pdev_id_map : pdev conversion map
  408. * @param size : size of pdev_id_map
  409. * Return none
  410. */
  411. void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle,
  412. uint32_t *pdev_id_map, uint8_t size);
  413. /**
  414. * API to handle wmi rx event after UMAC has taken care of execution
  415. * context
  416. *
  417. * @param wmi_handle : handle to WMI.
  418. * @param evt_buf : wmi event buffer
  419. */
  420. void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
  421. #ifdef FEATURE_RUNTIME_PM
  422. void
  423. wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val);
  424. bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle);
  425. #else
  426. static inline void
  427. wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val)
  428. {
  429. return;
  430. }
  431. static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
  432. {
  433. return false;
  434. }
  435. #endif
  436. void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle);
  437. void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx);
  438. /**
  439. * UMAC Callback to process fw event.
  440. * @param wmi_handle : handle to WMI.
  441. * @param evt_buf : wmi event buffer
  442. */
  443. void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
  444. uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
  445. /**
  446. * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
  447. * @wmi_handle: wmi handle
  448. * @hw_mode_index: The HW_Mode field is a enumerated type that is selected
  449. * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
  450. *
  451. * Request HardWare (HW) Mode change to WLAN firmware
  452. *
  453. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  454. */
  455. QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(wmi_unified_t wmi_handle,
  456. uint32_t hw_mode_index);
  457. /**
  458. * wmi_extract_hw_mode_resp() - function to extract HW mode change response
  459. * @wmi_hdl: WMI handle
  460. * @evt_buf: Buffer holding event data
  461. * @cmd_status: command status
  462. *
  463. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  464. */
  465. QDF_STATUS
  466. wmi_unified_extract_hw_mode_resp(wmi_unified_t wmi,
  467. void *evt_buf,
  468. uint32_t *cmd_status);
  469. /**
  470. * wmi_unified_vdev_create_send() - send VDEV create command to fw
  471. * @wmi_handle: wmi handle
  472. * @param: pointer to hold vdev create parameter
  473. * @macaddr: vdev mac address
  474. *
  475. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  476. */
  477. QDF_STATUS wmi_unified_vdev_create_send(wmi_unified_t wmi_handle,
  478. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  479. struct vdev_create_params *param);
  480. /**
  481. * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
  482. * @wmi_handle: wmi handle
  483. * @if_id: vdev id
  484. *
  485. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  486. */
  487. QDF_STATUS wmi_unified_vdev_delete_send(wmi_unified_t wmi_handle,
  488. uint8_t if_id);
  489. /**
  490. * wmi_unified_vdev_nss_chain_params_send() - send VDEV nss chain params to fw
  491. * @wmi_handle: wmi handle
  492. * @vdev_id: vdev id
  493. * @nss_chains_user_cfg: user configured params to send
  494. *
  495. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  496. */
  497. QDF_STATUS
  498. wmi_unified_vdev_nss_chain_params_send(
  499. wmi_unified_t wmi_handle,
  500. uint8_t vdev_id,
  501. struct vdev_nss_chains *nss_chains_user_cfg);
  502. /**
  503. * wmi_unified_vdev_stop_send() - send vdev stop command to fw
  504. * @wmi_handle: wmi handle
  505. * @vdev_id: vdev id
  506. *
  507. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  508. */
  509. QDF_STATUS wmi_unified_vdev_stop_send(wmi_unified_t wmi_handle,
  510. uint8_t vdev_id);
  511. /**
  512. * wmi_unified_vdev_up_send() - send vdev up command in fw
  513. * @wmi_handle: wmi handle
  514. * @bssid: bssid
  515. * @params: pointer to hold vdev up parameter
  516. *
  517. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  518. */
  519. QDF_STATUS wmi_unified_vdev_up_send(wmi_unified_t wmi_handle,
  520. uint8_t bssid[QDF_MAC_ADDR_SIZE],
  521. struct vdev_up_params *params);
  522. /**
  523. * wmi_unified_vdev_down_send() - send vdev down command to fw
  524. * @wmi_handle: wmi handle
  525. * @vdev_id: vdev id
  526. *
  527. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  528. */
  529. QDF_STATUS wmi_unified_vdev_down_send(wmi_unified_t wmi_handle,
  530. uint8_t vdev_id);
  531. /**
  532. * wmi_unified_vdev_start_send() - send vdev start command to fw
  533. * @wmi_handle: wmi handle
  534. * @vdev_id: vdev id
  535. *
  536. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  537. */
  538. QDF_STATUS wmi_unified_vdev_start_send(wmi_unified_t wmi_handle,
  539. struct vdev_start_params *req);
  540. /**
  541. * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
  542. * @wmi_handle: handle to WMI
  543. * @req: pointer to hold nac rssi request data
  544. *
  545. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  546. */
  547. QDF_STATUS
  548. wmi_unified_vdev_set_nac_rssi_send(wmi_unified_t wmi_handle,
  549. struct vdev_scan_nac_rssi_params *req);
  550. /**
  551. * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
  552. * @wmi_handle: handle to WMI.
  553. * @macaddr: MAC address
  554. * @param: pointer to hold vdev set parameter
  555. *
  556. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  557. */
  558. QDF_STATUS
  559. wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle,
  560. struct vdev_set_params *param);
  561. /**
  562. * wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function
  563. * @wmi_handle: handle to WMI.
  564. * @param: pointer to hold sifs trigger parameter
  565. *
  566. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  567. */
  568. QDF_STATUS wmi_unified_sifs_trigger_send(wmi_unified_t wmi_handle,
  569. struct sifs_trigger_param *param);
  570. /**
  571. * wmi_unified_peer_delete_send() - send PEER delete command to fw
  572. * @wmi_handle: wmi handle
  573. * @peer_addr: peer mac addr
  574. * @vdev_id: vdev id
  575. *
  576. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  577. */
  578. QDF_STATUS
  579. wmi_unified_peer_delete_send(wmi_unified_t wmi_handle,
  580. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  581. uint8_t vdev_id);
  582. /**
  583. * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
  584. * @wmi_handle: wmi handle
  585. * @peer_addr: peer mac address
  586. * @param: pointer to hold peer flush tid parameter
  587. *
  588. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  589. */
  590. QDF_STATUS
  591. wmi_unified_peer_flush_tids_send(wmi_unified_t wmi_handle,
  592. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  593. struct peer_flush_params *param);
  594. /**
  595. * wmi_unified_peer_delete_all_send() - send PEER delete all command to fw
  596. * @wmi_hdl: wmi handle
  597. * @param: pointer to hold peer delete all parameters
  598. *
  599. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  600. */
  601. QDF_STATUS wmi_unified_peer_delete_all_send(
  602. wmi_unified_t wmi_hdl,
  603. struct peer_delete_all_params *param);
  604. /**
  605. * wmi_set_peer_param() - set peer parameter in fw
  606. * @wmi_handle: wmi handle
  607. * @peer_addr: peer mac address
  608. * @param: pointer to hold peer set parameter
  609. *
  610. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  611. */
  612. QDF_STATUS
  613. wmi_set_peer_param_send(wmi_unified_t wmi_handle,
  614. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  615. struct peer_set_params *param);
  616. /**
  617. * wmi_unified_peer_create_send() - send peer create command to fw
  618. * @wmi_handle: wmi handle
  619. * @peer_addr: peer mac address
  620. * @peer_type: peer type
  621. * @vdev_id: vdev id
  622. *
  623. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  624. */
  625. QDF_STATUS wmi_unified_peer_create_send(wmi_unified_t wmi_handle,
  626. struct peer_create_params *param);
  627. QDF_STATUS wmi_unified_stats_request_send(wmi_unified_t wmi_handle,
  628. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  629. struct stats_request_params *param);
  630. /**
  631. * wmi_unified_green_ap_ps_send() - enable green ap powersave command
  632. * @wmi_handle: wmi handle
  633. * @value: value
  634. * @pdev_id: pdev id to have radio context
  635. *
  636. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  637. */
  638. QDF_STATUS wmi_unified_green_ap_ps_send(wmi_unified_t wmi_handle,
  639. uint32_t value, uint8_t pdev_id);
  640. /**
  641. * wmi_unified_wow_enable_send() - WMI wow enable function
  642. * @wmi_handle: handle to WMI.
  643. * @param: pointer to hold wow enable parameter
  644. * @mac_id: radio context
  645. *
  646. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  647. */
  648. QDF_STATUS wmi_unified_wow_enable_send(wmi_unified_t wmi_handle,
  649. struct wow_cmd_params *param,
  650. uint8_t mac_id);
  651. /**
  652. * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
  653. * @wmi_handle: handle to WMI.
  654. *
  655. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  656. */
  657. QDF_STATUS wmi_unified_wow_wakeup_send(wmi_unified_t wmi_handle);
  658. /**
  659. * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
  660. * @wmi_handle: handle to WMI.
  661. * @param: pointer to wow wakeup event parameter structure
  662. *
  663. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  664. */
  665. QDF_STATUS
  666. wmi_unified_wow_add_wakeup_event_send(wmi_unified_t wmi_handle,
  667. struct wow_add_wakeup_params *param);
  668. /**
  669. * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
  670. * @wmi_handle: handle to WMI.
  671. * @param: pointer to wow wakeup pattern parameter structure
  672. *
  673. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  674. */
  675. QDF_STATUS
  676. wmi_unified_wow_add_wakeup_pattern_send(
  677. wmi_unified_t wmi_handle,
  678. struct wow_add_wakeup_pattern_params *param);
  679. /**
  680. * wmi_unified_wow_remove_wakeup_pattern_send() - wow wakeup pattern function
  681. * @wmi_handle: handle to WMI.
  682. * @param: pointer to wow wakeup pattern parameter structure
  683. *
  684. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  685. */
  686. QDF_STATUS
  687. wmi_unified_wow_remove_wakeup_pattern_send(
  688. wmi_unified_t wmi_handle,
  689. struct wow_remove_wakeup_pattern_params *param);
  690. /**
  691. * wmi_unified_packet_log_enable_send() - WMI request stats function
  692. * @wmi_handle : handle to WMI.
  693. * @PKTLOG_EVENT : PKTLOG Event
  694. * @mac_id : MAC id corresponds to pdev id
  695. *
  696. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  697. */
  698. QDF_STATUS
  699. wmi_unified_packet_log_enable_send(wmi_unified_t wmi_handle,
  700. WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT,
  701. uint8_t mac_id);
  702. /**
  703. * wmi_unified_peer_based_pktlog_send() - WMI request enable peer
  704. * based filtering
  705. * @wmi_handle: handle to WMI.
  706. * @macaddr: PEER mac address to be filtered
  707. * @mac_id: Mac id
  708. * @enb_dsb: Enable or Disable peer based pktlog
  709. * filtering
  710. *
  711. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  712. */
  713. QDF_STATUS wmi_unified_peer_based_pktlog_send(wmi_unified_t wmi_handle,
  714. uint8_t *macaddr,
  715. uint8_t mac_id,
  716. uint8_t enb_dsb);
  717. /**
  718. * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
  719. * @wmi_handle: handle to WMI.
  720. * @PKTLOG_EVENT: packet log event
  721. *
  722. * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  723. */
  724. QDF_STATUS wmi_unified_packet_log_disable_send(wmi_unified_t wmi_handle,
  725. uint8_t mac_id);
  726. /**
  727. * wmi_unified_suspend_send() - WMI suspend function
  728. * @wmi_handle: handle to WMI.
  729. * @param: pointer to hold suspend parameter
  730. * @mac_id: radio context
  731. *
  732. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  733. */
  734. QDF_STATUS wmi_unified_suspend_send(wmi_unified_t wmi_handle,
  735. struct suspend_params *param,
  736. uint8_t mac_id);
  737. /**
  738. * wmi_unified_resume_send - WMI resume function
  739. * @wmi_handle : handle to WMI.
  740. * @mac_id: radio context
  741. *
  742. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  743. */
  744. QDF_STATUS wmi_unified_resume_send(wmi_unified_t wmi_handle,
  745. uint8_t mac_id);
  746. /**
  747. * wmi_unified_pdev_param_send() - set pdev parameters
  748. * @wmi_handle: wmi handle
  749. * @param: pointer to pdev parameter
  750. * @mac_id: radio context
  751. *
  752. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
  753. * errno on failure
  754. */
  755. QDF_STATUS
  756. wmi_unified_pdev_param_send(wmi_unified_t wmi_handle,
  757. struct pdev_params *param,
  758. uint8_t mac_id);
  759. /**
  760. * wmi_unified_fd_tmpl_send_cmd() - WMI FILS Discovery send function
  761. * @wmi_handle: handle to WMI.
  762. * @param: pointer to hold FILS Discovery send cmd parameter
  763. *
  764. * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  765. */
  766. QDF_STATUS
  767. wmi_unified_fd_tmpl_send_cmd(wmi_unified_t wmi_handle,
  768. struct fils_discovery_tmpl_params *param);
  769. /**
  770. * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
  771. * @wmi_handle: handle to WMI.
  772. * @macaddr: MAC address
  773. * @param: pointer to hold beacon send cmd parameter
  774. *
  775. * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  776. */
  777. QDF_STATUS
  778. wmi_unified_beacon_tmpl_send_cmd(wmi_unified_t wmi_handle,
  779. struct beacon_tmpl_params *param);
  780. /**
  781. * wmi_unified_peer_assoc_send() - WMI peer assoc function
  782. * @wmi_handle: handle to WMI.
  783. * @macaddr: MAC address
  784. * @param: pointer to peer assoc parameter
  785. *
  786. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  787. */
  788. QDF_STATUS wmi_unified_peer_assoc_send(wmi_unified_t wmi_handle,
  789. struct peer_assoc_params *param);
  790. /**
  791. * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
  792. * @wmi_handle: wmi handle
  793. * @peer_addr: peer mac address
  794. * @param: pointer to sta_ps parameter structure
  795. *
  796. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  797. */
  798. QDF_STATUS wmi_unified_sta_ps_cmd_send(wmi_unified_t wmi_handle,
  799. struct sta_ps_params *param);
  800. /**
  801. * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
  802. * @wmi_handle: wmi handle
  803. * @peer_addr: peer mac address
  804. * @param: pointer to ap_ps parameter structure
  805. *
  806. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  807. */
  808. QDF_STATUS wmi_unified_ap_ps_cmd_send(wmi_unified_t wmi_handle,
  809. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  810. struct ap_ps_params *param);
  811. /**
  812. * wmi_unified_scan_start_cmd_send() - WMI scan start function
  813. * @wmi_handle: handle to WMI.
  814. * @macaddr: MAC address
  815. * @param: pointer to hold scan start cmd parameter
  816. *
  817. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  818. */
  819. QDF_STATUS
  820. wmi_unified_scan_start_cmd_send(wmi_unified_t wmi_handle,
  821. struct scan_req_params *param);
  822. /**
  823. * wmi_unified_scan_stop_cmd_send() - WMI scan start function
  824. * @wmi_handle: handle to WMI.
  825. * @macaddr: MAC address
  826. * @param: pointer to hold scan start cmd parameter
  827. *
  828. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  829. */
  830. QDF_STATUS
  831. wmi_unified_scan_stop_cmd_send(wmi_unified_t wmi_handle,
  832. struct scan_cancel_param *param);
  833. /**
  834. * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
  835. * @wmi_handle: handle to WMI.
  836. * @macaddr: MAC address
  837. * @param: pointer to hold scan channel list parameter
  838. *
  839. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  840. */
  841. QDF_STATUS
  842. wmi_unified_scan_chan_list_cmd_send(wmi_unified_t wmi_handle,
  843. struct scan_chan_list_params *param);
  844. /**
  845. * wmi_crash_inject() - inject fw crash
  846. * @wmi_handle: wmi handle
  847. * @param: ponirt to crash inject parameter structure
  848. *
  849. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  850. */
  851. QDF_STATUS wmi_crash_inject(wmi_unified_t wmi_handle,
  852. struct crash_inject *param);
  853. /**
  854. * wmi_unified_pdev_utf_cmd() - send utf command to fw
  855. * @wmi_handle: wmi handle
  856. * @param: pointer to pdev_utf_params
  857. * @mac_id: mac id to have radio context
  858. *
  859. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  860. */
  861. QDF_STATUS wmi_unified_pdev_utf_cmd_send(wmi_unified_t wmi_handle,
  862. struct pdev_utf_params *param,
  863. uint8_t mac_id);
  864. #ifdef FEATURE_FW_LOG_PARSING
  865. /**
  866. * wmi_unified_dbglog_cmd_send() - set debug log level
  867. * @wmi_handle: handle to WMI.
  868. * @param: pointer to hold dbglog level parameter
  869. *
  870. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  871. */
  872. QDF_STATUS wmi_unified_dbglog_cmd_send(wmi_unified_t wmi_handle,
  873. struct dbglog_params *param);
  874. #else
  875. static inline QDF_STATUS
  876. wmi_unified_dbglog_cmd_send(wmi_unified_t wmi_handle,
  877. struct dbglog_params *param)
  878. {
  879. return QDF_STATUS_SUCCESS;
  880. }
  881. #endif
  882. /**
  883. * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
  884. * @wmi_handle: handle to WMI.
  885. * @param: pointer to hold mgmt cmd parameter
  886. *
  887. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  888. */
  889. QDF_STATUS wmi_mgmt_unified_cmd_send(wmi_unified_t wmi_handle,
  890. struct wmi_mgmt_params *param);
  891. /**
  892. * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
  893. * @wmi_handle: handle to WMI.
  894. * @param: pointer to hold offchan data cmd parameter
  895. *
  896. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  897. */
  898. QDF_STATUS wmi_offchan_data_tx_cmd_send(
  899. wmi_unified_t wmi_handle,
  900. struct wmi_offchan_data_tx_params *param);
  901. /**
  902. * wmi_unified_modem_power_state() - set modem power state to fw
  903. * @wmi_handle: wmi handle
  904. * @param_value: parameter value
  905. *
  906. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  907. */
  908. QDF_STATUS wmi_unified_modem_power_state(wmi_unified_t wmi_handle,
  909. uint32_t param_value);
  910. /**
  911. * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
  912. * @wmi_handle: wmi handle
  913. * @vdev_id: vdev id
  914. * @val: value
  915. *
  916. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
  917. */
  918. QDF_STATUS wmi_unified_set_sta_ps_mode(wmi_unified_t wmi_handle,
  919. uint32_t vdev_id,
  920. uint8_t val);
  921. /**
  922. * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
  923. * @wmi_handle: wmi handle
  924. * @param: uapsd cmd parameter strcture
  925. *
  926. * This function sets the trigger
  927. * uapsd params such as service interval, delay interval
  928. * and suspend interval which will be used by the firmware
  929. * to send trigger frames periodically when there is no
  930. * traffic on the transmit side.
  931. *
  932. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
  933. */
  934. QDF_STATUS
  935. wmi_unified_set_sta_uapsd_auto_trig_cmd(wmi_unified_t wmi_handle,
  936. struct sta_uapsd_trig_params *param);
  937. /**
  938. * wmi_get_temperature() - get pdev temperature req
  939. * @wmi_handle: wmi handle
  940. *
  941. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
  942. */
  943. QDF_STATUS wmi_unified_get_temperature(wmi_unified_t wmi_handle);
  944. /**
  945. * wmi_set_smps_params() - set smps params
  946. * @wmi_handle: wmi handle
  947. * @vdev_id: vdev id
  948. * @value: value
  949. *
  950. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
  951. */
  952. QDF_STATUS wmi_unified_set_smps_params(wmi_unified_t wmi_handle,
  953. uint8_t vdev_id,
  954. int value);
  955. /**
  956. * wmi_set_mimops() - set MIMO powersave
  957. * @wmi_handle: wmi handle
  958. * @vdev_id: vdev id
  959. * @value: value
  960. *
  961. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
  962. */
  963. QDF_STATUS wmi_unified_set_mimops(wmi_unified_t wmi_handle,
  964. uint8_t vdev_id, int value);
  965. /**
  966. * wmi_unified_lro_config_cmd() - process the LRO config command
  967. * @wmi_handle: Pointer to wmi handle
  968. * @wmi_lro_cmd: Pointer to LRO configuration parameters
  969. *
  970. * This function sends down the LRO configuration parameters to
  971. * the firmware to enable LRO, sets the TCP flags and sets the
  972. * seed values for the toeplitz hash generation
  973. *
  974. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  975. */
  976. QDF_STATUS
  977. wmi_unified_lro_config_cmd(wmi_unified_t wmi_handle,
  978. struct wmi_lro_config_cmd_t *wmi_lro_cmd);
  979. /**
  980. * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
  981. * @wmi_handle: Pointer to wmi handle
  982. * @thermal_info: Thermal command information
  983. *
  984. * This function sends the thermal management command
  985. * to the firmware
  986. *
  987. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  988. */
  989. QDF_STATUS
  990. wmi_unified_set_thermal_mgmt_cmd(wmi_unified_t wmi_handle,
  991. struct thermal_cmd_params *thermal_info);
  992. /**
  993. * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
  994. * @wmi_handle: Pointer to wmi handle
  995. * @rate_report_params: Pointer to peer rate report parameters
  996. *
  997. *
  998. * Return: QDF_STATUS_SUCCESS for success otherwise failure
  999. */
  1000. QDF_STATUS
  1001. wmi_unified_peer_rate_report_cmd(
  1002. wmi_unified_t wmi_handle,
  1003. struct wmi_peer_rate_report_params *rate_report_params);
  1004. /**
  1005. * wmi_unified_process_update_edca_param() - update EDCA params
  1006. * @wmi_handle: wmi handle
  1007. * @vdev_id: vdev id.
  1008. * @mu_edca_param: mu_edca_param.
  1009. * @wmm_vparams: edca parameters
  1010. *
  1011. * This function updates EDCA parameters to the target
  1012. *
  1013. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1014. */
  1015. QDF_STATUS
  1016. wmi_unified_process_update_edca_param(
  1017. wmi_unified_t wmi_handle,
  1018. uint8_t vdev_id,
  1019. bool mu_edca_param,
  1020. struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
  1021. /**
  1022. * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
  1023. * @wmi_handle: wmi handle
  1024. * @vdev_id: vdev id
  1025. * @probe_rsp_info: probe response info
  1026. *
  1027. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1028. */
  1029. QDF_STATUS
  1030. wmi_unified_probe_rsp_tmpl_send_cmd(
  1031. wmi_unified_t wmi_handle,
  1032. uint8_t vdev_id,
  1033. struct wmi_probe_resp_params *probe_rsp_info);
  1034. /**
  1035. * wmi_unified_setup_install_key_cmd - send key to install to fw
  1036. * @wmi_handle: wmi handle
  1037. * @key_params: key parameters
  1038. *
  1039. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1040. */
  1041. QDF_STATUS
  1042. wmi_unified_setup_install_key_cmd(wmi_unified_t wmi_handle,
  1043. struct set_key_params *key_params);
  1044. /**
  1045. * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
  1046. * @wmi_handle: wmi handle
  1047. * @vdev_id: vdev id
  1048. * @p2p_ie: p2p IE
  1049. *
  1050. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1051. */
  1052. QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(wmi_unified_t wmi_hdl,
  1053. uint32_t vdev_id,
  1054. uint8_t *p2p_ie);
  1055. /**
  1056. * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
  1057. * @wmi_handle: wmi handle
  1058. * @psetoui: OUI parameters
  1059. *
  1060. * set scan probe OUI parameters in firmware
  1061. *
  1062. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1063. */
  1064. QDF_STATUS wmi_unified_scan_probe_setoui_cmd(wmi_unified_t wmi_handle,
  1065. struct scan_mac_oui *psetoui);
  1066. #ifdef IPA_OFFLOAD
  1067. /** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
  1068. * @wmi_handle: wmi handle
  1069. * @ipa_offload: ipa offload control parameter
  1070. *
  1071. * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
  1072. * error number otherwise
  1073. */
  1074. QDF_STATUS
  1075. wmi_unified_ipa_offload_control_cmd(
  1076. wmi_unified_t wmi_handle,
  1077. struct ipa_uc_offload_control_params *ipa_offload);
  1078. #endif
  1079. /**
  1080. * wmi_unified_pno_stop_cmd() - PNO stop request
  1081. * @wmi_handle: wmi handle
  1082. * @vdev_id: vdev id
  1083. *
  1084. * This function request FW to stop ongoing PNO operation.
  1085. *
  1086. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1087. */
  1088. QDF_STATUS wmi_unified_pno_stop_cmd(wmi_unified_t wmi_handle, uint8_t vdev_id);
  1089. #ifdef FEATURE_WLAN_SCAN_PNO
  1090. /**
  1091. * wmi_unified_pno_start_cmd() - PNO start request
  1092. * @wmi_handle: wmi handle
  1093. * @pno: PNO request
  1094. *
  1095. * This function request FW to start PNO request.
  1096. * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1097. */
  1098. QDF_STATUS wmi_unified_pno_start_cmd(wmi_unified_t wmi_handle,
  1099. struct pno_scan_req_params *pno);
  1100. #endif
  1101. /**
  1102. * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
  1103. * @wmi_handle: wmi handle
  1104. * @params: Configuration parameters
  1105. *
  1106. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1107. */
  1108. QDF_STATUS wmi_unified_nlo_mawc_cmd(wmi_unified_t wmi_handle,
  1109. struct nlo_mawc_params *params);
  1110. #ifdef WLAN_FEATURE_LINK_LAYER_STATS
  1111. /**
  1112. * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
  1113. * @wmi_handle: wmi handle
  1114. * @clear_req: ll stats clear request command params
  1115. *
  1116. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1117. */
  1118. QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(wmi_unified_t wmi_handle,
  1119. const struct ll_stats_clear_params *clear_req);
  1120. /**
  1121. * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
  1122. * @wmi_handle: wmi handle
  1123. * @set_req: ll stats set request command params
  1124. *
  1125. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1126. */
  1127. QDF_STATUS wmi_unified_process_ll_stats_set_cmd(wmi_unified_t wmi_handle,
  1128. const struct ll_stats_set_params *set_req);
  1129. /**
  1130. * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
  1131. * @wmi_handle: wmi handle
  1132. * @get_req: ll stats get request command params
  1133. *
  1134. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1135. */
  1136. QDF_STATUS wmi_unified_process_ll_stats_get_cmd(wmi_unified_t wmi_handle,
  1137. const struct ll_stats_get_params *get_req);
  1138. #endif /* WLAN_FEATURE_LINK_LAYER_STATS */
  1139. /**
  1140. * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
  1141. * @wmi_handle: wma handle
  1142. * @vdev_id: vdev id
  1143. *
  1144. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1145. */
  1146. QDF_STATUS wmi_unified_congestion_request_cmd(wmi_unified_t wmi_handle,
  1147. uint8_t vdev_id);
  1148. /**
  1149. * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
  1150. * @wmi_handle: wmi handle
  1151. * @rssi_req: get RSSI request
  1152. *
  1153. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1154. */
  1155. QDF_STATUS wmi_unified_snr_request_cmd(wmi_unified_t wmi_handle);
  1156. /**
  1157. * wmi_unified_snr_cmd() - get RSSI from fw
  1158. * @wmi_handle: wmi handle
  1159. * @vdev_id: vdev id
  1160. *
  1161. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1162. */
  1163. QDF_STATUS wmi_unified_snr_cmd(wmi_unified_t wmi_handle, uint8_t vdev_id);
  1164. /**
  1165. * wmi_unified_link_status_req_cmd() - process link status request from UMAC
  1166. * @wmi_handle: wmi handle
  1167. * @params: get link status params
  1168. *
  1169. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1170. */
  1171. QDF_STATUS wmi_unified_link_status_req_cmd(wmi_unified_t wmi_handle,
  1172. struct link_status_params *params);
  1173. #ifdef WLAN_SUPPORT_GREEN_AP
  1174. /**
  1175. * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap config params
  1176. * @wmi_handle: wmi handler
  1177. * @egap_params: pointer to egap_params
  1178. *
  1179. * Return: 0 for success, otherwise appropriate error code
  1180. */
  1181. QDF_STATUS
  1182. wmi_unified_egap_conf_params_cmd(
  1183. wmi_unified_t wmi_handle,
  1184. struct wlan_green_ap_egap_params *egap_params);
  1185. #endif
  1186. /**
  1187. * wmi_unified_csa_offload_enable() - send CSA offload enable command
  1188. * @wmi_handle: wmi handle
  1189. * @vdev_id: vdev id
  1190. *
  1191. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1192. */
  1193. QDF_STATUS wmi_unified_csa_offload_enable(wmi_unified_t wmi_handle,
  1194. uint8_t vdev_id);
  1195. #ifdef WLAN_FEATURE_CIF_CFR
  1196. /**
  1197. * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings
  1198. * @wmi_handle: wmi handle
  1199. * @data_len: len of dma cfg req
  1200. * @data: dma cfg req
  1201. *
  1202. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1203. */
  1204. QDF_STATUS
  1205. wmi_unified_oem_dma_ring_cfg(wmi_unified_t wmi_handle,
  1206. wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
  1207. #endif
  1208. /**
  1209. * wmi_unified_start_oem_data_cmd() - start oem data request to target
  1210. * @wmi_handle: wmi handle
  1211. * @data_len: the length of @data
  1212. * @data: the pointer to data buf
  1213. *
  1214. * This is legacy api for oem data request, using wmi command
  1215. * WMI_OEM_REQ_CMDID.
  1216. *
  1217. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1218. */
  1219. QDF_STATUS wmi_unified_start_oem_data_cmd(wmi_unified_t wmi_handle,
  1220. uint32_t data_len,
  1221. uint8_t *data);
  1222. #ifdef FEATURE_OEM_DATA
  1223. /**
  1224. * wmi_unified_start_oemv2_data_cmd() - start oem data cmd to target
  1225. * @wmi_handle: wmi handle
  1226. * @params: oem data params
  1227. *
  1228. * This is common api for oem data, using wmi command WMI_OEM_DATA_CMDID.
  1229. *
  1230. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1231. */
  1232. QDF_STATUS wmi_unified_start_oemv2_data_cmd(wmi_unified_t wmi_handle,
  1233. struct oem_data *params);
  1234. #endif
  1235. /**
  1236. * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
  1237. * @wmi_handle: wmi handle
  1238. * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
  1239. *
  1240. * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
  1241. * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
  1242. * to firmware based on phyerr filtering
  1243. * offload status.
  1244. *
  1245. * Return: 1 success, 0 failure
  1246. */
  1247. QDF_STATUS
  1248. wmi_unified_dfs_phyerr_filter_offload_en_cmd(wmi_unified_t wmi_handle,
  1249. bool dfs_phyerr_filter_offload);
  1250. #if !defined(REMOVE_PKT_LOG) && defined(FEATURE_PKTLOG)
  1251. /**
  1252. * wmi_unified_pktlog_wmi_send_cmd() - send pktlog event command to target
  1253. * @wmi_handle: wmi handle
  1254. * @pktlog_event: pktlog event
  1255. * @cmd_id: pktlog cmd id
  1256. * @user_triggered: user triggered input for PKTLOG enable mode
  1257. *
  1258. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1259. */
  1260. QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(wmi_unified_t wmi_handle,
  1261. WMI_PKTLOG_EVENT pktlog_event,
  1262. uint32_t cmd_id,
  1263. uint8_t user_triggered);
  1264. #endif
  1265. /**
  1266. * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
  1267. * @wmi_handle: wmi handle
  1268. * @preq: stats ext params
  1269. *
  1270. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1271. */
  1272. QDF_STATUS wmi_unified_stats_ext_req_cmd(wmi_unified_t wmi_handle,
  1273. struct stats_ext_params *preq);
  1274. /**
  1275. * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
  1276. * @wmi_handle: wmi handle
  1277. * @pDhcpSrvOffloadInfo: DHCP server offload info
  1278. *
  1279. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1280. */
  1281. QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(
  1282. wmi_unified_t wmi_handle,
  1283. struct dhcp_offload_info_params *params);
  1284. /**
  1285. * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
  1286. * @wmi_handle: wmi handle
  1287. * @reg_dmn: reg domain
  1288. * @regdmn2G: 2G reg domain
  1289. * @regdmn5G: 5G reg domain
  1290. * @ctl2G: 2G test limit
  1291. * @ctl5G: 5G test limit
  1292. *
  1293. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1294. */
  1295. QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(wmi_unified_t wmi_handle,
  1296. uint32_t reg_dmn,
  1297. uint16_t regdmn2G,
  1298. uint16_t regdmn5G,
  1299. uint8_t ctl2G,
  1300. uint8_t ctl5G);
  1301. QDF_STATUS
  1302. wmi_unified_process_fw_mem_dump_cmd(wmi_unified_t wmi_hdl,
  1303. struct fw_dump_req_param *mem_dump_req);
  1304. /**
  1305. * wmi_unified_cfg_action_frm_tb_ppdu_cmd()-send action frame TB PPDU cfg to FW
  1306. * @wmi_handle: Pointer to WMi handle
  1307. * @cfg_info: Pointer to cfg msg
  1308. *
  1309. * This function sends action frame TB PPDU cfg to firmware
  1310. *
  1311. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1312. *
  1313. */
  1314. QDF_STATUS
  1315. wmi_unified_cfg_action_frm_tb_ppdu_cmd(
  1316. wmi_unified_t wmi_handle,
  1317. struct cfg_action_frm_tb_ppdu_param *cfg_info);
  1318. /**
  1319. * wmi_unified_save_fw_version_cmd() - save fw version
  1320. * @wmi_handle: pointer to wmi handle
  1321. * @evt_buf: Event buffer
  1322. *
  1323. *
  1324. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1325. *
  1326. */
  1327. QDF_STATUS wmi_unified_save_fw_version_cmd(wmi_unified_t wmi_handle,
  1328. void *evt_buf);
  1329. /**
  1330. * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
  1331. * @wmi_handle: wmi handle
  1332. * @event: Event received from FW
  1333. * @len: Length of the event
  1334. *
  1335. * Enables the low frequency events and disables the high frequency
  1336. * events. Bit 17 indicates if the event if low/high frequency.
  1337. * 1 - high frequency, 0 - low frequency
  1338. *
  1339. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
  1340. */
  1341. QDF_STATUS wmi_unified_log_supported_evt_cmd(wmi_unified_t wmi_handle,
  1342. uint8_t *event,
  1343. uint32_t len);
  1344. /**
  1345. * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
  1346. * @wmi_handle: wmi handle
  1347. * @start_log: Start logging related parameters
  1348. *
  1349. * Send the command to the FW based on which specific logging of diag
  1350. * event/log id can be started/stopped
  1351. *
  1352. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1353. */
  1354. QDF_STATUS
  1355. wmi_unified_enable_specific_fw_logs_cmd(wmi_unified_t wmi_handle,
  1356. struct wmi_wifi_start_log *start_log);
  1357. /**
  1358. * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
  1359. * @wmi_handle: WMI handle
  1360. *
  1361. * This function is used to send the flush command to the FW,
  1362. * that will flush the fw logs that are residue in the FW
  1363. *
  1364. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1365. */
  1366. QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(wmi_unified_t wmi_handle);
  1367. /**
  1368. * wmi_unified_unit_test_cmd() - send unit test command to fw.
  1369. * @wmi_handle: wmi handle
  1370. * @wmi_utest: unit test command
  1371. *
  1372. * This function send unit test command to fw.
  1373. *
  1374. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1375. */
  1376. QDF_STATUS wmi_unified_unit_test_cmd(wmi_unified_t wmi_handle,
  1377. struct wmi_unit_test_cmd *wmi_utest);
  1378. #ifdef FEATURE_WLAN_APF
  1379. /**
  1380. * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW
  1381. * @wmi: the WMI handle
  1382. * @vdev_id: the Id of the vdev to apply the configuration to
  1383. * @ucast_mode: the active APF mode to configure for unicast packets
  1384. * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast
  1385. * packets
  1386. */
  1387. QDF_STATUS
  1388. wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
  1389. enum wmi_host_active_apf_mode ucast_mode,
  1390. enum wmi_host_active_apf_mode
  1391. mcast_bcast_mode);
  1392. /**
  1393. * wmi_unified_send_apf_enable_cmd() - send apf enable/disable cmd
  1394. * @wmi: wmi handle
  1395. * @vdev_id: VDEV id
  1396. * @enable: true: enable, false: disable
  1397. *
  1398. * This function passes the apf enable command to fw
  1399. *
  1400. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1401. */
  1402. QDF_STATUS wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
  1403. uint32_t vdev_id, bool enable);
  1404. /**
  1405. * wmi_unified_send_apf_write_work_memory_cmd() - send cmd to write into the APF
  1406. * work memory.
  1407. * @wmi: wmi handle
  1408. * @write_params: parameters and buffer pointer for the write
  1409. *
  1410. * This function passes the write apf work mem command to fw
  1411. *
  1412. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1413. */
  1414. QDF_STATUS wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
  1415. struct wmi_apf_write_memory_params *write_params);
  1416. /**
  1417. * wmi_unified_send_apf_read_work_memory_cmd() - send cmd to read part of APF
  1418. * work memory
  1419. * @wmi: wmi handle
  1420. * @read_params: contains relative address and length to read from
  1421. *
  1422. * This function passes the read apf work mem command to fw
  1423. *
  1424. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1425. */
  1426. QDF_STATUS wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
  1427. struct wmi_apf_read_memory_params *read_params);
  1428. /**
  1429. * wmi_extract_apf_read_memory_resp_event() - exctract read mem resp event
  1430. * @wmi: wmi handle
  1431. * @evt_buf: Pointer to the event buffer
  1432. * @resp: pointer to memory to extract event parameters into
  1433. *
  1434. * This function exctracts read mem response event into the given structure ptr
  1435. *
  1436. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1437. */
  1438. QDF_STATUS
  1439. wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
  1440. struct wmi_apf_read_memory_resp_event_params
  1441. *read_mem_evt);
  1442. #endif /* FEATURE_WLAN_APF */
  1443. /**
  1444. * wmi_send_get_user_position_cmd() - send get user position command to fw
  1445. * @wmi_handle: wmi handle
  1446. * @value: user pos value
  1447. *
  1448. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1449. */
  1450. QDF_STATUS
  1451. wmi_send_get_user_position_cmd(wmi_unified_t wmi_handle, uint32_t value);
  1452. /**
  1453. * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
  1454. * command to fw
  1455. * @wmi_handle: wmi handle
  1456. * @value: user pos value
  1457. *
  1458. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1459. */
  1460. QDF_STATUS
  1461. wmi_send_get_peer_mumimo_tx_count_cmd(wmi_unified_t wmi_handle,
  1462. uint32_t value);
  1463. /**
  1464. * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
  1465. * tx count to fw
  1466. * @wmi_handle: wmi handle
  1467. * @value: reset tx count value
  1468. *
  1469. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1470. */
  1471. QDF_STATUS
  1472. wmi_send_reset_peer_mumimo_tx_count_cmd(wmi_unified_t wmi_handle,
  1473. uint32_t value);
  1474. /*
  1475. * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
  1476. * @wmi_handle: wmi handle
  1477. * @param: wmi btcoex cfg params
  1478. *
  1479. * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
  1480. *
  1481. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  1482. */
  1483. QDF_STATUS
  1484. wmi_unified_send_btcoex_wlan_priority_cmd(wmi_unified_t wmi_handle,
  1485. struct btcoex_cfg_params *param);
  1486. /**
  1487. * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
  1488. * @wmi_handle: wmi handle
  1489. * @param: wmi btcoex cfg params
  1490. *
  1491. * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
  1492. *
  1493. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  1494. */
  1495. QDF_STATUS
  1496. wmi_unified_send_btcoex_duty_cycle_cmd(wmi_unified_t wmi_handle,
  1497. struct btcoex_cfg_params *param);
  1498. /**
  1499. * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
  1500. * @wmi_handle: wmi handle
  1501. * @param: wmi coex ver cfg params
  1502. *
  1503. * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
  1504. *
  1505. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  1506. */
  1507. QDF_STATUS
  1508. wmi_unified_send_coex_ver_cfg_cmd(wmi_unified_t wmi_handle,
  1509. coex_ver_cfg_t *param);
  1510. /**
  1511. * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
  1512. * @wmi_handle: wmi handle
  1513. * @param: wmi coex cfg cmd params
  1514. *
  1515. * Send WMI_COEX_CFG_CMD parameters to fw.
  1516. *
  1517. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  1518. */
  1519. QDF_STATUS
  1520. wmi_unified_send_coex_config_cmd(wmi_unified_t wmi_handle,
  1521. struct coex_config_params *param);
  1522. /**
  1523. * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
  1524. * @wmi_handle: handle to WMI.
  1525. * @param: pointer to hold pdev fips param
  1526. *
  1527. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1528. */
  1529. QDF_STATUS
  1530. wmi_unified_pdev_fips_cmd_send(wmi_unified_t wmi_handle,
  1531. struct fips_params *param);
  1532. #ifdef WLAN_FEATURE_DISA
  1533. /**
  1534. * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
  1535. * @wmi_handle: wmi handle
  1536. * @params: encrypt/decrypt params
  1537. *
  1538. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1539. */
  1540. QDF_STATUS
  1541. wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
  1542. struct disa_encrypt_decrypt_req_params
  1543. *params);
  1544. #endif /* WLAN_FEATURE_DISA */
  1545. /**
  1546. * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable
  1547. * cmd function
  1548. * @wmi_handle: handle to WMI.
  1549. * @param: pointer to hold wlan profile param
  1550. *
  1551. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1552. */
  1553. QDF_STATUS
  1554. wmi_unified_wlan_profile_enable_cmd_send(wmi_unified_t wmi_handle,
  1555. struct wlan_profile_params *param);
  1556. /**
  1557. * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger
  1558. * cmd function
  1559. * @wmi_handle: handle to WMI.
  1560. * @param: pointer to hold wlan profile param
  1561. *
  1562. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1563. */
  1564. QDF_STATUS
  1565. wmi_unified_wlan_profile_trigger_cmd_send(wmi_unified_t wmi_handle,
  1566. struct wlan_profile_params *param);
  1567. /**
  1568. * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
  1569. * @wmi_handle: handle to WMI.
  1570. * @param: pointer to hold channel param
  1571. *
  1572. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1573. */
  1574. QDF_STATUS
  1575. wmi_unified_set_chan_cmd_send(wmi_unified_t wmi_handle,
  1576. struct channel_param *param);
  1577. /**
  1578. * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
  1579. * @wmi_handle: handle to WMI.
  1580. * @param: pointer to hold ratepwr table param
  1581. *
  1582. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1583. */
  1584. QDF_STATUS
  1585. wmi_unified_set_ratepwr_table_cmd_send(wmi_unified_t wmi_handle,
  1586. struct ratepwr_table_params *param);
  1587. /**
  1588. * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
  1589. * @wmi_handle: handle to WMI.
  1590. *
  1591. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1592. */
  1593. QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(wmi_unified_t wmi_handle);
  1594. /**
  1595. * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
  1596. * chainmsk cmd function
  1597. * @wmi_handle: handle to WMI.
  1598. * @param: pointer to hold ratepwr chainmsk param
  1599. *
  1600. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1601. */
  1602. QDF_STATUS
  1603. wmi_unified_set_ratepwr_chainmsk_cmd_send(wmi_unified_t wmi_handle,
  1604. struct ratepwr_chainmsk_params
  1605. *param);
  1606. /**
  1607. * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
  1608. * @wmi_handle: handle to WMI.
  1609. * @param: pointer to hold macaddr param
  1610. *
  1611. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1612. */
  1613. QDF_STATUS wmi_unified_set_macaddr_cmd_send(wmi_unified_t wmi_handle,
  1614. struct macaddr_params *param);
  1615. /**
  1616. * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
  1617. * @wmi_handle: handle to WMI.
  1618. *
  1619. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1620. */
  1621. QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(wmi_unified_t wmi_handle);
  1622. /**
  1623. * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
  1624. * @wmi_handle: handle to WMI.
  1625. *
  1626. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1627. */
  1628. QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(wmi_unified_t wmi_handle);
  1629. /**
  1630. * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
  1631. * @wmi_handle: handle to WMI.
  1632. * @param: pointer to hold acparams param
  1633. *
  1634. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1635. */
  1636. QDF_STATUS
  1637. wmi_unified_set_acparams_cmd_send(wmi_unified_t wmi_handle,
  1638. struct acparams_params *param);
  1639. /**
  1640. * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
  1641. * tid map cmd function
  1642. * @wmi_handle: handle to WMI.
  1643. * @param: pointer to hold dscp param
  1644. *
  1645. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1646. */
  1647. QDF_STATUS
  1648. wmi_unified_set_vap_dscp_tid_map_cmd_send(
  1649. wmi_unified_t wmi_handle,
  1650. struct vap_dscp_tid_map_params *param);
  1651. /**
  1652. * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
  1653. * reserve cmd function
  1654. * @wmi_handle: handle to WMI.
  1655. * @param: pointer to hold ast param
  1656. *
  1657. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1658. */
  1659. QDF_STATUS
  1660. wmi_unified_proxy_ast_reserve_cmd_send(wmi_unified_t wmi_handle,
  1661. struct proxy_ast_reserve_params *param);
  1662. /**
  1663. * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac
  1664. * addr cmd function
  1665. * @wmi_handle: handle to WMI.
  1666. * @param: pointer to hold bridge mac addr param
  1667. *
  1668. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1669. */
  1670. QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(
  1671. wmi_unified_t wmi_handle,
  1672. struct set_bridge_mac_addr_params *param);
  1673. /**
  1674. * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
  1675. * @wmi_handle: handle to WMI.
  1676. * @param: pointer to hold phyerr enable param
  1677. *
  1678. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1679. */
  1680. QDF_STATUS wmi_unified_phyerr_enable_cmd_send(wmi_unified_t wmi_handle);
  1681. /**
  1682. * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
  1683. * @wmi_handle: handle to WMI.
  1684. * @param: pointer to hold phyerr disable param
  1685. *
  1686. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1687. */
  1688. QDF_STATUS wmi_unified_phyerr_disable_cmd_send(wmi_unified_t wmi_handle);
  1689. /**
  1690. * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() -
  1691. * WMI set tx antenna function
  1692. * @wmi_handle: handle to WMI.
  1693. * @param: pointer to hold antenna param
  1694. *
  1695. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1696. */
  1697. QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(
  1698. wmi_unified_t wmi_handle,
  1699. struct smart_ant_enable_tx_feedback_params *param);
  1700. /**
  1701. * wmi_unified_vdev_spectral_configure_cmd_send() -
  1702. * WMI set spectral config function
  1703. * @wmi_handle: handle to WMI.
  1704. * @param: pointer to hold spectral config param
  1705. *
  1706. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1707. */
  1708. QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(
  1709. wmi_unified_t wmi_handle,
  1710. struct vdev_spectral_configure_params *param);
  1711. /**
  1712. * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
  1713. * @wmi_handle: handle to WMI.
  1714. * @param: pointer to hold enable spectral param
  1715. *
  1716. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1717. */
  1718. QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(
  1719. wmi_unified_t wmi_handle,
  1720. struct vdev_spectral_enable_params *param);
  1721. #if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
  1722. /**
  1723. * wmi_unified_vdev_fils_enable_cmd_send() - WMI send fils enable command
  1724. * @param wmi_handle: handle to WMI.
  1725. * @param config_fils_params: fils enable parameters
  1726. *
  1727. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1728. */
  1729. QDF_STATUS
  1730. wmi_unified_vdev_fils_enable_cmd_send(struct wmi_unified *wmi_handle,
  1731. struct config_fils_params *param);
  1732. #endif
  1733. /**
  1734. * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info
  1735. * request function
  1736. * @wmi_handle: handle to WMI.
  1737. * @param: pointer to hold chan info param
  1738. *
  1739. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1740. */
  1741. QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(
  1742. wmi_unified_t wmi_handle,
  1743. struct bss_chan_info_request_params *param);
  1744. /**
  1745. * wmi_unified_thermal_mitigation_param_cmd_send() -
  1746. * WMI thermal mitigation function
  1747. * @wmi_handle: handle to WMI.
  1748. * @param: pointer to hold thermal mitigation param
  1749. *
  1750. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1751. */
  1752. QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(
  1753. wmi_unified_t wmi_handle,
  1754. struct thermal_mitigation_params *param);
  1755. /**
  1756. * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
  1757. * @wmi_handle: handle to WMI.
  1758. * @param: pointer to hold fwtest param
  1759. *
  1760. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1761. */
  1762. QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(
  1763. wmi_unified_t wmi_handle,
  1764. struct set_fwtest_params *param);
  1765. /**
  1766. * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
  1767. * size command
  1768. * @wmi_handle: handle to WMI.
  1769. * @param: pointer to hold custom aggr size param
  1770. *
  1771. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1772. */
  1773. QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(
  1774. wmi_unified_t wmi_handle,
  1775. struct set_custom_aggr_size_params *param);
  1776. /**
  1777. * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
  1778. * @wmi_handle: handle to WMI.
  1779. * @param: pointer to hold set qdepth thresh param
  1780. *
  1781. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1782. */
  1783. QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(
  1784. wmi_unified_t wmi_handle,
  1785. struct set_qdepth_thresh_params *param);
  1786. /**
  1787. * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain
  1788. * function
  1789. * @wmi_handle: handle to WMI.
  1790. * @param: pointer to hold regdomain param
  1791. *
  1792. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1793. */
  1794. QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(
  1795. wmi_unified_t wmi_handle,
  1796. struct pdev_set_regdomain_params *param);
  1797. /**
  1798. * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
  1799. * @wmi_handle: handle to WMI.
  1800. * @param: pointer to hold beacon filter param
  1801. *
  1802. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1803. */
  1804. QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(
  1805. wmi_unified_t wmi_handle,
  1806. struct set_beacon_filter_params *param);
  1807. /**
  1808. * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
  1809. * @wmi_handle: handle to WMI.
  1810. * @param: pointer to hold beacon filter param
  1811. *
  1812. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1813. */
  1814. QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(
  1815. wmi_unified_t wmi_handle,
  1816. struct remove_beacon_filter_params *param);
  1817. /**
  1818. * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
  1819. * @wmi_handle: handle to WMI.
  1820. * @macaddr: MAC address
  1821. * @param: pointer to hold addba resp parameter
  1822. *
  1823. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1824. */
  1825. QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(
  1826. wmi_unified_t wmi_handle,
  1827. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  1828. struct addba_clearresponse_params *param);
  1829. /**
  1830. * wmi_unified_addba_send_cmd_send() - WMI addba send function
  1831. * @wmi_handle: handle to WMI.
  1832. * @macaddr: MAC address
  1833. * @param: pointer to hold addba parameter
  1834. *
  1835. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1836. */
  1837. QDF_STATUS
  1838. wmi_unified_addba_send_cmd_send(wmi_unified_t wmi_handle,
  1839. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  1840. struct addba_send_params *param);
  1841. /**
  1842. * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
  1843. * @wmi_handle: handle to WMI.
  1844. * @macaddr: MAC address
  1845. * @param: pointer to hold delba parameter
  1846. *
  1847. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1848. */
  1849. QDF_STATUS
  1850. wmi_unified_delba_send_cmd_send(wmi_unified_t wmi_handle,
  1851. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  1852. struct delba_send_params *param);
  1853. /**
  1854. * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
  1855. * @wmi_handle: handle to WMI.
  1856. * @macaddr: MAC address
  1857. * @param: pointer to hold addba set resp parameter
  1858. *
  1859. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1860. */
  1861. QDF_STATUS
  1862. wmi_unified_addba_setresponse_cmd_send(wmi_unified_t wmi_handle,
  1863. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  1864. struct addba_setresponse_params *param);
  1865. /**
  1866. * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
  1867. * @wmi_handle: handle to WMI.
  1868. * @macaddr: MAC address
  1869. * @param: pointer to hold singleamsdu parameter
  1870. *
  1871. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1872. */
  1873. QDF_STATUS
  1874. wmi_unified_singleamsdu_cmd_send(wmi_unified_t wmi_handle,
  1875. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  1876. struct singleamsdu_params *param);
  1877. /**
  1878. * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
  1879. * @wmi_handle: handle to WMI.
  1880. * @param: pointer to hold mu scan param
  1881. *
  1882. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1883. */
  1884. QDF_STATUS
  1885. wmi_unified_mu_scan_cmd_send(wmi_unified_t wmi_handle,
  1886. struct mu_scan_params *param);
  1887. /**
  1888. * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
  1889. * @wmi_handle: handle to WMI.
  1890. * @param: pointer to hold mu scan param
  1891. *
  1892. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1893. */
  1894. QDF_STATUS
  1895. wmi_unified_lteu_config_cmd_send(wmi_unified_t wmi_handle,
  1896. struct lteu_config_params *param);
  1897. /**
  1898. * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
  1899. * @wmi_handle: handle to WMI.
  1900. * @param: pointer to hold mu scan param
  1901. *
  1902. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1903. */
  1904. QDF_STATUS
  1905. wmi_unified_set_psmode_cmd_send(wmi_unified_t wmi_handle,
  1906. struct set_ps_mode_params *param);
  1907. /**
  1908. * wmi_unified_init_cmd_send() - send initialization cmd to fw
  1909. * @wmi_handle: wmi handle
  1910. * @param: pointer to wmi init param
  1911. *
  1912. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1913. */
  1914. QDF_STATUS
  1915. wmi_unified_init_cmd_send(wmi_unified_t wmi_handle,
  1916. struct wmi_init_cmd_param *param);
  1917. /**
  1918. * wmi_service_enabled() - Check if service enabled
  1919. * @wmi_handle: wmi handle
  1920. * @service_id: service identifier
  1921. *
  1922. * Return: 1 enabled, 0 disabled
  1923. */
  1924. bool wmi_service_enabled(wmi_unified_t wmi_handle, uint32_t service_id);
  1925. /**
  1926. * wmi_save_service_bitmap() - save service bitmap
  1927. * @wmi_handle: wmi handle
  1928. * @evt_buf: pointer to event buffer
  1929. * @bitmap_buf: bitmap buffer
  1930. *
  1931. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
  1932. */
  1933. QDF_STATUS wmi_save_service_bitmap(wmi_unified_t wmi_handle, void *evt_buf,
  1934. void *bitmap_buf);
  1935. /**
  1936. * wmi_save_ext_service_bitmap() - save extended service bitmap
  1937. * @wmi_handle: wmi handle
  1938. * @evt_buf: pointer to event buffer
  1939. *
  1940. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
  1941. */
  1942. QDF_STATUS wmi_save_ext_service_bitmap(wmi_unified_t wmi_handle, void *evt_buf,
  1943. void *bitmap_buf);
  1944. /**
  1945. * wmi_save_fw_version() - Save fw version
  1946. * @wmi_handle: wmi handle
  1947. * @evt_buf: pointer to event buffer
  1948. *
  1949. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1950. */
  1951. QDF_STATUS wmi_save_fw_version(wmi_unified_t wmi_handle, void *evt_buf);
  1952. /**
  1953. * wmi_get_target_cap_from_service_ready() - extract service ready event
  1954. * @wmi_handle: wmi handle
  1955. * @evt_buf: pointer to received event buffer
  1956. * @ev: pointer to hold target capability information extracted from even
  1957. *
  1958. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1959. */
  1960. QDF_STATUS wmi_get_target_cap_from_service_ready(
  1961. wmi_unified_t wmi_handle, void *evt_buf,
  1962. struct wlan_psoc_target_capability_info *ev);
  1963. /**
  1964. * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
  1965. * @wmi_handle: wmi handle
  1966. * @evt_buf: Pointer to event buffer
  1967. * @hal_reg_cap: pointer to hold HAL reg capabilities
  1968. *
  1969. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1970. */
  1971. QDF_STATUS
  1972. wmi_extract_hal_reg_cap(wmi_unified_t wmi_handle, void *evt_buf,
  1973. struct wlan_psoc_hal_reg_capability *hal_reg_cap);
  1974. /**
  1975. * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
  1976. * request event
  1977. * @wmi_handle: wmi handle
  1978. * @evt_buf: pointer to event buffer
  1979. * @num_entries: pointer to hold number of entries requested
  1980. *
  1981. * Return: Number of entries requested
  1982. */
  1983. host_mem_req *wmi_extract_host_mem_req_from_service_ready(
  1984. wmi_unified_t wmi_handle,
  1985. void *evt_buf, uint8_t *num_entries);
  1986. /**
  1987. * wmi_ready_extract_init_status() - Extract init status from ready event
  1988. * @wmi_handle: wmi handle
  1989. * @ev: Pointer to event buffer
  1990. *
  1991. * Return: ready status
  1992. */
  1993. uint32_t wmi_ready_extract_init_status(wmi_unified_t wmi_handle, void *ev);
  1994. /**
  1995. * wmi_ready_extract_mac_addr() - extract mac address from ready event
  1996. * @wmi_handle: wmi handle
  1997. * @ev: pointer to event buffer
  1998. * @macaddr: Pointer to hold MAC address
  1999. *
  2000. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2001. */
  2002. QDF_STATUS wmi_ready_extract_mac_addr(wmi_unified_t wmi_handle,
  2003. void *ev, uint8_t *macaddr);
  2004. /**
  2005. * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
  2006. * @wmi_handle: wmi handle
  2007. * @ev: pointer to event buffer
  2008. * @num_mac_addr: Pointer to number of entries
  2009. *
  2010. * Return: address to start of mac addr list
  2011. */
  2012. wmi_host_mac_addr
  2013. *wmi_ready_extract_mac_addr_list(wmi_unified_t wmi_handle, void *ev,
  2014. uint8_t *num_mac_addr);
  2015. /**
  2016. * wmi_extract_ready_params() - Extract data from ready event apart from
  2017. * status, macaddr and version.
  2018. * @wmi_handle: Pointer to WMI handle.
  2019. * @evt_buf: Pointer to Ready event buffer.
  2020. * @ev_param: Pointer to host defined struct to copy the data from event.
  2021. *
  2022. * Return: QDF_STATUS_SUCCESS on success.
  2023. */
  2024. QDF_STATUS wmi_extract_ready_event_params(
  2025. wmi_unified_t wmi_handle, void *evt_buf,
  2026. struct wmi_host_ready_ev_param *ev_param);
  2027. /**
  2028. * wmi_extract_fw_version() - extract fw version
  2029. * @wmi_handle: wmi handle
  2030. * @ev: pointer to event buffer
  2031. * @fw_ver: Pointer to hold fw version
  2032. *
  2033. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2034. */
  2035. QDF_STATUS wmi_extract_fw_version(wmi_unified_t wmi_handle, void *ev,
  2036. struct wmi_host_fw_ver *fw_ver);
  2037. /**
  2038. * wmi_extract_fw_abi_version() - extract fw abi version
  2039. * @wmi_handle: wmi handle
  2040. * @ev: Pointer to event buffer
  2041. * @fw_ver: Pointer to hold fw abi version
  2042. *
  2043. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2044. */
  2045. QDF_STATUS wmi_extract_fw_abi_version(wmi_unified_t wmi_handle, void *ev,
  2046. struct wmi_host_fw_abi_ver *fw_ver);
  2047. /**
  2048. * wmi_check_and_update_fw_version() - Ready and fw version check
  2049. * @wmi_handle: wmi handle
  2050. * @ev: pointer to event buffer
  2051. *
  2052. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2053. */
  2054. QDF_STATUS wmi_check_and_update_fw_version(wmi_unified_t wmi_handle, void *ev);
  2055. /**
  2056. * wmi_extract_dbglog_data_len() - extract debuglog data length
  2057. * @wmi_handle: wmi handle
  2058. * @evt_b: pointer to event buffer
  2059. * @len: length of buffer
  2060. *
  2061. * Return: length
  2062. */
  2063. uint8_t *wmi_extract_dbglog_data_len(wmi_unified_t wmi_handle,
  2064. void *evt_b, uint32_t *len);
  2065. /**
  2066. * wmi_send_ext_resource_config() - send extended resource configuration
  2067. * @wmi_handle: wmi handle
  2068. * @ext_cfg: pointer to extended resource configuration
  2069. *
  2070. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2071. */
  2072. QDF_STATUS wmi_send_ext_resource_config(wmi_unified_t wmi_handle,
  2073. wmi_host_ext_resource_config *ext_cfg);
  2074. /**
  2075. * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
  2076. * @wmi_handle: handle to WMI.
  2077. * @param: pointer to hold rtt meas req test param
  2078. *
  2079. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2080. */
  2081. QDF_STATUS
  2082. wmi_unified_rtt_meas_req_test_cmd_send(wmi_unified_t wmi_handle,
  2083. struct rtt_meas_req_test_params *param);
  2084. /**
  2085. * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
  2086. * @wmi_handle: handle to WMI.
  2087. * @param: pointer to hold rtt meas req param
  2088. *
  2089. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2090. */
  2091. QDF_STATUS
  2092. wmi_unified_rtt_meas_req_cmd_send(wmi_unified_t wmi_handle,
  2093. struct rtt_meas_req_params *param);
  2094. /**
  2095. * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
  2096. * @wmi_handle: handle to WMI.
  2097. * @param: pointer to hold rtt meas req test param
  2098. *
  2099. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2100. */
  2101. QDF_STATUS
  2102. wmi_unified_rtt_keepalive_req_cmd_send(wmi_unified_t wmi_handle,
  2103. struct rtt_keepalive_req_params *param);
  2104. /**
  2105. * wmi_unified_lci_set_cmd_send() - WMI lci set function
  2106. * @wmi_handle: handle to WMI.
  2107. * @param: pointer to hold lci param
  2108. *
  2109. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2110. */
  2111. QDF_STATUS wmi_unified_lci_set_cmd_send(wmi_unified_t wmi_handle,
  2112. struct lci_set_params *param);
  2113. /**
  2114. * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
  2115. * @wmi_handle: handle to WMI.
  2116. * @param: pointer to hold lcr param
  2117. *
  2118. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2119. */
  2120. QDF_STATUS wmi_unified_lcr_set_cmd_send(wmi_unified_t wmi_handle,
  2121. struct lcr_set_params *param);
  2122. /**
  2123. * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan
  2124. * stats cmd to fw
  2125. * @wmi_handle: wmi handle
  2126. * @param: pointer to hold periodic chan stats param
  2127. *
  2128. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2129. */
  2130. QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(
  2131. wmi_unified_t wmi_handle,
  2132. struct periodic_chan_stats_params *param);
  2133. /* Extract APIs */
  2134. /**
  2135. * wmi_extract_fips_event_data() - extract fips event data
  2136. * @wmi_handle: wmi handle
  2137. * @evt_buf: pointer to event buffer
  2138. * @param: pointer to FIPS event param
  2139. *
  2140. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2141. */
  2142. QDF_STATUS
  2143. wmi_extract_fips_event_data(wmi_unified_t wmi_handle, void *evt_buf,
  2144. struct wmi_host_fips_event_param *param);
  2145. #ifdef WLAN_FEATURE_DISA
  2146. /**
  2147. * wmi_extract_encrypt_decrypt_resp_params() -
  2148. * extract encrypt decrypt resp params from event buffer
  2149. * @wmi_handle: wmi handle
  2150. * @evt_buf: pointer to event buffer
  2151. * @resp: encrypt decrypt resp params
  2152. *
  2153. * Return: QDF_STATUS_SUCCESS for success or error code
  2154. */
  2155. QDF_STATUS
  2156. wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, void *evt_buf,
  2157. struct disa_encrypt_decrypt_resp_params
  2158. *param);
  2159. #endif /* WLAN_FEATURE_DISA */
  2160. /**
  2161. * wmi_extract_mgmt_rx_params() - extract management rx params from event
  2162. * @wmi_handle: wmi handle
  2163. * @evt_buf: pointer to event buffer
  2164. * @hdr: Pointer to hold header
  2165. * @bufp: Pointer to hold pointer to rx param buffer
  2166. *
  2167. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2168. */
  2169. QDF_STATUS
  2170. wmi_extract_mgmt_rx_params(wmi_unified_t wmi_handle, void *evt_buf,
  2171. struct mgmt_rx_event_params *hdr, uint8_t **bufp);
  2172. /**
  2173. * wmi_extract_vdev_roam_param() - extract vdev roam param from event
  2174. * @wmi_handle: wmi handle
  2175. * @evt_buf: pointer to event buffer
  2176. * @ev: Pointer to hold roam param
  2177. *
  2178. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2179. */
  2180. QDF_STATUS
  2181. wmi_extract_vdev_roam_param(wmi_unified_t wmi_handle, void *evt_buf,
  2182. wmi_host_roam_event *ev);
  2183. /**
  2184. * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
  2185. * @wmi_handle: wmi handle
  2186. * @evt_buf: pointer to event buffer
  2187. * @param: Pointer to hold vdev scan param
  2188. *
  2189. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2190. */
  2191. QDF_STATUS
  2192. wmi_extract_vdev_scan_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
  2193. struct scan_event *param);
  2194. /**
  2195. * wmi_extract_mu_ev_param() - extract mu param from event
  2196. * @wmi_handle: wmi handle
  2197. * @evt_buf: pointer to event buffer
  2198. * @param: Pointer to hold mu report
  2199. *
  2200. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2201. */
  2202. QDF_STATUS
  2203. wmi_extract_mu_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
  2204. wmi_host_mu_report_event *param);
  2205. /**
  2206. * wmi_extract_mu_db_entry() - extract mu db entry from event
  2207. * @wmi_handle: wmi handle
  2208. * @evt_buf: pointer to event buffer
  2209. * @idx: index
  2210. * @param: Pointer to hold mu db entry
  2211. *
  2212. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2213. */
  2214. QDF_STATUS
  2215. wmi_extract_mu_db_entry(wmi_unified_t wmi_handle, void *evt_buf,
  2216. uint8_t idx, wmi_host_mu_db_entry *param);
  2217. /**
  2218. * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
  2219. * @wmi_handle: wmi handle
  2220. * @evt_buf: pointer to event buffer
  2221. * @param: Pointer to hold mumimo tx count
  2222. *
  2223. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2224. */
  2225. QDF_STATUS
  2226. wmi_extract_mumimo_tx_count_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
  2227. wmi_host_peer_txmu_cnt_event *param);
  2228. /**
  2229. * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
  2230. * from event
  2231. * @wmi_handle: wmi handle
  2232. * @evt_buf: pointer to event buffer
  2233. * @param: Pointer to hold peer gid userposition list
  2234. *
  2235. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2236. */
  2237. QDF_STATUS
  2238. wmi_extract_peer_gid_userpos_list_ev_param(
  2239. wmi_unified_t wmi_handle,
  2240. void *evt_buf,
  2241. wmi_host_peer_gid_userpos_list_event *param);
  2242. /**
  2243. * wmi_extract_esp_estimate_ev_param() - extract air time from event
  2244. * @wmi_handle: wmi handle
  2245. * @evt_buf: pointer to event buffer
  2246. * @param: Pointer to hold esp event
  2247. *
  2248. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2249. */
  2250. QDF_STATUS
  2251. wmi_extract_esp_estimate_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
  2252. struct esp_estimation_event *param);
  2253. /**
  2254. * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
  2255. * @wmi_handle: wmi handle
  2256. * @evt_buf: pointer to event buffer
  2257. * @gpio_num: Pointer to hold gpio number
  2258. *
  2259. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2260. */
  2261. QDF_STATUS wmi_extract_gpio_input_ev_param(wmi_unified_t wmi_handle,
  2262. void *evt_buf, uint32_t *gpio_num);
  2263. /**
  2264. * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
  2265. * param from event
  2266. * @wmi_handle: wmi handle
  2267. * @evt_buf: pointer to event buffer
  2268. * @param: Pointer to hold reserve ast entry param
  2269. *
  2270. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2271. */
  2272. QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(
  2273. wmi_unified_t wmi_handle, void *evt_buf,
  2274. struct wmi_host_proxy_ast_reserve_param *param);
  2275. /**
  2276. * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
  2277. * from event
  2278. * @wmi_handle: wmi handle
  2279. * @evt_buf: pointer to event buffer
  2280. * @param: Pointer to generic buffer param
  2281. *
  2282. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2283. */
  2284. QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(
  2285. wmi_unified_t wmi_handle, void *evt_buf,
  2286. wmi_host_pdev_generic_buffer_event *param);
  2287. /**
  2288. * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
  2289. * @wmi_handle: wmi handle
  2290. * @evt_buf: pointer to event buffer
  2291. * @peer_mac: Pointer to hold peer mac address
  2292. * @pdev_id: Pointer to hold pdev_id
  2293. * @rate_cap: Pointer to hold ratecode
  2294. *
  2295. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2296. */
  2297. QDF_STATUS wmi_extract_peer_ratecode_list_ev(
  2298. wmi_unified_t wmi_handle, void *evt_buf,
  2299. uint8_t *peer_mac, uint32_t *pdev_id,
  2300. wmi_sa_rate_cap *rate_cap);
  2301. /**
  2302. * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
  2303. * @wmi_handle: wmi handle
  2304. * @evt_buf: pointer to event buffer
  2305. * @index: Index into bcn fault stats
  2306. * @bcnflt_stats: Pointer to hold bcn fault stats
  2307. *
  2308. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2309. */
  2310. QDF_STATUS wmi_extract_bcnflt_stats(
  2311. wmi_unified_t wmi_handle, void *evt_buf,
  2312. uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
  2313. /**
  2314. * wmi_extract_rtt_hdr() - extract rtt header from event
  2315. * @wmi_handle: wmi handle
  2316. * @evt_buf: pointer to event buffer
  2317. * @ev: Pointer to hold rtt header
  2318. *
  2319. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2320. */
  2321. QDF_STATUS wmi_extract_rtt_hdr(wmi_unified_t wmi_handle, void *evt_buf,
  2322. wmi_host_rtt_event_hdr *ev);
  2323. /**
  2324. * wmi_extract_rtt_ev() - extract rtt event
  2325. * @wmi_handle: wmi handle
  2326. * @evt_buf: Pointer to event buffer
  2327. * @ev: Pointer to hold rtt event
  2328. * @hdump: Pointer to hold hex dump
  2329. * @hdump_len: hex dump length
  2330. *
  2331. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2332. */
  2333. QDF_STATUS wmi_extract_rtt_ev(wmi_unified_t wmi_handle, void *evt_buf,
  2334. wmi_host_rtt_meas_event *ev,
  2335. uint8_t *hdump, uint16_t hdump_len);
  2336. /**
  2337. * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
  2338. * @wmi_handle: wmi handle
  2339. * @evt_buf: pointer to event buffer
  2340. * @ev: Pointer to hold rtt error report
  2341. *
  2342. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2343. */
  2344. QDF_STATUS
  2345. wmi_extract_rtt_error_report_ev(wmi_unified_t wmi_handle, void *evt_buf,
  2346. wmi_host_rtt_error_report_event *ev);
  2347. /**
  2348. * wmi_extract_chan_stats() - extract chan stats from event
  2349. * @wmi_handle: wmi handle
  2350. * @evt_buf: pointer to event buffer
  2351. * @index: Index into chan stats
  2352. * @chan_stats: Pointer to hold chan stats
  2353. *
  2354. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2355. */
  2356. QDF_STATUS
  2357. wmi_extract_chan_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2358. uint32_t index, wmi_host_chan_stats *chan_stats);
  2359. /**
  2360. * wmi_extract_thermal_stats() - extract thermal stats from event
  2361. * @wmi_handle: wmi handle
  2362. * @evt_buf: Pointer to event buffer
  2363. * @temp: Pointer to hold extracted temperature
  2364. * @level: Pointer to hold extracted level
  2365. * @pdev_id: Pointer to hold extracted pdev_id
  2366. *
  2367. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2368. */
  2369. QDF_STATUS wmi_extract_thermal_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2370. uint32_t *temp, uint32_t *level,
  2371. uint32_t *pdev_id);
  2372. /**
  2373. * wmi_extract_thermal_level_stats() - extract thermal level stats from
  2374. * event
  2375. * @wmi_handle: wmi handle
  2376. * @evt_buf: pointer to event buffer
  2377. * @idx: Index to level stats
  2378. * @levelcount: Pointer to hold levelcount
  2379. * @dccount: Pointer to hold dccount
  2380. *
  2381. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2382. */
  2383. QDF_STATUS
  2384. wmi_extract_thermal_level_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2385. uint8_t idx, uint32_t *levelcount,
  2386. uint32_t *dccount);
  2387. /**
  2388. * wmi_extract_comb_phyerr() - extract comb phy error from event
  2389. * @wmi_handle: wmi handle
  2390. * @evt_buf: pointer to event buffer
  2391. * @datalen: data length of event buffer
  2392. * @buf_offset: Pointer to hold value of current event buffer offset
  2393. * post extraction
  2394. * @phyerr: Pointer to hold phyerr
  2395. *
  2396. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2397. */
  2398. QDF_STATUS
  2399. wmi_extract_comb_phyerr(wmi_unified_t wmi_handle, void *evt_buf,
  2400. uint16_t datalen, uint16_t *buf_offset,
  2401. wmi_host_phyerr_t *phyerr);
  2402. /**
  2403. * wmi_extract_single_phyerr() - extract single phy error from event
  2404. * @wmi_handle: wmi handle
  2405. * @evt_buf: pointer to event buffer
  2406. * @datalen: data length of event buffer
  2407. * @buf_offset: Pointer to hold value of current event buffer offset
  2408. * post extraction
  2409. * @phyerr: Pointer to hold phyerr
  2410. *
  2411. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2412. */
  2413. QDF_STATUS
  2414. wmi_extract_single_phyerr(wmi_unified_t wmi_handle, void *evt_buf,
  2415. uint16_t datalen, uint16_t *buf_offset,
  2416. wmi_host_phyerr_t *phyerr);
  2417. /**
  2418. * wmi_extract_composite_phyerr() - extract composite phy error from event
  2419. * @wmi_handle: wmi handle
  2420. * @evt_buf: pointer to event buffer
  2421. * @datalen: Length of event buffer
  2422. * @phyerr: Pointer to hold phy error
  2423. *
  2424. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2425. */
  2426. QDF_STATUS
  2427. wmi_extract_composite_phyerr(wmi_unified_t wmi_handle, void *evt_buf,
  2428. uint16_t datalen, wmi_host_phyerr_t *phyerr);
  2429. /**
  2430. * wmi_extract_profile_ctx() - extract profile context from event
  2431. * @wmi_handle: wmi handle
  2432. * @evt_buf: pointer to event buffer
  2433. * @profile_ctx: Pointer to hold profile context
  2434. *
  2435. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2436. */
  2437. QDF_STATUS
  2438. wmi_extract_profile_ctx(wmi_unified_t wmi_handle, void *evt_buf,
  2439. wmi_host_wlan_profile_ctx_t *profile_ctx);
  2440. /**
  2441. * wmi_extract_profile_data() - extract profile data from event
  2442. * @wmi_handle: wmi handle
  2443. * @evt_buf: pointer to event buffer
  2444. * @idx: index of profile data
  2445. * @profile_data: Pointer to hold profile data
  2446. *
  2447. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2448. */
  2449. QDF_STATUS
  2450. wmi_extract_profile_data(wmi_unified_t wmi_handle, void *evt_buf, uint8_t idx,
  2451. wmi_host_wlan_profile_t *profile_data);
  2452. /**
  2453. * wmi_extract_stats_param() - extract all stats count from event
  2454. * @wmi_handle: wmi handle
  2455. * @evt_buf: pointer to event buffer
  2456. * @stats_param: Pointer to hold stats count
  2457. *
  2458. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2459. */
  2460. QDF_STATUS
  2461. wmi_extract_stats_param(wmi_unified_t wmi_handle, void *evt_buf,
  2462. wmi_host_stats_event *stats_param);
  2463. /**
  2464. * wmi_extract_pdev_stats() - extract pdev stats from event
  2465. * @wmi_handle: wmi handle
  2466. * @evt_buf: pointer to event buffer
  2467. * @index: Index into pdev stats
  2468. * @pdev_stats: Pointer to hold pdev stats
  2469. *
  2470. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2471. */
  2472. QDF_STATUS
  2473. wmi_extract_pdev_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2474. uint32_t index, wmi_host_pdev_stats *pdev_stats);
  2475. /**
  2476. * extract_unit_test() - extract unit test from event
  2477. * @wmi_handle: wmi handle
  2478. * @evt_buf: pointer to event buffer
  2479. * @unit_test: Pointer to hold unit-test header
  2480. * @maxspace: The amount of space in evt_buf
  2481. *
  2482. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2483. */
  2484. QDF_STATUS
  2485. wmi_extract_unit_test(wmi_unified_t wmi_handle, void *evt_buf,
  2486. wmi_unit_test_event *unit_test, uint32_t maxspace);
  2487. /**
  2488. * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
  2489. * @wmi_handle: wmi handle
  2490. * @evt_buf: pointer to event buffer
  2491. * @index: Index into extended pdev stats
  2492. * @pdev_ext_stats: Pointer to hold extended pdev stats
  2493. *
  2494. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2495. */
  2496. QDF_STATUS
  2497. wmi_extract_pdev_ext_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2498. uint32_t index,
  2499. wmi_host_pdev_ext_stats *pdev_ext_stats);
  2500. /**
  2501. * wmi_extract_peer_extd_stats() - extract extended peer stats from event
  2502. * @wmi_handle: wmi handle
  2503. * @evt_buf: pointer to event buffer
  2504. * @index: Index into extended peer stats
  2505. * @peer_extd_stats: Pointer to hold extended peer stats
  2506. *
  2507. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2508. */
  2509. QDF_STATUS
  2510. wmi_extract_peer_extd_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2511. uint32_t index,
  2512. wmi_host_peer_extd_stats *peer_extd_stats);
  2513. /**
  2514. * wmi_extract_peer_adv_stats() - extract advance (extd2) peer stats from event
  2515. * @wmi_handle: wmi handle
  2516. * @evt_buf: pointer to event buffer
  2517. * @peer_adv_stats: Pointer to hold extended peer stats
  2518. *
  2519. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2520. */
  2521. QDF_STATUS wmi_extract_peer_adv_stats(
  2522. wmi_unified_t wmi_handle, void *evt_buf,
  2523. struct wmi_host_peer_adv_stats *peer_adv_stats);
  2524. /**
  2525. * wmi_extract_bss_chan_info_event() - extract bss channel information
  2526. * from event
  2527. * @wmi_handle: wmi handle
  2528. * @evt_buf: pointer to event buffer
  2529. * @bss_chan_info: Pointer to hold bss channel information
  2530. *
  2531. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2532. */
  2533. QDF_STATUS wmi_extract_bss_chan_info_event(
  2534. wmi_unified_t wmi_handle, void *evt_buf,
  2535. wmi_host_pdev_bss_chan_info_event *bss_chan_info);
  2536. /**
  2537. * wmi_extract_peer_stats() - extract peer stats from event
  2538. * @wmi_handle: wmi handle
  2539. * @evt_buf: pointer to event buffer
  2540. * @index: Index into peer stats
  2541. * @peer_stats: Pointer to hold peer stats
  2542. *
  2543. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2544. */
  2545. QDF_STATUS
  2546. wmi_extract_peer_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2547. uint32_t index, wmi_host_peer_stats *peer_stats);
  2548. /**
  2549. * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
  2550. * from event
  2551. * @wmi_handle: wmi handle
  2552. * @evt_buf: pointer to event buffer
  2553. * @ev: Pointer to hold data traffic control
  2554. *
  2555. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2556. */
  2557. QDF_STATUS
  2558. wmi_extract_tx_data_traffic_ctrl_ev(wmi_unified_t wmi_handle, void *evt_buf,
  2559. wmi_host_tx_data_traffic_ctrl_event *ev);
  2560. /**
  2561. * wmi_extract_vdev_stats() - extract vdev stats from event
  2562. * @wmi_handle: wmi handle
  2563. * @evt_buf: pointer to event buffer
  2564. * @index: Index into vdev stats
  2565. * @vdev_stats: Pointer to hold vdev stats
  2566. *
  2567. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2568. */
  2569. QDF_STATUS
  2570. wmi_extract_vdev_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2571. uint32_t index, wmi_host_vdev_stats *vdev_stats);
  2572. /**
  2573. * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event
  2574. * @wmi_handle: wmi handle
  2575. * @evt_buf: pointer to event buffer
  2576. * @index: Index into rssi stats
  2577. * @rssi_stats: Pointer to hold rssi stats
  2578. *
  2579. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2580. */
  2581. QDF_STATUS wmi_extract_per_chain_rssi_stats(
  2582. wmi_unified_t wmi_handle, void *evt_buf,
  2583. uint32_t index,
  2584. struct wmi_host_per_chain_rssi_stats *rssi_stats);
  2585. #ifdef WLAN_FEATURE_MIB_STATS
  2586. /**
  2587. * wmi_extract_mib_stats() - extract mib stats from event
  2588. * @wmi_handle: wmi handle
  2589. * @evt_buf: pointer to event buffer
  2590. * @mib_stats: pointer to hold mib stats
  2591. *
  2592. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2593. */
  2594. QDF_STATUS wmi_extract_mib_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2595. struct mib_stats_metrics *mib_stats);
  2596. #endif
  2597. /**
  2598. * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
  2599. * @wmi_handle: wmi handle
  2600. * @evt_buf: pointer to event buffer
  2601. * @index: Index into extended vdev stats
  2602. * @vdev_extd_stats: Pointer to hold extended vdev stats
  2603. *
  2604. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2605. */
  2606. QDF_STATUS
  2607. wmi_extract_vdev_extd_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2608. uint32_t index,
  2609. wmi_host_vdev_extd_stats *vdev_extd_stats);
  2610. /**
  2611. * wmi_extract_bcn_stats() - extract beacon stats from event
  2612. * @wmi_handle: wmi handle
  2613. * @evt_buf: pointer to event buffer
  2614. * @index: Index into beacon stats
  2615. * @vdev_bcn_stats: Pointer to hold beacon stats
  2616. *
  2617. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2618. */
  2619. QDF_STATUS
  2620. wmi_extract_bcn_stats(wmi_unified_t wmi_handle, void *evt_buf,
  2621. uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
  2622. /**
  2623. * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
  2624. * @wmi_handle: wmi handle
  2625. * @evt_buf: pointer to event buffer
  2626. * @vdev_extd_stats: Pointer to hold nac rssi stats
  2627. *
  2628. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2629. */
  2630. QDF_STATUS wmi_extract_vdev_nac_rssi_stats(
  2631. wmi_unified_t wmi_handle, void *evt_buf,
  2632. struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats);
  2633. /**
  2634. * wmi_extract_peer_retry_stats() - extract peer retry stats from event
  2635. * @wmi_handle: wmi handle
  2636. * @evt_buf: pointer to event buffer
  2637. * @index: Index into peer retry stats
  2638. * @peer_retry_stats: Pointer to hold peer retry stats
  2639. *
  2640. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2641. */
  2642. QDF_STATUS wmi_extract_peer_retry_stats(
  2643. wmi_unified_t wmi_handle, void *evt_buf,
  2644. uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats);
  2645. /**
  2646. * wmi_unified_send_power_dbg_cmd() - send power debug commands
  2647. * @wmi_handle: wmi handle
  2648. * @param: wmi power debug parameter
  2649. *
  2650. * Send WMI_POWER_DEBUG_CMDID parameters to fw.
  2651. *
  2652. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  2653. */
  2654. QDF_STATUS wmi_unified_send_power_dbg_cmd(wmi_unified_t wmi_handle,
  2655. struct wmi_power_dbg_params *param);
  2656. /**
  2657. * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from
  2658. * FW service ready event
  2659. * @wmi_handle: wmi handle
  2660. * @evt_buf: event buffer received from firmware
  2661. * @ext_param: extended target info
  2662. *
  2663. * Return: QDF_STATUS_SUCCESS for success or error code
  2664. */
  2665. QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
  2666. wmi_unified_t wmi_handle,
  2667. uint8_t *evt_buf,
  2668. struct wlan_psoc_host_service_ext_param *ext_param);
  2669. /**
  2670. * wmi_unified_fw_test_cmd() - send fw test command to fw.
  2671. * @wmi_handle: wmi handle
  2672. * @wmi_fwtest: fw test command
  2673. *
  2674. * This function sends fw test command to fw.
  2675. *
  2676. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2677. */
  2678. QDF_STATUS wmi_unified_fw_test_cmd(wmi_unified_t wmi_handle,
  2679. struct set_fwtest_params *wmi_fwtest);
  2680. /**
  2681. * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
  2682. * setup command to fw
  2683. * @wmi_handle: wmi handle
  2684. * @param: Rx reorder queue setup parameters
  2685. *
  2686. * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
  2687. */
  2688. QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(
  2689. wmi_unified_t wmi_handle,
  2690. struct rx_reorder_queue_setup_params *param);
  2691. /**
  2692. * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
  2693. * remove command to fw
  2694. * @wmi_handle: wmi handle
  2695. * @param: Rx reorder queue remove parameters
  2696. *
  2697. * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
  2698. */
  2699. QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(
  2700. wmi_unified_t wmi_handle,
  2701. struct rx_reorder_queue_remove_params *param);
  2702. /*
  2703. * wmi_extract_service_ready_ext() - extract extended service ready
  2704. * @wmi_handle: wmi handle
  2705. * @param: wmi power debug parameter
  2706. *
  2707. *
  2708. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  2709. */
  2710. QDF_STATUS wmi_extract_service_ready_ext(
  2711. wmi_unified_t wmi_handle, uint8_t *evt_buf,
  2712. struct wlan_psoc_host_service_ext_param *param);
  2713. /*
  2714. * wmi_extract_service_ready_ext2() - extract extended2 service ready
  2715. * @wmi_handle: wmi handle
  2716. * @evt_buff: pointer to event buffer
  2717. * @param: wmi ext2 base parameters
  2718. *
  2719. *
  2720. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  2721. */
  2722. QDF_STATUS wmi_extract_service_ready_ext2(
  2723. struct wmi_unified *wmi_handle, uint8_t *evt_buf,
  2724. struct wlan_psoc_host_service_ext2_param *param);
  2725. /**
  2726. * wmi_extract_hw_mode_cap_service_ready_ext() -
  2727. * extract HW mode cap from service ready event
  2728. * @wmi_handle: wmi handle
  2729. * @evt_buf: pointer to event buffer
  2730. * @hw_mode_idx: hw mode idx should be less than num_mode
  2731. * @param: Pointer to hold evt buf
  2732. *
  2733. * Return: QDF_STATUS_SUCCESS for success or error code
  2734. */
  2735. QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
  2736. wmi_unified_t wmi_handle,
  2737. uint8_t *evt_buf, uint8_t hw_mode_idx,
  2738. struct wlan_psoc_host_hw_mode_caps *param);
  2739. /**
  2740. * wmi_extract_mac_phy_cap_service_ready_ext() -
  2741. * extract MAC phy cap from service ready event
  2742. * @wmi_handle: wmi handle
  2743. * @evt_buf: pointer to event buffer
  2744. * @hw_mode_id: hw mode id of hw_mode_caps
  2745. * @phy_id: phy_id within hw_mode_cap
  2746. * @param: pointer to mac phy caps structure to hold the values from event
  2747. *
  2748. * Return: QDF_STATUS_SUCCESS for success or error code
  2749. */
  2750. QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
  2751. wmi_unified_t wmi_handle,
  2752. uint8_t *evt_buf,
  2753. uint8_t hw_mode_id,
  2754. uint8_t phy_id,
  2755. struct wlan_psoc_host_mac_phy_caps *param);
  2756. /**
  2757. * wmi_extract_reg_cap_service_ready_ext() -
  2758. * extract REG cap from service ready event
  2759. * @wmi_handle: wmi handle
  2760. * @evt_buf: pointer to event buffer
  2761. * @phy_idx: phy idx should be less than num_mode
  2762. * @param: Pointer to hold evt buf
  2763. *
  2764. * Return: QDF_STATUS_SUCCESS for success or error code
  2765. */
  2766. QDF_STATUS
  2767. wmi_extract_reg_cap_service_ready_ext(
  2768. wmi_unified_t wmi_handle,
  2769. uint8_t *evt_buf, uint8_t phy_idx,
  2770. struct wlan_psoc_host_hal_reg_capabilities_ext *param);
  2771. /**
  2772. * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx
  2773. * capability received through
  2774. * extended service ready event
  2775. * @wmi_handle: WMI handle
  2776. * @evt_buf: Event buffer
  2777. * @idx: Index of the module for which capability is received
  2778. * @param: Pointer to direct buffer rx ring cap struct
  2779. *
  2780. * Return: QDF status of operation
  2781. */
  2782. QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
  2783. wmi_unified_t wmi_handle,
  2784. uint8_t *evt_buf, uint8_t idx,
  2785. struct wlan_psoc_host_dbr_ring_caps *param);
  2786. /**
  2787. * wmi_extract_dbr_ring_cap_service_ready_ext2: Extract direct buffer rx
  2788. * capability received through
  2789. * extended service ready2 event
  2790. * @wmi_handle: WMI handle
  2791. * @evt_buf: Event buffer
  2792. * @idx: Index of the module for which capability is received
  2793. * @param: Pointer to direct buffer rx ring cap struct
  2794. *
  2795. * Return: QDF status of operation
  2796. */
  2797. QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext2(
  2798. wmi_unified_t wmi_handle,
  2799. uint8_t *evt_buf, uint8_t idx,
  2800. struct wlan_psoc_host_dbr_ring_caps *param);
  2801. /**
  2802. * wmi_extract_spectral_scaling_params_service_ready_ext: Extract Spectral
  2803. * scaling params received through
  2804. * extended service ready event
  2805. * @wmi_handle: WMI handle
  2806. * @evt_buf: Event buffer
  2807. * @idx: Index
  2808. * @param: Pointer to Spectral scaling params
  2809. *
  2810. * Return: QDF status of operation
  2811. */
  2812. QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext(
  2813. wmi_unified_t wmi_handle,
  2814. uint8_t *evt_buf, uint8_t idx,
  2815. struct wlan_psoc_host_spectral_scaling_params *param);
  2816. /**
  2817. * wmi_extract_pdev_utf_event() -
  2818. * extract UTF data from pdev utf event
  2819. * @wmi_handle: wmi handle
  2820. * @evt_buf: pointer to event buffer
  2821. * @param: Pointer to hold evt buf
  2822. *
  2823. * Return: QDF_STATUS_SUCCESS for success or error code
  2824. */
  2825. QDF_STATUS wmi_extract_pdev_utf_event(wmi_unified_t wmi_handle,
  2826. uint8_t *evt_buf,
  2827. struct wmi_host_pdev_utf_event *param);
  2828. /**
  2829. * wmi_extract_pdev_qvit_event() -
  2830. * extract UTF data from pdev qvit event
  2831. * @wmi_handle: wmi handle
  2832. * @evt_buf: pointer to event buffer
  2833. * @param: Pointer to hold evt buf
  2834. *
  2835. * Return: QDF_STATUS_SUCCESS for success or error code
  2836. */
  2837. QDF_STATUS wmi_extract_pdev_qvit_event(wmi_unified_t wmi_handle,
  2838. uint8_t *evt_buf,
  2839. struct wmi_host_pdev_qvit_event *param);
  2840. #ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
  2841. /**
  2842. * wmi_extract_num_rf_characterziation_entries - Extract number of RF
  2843. * characterization metrics received from the RF characterization event.
  2844. * @wmi_hdl: WMI handle
  2845. * @evt_buf: Event buffer
  2846. * @num_rf_characterization_entries: Number of RF characterization metrics
  2847. *
  2848. * Return: QDF status of operation
  2849. */
  2850. QDF_STATUS wmi_extract_num_rf_characterization_entries(wmi_unified_t wmi_hdl,
  2851. uint8_t *evt_buf,
  2852. uint32_t *num_rf_characterization_entries);
  2853. /**
  2854. * wmi_extract_rf_characterziation_entries - Extract RF characterization metrics
  2855. * received from the RF characterization event.
  2856. * @wmi_hdl: WMI handle
  2857. * @evt_buf: Event buffer
  2858. * @num_rf_characterization_entries: Number of RF characterization metrics
  2859. * @rf_characterization_entries: Pointer to RF characterization metrics
  2860. *
  2861. * Return: QDF status of operation
  2862. */
  2863. QDF_STATUS wmi_extract_rf_characterization_entries(wmi_unified_t wmi_hdl,
  2864. uint8_t *evt_buf,
  2865. uint32_t num_rf_characterization_entries,
  2866. struct wmi_host_rf_characterization_event_param *rf_characterization_entries);
  2867. #endif
  2868. /*
  2869. * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
  2870. * @wmi_handle: wmi handle
  2871. * @evt_buf: pointer to event buffer.
  2872. * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
  2873. *
  2874. *
  2875. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  2876. */
  2877. QDF_STATUS wmi_extract_chainmask_tables(
  2878. wmi_unified_t wmi_handle, uint8_t *evt_buf,
  2879. struct wlan_psoc_host_chainmask_table *chainmask_table);
  2880. /**
  2881. * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload
  2882. * @wmi_handle: wmi handle
  2883. * @pdev_id: pdev id
  2884. *
  2885. * Return: QDF_STATUS
  2886. */
  2887. QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(wmi_unified_t wmi_handle,
  2888. uint32_t pdev_id);
  2889. /**
  2890. * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload
  2891. * @wmi_handle: wmi handle
  2892. * @pdev_id: pdev id
  2893. *
  2894. * Return: QDF_STATUS
  2895. */
  2896. QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(wmi_unified_t wmi_handle,
  2897. uint32_t pdev_id);
  2898. #ifdef QCA_SUPPORT_AGILE_DFS
  2899. /**
  2900. * wmi_unified_send_vdev_adfs_ch_cfg_cmd() - send adfs channel config command
  2901. * @wmi_handle: wmi handle
  2902. * @param: adfs channel config params
  2903. *
  2904. * Return: QDF_STATUS
  2905. */
  2906. QDF_STATUS
  2907. wmi_unified_send_vdev_adfs_ch_cfg_cmd(wmi_unified_t wmi_handle,
  2908. struct vdev_adfs_ch_cfg_params *param);
  2909. /**
  2910. * wmi_unified_send_vdev_adfs_ocac_abort_cmd() - send adfs o-cac abort command
  2911. * @wmi_handle: wmi handle
  2912. * @param: adfs channel o-cac abort params
  2913. *
  2914. * Return: QDF_STATUS
  2915. */
  2916. QDF_STATUS
  2917. wmi_unified_send_vdev_adfs_ocac_abort_cmd(wmi_unified_t wmi_handle,
  2918. struct vdev_adfs_abort_params *param);
  2919. #endif
  2920. /**
  2921. * wmi_unified_set_country_cmd_send() - WMI set country function
  2922. * @wmi_handle : handle to WMI.
  2923. * @param : pointer to hold set country cmd parameter
  2924. *
  2925. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2926. */
  2927. QDF_STATUS wmi_unified_set_country_cmd_send(wmi_unified_t wmi_handle,
  2928. struct set_country *param);
  2929. #ifdef WLAN_FEATURE_ACTION_OUI
  2930. /**
  2931. * wmi_unified_send_action_oui_cmd() - send action oui cmd to fw
  2932. * @wmi_handle: wma handle
  2933. * @req: wmi action oui message to be send
  2934. *
  2935. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2936. */
  2937. QDF_STATUS
  2938. wmi_unified_send_action_oui_cmd(wmi_unified_t wmi_handle,
  2939. struct action_oui_request *req);
  2940. #endif /* WLAN_FEATURE_ACTION_OUI */
  2941. /**
  2942. * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value
  2943. * @wmi_handle: wma handle
  2944. * @get_rcpi_param: rcpi params
  2945. *
  2946. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  2947. */
  2948. QDF_STATUS
  2949. wmi_unified_send_request_get_rcpi_cmd(wmi_unified_t wmi_handle,
  2950. struct rcpi_req *get_rcpi_param);
  2951. /**
  2952. * wmi_extract_rcpi_response_event - api to extract RCPI event params
  2953. * @wmi_handle: wma handle
  2954. * @evt_buf: pointer to event buffer
  2955. * @res: pointer to hold rcpi response from firmware
  2956. *
  2957. * Return: QDF_STATUS_SUCCESS for successful event parse
  2958. * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
  2959. */
  2960. QDF_STATUS
  2961. wmi_extract_rcpi_response_event(wmi_unified_t wmi_handle, void *evt_buf,
  2962. struct rcpi_res *res);
  2963. #ifdef WMI_INTERFACE_EVENT_LOGGING
  2964. void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
  2965. qdf_abstract_print *print, void *print_priv);
  2966. void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
  2967. qdf_abstract_print *print, void *print_priv);
  2968. void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
  2969. qdf_abstract_print *print, void *print_priv);
  2970. void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
  2971. qdf_abstract_print *print, void *print_priv);
  2972. void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
  2973. qdf_abstract_print *print, void *print_priv);
  2974. void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
  2975. qdf_abstract_print *print, void *print_priv);
  2976. void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
  2977. qdf_abstract_print *print, void *print_priv);
  2978. #endif /* WMI_INTERFACE_EVENT_LOGGING */
  2979. /**
  2980. * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
  2981. * wds entries from FW
  2982. * @wmi_handle: wmi handle
  2983. *
  2984. * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
  2985. *
  2986. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  2987. */
  2988. QDF_STATUS wmi_unified_send_dump_wds_table_cmd(wmi_unified_t wmi_handle);
  2989. /**
  2990. * wmi_extract_wds_entry - api to extract wds entry
  2991. * @wmi_handle: wmi handle
  2992. * @evt_buf: pointer to event buffer
  2993. * @wds_entry: wds entry
  2994. * @idx: index to point wds entry in event buffer
  2995. *
  2996. * Return: QDF_STATUS_SUCCESS for successful event parse
  2997. * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
  2998. */
  2999. QDF_STATUS
  3000. wmi_extract_wds_entry(wmi_unified_t wmi_handle, uint8_t *evt_buf,
  3001. struct wdsentry *wds_entry, u_int32_t idx);
  3002. /**
  3003. * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss
  3004. * detection configuration to FW.
  3005. * @wmi_handle: wmi handle
  3006. * @cfg: obss detection configuration
  3007. *
  3008. * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw.
  3009. *
  3010. * Return: QDF_STATUS
  3011. */
  3012. QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(
  3013. wmi_unified_t wmi_handle,
  3014. struct wmi_obss_detection_cfg_param *cfg);
  3015. /**
  3016. * wmi_unified_extract_obss_detection_info() - WMI function to extract obss
  3017. * detection info from FW.
  3018. * @wmi_handle: wmi handle
  3019. * @data: event data from firmware
  3020. * @info: Pointer to hold obss detection info
  3021. *
  3022. * This function is used to extract obss info from firmware.
  3023. *
  3024. * Return: QDF_STATUS
  3025. */
  3026. QDF_STATUS wmi_unified_extract_obss_detection_info(
  3027. wmi_unified_t wmi_handle,
  3028. uint8_t *data,
  3029. struct wmi_obss_detect_info *info);
  3030. #ifdef WLAN_SUPPORT_GREEN_AP
  3031. QDF_STATUS wmi_extract_green_ap_egap_status_info(
  3032. wmi_unified_t wmi_hdl, uint8_t *evt_buf,
  3033. struct wlan_green_ap_egap_status_info *egap_status_info_params);
  3034. #endif
  3035. /**
  3036. * wmi_unified_send_roam_scan_stats_cmd() - Wrapper to request roam scan stats
  3037. * @wmi_handle: wmi handle
  3038. * @params: request params
  3039. *
  3040. * This function is used to send the roam scan stats request command to
  3041. * firmware.
  3042. *
  3043. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3044. */
  3045. QDF_STATUS
  3046. wmi_unified_send_roam_scan_stats_cmd(wmi_unified_t wmi_handle,
  3047. struct wmi_roam_scan_stats_req *params);
  3048. /**
  3049. * wmi_extract_roam_scan_stats_res_evt() - API to extract roam scan stats res
  3050. * @wmi: wmi handle
  3051. * @evt_buf: pointer to the event buffer
  3052. * @vdev_id: output pointer to hold vdev id
  3053. * @res_param: output pointer to hold extracted memory
  3054. *
  3055. * Return: QDF_STATUS
  3056. */
  3057. QDF_STATUS
  3058. wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
  3059. uint32_t *vdev_id,
  3060. struct wmi_roam_scan_stats_res **res_param);
  3061. /**
  3062. * wmi_extract_offload_bcn_tx_status_evt() - API to extract bcn tx status event
  3063. * @wmi_handle: wmi handle
  3064. * @evt_buf: pointer to the event buffer
  3065. * @vdev_id: output pointer to hold vdev id
  3066. * @tx_status: output pointer to hold bcn tx status
  3067. *
  3068. * Return: QDF_STATUS
  3069. */
  3070. QDF_STATUS
  3071. wmi_extract_offload_bcn_tx_status_evt(wmi_unified_t wmi_handle, void *evt_buf,
  3072. uint32_t *vdev_id, uint32_t *tx_status);
  3073. /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width
  3074. * @wmi_handle: wmi handle
  3075. * @phymode: phy mode
  3076. *
  3077. * Return: wmi channel width
  3078. */
  3079. wmi_host_channel_width wmi_get_ch_width_from_phy_mode(
  3080. wmi_unified_t wmi_handle, WMI_HOST_WLAN_PHY_MODE phymode);
  3081. #ifdef QCA_SUPPORT_CP_STATS
  3082. /**
  3083. * wmi_extract_cca_stats() - api to extract congestion stats from event buffer
  3084. * @wmi_handle: wma handle
  3085. * @evt_buf: event buffer
  3086. * @datalen: length of buffer
  3087. * @stats: buffer to populated after stats extraction
  3088. *
  3089. * Return: status of operation
  3090. */
  3091. QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
  3092. struct wmi_host_congestion_stats *stats);
  3093. #endif /* QCA_SUPPORT_CP_STATS */
  3094. #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
  3095. /**
  3096. * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd.
  3097. * @wmi_handle: wmi handle
  3098. * @params: radar found params
  3099. *
  3100. * This function passes the average radar parameters to fw
  3101. *
  3102. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3103. */
  3104. QDF_STATUS
  3105. wmi_unified_dfs_send_avg_params_cmd(wmi_unified_t wmi_handle,
  3106. struct dfs_radar_found_params *params);
  3107. /**
  3108. * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw.
  3109. * @wmi_handle: wmi handle
  3110. * @evt_buf: pointer to event buffer
  3111. * @dfs_status_check: pointer to the host dfs status
  3112. *
  3113. * This function extracts the result of host dfs from fw
  3114. *
  3115. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3116. */
  3117. QDF_STATUS wmi_extract_dfs_status_from_fw(wmi_unified_t wmi_handle,
  3118. void *evt_buf,
  3119. uint32_t *dfs_status_check);
  3120. #endif
  3121. #ifdef OL_ATH_SMART_LOGGING
  3122. /**
  3123. * wmi_unified_send_smart_logging_enable_cmd() - send smart logging enable cmd
  3124. * @wmi_handle: wmi handle
  3125. * @param: enable/disable
  3126. *
  3127. * This function enables/disable the smart logging feature
  3128. *
  3129. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3130. */
  3131. QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(wmi_unified_t wmi_handle,
  3132. uint32_t param);
  3133. /**
  3134. * wmi_unified_send_smart_logging_fatal_cmd() - send smart logging fatal cmd
  3135. * @wmi_handle: wmi handle
  3136. * @param: Fatal event
  3137. *
  3138. * This function sends the smart log fatal events to the FW
  3139. *
  3140. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3141. */
  3142. QDF_STATUS
  3143. wmi_unified_send_smart_logging_fatal_cmd(wmi_unified_t wmi_handle,
  3144. struct wmi_debug_fatal_events *param);
  3145. /**
  3146. * wmi_extract_smartlog_ev() - extract smartlog event info from event
  3147. * @wmi_handle: wmi handle
  3148. * @evt_buf: pointer to event buffer
  3149. * @ev: Pointer to hold fatal events
  3150. *
  3151. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3152. */
  3153. QDF_STATUS
  3154. wmi_extract_smartlog_ev(wmi_unified_t wmi_handle, void *evt_buf,
  3155. struct wmi_debug_fatal_events *ev);
  3156. #endif /* OL_ATH_SMART_LOGGING */
  3157. /**
  3158. * wmi_process_fw_event_worker_thread_ctx() - process in worker thread context
  3159. * @wmi_handle: handle to wmi
  3160. * @evt_buf: pointer to event buffer
  3161. *
  3162. * Event process by below function will be in worker thread context.
  3163. * Use this method for events which are not critical and not
  3164. * handled in protocol stack.
  3165. *
  3166. * Return: none
  3167. */
  3168. void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle,
  3169. void *evt_buf);
  3170. /**
  3171. * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl failsafe
  3172. * status from event
  3173. * @wmi_handle: wmi handle
  3174. * @evt_buf: pointer to event buffer
  3175. * @ev: Pointer to hold ctl status
  3176. *
  3177. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3178. */
  3179. QDF_STATUS wmi_extract_ctl_failsafe_check_ev_param(
  3180. wmi_unified_t wmi_handle,
  3181. void *evt_buf,
  3182. struct wmi_host_pdev_ctl_failsafe_event *param);
  3183. #ifdef OBSS_PD
  3184. /**
  3185. * wmi_unified_send_obss_spatial_reuse_set_cmd() - send obss pd offset
  3186. * @wmi_handle: wmi handle
  3187. * @oobss_spatial_reuse_param: Pointer to obsspd min max offset
  3188. *
  3189. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3190. */
  3191. QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(
  3192. wmi_unified_t wmi_handle,
  3193. struct wmi_host_obss_spatial_reuse_set_param *obss_spatial_reuse_param);
  3194. /**
  3195. * wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd() - send def thresh
  3196. * @wmi_handle: wmi handle
  3197. * @thresh: Pointer to def thresh
  3198. *
  3199. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  3200. */
  3201. QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(
  3202. wmi_unified_t wmi_handle,
  3203. struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh);
  3204. #endif /* OBSS_PD */
  3205. /**
  3206. * wmi_convert_pdev_id_host_to_target() - Convert pdev_id from host to target
  3207. * defines. For legacy there is not conversion required. Just return pdev_id as
  3208. * it is.
  3209. * @wmi_handle: wmi handle
  3210. * @host_pdev_id: host pdev_id to be converted.
  3211. * @target_pdev_id: Output target pdev id.
  3212. *
  3213. * Return: QDF_STATUS
  3214. */
  3215. QDF_STATUS wmi_convert_pdev_id_host_to_target(wmi_unified_t wmi_handle,
  3216. uint32_t host_pdev_id,
  3217. uint32_t *target_pdev_id);
  3218. /**
  3219. * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss
  3220. * color change enable to FW.
  3221. * @wmi_handle: wmi handle
  3222. * @vdev_id: vdev ID
  3223. * @enable: enable or disable color change handeling within firmware
  3224. *
  3225. * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw,
  3226. * thereby firmware updates bss color when AP announces bss color change.
  3227. *
  3228. * Return: QDF_STATUS
  3229. */
  3230. QDF_STATUS
  3231. wmi_unified_send_bss_color_change_enable_cmd(wmi_unified_t wmi_handle,
  3232. uint32_t vdev_id,
  3233. bool enable);
  3234. /**
  3235. * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss
  3236. * color collision detection configuration to FW.
  3237. * @wmi_handle: wmi handle
  3238. * @cfg: obss color collision detection configuration
  3239. *
  3240. * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw.
  3241. *
  3242. * Return: QDF_STATUS
  3243. */
  3244. QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(
  3245. wmi_unified_t wmi_handle,
  3246. struct wmi_obss_color_collision_cfg_param *cfg);
  3247. /**
  3248. * wmi_unified_extract_obss_color_collision_info() - WMI function to extract
  3249. * obss color collision info from FW.
  3250. * @wmi_handle: wmi handle
  3251. * @data: event data from firmware
  3252. * @info: Pointer to hold bss color collision info
  3253. *
  3254. * This function is used to extract bss collision info from firmware.
  3255. *
  3256. * Return: QDF_STATUS
  3257. */
  3258. QDF_STATUS wmi_unified_extract_obss_color_collision_info(
  3259. wmi_unified_t wmi_handle,
  3260. uint8_t *data, struct wmi_obss_color_collision_info *info);
  3261. #ifdef CRYPTO_SET_KEY_CONVERGED
  3262. /**
  3263. * wlan_crypto_cipher_to_wmi_cipher() - Convert crypto cipher to WMI cipher
  3264. * @crypto_cipher: cipher type in crypto format
  3265. *
  3266. * Return: cipher type in WMI cipher type
  3267. */
  3268. uint8_t wlan_crypto_cipher_to_wmi_cipher(
  3269. enum wlan_crypto_cipher_type crypto_cipher);
  3270. /**
  3271. * wlan_crypto_cipher_to_cdp_sec_type() - Convert crypto cipher to CDP type
  3272. * @crypto_cipher: cipher type in crypto format
  3273. *
  3274. * Return: security type in cdp_sec_type data format type
  3275. */
  3276. enum cdp_sec_type wlan_crypto_cipher_to_cdp_sec_type(
  3277. enum wlan_crypto_cipher_type crypto_cipher);
  3278. #endif
  3279. /**
  3280. * wmi_unified_send_mws_coex_req_cmd() - WMI function to send coex req cmd
  3281. * @wmi_hdl: wmi handle
  3282. * @vdev_id: Vdev Id
  3283. * @cmd_id: Coex cmd for which info is required
  3284. *
  3285. * Send wmi coex command to fw.
  3286. *
  3287. * Return: QDF_STATUS
  3288. */
  3289. QDF_STATUS wmi_unified_send_mws_coex_req_cmd(struct wmi_unified *wmi_handle,
  3290. uint32_t vdev_id, uint32_t cmd_id);
  3291. /**
  3292. * wmi_unified_send_idle_trigger_monitor() - send idle trigger monitor command
  3293. * @wmi_handle: WMI handle
  3294. * @val: idle trigger monitor value - 1 for idle monitor on, 0 for idle monitor
  3295. * off
  3296. *
  3297. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  3298. */
  3299. QDF_STATUS
  3300. wmi_unified_send_idle_trigger_monitor(wmi_unified_t wmi_handle, uint8_t val);
  3301. #ifdef WLAN_CFR_ENABLE
  3302. /**
  3303. * wmi_unified_send_peer_cfr_capture_cmd() - WMI function to start CFR capture
  3304. * for a peer
  3305. * @wmi_handle: WMI handle
  3306. * @param: configuration params for capture
  3307. *
  3308. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  3309. */
  3310. QDF_STATUS
  3311. wmi_unified_send_peer_cfr_capture_cmd(wmi_unified_t wmi_handle,
  3312. struct peer_cfr_params *param);
  3313. /**
  3314. * wmi_extract_cfr_peer_tx_event_param() - WMI function to extract cfr tx event
  3315. * for a peer
  3316. * @wmi_handle: WMI handle
  3317. * @evt_buf: Buffer holding event data
  3318. * @peer_tx_event: pointer to hold tx event data
  3319. *
  3320. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  3321. */
  3322. QDF_STATUS
  3323. wmi_extract_cfr_peer_tx_event_param(wmi_unified_t wmi_handle, void *evt_buf,
  3324. wmi_cfr_peer_tx_event_param *peer_tx_event);
  3325. #endif /* WLAN_CFR_ENABLE */
  3326. #ifdef WIFI_POS_CONVERGED
  3327. /**
  3328. * wmi_extract_oem_response_param() - WMI function to extract OEM response param
  3329. * @wmi_hdl: WMI handle
  3330. * @resp_buf: Buffer holding response data
  3331. * @oem_resp_param: zero-filled structure pointer to hold oem response data
  3332. *
  3333. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  3334. */
  3335. QDF_STATUS
  3336. wmi_extract_oem_response_param(wmi_unified_t wmi_hdl, void *resp_buf,
  3337. struct wmi_oem_response_param *oem_resp_param);
  3338. #endif /* WIFI_POS_CONVERGED */
  3339. /**
  3340. * wmi_critical_events_in_flight() - get the number of critical events in flight
  3341. *
  3342. * @wmi_hdl: WMI handle
  3343. *
  3344. * Return: the number of critical events in flight.
  3345. */
  3346. uint32_t wmi_critical_events_in_flight(struct wmi_unified *wmi);
  3347. #ifdef FEATURE_ANI_LEVEL_REQUEST
  3348. /**
  3349. * wmi_unified_ani_level_cmd_send() - WMI function to send get ani level cmd
  3350. * @wmi_hdl: WMI handle
  3351. * @freqs: pointer to list of freqs for which ANI levels are to be fetched
  3352. * @num_freqs: number of freqs in the above parameter
  3353. *
  3354. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  3355. */
  3356. QDF_STATUS wmi_unified_ani_level_cmd_send(wmi_unified_t wmi_handle,
  3357. uint32_t *freqs,
  3358. uint8_t num_freqs);
  3359. /**
  3360. * wmi_unified_extract_ani_level() - WMI function to receive ani level cmd
  3361. * @wmi_hdl: WMI handle
  3362. * @info: pointer to ANI data received from the FW and stored in HOST
  3363. * @num_freqs: number of freqs in the above parameter
  3364. *
  3365. * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
  3366. */
  3367. QDF_STATUS wmi_unified_extract_ani_level(wmi_unified_t wmi_handle,
  3368. uint8_t *data,
  3369. struct wmi_host_ani_level_event **info,
  3370. uint32_t *num_freqs);
  3371. #endif /* FEATURE_ANI_LEVEL_REQUEST */
  3372. #endif /* _WMI_UNIFIED_API_H_ */