wmi.h 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078
  1. /*
  2. * Copyright (c) 2005-2011 Atheros Communications Inc.
  3. * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. #ifndef _WMI_H_
  18. #define _WMI_H_
  19. #include <linux/types.h>
  20. #include <net/mac80211.h>
  21. /*
  22. * This file specifies the WMI interface for the Unified Software
  23. * Architecture.
  24. *
  25. * It includes definitions of all the commands and events. Commands are
  26. * messages from the host to the target. Events and Replies are messages
  27. * from the target to the host.
  28. *
  29. * Ownership of correctness in regards to WMI commands belongs to the host
  30. * driver and the target is not required to validate parameters for value,
  31. * proper range, or any other checking.
  32. *
  33. * Guidelines for extending this interface are below.
  34. *
  35. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  36. *
  37. * 2. Use ONLY u32 type for defining member variables within WMI
  38. * command/event structures. Do not use u8, u16, bool or
  39. * enum types within these structures.
  40. *
  41. * 3. DO NOT define bit fields within structures. Implement bit fields
  42. * using masks if necessary. Do not use the programming language's bit
  43. * field definition.
  44. *
  45. * 4. Define macros for encode/decode of u8, u16 fields within
  46. * the u32 variables. Use these macros for set/get of these fields.
  47. * Try to use this to optimize the structure without bloating it with
  48. * u32 variables for every lower sized field.
  49. *
  50. * 5. Do not use PACK/UNPACK attributes for the structures as each member
  51. * variable is already 4-byte aligned by virtue of being a u32
  52. * type.
  53. *
  54. * 6. Comment each parameter part of the WMI command/event structure by
  55. * using the 2 stars at the begining of C comment instead of one star to
  56. * enable HTML document generation using Doxygen.
  57. *
  58. */
  59. /* Control Path */
  60. struct wmi_cmd_hdr {
  61. __le32 cmd_id;
  62. } __packed;
  63. #define WMI_CMD_HDR_CMD_ID_MASK 0x00FFFFFF
  64. #define WMI_CMD_HDR_CMD_ID_LSB 0
  65. #define WMI_CMD_HDR_PLT_PRIV_MASK 0xFF000000
  66. #define WMI_CMD_HDR_PLT_PRIV_LSB 24
  67. #define HTC_PROTOCOL_VERSION 0x0002
  68. #define WMI_PROTOCOL_VERSION 0x0002
  69. enum wmi_service_id {
  70. WMI_SERVICE_BEACON_OFFLOAD = 0, /* beacon offload */
  71. WMI_SERVICE_SCAN_OFFLOAD, /* scan offload */
  72. WMI_SERVICE_ROAM_OFFLOAD, /* roam offload */
  73. WMI_SERVICE_BCN_MISS_OFFLOAD, /* beacon miss offload */
  74. WMI_SERVICE_STA_PWRSAVE, /* fake sleep + basic power save */
  75. WMI_SERVICE_STA_ADVANCED_PWRSAVE, /* uapsd, pspoll, force sleep */
  76. WMI_SERVICE_AP_UAPSD, /* uapsd on AP */
  77. WMI_SERVICE_AP_DFS, /* DFS on AP */
  78. WMI_SERVICE_11AC, /* supports 11ac */
  79. WMI_SERVICE_BLOCKACK, /* Supports triggering ADDBA/DELBA from host*/
  80. WMI_SERVICE_PHYERR, /* PHY error */
  81. WMI_SERVICE_BCN_FILTER, /* Beacon filter support */
  82. WMI_SERVICE_RTT, /* RTT (round trip time) support */
  83. WMI_SERVICE_RATECTRL, /* Rate-control */
  84. WMI_SERVICE_WOW, /* WOW Support */
  85. WMI_SERVICE_RATECTRL_CACHE, /* Rate-control caching */
  86. WMI_SERVICE_IRAM_TIDS, /* TIDs in IRAM */
  87. WMI_SERVICE_ARPNS_OFFLOAD, /* ARP NS Offload support */
  88. WMI_SERVICE_NLO, /* Network list offload service */
  89. WMI_SERVICE_GTK_OFFLOAD, /* GTK offload */
  90. WMI_SERVICE_SCAN_SCH, /* Scan Scheduler Service */
  91. WMI_SERVICE_CSA_OFFLOAD, /* CSA offload service */
  92. WMI_SERVICE_CHATTER, /* Chatter service */
  93. WMI_SERVICE_COEX_FREQAVOID, /* FW report freq range to avoid */
  94. WMI_SERVICE_PACKET_POWER_SAVE, /* packet power save service */
  95. WMI_SERVICE_FORCE_FW_HANG, /* To test fw recovery mechanism */
  96. WMI_SERVICE_GPIO, /* GPIO service */
  97. WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */
  98. WMI_STA_UAPSD_BASIC_AUTO_TRIG, /* UAPSD AC Trigger Generation */
  99. WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */
  100. WMI_SERVICE_STA_KEEP_ALIVE, /* STA keep alive mechanism support */
  101. WMI_SERVICE_TX_ENCAP, /* Packet type for TX encapsulation */
  102. WMI_SERVICE_LAST,
  103. WMI_MAX_SERVICE = 64 /* max service */
  104. };
  105. static inline char *wmi_service_name(int service_id)
  106. {
  107. switch (service_id) {
  108. case WMI_SERVICE_BEACON_OFFLOAD:
  109. return "BEACON_OFFLOAD";
  110. case WMI_SERVICE_SCAN_OFFLOAD:
  111. return "SCAN_OFFLOAD";
  112. case WMI_SERVICE_ROAM_OFFLOAD:
  113. return "ROAM_OFFLOAD";
  114. case WMI_SERVICE_BCN_MISS_OFFLOAD:
  115. return "BCN_MISS_OFFLOAD";
  116. case WMI_SERVICE_STA_PWRSAVE:
  117. return "STA_PWRSAVE";
  118. case WMI_SERVICE_STA_ADVANCED_PWRSAVE:
  119. return "STA_ADVANCED_PWRSAVE";
  120. case WMI_SERVICE_AP_UAPSD:
  121. return "AP_UAPSD";
  122. case WMI_SERVICE_AP_DFS:
  123. return "AP_DFS";
  124. case WMI_SERVICE_11AC:
  125. return "11AC";
  126. case WMI_SERVICE_BLOCKACK:
  127. return "BLOCKACK";
  128. case WMI_SERVICE_PHYERR:
  129. return "PHYERR";
  130. case WMI_SERVICE_BCN_FILTER:
  131. return "BCN_FILTER";
  132. case WMI_SERVICE_RTT:
  133. return "RTT";
  134. case WMI_SERVICE_RATECTRL:
  135. return "RATECTRL";
  136. case WMI_SERVICE_WOW:
  137. return "WOW";
  138. case WMI_SERVICE_RATECTRL_CACHE:
  139. return "RATECTRL CACHE";
  140. case WMI_SERVICE_IRAM_TIDS:
  141. return "IRAM TIDS";
  142. case WMI_SERVICE_ARPNS_OFFLOAD:
  143. return "ARPNS_OFFLOAD";
  144. case WMI_SERVICE_NLO:
  145. return "NLO";
  146. case WMI_SERVICE_GTK_OFFLOAD:
  147. return "GTK_OFFLOAD";
  148. case WMI_SERVICE_SCAN_SCH:
  149. return "SCAN_SCH";
  150. case WMI_SERVICE_CSA_OFFLOAD:
  151. return "CSA_OFFLOAD";
  152. case WMI_SERVICE_CHATTER:
  153. return "CHATTER";
  154. case WMI_SERVICE_COEX_FREQAVOID:
  155. return "COEX_FREQAVOID";
  156. case WMI_SERVICE_PACKET_POWER_SAVE:
  157. return "PACKET_POWER_SAVE";
  158. case WMI_SERVICE_FORCE_FW_HANG:
  159. return "FORCE FW HANG";
  160. case WMI_SERVICE_GPIO:
  161. return "GPIO";
  162. case WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM:
  163. return "MODULATED DTIM";
  164. case WMI_STA_UAPSD_BASIC_AUTO_TRIG:
  165. return "BASIC UAPSD";
  166. case WMI_STA_UAPSD_VAR_AUTO_TRIG:
  167. return "VAR UAPSD";
  168. case WMI_SERVICE_STA_KEEP_ALIVE:
  169. return "STA KEEP ALIVE";
  170. case WMI_SERVICE_TX_ENCAP:
  171. return "TX ENCAP";
  172. default:
  173. return "UNKNOWN SERVICE\n";
  174. }
  175. }
  176. #define WMI_SERVICE_BM_SIZE \
  177. ((WMI_MAX_SERVICE + sizeof(u32) - 1)/sizeof(u32))
  178. /* 2 word representation of MAC addr */
  179. struct wmi_mac_addr {
  180. union {
  181. u8 addr[6];
  182. struct {
  183. u32 word0;
  184. u32 word1;
  185. } __packed;
  186. } __packed;
  187. } __packed;
  188. /* macro to convert MAC address from WMI word format to char array */
  189. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
  190. (c_macaddr)[0] = ((pwmi_mac_addr)->word0) & 0xff; \
  191. (c_macaddr)[1] = (((pwmi_mac_addr)->word0) >> 8) & 0xff; \
  192. (c_macaddr)[2] = (((pwmi_mac_addr)->word0) >> 16) & 0xff; \
  193. (c_macaddr)[3] = (((pwmi_mac_addr)->word0) >> 24) & 0xff; \
  194. (c_macaddr)[4] = ((pwmi_mac_addr)->word1) & 0xff; \
  195. (c_macaddr)[5] = (((pwmi_mac_addr)->word1) >> 8) & 0xff; \
  196. } while (0)
  197. /*
  198. * wmi command groups.
  199. */
  200. enum wmi_cmd_group {
  201. /* 0 to 2 are reserved */
  202. WMI_GRP_START = 0x3,
  203. WMI_GRP_SCAN = WMI_GRP_START,
  204. WMI_GRP_PDEV,
  205. WMI_GRP_VDEV,
  206. WMI_GRP_PEER,
  207. WMI_GRP_MGMT,
  208. WMI_GRP_BA_NEG,
  209. WMI_GRP_STA_PS,
  210. WMI_GRP_DFS,
  211. WMI_GRP_ROAM,
  212. WMI_GRP_OFL_SCAN,
  213. WMI_GRP_P2P,
  214. WMI_GRP_AP_PS,
  215. WMI_GRP_RATE_CTRL,
  216. WMI_GRP_PROFILE,
  217. WMI_GRP_SUSPEND,
  218. WMI_GRP_BCN_FILTER,
  219. WMI_GRP_WOW,
  220. WMI_GRP_RTT,
  221. WMI_GRP_SPECTRAL,
  222. WMI_GRP_STATS,
  223. WMI_GRP_ARP_NS_OFL,
  224. WMI_GRP_NLO_OFL,
  225. WMI_GRP_GTK_OFL,
  226. WMI_GRP_CSA_OFL,
  227. WMI_GRP_CHATTER,
  228. WMI_GRP_TID_ADDBA,
  229. WMI_GRP_MISC,
  230. WMI_GRP_GPIO,
  231. };
  232. #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
  233. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  234. /* Command IDs and commande events. */
  235. enum wmi_cmd_id {
  236. WMI_INIT_CMDID = 0x1,
  237. /* Scan specific commands */
  238. WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
  239. WMI_STOP_SCAN_CMDID,
  240. WMI_SCAN_CHAN_LIST_CMDID,
  241. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  242. /* PDEV (physical device) specific commands */
  243. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
  244. WMI_PDEV_SET_CHANNEL_CMDID,
  245. WMI_PDEV_SET_PARAM_CMDID,
  246. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  247. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  248. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  249. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  250. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  251. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  252. WMI_PDEV_SET_QUIET_MODE_CMDID,
  253. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  254. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  255. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  256. /* VDEV (virtual device) specific commands */
  257. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
  258. WMI_VDEV_DELETE_CMDID,
  259. WMI_VDEV_START_REQUEST_CMDID,
  260. WMI_VDEV_RESTART_REQUEST_CMDID,
  261. WMI_VDEV_UP_CMDID,
  262. WMI_VDEV_STOP_CMDID,
  263. WMI_VDEV_DOWN_CMDID,
  264. WMI_VDEV_SET_PARAM_CMDID,
  265. WMI_VDEV_INSTALL_KEY_CMDID,
  266. /* peer specific commands */
  267. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
  268. WMI_PEER_DELETE_CMDID,
  269. WMI_PEER_FLUSH_TIDS_CMDID,
  270. WMI_PEER_SET_PARAM_CMDID,
  271. WMI_PEER_ASSOC_CMDID,
  272. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  273. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  274. WMI_PEER_MCAST_GROUP_CMDID,
  275. /* beacon/management specific commands */
  276. WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
  277. WMI_PDEV_SEND_BCN_CMDID,
  278. WMI_BCN_TMPL_CMDID,
  279. WMI_BCN_FILTER_RX_CMDID,
  280. WMI_PRB_REQ_FILTER_RX_CMDID,
  281. WMI_MGMT_TX_CMDID,
  282. WMI_PRB_TMPL_CMDID,
  283. /* commands to directly control BA negotiation directly from host. */
  284. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
  285. WMI_ADDBA_SEND_CMDID,
  286. WMI_ADDBA_STATUS_CMDID,
  287. WMI_DELBA_SEND_CMDID,
  288. WMI_ADDBA_SET_RESP_CMDID,
  289. WMI_SEND_SINGLEAMSDU_CMDID,
  290. /* Station power save specific config */
  291. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
  292. WMI_STA_POWERSAVE_PARAM_CMDID,
  293. WMI_STA_MIMO_PS_MODE_CMDID,
  294. /** DFS-specific commands */
  295. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
  296. WMI_PDEV_DFS_DISABLE_CMDID,
  297. /* Roaming specific commands */
  298. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
  299. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  300. WMI_ROAM_SCAN_PERIOD,
  301. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  302. WMI_ROAM_AP_PROFILE,
  303. /* offload scan specific commands */
  304. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
  305. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  306. WMI_OFL_SCAN_PERIOD,
  307. /* P2P specific commands */
  308. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
  309. WMI_P2P_DEV_SET_DISCOVERABILITY,
  310. WMI_P2P_GO_SET_BEACON_IE,
  311. WMI_P2P_GO_SET_PROBE_RESP_IE,
  312. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  313. /* AP power save specific config */
  314. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
  315. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  316. /* Rate-control specific commands */
  317. WMI_PEER_RATE_RETRY_SCHED_CMDID =
  318. WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
  319. /* WLAN Profiling commands. */
  320. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
  321. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  322. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  323. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  324. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  325. /* Suspend resume command Ids */
  326. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
  327. WMI_PDEV_RESUME_CMDID,
  328. /* Beacon filter commands */
  329. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
  330. WMI_RMV_BCN_FILTER_CMDID,
  331. /* WOW Specific WMI commands*/
  332. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
  333. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  334. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  335. WMI_WOW_ENABLE_CMDID,
  336. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  337. /* RTT measurement related cmd */
  338. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
  339. WMI_RTT_TSF_CMDID,
  340. /* spectral scan commands */
  341. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
  342. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  343. /* F/W stats */
  344. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
  345. /* ARP OFFLOAD REQUEST*/
  346. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
  347. /* NS offload confid*/
  348. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
  349. /* GTK offload Specific WMI commands*/
  350. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
  351. /* CSA offload Specific WMI commands*/
  352. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
  353. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  354. /* Chatter commands*/
  355. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
  356. /* addba specific commands */
  357. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
  358. WMI_PEER_TID_DELBA_CMDID,
  359. /* set station mimo powersave method */
  360. WMI_STA_DTIM_PS_METHOD_CMDID,
  361. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  362. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  363. /* STA Keep alive parameter configuration,
  364. Requires WMI_SERVICE_STA_KEEP_ALIVE */
  365. WMI_STA_KEEPALIVE_CMD,
  366. /* misc command group */
  367. WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
  368. WMI_PDEV_UTF_CMDID,
  369. WMI_DBGLOG_CFG_CMDID,
  370. WMI_PDEV_QVIT_CMDID,
  371. WMI_PDEV_FTM_INTG_CMDID,
  372. WMI_VDEV_SET_KEEPALIVE_CMDID,
  373. WMI_VDEV_GET_KEEPALIVE_CMDID,
  374. WMI_FORCE_FW_HANG_CMDID,
  375. /* GPIO Configuration */
  376. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
  377. WMI_GPIO_OUTPUT_CMDID,
  378. };
  379. enum wmi_event_id {
  380. WMI_SERVICE_READY_EVENTID = 0x1,
  381. WMI_READY_EVENTID,
  382. /* Scan specific events */
  383. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  384. /* PDEV specific events */
  385. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  386. WMI_CHAN_INFO_EVENTID,
  387. WMI_PHYERR_EVENTID,
  388. /* VDEV specific events */
  389. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  390. WMI_VDEV_STOPPED_EVENTID,
  391. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  392. /* peer specific events */
  393. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  394. /* beacon/mgmt specific events */
  395. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  396. WMI_HOST_SWBA_EVENTID,
  397. WMI_TBTTOFFSET_UPDATE_EVENTID,
  398. /* ADDBA Related WMI Events*/
  399. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  400. WMI_TX_ADDBA_COMPLETE_EVENTID,
  401. /* Roam event to trigger roaming on host */
  402. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  403. WMI_PROFILE_MATCH,
  404. /* WoW */
  405. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  406. /* RTT */
  407. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  408. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  409. WMI_RTT_ERROR_REPORT_EVENTID,
  410. /* GTK offload */
  411. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  412. WMI_GTK_REKEY_FAIL_EVENTID,
  413. /* CSA IE received event */
  414. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  415. /* Misc events */
  416. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  417. WMI_PDEV_UTF_EVENTID,
  418. WMI_DEBUG_MESG_EVENTID,
  419. WMI_UPDATE_STATS_EVENTID,
  420. WMI_DEBUG_PRINT_EVENTID,
  421. WMI_DCS_INTERFERENCE_EVENTID,
  422. WMI_PDEV_QVIT_EVENTID,
  423. WMI_WLAN_PROFILE_DATA_EVENTID,
  424. WMI_PDEV_FTM_INTG_EVENTID,
  425. WMI_WLAN_FREQ_AVOID_EVENTID,
  426. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  427. /* GPIO Event */
  428. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  429. };
  430. enum wmi_phy_mode {
  431. MODE_11A = 0, /* 11a Mode */
  432. MODE_11G = 1, /* 11b/g Mode */
  433. MODE_11B = 2, /* 11b Mode */
  434. MODE_11GONLY = 3, /* 11g only Mode */
  435. MODE_11NA_HT20 = 4, /* 11a HT20 mode */
  436. MODE_11NG_HT20 = 5, /* 11g HT20 mode */
  437. MODE_11NA_HT40 = 6, /* 11a HT40 mode */
  438. MODE_11NG_HT40 = 7, /* 11g HT40 mode */
  439. MODE_11AC_VHT20 = 8,
  440. MODE_11AC_VHT40 = 9,
  441. MODE_11AC_VHT80 = 10,
  442. /* MODE_11AC_VHT160 = 11, */
  443. MODE_11AC_VHT20_2G = 11,
  444. MODE_11AC_VHT40_2G = 12,
  445. MODE_11AC_VHT80_2G = 13,
  446. MODE_UNKNOWN = 14,
  447. MODE_MAX = 14
  448. };
  449. #define WMI_CHAN_LIST_TAG 0x1
  450. #define WMI_SSID_LIST_TAG 0x2
  451. #define WMI_BSSID_LIST_TAG 0x3
  452. #define WMI_IE_TAG 0x4
  453. struct wmi_channel {
  454. __le32 mhz;
  455. __le32 band_center_freq1;
  456. __le32 band_center_freq2; /* valid for 11ac, 80plus80 */
  457. union {
  458. __le32 flags; /* WMI_CHAN_FLAG_ */
  459. struct {
  460. u8 mode; /* only 6 LSBs */
  461. } __packed;
  462. } __packed;
  463. union {
  464. __le32 reginfo0;
  465. struct {
  466. u8 min_power;
  467. u8 max_power;
  468. u8 reg_power;
  469. u8 reg_classid;
  470. } __packed;
  471. } __packed;
  472. union {
  473. __le32 reginfo1;
  474. struct {
  475. u8 antenna_max;
  476. } __packed;
  477. } __packed;
  478. } __packed;
  479. struct wmi_channel_arg {
  480. u32 freq;
  481. u32 band_center_freq1;
  482. bool passive;
  483. bool allow_ibss;
  484. bool allow_ht;
  485. bool allow_vht;
  486. bool ht40plus;
  487. /* note: power unit is 1/4th of dBm */
  488. u32 min_power;
  489. u32 max_power;
  490. u32 max_reg_power;
  491. u32 max_antenna_gain;
  492. u32 reg_class_id;
  493. enum wmi_phy_mode mode;
  494. };
  495. enum wmi_channel_change_cause {
  496. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  497. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  498. };
  499. #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6)
  500. #define WMI_CHAN_FLAG_PASSIVE (1 << 7)
  501. #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8)
  502. #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9)
  503. #define WMI_CHAN_FLAG_DFS (1 << 10)
  504. #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)
  505. #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12)
  506. /* Indicate reason for channel switch */
  507. #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
  508. #define WMI_MAX_SPATIAL_STREAM 3
  509. /* HT Capabilities*/
  510. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  511. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  512. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  513. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  514. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  515. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  516. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  517. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  518. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  519. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  520. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  521. #define WMI_HT_CAP_HT40_SGI 0x0800
  522. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  523. WMI_HT_CAP_HT20_SGI | \
  524. WMI_HT_CAP_HT40_SGI | \
  525. WMI_HT_CAP_TX_STBC | \
  526. WMI_HT_CAP_RX_STBC | \
  527. WMI_HT_CAP_LDPC)
  528. /*
  529. * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  530. * field. The fields not defined here are not supported, or reserved.
  531. * Do not change these masks and if you have to add new one follow the
  532. * bitmask as specified by 802.11ac draft.
  533. */
  534. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  535. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  536. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  537. #define WMI_VHT_CAP_TX_STBC 0x00000080
  538. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  539. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  540. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  541. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  542. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  543. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  544. /* The following also refer for max HT AMSDU */
  545. #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000
  546. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  547. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  548. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  549. WMI_VHT_CAP_RX_LDPC | \
  550. WMI_VHT_CAP_SGI_80MHZ | \
  551. WMI_VHT_CAP_TX_STBC | \
  552. WMI_VHT_CAP_RX_STBC_MASK | \
  553. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  554. WMI_VHT_CAP_RX_FIXED_ANT | \
  555. WMI_VHT_CAP_TX_FIXED_ANT)
  556. /*
  557. * Interested readers refer to Rx/Tx MCS Map definition as defined in
  558. * 802.11ac
  559. */
  560. #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
  561. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  562. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  563. enum {
  564. REGDMN_MODE_11A = 0x00001, /* 11a channels */
  565. REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
  566. REGDMN_MODE_11B = 0x00004, /* 11b channels */
  567. REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
  568. REGDMN_MODE_11G = 0x00008, /* XXX historical */
  569. REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */
  570. REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */
  571. REGDMN_MODE_XR = 0x00100, /* XR channels */
  572. REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
  573. REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
  574. REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
  575. REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
  576. REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
  577. REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
  578. REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
  579. REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
  580. REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
  581. REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
  582. REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
  583. REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
  584. REGDMN_MODE_ALL = 0xffffffff
  585. };
  586. #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001
  587. #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002
  588. #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004
  589. /* regulatory capabilities */
  590. #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040
  591. #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080
  592. #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100
  593. #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200
  594. #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400
  595. #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800
  596. struct hal_reg_capabilities {
  597. /* regdomain value specified in EEPROM */
  598. __le32 eeprom_rd;
  599. /*regdomain */
  600. __le32 eeprom_rd_ext;
  601. /* CAP1 capabilities bit map. */
  602. __le32 regcap1;
  603. /* REGDMN EEPROM CAP. */
  604. __le32 regcap2;
  605. /* REGDMN MODE */
  606. __le32 wireless_modes;
  607. __le32 low_2ghz_chan;
  608. __le32 high_2ghz_chan;
  609. __le32 low_5ghz_chan;
  610. __le32 high_5ghz_chan;
  611. } __packed;
  612. enum wlan_mode_capability {
  613. WHAL_WLAN_11A_CAPABILITY = 0x1,
  614. WHAL_WLAN_11G_CAPABILITY = 0x2,
  615. WHAL_WLAN_11AG_CAPABILITY = 0x3,
  616. };
  617. /* structure used by FW for requesting host memory */
  618. struct wlan_host_mem_req {
  619. /* ID of the request */
  620. __le32 req_id;
  621. /* size of the of each unit */
  622. __le32 unit_size;
  623. /* flags to indicate that
  624. * the number units is dependent
  625. * on number of resources(num vdevs num peers .. etc)
  626. */
  627. __le32 num_unit_info;
  628. /*
  629. * actual number of units to allocate . if flags in the num_unit_info
  630. * indicate that number of units is tied to number of a particular
  631. * resource to allocate then num_units filed is set to 0 and host
  632. * will derive the number units from number of the resources it is
  633. * requesting.
  634. */
  635. __le32 num_units;
  636. } __packed;
  637. #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id) \
  638. ((((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \
  639. (1 << ((svc_id)%(sizeof(u32))))) != 0)
  640. /*
  641. * The following struct holds optional payload for
  642. * wmi_service_ready_event,e.g., 11ac pass some of the
  643. * device capability to the host.
  644. */
  645. struct wmi_service_ready_event {
  646. __le32 sw_version;
  647. __le32 sw_version_1;
  648. __le32 abi_version;
  649. /* WMI_PHY_CAPABILITY */
  650. __le32 phy_capability;
  651. /* Maximum number of frag table entries that SW will populate less 1 */
  652. __le32 max_frag_entry;
  653. __le32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  654. __le32 num_rf_chains;
  655. /*
  656. * The following field is only valid for service type
  657. * WMI_SERVICE_11AC
  658. */
  659. __le32 ht_cap_info; /* WMI HT Capability */
  660. __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
  661. __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  662. __le32 hw_min_tx_power;
  663. __le32 hw_max_tx_power;
  664. struct hal_reg_capabilities hal_reg_capabilities;
  665. __le32 sys_cap_info;
  666. __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  667. /*
  668. * Max beacon and Probe Response IE offload size
  669. * (includes optional P2P IEs)
  670. */
  671. __le32 max_bcn_ie_size;
  672. /*
  673. * request to host to allocate a chuck of memory and pss it down to FW
  674. * via WM_INIT. FW uses this as FW extesnsion memory for saving its
  675. * data structures. Only valid for low latency interfaces like PCIE
  676. * where FW can access this memory directly (or) by DMA.
  677. */
  678. __le32 num_mem_reqs;
  679. struct wlan_host_mem_req mem_reqs[1];
  680. } __packed;
  681. #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
  682. #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
  683. struct wmi_ready_event {
  684. __le32 sw_version;
  685. __le32 abi_version;
  686. struct wmi_mac_addr mac_addr;
  687. __le32 status;
  688. } __packed;
  689. struct wmi_resource_config {
  690. /* number of virtual devices (VAPs) to support */
  691. __le32 num_vdevs;
  692. /* number of peer nodes to support */
  693. __le32 num_peers;
  694. /*
  695. * In offload mode target supports features like WOW, chatter and
  696. * other protocol offloads. In order to support them some
  697. * functionalities like reorder buffering, PN checking need to be
  698. * done in target. This determines maximum number of peers suported
  699. * by target in offload mode
  700. */
  701. __le32 num_offload_peers;
  702. /* For target-based RX reordering */
  703. __le32 num_offload_reorder_bufs;
  704. /* number of keys per peer */
  705. __le32 num_peer_keys;
  706. /* total number of TX/RX data TIDs */
  707. __le32 num_tids;
  708. /*
  709. * max skid for resolving hash collisions
  710. *
  711. * The address search table is sparse, so that if two MAC addresses
  712. * result in the same hash value, the second of these conflicting
  713. * entries can slide to the next index in the address search table,
  714. * and use it, if it is unoccupied. This ast_skid_limit parameter
  715. * specifies the upper bound on how many subsequent indices to search
  716. * over to find an unoccupied space.
  717. */
  718. __le32 ast_skid_limit;
  719. /*
  720. * the nominal chain mask for transmit
  721. *
  722. * The chain mask may be modified dynamically, e.g. to operate AP
  723. * tx with a reduced number of chains if no clients are associated.
  724. * This configuration parameter specifies the nominal chain-mask that
  725. * should be used when not operating with a reduced set of tx chains.
  726. */
  727. __le32 tx_chain_mask;
  728. /*
  729. * the nominal chain mask for receive
  730. *
  731. * The chain mask may be modified dynamically, e.g. for a client
  732. * to use a reduced number of chains for receive if the traffic to
  733. * the client is low enough that it doesn't require downlink MIMO
  734. * or antenna diversity.
  735. * This configuration parameter specifies the nominal chain-mask that
  736. * should be used when not operating with a reduced set of rx chains.
  737. */
  738. __le32 rx_chain_mask;
  739. /*
  740. * what rx reorder timeout (ms) to use for the AC
  741. *
  742. * Each WMM access class (voice, video, best-effort, background) will
  743. * have its own timeout value to dictate how long to wait for missing
  744. * rx MPDUs to arrive before flushing subsequent MPDUs that have
  745. * already been received.
  746. * This parameter specifies the timeout in milliseconds for each
  747. * class.
  748. */
  749. __le32 rx_timeout_pri_vi;
  750. __le32 rx_timeout_pri_vo;
  751. __le32 rx_timeout_pri_be;
  752. __le32 rx_timeout_pri_bk;
  753. /*
  754. * what mode the rx should decap packets to
  755. *
  756. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  757. * THis setting also determines the default TX behavior, however TX
  758. * behavior can be modified on a per VAP basis during VAP init
  759. */
  760. __le32 rx_decap_mode;
  761. /* what is the maximum scan requests than can be queued */
  762. __le32 scan_max_pending_reqs;
  763. /* maximum VDEV that could use BMISS offload */
  764. __le32 bmiss_offload_max_vdev;
  765. /* maximum VDEV that could use offload roaming */
  766. __le32 roam_offload_max_vdev;
  767. /* maximum AP profiles that would push to offload roaming */
  768. __le32 roam_offload_max_ap_profiles;
  769. /*
  770. * how many groups to use for mcast->ucast conversion
  771. *
  772. * The target's WAL maintains a table to hold information regarding
  773. * which peers belong to a given multicast group, so that if
  774. * multicast->unicast conversion is enabled, the target can convert
  775. * multicast tx frames to a series of unicast tx frames, to each
  776. * peer within the multicast group.
  777. This num_mcast_groups configuration parameter tells the target how
  778. * many multicast groups to provide storage for within its multicast
  779. * group membership table.
  780. */
  781. __le32 num_mcast_groups;
  782. /*
  783. * size to alloc for the mcast membership table
  784. *
  785. * This num_mcast_table_elems configuration parameter tells the
  786. * target how many peer elements it needs to provide storage for in
  787. * its multicast group membership table.
  788. * These multicast group membership table elements are shared by the
  789. * multicast groups stored within the table.
  790. */
  791. __le32 num_mcast_table_elems;
  792. /*
  793. * whether/how to do multicast->unicast conversion
  794. *
  795. * This configuration parameter specifies whether the target should
  796. * perform multicast --> unicast conversion on transmit, and if so,
  797. * what to do if it finds no entries in its multicast group
  798. * membership table for the multicast IP address in the tx frame.
  799. * Configuration value:
  800. * 0 -> Do not perform multicast to unicast conversion.
  801. * 1 -> Convert multicast frames to unicast, if the IP multicast
  802. * address from the tx frame is found in the multicast group
  803. * membership table. If the IP multicast address is not found,
  804. * drop the frame.
  805. * 2 -> Convert multicast frames to unicast, if the IP multicast
  806. * address from the tx frame is found in the multicast group
  807. * membership table. If the IP multicast address is not found,
  808. * transmit the frame as multicast.
  809. */
  810. __le32 mcast2ucast_mode;
  811. /*
  812. * how much memory to allocate for a tx PPDU dbg log
  813. *
  814. * This parameter controls how much memory the target will allocate
  815. * to store a log of tx PPDU meta-information (how large the PPDU
  816. * was, when it was sent, whether it was successful, etc.)
  817. */
  818. __le32 tx_dbg_log_size;
  819. /* how many AST entries to be allocated for WDS */
  820. __le32 num_wds_entries;
  821. /*
  822. * MAC DMA burst size, e.g., For target PCI limit can be
  823. * 0 -default, 1 256B
  824. */
  825. __le32 dma_burst_size;
  826. /*
  827. * Fixed delimiters to be inserted after every MPDU to
  828. * account for interface latency to avoid underrun.
  829. */
  830. __le32 mac_aggr_delim;
  831. /*
  832. * determine whether target is responsible for detecting duplicate
  833. * non-aggregate MPDU and timing out stale fragments.
  834. *
  835. * A-MPDU reordering is always performed on the target.
  836. *
  837. * 0: target responsible for frag timeout and dup checking
  838. * 1: host responsible for frag timeout and dup checking
  839. */
  840. __le32 rx_skip_defrag_timeout_dup_detection_check;
  841. /*
  842. * Configuration for VoW :
  843. * No of Video Nodes to be supported
  844. * and Max no of descriptors for each Video link (node).
  845. */
  846. __le32 vow_config;
  847. /* maximum VDEV that could use GTK offload */
  848. __le32 gtk_offload_max_vdev;
  849. /* Number of msdu descriptors target should use */
  850. __le32 num_msdu_desc;
  851. /*
  852. * Max. number of Tx fragments per MSDU
  853. * This parameter controls the max number of Tx fragments per MSDU.
  854. * This is sent by the target as part of the WMI_SERVICE_READY event
  855. * and is overriden by the OS shim as required.
  856. */
  857. __le32 max_frag_entries;
  858. } __packed;
  859. /* strucutre describing host memory chunk. */
  860. struct host_memory_chunk {
  861. /* id of the request that is passed up in service ready */
  862. __le32 req_id;
  863. /* the physical address the memory chunk */
  864. __le32 ptr;
  865. /* size of the chunk */
  866. __le32 size;
  867. } __packed;
  868. struct wmi_init_cmd {
  869. struct wmi_resource_config resource_config;
  870. __le32 num_host_mem_chunks;
  871. /*
  872. * variable number of host memory chunks.
  873. * This should be the last element in the structure
  874. */
  875. struct host_memory_chunk host_mem_chunks[1];
  876. } __packed;
  877. /* TLV for channel list */
  878. struct wmi_chan_list {
  879. __le32 tag; /* WMI_CHAN_LIST_TAG */
  880. __le32 num_chan;
  881. __le32 channel_list[0];
  882. } __packed;
  883. struct wmi_bssid_list {
  884. __le32 tag; /* WMI_BSSID_LIST_TAG */
  885. __le32 num_bssid;
  886. struct wmi_mac_addr bssid_list[0];
  887. } __packed;
  888. struct wmi_ie_data {
  889. __le32 tag; /* WMI_IE_TAG */
  890. __le32 ie_len;
  891. u8 ie_data[0];
  892. } __packed;
  893. struct wmi_ssid {
  894. __le32 ssid_len;
  895. u8 ssid[32];
  896. } __packed;
  897. struct wmi_ssid_list {
  898. __le32 tag; /* WMI_SSID_LIST_TAG */
  899. __le32 num_ssids;
  900. struct wmi_ssid ssids[0];
  901. } __packed;
  902. /* prefix used by scan requestor ids on the host */
  903. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  904. /* prefix used by scan request ids generated on the host */
  905. /* host cycles through the lower 12 bits to generate ids */
  906. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  907. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  908. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  909. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
  910. /* Scan priority numbers must be sequential, starting with 0 */
  911. enum wmi_scan_priority {
  912. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  913. WMI_SCAN_PRIORITY_LOW,
  914. WMI_SCAN_PRIORITY_MEDIUM,
  915. WMI_SCAN_PRIORITY_HIGH,
  916. WMI_SCAN_PRIORITY_VERY_HIGH,
  917. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  918. };
  919. struct wmi_start_scan_cmd {
  920. /* Scan ID */
  921. __le32 scan_id;
  922. /* Scan requestor ID */
  923. __le32 scan_req_id;
  924. /* VDEV id(interface) that is requesting scan */
  925. __le32 vdev_id;
  926. /* Scan Priority, input to scan scheduler */
  927. __le32 scan_priority;
  928. /* Scan events subscription */
  929. __le32 notify_scan_events;
  930. /* dwell time in msec on active channels */
  931. __le32 dwell_time_active;
  932. /* dwell time in msec on passive channels */
  933. __le32 dwell_time_passive;
  934. /*
  935. * min time in msec on the BSS channel,only valid if atleast one
  936. * VDEV is active
  937. */
  938. __le32 min_rest_time;
  939. /*
  940. * max rest time in msec on the BSS channel,only valid if at least
  941. * one VDEV is active
  942. */
  943. /*
  944. * the scanner will rest on the bss channel at least min_rest_time
  945. * after min_rest_time the scanner will start checking for tx/rx
  946. * activity on all VDEVs. if there is no activity the scanner will
  947. * switch to off channel. if there is activity the scanner will let
  948. * the radio on the bss channel until max_rest_time expires.at
  949. * max_rest_time scanner will switch to off channel irrespective of
  950. * activity. activity is determined by the idle_time parameter.
  951. */
  952. __le32 max_rest_time;
  953. /*
  954. * time before sending next set of probe requests.
  955. * The scanner keeps repeating probe requests transmission with
  956. * period specified by repeat_probe_time.
  957. * The number of probe requests specified depends on the ssid_list
  958. * and bssid_list
  959. */
  960. __le32 repeat_probe_time;
  961. /* time in msec between 2 consequetive probe requests with in a set. */
  962. __le32 probe_spacing_time;
  963. /*
  964. * data inactivity time in msec on bss channel that will be used by
  965. * scanner for measuring the inactivity.
  966. */
  967. __le32 idle_time;
  968. /* maximum time in msec allowed for scan */
  969. __le32 max_scan_time;
  970. /*
  971. * delay in msec before sending first probe request after switching
  972. * to a channel
  973. */
  974. __le32 probe_delay;
  975. /* Scan control flags */
  976. __le32 scan_ctrl_flags;
  977. /* Burst duration time in msecs */
  978. __le32 burst_duration;
  979. /*
  980. * TLV (tag length value ) paramerters follow the scan_cmd structure.
  981. * TLV can contain channel list, bssid list, ssid list and
  982. * ie. the TLV tags are defined above;
  983. */
  984. } __packed;
  985. struct wmi_ssid_arg {
  986. int len;
  987. const u8 *ssid;
  988. };
  989. struct wmi_bssid_arg {
  990. const u8 *bssid;
  991. };
  992. struct wmi_start_scan_arg {
  993. u32 scan_id;
  994. u32 scan_req_id;
  995. u32 vdev_id;
  996. u32 scan_priority;
  997. u32 notify_scan_events;
  998. u32 dwell_time_active;
  999. u32 dwell_time_passive;
  1000. u32 min_rest_time;
  1001. u32 max_rest_time;
  1002. u32 repeat_probe_time;
  1003. u32 probe_spacing_time;
  1004. u32 idle_time;
  1005. u32 max_scan_time;
  1006. u32 probe_delay;
  1007. u32 scan_ctrl_flags;
  1008. u32 ie_len;
  1009. u32 n_channels;
  1010. u32 n_ssids;
  1011. u32 n_bssids;
  1012. u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
  1013. u32 channels[64];
  1014. struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
  1015. struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
  1016. };
  1017. /* scan control flags */
  1018. /* passively scan all channels including active channels */
  1019. #define WMI_SCAN_FLAG_PASSIVE 0x1
  1020. /* add wild card ssid probe request even though ssid_list is specified. */
  1021. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  1022. /* add cck rates to rates/xrate ie for the generated probe request */
  1023. #define WMI_SCAN_ADD_CCK_RATES 0x4
  1024. /* add ofdm rates to rates/xrate ie for the generated probe request */
  1025. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  1026. /* To enable indication of Chan load and Noise floor to host */
  1027. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  1028. /* Filter Probe request frames */
  1029. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  1030. /* When set, DFS channels will not be scanned */
  1031. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  1032. /* Different FW scan engine may choose to bail out on errors.
  1033. * Allow the driver to have influence over that. */
  1034. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  1035. /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  1036. #define WMI_SCAN_CLASS_MASK 0xFF000000
  1037. enum wmi_stop_scan_type {
  1038. WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
  1039. WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
  1040. WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
  1041. };
  1042. struct wmi_stop_scan_cmd {
  1043. __le32 scan_req_id;
  1044. __le32 scan_id;
  1045. __le32 req_type;
  1046. __le32 vdev_id;
  1047. } __packed;
  1048. struct wmi_stop_scan_arg {
  1049. u32 req_id;
  1050. enum wmi_stop_scan_type req_type;
  1051. union {
  1052. u32 scan_id;
  1053. u32 vdev_id;
  1054. } u;
  1055. };
  1056. struct wmi_scan_chan_list_cmd {
  1057. __le32 num_scan_chans;
  1058. struct wmi_channel chan_info[0];
  1059. } __packed;
  1060. struct wmi_scan_chan_list_arg {
  1061. u32 n_channels;
  1062. struct wmi_channel_arg *channels;
  1063. };
  1064. enum wmi_bss_filter {
  1065. WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
  1066. WMI_BSS_FILTER_ALL, /* all beacons forwarded */
  1067. WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
  1068. WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
  1069. WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
  1070. WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
  1071. WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
  1072. WMI_BSS_FILTER_LAST_BSS, /* marker only */
  1073. };
  1074. enum wmi_scan_event_type {
  1075. WMI_SCAN_EVENT_STARTED = 0x1,
  1076. WMI_SCAN_EVENT_COMPLETED = 0x2,
  1077. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  1078. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  1079. WMI_SCAN_EVENT_DEQUEUED = 0x10,
  1080. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* possibly by high-prio scan */
  1081. WMI_SCAN_EVENT_START_FAILED = 0x40,
  1082. WMI_SCAN_EVENT_RESTARTED = 0x80,
  1083. WMI_SCAN_EVENT_MAX = 0x8000
  1084. };
  1085. enum wmi_scan_completion_reason {
  1086. WMI_SCAN_REASON_COMPLETED,
  1087. WMI_SCAN_REASON_CANCELLED,
  1088. WMI_SCAN_REASON_PREEMPTED,
  1089. WMI_SCAN_REASON_TIMEDOUT,
  1090. WMI_SCAN_REASON_MAX,
  1091. };
  1092. struct wmi_scan_event {
  1093. __le32 event_type; /* %WMI_SCAN_EVENT_ */
  1094. __le32 reason; /* %WMI_SCAN_REASON_ */
  1095. __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
  1096. __le32 scan_req_id;
  1097. __le32 scan_id;
  1098. __le32 vdev_id;
  1099. } __packed;
  1100. /*
  1101. * This defines how much headroom is kept in the
  1102. * receive frame between the descriptor and the
  1103. * payload, in order for the WMI PHY error and
  1104. * management handler to insert header contents.
  1105. *
  1106. * This is in bytes.
  1107. */
  1108. #define WMI_MGMT_RX_HDR_HEADROOM 52
  1109. /*
  1110. * This event will be used for sending scan results
  1111. * as well as rx mgmt frames to the host. The rx buffer
  1112. * will be sent as part of this WMI event. It would be a
  1113. * good idea to pass all the fields in the RX status
  1114. * descriptor up to the host.
  1115. */
  1116. struct wmi_mgmt_rx_hdr_v1 {
  1117. __le32 channel;
  1118. __le32 snr;
  1119. __le32 rate;
  1120. __le32 phy_mode;
  1121. __le32 buf_len;
  1122. __le32 status; /* %WMI_RX_STATUS_ */
  1123. } __packed;
  1124. struct wmi_mgmt_rx_hdr_v2 {
  1125. struct wmi_mgmt_rx_hdr_v1 v1;
  1126. __le32 rssi_ctl[4];
  1127. } __packed;
  1128. struct wmi_mgmt_rx_event_v1 {
  1129. struct wmi_mgmt_rx_hdr_v1 hdr;
  1130. u8 buf[0];
  1131. } __packed;
  1132. struct wmi_mgmt_rx_event_v2 {
  1133. struct wmi_mgmt_rx_hdr_v2 hdr;
  1134. u8 buf[0];
  1135. } __packed;
  1136. #define WMI_RX_STATUS_OK 0x00
  1137. #define WMI_RX_STATUS_ERR_CRC 0x01
  1138. #define WMI_RX_STATUS_ERR_DECRYPT 0x08
  1139. #define WMI_RX_STATUS_ERR_MIC 0x10
  1140. #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
  1141. struct wmi_single_phyerr_rx_hdr {
  1142. /* TSF timestamp */
  1143. __le32 tsf_timestamp;
  1144. /*
  1145. * Current freq1, freq2
  1146. *
  1147. * [7:0]: freq1[lo]
  1148. * [15:8] : freq1[hi]
  1149. * [23:16]: freq2[lo]
  1150. * [31:24]: freq2[hi]
  1151. */
  1152. __le16 freq1;
  1153. __le16 freq2;
  1154. /*
  1155. * Combined RSSI over all chains and channel width for this PHY error
  1156. *
  1157. * [7:0]: RSSI combined
  1158. * [15:8]: Channel width (MHz)
  1159. * [23:16]: PHY error code
  1160. * [24:16]: reserved (future use)
  1161. */
  1162. u8 rssi_combined;
  1163. u8 chan_width_mhz;
  1164. u8 phy_err_code;
  1165. u8 rsvd0;
  1166. /*
  1167. * RSSI on chain 0 through 3
  1168. *
  1169. * This is formatted the same as the PPDU_START RX descriptor
  1170. * field:
  1171. *
  1172. * [7:0]: pri20
  1173. * [15:8]: sec20
  1174. * [23:16]: sec40
  1175. * [31:24]: sec80
  1176. */
  1177. __le32 rssi_chain0;
  1178. __le32 rssi_chain1;
  1179. __le32 rssi_chain2;
  1180. __le32 rssi_chain3;
  1181. /*
  1182. * Last calibrated NF value for chain 0 through 3
  1183. *
  1184. * nf_list_1:
  1185. *
  1186. * + [15:0] - chain 0
  1187. * + [31:16] - chain 1
  1188. *
  1189. * nf_list_2:
  1190. *
  1191. * + [15:0] - chain 2
  1192. * + [31:16] - chain 3
  1193. */
  1194. __le32 nf_list_1;
  1195. __le32 nf_list_2;
  1196. /* Length of the frame */
  1197. __le32 buf_len;
  1198. } __packed;
  1199. struct wmi_single_phyerr_rx_event {
  1200. /* Phy error event header */
  1201. struct wmi_single_phyerr_rx_hdr hdr;
  1202. /* frame buffer */
  1203. u8 bufp[0];
  1204. } __packed;
  1205. struct wmi_comb_phyerr_rx_hdr {
  1206. /* Phy error phy error count */
  1207. __le32 num_phyerr_events;
  1208. __le32 tsf_l32;
  1209. __le32 tsf_u32;
  1210. } __packed;
  1211. struct wmi_comb_phyerr_rx_event {
  1212. /* Phy error phy error count */
  1213. struct wmi_comb_phyerr_rx_hdr hdr;
  1214. /*
  1215. * frame buffer - contains multiple payloads in the order:
  1216. * header - payload, header - payload...
  1217. * (The header is of type: wmi_single_phyerr_rx_hdr)
  1218. */
  1219. u8 bufp[0];
  1220. } __packed;
  1221. struct wmi_mgmt_tx_hdr {
  1222. __le32 vdev_id;
  1223. struct wmi_mac_addr peer_macaddr;
  1224. __le32 tx_rate;
  1225. __le32 tx_power;
  1226. __le32 buf_len;
  1227. } __packed;
  1228. struct wmi_mgmt_tx_cmd {
  1229. struct wmi_mgmt_tx_hdr hdr;
  1230. u8 buf[0];
  1231. } __packed;
  1232. struct wmi_echo_event {
  1233. __le32 value;
  1234. } __packed;
  1235. struct wmi_echo_cmd {
  1236. __le32 value;
  1237. } __packed;
  1238. struct wmi_pdev_set_regdomain_cmd {
  1239. __le32 reg_domain;
  1240. __le32 reg_domain_2G;
  1241. __le32 reg_domain_5G;
  1242. __le32 conformance_test_limit_2G;
  1243. __le32 conformance_test_limit_5G;
  1244. } __packed;
  1245. /* Command to set/unset chip in quiet mode */
  1246. struct wmi_pdev_set_quiet_cmd {
  1247. /* period in TUs */
  1248. __le32 period;
  1249. /* duration in TUs */
  1250. __le32 duration;
  1251. /* offset in TUs */
  1252. __le32 next_start;
  1253. /* enable/disable */
  1254. __le32 enabled;
  1255. } __packed;
  1256. /*
  1257. * 802.11g protection mode.
  1258. */
  1259. enum ath10k_protmode {
  1260. ATH10K_PROT_NONE = 0, /* no protection */
  1261. ATH10K_PROT_CTSONLY = 1, /* CTS to self */
  1262. ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
  1263. };
  1264. enum wmi_beacon_gen_mode {
  1265. WMI_BEACON_STAGGERED_MODE = 0,
  1266. WMI_BEACON_BURST_MODE = 1
  1267. };
  1268. enum wmi_csa_event_ies_present_flag {
  1269. WMI_CSA_IE_PRESENT = 0x00000001,
  1270. WMI_XCSA_IE_PRESENT = 0x00000002,
  1271. WMI_WBW_IE_PRESENT = 0x00000004,
  1272. WMI_CSWARP_IE_PRESENT = 0x00000008,
  1273. };
  1274. /* wmi CSA receive event from beacon frame */
  1275. struct wmi_csa_event {
  1276. __le32 i_fc_dur;
  1277. /* Bit 0-15: FC */
  1278. /* Bit 16-31: DUR */
  1279. struct wmi_mac_addr i_addr1;
  1280. struct wmi_mac_addr i_addr2;
  1281. __le32 csa_ie[2];
  1282. __le32 xcsa_ie[2];
  1283. __le32 wb_ie[2];
  1284. __le32 cswarp_ie;
  1285. __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
  1286. } __packed;
  1287. /* the definition of different PDEV parameters */
  1288. #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
  1289. #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
  1290. #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
  1291. enum wmi_pdev_param {
  1292. /* TX chian mask */
  1293. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  1294. /* RX chian mask */
  1295. WMI_PDEV_PARAM_RX_CHAIN_MASK,
  1296. /* TX power limit for 2G Radio */
  1297. WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
  1298. /* TX power limit for 5G Radio */
  1299. WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
  1300. /* TX power scale */
  1301. WMI_PDEV_PARAM_TXPOWER_SCALE,
  1302. /* Beacon generation mode . 0: host, 1: target */
  1303. WMI_PDEV_PARAM_BEACON_GEN_MODE,
  1304. /* Beacon generation mode . 0: staggered 1: bursted */
  1305. WMI_PDEV_PARAM_BEACON_TX_MODE,
  1306. /*
  1307. * Resource manager off chan mode .
  1308. * 0: turn off off chan mode. 1: turn on offchan mode
  1309. */
  1310. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  1311. /*
  1312. * Protection mode:
  1313. * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
  1314. */
  1315. WMI_PDEV_PARAM_PROTECTION_MODE,
  1316. /* Dynamic bandwidth 0: disable 1: enable */
  1317. WMI_PDEV_PARAM_DYNAMIC_BW,
  1318. /* Non aggregrate/ 11g sw retry threshold.0-disable */
  1319. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  1320. /* aggregrate sw retry threshold. 0-disable*/
  1321. WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
  1322. /* Station kickout threshold (non of consecutive failures).0-disable */
  1323. WMI_PDEV_PARAM_STA_KICKOUT_TH,
  1324. /* Aggerate size scaling configuration per AC */
  1325. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  1326. /* LTR enable */
  1327. WMI_PDEV_PARAM_LTR_ENABLE,
  1328. /* LTR latency for BE, in us */
  1329. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
  1330. /* LTR latency for BK, in us */
  1331. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
  1332. /* LTR latency for VI, in us */
  1333. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
  1334. /* LTR latency for VO, in us */
  1335. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
  1336. /* LTR AC latency timeout, in ms */
  1337. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  1338. /* LTR platform latency override, in us */
  1339. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  1340. /* LTR-RX override, in us */
  1341. WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
  1342. /* Tx activity timeout for LTR, in us */
  1343. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  1344. /* L1SS state machine enable */
  1345. WMI_PDEV_PARAM_L1SS_ENABLE,
  1346. /* Deep sleep state machine enable */
  1347. WMI_PDEV_PARAM_DSLEEP_ENABLE,
  1348. /* RX buffering flush enable */
  1349. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  1350. /* RX buffering matermark */
  1351. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  1352. /* RX buffering timeout enable */
  1353. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  1354. /* RX buffering timeout value */
  1355. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  1356. /* pdev level stats update period in ms */
  1357. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  1358. /* vdev level stats update period in ms */
  1359. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  1360. /* peer level stats update period in ms */
  1361. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  1362. /* beacon filter status update period */
  1363. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  1364. /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  1365. WMI_PDEV_PARAM_PMF_QOS,
  1366. /* Access category on which ARP frames are sent */
  1367. WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
  1368. /* DCS configuration */
  1369. WMI_PDEV_PARAM_DCS,
  1370. /* Enable/Disable ANI on target */
  1371. WMI_PDEV_PARAM_ANI_ENABLE,
  1372. /* configure the ANI polling period */
  1373. WMI_PDEV_PARAM_ANI_POLL_PERIOD,
  1374. /* configure the ANI listening period */
  1375. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
  1376. /* configure OFDM immunity level */
  1377. WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
  1378. /* configure CCK immunity level */
  1379. WMI_PDEV_PARAM_ANI_CCK_LEVEL,
  1380. /* Enable/Disable CDD for 1x1 STAs in rate control module */
  1381. WMI_PDEV_PARAM_DYNTXCHAIN,
  1382. /* Enable/Disable proxy STA */
  1383. WMI_PDEV_PARAM_PROXY_STA,
  1384. /* Enable/Disable low power state when all VDEVs are inactive/idle. */
  1385. WMI_PDEV_PARAM_IDLE_PS_CONFIG,
  1386. /* Enable/Disable power gating sleep */
  1387. WMI_PDEV_PARAM_POWER_GATING_SLEEP,
  1388. };
  1389. struct wmi_pdev_set_param_cmd {
  1390. __le32 param_id;
  1391. __le32 param_value;
  1392. } __packed;
  1393. struct wmi_pdev_get_tpc_config_cmd {
  1394. /* parameter */
  1395. __le32 param;
  1396. } __packed;
  1397. #define WMI_TPC_RATE_MAX 160
  1398. #define WMI_TPC_TX_N_CHAIN 4
  1399. enum wmi_tpc_config_event_flag {
  1400. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  1401. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  1402. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  1403. };
  1404. struct wmi_pdev_tpc_config_event {
  1405. __le32 reg_domain;
  1406. __le32 chan_freq;
  1407. __le32 phy_mode;
  1408. __le32 twice_antenna_reduction;
  1409. __le32 twice_max_rd_power;
  1410. s32 twice_antenna_gain;
  1411. __le32 power_limit;
  1412. __le32 rate_max;
  1413. __le32 num_tx_chain;
  1414. __le32 ctl;
  1415. __le32 flags;
  1416. s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
  1417. s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  1418. s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  1419. s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  1420. u8 rates_array[WMI_TPC_RATE_MAX];
  1421. } __packed;
  1422. /* Transmit power scale factor. */
  1423. enum wmi_tp_scale {
  1424. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  1425. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  1426. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  1427. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  1428. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  1429. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  1430. };
  1431. struct wmi_set_channel_cmd {
  1432. /* channel (only frequency and mode info are used) */
  1433. struct wmi_channel chan;
  1434. } __packed;
  1435. struct wmi_pdev_chanlist_update_event {
  1436. /* number of channels */
  1437. __le32 num_chan;
  1438. /* array of channels */
  1439. struct wmi_channel channel_list[1];
  1440. } __packed;
  1441. #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
  1442. struct wmi_debug_mesg_event {
  1443. /* message buffer, NULL terminated */
  1444. char bufp[WMI_MAX_DEBUG_MESG];
  1445. } __packed;
  1446. enum {
  1447. /* P2P device */
  1448. VDEV_SUBTYPE_P2PDEV = 0,
  1449. /* P2P client */
  1450. VDEV_SUBTYPE_P2PCLI,
  1451. /* P2P GO */
  1452. VDEV_SUBTYPE_P2PGO,
  1453. /* BT3.0 HS */
  1454. VDEV_SUBTYPE_BT,
  1455. };
  1456. struct wmi_pdev_set_channel_cmd {
  1457. /* idnore power , only use flags , mode and freq */
  1458. struct wmi_channel chan;
  1459. } __packed;
  1460. /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
  1461. #define WMI_DSCP_MAP_MAX (64)
  1462. struct wmi_pdev_set_dscp_tid_map_cmd {
  1463. /* map indicating DSCP to TID conversion */
  1464. __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  1465. } __packed;
  1466. enum mcast_bcast_rate_id {
  1467. WMI_SET_MCAST_RATE,
  1468. WMI_SET_BCAST_RATE
  1469. };
  1470. struct mcast_bcast_rate {
  1471. enum mcast_bcast_rate_id rate_id;
  1472. __le32 rate;
  1473. } __packed;
  1474. struct wmi_wmm_params {
  1475. __le32 cwmin;
  1476. __le32 cwmax;
  1477. __le32 aifs;
  1478. __le32 txop;
  1479. __le32 acm;
  1480. __le32 no_ack;
  1481. } __packed;
  1482. struct wmi_pdev_set_wmm_params {
  1483. struct wmi_wmm_params ac_be;
  1484. struct wmi_wmm_params ac_bk;
  1485. struct wmi_wmm_params ac_vi;
  1486. struct wmi_wmm_params ac_vo;
  1487. } __packed;
  1488. struct wmi_wmm_params_arg {
  1489. u32 cwmin;
  1490. u32 cwmax;
  1491. u32 aifs;
  1492. u32 txop;
  1493. u32 acm;
  1494. u32 no_ack;
  1495. };
  1496. struct wmi_pdev_set_wmm_params_arg {
  1497. struct wmi_wmm_params_arg ac_be;
  1498. struct wmi_wmm_params_arg ac_bk;
  1499. struct wmi_wmm_params_arg ac_vi;
  1500. struct wmi_wmm_params_arg ac_vo;
  1501. };
  1502. struct wal_dbg_tx_stats {
  1503. /* Num HTT cookies queued to dispatch list */
  1504. __le32 comp_queued;
  1505. /* Num HTT cookies dispatched */
  1506. __le32 comp_delivered;
  1507. /* Num MSDU queued to WAL */
  1508. __le32 msdu_enqued;
  1509. /* Num MPDU queue to WAL */
  1510. __le32 mpdu_enqued;
  1511. /* Num MSDUs dropped by WMM limit */
  1512. __le32 wmm_drop;
  1513. /* Num Local frames queued */
  1514. __le32 local_enqued;
  1515. /* Num Local frames done */
  1516. __le32 local_freed;
  1517. /* Num queued to HW */
  1518. __le32 hw_queued;
  1519. /* Num PPDU reaped from HW */
  1520. __le32 hw_reaped;
  1521. /* Num underruns */
  1522. __le32 underrun;
  1523. /* Num PPDUs cleaned up in TX abort */
  1524. __le32 tx_abort;
  1525. /* Num MPDUs requed by SW */
  1526. __le32 mpdus_requed;
  1527. /* excessive retries */
  1528. __le32 tx_ko;
  1529. /* data hw rate code */
  1530. __le32 data_rc;
  1531. /* Scheduler self triggers */
  1532. __le32 self_triggers;
  1533. /* frames dropped due to excessive sw retries */
  1534. __le32 sw_retry_failure;
  1535. /* illegal rate phy errors */
  1536. __le32 illgl_rate_phy_err;
  1537. /* wal pdev continous xretry */
  1538. __le32 pdev_cont_xretry;
  1539. /* wal pdev continous xretry */
  1540. __le32 pdev_tx_timeout;
  1541. /* wal pdev resets */
  1542. __le32 pdev_resets;
  1543. __le32 phy_underrun;
  1544. /* MPDU is more than txop limit */
  1545. __le32 txop_ovf;
  1546. } __packed;
  1547. struct wal_dbg_rx_stats {
  1548. /* Cnts any change in ring routing mid-ppdu */
  1549. __le32 mid_ppdu_route_change;
  1550. /* Total number of statuses processed */
  1551. __le32 status_rcvd;
  1552. /* Extra frags on rings 0-3 */
  1553. __le32 r0_frags;
  1554. __le32 r1_frags;
  1555. __le32 r2_frags;
  1556. __le32 r3_frags;
  1557. /* MSDUs / MPDUs delivered to HTT */
  1558. __le32 htt_msdus;
  1559. __le32 htt_mpdus;
  1560. /* MSDUs / MPDUs delivered to local stack */
  1561. __le32 loc_msdus;
  1562. __le32 loc_mpdus;
  1563. /* AMSDUs that have more MSDUs than the status ring size */
  1564. __le32 oversize_amsdu;
  1565. /* Number of PHY errors */
  1566. __le32 phy_errs;
  1567. /* Number of PHY errors drops */
  1568. __le32 phy_err_drop;
  1569. /* Number of mpdu errors - FCS, MIC, ENC etc. */
  1570. __le32 mpdu_errs;
  1571. } __packed;
  1572. struct wal_dbg_peer_stats {
  1573. /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
  1574. __le32 dummy;
  1575. } __packed;
  1576. struct wal_dbg_stats {
  1577. struct wal_dbg_tx_stats tx;
  1578. struct wal_dbg_rx_stats rx;
  1579. struct wal_dbg_peer_stats peer;
  1580. } __packed;
  1581. enum wmi_stats_id {
  1582. WMI_REQUEST_PEER_STAT = 0x01,
  1583. WMI_REQUEST_AP_STAT = 0x02
  1584. };
  1585. struct wmi_request_stats_cmd {
  1586. __le32 stats_id;
  1587. /*
  1588. * Space to add parameters like
  1589. * peer mac addr
  1590. */
  1591. } __packed;
  1592. /* Suspend option */
  1593. enum {
  1594. /* suspend */
  1595. WMI_PDEV_SUSPEND,
  1596. /* suspend and disable all interrupts */
  1597. WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
  1598. };
  1599. struct wmi_pdev_suspend_cmd {
  1600. /* suspend option sent to target */
  1601. __le32 suspend_opt;
  1602. } __packed;
  1603. struct wmi_stats_event {
  1604. __le32 stats_id; /* %WMI_REQUEST_ */
  1605. /*
  1606. * number of pdev stats event structures
  1607. * (wmi_pdev_stats) 0 or 1
  1608. */
  1609. __le32 num_pdev_stats;
  1610. /*
  1611. * number of vdev stats event structures
  1612. * (wmi_vdev_stats) 0 or max vdevs
  1613. */
  1614. __le32 num_vdev_stats;
  1615. /*
  1616. * number of peer stats event structures
  1617. * (wmi_peer_stats) 0 or max peers
  1618. */
  1619. __le32 num_peer_stats;
  1620. __le32 num_bcnflt_stats;
  1621. /*
  1622. * followed by
  1623. * num_pdev_stats * size of(struct wmi_pdev_stats)
  1624. * num_vdev_stats * size of(struct wmi_vdev_stats)
  1625. * num_peer_stats * size of(struct wmi_peer_stats)
  1626. *
  1627. * By having a zero sized array, the pointer to data area
  1628. * becomes available without increasing the struct size
  1629. */
  1630. u8 data[0];
  1631. } __packed;
  1632. /*
  1633. * PDEV statistics
  1634. * TODO: add all PDEV stats here
  1635. */
  1636. struct wmi_pdev_stats {
  1637. __le32 chan_nf; /* Channel noise floor */
  1638. __le32 tx_frame_count; /* TX frame count */
  1639. __le32 rx_frame_count; /* RX frame count */
  1640. __le32 rx_clear_count; /* rx clear count */
  1641. __le32 cycle_count; /* cycle count */
  1642. __le32 phy_err_count; /* Phy error count */
  1643. __le32 chan_tx_pwr; /* channel tx power */
  1644. struct wal_dbg_stats wal; /* WAL dbg stats */
  1645. } __packed;
  1646. /*
  1647. * VDEV statistics
  1648. * TODO: add all VDEV stats here
  1649. */
  1650. struct wmi_vdev_stats {
  1651. __le32 vdev_id;
  1652. } __packed;
  1653. /*
  1654. * peer statistics.
  1655. * TODO: add more stats
  1656. */
  1657. struct wmi_peer_stats {
  1658. struct wmi_mac_addr peer_macaddr;
  1659. __le32 peer_rssi;
  1660. __le32 peer_tx_rate;
  1661. } __packed;
  1662. struct wmi_vdev_create_cmd {
  1663. __le32 vdev_id;
  1664. __le32 vdev_type;
  1665. __le32 vdev_subtype;
  1666. struct wmi_mac_addr vdev_macaddr;
  1667. } __packed;
  1668. enum wmi_vdev_type {
  1669. WMI_VDEV_TYPE_AP = 1,
  1670. WMI_VDEV_TYPE_STA = 2,
  1671. WMI_VDEV_TYPE_IBSS = 3,
  1672. WMI_VDEV_TYPE_MONITOR = 4,
  1673. };
  1674. enum wmi_vdev_subtype {
  1675. WMI_VDEV_SUBTYPE_NONE = 0,
  1676. WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
  1677. WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
  1678. WMI_VDEV_SUBTYPE_P2P_GO = 3,
  1679. };
  1680. /* values for vdev_subtype */
  1681. /* values for vdev_start_request flags */
  1682. /*
  1683. * Indicates that AP VDEV uses hidden ssid. only valid for
  1684. * AP/GO */
  1685. #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
  1686. /*
  1687. * Indicates if robust management frame/management frame
  1688. * protection is enabled. For GO/AP vdevs, it indicates that
  1689. * it may support station/client associations with RMF enabled.
  1690. * For STA/client vdevs, it indicates that sta will
  1691. * associate with AP with RMF enabled. */
  1692. #define WMI_VDEV_START_PMF_ENABLED (1<<1)
  1693. struct wmi_p2p_noa_descriptor {
  1694. __le32 type_count; /* 255: continuous schedule, 0: reserved */
  1695. __le32 duration; /* Absent period duration in micro seconds */
  1696. __le32 interval; /* Absent period interval in micro seconds */
  1697. __le32 start_time; /* 32 bit tsf time when in starts */
  1698. } __packed;
  1699. struct wmi_vdev_start_request_cmd {
  1700. /* WMI channel */
  1701. struct wmi_channel chan;
  1702. /* unique id identifying the VDEV, generated by the caller */
  1703. __le32 vdev_id;
  1704. /* requestor id identifying the caller module */
  1705. __le32 requestor_id;
  1706. /* beacon interval from received beacon */
  1707. __le32 beacon_interval;
  1708. /* DTIM Period from the received beacon */
  1709. __le32 dtim_period;
  1710. /* Flags */
  1711. __le32 flags;
  1712. /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  1713. struct wmi_ssid ssid;
  1714. /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
  1715. __le32 bcn_tx_rate;
  1716. /* beacon/probe reponse xmit power. Applicable for SoftAP. */
  1717. __le32 bcn_tx_power;
  1718. /* number of p2p NOA descriptor(s) from scan entry */
  1719. __le32 num_noa_descriptors;
  1720. /*
  1721. * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  1722. * During CAC, Our HW shouldn't ack ditected frames
  1723. */
  1724. __le32 disable_hw_ack;
  1725. /* actual p2p NOA descriptor from scan entry */
  1726. struct wmi_p2p_noa_descriptor noa_descriptors[2];
  1727. } __packed;
  1728. struct wmi_vdev_restart_request_cmd {
  1729. struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
  1730. } __packed;
  1731. struct wmi_vdev_start_request_arg {
  1732. u32 vdev_id;
  1733. struct wmi_channel_arg channel;
  1734. u32 bcn_intval;
  1735. u32 dtim_period;
  1736. u8 *ssid;
  1737. u32 ssid_len;
  1738. u32 bcn_tx_rate;
  1739. u32 bcn_tx_power;
  1740. bool disable_hw_ack;
  1741. bool hidden_ssid;
  1742. bool pmf_enabled;
  1743. };
  1744. struct wmi_vdev_delete_cmd {
  1745. /* unique id identifying the VDEV, generated by the caller */
  1746. __le32 vdev_id;
  1747. } __packed;
  1748. struct wmi_vdev_up_cmd {
  1749. __le32 vdev_id;
  1750. __le32 vdev_assoc_id;
  1751. struct wmi_mac_addr vdev_bssid;
  1752. } __packed;
  1753. struct wmi_vdev_stop_cmd {
  1754. __le32 vdev_id;
  1755. } __packed;
  1756. struct wmi_vdev_down_cmd {
  1757. __le32 vdev_id;
  1758. } __packed;
  1759. struct wmi_vdev_standby_response_cmd {
  1760. /* unique id identifying the VDEV, generated by the caller */
  1761. __le32 vdev_id;
  1762. } __packed;
  1763. struct wmi_vdev_resume_response_cmd {
  1764. /* unique id identifying the VDEV, generated by the caller */
  1765. __le32 vdev_id;
  1766. } __packed;
  1767. struct wmi_vdev_set_param_cmd {
  1768. __le32 vdev_id;
  1769. __le32 param_id;
  1770. __le32 param_value;
  1771. } __packed;
  1772. #define WMI_MAX_KEY_INDEX 3
  1773. #define WMI_MAX_KEY_LEN 32
  1774. #define WMI_KEY_PAIRWISE 0x00
  1775. #define WMI_KEY_GROUP 0x01
  1776. #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
  1777. struct wmi_key_seq_counter {
  1778. __le32 key_seq_counter_l;
  1779. __le32 key_seq_counter_h;
  1780. } __packed;
  1781. #define WMI_CIPHER_NONE 0x0 /* clear key */
  1782. #define WMI_CIPHER_WEP 0x1
  1783. #define WMI_CIPHER_TKIP 0x2
  1784. #define WMI_CIPHER_AES_OCB 0x3
  1785. #define WMI_CIPHER_AES_CCM 0x4
  1786. #define WMI_CIPHER_WAPI 0x5
  1787. #define WMI_CIPHER_CKIP 0x6
  1788. #define WMI_CIPHER_AES_CMAC 0x7
  1789. struct wmi_vdev_install_key_cmd {
  1790. __le32 vdev_id;
  1791. struct wmi_mac_addr peer_macaddr;
  1792. __le32 key_idx;
  1793. __le32 key_flags;
  1794. __le32 key_cipher; /* %WMI_CIPHER_ */
  1795. struct wmi_key_seq_counter key_rsc_counter;
  1796. struct wmi_key_seq_counter key_global_rsc_counter;
  1797. struct wmi_key_seq_counter key_tsc_counter;
  1798. u8 wpi_key_rsc_counter[16];
  1799. u8 wpi_key_tsc_counter[16];
  1800. __le32 key_len;
  1801. __le32 key_txmic_len;
  1802. __le32 key_rxmic_len;
  1803. /* contains key followed by tx mic followed by rx mic */
  1804. u8 key_data[0];
  1805. } __packed;
  1806. struct wmi_vdev_install_key_arg {
  1807. u32 vdev_id;
  1808. const u8 *macaddr;
  1809. u32 key_idx;
  1810. u32 key_flags;
  1811. u32 key_cipher;
  1812. u32 key_len;
  1813. u32 key_txmic_len;
  1814. u32 key_rxmic_len;
  1815. const void *key_data;
  1816. };
  1817. /* Preamble types to be used with VDEV fixed rate configuration */
  1818. enum wmi_rate_preamble {
  1819. WMI_RATE_PREAMBLE_OFDM,
  1820. WMI_RATE_PREAMBLE_CCK,
  1821. WMI_RATE_PREAMBLE_HT,
  1822. WMI_RATE_PREAMBLE_VHT,
  1823. };
  1824. /* Value to disable fixed rate setting */
  1825. #define WMI_FIXED_RATE_NONE (0xff)
  1826. /* the definition of different VDEV parameters */
  1827. enum wmi_vdev_param {
  1828. /* RTS Threshold */
  1829. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  1830. /* Fragmentation threshold */
  1831. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  1832. /* beacon interval in TUs */
  1833. WMI_VDEV_PARAM_BEACON_INTERVAL,
  1834. /* Listen interval in TUs */
  1835. WMI_VDEV_PARAM_LISTEN_INTERVAL,
  1836. /* muticast rate in Mbps */
  1837. WMI_VDEV_PARAM_MULTICAST_RATE,
  1838. /* management frame rate in Mbps */
  1839. WMI_VDEV_PARAM_MGMT_TX_RATE,
  1840. /* slot time (long vs short) */
  1841. WMI_VDEV_PARAM_SLOT_TIME,
  1842. /* preamble (long vs short) */
  1843. WMI_VDEV_PARAM_PREAMBLE,
  1844. /* SWBA time (time before tbtt in msec) */
  1845. WMI_VDEV_PARAM_SWBA_TIME,
  1846. /* time period for updating VDEV stats */
  1847. WMI_VDEV_STATS_UPDATE_PERIOD,
  1848. /* age out time in msec for frames queued for station in power save */
  1849. WMI_VDEV_PWRSAVE_AGEOUT_TIME,
  1850. /*
  1851. * Host SWBA interval (time in msec before tbtt for SWBA event
  1852. * generation).
  1853. */
  1854. WMI_VDEV_HOST_SWBA_INTERVAL,
  1855. /* DTIM period (specified in units of num beacon intervals) */
  1856. WMI_VDEV_PARAM_DTIM_PERIOD,
  1857. /*
  1858. * scheduler air time limit for this VDEV. used by off chan
  1859. * scheduler.
  1860. */
  1861. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  1862. /* enable/dsiable WDS for this VDEV */
  1863. WMI_VDEV_PARAM_WDS,
  1864. /* ATIM Window */
  1865. WMI_VDEV_PARAM_ATIM_WINDOW,
  1866. /* BMISS max */
  1867. WMI_VDEV_PARAM_BMISS_COUNT_MAX,
  1868. /* BMISS first time */
  1869. WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
  1870. /* BMISS final time */
  1871. WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
  1872. /* WMM enables/disabled */
  1873. WMI_VDEV_PARAM_FEATURE_WMM,
  1874. /* Channel width */
  1875. WMI_VDEV_PARAM_CHWIDTH,
  1876. /* Channel Offset */
  1877. WMI_VDEV_PARAM_CHEXTOFFSET,
  1878. /* Disable HT Protection */
  1879. WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
  1880. /* Quick STA Kickout */
  1881. WMI_VDEV_PARAM_STA_QUICKKICKOUT,
  1882. /* Rate to be used with Management frames */
  1883. WMI_VDEV_PARAM_MGMT_RATE,
  1884. /* Protection Mode */
  1885. WMI_VDEV_PARAM_PROTECTION_MODE,
  1886. /* Fixed rate setting */
  1887. WMI_VDEV_PARAM_FIXED_RATE,
  1888. /* Short GI Enable/Disable */
  1889. WMI_VDEV_PARAM_SGI,
  1890. /* Enable LDPC */
  1891. WMI_VDEV_PARAM_LDPC,
  1892. /* Enable Tx STBC */
  1893. WMI_VDEV_PARAM_TX_STBC,
  1894. /* Enable Rx STBC */
  1895. WMI_VDEV_PARAM_RX_STBC,
  1896. /* Intra BSS forwarding */
  1897. WMI_VDEV_PARAM_INTRA_BSS_FWD,
  1898. /* Setting Default xmit key for Vdev */
  1899. WMI_VDEV_PARAM_DEF_KEYID,
  1900. /* NSS width */
  1901. WMI_VDEV_PARAM_NSS,
  1902. /* Set the custom rate for the broadcast data frames */
  1903. WMI_VDEV_PARAM_BCAST_DATA_RATE,
  1904. /* Set the custom rate (rate-code) for multicast data frames */
  1905. WMI_VDEV_PARAM_MCAST_DATA_RATE,
  1906. /* Tx multicast packet indicate Enable/Disable */
  1907. WMI_VDEV_PARAM_MCAST_INDICATE,
  1908. /* Tx DHCP packet indicate Enable/Disable */
  1909. WMI_VDEV_PARAM_DHCP_INDICATE,
  1910. /* Enable host inspection of Tx unicast packet to unknown destination */
  1911. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  1912. /* The minimum amount of time AP begins to consider STA inactive */
  1913. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  1914. /*
  1915. * An associated STA is considered inactive when there is no recent
  1916. * TX/RX activity and no downlink frames are buffered for it. Once a
  1917. * STA exceeds the maximum idle inactive time, the AP will send an
  1918. * 802.11 data-null as a keep alive to verify the STA is still
  1919. * associated. If the STA does ACK the data-null, or if the data-null
  1920. * is buffered and the STA does not retrieve it, the STA will be
  1921. * considered unresponsive
  1922. * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
  1923. */
  1924. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  1925. /*
  1926. * An associated STA is considered unresponsive if there is no recent
  1927. * TX/RX activity and downlink frames are buffered for it. Once a STA
  1928. * exceeds the maximum unresponsive time, the AP will send a
  1929. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  1930. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  1931. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  1932. WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
  1933. /* Enable/Disable RTS-CTS */
  1934. WMI_VDEV_PARAM_ENABLE_RTSCTS,
  1935. /* Enable TXBFee/er */
  1936. WMI_VDEV_PARAM_TXBF,
  1937. /* Set packet power save */
  1938. WMI_VDEV_PARAM_PACKET_POWERSAVE,
  1939. /*
  1940. * Drops un-encrypted packets if eceived in an encrypted connection
  1941. * otherwise forwards to host.
  1942. */
  1943. WMI_VDEV_PARAM_DROP_UNENCRY,
  1944. /*
  1945. * Set the encapsulation type for frames.
  1946. */
  1947. WMI_VDEV_PARAM_TX_ENCAP_TYPE,
  1948. };
  1949. /* slot time long */
  1950. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  1951. /* slot time short */
  1952. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  1953. /* preablbe long */
  1954. #define WMI_VDEV_PREAMBLE_LONG 0x1
  1955. /* preablbe short */
  1956. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  1957. enum wmi_start_event_param {
  1958. WMI_VDEV_RESP_START_EVENT = 0,
  1959. WMI_VDEV_RESP_RESTART_EVENT,
  1960. };
  1961. struct wmi_vdev_start_response_event {
  1962. __le32 vdev_id;
  1963. __le32 req_id;
  1964. __le32 resp_type; /* %WMI_VDEV_RESP_ */
  1965. __le32 status;
  1966. } __packed;
  1967. struct wmi_vdev_standby_req_event {
  1968. /* unique id identifying the VDEV, generated by the caller */
  1969. __le32 vdev_id;
  1970. } __packed;
  1971. struct wmi_vdev_resume_req_event {
  1972. /* unique id identifying the VDEV, generated by the caller */
  1973. __le32 vdev_id;
  1974. } __packed;
  1975. struct wmi_vdev_stopped_event {
  1976. /* unique id identifying the VDEV, generated by the caller */
  1977. __le32 vdev_id;
  1978. } __packed;
  1979. /*
  1980. * common structure used for simple events
  1981. * (stopped, resume_req, standby response)
  1982. */
  1983. struct wmi_vdev_simple_event {
  1984. /* unique id identifying the VDEV, generated by the caller */
  1985. __le32 vdev_id;
  1986. } __packed;
  1987. /* VDEV start response status codes */
  1988. /* VDEV succesfully started */
  1989. #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
  1990. /* requested VDEV not found */
  1991. #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
  1992. /* unsupported VDEV combination */
  1993. #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
  1994. /* Beacon processing related command and event structures */
  1995. struct wmi_bcn_tx_hdr {
  1996. __le32 vdev_id;
  1997. __le32 tx_rate;
  1998. __le32 tx_power;
  1999. __le32 bcn_len;
  2000. } __packed;
  2001. struct wmi_bcn_tx_cmd {
  2002. struct wmi_bcn_tx_hdr hdr;
  2003. u8 *bcn[0];
  2004. } __packed;
  2005. struct wmi_bcn_tx_arg {
  2006. u32 vdev_id;
  2007. u32 tx_rate;
  2008. u32 tx_power;
  2009. u32 bcn_len;
  2010. const void *bcn;
  2011. };
  2012. /* Beacon filter */
  2013. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  2014. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  2015. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  2016. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  2017. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  2018. struct wmi_bcn_filter_rx_cmd {
  2019. /* Filter ID */
  2020. __le32 bcn_filter_id;
  2021. /* Filter type - wmi_bcn_filter */
  2022. __le32 bcn_filter;
  2023. /* Buffer len */
  2024. __le32 bcn_filter_len;
  2025. /* Filter info (threshold, BSSID, RSSI) */
  2026. u8 *bcn_filter_buf;
  2027. } __packed;
  2028. /* Capabilities and IEs to be passed to firmware */
  2029. struct wmi_bcn_prb_info {
  2030. /* Capabilities */
  2031. __le32 caps;
  2032. /* ERP info */
  2033. __le32 erp;
  2034. /* Advanced capabilities */
  2035. /* HT capabilities */
  2036. /* HT Info */
  2037. /* ibss_dfs */
  2038. /* wpa Info */
  2039. /* rsn Info */
  2040. /* rrm info */
  2041. /* ath_ext */
  2042. /* app IE */
  2043. } __packed;
  2044. struct wmi_bcn_tmpl_cmd {
  2045. /* unique id identifying the VDEV, generated by the caller */
  2046. __le32 vdev_id;
  2047. /* TIM IE offset from the beginning of the template. */
  2048. __le32 tim_ie_offset;
  2049. /* beacon probe capabilities and IEs */
  2050. struct wmi_bcn_prb_info bcn_prb_info;
  2051. /* beacon buffer length */
  2052. __le32 buf_len;
  2053. /* variable length data */
  2054. u8 data[1];
  2055. } __packed;
  2056. struct wmi_prb_tmpl_cmd {
  2057. /* unique id identifying the VDEV, generated by the caller */
  2058. __le32 vdev_id;
  2059. /* beacon probe capabilities and IEs */
  2060. struct wmi_bcn_prb_info bcn_prb_info;
  2061. /* beacon buffer length */
  2062. __le32 buf_len;
  2063. /* Variable length data */
  2064. u8 data[1];
  2065. } __packed;
  2066. enum wmi_sta_ps_mode {
  2067. /* enable power save for the given STA VDEV */
  2068. WMI_STA_PS_MODE_DISABLED = 0,
  2069. /* disable power save for a given STA VDEV */
  2070. WMI_STA_PS_MODE_ENABLED = 1,
  2071. };
  2072. struct wmi_sta_powersave_mode_cmd {
  2073. /* unique id identifying the VDEV, generated by the caller */
  2074. __le32 vdev_id;
  2075. /*
  2076. * Power save mode
  2077. * (see enum wmi_sta_ps_mode)
  2078. */
  2079. __le32 sta_ps_mode;
  2080. } __packed;
  2081. enum wmi_csa_offload_en {
  2082. WMI_CSA_OFFLOAD_DISABLE = 0,
  2083. WMI_CSA_OFFLOAD_ENABLE = 1,
  2084. };
  2085. struct wmi_csa_offload_enable_cmd {
  2086. __le32 vdev_id;
  2087. __le32 csa_offload_enable;
  2088. } __packed;
  2089. struct wmi_csa_offload_chanswitch_cmd {
  2090. __le32 vdev_id;
  2091. struct wmi_channel chan;
  2092. } __packed;
  2093. /*
  2094. * This parameter controls the policy for retrieving frames from AP while the
  2095. * STA is in sleep state.
  2096. *
  2097. * Only takes affect if the sta_ps_mode is enabled
  2098. */
  2099. enum wmi_sta_ps_param_rx_wake_policy {
  2100. /*
  2101. * Wake up when ever there is an RX activity on the VDEV. In this mode
  2102. * the Power save SM(state machine) will come out of sleep by either
  2103. * sending null frame (or) a data frame (with PS==0) in response to TIM
  2104. * bit set in the received beacon frame from AP.
  2105. */
  2106. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  2107. /*
  2108. * Here the power save state machine will not wakeup in response to TIM
  2109. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  2110. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  2111. * access categories are delivery-enabled, the station will send a
  2112. * UAPSD trigger frame, otherwise it will send a PS-Poll.
  2113. */
  2114. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  2115. };
  2116. /*
  2117. * Number of tx frames/beacon that cause the power save SM to wake up.
  2118. *
  2119. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  2120. * meaning, It will cause the SM to never wake up. This is useful if you want
  2121. * to keep the system to sleep all the time for some kind of test mode . host
  2122. * can change this parameter any time. It will affect at the next tx frame.
  2123. */
  2124. enum wmi_sta_ps_param_tx_wake_threshold {
  2125. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  2126. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  2127. /*
  2128. * Values greater than one indicate that many TX attempts per beacon
  2129. * interval before the STA will wake up
  2130. */
  2131. };
  2132. /*
  2133. * The maximum number of PS-Poll frames the FW will send in response to
  2134. * traffic advertised in TIM before waking up (by sending a null frame with PS
  2135. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  2136. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  2137. * parameter is used when the RX wake policy is
  2138. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  2139. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  2140. */
  2141. enum wmi_sta_ps_param_pspoll_count {
  2142. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  2143. /*
  2144. * Values greater than 0 indicate the maximum numer of PS-Poll frames
  2145. * FW will send before waking up.
  2146. */
  2147. };
  2148. /*
  2149. * This will include the delivery and trigger enabled state for every AC.
  2150. * This is the negotiated state with AP. The host MLME needs to set this based
  2151. * on AP capability and the state Set in the association request by the
  2152. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  2153. */
  2154. #define WMI_UAPSD_AC_TYPE_DELI 0
  2155. #define WMI_UAPSD_AC_TYPE_TRIG 1
  2156. #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
  2157. ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
  2158. enum wmi_sta_ps_param_uapsd {
  2159. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  2160. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  2161. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  2162. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  2163. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  2164. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  2165. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  2166. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  2167. };
  2168. enum wmi_sta_powersave_param {
  2169. /*
  2170. * Controls how frames are retrievd from AP while STA is sleeping
  2171. *
  2172. * (see enum wmi_sta_ps_param_rx_wake_policy)
  2173. */
  2174. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  2175. /*
  2176. * The STA will go active after this many TX
  2177. *
  2178. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  2179. */
  2180. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  2181. /*
  2182. * Number of PS-Poll to send before STA wakes up
  2183. *
  2184. * (see enum wmi_sta_ps_param_pspoll_count)
  2185. *
  2186. */
  2187. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  2188. /*
  2189. * TX/RX inactivity time in msec before going to sleep.
  2190. *
  2191. * The power save SM will monitor tx/rx activity on the VDEV, if no
  2192. * activity for the specified msec of the parameter the Power save
  2193. * SM will go to sleep.
  2194. */
  2195. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  2196. /*
  2197. * Set uapsd configuration.
  2198. *
  2199. * (see enum wmi_sta_ps_param_uapsd)
  2200. */
  2201. WMI_STA_PS_PARAM_UAPSD = 4,
  2202. };
  2203. struct wmi_sta_powersave_param_cmd {
  2204. __le32 vdev_id;
  2205. __le32 param_id; /* %WMI_STA_PS_PARAM_ */
  2206. __le32 param_value;
  2207. } __packed;
  2208. /* No MIMO power save */
  2209. #define WMI_STA_MIMO_PS_MODE_DISABLE
  2210. /* mimo powersave mode static*/
  2211. #define WMI_STA_MIMO_PS_MODE_STATIC
  2212. /* mimo powersave mode dynamic */
  2213. #define WMI_STA_MIMO_PS_MODE_DYNAMIC
  2214. struct wmi_sta_mimo_ps_mode_cmd {
  2215. /* unique id identifying the VDEV, generated by the caller */
  2216. __le32 vdev_id;
  2217. /* mimo powersave mode as defined above */
  2218. __le32 mimo_pwrsave_mode;
  2219. } __packed;
  2220. /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
  2221. enum wmi_ap_ps_param_uapsd {
  2222. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  2223. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  2224. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  2225. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  2226. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  2227. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  2228. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  2229. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  2230. };
  2231. /* U-APSD maximum service period of peer station */
  2232. enum wmi_ap_ps_peer_param_max_sp {
  2233. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  2234. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  2235. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  2236. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  2237. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  2238. };
  2239. /*
  2240. * AP power save parameter
  2241. * Set a power save specific parameter for a peer station
  2242. */
  2243. enum wmi_ap_ps_peer_param {
  2244. /* Set uapsd configuration for a given peer.
  2245. *
  2246. * Include the delivery and trigger enabled state for every AC.
  2247. * The host MLME needs to set this based on AP capability and stations
  2248. * request Set in the association request received from the station.
  2249. *
  2250. * Lower 8 bits of the value specify the UAPSD configuration.
  2251. *
  2252. * (see enum wmi_ap_ps_param_uapsd)
  2253. * The default value is 0.
  2254. */
  2255. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  2256. /*
  2257. * Set the service period for a UAPSD capable station
  2258. *
  2259. * The service period from wme ie in the (re)assoc request frame.
  2260. *
  2261. * (see enum wmi_ap_ps_peer_param_max_sp)
  2262. */
  2263. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  2264. /* Time in seconds for aging out buffered frames for STA in PS */
  2265. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  2266. };
  2267. struct wmi_ap_ps_peer_cmd {
  2268. /* unique id identifying the VDEV, generated by the caller */
  2269. __le32 vdev_id;
  2270. /* peer MAC address */
  2271. struct wmi_mac_addr peer_macaddr;
  2272. /* AP powersave param (see enum wmi_ap_ps_peer_param) */
  2273. __le32 param_id;
  2274. /* AP powersave param value */
  2275. __le32 param_value;
  2276. } __packed;
  2277. /* 128 clients = 4 words */
  2278. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  2279. struct wmi_tim_info {
  2280. __le32 tim_len;
  2281. __le32 tim_mcast;
  2282. __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  2283. __le32 tim_changed;
  2284. __le32 tim_num_ps_pending;
  2285. } __packed;
  2286. /* Maximum number of NOA Descriptors supported */
  2287. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
  2288. #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
  2289. #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
  2290. #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
  2291. struct wmi_p2p_noa_info {
  2292. /* Bit 0 - Flag to indicate an update in NOA schedule
  2293. Bits 7-1 - Reserved */
  2294. u8 changed;
  2295. /* NOA index */
  2296. u8 index;
  2297. /* Bit 0 - Opp PS state of the AP
  2298. Bits 1-7 - Ctwindow in TUs */
  2299. u8 ctwindow_oppps;
  2300. /* Number of NOA descriptors */
  2301. u8 num_descriptors;
  2302. struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  2303. } __packed;
  2304. struct wmi_bcn_info {
  2305. struct wmi_tim_info tim_info;
  2306. struct wmi_p2p_noa_info p2p_noa_info;
  2307. } __packed;
  2308. struct wmi_host_swba_event {
  2309. __le32 vdev_map;
  2310. struct wmi_bcn_info bcn_info[1];
  2311. } __packed;
  2312. #define WMI_MAX_AP_VDEV 16
  2313. struct wmi_tbtt_offset_event {
  2314. __le32 vdev_map;
  2315. __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
  2316. } __packed;
  2317. struct wmi_peer_create_cmd {
  2318. __le32 vdev_id;
  2319. struct wmi_mac_addr peer_macaddr;
  2320. } __packed;
  2321. struct wmi_peer_delete_cmd {
  2322. __le32 vdev_id;
  2323. struct wmi_mac_addr peer_macaddr;
  2324. } __packed;
  2325. struct wmi_peer_flush_tids_cmd {
  2326. __le32 vdev_id;
  2327. struct wmi_mac_addr peer_macaddr;
  2328. __le32 peer_tid_bitmap;
  2329. } __packed;
  2330. struct wmi_fixed_rate {
  2331. /*
  2332. * rate mode . 0: disable fixed rate (auto rate)
  2333. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  2334. * 2: ht20 11n rate specified as mcs index
  2335. * 3: ht40 11n rate specified as mcs index
  2336. */
  2337. __le32 rate_mode;
  2338. /*
  2339. * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  2340. * and series 3 is stored at byte 3 (MSB)
  2341. */
  2342. __le32 rate_series;
  2343. /*
  2344. * 4 retry counts for 4 rate series. retry count for rate 0 is stored
  2345. * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
  2346. * (MSB)
  2347. */
  2348. __le32 rate_retries;
  2349. } __packed;
  2350. struct wmi_peer_fixed_rate_cmd {
  2351. /* unique id identifying the VDEV, generated by the caller */
  2352. __le32 vdev_id;
  2353. /* peer MAC address */
  2354. struct wmi_mac_addr peer_macaddr;
  2355. /* fixed rate */
  2356. struct wmi_fixed_rate peer_fixed_rate;
  2357. } __packed;
  2358. #define WMI_MGMT_TID 17
  2359. struct wmi_addba_clear_resp_cmd {
  2360. /* unique id identifying the VDEV, generated by the caller */
  2361. __le32 vdev_id;
  2362. /* peer MAC address */
  2363. struct wmi_mac_addr peer_macaddr;
  2364. } __packed;
  2365. struct wmi_addba_send_cmd {
  2366. /* unique id identifying the VDEV, generated by the caller */
  2367. __le32 vdev_id;
  2368. /* peer MAC address */
  2369. struct wmi_mac_addr peer_macaddr;
  2370. /* Tid number */
  2371. __le32 tid;
  2372. /* Buffer/Window size*/
  2373. __le32 buffersize;
  2374. } __packed;
  2375. struct wmi_delba_send_cmd {
  2376. /* unique id identifying the VDEV, generated by the caller */
  2377. __le32 vdev_id;
  2378. /* peer MAC address */
  2379. struct wmi_mac_addr peer_macaddr;
  2380. /* Tid number */
  2381. __le32 tid;
  2382. /* Is Initiator */
  2383. __le32 initiator;
  2384. /* Reason code */
  2385. __le32 reasoncode;
  2386. } __packed;
  2387. struct wmi_addba_setresponse_cmd {
  2388. /* unique id identifying the vdev, generated by the caller */
  2389. __le32 vdev_id;
  2390. /* peer mac address */
  2391. struct wmi_mac_addr peer_macaddr;
  2392. /* Tid number */
  2393. __le32 tid;
  2394. /* status code */
  2395. __le32 statuscode;
  2396. } __packed;
  2397. struct wmi_send_singleamsdu_cmd {
  2398. /* unique id identifying the vdev, generated by the caller */
  2399. __le32 vdev_id;
  2400. /* peer mac address */
  2401. struct wmi_mac_addr peer_macaddr;
  2402. /* Tid number */
  2403. __le32 tid;
  2404. } __packed;
  2405. enum wmi_peer_smps_state {
  2406. WMI_PEER_SMPS_PS_NONE = 0x0,
  2407. WMI_PEER_SMPS_STATIC = 0x1,
  2408. WMI_PEER_SMPS_DYNAMIC = 0x2
  2409. };
  2410. enum wmi_peer_param {
  2411. WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
  2412. WMI_PEER_AMPDU = 0x2,
  2413. WMI_PEER_AUTHORIZE = 0x3,
  2414. WMI_PEER_CHAN_WIDTH = 0x4,
  2415. WMI_PEER_NSS = 0x5,
  2416. WMI_PEER_USE_4ADDR = 0x6
  2417. };
  2418. struct wmi_peer_set_param_cmd {
  2419. __le32 vdev_id;
  2420. struct wmi_mac_addr peer_macaddr;
  2421. __le32 param_id;
  2422. __le32 param_value;
  2423. } __packed;
  2424. #define MAX_SUPPORTED_RATES 128
  2425. struct wmi_rate_set {
  2426. /* total number of rates */
  2427. __le32 num_rates;
  2428. /*
  2429. * rates (each 8bit value) packed into a 32 bit word.
  2430. * the rates are filled from least significant byte to most
  2431. * significant byte.
  2432. */
  2433. __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
  2434. } __packed;
  2435. struct wmi_rate_set_arg {
  2436. unsigned int num_rates;
  2437. u8 rates[MAX_SUPPORTED_RATES];
  2438. };
  2439. /*
  2440. * NOTE: It would bea good idea to represent the Tx MCS
  2441. * info in one word and Rx in another word. This is split
  2442. * into multiple words for convenience
  2443. */
  2444. struct wmi_vht_rate_set {
  2445. __le32 rx_max_rate; /* Max Rx data rate */
  2446. __le32 rx_mcs_set; /* Negotiated RX VHT rates */
  2447. __le32 tx_max_rate; /* Max Tx data rate */
  2448. __le32 tx_mcs_set; /* Negotiated TX VHT rates */
  2449. } __packed;
  2450. struct wmi_vht_rate_set_arg {
  2451. u32 rx_max_rate;
  2452. u32 rx_mcs_set;
  2453. u32 tx_max_rate;
  2454. u32 tx_mcs_set;
  2455. };
  2456. struct wmi_peer_set_rates_cmd {
  2457. /* peer MAC address */
  2458. struct wmi_mac_addr peer_macaddr;
  2459. /* legacy rate set */
  2460. struct wmi_rate_set peer_legacy_rates;
  2461. /* ht rate set */
  2462. struct wmi_rate_set peer_ht_rates;
  2463. } __packed;
  2464. struct wmi_peer_set_q_empty_callback_cmd {
  2465. /* unique id identifying the VDEV, generated by the caller */
  2466. __le32 vdev_id;
  2467. /* peer MAC address */
  2468. struct wmi_mac_addr peer_macaddr;
  2469. __le32 callback_enable;
  2470. } __packed;
  2471. #define WMI_PEER_AUTH 0x00000001
  2472. #define WMI_PEER_QOS 0x00000002
  2473. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004
  2474. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010
  2475. #define WMI_PEER_APSD 0x00000800
  2476. #define WMI_PEER_HT 0x00001000
  2477. #define WMI_PEER_40MHZ 0x00002000
  2478. #define WMI_PEER_STBC 0x00008000
  2479. #define WMI_PEER_LDPC 0x00010000
  2480. #define WMI_PEER_DYN_MIMOPS 0x00020000
  2481. #define WMI_PEER_STATIC_MIMOPS 0x00040000
  2482. #define WMI_PEER_SPATIAL_MUX 0x00200000
  2483. #define WMI_PEER_VHT 0x02000000
  2484. #define WMI_PEER_80MHZ 0x04000000
  2485. #define WMI_PEER_PMF 0x08000000
  2486. /*
  2487. * Peer rate capabilities.
  2488. *
  2489. * This is of interest to the ratecontrol
  2490. * module which resides in the firmware. The bit definitions are
  2491. * consistent with that defined in if_athrate.c.
  2492. */
  2493. #define WMI_RC_DS_FLAG 0x01
  2494. #define WMI_RC_CW40_FLAG 0x02
  2495. #define WMI_RC_SGI_FLAG 0x04
  2496. #define WMI_RC_HT_FLAG 0x08
  2497. #define WMI_RC_RTSCTS_FLAG 0x10
  2498. #define WMI_RC_TX_STBC_FLAG 0x20
  2499. #define WMI_RC_RX_STBC_FLAG 0xC0
  2500. #define WMI_RC_RX_STBC_FLAG_S 6
  2501. #define WMI_RC_WEP_TKIP_FLAG 0x100
  2502. #define WMI_RC_TS_FLAG 0x200
  2503. #define WMI_RC_UAPSD_FLAG 0x400
  2504. /* Maximum listen interval supported by hw in units of beacon interval */
  2505. #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
  2506. struct wmi_peer_assoc_complete_cmd {
  2507. struct wmi_mac_addr peer_macaddr;
  2508. __le32 vdev_id;
  2509. __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
  2510. __le32 peer_associd; /* 16 LSBs */
  2511. __le32 peer_flags;
  2512. __le32 peer_caps; /* 16 LSBs */
  2513. __le32 peer_listen_intval;
  2514. __le32 peer_ht_caps;
  2515. __le32 peer_max_mpdu;
  2516. __le32 peer_mpdu_density; /* 0..16 */
  2517. __le32 peer_rate_caps;
  2518. struct wmi_rate_set peer_legacy_rates;
  2519. struct wmi_rate_set peer_ht_rates;
  2520. __le32 peer_nss; /* num of spatial streams */
  2521. __le32 peer_vht_caps;
  2522. __le32 peer_phymode;
  2523. struct wmi_vht_rate_set peer_vht_rates;
  2524. /* HT Operation Element of the peer. Five bytes packed in 2
  2525. * INT32 array and filled from lsb to msb. */
  2526. __le32 peer_ht_info[2];
  2527. } __packed;
  2528. struct wmi_peer_assoc_complete_arg {
  2529. u8 addr[ETH_ALEN];
  2530. u32 vdev_id;
  2531. bool peer_reassoc;
  2532. u16 peer_aid;
  2533. u32 peer_flags; /* see %WMI_PEER_ */
  2534. u16 peer_caps;
  2535. u32 peer_listen_intval;
  2536. u32 peer_ht_caps;
  2537. u32 peer_max_mpdu;
  2538. u32 peer_mpdu_density; /* 0..16 */
  2539. u32 peer_rate_caps; /* see %WMI_RC_ */
  2540. struct wmi_rate_set_arg peer_legacy_rates;
  2541. struct wmi_rate_set_arg peer_ht_rates;
  2542. u32 peer_num_spatial_streams;
  2543. u32 peer_vht_caps;
  2544. enum wmi_phy_mode peer_phymode;
  2545. struct wmi_vht_rate_set_arg peer_vht_rates;
  2546. };
  2547. struct wmi_peer_add_wds_entry_cmd {
  2548. /* peer MAC address */
  2549. struct wmi_mac_addr peer_macaddr;
  2550. /* wds MAC addr */
  2551. struct wmi_mac_addr wds_macaddr;
  2552. } __packed;
  2553. struct wmi_peer_remove_wds_entry_cmd {
  2554. /* wds MAC addr */
  2555. struct wmi_mac_addr wds_macaddr;
  2556. } __packed;
  2557. struct wmi_peer_q_empty_callback_event {
  2558. /* peer MAC address */
  2559. struct wmi_mac_addr peer_macaddr;
  2560. } __packed;
  2561. /*
  2562. * Channel info WMI event
  2563. */
  2564. struct wmi_chan_info_event {
  2565. __le32 err_code;
  2566. __le32 freq;
  2567. __le32 cmd_flags;
  2568. __le32 noise_floor;
  2569. __le32 rx_clear_count;
  2570. __le32 cycle_count;
  2571. } __packed;
  2572. #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
  2573. /* FIXME: empirically extrapolated */
  2574. #define WMI_CHAN_INFO_MSEC(x) ((x) / 76595)
  2575. /* Beacon filter wmi command info */
  2576. #define BCN_FLT_MAX_SUPPORTED_IES 256
  2577. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
  2578. struct bss_bcn_stats {
  2579. __le32 vdev_id;
  2580. __le32 bss_bcnsdropped;
  2581. __le32 bss_bcnsdelivered;
  2582. } __packed;
  2583. struct bcn_filter_stats {
  2584. __le32 bcns_dropped;
  2585. __le32 bcns_delivered;
  2586. __le32 activefilters;
  2587. struct bss_bcn_stats bss_stats;
  2588. } __packed;
  2589. struct wmi_add_bcn_filter_cmd {
  2590. u32 vdev_id;
  2591. u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  2592. } __packed;
  2593. enum wmi_sta_keepalive_method {
  2594. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
  2595. WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
  2596. };
  2597. /* note: ip4 addresses are in network byte order, i.e. big endian */
  2598. struct wmi_sta_keepalive_arp_resp {
  2599. __be32 src_ip4_addr;
  2600. __be32 dest_ip4_addr;
  2601. struct wmi_mac_addr dest_mac_addr;
  2602. } __packed;
  2603. struct wmi_sta_keepalive_cmd {
  2604. __le32 vdev_id;
  2605. __le32 enabled;
  2606. __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
  2607. __le32 interval; /* in seconds */
  2608. struct wmi_sta_keepalive_arp_resp arp_resp;
  2609. } __packed;
  2610. enum wmi_force_fw_hang_type {
  2611. WMI_FORCE_FW_HANG_ASSERT = 1,
  2612. WMI_FORCE_FW_HANG_NO_DETECT,
  2613. WMI_FORCE_FW_HANG_CTRL_EP_FULL,
  2614. WMI_FORCE_FW_HANG_EMPTY_POINT,
  2615. WMI_FORCE_FW_HANG_STACK_OVERFLOW,
  2616. WMI_FORCE_FW_HANG_INFINITE_LOOP,
  2617. };
  2618. #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
  2619. struct wmi_force_fw_hang_cmd {
  2620. __le32 type;
  2621. __le32 delay_ms;
  2622. } __packed;
  2623. #define ATH10K_RTS_MAX 2347
  2624. #define ATH10K_FRAGMT_THRESHOLD_MIN 540
  2625. #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
  2626. #define WMI_MAX_EVENT 0x1000
  2627. /* Maximum number of pending TXed WMI packets */
  2628. #define WMI_MAX_PENDING_TX_COUNT 128
  2629. #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
  2630. /* By default disable power save for IBSS */
  2631. #define ATH10K_DEFAULT_ATIM 0
  2632. struct ath10k;
  2633. struct ath10k_vif;
  2634. int ath10k_wmi_attach(struct ath10k *ar);
  2635. void ath10k_wmi_detach(struct ath10k *ar);
  2636. int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
  2637. int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
  2638. void ath10k_wmi_flush_tx(struct ath10k *ar);
  2639. int ath10k_wmi_connect_htc_service(struct ath10k *ar);
  2640. int ath10k_wmi_pdev_set_channel(struct ath10k *ar,
  2641. const struct wmi_channel_arg *);
  2642. int ath10k_wmi_pdev_suspend_target(struct ath10k *ar);
  2643. int ath10k_wmi_pdev_resume_target(struct ath10k *ar);
  2644. int ath10k_wmi_pdev_set_regdomain(struct ath10k *ar, u16 rd, u16 rd2g,
  2645. u16 rd5g, u16 ctl2g, u16 ctl5g);
  2646. int ath10k_wmi_pdev_set_param(struct ath10k *ar, enum wmi_pdev_param id,
  2647. u32 value);
  2648. int ath10k_wmi_cmd_init(struct ath10k *ar);
  2649. int ath10k_wmi_start_scan(struct ath10k *ar, const struct wmi_start_scan_arg *);
  2650. void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
  2651. int ath10k_wmi_stop_scan(struct ath10k *ar,
  2652. const struct wmi_stop_scan_arg *arg);
  2653. int ath10k_wmi_vdev_create(struct ath10k *ar, u32 vdev_id,
  2654. enum wmi_vdev_type type,
  2655. enum wmi_vdev_subtype subtype,
  2656. const u8 macaddr[ETH_ALEN]);
  2657. int ath10k_wmi_vdev_delete(struct ath10k *ar, u32 vdev_id);
  2658. int ath10k_wmi_vdev_start(struct ath10k *ar,
  2659. const struct wmi_vdev_start_request_arg *);
  2660. int ath10k_wmi_vdev_restart(struct ath10k *ar,
  2661. const struct wmi_vdev_start_request_arg *);
  2662. int ath10k_wmi_vdev_stop(struct ath10k *ar, u32 vdev_id);
  2663. int ath10k_wmi_vdev_up(struct ath10k *ar, u32 vdev_id, u32 aid,
  2664. const u8 *bssid);
  2665. int ath10k_wmi_vdev_down(struct ath10k *ar, u32 vdev_id);
  2666. int ath10k_wmi_vdev_set_param(struct ath10k *ar, u32 vdev_id,
  2667. enum wmi_vdev_param param_id, u32 param_value);
  2668. int ath10k_wmi_vdev_install_key(struct ath10k *ar,
  2669. const struct wmi_vdev_install_key_arg *arg);
  2670. int ath10k_wmi_peer_create(struct ath10k *ar, u32 vdev_id,
  2671. const u8 peer_addr[ETH_ALEN]);
  2672. int ath10k_wmi_peer_delete(struct ath10k *ar, u32 vdev_id,
  2673. const u8 peer_addr[ETH_ALEN]);
  2674. int ath10k_wmi_peer_flush(struct ath10k *ar, u32 vdev_id,
  2675. const u8 peer_addr[ETH_ALEN], u32 tid_bitmap);
  2676. int ath10k_wmi_peer_set_param(struct ath10k *ar, u32 vdev_id,
  2677. const u8 *peer_addr,
  2678. enum wmi_peer_param param_id, u32 param_value);
  2679. int ath10k_wmi_peer_assoc(struct ath10k *ar,
  2680. const struct wmi_peer_assoc_complete_arg *arg);
  2681. int ath10k_wmi_set_psmode(struct ath10k *ar, u32 vdev_id,
  2682. enum wmi_sta_ps_mode psmode);
  2683. int ath10k_wmi_set_sta_ps_param(struct ath10k *ar, u32 vdev_id,
  2684. enum wmi_sta_powersave_param param_id,
  2685. u32 value);
  2686. int ath10k_wmi_set_ap_ps_param(struct ath10k *ar, u32 vdev_id, const u8 *mac,
  2687. enum wmi_ap_ps_peer_param param_id, u32 value);
  2688. int ath10k_wmi_scan_chan_list(struct ath10k *ar,
  2689. const struct wmi_scan_chan_list_arg *arg);
  2690. int ath10k_wmi_beacon_send(struct ath10k *ar, const struct wmi_bcn_tx_arg *arg);
  2691. int ath10k_wmi_pdev_set_wmm_params(struct ath10k *ar,
  2692. const struct wmi_pdev_set_wmm_params_arg *arg);
  2693. int ath10k_wmi_request_stats(struct ath10k *ar, enum wmi_stats_id stats_id);
  2694. int ath10k_wmi_force_fw_hang(struct ath10k *ar,
  2695. enum wmi_force_fw_hang_type type, u32 delay_ms);
  2696. #endif /* _WMI_H_ */