wmi.h 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076
  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. /*
  682. * status consists of upper 16 bits fo int status and lower 16 bits of
  683. * module ID that retuned status
  684. */
  685. #define WLAN_INIT_STATUS_SUCCESS 0x0
  686. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  687. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  688. #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
  689. #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
  690. struct wmi_ready_event {
  691. __le32 sw_version;
  692. __le32 abi_version;
  693. struct wmi_mac_addr mac_addr;
  694. __le32 status;
  695. } __packed;
  696. struct wmi_resource_config {
  697. /* number of virtual devices (VAPs) to support */
  698. __le32 num_vdevs;
  699. /* number of peer nodes to support */
  700. __le32 num_peers;
  701. /*
  702. * In offload mode target supports features like WOW, chatter and
  703. * other protocol offloads. In order to support them some
  704. * functionalities like reorder buffering, PN checking need to be
  705. * done in target. This determines maximum number of peers suported
  706. * by target in offload mode
  707. */
  708. __le32 num_offload_peers;
  709. /* For target-based RX reordering */
  710. __le32 num_offload_reorder_bufs;
  711. /* number of keys per peer */
  712. __le32 num_peer_keys;
  713. /* total number of TX/RX data TIDs */
  714. __le32 num_tids;
  715. /*
  716. * max skid for resolving hash collisions
  717. *
  718. * The address search table is sparse, so that if two MAC addresses
  719. * result in the same hash value, the second of these conflicting
  720. * entries can slide to the next index in the address search table,
  721. * and use it, if it is unoccupied. This ast_skid_limit parameter
  722. * specifies the upper bound on how many subsequent indices to search
  723. * over to find an unoccupied space.
  724. */
  725. __le32 ast_skid_limit;
  726. /*
  727. * the nominal chain mask for transmit
  728. *
  729. * The chain mask may be modified dynamically, e.g. to operate AP
  730. * tx with a reduced number of chains if no clients are associated.
  731. * This configuration parameter specifies the nominal chain-mask that
  732. * should be used when not operating with a reduced set of tx chains.
  733. */
  734. __le32 tx_chain_mask;
  735. /*
  736. * the nominal chain mask for receive
  737. *
  738. * The chain mask may be modified dynamically, e.g. for a client
  739. * to use a reduced number of chains for receive if the traffic to
  740. * the client is low enough that it doesn't require downlink MIMO
  741. * or antenna diversity.
  742. * This configuration parameter specifies the nominal chain-mask that
  743. * should be used when not operating with a reduced set of rx chains.
  744. */
  745. __le32 rx_chain_mask;
  746. /*
  747. * what rx reorder timeout (ms) to use for the AC
  748. *
  749. * Each WMM access class (voice, video, best-effort, background) will
  750. * have its own timeout value to dictate how long to wait for missing
  751. * rx MPDUs to arrive before flushing subsequent MPDUs that have
  752. * already been received.
  753. * This parameter specifies the timeout in milliseconds for each
  754. * class.
  755. */
  756. __le32 rx_timeout_pri_vi;
  757. __le32 rx_timeout_pri_vo;
  758. __le32 rx_timeout_pri_be;
  759. __le32 rx_timeout_pri_bk;
  760. /*
  761. * what mode the rx should decap packets to
  762. *
  763. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  764. * THis setting also determines the default TX behavior, however TX
  765. * behavior can be modified on a per VAP basis during VAP init
  766. */
  767. __le32 rx_decap_mode;
  768. /* what is the maximum scan requests than can be queued */
  769. __le32 scan_max_pending_reqs;
  770. /* maximum VDEV that could use BMISS offload */
  771. __le32 bmiss_offload_max_vdev;
  772. /* maximum VDEV that could use offload roaming */
  773. __le32 roam_offload_max_vdev;
  774. /* maximum AP profiles that would push to offload roaming */
  775. __le32 roam_offload_max_ap_profiles;
  776. /*
  777. * how many groups to use for mcast->ucast conversion
  778. *
  779. * The target's WAL maintains a table to hold information regarding
  780. * which peers belong to a given multicast group, so that if
  781. * multicast->unicast conversion is enabled, the target can convert
  782. * multicast tx frames to a series of unicast tx frames, to each
  783. * peer within the multicast group.
  784. This num_mcast_groups configuration parameter tells the target how
  785. * many multicast groups to provide storage for within its multicast
  786. * group membership table.
  787. */
  788. __le32 num_mcast_groups;
  789. /*
  790. * size to alloc for the mcast membership table
  791. *
  792. * This num_mcast_table_elems configuration parameter tells the
  793. * target how many peer elements it needs to provide storage for in
  794. * its multicast group membership table.
  795. * These multicast group membership table elements are shared by the
  796. * multicast groups stored within the table.
  797. */
  798. __le32 num_mcast_table_elems;
  799. /*
  800. * whether/how to do multicast->unicast conversion
  801. *
  802. * This configuration parameter specifies whether the target should
  803. * perform multicast --> unicast conversion on transmit, and if so,
  804. * what to do if it finds no entries in its multicast group
  805. * membership table for the multicast IP address in the tx frame.
  806. * Configuration value:
  807. * 0 -> Do not perform multicast to unicast conversion.
  808. * 1 -> Convert multicast frames to unicast, if the IP multicast
  809. * address from the tx frame is found in the multicast group
  810. * membership table. If the IP multicast address is not found,
  811. * drop the frame.
  812. * 2 -> Convert multicast frames to unicast, if the IP multicast
  813. * address from the tx frame is found in the multicast group
  814. * membership table. If the IP multicast address is not found,
  815. * transmit the frame as multicast.
  816. */
  817. __le32 mcast2ucast_mode;
  818. /*
  819. * how much memory to allocate for a tx PPDU dbg log
  820. *
  821. * This parameter controls how much memory the target will allocate
  822. * to store a log of tx PPDU meta-information (how large the PPDU
  823. * was, when it was sent, whether it was successful, etc.)
  824. */
  825. __le32 tx_dbg_log_size;
  826. /* how many AST entries to be allocated for WDS */
  827. __le32 num_wds_entries;
  828. /*
  829. * MAC DMA burst size, e.g., For target PCI limit can be
  830. * 0 -default, 1 256B
  831. */
  832. __le32 dma_burst_size;
  833. /*
  834. * Fixed delimiters to be inserted after every MPDU to
  835. * account for interface latency to avoid underrun.
  836. */
  837. __le32 mac_aggr_delim;
  838. /*
  839. * determine whether target is responsible for detecting duplicate
  840. * non-aggregate MPDU and timing out stale fragments.
  841. *
  842. * A-MPDU reordering is always performed on the target.
  843. *
  844. * 0: target responsible for frag timeout and dup checking
  845. * 1: host responsible for frag timeout and dup checking
  846. */
  847. __le32 rx_skip_defrag_timeout_dup_detection_check;
  848. /*
  849. * Configuration for VoW :
  850. * No of Video Nodes to be supported
  851. * and Max no of descriptors for each Video link (node).
  852. */
  853. __le32 vow_config;
  854. /* maximum VDEV that could use GTK offload */
  855. __le32 gtk_offload_max_vdev;
  856. /* Number of msdu descriptors target should use */
  857. __le32 num_msdu_desc;
  858. /*
  859. * Max. number of Tx fragments per MSDU
  860. * This parameter controls the max number of Tx fragments per MSDU.
  861. * This is sent by the target as part of the WMI_SERVICE_READY event
  862. * and is overriden by the OS shim as required.
  863. */
  864. __le32 max_frag_entries;
  865. } __packed;
  866. /* strucutre describing host memory chunk. */
  867. struct host_memory_chunk {
  868. /* id of the request that is passed up in service ready */
  869. __le32 req_id;
  870. /* the physical address the memory chunk */
  871. __le32 ptr;
  872. /* size of the chunk */
  873. __le32 size;
  874. } __packed;
  875. struct wmi_init_cmd {
  876. struct wmi_resource_config resource_config;
  877. __le32 num_host_mem_chunks;
  878. /*
  879. * variable number of host memory chunks.
  880. * This should be the last element in the structure
  881. */
  882. struct host_memory_chunk host_mem_chunks[1];
  883. } __packed;
  884. /* TLV for channel list */
  885. struct wmi_chan_list {
  886. __le32 tag; /* WMI_CHAN_LIST_TAG */
  887. __le32 num_chan;
  888. __le32 channel_list[0];
  889. } __packed;
  890. struct wmi_bssid_list {
  891. __le32 tag; /* WMI_BSSID_LIST_TAG */
  892. __le32 num_bssid;
  893. struct wmi_mac_addr bssid_list[0];
  894. } __packed;
  895. struct wmi_ie_data {
  896. __le32 tag; /* WMI_IE_TAG */
  897. __le32 ie_len;
  898. u8 ie_data[0];
  899. } __packed;
  900. struct wmi_ssid {
  901. __le32 ssid_len;
  902. u8 ssid[32];
  903. } __packed;
  904. struct wmi_ssid_list {
  905. __le32 tag; /* WMI_SSID_LIST_TAG */
  906. __le32 num_ssids;
  907. struct wmi_ssid ssids[0];
  908. } __packed;
  909. /* prefix used by scan requestor ids on the host */
  910. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  911. /* prefix used by scan request ids generated on the host */
  912. /* host cycles through the lower 12 bits to generate ids */
  913. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  914. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  915. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  916. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
  917. /* Scan priority numbers must be sequential, starting with 0 */
  918. enum wmi_scan_priority {
  919. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  920. WMI_SCAN_PRIORITY_LOW,
  921. WMI_SCAN_PRIORITY_MEDIUM,
  922. WMI_SCAN_PRIORITY_HIGH,
  923. WMI_SCAN_PRIORITY_VERY_HIGH,
  924. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  925. };
  926. struct wmi_start_scan_cmd {
  927. /* Scan ID */
  928. __le32 scan_id;
  929. /* Scan requestor ID */
  930. __le32 scan_req_id;
  931. /* VDEV id(interface) that is requesting scan */
  932. __le32 vdev_id;
  933. /* Scan Priority, input to scan scheduler */
  934. __le32 scan_priority;
  935. /* Scan events subscription */
  936. __le32 notify_scan_events;
  937. /* dwell time in msec on active channels */
  938. __le32 dwell_time_active;
  939. /* dwell time in msec on passive channels */
  940. __le32 dwell_time_passive;
  941. /*
  942. * min time in msec on the BSS channel,only valid if atleast one
  943. * VDEV is active
  944. */
  945. __le32 min_rest_time;
  946. /*
  947. * max rest time in msec on the BSS channel,only valid if at least
  948. * one VDEV is active
  949. */
  950. /*
  951. * the scanner will rest on the bss channel at least min_rest_time
  952. * after min_rest_time the scanner will start checking for tx/rx
  953. * activity on all VDEVs. if there is no activity the scanner will
  954. * switch to off channel. if there is activity the scanner will let
  955. * the radio on the bss channel until max_rest_time expires.at
  956. * max_rest_time scanner will switch to off channel irrespective of
  957. * activity. activity is determined by the idle_time parameter.
  958. */
  959. __le32 max_rest_time;
  960. /*
  961. * time before sending next set of probe requests.
  962. * The scanner keeps repeating probe requests transmission with
  963. * period specified by repeat_probe_time.
  964. * The number of probe requests specified depends on the ssid_list
  965. * and bssid_list
  966. */
  967. __le32 repeat_probe_time;
  968. /* time in msec between 2 consequetive probe requests with in a set. */
  969. __le32 probe_spacing_time;
  970. /*
  971. * data inactivity time in msec on bss channel that will be used by
  972. * scanner for measuring the inactivity.
  973. */
  974. __le32 idle_time;
  975. /* maximum time in msec allowed for scan */
  976. __le32 max_scan_time;
  977. /*
  978. * delay in msec before sending first probe request after switching
  979. * to a channel
  980. */
  981. __le32 probe_delay;
  982. /* Scan control flags */
  983. __le32 scan_ctrl_flags;
  984. /* Burst duration time in msecs */
  985. __le32 burst_duration;
  986. /*
  987. * TLV (tag length value ) paramerters follow the scan_cmd structure.
  988. * TLV can contain channel list, bssid list, ssid list and
  989. * ie. the TLV tags are defined above;
  990. */
  991. } __packed;
  992. struct wmi_ssid_arg {
  993. int len;
  994. const u8 *ssid;
  995. };
  996. struct wmi_bssid_arg {
  997. const u8 *bssid;
  998. };
  999. struct wmi_start_scan_arg {
  1000. u32 scan_id;
  1001. u32 scan_req_id;
  1002. u32 vdev_id;
  1003. u32 scan_priority;
  1004. u32 notify_scan_events;
  1005. u32 dwell_time_active;
  1006. u32 dwell_time_passive;
  1007. u32 min_rest_time;
  1008. u32 max_rest_time;
  1009. u32 repeat_probe_time;
  1010. u32 probe_spacing_time;
  1011. u32 idle_time;
  1012. u32 max_scan_time;
  1013. u32 probe_delay;
  1014. u32 scan_ctrl_flags;
  1015. u32 ie_len;
  1016. u32 n_channels;
  1017. u32 n_ssids;
  1018. u32 n_bssids;
  1019. u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
  1020. u32 channels[64];
  1021. struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
  1022. struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
  1023. };
  1024. /* scan control flags */
  1025. /* passively scan all channels including active channels */
  1026. #define WMI_SCAN_FLAG_PASSIVE 0x1
  1027. /* add wild card ssid probe request even though ssid_list is specified. */
  1028. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  1029. /* add cck rates to rates/xrate ie for the generated probe request */
  1030. #define WMI_SCAN_ADD_CCK_RATES 0x4
  1031. /* add ofdm rates to rates/xrate ie for the generated probe request */
  1032. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  1033. /* To enable indication of Chan load and Noise floor to host */
  1034. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  1035. /* Filter Probe request frames */
  1036. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  1037. /* When set, DFS channels will not be scanned */
  1038. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  1039. /* Different FW scan engine may choose to bail out on errors.
  1040. * Allow the driver to have influence over that. */
  1041. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  1042. /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  1043. #define WMI_SCAN_CLASS_MASK 0xFF000000
  1044. enum wmi_stop_scan_type {
  1045. WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
  1046. WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
  1047. WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
  1048. };
  1049. struct wmi_stop_scan_cmd {
  1050. __le32 scan_req_id;
  1051. __le32 scan_id;
  1052. __le32 req_type;
  1053. __le32 vdev_id;
  1054. } __packed;
  1055. struct wmi_stop_scan_arg {
  1056. u32 req_id;
  1057. enum wmi_stop_scan_type req_type;
  1058. union {
  1059. u32 scan_id;
  1060. u32 vdev_id;
  1061. } u;
  1062. };
  1063. struct wmi_scan_chan_list_cmd {
  1064. __le32 num_scan_chans;
  1065. struct wmi_channel chan_info[0];
  1066. } __packed;
  1067. struct wmi_scan_chan_list_arg {
  1068. u32 n_channels;
  1069. struct wmi_channel_arg *channels;
  1070. };
  1071. enum wmi_bss_filter {
  1072. WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
  1073. WMI_BSS_FILTER_ALL, /* all beacons forwarded */
  1074. WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
  1075. WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
  1076. WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
  1077. WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
  1078. WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
  1079. WMI_BSS_FILTER_LAST_BSS, /* marker only */
  1080. };
  1081. enum wmi_scan_event_type {
  1082. WMI_SCAN_EVENT_STARTED = 0x1,
  1083. WMI_SCAN_EVENT_COMPLETED = 0x2,
  1084. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  1085. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  1086. WMI_SCAN_EVENT_DEQUEUED = 0x10,
  1087. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* possibly by high-prio scan */
  1088. WMI_SCAN_EVENT_START_FAILED = 0x40,
  1089. WMI_SCAN_EVENT_RESTARTED = 0x80,
  1090. WMI_SCAN_EVENT_MAX = 0x8000
  1091. };
  1092. enum wmi_scan_completion_reason {
  1093. WMI_SCAN_REASON_COMPLETED,
  1094. WMI_SCAN_REASON_CANCELLED,
  1095. WMI_SCAN_REASON_PREEMPTED,
  1096. WMI_SCAN_REASON_TIMEDOUT,
  1097. WMI_SCAN_REASON_MAX,
  1098. };
  1099. struct wmi_scan_event {
  1100. __le32 event_type; /* %WMI_SCAN_EVENT_ */
  1101. __le32 reason; /* %WMI_SCAN_REASON_ */
  1102. __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
  1103. __le32 scan_req_id;
  1104. __le32 scan_id;
  1105. __le32 vdev_id;
  1106. } __packed;
  1107. /*
  1108. * This defines how much headroom is kept in the
  1109. * receive frame between the descriptor and the
  1110. * payload, in order for the WMI PHY error and
  1111. * management handler to insert header contents.
  1112. *
  1113. * This is in bytes.
  1114. */
  1115. #define WMI_MGMT_RX_HDR_HEADROOM 52
  1116. /*
  1117. * This event will be used for sending scan results
  1118. * as well as rx mgmt frames to the host. The rx buffer
  1119. * will be sent as part of this WMI event. It would be a
  1120. * good idea to pass all the fields in the RX status
  1121. * descriptor up to the host.
  1122. */
  1123. struct wmi_mgmt_rx_hdr {
  1124. __le32 channel;
  1125. __le32 snr;
  1126. __le32 rate;
  1127. __le32 phy_mode;
  1128. __le32 buf_len;
  1129. __le32 status; /* %WMI_RX_STATUS_ */
  1130. } __packed;
  1131. struct wmi_mgmt_rx_event {
  1132. struct wmi_mgmt_rx_hdr hdr;
  1133. u8 buf[0];
  1134. } __packed;
  1135. #define WMI_RX_STATUS_OK 0x00
  1136. #define WMI_RX_STATUS_ERR_CRC 0x01
  1137. #define WMI_RX_STATUS_ERR_DECRYPT 0x08
  1138. #define WMI_RX_STATUS_ERR_MIC 0x10
  1139. #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
  1140. struct wmi_single_phyerr_rx_hdr {
  1141. /* TSF timestamp */
  1142. __le32 tsf_timestamp;
  1143. /*
  1144. * Current freq1, freq2
  1145. *
  1146. * [7:0]: freq1[lo]
  1147. * [15:8] : freq1[hi]
  1148. * [23:16]: freq2[lo]
  1149. * [31:24]: freq2[hi]
  1150. */
  1151. __le16 freq1;
  1152. __le16 freq2;
  1153. /*
  1154. * Combined RSSI over all chains and channel width for this PHY error
  1155. *
  1156. * [7:0]: RSSI combined
  1157. * [15:8]: Channel width (MHz)
  1158. * [23:16]: PHY error code
  1159. * [24:16]: reserved (future use)
  1160. */
  1161. u8 rssi_combined;
  1162. u8 chan_width_mhz;
  1163. u8 phy_err_code;
  1164. u8 rsvd0;
  1165. /*
  1166. * RSSI on chain 0 through 3
  1167. *
  1168. * This is formatted the same as the PPDU_START RX descriptor
  1169. * field:
  1170. *
  1171. * [7:0]: pri20
  1172. * [15:8]: sec20
  1173. * [23:16]: sec40
  1174. * [31:24]: sec80
  1175. */
  1176. __le32 rssi_chain0;
  1177. __le32 rssi_chain1;
  1178. __le32 rssi_chain2;
  1179. __le32 rssi_chain3;
  1180. /*
  1181. * Last calibrated NF value for chain 0 through 3
  1182. *
  1183. * nf_list_1:
  1184. *
  1185. * + [15:0] - chain 0
  1186. * + [31:16] - chain 1
  1187. *
  1188. * nf_list_2:
  1189. *
  1190. * + [15:0] - chain 2
  1191. * + [31:16] - chain 3
  1192. */
  1193. __le32 nf_list_1;
  1194. __le32 nf_list_2;
  1195. /* Length of the frame */
  1196. __le32 buf_len;
  1197. } __packed;
  1198. struct wmi_single_phyerr_rx_event {
  1199. /* Phy error event header */
  1200. struct wmi_single_phyerr_rx_hdr hdr;
  1201. /* frame buffer */
  1202. u8 bufp[0];
  1203. } __packed;
  1204. struct wmi_comb_phyerr_rx_hdr {
  1205. /* Phy error phy error count */
  1206. __le32 num_phyerr_events;
  1207. __le32 tsf_l32;
  1208. __le32 tsf_u32;
  1209. } __packed;
  1210. struct wmi_comb_phyerr_rx_event {
  1211. /* Phy error phy error count */
  1212. struct wmi_comb_phyerr_rx_hdr hdr;
  1213. /*
  1214. * frame buffer - contains multiple payloads in the order:
  1215. * header - payload, header - payload...
  1216. * (The header is of type: wmi_single_phyerr_rx_hdr)
  1217. */
  1218. u8 bufp[0];
  1219. } __packed;
  1220. struct wmi_mgmt_tx_hdr {
  1221. __le32 vdev_id;
  1222. struct wmi_mac_addr peer_macaddr;
  1223. __le32 tx_rate;
  1224. __le32 tx_power;
  1225. __le32 buf_len;
  1226. } __packed;
  1227. struct wmi_mgmt_tx_cmd {
  1228. struct wmi_mgmt_tx_hdr hdr;
  1229. u8 buf[0];
  1230. } __packed;
  1231. struct wmi_echo_event {
  1232. __le32 value;
  1233. } __packed;
  1234. struct wmi_echo_cmd {
  1235. __le32 value;
  1236. } __packed;
  1237. struct wmi_pdev_set_regdomain_cmd {
  1238. __le32 reg_domain;
  1239. __le32 reg_domain_2G;
  1240. __le32 reg_domain_5G;
  1241. __le32 conformance_test_limit_2G;
  1242. __le32 conformance_test_limit_5G;
  1243. } __packed;
  1244. /* Command to set/unset chip in quiet mode */
  1245. struct wmi_pdev_set_quiet_cmd {
  1246. /* period in TUs */
  1247. __le32 period;
  1248. /* duration in TUs */
  1249. __le32 duration;
  1250. /* offset in TUs */
  1251. __le32 next_start;
  1252. /* enable/disable */
  1253. __le32 enabled;
  1254. } __packed;
  1255. /*
  1256. * 802.11g protection mode.
  1257. */
  1258. enum ath10k_protmode {
  1259. ATH10K_PROT_NONE = 0, /* no protection */
  1260. ATH10K_PROT_CTSONLY = 1, /* CTS to self */
  1261. ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
  1262. };
  1263. enum wmi_beacon_gen_mode {
  1264. WMI_BEACON_STAGGERED_MODE = 0,
  1265. WMI_BEACON_BURST_MODE = 1
  1266. };
  1267. enum wmi_csa_event_ies_present_flag {
  1268. WMI_CSA_IE_PRESENT = 0x00000001,
  1269. WMI_XCSA_IE_PRESENT = 0x00000002,
  1270. WMI_WBW_IE_PRESENT = 0x00000004,
  1271. WMI_CSWARP_IE_PRESENT = 0x00000008,
  1272. };
  1273. /* wmi CSA receive event from beacon frame */
  1274. struct wmi_csa_event {
  1275. __le32 i_fc_dur;
  1276. /* Bit 0-15: FC */
  1277. /* Bit 16-31: DUR */
  1278. struct wmi_mac_addr i_addr1;
  1279. struct wmi_mac_addr i_addr2;
  1280. __le32 csa_ie[2];
  1281. __le32 xcsa_ie[2];
  1282. __le32 wb_ie[2];
  1283. __le32 cswarp_ie;
  1284. __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
  1285. } __packed;
  1286. /* the definition of different PDEV parameters */
  1287. #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
  1288. #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
  1289. #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
  1290. enum wmi_pdev_param {
  1291. /* TX chian mask */
  1292. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  1293. /* RX chian mask */
  1294. WMI_PDEV_PARAM_RX_CHAIN_MASK,
  1295. /* TX power limit for 2G Radio */
  1296. WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
  1297. /* TX power limit for 5G Radio */
  1298. WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
  1299. /* TX power scale */
  1300. WMI_PDEV_PARAM_TXPOWER_SCALE,
  1301. /* Beacon generation mode . 0: host, 1: target */
  1302. WMI_PDEV_PARAM_BEACON_GEN_MODE,
  1303. /* Beacon generation mode . 0: staggered 1: bursted */
  1304. WMI_PDEV_PARAM_BEACON_TX_MODE,
  1305. /*
  1306. * Resource manager off chan mode .
  1307. * 0: turn off off chan mode. 1: turn on offchan mode
  1308. */
  1309. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  1310. /*
  1311. * Protection mode:
  1312. * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
  1313. */
  1314. WMI_PDEV_PARAM_PROTECTION_MODE,
  1315. /* Dynamic bandwidth 0: disable 1: enable */
  1316. WMI_PDEV_PARAM_DYNAMIC_BW,
  1317. /* Non aggregrate/ 11g sw retry threshold.0-disable */
  1318. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  1319. /* aggregrate sw retry threshold. 0-disable*/
  1320. WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
  1321. /* Station kickout threshold (non of consecutive failures).0-disable */
  1322. WMI_PDEV_PARAM_STA_KICKOUT_TH,
  1323. /* Aggerate size scaling configuration per AC */
  1324. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  1325. /* LTR enable */
  1326. WMI_PDEV_PARAM_LTR_ENABLE,
  1327. /* LTR latency for BE, in us */
  1328. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
  1329. /* LTR latency for BK, in us */
  1330. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
  1331. /* LTR latency for VI, in us */
  1332. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
  1333. /* LTR latency for VO, in us */
  1334. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
  1335. /* LTR AC latency timeout, in ms */
  1336. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  1337. /* LTR platform latency override, in us */
  1338. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  1339. /* LTR-RX override, in us */
  1340. WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
  1341. /* Tx activity timeout for LTR, in us */
  1342. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  1343. /* L1SS state machine enable */
  1344. WMI_PDEV_PARAM_L1SS_ENABLE,
  1345. /* Deep sleep state machine enable */
  1346. WMI_PDEV_PARAM_DSLEEP_ENABLE,
  1347. /* RX buffering flush enable */
  1348. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  1349. /* RX buffering matermark */
  1350. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  1351. /* RX buffering timeout enable */
  1352. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  1353. /* RX buffering timeout value */
  1354. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  1355. /* pdev level stats update period in ms */
  1356. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  1357. /* vdev level stats update period in ms */
  1358. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  1359. /* peer level stats update period in ms */
  1360. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  1361. /* beacon filter status update period */
  1362. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  1363. /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  1364. WMI_PDEV_PARAM_PMF_QOS,
  1365. /* Access category on which ARP frames are sent */
  1366. WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
  1367. /* DCS configuration */
  1368. WMI_PDEV_PARAM_DCS,
  1369. /* Enable/Disable ANI on target */
  1370. WMI_PDEV_PARAM_ANI_ENABLE,
  1371. /* configure the ANI polling period */
  1372. WMI_PDEV_PARAM_ANI_POLL_PERIOD,
  1373. /* configure the ANI listening period */
  1374. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
  1375. /* configure OFDM immunity level */
  1376. WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
  1377. /* configure CCK immunity level */
  1378. WMI_PDEV_PARAM_ANI_CCK_LEVEL,
  1379. /* Enable/Disable CDD for 1x1 STAs in rate control module */
  1380. WMI_PDEV_PARAM_DYNTXCHAIN,
  1381. /* Enable/Disable proxy STA */
  1382. WMI_PDEV_PARAM_PROXY_STA,
  1383. /* Enable/Disable low power state when all VDEVs are inactive/idle. */
  1384. WMI_PDEV_PARAM_IDLE_PS_CONFIG,
  1385. /* Enable/Disable power gating sleep */
  1386. WMI_PDEV_PARAM_POWER_GATING_SLEEP,
  1387. };
  1388. struct wmi_pdev_set_param_cmd {
  1389. __le32 param_id;
  1390. __le32 param_value;
  1391. } __packed;
  1392. struct wmi_pdev_get_tpc_config_cmd {
  1393. /* parameter */
  1394. __le32 param;
  1395. } __packed;
  1396. #define WMI_TPC_RATE_MAX 160
  1397. #define WMI_TPC_TX_N_CHAIN 4
  1398. enum wmi_tpc_config_event_flag {
  1399. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  1400. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  1401. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  1402. };
  1403. struct wmi_pdev_tpc_config_event {
  1404. __le32 reg_domain;
  1405. __le32 chan_freq;
  1406. __le32 phy_mode;
  1407. __le32 twice_antenna_reduction;
  1408. __le32 twice_max_rd_power;
  1409. s32 twice_antenna_gain;
  1410. __le32 power_limit;
  1411. __le32 rate_max;
  1412. __le32 num_tx_chain;
  1413. __le32 ctl;
  1414. __le32 flags;
  1415. s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
  1416. s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  1417. s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  1418. s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  1419. u8 rates_array[WMI_TPC_RATE_MAX];
  1420. } __packed;
  1421. /* Transmit power scale factor. */
  1422. enum wmi_tp_scale {
  1423. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  1424. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  1425. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  1426. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  1427. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  1428. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  1429. };
  1430. struct wmi_set_channel_cmd {
  1431. /* channel (only frequency and mode info are used) */
  1432. struct wmi_channel chan;
  1433. } __packed;
  1434. struct wmi_pdev_chanlist_update_event {
  1435. /* number of channels */
  1436. __le32 num_chan;
  1437. /* array of channels */
  1438. struct wmi_channel channel_list[1];
  1439. } __packed;
  1440. #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
  1441. struct wmi_debug_mesg_event {
  1442. /* message buffer, NULL terminated */
  1443. char bufp[WMI_MAX_DEBUG_MESG];
  1444. } __packed;
  1445. enum {
  1446. /* P2P device */
  1447. VDEV_SUBTYPE_P2PDEV = 0,
  1448. /* P2P client */
  1449. VDEV_SUBTYPE_P2PCLI,
  1450. /* P2P GO */
  1451. VDEV_SUBTYPE_P2PGO,
  1452. /* BT3.0 HS */
  1453. VDEV_SUBTYPE_BT,
  1454. };
  1455. struct wmi_pdev_set_channel_cmd {
  1456. /* idnore power , only use flags , mode and freq */
  1457. struct wmi_channel chan;
  1458. } __packed;
  1459. /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
  1460. #define WMI_DSCP_MAP_MAX (64)
  1461. struct wmi_pdev_set_dscp_tid_map_cmd {
  1462. /* map indicating DSCP to TID conversion */
  1463. __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  1464. } __packed;
  1465. enum mcast_bcast_rate_id {
  1466. WMI_SET_MCAST_RATE,
  1467. WMI_SET_BCAST_RATE
  1468. };
  1469. struct mcast_bcast_rate {
  1470. enum mcast_bcast_rate_id rate_id;
  1471. __le32 rate;
  1472. } __packed;
  1473. struct wmi_wmm_params {
  1474. __le32 cwmin;
  1475. __le32 cwmax;
  1476. __le32 aifs;
  1477. __le32 txop;
  1478. __le32 acm;
  1479. __le32 no_ack;
  1480. } __packed;
  1481. struct wmi_pdev_set_wmm_params {
  1482. struct wmi_wmm_params ac_be;
  1483. struct wmi_wmm_params ac_bk;
  1484. struct wmi_wmm_params ac_vi;
  1485. struct wmi_wmm_params ac_vo;
  1486. } __packed;
  1487. struct wmi_wmm_params_arg {
  1488. u32 cwmin;
  1489. u32 cwmax;
  1490. u32 aifs;
  1491. u32 txop;
  1492. u32 acm;
  1493. u32 no_ack;
  1494. };
  1495. struct wmi_pdev_set_wmm_params_arg {
  1496. struct wmi_wmm_params_arg ac_be;
  1497. struct wmi_wmm_params_arg ac_bk;
  1498. struct wmi_wmm_params_arg ac_vi;
  1499. struct wmi_wmm_params_arg ac_vo;
  1500. };
  1501. struct wal_dbg_tx_stats {
  1502. /* Num HTT cookies queued to dispatch list */
  1503. __le32 comp_queued;
  1504. /* Num HTT cookies dispatched */
  1505. __le32 comp_delivered;
  1506. /* Num MSDU queued to WAL */
  1507. __le32 msdu_enqued;
  1508. /* Num MPDU queue to WAL */
  1509. __le32 mpdu_enqued;
  1510. /* Num MSDUs dropped by WMM limit */
  1511. __le32 wmm_drop;
  1512. /* Num Local frames queued */
  1513. __le32 local_enqued;
  1514. /* Num Local frames done */
  1515. __le32 local_freed;
  1516. /* Num queued to HW */
  1517. __le32 hw_queued;
  1518. /* Num PPDU reaped from HW */
  1519. __le32 hw_reaped;
  1520. /* Num underruns */
  1521. __le32 underrun;
  1522. /* Num PPDUs cleaned up in TX abort */
  1523. __le32 tx_abort;
  1524. /* Num MPDUs requed by SW */
  1525. __le32 mpdus_requed;
  1526. /* excessive retries */
  1527. __le32 tx_ko;
  1528. /* data hw rate code */
  1529. __le32 data_rc;
  1530. /* Scheduler self triggers */
  1531. __le32 self_triggers;
  1532. /* frames dropped due to excessive sw retries */
  1533. __le32 sw_retry_failure;
  1534. /* illegal rate phy errors */
  1535. __le32 illgl_rate_phy_err;
  1536. /* wal pdev continous xretry */
  1537. __le32 pdev_cont_xretry;
  1538. /* wal pdev continous xretry */
  1539. __le32 pdev_tx_timeout;
  1540. /* wal pdev resets */
  1541. __le32 pdev_resets;
  1542. __le32 phy_underrun;
  1543. /* MPDU is more than txop limit */
  1544. __le32 txop_ovf;
  1545. } __packed;
  1546. struct wal_dbg_rx_stats {
  1547. /* Cnts any change in ring routing mid-ppdu */
  1548. __le32 mid_ppdu_route_change;
  1549. /* Total number of statuses processed */
  1550. __le32 status_rcvd;
  1551. /* Extra frags on rings 0-3 */
  1552. __le32 r0_frags;
  1553. __le32 r1_frags;
  1554. __le32 r2_frags;
  1555. __le32 r3_frags;
  1556. /* MSDUs / MPDUs delivered to HTT */
  1557. __le32 htt_msdus;
  1558. __le32 htt_mpdus;
  1559. /* MSDUs / MPDUs delivered to local stack */
  1560. __le32 loc_msdus;
  1561. __le32 loc_mpdus;
  1562. /* AMSDUs that have more MSDUs than the status ring size */
  1563. __le32 oversize_amsdu;
  1564. /* Number of PHY errors */
  1565. __le32 phy_errs;
  1566. /* Number of PHY errors drops */
  1567. __le32 phy_err_drop;
  1568. /* Number of mpdu errors - FCS, MIC, ENC etc. */
  1569. __le32 mpdu_errs;
  1570. } __packed;
  1571. struct wal_dbg_peer_stats {
  1572. /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
  1573. __le32 dummy;
  1574. } __packed;
  1575. struct wal_dbg_stats {
  1576. struct wal_dbg_tx_stats tx;
  1577. struct wal_dbg_rx_stats rx;
  1578. struct wal_dbg_peer_stats peer;
  1579. } __packed;
  1580. enum wmi_stats_id {
  1581. WMI_REQUEST_PEER_STAT = 0x01,
  1582. WMI_REQUEST_AP_STAT = 0x02
  1583. };
  1584. struct wmi_request_stats_cmd {
  1585. __le32 stats_id;
  1586. /*
  1587. * Space to add parameters like
  1588. * peer mac addr
  1589. */
  1590. } __packed;
  1591. /* Suspend option */
  1592. enum {
  1593. /* suspend */
  1594. WMI_PDEV_SUSPEND,
  1595. /* suspend and disable all interrupts */
  1596. WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
  1597. };
  1598. struct wmi_pdev_suspend_cmd {
  1599. /* suspend option sent to target */
  1600. __le32 suspend_opt;
  1601. } __packed;
  1602. struct wmi_stats_event {
  1603. __le32 stats_id; /* %WMI_REQUEST_ */
  1604. /*
  1605. * number of pdev stats event structures
  1606. * (wmi_pdev_stats) 0 or 1
  1607. */
  1608. __le32 num_pdev_stats;
  1609. /*
  1610. * number of vdev stats event structures
  1611. * (wmi_vdev_stats) 0 or max vdevs
  1612. */
  1613. __le32 num_vdev_stats;
  1614. /*
  1615. * number of peer stats event structures
  1616. * (wmi_peer_stats) 0 or max peers
  1617. */
  1618. __le32 num_peer_stats;
  1619. __le32 num_bcnflt_stats;
  1620. /*
  1621. * followed by
  1622. * num_pdev_stats * size of(struct wmi_pdev_stats)
  1623. * num_vdev_stats * size of(struct wmi_vdev_stats)
  1624. * num_peer_stats * size of(struct wmi_peer_stats)
  1625. *
  1626. * By having a zero sized array, the pointer to data area
  1627. * becomes available without increasing the struct size
  1628. */
  1629. u8 data[0];
  1630. } __packed;
  1631. /*
  1632. * PDEV statistics
  1633. * TODO: add all PDEV stats here
  1634. */
  1635. struct wmi_pdev_stats {
  1636. __le32 chan_nf; /* Channel noise floor */
  1637. __le32 tx_frame_count; /* TX frame count */
  1638. __le32 rx_frame_count; /* RX frame count */
  1639. __le32 rx_clear_count; /* rx clear count */
  1640. __le32 cycle_count; /* cycle count */
  1641. __le32 phy_err_count; /* Phy error count */
  1642. __le32 chan_tx_pwr; /* channel tx power */
  1643. struct wal_dbg_stats wal; /* WAL dbg stats */
  1644. } __packed;
  1645. /*
  1646. * VDEV statistics
  1647. * TODO: add all VDEV stats here
  1648. */
  1649. struct wmi_vdev_stats {
  1650. __le32 vdev_id;
  1651. } __packed;
  1652. /*
  1653. * peer statistics.
  1654. * TODO: add more stats
  1655. */
  1656. struct wmi_peer_stats {
  1657. struct wmi_mac_addr peer_macaddr;
  1658. __le32 peer_rssi;
  1659. __le32 peer_tx_rate;
  1660. } __packed;
  1661. struct wmi_vdev_create_cmd {
  1662. __le32 vdev_id;
  1663. __le32 vdev_type;
  1664. __le32 vdev_subtype;
  1665. struct wmi_mac_addr vdev_macaddr;
  1666. } __packed;
  1667. enum wmi_vdev_type {
  1668. WMI_VDEV_TYPE_AP = 1,
  1669. WMI_VDEV_TYPE_STA = 2,
  1670. WMI_VDEV_TYPE_IBSS = 3,
  1671. WMI_VDEV_TYPE_MONITOR = 4,
  1672. };
  1673. enum wmi_vdev_subtype {
  1674. WMI_VDEV_SUBTYPE_NONE = 0,
  1675. WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
  1676. WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
  1677. WMI_VDEV_SUBTYPE_P2P_GO = 3,
  1678. };
  1679. /* values for vdev_subtype */
  1680. /* values for vdev_start_request flags */
  1681. /*
  1682. * Indicates that AP VDEV uses hidden ssid. only valid for
  1683. * AP/GO */
  1684. #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
  1685. /*
  1686. * Indicates if robust management frame/management frame
  1687. * protection is enabled. For GO/AP vdevs, it indicates that
  1688. * it may support station/client associations with RMF enabled.
  1689. * For STA/client vdevs, it indicates that sta will
  1690. * associate with AP with RMF enabled. */
  1691. #define WMI_VDEV_START_PMF_ENABLED (1<<1)
  1692. struct wmi_p2p_noa_descriptor {
  1693. __le32 type_count; /* 255: continuous schedule, 0: reserved */
  1694. __le32 duration; /* Absent period duration in micro seconds */
  1695. __le32 interval; /* Absent period interval in micro seconds */
  1696. __le32 start_time; /* 32 bit tsf time when in starts */
  1697. } __packed;
  1698. struct wmi_vdev_start_request_cmd {
  1699. /* WMI channel */
  1700. struct wmi_channel chan;
  1701. /* unique id identifying the VDEV, generated by the caller */
  1702. __le32 vdev_id;
  1703. /* requestor id identifying the caller module */
  1704. __le32 requestor_id;
  1705. /* beacon interval from received beacon */
  1706. __le32 beacon_interval;
  1707. /* DTIM Period from the received beacon */
  1708. __le32 dtim_period;
  1709. /* Flags */
  1710. __le32 flags;
  1711. /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  1712. struct wmi_ssid ssid;
  1713. /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
  1714. __le32 bcn_tx_rate;
  1715. /* beacon/probe reponse xmit power. Applicable for SoftAP. */
  1716. __le32 bcn_tx_power;
  1717. /* number of p2p NOA descriptor(s) from scan entry */
  1718. __le32 num_noa_descriptors;
  1719. /*
  1720. * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  1721. * During CAC, Our HW shouldn't ack ditected frames
  1722. */
  1723. __le32 disable_hw_ack;
  1724. /* actual p2p NOA descriptor from scan entry */
  1725. struct wmi_p2p_noa_descriptor noa_descriptors[2];
  1726. } __packed;
  1727. struct wmi_vdev_restart_request_cmd {
  1728. struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
  1729. } __packed;
  1730. struct wmi_vdev_start_request_arg {
  1731. u32 vdev_id;
  1732. struct wmi_channel_arg channel;
  1733. u32 bcn_intval;
  1734. u32 dtim_period;
  1735. u8 *ssid;
  1736. u32 ssid_len;
  1737. u32 bcn_tx_rate;
  1738. u32 bcn_tx_power;
  1739. bool disable_hw_ack;
  1740. bool hidden_ssid;
  1741. bool pmf_enabled;
  1742. };
  1743. struct wmi_vdev_delete_cmd {
  1744. /* unique id identifying the VDEV, generated by the caller */
  1745. __le32 vdev_id;
  1746. } __packed;
  1747. struct wmi_vdev_up_cmd {
  1748. __le32 vdev_id;
  1749. __le32 vdev_assoc_id;
  1750. struct wmi_mac_addr vdev_bssid;
  1751. } __packed;
  1752. struct wmi_vdev_stop_cmd {
  1753. __le32 vdev_id;
  1754. } __packed;
  1755. struct wmi_vdev_down_cmd {
  1756. __le32 vdev_id;
  1757. } __packed;
  1758. struct wmi_vdev_standby_response_cmd {
  1759. /* unique id identifying the VDEV, generated by the caller */
  1760. __le32 vdev_id;
  1761. } __packed;
  1762. struct wmi_vdev_resume_response_cmd {
  1763. /* unique id identifying the VDEV, generated by the caller */
  1764. __le32 vdev_id;
  1765. } __packed;
  1766. struct wmi_vdev_set_param_cmd {
  1767. __le32 vdev_id;
  1768. __le32 param_id;
  1769. __le32 param_value;
  1770. } __packed;
  1771. #define WMI_MAX_KEY_INDEX 3
  1772. #define WMI_MAX_KEY_LEN 32
  1773. #define WMI_KEY_PAIRWISE 0x00
  1774. #define WMI_KEY_GROUP 0x01
  1775. #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
  1776. struct wmi_key_seq_counter {
  1777. __le32 key_seq_counter_l;
  1778. __le32 key_seq_counter_h;
  1779. } __packed;
  1780. #define WMI_CIPHER_NONE 0x0 /* clear key */
  1781. #define WMI_CIPHER_WEP 0x1
  1782. #define WMI_CIPHER_TKIP 0x2
  1783. #define WMI_CIPHER_AES_OCB 0x3
  1784. #define WMI_CIPHER_AES_CCM 0x4
  1785. #define WMI_CIPHER_WAPI 0x5
  1786. #define WMI_CIPHER_CKIP 0x6
  1787. #define WMI_CIPHER_AES_CMAC 0x7
  1788. struct wmi_vdev_install_key_cmd {
  1789. __le32 vdev_id;
  1790. struct wmi_mac_addr peer_macaddr;
  1791. __le32 key_idx;
  1792. __le32 key_flags;
  1793. __le32 key_cipher; /* %WMI_CIPHER_ */
  1794. struct wmi_key_seq_counter key_rsc_counter;
  1795. struct wmi_key_seq_counter key_global_rsc_counter;
  1796. struct wmi_key_seq_counter key_tsc_counter;
  1797. u8 wpi_key_rsc_counter[16];
  1798. u8 wpi_key_tsc_counter[16];
  1799. __le32 key_len;
  1800. __le32 key_txmic_len;
  1801. __le32 key_rxmic_len;
  1802. /* contains key followed by tx mic followed by rx mic */
  1803. u8 key_data[0];
  1804. } __packed;
  1805. struct wmi_vdev_install_key_arg {
  1806. u32 vdev_id;
  1807. const u8 *macaddr;
  1808. u32 key_idx;
  1809. u32 key_flags;
  1810. u32 key_cipher;
  1811. u32 key_len;
  1812. u32 key_txmic_len;
  1813. u32 key_rxmic_len;
  1814. const void *key_data;
  1815. };
  1816. /* Preamble types to be used with VDEV fixed rate configuration */
  1817. enum wmi_rate_preamble {
  1818. WMI_RATE_PREAMBLE_OFDM,
  1819. WMI_RATE_PREAMBLE_CCK,
  1820. WMI_RATE_PREAMBLE_HT,
  1821. WMI_RATE_PREAMBLE_VHT,
  1822. };
  1823. /* Value to disable fixed rate setting */
  1824. #define WMI_FIXED_RATE_NONE (0xff)
  1825. /* the definition of different VDEV parameters */
  1826. enum wmi_vdev_param {
  1827. /* RTS Threshold */
  1828. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  1829. /* Fragmentation threshold */
  1830. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  1831. /* beacon interval in TUs */
  1832. WMI_VDEV_PARAM_BEACON_INTERVAL,
  1833. /* Listen interval in TUs */
  1834. WMI_VDEV_PARAM_LISTEN_INTERVAL,
  1835. /* muticast rate in Mbps */
  1836. WMI_VDEV_PARAM_MULTICAST_RATE,
  1837. /* management frame rate in Mbps */
  1838. WMI_VDEV_PARAM_MGMT_TX_RATE,
  1839. /* slot time (long vs short) */
  1840. WMI_VDEV_PARAM_SLOT_TIME,
  1841. /* preamble (long vs short) */
  1842. WMI_VDEV_PARAM_PREAMBLE,
  1843. /* SWBA time (time before tbtt in msec) */
  1844. WMI_VDEV_PARAM_SWBA_TIME,
  1845. /* time period for updating VDEV stats */
  1846. WMI_VDEV_STATS_UPDATE_PERIOD,
  1847. /* age out time in msec for frames queued for station in power save */
  1848. WMI_VDEV_PWRSAVE_AGEOUT_TIME,
  1849. /*
  1850. * Host SWBA interval (time in msec before tbtt for SWBA event
  1851. * generation).
  1852. */
  1853. WMI_VDEV_HOST_SWBA_INTERVAL,
  1854. /* DTIM period (specified in units of num beacon intervals) */
  1855. WMI_VDEV_PARAM_DTIM_PERIOD,
  1856. /*
  1857. * scheduler air time limit for this VDEV. used by off chan
  1858. * scheduler.
  1859. */
  1860. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  1861. /* enable/dsiable WDS for this VDEV */
  1862. WMI_VDEV_PARAM_WDS,
  1863. /* ATIM Window */
  1864. WMI_VDEV_PARAM_ATIM_WINDOW,
  1865. /* BMISS max */
  1866. WMI_VDEV_PARAM_BMISS_COUNT_MAX,
  1867. /* BMISS first time */
  1868. WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
  1869. /* BMISS final time */
  1870. WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
  1871. /* WMM enables/disabled */
  1872. WMI_VDEV_PARAM_FEATURE_WMM,
  1873. /* Channel width */
  1874. WMI_VDEV_PARAM_CHWIDTH,
  1875. /* Channel Offset */
  1876. WMI_VDEV_PARAM_CHEXTOFFSET,
  1877. /* Disable HT Protection */
  1878. WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
  1879. /* Quick STA Kickout */
  1880. WMI_VDEV_PARAM_STA_QUICKKICKOUT,
  1881. /* Rate to be used with Management frames */
  1882. WMI_VDEV_PARAM_MGMT_RATE,
  1883. /* Protection Mode */
  1884. WMI_VDEV_PARAM_PROTECTION_MODE,
  1885. /* Fixed rate setting */
  1886. WMI_VDEV_PARAM_FIXED_RATE,
  1887. /* Short GI Enable/Disable */
  1888. WMI_VDEV_PARAM_SGI,
  1889. /* Enable LDPC */
  1890. WMI_VDEV_PARAM_LDPC,
  1891. /* Enable Tx STBC */
  1892. WMI_VDEV_PARAM_TX_STBC,
  1893. /* Enable Rx STBC */
  1894. WMI_VDEV_PARAM_RX_STBC,
  1895. /* Intra BSS forwarding */
  1896. WMI_VDEV_PARAM_INTRA_BSS_FWD,
  1897. /* Setting Default xmit key for Vdev */
  1898. WMI_VDEV_PARAM_DEF_KEYID,
  1899. /* NSS width */
  1900. WMI_VDEV_PARAM_NSS,
  1901. /* Set the custom rate for the broadcast data frames */
  1902. WMI_VDEV_PARAM_BCAST_DATA_RATE,
  1903. /* Set the custom rate (rate-code) for multicast data frames */
  1904. WMI_VDEV_PARAM_MCAST_DATA_RATE,
  1905. /* Tx multicast packet indicate Enable/Disable */
  1906. WMI_VDEV_PARAM_MCAST_INDICATE,
  1907. /* Tx DHCP packet indicate Enable/Disable */
  1908. WMI_VDEV_PARAM_DHCP_INDICATE,
  1909. /* Enable host inspection of Tx unicast packet to unknown destination */
  1910. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  1911. /* The minimum amount of time AP begins to consider STA inactive */
  1912. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  1913. /*
  1914. * An associated STA is considered inactive when there is no recent
  1915. * TX/RX activity and no downlink frames are buffered for it. Once a
  1916. * STA exceeds the maximum idle inactive time, the AP will send an
  1917. * 802.11 data-null as a keep alive to verify the STA is still
  1918. * associated. If the STA does ACK the data-null, or if the data-null
  1919. * is buffered and the STA does not retrieve it, the STA will be
  1920. * considered unresponsive
  1921. * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
  1922. */
  1923. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  1924. /*
  1925. * An associated STA is considered unresponsive if there is no recent
  1926. * TX/RX activity and downlink frames are buffered for it. Once a STA
  1927. * exceeds the maximum unresponsive time, the AP will send a
  1928. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  1929. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  1930. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  1931. WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
  1932. /* Enable/Disable RTS-CTS */
  1933. WMI_VDEV_PARAM_ENABLE_RTSCTS,
  1934. /* Enable TXBFee/er */
  1935. WMI_VDEV_PARAM_TXBF,
  1936. /* Set packet power save */
  1937. WMI_VDEV_PARAM_PACKET_POWERSAVE,
  1938. /*
  1939. * Drops un-encrypted packets if eceived in an encrypted connection
  1940. * otherwise forwards to host.
  1941. */
  1942. WMI_VDEV_PARAM_DROP_UNENCRY,
  1943. /*
  1944. * Set the encapsulation type for frames.
  1945. */
  1946. WMI_VDEV_PARAM_TX_ENCAP_TYPE,
  1947. };
  1948. /* slot time long */
  1949. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  1950. /* slot time short */
  1951. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  1952. /* preablbe long */
  1953. #define WMI_VDEV_PREAMBLE_LONG 0x1
  1954. /* preablbe short */
  1955. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  1956. enum wmi_start_event_param {
  1957. WMI_VDEV_RESP_START_EVENT = 0,
  1958. WMI_VDEV_RESP_RESTART_EVENT,
  1959. };
  1960. struct wmi_vdev_start_response_event {
  1961. __le32 vdev_id;
  1962. __le32 req_id;
  1963. __le32 resp_type; /* %WMI_VDEV_RESP_ */
  1964. __le32 status;
  1965. } __packed;
  1966. struct wmi_vdev_standby_req_event {
  1967. /* unique id identifying the VDEV, generated by the caller */
  1968. __le32 vdev_id;
  1969. } __packed;
  1970. struct wmi_vdev_resume_req_event {
  1971. /* unique id identifying the VDEV, generated by the caller */
  1972. __le32 vdev_id;
  1973. } __packed;
  1974. struct wmi_vdev_stopped_event {
  1975. /* unique id identifying the VDEV, generated by the caller */
  1976. __le32 vdev_id;
  1977. } __packed;
  1978. /*
  1979. * common structure used for simple events
  1980. * (stopped, resume_req, standby response)
  1981. */
  1982. struct wmi_vdev_simple_event {
  1983. /* unique id identifying the VDEV, generated by the caller */
  1984. __le32 vdev_id;
  1985. } __packed;
  1986. /* VDEV start response status codes */
  1987. /* VDEV succesfully started */
  1988. #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
  1989. /* requested VDEV not found */
  1990. #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
  1991. /* unsupported VDEV combination */
  1992. #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
  1993. /* Beacon processing related command and event structures */
  1994. struct wmi_bcn_tx_hdr {
  1995. __le32 vdev_id;
  1996. __le32 tx_rate;
  1997. __le32 tx_power;
  1998. __le32 bcn_len;
  1999. } __packed;
  2000. struct wmi_bcn_tx_cmd {
  2001. struct wmi_bcn_tx_hdr hdr;
  2002. u8 *bcn[0];
  2003. } __packed;
  2004. struct wmi_bcn_tx_arg {
  2005. u32 vdev_id;
  2006. u32 tx_rate;
  2007. u32 tx_power;
  2008. u32 bcn_len;
  2009. const void *bcn;
  2010. };
  2011. /* Beacon filter */
  2012. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  2013. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  2014. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  2015. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  2016. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  2017. struct wmi_bcn_filter_rx_cmd {
  2018. /* Filter ID */
  2019. __le32 bcn_filter_id;
  2020. /* Filter type - wmi_bcn_filter */
  2021. __le32 bcn_filter;
  2022. /* Buffer len */
  2023. __le32 bcn_filter_len;
  2024. /* Filter info (threshold, BSSID, RSSI) */
  2025. u8 *bcn_filter_buf;
  2026. } __packed;
  2027. /* Capabilities and IEs to be passed to firmware */
  2028. struct wmi_bcn_prb_info {
  2029. /* Capabilities */
  2030. __le32 caps;
  2031. /* ERP info */
  2032. __le32 erp;
  2033. /* Advanced capabilities */
  2034. /* HT capabilities */
  2035. /* HT Info */
  2036. /* ibss_dfs */
  2037. /* wpa Info */
  2038. /* rsn Info */
  2039. /* rrm info */
  2040. /* ath_ext */
  2041. /* app IE */
  2042. } __packed;
  2043. struct wmi_bcn_tmpl_cmd {
  2044. /* unique id identifying the VDEV, generated by the caller */
  2045. __le32 vdev_id;
  2046. /* TIM IE offset from the beginning of the template. */
  2047. __le32 tim_ie_offset;
  2048. /* beacon probe capabilities and IEs */
  2049. struct wmi_bcn_prb_info bcn_prb_info;
  2050. /* beacon buffer length */
  2051. __le32 buf_len;
  2052. /* variable length data */
  2053. u8 data[1];
  2054. } __packed;
  2055. struct wmi_prb_tmpl_cmd {
  2056. /* unique id identifying the VDEV, generated by the caller */
  2057. __le32 vdev_id;
  2058. /* beacon probe capabilities and IEs */
  2059. struct wmi_bcn_prb_info bcn_prb_info;
  2060. /* beacon buffer length */
  2061. __le32 buf_len;
  2062. /* Variable length data */
  2063. u8 data[1];
  2064. } __packed;
  2065. enum wmi_sta_ps_mode {
  2066. /* enable power save for the given STA VDEV */
  2067. WMI_STA_PS_MODE_DISABLED = 0,
  2068. /* disable power save for a given STA VDEV */
  2069. WMI_STA_PS_MODE_ENABLED = 1,
  2070. };
  2071. struct wmi_sta_powersave_mode_cmd {
  2072. /* unique id identifying the VDEV, generated by the caller */
  2073. __le32 vdev_id;
  2074. /*
  2075. * Power save mode
  2076. * (see enum wmi_sta_ps_mode)
  2077. */
  2078. __le32 sta_ps_mode;
  2079. } __packed;
  2080. enum wmi_csa_offload_en {
  2081. WMI_CSA_OFFLOAD_DISABLE = 0,
  2082. WMI_CSA_OFFLOAD_ENABLE = 1,
  2083. };
  2084. struct wmi_csa_offload_enable_cmd {
  2085. __le32 vdev_id;
  2086. __le32 csa_offload_enable;
  2087. } __packed;
  2088. struct wmi_csa_offload_chanswitch_cmd {
  2089. __le32 vdev_id;
  2090. struct wmi_channel chan;
  2091. } __packed;
  2092. /*
  2093. * This parameter controls the policy for retrieving frames from AP while the
  2094. * STA is in sleep state.
  2095. *
  2096. * Only takes affect if the sta_ps_mode is enabled
  2097. */
  2098. enum wmi_sta_ps_param_rx_wake_policy {
  2099. /*
  2100. * Wake up when ever there is an RX activity on the VDEV. In this mode
  2101. * the Power save SM(state machine) will come out of sleep by either
  2102. * sending null frame (or) a data frame (with PS==0) in response to TIM
  2103. * bit set in the received beacon frame from AP.
  2104. */
  2105. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  2106. /*
  2107. * Here the power save state machine will not wakeup in response to TIM
  2108. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  2109. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  2110. * access categories are delivery-enabled, the station will send a
  2111. * UAPSD trigger frame, otherwise it will send a PS-Poll.
  2112. */
  2113. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  2114. };
  2115. /*
  2116. * Number of tx frames/beacon that cause the power save SM to wake up.
  2117. *
  2118. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  2119. * meaning, It will cause the SM to never wake up. This is useful if you want
  2120. * to keep the system to sleep all the time for some kind of test mode . host
  2121. * can change this parameter any time. It will affect at the next tx frame.
  2122. */
  2123. enum wmi_sta_ps_param_tx_wake_threshold {
  2124. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  2125. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  2126. /*
  2127. * Values greater than one indicate that many TX attempts per beacon
  2128. * interval before the STA will wake up
  2129. */
  2130. };
  2131. /*
  2132. * The maximum number of PS-Poll frames the FW will send in response to
  2133. * traffic advertised in TIM before waking up (by sending a null frame with PS
  2134. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  2135. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  2136. * parameter is used when the RX wake policy is
  2137. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  2138. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  2139. */
  2140. enum wmi_sta_ps_param_pspoll_count {
  2141. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  2142. /*
  2143. * Values greater than 0 indicate the maximum numer of PS-Poll frames
  2144. * FW will send before waking up.
  2145. */
  2146. };
  2147. /*
  2148. * This will include the delivery and trigger enabled state for every AC.
  2149. * This is the negotiated state with AP. The host MLME needs to set this based
  2150. * on AP capability and the state Set in the association request by the
  2151. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  2152. */
  2153. #define WMI_UAPSD_AC_TYPE_DELI 0
  2154. #define WMI_UAPSD_AC_TYPE_TRIG 1
  2155. #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
  2156. ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
  2157. enum wmi_sta_ps_param_uapsd {
  2158. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  2159. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  2160. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  2161. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  2162. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  2163. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  2164. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  2165. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  2166. };
  2167. enum wmi_sta_powersave_param {
  2168. /*
  2169. * Controls how frames are retrievd from AP while STA is sleeping
  2170. *
  2171. * (see enum wmi_sta_ps_param_rx_wake_policy)
  2172. */
  2173. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  2174. /*
  2175. * The STA will go active after this many TX
  2176. *
  2177. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  2178. */
  2179. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  2180. /*
  2181. * Number of PS-Poll to send before STA wakes up
  2182. *
  2183. * (see enum wmi_sta_ps_param_pspoll_count)
  2184. *
  2185. */
  2186. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  2187. /*
  2188. * TX/RX inactivity time in msec before going to sleep.
  2189. *
  2190. * The power save SM will monitor tx/rx activity on the VDEV, if no
  2191. * activity for the specified msec of the parameter the Power save
  2192. * SM will go to sleep.
  2193. */
  2194. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  2195. /*
  2196. * Set uapsd configuration.
  2197. *
  2198. * (see enum wmi_sta_ps_param_uapsd)
  2199. */
  2200. WMI_STA_PS_PARAM_UAPSD = 4,
  2201. };
  2202. struct wmi_sta_powersave_param_cmd {
  2203. __le32 vdev_id;
  2204. __le32 param_id; /* %WMI_STA_PS_PARAM_ */
  2205. __le32 param_value;
  2206. } __packed;
  2207. /* No MIMO power save */
  2208. #define WMI_STA_MIMO_PS_MODE_DISABLE
  2209. /* mimo powersave mode static*/
  2210. #define WMI_STA_MIMO_PS_MODE_STATIC
  2211. /* mimo powersave mode dynamic */
  2212. #define WMI_STA_MIMO_PS_MODE_DYNAMIC
  2213. struct wmi_sta_mimo_ps_mode_cmd {
  2214. /* unique id identifying the VDEV, generated by the caller */
  2215. __le32 vdev_id;
  2216. /* mimo powersave mode as defined above */
  2217. __le32 mimo_pwrsave_mode;
  2218. } __packed;
  2219. /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
  2220. enum wmi_ap_ps_param_uapsd {
  2221. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  2222. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  2223. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  2224. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  2225. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  2226. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  2227. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  2228. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  2229. };
  2230. /* U-APSD maximum service period of peer station */
  2231. enum wmi_ap_ps_peer_param_max_sp {
  2232. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  2233. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  2234. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  2235. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  2236. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  2237. };
  2238. /*
  2239. * AP power save parameter
  2240. * Set a power save specific parameter for a peer station
  2241. */
  2242. enum wmi_ap_ps_peer_param {
  2243. /* Set uapsd configuration for a given peer.
  2244. *
  2245. * Include the delivery and trigger enabled state for every AC.
  2246. * The host MLME needs to set this based on AP capability and stations
  2247. * request Set in the association request received from the station.
  2248. *
  2249. * Lower 8 bits of the value specify the UAPSD configuration.
  2250. *
  2251. * (see enum wmi_ap_ps_param_uapsd)
  2252. * The default value is 0.
  2253. */
  2254. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  2255. /*
  2256. * Set the service period for a UAPSD capable station
  2257. *
  2258. * The service period from wme ie in the (re)assoc request frame.
  2259. *
  2260. * (see enum wmi_ap_ps_peer_param_max_sp)
  2261. */
  2262. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  2263. /* Time in seconds for aging out buffered frames for STA in PS */
  2264. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  2265. };
  2266. struct wmi_ap_ps_peer_cmd {
  2267. /* unique id identifying the VDEV, generated by the caller */
  2268. __le32 vdev_id;
  2269. /* peer MAC address */
  2270. struct wmi_mac_addr peer_macaddr;
  2271. /* AP powersave param (see enum wmi_ap_ps_peer_param) */
  2272. __le32 param_id;
  2273. /* AP powersave param value */
  2274. __le32 param_value;
  2275. } __packed;
  2276. /* 128 clients = 4 words */
  2277. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  2278. struct wmi_tim_info {
  2279. __le32 tim_len;
  2280. __le32 tim_mcast;
  2281. __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  2282. __le32 tim_changed;
  2283. __le32 tim_num_ps_pending;
  2284. } __packed;
  2285. /* Maximum number of NOA Descriptors supported */
  2286. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
  2287. #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
  2288. #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
  2289. #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
  2290. struct wmi_p2p_noa_info {
  2291. /* Bit 0 - Flag to indicate an update in NOA schedule
  2292. Bits 7-1 - Reserved */
  2293. u8 changed;
  2294. /* NOA index */
  2295. u8 index;
  2296. /* Bit 0 - Opp PS state of the AP
  2297. Bits 1-7 - Ctwindow in TUs */
  2298. u8 ctwindow_oppps;
  2299. /* Number of NOA descriptors */
  2300. u8 num_descriptors;
  2301. struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  2302. } __packed;
  2303. struct wmi_bcn_info {
  2304. struct wmi_tim_info tim_info;
  2305. struct wmi_p2p_noa_info p2p_noa_info;
  2306. } __packed;
  2307. struct wmi_host_swba_event {
  2308. __le32 vdev_map;
  2309. struct wmi_bcn_info bcn_info[1];
  2310. } __packed;
  2311. #define WMI_MAX_AP_VDEV 16
  2312. struct wmi_tbtt_offset_event {
  2313. __le32 vdev_map;
  2314. __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
  2315. } __packed;
  2316. struct wmi_peer_create_cmd {
  2317. __le32 vdev_id;
  2318. struct wmi_mac_addr peer_macaddr;
  2319. } __packed;
  2320. struct wmi_peer_delete_cmd {
  2321. __le32 vdev_id;
  2322. struct wmi_mac_addr peer_macaddr;
  2323. } __packed;
  2324. struct wmi_peer_flush_tids_cmd {
  2325. __le32 vdev_id;
  2326. struct wmi_mac_addr peer_macaddr;
  2327. __le32 peer_tid_bitmap;
  2328. } __packed;
  2329. struct wmi_fixed_rate {
  2330. /*
  2331. * rate mode . 0: disable fixed rate (auto rate)
  2332. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  2333. * 2: ht20 11n rate specified as mcs index
  2334. * 3: ht40 11n rate specified as mcs index
  2335. */
  2336. __le32 rate_mode;
  2337. /*
  2338. * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  2339. * and series 3 is stored at byte 3 (MSB)
  2340. */
  2341. __le32 rate_series;
  2342. /*
  2343. * 4 retry counts for 4 rate series. retry count for rate 0 is stored
  2344. * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
  2345. * (MSB)
  2346. */
  2347. __le32 rate_retries;
  2348. } __packed;
  2349. struct wmi_peer_fixed_rate_cmd {
  2350. /* unique id identifying the VDEV, generated by the caller */
  2351. __le32 vdev_id;
  2352. /* peer MAC address */
  2353. struct wmi_mac_addr peer_macaddr;
  2354. /* fixed rate */
  2355. struct wmi_fixed_rate peer_fixed_rate;
  2356. } __packed;
  2357. #define WMI_MGMT_TID 17
  2358. struct wmi_addba_clear_resp_cmd {
  2359. /* unique id identifying the VDEV, generated by the caller */
  2360. __le32 vdev_id;
  2361. /* peer MAC address */
  2362. struct wmi_mac_addr peer_macaddr;
  2363. } __packed;
  2364. struct wmi_addba_send_cmd {
  2365. /* unique id identifying the VDEV, generated by the caller */
  2366. __le32 vdev_id;
  2367. /* peer MAC address */
  2368. struct wmi_mac_addr peer_macaddr;
  2369. /* Tid number */
  2370. __le32 tid;
  2371. /* Buffer/Window size*/
  2372. __le32 buffersize;
  2373. } __packed;
  2374. struct wmi_delba_send_cmd {
  2375. /* unique id identifying the VDEV, generated by the caller */
  2376. __le32 vdev_id;
  2377. /* peer MAC address */
  2378. struct wmi_mac_addr peer_macaddr;
  2379. /* Tid number */
  2380. __le32 tid;
  2381. /* Is Initiator */
  2382. __le32 initiator;
  2383. /* Reason code */
  2384. __le32 reasoncode;
  2385. } __packed;
  2386. struct wmi_addba_setresponse_cmd {
  2387. /* unique id identifying the vdev, generated by the caller */
  2388. __le32 vdev_id;
  2389. /* peer mac address */
  2390. struct wmi_mac_addr peer_macaddr;
  2391. /* Tid number */
  2392. __le32 tid;
  2393. /* status code */
  2394. __le32 statuscode;
  2395. } __packed;
  2396. struct wmi_send_singleamsdu_cmd {
  2397. /* unique id identifying the vdev, generated by the caller */
  2398. __le32 vdev_id;
  2399. /* peer mac address */
  2400. struct wmi_mac_addr peer_macaddr;
  2401. /* Tid number */
  2402. __le32 tid;
  2403. } __packed;
  2404. enum wmi_peer_smps_state {
  2405. WMI_PEER_SMPS_PS_NONE = 0x0,
  2406. WMI_PEER_SMPS_STATIC = 0x1,
  2407. WMI_PEER_SMPS_DYNAMIC = 0x2
  2408. };
  2409. enum wmi_peer_param {
  2410. WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
  2411. WMI_PEER_AMPDU = 0x2,
  2412. WMI_PEER_AUTHORIZE = 0x3,
  2413. WMI_PEER_CHAN_WIDTH = 0x4,
  2414. WMI_PEER_NSS = 0x5,
  2415. WMI_PEER_USE_4ADDR = 0x6
  2416. };
  2417. struct wmi_peer_set_param_cmd {
  2418. __le32 vdev_id;
  2419. struct wmi_mac_addr peer_macaddr;
  2420. __le32 param_id;
  2421. __le32 param_value;
  2422. } __packed;
  2423. #define MAX_SUPPORTED_RATES 128
  2424. struct wmi_rate_set {
  2425. /* total number of rates */
  2426. __le32 num_rates;
  2427. /*
  2428. * rates (each 8bit value) packed into a 32 bit word.
  2429. * the rates are filled from least significant byte to most
  2430. * significant byte.
  2431. */
  2432. __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
  2433. } __packed;
  2434. struct wmi_rate_set_arg {
  2435. unsigned int num_rates;
  2436. u8 rates[MAX_SUPPORTED_RATES];
  2437. };
  2438. /*
  2439. * NOTE: It would bea good idea to represent the Tx MCS
  2440. * info in one word and Rx in another word. This is split
  2441. * into multiple words for convenience
  2442. */
  2443. struct wmi_vht_rate_set {
  2444. __le32 rx_max_rate; /* Max Rx data rate */
  2445. __le32 rx_mcs_set; /* Negotiated RX VHT rates */
  2446. __le32 tx_max_rate; /* Max Tx data rate */
  2447. __le32 tx_mcs_set; /* Negotiated TX VHT rates */
  2448. } __packed;
  2449. struct wmi_vht_rate_set_arg {
  2450. u32 rx_max_rate;
  2451. u32 rx_mcs_set;
  2452. u32 tx_max_rate;
  2453. u32 tx_mcs_set;
  2454. };
  2455. struct wmi_peer_set_rates_cmd {
  2456. /* peer MAC address */
  2457. struct wmi_mac_addr peer_macaddr;
  2458. /* legacy rate set */
  2459. struct wmi_rate_set peer_legacy_rates;
  2460. /* ht rate set */
  2461. struct wmi_rate_set peer_ht_rates;
  2462. } __packed;
  2463. struct wmi_peer_set_q_empty_callback_cmd {
  2464. /* unique id identifying the VDEV, generated by the caller */
  2465. __le32 vdev_id;
  2466. /* peer MAC address */
  2467. struct wmi_mac_addr peer_macaddr;
  2468. __le32 callback_enable;
  2469. } __packed;
  2470. #define WMI_PEER_AUTH 0x00000001
  2471. #define WMI_PEER_QOS 0x00000002
  2472. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004
  2473. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010
  2474. #define WMI_PEER_APSD 0x00000800
  2475. #define WMI_PEER_HT 0x00001000
  2476. #define WMI_PEER_40MHZ 0x00002000
  2477. #define WMI_PEER_STBC 0x00008000
  2478. #define WMI_PEER_LDPC 0x00010000
  2479. #define WMI_PEER_DYN_MIMOPS 0x00020000
  2480. #define WMI_PEER_STATIC_MIMOPS 0x00040000
  2481. #define WMI_PEER_SPATIAL_MUX 0x00200000
  2482. #define WMI_PEER_VHT 0x02000000
  2483. #define WMI_PEER_80MHZ 0x04000000
  2484. #define WMI_PEER_PMF 0x08000000
  2485. /*
  2486. * Peer rate capabilities.
  2487. *
  2488. * This is of interest to the ratecontrol
  2489. * module which resides in the firmware. The bit definitions are
  2490. * consistent with that defined in if_athrate.c.
  2491. */
  2492. #define WMI_RC_DS_FLAG 0x01
  2493. #define WMI_RC_CW40_FLAG 0x02
  2494. #define WMI_RC_SGI_FLAG 0x04
  2495. #define WMI_RC_HT_FLAG 0x08
  2496. #define WMI_RC_RTSCTS_FLAG 0x10
  2497. #define WMI_RC_TX_STBC_FLAG 0x20
  2498. #define WMI_RC_RX_STBC_FLAG 0xC0
  2499. #define WMI_RC_RX_STBC_FLAG_S 6
  2500. #define WMI_RC_WEP_TKIP_FLAG 0x100
  2501. #define WMI_RC_TS_FLAG 0x200
  2502. #define WMI_RC_UAPSD_FLAG 0x400
  2503. /* Maximum listen interval supported by hw in units of beacon interval */
  2504. #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
  2505. struct wmi_peer_assoc_complete_cmd {
  2506. struct wmi_mac_addr peer_macaddr;
  2507. __le32 vdev_id;
  2508. __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
  2509. __le32 peer_associd; /* 16 LSBs */
  2510. __le32 peer_flags;
  2511. __le32 peer_caps; /* 16 LSBs */
  2512. __le32 peer_listen_intval;
  2513. __le32 peer_ht_caps;
  2514. __le32 peer_max_mpdu;
  2515. __le32 peer_mpdu_density; /* 0..16 */
  2516. __le32 peer_rate_caps;
  2517. struct wmi_rate_set peer_legacy_rates;
  2518. struct wmi_rate_set peer_ht_rates;
  2519. __le32 peer_nss; /* num of spatial streams */
  2520. __le32 peer_vht_caps;
  2521. __le32 peer_phymode;
  2522. struct wmi_vht_rate_set peer_vht_rates;
  2523. /* HT Operation Element of the peer. Five bytes packed in 2
  2524. * INT32 array and filled from lsb to msb. */
  2525. __le32 peer_ht_info[2];
  2526. } __packed;
  2527. struct wmi_peer_assoc_complete_arg {
  2528. u8 addr[ETH_ALEN];
  2529. u32 vdev_id;
  2530. bool peer_reassoc;
  2531. u16 peer_aid;
  2532. u32 peer_flags; /* see %WMI_PEER_ */
  2533. u16 peer_caps;
  2534. u32 peer_listen_intval;
  2535. u32 peer_ht_caps;
  2536. u32 peer_max_mpdu;
  2537. u32 peer_mpdu_density; /* 0..16 */
  2538. u32 peer_rate_caps; /* see %WMI_RC_ */
  2539. struct wmi_rate_set_arg peer_legacy_rates;
  2540. struct wmi_rate_set_arg peer_ht_rates;
  2541. u32 peer_num_spatial_streams;
  2542. u32 peer_vht_caps;
  2543. enum wmi_phy_mode peer_phymode;
  2544. struct wmi_vht_rate_set_arg peer_vht_rates;
  2545. };
  2546. struct wmi_peer_add_wds_entry_cmd {
  2547. /* peer MAC address */
  2548. struct wmi_mac_addr peer_macaddr;
  2549. /* wds MAC addr */
  2550. struct wmi_mac_addr wds_macaddr;
  2551. } __packed;
  2552. struct wmi_peer_remove_wds_entry_cmd {
  2553. /* wds MAC addr */
  2554. struct wmi_mac_addr wds_macaddr;
  2555. } __packed;
  2556. struct wmi_peer_q_empty_callback_event {
  2557. /* peer MAC address */
  2558. struct wmi_mac_addr peer_macaddr;
  2559. } __packed;
  2560. /*
  2561. * Channel info WMI event
  2562. */
  2563. struct wmi_chan_info_event {
  2564. __le32 err_code;
  2565. __le32 freq;
  2566. __le32 cmd_flags;
  2567. __le32 noise_floor;
  2568. __le32 rx_clear_count;
  2569. __le32 cycle_count;
  2570. } __packed;
  2571. #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
  2572. /* FIXME: empirically extrapolated */
  2573. #define WMI_CHAN_INFO_MSEC(x) ((x) / 76595)
  2574. /* Beacon filter wmi command info */
  2575. #define BCN_FLT_MAX_SUPPORTED_IES 256
  2576. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
  2577. struct bss_bcn_stats {
  2578. __le32 vdev_id;
  2579. __le32 bss_bcnsdropped;
  2580. __le32 bss_bcnsdelivered;
  2581. } __packed;
  2582. struct bcn_filter_stats {
  2583. __le32 bcns_dropped;
  2584. __le32 bcns_delivered;
  2585. __le32 activefilters;
  2586. struct bss_bcn_stats bss_stats;
  2587. } __packed;
  2588. struct wmi_add_bcn_filter_cmd {
  2589. u32 vdev_id;
  2590. u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  2591. } __packed;
  2592. enum wmi_sta_keepalive_method {
  2593. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
  2594. WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
  2595. };
  2596. /* note: ip4 addresses are in network byte order, i.e. big endian */
  2597. struct wmi_sta_keepalive_arp_resp {
  2598. __be32 src_ip4_addr;
  2599. __be32 dest_ip4_addr;
  2600. struct wmi_mac_addr dest_mac_addr;
  2601. } __packed;
  2602. struct wmi_sta_keepalive_cmd {
  2603. __le32 vdev_id;
  2604. __le32 enabled;
  2605. __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
  2606. __le32 interval; /* in seconds */
  2607. struct wmi_sta_keepalive_arp_resp arp_resp;
  2608. } __packed;
  2609. enum wmi_force_fw_hang_type {
  2610. WMI_FORCE_FW_HANG_ASSERT = 1,
  2611. WMI_FORCE_FW_HANG_NO_DETECT,
  2612. WMI_FORCE_FW_HANG_CTRL_EP_FULL,
  2613. WMI_FORCE_FW_HANG_EMPTY_POINT,
  2614. WMI_FORCE_FW_HANG_STACK_OVERFLOW,
  2615. WMI_FORCE_FW_HANG_INFINITE_LOOP,
  2616. };
  2617. #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
  2618. struct wmi_force_fw_hang_cmd {
  2619. __le32 type;
  2620. __le32 delay_ms;
  2621. } __packed;
  2622. #define ATH10K_RTS_MAX 2347
  2623. #define ATH10K_FRAGMT_THRESHOLD_MIN 540
  2624. #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
  2625. #define WMI_MAX_EVENT 0x1000
  2626. /* Maximum number of pending TXed WMI packets */
  2627. #define WMI_MAX_PENDING_TX_COUNT 128
  2628. #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
  2629. /* By default disable power save for IBSS */
  2630. #define ATH10K_DEFAULT_ATIM 0
  2631. struct ath10k;
  2632. struct ath10k_vif;
  2633. int ath10k_wmi_attach(struct ath10k *ar);
  2634. void ath10k_wmi_detach(struct ath10k *ar);
  2635. int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
  2636. int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
  2637. void ath10k_wmi_flush_tx(struct ath10k *ar);
  2638. int ath10k_wmi_connect_htc_service(struct ath10k *ar);
  2639. int ath10k_wmi_pdev_set_channel(struct ath10k *ar,
  2640. const struct wmi_channel_arg *);
  2641. int ath10k_wmi_pdev_suspend_target(struct ath10k *ar);
  2642. int ath10k_wmi_pdev_resume_target(struct ath10k *ar);
  2643. int ath10k_wmi_pdev_set_regdomain(struct ath10k *ar, u16 rd, u16 rd2g,
  2644. u16 rd5g, u16 ctl2g, u16 ctl5g);
  2645. int ath10k_wmi_pdev_set_param(struct ath10k *ar, enum wmi_pdev_param id,
  2646. u32 value);
  2647. int ath10k_wmi_cmd_init(struct ath10k *ar);
  2648. int ath10k_wmi_start_scan(struct ath10k *ar, const struct wmi_start_scan_arg *);
  2649. void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
  2650. int ath10k_wmi_stop_scan(struct ath10k *ar,
  2651. const struct wmi_stop_scan_arg *arg);
  2652. int ath10k_wmi_vdev_create(struct ath10k *ar, u32 vdev_id,
  2653. enum wmi_vdev_type type,
  2654. enum wmi_vdev_subtype subtype,
  2655. const u8 macaddr[ETH_ALEN]);
  2656. int ath10k_wmi_vdev_delete(struct ath10k *ar, u32 vdev_id);
  2657. int ath10k_wmi_vdev_start(struct ath10k *ar,
  2658. const struct wmi_vdev_start_request_arg *);
  2659. int ath10k_wmi_vdev_restart(struct ath10k *ar,
  2660. const struct wmi_vdev_start_request_arg *);
  2661. int ath10k_wmi_vdev_stop(struct ath10k *ar, u32 vdev_id);
  2662. int ath10k_wmi_vdev_up(struct ath10k *ar, u32 vdev_id, u32 aid,
  2663. const u8 *bssid);
  2664. int ath10k_wmi_vdev_down(struct ath10k *ar, u32 vdev_id);
  2665. int ath10k_wmi_vdev_set_param(struct ath10k *ar, u32 vdev_id,
  2666. enum wmi_vdev_param param_id, u32 param_value);
  2667. int ath10k_wmi_vdev_install_key(struct ath10k *ar,
  2668. const struct wmi_vdev_install_key_arg *arg);
  2669. int ath10k_wmi_peer_create(struct ath10k *ar, u32 vdev_id,
  2670. const u8 peer_addr[ETH_ALEN]);
  2671. int ath10k_wmi_peer_delete(struct ath10k *ar, u32 vdev_id,
  2672. const u8 peer_addr[ETH_ALEN]);
  2673. int ath10k_wmi_peer_flush(struct ath10k *ar, u32 vdev_id,
  2674. const u8 peer_addr[ETH_ALEN], u32 tid_bitmap);
  2675. int ath10k_wmi_peer_set_param(struct ath10k *ar, u32 vdev_id,
  2676. const u8 *peer_addr,
  2677. enum wmi_peer_param param_id, u32 param_value);
  2678. int ath10k_wmi_peer_assoc(struct ath10k *ar,
  2679. const struct wmi_peer_assoc_complete_arg *arg);
  2680. int ath10k_wmi_set_psmode(struct ath10k *ar, u32 vdev_id,
  2681. enum wmi_sta_ps_mode psmode);
  2682. int ath10k_wmi_set_sta_ps_param(struct ath10k *ar, u32 vdev_id,
  2683. enum wmi_sta_powersave_param param_id,
  2684. u32 value);
  2685. int ath10k_wmi_set_ap_ps_param(struct ath10k *ar, u32 vdev_id, const u8 *mac,
  2686. enum wmi_ap_ps_peer_param param_id, u32 value);
  2687. int ath10k_wmi_scan_chan_list(struct ath10k *ar,
  2688. const struct wmi_scan_chan_list_arg *arg);
  2689. int ath10k_wmi_beacon_send(struct ath10k *ar, const struct wmi_bcn_tx_arg *arg);
  2690. int ath10k_wmi_pdev_set_wmm_params(struct ath10k *ar,
  2691. const struct wmi_pdev_set_wmm_params_arg *arg);
  2692. int ath10k_wmi_request_stats(struct ath10k *ar, enum wmi_stats_id stats_id);
  2693. int ath10k_wmi_force_fw_hang(struct ath10k *ar,
  2694. enum wmi_force_fw_hang_type type, u32 delay_ms);
  2695. #endif /* _WMI_H_ */