wmi.h 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586
  1. /*
  2. * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
  3. * Copyright (c) 2006-2012 Wilocity
  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. /*
  18. * This file contains the definitions of the WMI protocol specified in the
  19. * Wireless Module Interface (WMI) for the Qualcomm
  20. * 60 GHz wireless solution.
  21. * It includes definitions of all the commands and events.
  22. * Commands are messages from the host to the WM.
  23. * Events are messages from the WM to the host.
  24. *
  25. * This is an automatically generated file.
  26. */
  27. #ifndef __WILOCITY_WMI_H__
  28. #define __WILOCITY_WMI_H__
  29. /* General */
  30. #define WMI_MAX_ASSOC_STA (8)
  31. #define WMI_DEFAULT_ASSOC_STA (1)
  32. #define WMI_MAC_LEN (6)
  33. #define WMI_PROX_RANGE_NUM (3)
  34. #define WMI_MAX_LOSS_DMG_BEACONS (20)
  35. #define MAX_NUM_OF_SECTORS (128)
  36. /* Mailbox interface
  37. * used for commands and events
  38. */
  39. enum wmi_mid {
  40. MID_DEFAULT = 0x00,
  41. FIRST_DBG_MID_ID = 0x10,
  42. LAST_DBG_MID_ID = 0xFE,
  43. MID_BROADCAST = 0xFF,
  44. };
  45. /* FW capability IDs
  46. * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
  47. * the host
  48. */
  49. enum wmi_fw_capability {
  50. WMI_FW_CAPABILITY_FTM = 0,
  51. WMI_FW_CAPABILITY_PS_CONFIG = 1,
  52. WMI_FW_CAPABILITY_RF_SECTORS = 2,
  53. WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3,
  54. WMI_FW_CAPABILITY_DISABLE_AP_SME = 4,
  55. WMI_FW_CAPABILITY_WMI_ONLY = 5,
  56. WMI_FW_CAPABILITY_MAX,
  57. };
  58. /* WMI_CMD_HDR */
  59. struct wmi_cmd_hdr {
  60. u8 mid;
  61. u8 reserved;
  62. __le16 command_id;
  63. __le32 fw_timestamp;
  64. } __packed;
  65. /* List of Commands */
  66. enum wmi_command_id {
  67. WMI_CONNECT_CMDID = 0x01,
  68. WMI_DISCONNECT_CMDID = 0x03,
  69. WMI_DISCONNECT_STA_CMDID = 0x04,
  70. WMI_START_SCAN_CMDID = 0x07,
  71. WMI_SET_BSS_FILTER_CMDID = 0x09,
  72. WMI_SET_PROBED_SSID_CMDID = 0x0A,
  73. WMI_SET_LISTEN_INT_CMDID = 0x0B,
  74. WMI_BCON_CTRL_CMDID = 0x0F,
  75. WMI_ADD_CIPHER_KEY_CMDID = 0x16,
  76. WMI_DELETE_CIPHER_KEY_CMDID = 0x17,
  77. WMI_PCP_CONF_CMDID = 0x18,
  78. WMI_SET_APPIE_CMDID = 0x3F,
  79. WMI_SET_WSC_STATUS_CMDID = 0x41,
  80. WMI_PXMT_RANGE_CFG_CMDID = 0x42,
  81. WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43,
  82. WMI_MEM_READ_CMDID = 0x800,
  83. WMI_MEM_WR_CMDID = 0x801,
  84. WMI_ECHO_CMDID = 0x803,
  85. WMI_DEEP_ECHO_CMDID = 0x804,
  86. WMI_CONFIG_MAC_CMDID = 0x805,
  87. WMI_CONFIG_PHY_DEBUG_CMDID = 0x806,
  88. WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808,
  89. WMI_PHY_GET_STATISTICS_CMDID = 0x809,
  90. WMI_FS_TUNE_CMDID = 0x80A,
  91. WMI_CORR_MEASURE_CMDID = 0x80B,
  92. WMI_READ_RSSI_CMDID = 0x80C,
  93. WMI_TEMP_SENSE_CMDID = 0x80E,
  94. WMI_DC_CALIB_CMDID = 0x80F,
  95. WMI_SEND_TONE_CMDID = 0x810,
  96. WMI_IQ_TX_CALIB_CMDID = 0x811,
  97. WMI_IQ_RX_CALIB_CMDID = 0x812,
  98. WMI_SET_UCODE_IDLE_CMDID = 0x813,
  99. WMI_SET_WORK_MODE_CMDID = 0x815,
  100. WMI_LO_LEAKAGE_CALIB_CMDID = 0x816,
  101. WMI_MARLON_R_READ_CMDID = 0x818,
  102. WMI_MARLON_R_WRITE_CMDID = 0x819,
  103. WMI_MARLON_R_TXRX_SEL_CMDID = 0x81A,
  104. MAC_IO_STATIC_PARAMS_CMDID = 0x81B,
  105. MAC_IO_DYNAMIC_PARAMS_CMDID = 0x81C,
  106. WMI_SILENT_RSSI_CALIB_CMDID = 0x81D,
  107. WMI_RF_RX_TEST_CMDID = 0x81E,
  108. WMI_CFG_RX_CHAIN_CMDID = 0x820,
  109. WMI_VRING_CFG_CMDID = 0x821,
  110. WMI_BCAST_VRING_CFG_CMDID = 0x822,
  111. WMI_VRING_BA_EN_CMDID = 0x823,
  112. WMI_VRING_BA_DIS_CMDID = 0x824,
  113. WMI_RCP_ADDBA_RESP_CMDID = 0x825,
  114. WMI_RCP_DELBA_CMDID = 0x826,
  115. WMI_SET_SSID_CMDID = 0x827,
  116. WMI_GET_SSID_CMDID = 0x828,
  117. WMI_SET_PCP_CHANNEL_CMDID = 0x829,
  118. WMI_GET_PCP_CHANNEL_CMDID = 0x82A,
  119. WMI_SW_TX_REQ_CMDID = 0x82B,
  120. WMI_READ_MAC_RXQ_CMDID = 0x830,
  121. WMI_READ_MAC_TXQ_CMDID = 0x831,
  122. WMI_WRITE_MAC_RXQ_CMDID = 0x832,
  123. WMI_WRITE_MAC_TXQ_CMDID = 0x833,
  124. WMI_WRITE_MAC_XQ_FIELD_CMDID = 0x834,
  125. WMI_MLME_PUSH_CMDID = 0x835,
  126. WMI_BEAMFORMING_MGMT_CMDID = 0x836,
  127. WMI_BF_TXSS_MGMT_CMDID = 0x837,
  128. WMI_BF_SM_MGMT_CMDID = 0x838,
  129. WMI_BF_RXSS_MGMT_CMDID = 0x839,
  130. WMI_BF_TRIG_CMDID = 0x83A,
  131. WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842,
  132. WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843,
  133. WMI_SET_SECTORS_CMDID = 0x849,
  134. WMI_MAINTAIN_PAUSE_CMDID = 0x850,
  135. WMI_MAINTAIN_RESUME_CMDID = 0x851,
  136. WMI_RS_MGMT_CMDID = 0x852,
  137. WMI_RF_MGMT_CMDID = 0x853,
  138. WMI_THERMAL_THROTTLING_CTRL_CMDID = 0x854,
  139. WMI_THERMAL_THROTTLING_GET_STATUS_CMDID = 0x855,
  140. WMI_OTP_READ_CMDID = 0x856,
  141. WMI_OTP_WRITE_CMDID = 0x857,
  142. WMI_LED_CFG_CMDID = 0x858,
  143. /* Performance monitoring commands */
  144. WMI_BF_CTRL_CMDID = 0x862,
  145. WMI_NOTIFY_REQ_CMDID = 0x863,
  146. WMI_GET_STATUS_CMDID = 0x864,
  147. WMI_GET_RF_STATUS_CMDID = 0x866,
  148. WMI_GET_BASEBAND_TYPE_CMDID = 0x867,
  149. WMI_UNIT_TEST_CMDID = 0x900,
  150. WMI_HICCUP_CMDID = 0x901,
  151. WMI_FLASH_READ_CMDID = 0x902,
  152. WMI_FLASH_WRITE_CMDID = 0x903,
  153. /* Power management */
  154. WMI_TRAFFIC_DEFERRAL_CMDID = 0x904,
  155. WMI_TRAFFIC_RESUME_CMDID = 0x905,
  156. /* P2P */
  157. WMI_P2P_CFG_CMDID = 0x910,
  158. WMI_PORT_ALLOCATE_CMDID = 0x911,
  159. WMI_PORT_DELETE_CMDID = 0x912,
  160. WMI_POWER_MGMT_CFG_CMDID = 0x913,
  161. WMI_START_LISTEN_CMDID = 0x914,
  162. WMI_START_SEARCH_CMDID = 0x915,
  163. WMI_DISCOVERY_START_CMDID = 0x916,
  164. WMI_DISCOVERY_STOP_CMDID = 0x917,
  165. WMI_PCP_START_CMDID = 0x918,
  166. WMI_PCP_STOP_CMDID = 0x919,
  167. WMI_GET_PCP_FACTOR_CMDID = 0x91B,
  168. /* Power Save Configuration Commands */
  169. WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C,
  170. /* Not supported yet */
  171. WMI_PS_DEV_CFG_CMDID = 0x91D,
  172. /* Not supported yet */
  173. WMI_PS_DEV_CFG_READ_CMDID = 0x91E,
  174. /* Per MAC Power Save Configuration commands
  175. * Not supported yet
  176. */
  177. WMI_PS_MID_CFG_CMDID = 0x91F,
  178. /* Not supported yet */
  179. WMI_PS_MID_CFG_READ_CMDID = 0x920,
  180. WMI_RS_CFG_CMDID = 0x921,
  181. WMI_GET_DETAILED_RS_RES_CMDID = 0x922,
  182. WMI_AOA_MEAS_CMDID = 0x923,
  183. WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924,
  184. WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930,
  185. WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931,
  186. WMI_NEW_STA_CMDID = 0x935,
  187. WMI_DEL_STA_CMDID = 0x936,
  188. WMI_TOF_SESSION_START_CMDID = 0x991,
  189. WMI_TOF_GET_CAPABILITIES_CMDID = 0x992,
  190. WMI_TOF_SET_LCR_CMDID = 0x993,
  191. WMI_TOF_SET_LCI_CMDID = 0x994,
  192. WMI_TOF_CHANNEL_INFO_CMDID = 0x995,
  193. WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997,
  194. WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998,
  195. WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0,
  196. WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1,
  197. WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2,
  198. WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3,
  199. WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4,
  200. WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5,
  201. WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6,
  202. WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7,
  203. WMI_SET_MAC_ADDRESS_CMDID = 0xF003,
  204. WMI_ABORT_SCAN_CMDID = 0xF007,
  205. WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041,
  206. WMI_GET_PMK_CMDID = 0xF048,
  207. WMI_SET_PASSPHRASE_CMDID = 0xF049,
  208. WMI_SEND_ASSOC_RES_CMDID = 0xF04A,
  209. WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B,
  210. WMI_MAC_ADDR_REQ_CMDID = 0xF04D,
  211. WMI_FW_VER_CMDID = 0xF04E,
  212. WMI_PMC_CMDID = 0xF04F,
  213. };
  214. /* WMI_CONNECT_CMDID */
  215. enum wmi_network_type {
  216. WMI_NETTYPE_INFRA = 0x01,
  217. WMI_NETTYPE_ADHOC = 0x02,
  218. WMI_NETTYPE_ADHOC_CREATOR = 0x04,
  219. WMI_NETTYPE_AP = 0x10,
  220. WMI_NETTYPE_P2P = 0x20,
  221. /* PCIE over 60g */
  222. WMI_NETTYPE_WBE = 0x40,
  223. };
  224. enum wmi_dot11_auth_mode {
  225. WMI_AUTH11_OPEN = 0x01,
  226. WMI_AUTH11_SHARED = 0x02,
  227. WMI_AUTH11_LEAP = 0x04,
  228. WMI_AUTH11_WSC = 0x08,
  229. };
  230. enum wmi_auth_mode {
  231. WMI_AUTH_NONE = 0x01,
  232. WMI_AUTH_WPA = 0x02,
  233. WMI_AUTH_WPA2 = 0x04,
  234. WMI_AUTH_WPA_PSK = 0x08,
  235. WMI_AUTH_WPA2_PSK = 0x10,
  236. WMI_AUTH_WPA_CCKM = 0x20,
  237. WMI_AUTH_WPA2_CCKM = 0x40,
  238. };
  239. enum wmi_crypto_type {
  240. WMI_CRYPT_NONE = 0x01,
  241. WMI_CRYPT_AES_GCMP = 0x20,
  242. };
  243. enum wmi_connect_ctrl_flag_bits {
  244. WMI_CONNECT_ASSOC_POLICY_USER = 0x01,
  245. WMI_CONNECT_SEND_REASSOC = 0x02,
  246. WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04,
  247. WMI_CONNECT_PROFILE_MATCH_DONE = 0x08,
  248. WMI_CONNECT_IGNORE_AAC_BEACON = 0x10,
  249. WMI_CONNECT_CSA_FOLLOW_BSS = 0x20,
  250. WMI_CONNECT_DO_WPA_OFFLOAD = 0x40,
  251. WMI_CONNECT_DO_NOT_DEAUTH = 0x80,
  252. };
  253. #define WMI_MAX_SSID_LEN (32)
  254. /* WMI_CONNECT_CMDID */
  255. struct wmi_connect_cmd {
  256. u8 network_type;
  257. u8 dot11_auth_mode;
  258. u8 auth_mode;
  259. u8 pairwise_crypto_type;
  260. u8 pairwise_crypto_len;
  261. u8 group_crypto_type;
  262. u8 group_crypto_len;
  263. u8 ssid_len;
  264. u8 ssid[WMI_MAX_SSID_LEN];
  265. u8 channel;
  266. u8 reserved0;
  267. u8 bssid[WMI_MAC_LEN];
  268. __le32 ctrl_flags;
  269. u8 dst_mac[WMI_MAC_LEN];
  270. u8 reserved1[2];
  271. } __packed;
  272. /* WMI_DISCONNECT_STA_CMDID */
  273. struct wmi_disconnect_sta_cmd {
  274. u8 dst_mac[WMI_MAC_LEN];
  275. __le16 disconnect_reason;
  276. } __packed;
  277. #define WMI_MAX_KEY_INDEX (3)
  278. #define WMI_MAX_KEY_LEN (32)
  279. #define WMI_PASSPHRASE_LEN (64)
  280. /* WMI_SET_PASSPHRASE_CMDID */
  281. struct wmi_set_passphrase_cmd {
  282. u8 ssid[WMI_MAX_SSID_LEN];
  283. u8 passphrase[WMI_PASSPHRASE_LEN];
  284. u8 ssid_len;
  285. u8 passphrase_len;
  286. } __packed;
  287. /* WMI_ADD_CIPHER_KEY_CMDID */
  288. enum wmi_key_usage {
  289. WMI_KEY_USE_PAIRWISE = 0x00,
  290. WMI_KEY_USE_RX_GROUP = 0x01,
  291. WMI_KEY_USE_TX_GROUP = 0x02,
  292. };
  293. struct wmi_add_cipher_key_cmd {
  294. u8 key_index;
  295. u8 key_type;
  296. /* enum wmi_key_usage */
  297. u8 key_usage;
  298. u8 key_len;
  299. /* key replay sequence counter */
  300. u8 key_rsc[8];
  301. u8 key[WMI_MAX_KEY_LEN];
  302. /* Additional Key Control information */
  303. u8 key_op_ctrl;
  304. u8 mac[WMI_MAC_LEN];
  305. } __packed;
  306. /* WMI_DELETE_CIPHER_KEY_CMDID */
  307. struct wmi_delete_cipher_key_cmd {
  308. u8 key_index;
  309. u8 mac[WMI_MAC_LEN];
  310. } __packed;
  311. /* WMI_START_SCAN_CMDID
  312. *
  313. * Start L1 scan operation
  314. *
  315. * Returned events:
  316. * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
  317. * - WMI_SCAN_COMPLETE_EVENTID
  318. */
  319. enum wmi_scan_type {
  320. WMI_ACTIVE_SCAN = 0x00,
  321. WMI_SHORT_SCAN = 0x01,
  322. WMI_PASSIVE_SCAN = 0x02,
  323. WMI_DIRECT_SCAN = 0x03,
  324. WMI_LONG_SCAN = 0x04,
  325. };
  326. /* WMI_START_SCAN_CMDID */
  327. struct wmi_start_scan_cmd {
  328. u8 direct_scan_mac_addr[WMI_MAC_LEN];
  329. /* run scan with discovery beacon. Relevant for ACTIVE scan only. */
  330. u8 discovery_mode;
  331. u8 reserved;
  332. /* Max duration in the home channel(ms) */
  333. __le32 dwell_time;
  334. /* Time interval between scans (ms) */
  335. __le32 force_scan_interval;
  336. /* enum wmi_scan_type */
  337. u8 scan_type;
  338. /* how many channels follow */
  339. u8 num_channels;
  340. /* channels ID's:
  341. * 0 - 58320 MHz
  342. * 1 - 60480 MHz
  343. * 2 - 62640 MHz
  344. */
  345. struct {
  346. u8 channel;
  347. u8 reserved;
  348. } channel_list[0];
  349. } __packed;
  350. /* WMI_SET_PROBED_SSID_CMDID */
  351. #define MAX_PROBED_SSID_INDEX (3)
  352. enum wmi_ssid_flag {
  353. /* disables entry */
  354. WMI_SSID_FLAG_DISABLE = 0x00,
  355. /* probes specified ssid */
  356. WMI_SSID_FLAG_SPECIFIC = 0x01,
  357. /* probes for any ssid */
  358. WMI_SSID_FLAG_ANY = 0x02,
  359. };
  360. struct wmi_probed_ssid_cmd {
  361. /* 0 to MAX_PROBED_SSID_INDEX */
  362. u8 entry_index;
  363. /* enum wmi_ssid_flag */
  364. u8 flag;
  365. u8 ssid_len;
  366. u8 ssid[WMI_MAX_SSID_LEN];
  367. } __packed;
  368. /* WMI_SET_APPIE_CMDID
  369. * Add Application specified IE to a management frame
  370. */
  371. #define WMI_MAX_IE_LEN (1024)
  372. /* Frame Types */
  373. enum wmi_mgmt_frame_type {
  374. WMI_FRAME_BEACON = 0x00,
  375. WMI_FRAME_PROBE_REQ = 0x01,
  376. WMI_FRAME_PROBE_RESP = 0x02,
  377. WMI_FRAME_ASSOC_REQ = 0x03,
  378. WMI_FRAME_ASSOC_RESP = 0x04,
  379. WMI_NUM_MGMT_FRAME = 0x05,
  380. };
  381. struct wmi_set_appie_cmd {
  382. /* enum wmi_mgmt_frame_type */
  383. u8 mgmt_frm_type;
  384. u8 reserved;
  385. /* Length of the IE to be added to MGMT frame */
  386. __le16 ie_len;
  387. u8 ie_info[0];
  388. } __packed;
  389. /* WMI_PXMT_RANGE_CFG_CMDID */
  390. struct wmi_pxmt_range_cfg_cmd {
  391. u8 dst_mac[WMI_MAC_LEN];
  392. __le16 range;
  393. } __packed;
  394. /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
  395. struct wmi_pxmt_snr2_range_cfg_cmd {
  396. s8 snr2range_arr[2];
  397. } __packed;
  398. /* WMI_RF_MGMT_CMDID */
  399. enum wmi_rf_mgmt_type {
  400. WMI_RF_MGMT_W_DISABLE = 0x00,
  401. WMI_RF_MGMT_W_ENABLE = 0x01,
  402. WMI_RF_MGMT_GET_STATUS = 0x02,
  403. };
  404. /* WMI_RF_MGMT_CMDID */
  405. struct wmi_rf_mgmt_cmd {
  406. __le32 rf_mgmt_type;
  407. } __packed;
  408. /* WMI_THERMAL_THROTTLING_CTRL_CMDID */
  409. #define THERMAL_THROTTLING_USE_DEFAULT_MAX_TXOP_LENGTH (0xFFFFFFFF)
  410. /* WMI_THERMAL_THROTTLING_CTRL_CMDID */
  411. struct wmi_thermal_throttling_ctrl_cmd {
  412. __le32 time_on_usec;
  413. __le32 time_off_usec;
  414. __le32 max_txop_length_usec;
  415. } __packed;
  416. /* WMI_RF_RX_TEST_CMDID */
  417. struct wmi_rf_rx_test_cmd {
  418. __le32 sector;
  419. } __packed;
  420. /* WMI_CORR_MEASURE_CMDID */
  421. struct wmi_corr_measure_cmd {
  422. __le32 freq_mhz;
  423. __le32 length_samples;
  424. __le32 iterations;
  425. } __packed;
  426. /* WMI_SET_SSID_CMDID */
  427. struct wmi_set_ssid_cmd {
  428. __le32 ssid_len;
  429. u8 ssid[WMI_MAX_SSID_LEN];
  430. } __packed;
  431. /* WMI_SET_PCP_CHANNEL_CMDID */
  432. struct wmi_set_pcp_channel_cmd {
  433. u8 channel;
  434. u8 reserved[3];
  435. } __packed;
  436. /* WMI_BCON_CTRL_CMDID */
  437. struct wmi_bcon_ctrl_cmd {
  438. __le16 bcon_interval;
  439. __le16 frag_num;
  440. __le64 ss_mask;
  441. u8 network_type;
  442. u8 pcp_max_assoc_sta;
  443. u8 disable_sec_offload;
  444. u8 disable_sec;
  445. u8 hidden_ssid;
  446. u8 is_go;
  447. u8 reserved[2];
  448. } __packed;
  449. /* WMI_PORT_ALLOCATE_CMDID */
  450. enum wmi_port_role {
  451. WMI_PORT_STA = 0x00,
  452. WMI_PORT_PCP = 0x01,
  453. WMI_PORT_AP = 0x02,
  454. WMI_PORT_P2P_DEV = 0x03,
  455. WMI_PORT_P2P_CLIENT = 0x04,
  456. WMI_PORT_P2P_GO = 0x05,
  457. };
  458. /* WMI_PORT_ALLOCATE_CMDID */
  459. struct wmi_port_allocate_cmd {
  460. u8 mac[WMI_MAC_LEN];
  461. u8 port_role;
  462. u8 mid;
  463. } __packed;
  464. /* WMI_PORT_DELETE_CMDID */
  465. struct wmi_port_delete_cmd {
  466. u8 mid;
  467. u8 reserved[3];
  468. } __packed;
  469. /* WMI_TRAFFIC_DEFERRAL_CMDID */
  470. struct wmi_traffic_deferral_cmd {
  471. /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
  472. u8 wakeup_trigger;
  473. } __packed;
  474. /* WMI_P2P_CFG_CMDID */
  475. enum wmi_discovery_mode {
  476. WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00,
  477. WMI_DISCOVERY_MODE_OFFLOAD = 0x01,
  478. WMI_DISCOVERY_MODE_PEER2PEER = 0x02,
  479. };
  480. struct wmi_p2p_cfg_cmd {
  481. /* enum wmi_discovery_mode */
  482. u8 discovery_mode;
  483. u8 channel;
  484. /* base to listen/search duration calculation */
  485. __le16 bcon_interval;
  486. } __packed;
  487. /* WMI_POWER_MGMT_CFG_CMDID */
  488. enum wmi_power_source_type {
  489. WMI_POWER_SOURCE_BATTERY = 0x00,
  490. WMI_POWER_SOURCE_OTHER = 0x01,
  491. };
  492. struct wmi_power_mgmt_cfg_cmd {
  493. /* enum wmi_power_source_type */
  494. u8 power_source;
  495. u8 reserved[3];
  496. } __packed;
  497. /* WMI_PCP_START_CMDID */
  498. struct wmi_pcp_start_cmd {
  499. __le16 bcon_interval;
  500. u8 pcp_max_assoc_sta;
  501. u8 hidden_ssid;
  502. u8 is_go;
  503. u8 reserved0[5];
  504. /* abft_len override if non-0 */
  505. u8 abft_len;
  506. u8 disable_ap_sme;
  507. u8 network_type;
  508. u8 channel;
  509. u8 disable_sec_offload;
  510. u8 disable_sec;
  511. } __packed;
  512. /* WMI_SW_TX_REQ_CMDID */
  513. struct wmi_sw_tx_req_cmd {
  514. u8 dst_mac[WMI_MAC_LEN];
  515. __le16 len;
  516. u8 payload[0];
  517. } __packed;
  518. struct wmi_sw_ring_cfg {
  519. __le64 ring_mem_base;
  520. __le16 ring_size;
  521. __le16 max_mpdu_size;
  522. } __packed;
  523. /* wmi_vring_cfg_schd */
  524. struct wmi_vring_cfg_schd {
  525. __le16 priority;
  526. __le16 timeslot_us;
  527. } __packed;
  528. enum wmi_vring_cfg_encap_trans_type {
  529. WMI_VRING_ENC_TYPE_802_3 = 0x00,
  530. WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01,
  531. };
  532. enum wmi_vring_cfg_ds_cfg {
  533. WMI_VRING_DS_PBSS = 0x00,
  534. WMI_VRING_DS_STATION = 0x01,
  535. WMI_VRING_DS_AP = 0x02,
  536. WMI_VRING_DS_ADDR4 = 0x03,
  537. };
  538. enum wmi_vring_cfg_nwifi_ds_trans_type {
  539. WMI_NWIFI_TX_TRANS_MODE_NO = 0x00,
  540. WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01,
  541. WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02,
  542. };
  543. enum wmi_vring_cfg_schd_params_priority {
  544. WMI_SCH_PRIO_REGULAR = 0x00,
  545. WMI_SCH_PRIO_HIGH = 0x01,
  546. };
  547. #define CIDXTID_CID_POS (0)
  548. #define CIDXTID_CID_LEN (4)
  549. #define CIDXTID_CID_MSK (0xF)
  550. #define CIDXTID_TID_POS (4)
  551. #define CIDXTID_TID_LEN (4)
  552. #define CIDXTID_TID_MSK (0xF0)
  553. #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0)
  554. #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1)
  555. #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1)
  556. #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1)
  557. #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1)
  558. #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2)
  559. #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0)
  560. #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6)
  561. #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F)
  562. struct wmi_vring_cfg {
  563. struct wmi_sw_ring_cfg tx_sw_ring;
  564. /* 0-23 vrings */
  565. u8 ringid;
  566. u8 cidxtid;
  567. u8 encap_trans_type;
  568. /* 802.3 DS cfg */
  569. u8 ds_cfg;
  570. u8 nwifi_ds_trans_type;
  571. u8 mac_ctrl;
  572. u8 to_resolution;
  573. u8 agg_max_wsize;
  574. struct wmi_vring_cfg_schd schd_params;
  575. } __packed;
  576. enum wmi_vring_cfg_cmd_action {
  577. WMI_VRING_CMD_ADD = 0x00,
  578. WMI_VRING_CMD_MODIFY = 0x01,
  579. WMI_VRING_CMD_DELETE = 0x02,
  580. };
  581. /* WMI_VRING_CFG_CMDID */
  582. struct wmi_vring_cfg_cmd {
  583. __le32 action;
  584. struct wmi_vring_cfg vring_cfg;
  585. } __packed;
  586. struct wmi_bcast_vring_cfg {
  587. struct wmi_sw_ring_cfg tx_sw_ring;
  588. /* 0-23 vrings */
  589. u8 ringid;
  590. u8 encap_trans_type;
  591. /* 802.3 DS cfg */
  592. u8 ds_cfg;
  593. u8 nwifi_ds_trans_type;
  594. } __packed;
  595. /* WMI_BCAST_VRING_CFG_CMDID */
  596. struct wmi_bcast_vring_cfg_cmd {
  597. __le32 action;
  598. struct wmi_bcast_vring_cfg vring_cfg;
  599. } __packed;
  600. /* WMI_VRING_BA_EN_CMDID */
  601. struct wmi_vring_ba_en_cmd {
  602. u8 ringid;
  603. u8 agg_max_wsize;
  604. __le16 ba_timeout;
  605. u8 amsdu;
  606. u8 reserved[3];
  607. } __packed;
  608. /* WMI_VRING_BA_DIS_CMDID */
  609. struct wmi_vring_ba_dis_cmd {
  610. u8 ringid;
  611. u8 reserved;
  612. __le16 reason;
  613. } __packed;
  614. /* WMI_NOTIFY_REQ_CMDID */
  615. struct wmi_notify_req_cmd {
  616. u8 cid;
  617. u8 year;
  618. u8 month;
  619. u8 day;
  620. __le32 interval_usec;
  621. u8 hour;
  622. u8 minute;
  623. u8 second;
  624. u8 miliseconds;
  625. } __packed;
  626. /* WMI_CFG_RX_CHAIN_CMDID */
  627. enum wmi_sniffer_cfg_mode {
  628. WMI_SNIFFER_OFF = 0x00,
  629. WMI_SNIFFER_ON = 0x01,
  630. };
  631. enum wmi_sniffer_cfg_phy_info_mode {
  632. WMI_SNIFFER_PHY_INFO_DISABLED = 0x00,
  633. WMI_SNIFFER_PHY_INFO_ENABLED = 0x01,
  634. };
  635. enum wmi_sniffer_cfg_phy_support {
  636. WMI_SNIFFER_CP = 0x00,
  637. WMI_SNIFFER_DP = 0x01,
  638. WMI_SNIFFER_BOTH_PHYS = 0x02,
  639. };
  640. /* wmi_sniffer_cfg */
  641. struct wmi_sniffer_cfg {
  642. /* enum wmi_sniffer_cfg_mode */
  643. __le32 mode;
  644. /* enum wmi_sniffer_cfg_phy_info_mode */
  645. __le32 phy_info_mode;
  646. /* enum wmi_sniffer_cfg_phy_support */
  647. __le32 phy_support;
  648. u8 channel;
  649. u8 reserved[3];
  650. } __packed;
  651. enum wmi_cfg_rx_chain_cmd_action {
  652. WMI_RX_CHAIN_ADD = 0x00,
  653. WMI_RX_CHAIN_DEL = 0x01,
  654. };
  655. enum wmi_cfg_rx_chain_cmd_decap_trans_type {
  656. WMI_DECAP_TYPE_802_3 = 0x00,
  657. WMI_DECAP_TYPE_NATIVE_WIFI = 0x01,
  658. WMI_DECAP_TYPE_NONE = 0x02,
  659. };
  660. enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
  661. WMI_NWIFI_RX_TRANS_MODE_NO = 0x00,
  662. WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01,
  663. WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02,
  664. };
  665. enum wmi_cfg_rx_chain_cmd_reorder_type {
  666. WMI_RX_HW_REORDER = 0x00,
  667. WMI_RX_SW_REORDER = 0x01,
  668. };
  669. #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0)
  670. #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1)
  671. #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1)
  672. #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1)
  673. #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1)
  674. #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2)
  675. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0)
  676. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1)
  677. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1)
  678. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1)
  679. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1)
  680. #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2)
  681. #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0)
  682. #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1)
  683. #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1)
  684. #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1)
  685. #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1)
  686. #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2)
  687. #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0)
  688. #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1)
  689. #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1)
  690. #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1)
  691. #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1)
  692. #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2)
  693. #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2)
  694. #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1)
  695. #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4)
  696. #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3)
  697. #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1)
  698. #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8)
  699. /* WMI_CFG_RX_CHAIN_CMDID */
  700. struct wmi_cfg_rx_chain_cmd {
  701. __le32 action;
  702. struct wmi_sw_ring_cfg rx_sw_ring;
  703. u8 mid;
  704. u8 decap_trans_type;
  705. u8 l2_802_3_offload_ctrl;
  706. u8 l2_nwifi_offload_ctrl;
  707. u8 vlan_id;
  708. u8 nwifi_ds_trans_type;
  709. u8 l3_l4_ctrl;
  710. u8 ring_ctrl;
  711. __le16 prefetch_thrsh;
  712. __le16 wb_thrsh;
  713. __le32 itr_value;
  714. __le16 host_thrsh;
  715. u8 reorder_type;
  716. u8 reserved;
  717. struct wmi_sniffer_cfg sniffer_cfg;
  718. __le16 max_rx_pl_per_desc;
  719. } __packed;
  720. /* WMI_RCP_ADDBA_RESP_CMDID */
  721. struct wmi_rcp_addba_resp_cmd {
  722. u8 cidxtid;
  723. u8 dialog_token;
  724. __le16 status_code;
  725. /* ieee80211_ba_parameterset field to send */
  726. __le16 ba_param_set;
  727. __le16 ba_timeout;
  728. } __packed;
  729. /* WMI_RCP_DELBA_CMDID */
  730. struct wmi_rcp_delba_cmd {
  731. u8 cidxtid;
  732. u8 reserved;
  733. __le16 reason;
  734. } __packed;
  735. /* WMI_RCP_ADDBA_REQ_CMDID */
  736. struct wmi_rcp_addba_req_cmd {
  737. u8 cidxtid;
  738. u8 dialog_token;
  739. /* ieee80211_ba_parameterset field as it received */
  740. __le16 ba_param_set;
  741. __le16 ba_timeout;
  742. /* ieee80211_ba_seqstrl field as it received */
  743. __le16 ba_seq_ctrl;
  744. } __packed;
  745. /* WMI_SET_MAC_ADDRESS_CMDID */
  746. struct wmi_set_mac_address_cmd {
  747. u8 mac[WMI_MAC_LEN];
  748. u8 reserved[2];
  749. } __packed;
  750. /* WMI_ECHO_CMDID
  751. * Check FW is alive
  752. * WMI_DEEP_ECHO_CMDID
  753. * Check FW and ucode are alive
  754. * Returned event: WMI_ECHO_RSP_EVENTID
  755. * same event for both commands
  756. */
  757. struct wmi_echo_cmd {
  758. __le32 value;
  759. } __packed;
  760. /* WMI_OTP_READ_CMDID */
  761. struct wmi_otp_read_cmd {
  762. __le32 addr;
  763. __le32 size;
  764. __le32 values;
  765. } __packed;
  766. /* WMI_OTP_WRITE_CMDID */
  767. struct wmi_otp_write_cmd {
  768. __le32 addr;
  769. __le32 size;
  770. __le32 values;
  771. } __packed;
  772. /* WMI_TEMP_SENSE_CMDID
  773. *
  774. * Measure MAC and radio temperatures
  775. *
  776. * Possible modes for temperature measurement
  777. */
  778. enum wmi_temperature_measure_mode {
  779. TEMPERATURE_USE_OLD_VALUE = 0x01,
  780. TEMPERATURE_MEASURE_NOW = 0x02,
  781. };
  782. /* WMI_TEMP_SENSE_CMDID */
  783. struct wmi_temp_sense_cmd {
  784. __le32 measure_baseband_en;
  785. __le32 measure_rf_en;
  786. __le32 measure_mode;
  787. } __packed;
  788. enum wmi_pmc_op {
  789. WMI_PMC_ALLOCATE = 0x00,
  790. WMI_PMC_RELEASE = 0x01,
  791. };
  792. /* WMI_PMC_CMDID */
  793. struct wmi_pmc_cmd {
  794. /* enum wmi_pmc_cmd_op_type */
  795. u8 op;
  796. u8 reserved;
  797. __le16 ring_size;
  798. __le64 mem_base;
  799. } __packed;
  800. enum wmi_aoa_meas_type {
  801. WMI_AOA_PHASE_MEAS = 0x00,
  802. WMI_AOA_PHASE_AMP_MEAS = 0x01,
  803. };
  804. /* WMI_AOA_MEAS_CMDID */
  805. struct wmi_aoa_meas_cmd {
  806. u8 mac_addr[WMI_MAC_LEN];
  807. /* channels IDs:
  808. * 0 - 58320 MHz
  809. * 1 - 60480 MHz
  810. * 2 - 62640 MHz
  811. */
  812. u8 channel;
  813. /* enum wmi_aoa_meas_type */
  814. u8 aoa_meas_type;
  815. __le32 meas_rf_mask;
  816. } __packed;
  817. /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
  818. struct wmi_set_mgmt_retry_limit_cmd {
  819. /* MAC retransmit limit for mgmt frames */
  820. u8 mgmt_retry_limit;
  821. /* alignment to 32b */
  822. u8 reserved[3];
  823. } __packed;
  824. /* WMI_NEW_STA_CMDID */
  825. struct wmi_new_sta_cmd {
  826. u8 dst_mac[WMI_MAC_LEN];
  827. u8 aid;
  828. } __packed;
  829. /* WMI_DEL_STA_CMDID */
  830. struct wmi_del_sta_cmd {
  831. u8 dst_mac[WMI_MAC_LEN];
  832. __le16 disconnect_reason;
  833. } __packed;
  834. enum wmi_tof_burst_duration {
  835. WMI_TOF_BURST_DURATION_250_USEC = 2,
  836. WMI_TOF_BURST_DURATION_500_USEC = 3,
  837. WMI_TOF_BURST_DURATION_1_MSEC = 4,
  838. WMI_TOF_BURST_DURATION_2_MSEC = 5,
  839. WMI_TOF_BURST_DURATION_4_MSEC = 6,
  840. WMI_TOF_BURST_DURATION_8_MSEC = 7,
  841. WMI_TOF_BURST_DURATION_16_MSEC = 8,
  842. WMI_TOF_BURST_DURATION_32_MSEC = 9,
  843. WMI_TOF_BURST_DURATION_64_MSEC = 10,
  844. WMI_TOF_BURST_DURATION_128_MSEC = 11,
  845. WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15,
  846. };
  847. enum wmi_tof_session_start_flags {
  848. WMI_TOF_SESSION_START_FLAG_SECURED = 0x1,
  849. WMI_TOF_SESSION_START_FLAG_ASAP = 0x2,
  850. WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4,
  851. WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8,
  852. };
  853. /* WMI_TOF_SESSION_START_CMDID */
  854. struct wmi_ftm_dest_info {
  855. u8 channel;
  856. /* wmi_tof_session_start_flags_e */
  857. u8 flags;
  858. u8 initial_token;
  859. u8 num_of_ftm_per_burst;
  860. u8 num_of_bursts_exp;
  861. /* wmi_tof_burst_duration_e */
  862. u8 burst_duration;
  863. /* Burst Period indicate interval between two consecutive burst
  864. * instances, in units of 100 ms
  865. */
  866. __le16 burst_period;
  867. u8 dst_mac[WMI_MAC_LEN];
  868. __le16 reserved;
  869. } __packed;
  870. /* WMI_TOF_SESSION_START_CMDID */
  871. struct wmi_tof_session_start_cmd {
  872. __le32 session_id;
  873. u8 num_of_aoa_measures;
  874. u8 aoa_type;
  875. __le16 num_of_dest;
  876. u8 reserved[4];
  877. struct wmi_ftm_dest_info ftm_dest_info[0];
  878. } __packed;
  879. enum wmi_tof_channel_info_report_type {
  880. WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1,
  881. WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2,
  882. WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4,
  883. WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8,
  884. WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10,
  885. };
  886. /* WMI_TOF_CHANNEL_INFO_CMDID */
  887. struct wmi_tof_channel_info_cmd {
  888. /* wmi_tof_channel_info_report_type_e */
  889. __le32 channel_info_report_request;
  890. } __packed;
  891. /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
  892. struct wmi_tof_set_tx_rx_offset_cmd {
  893. /* TX delay offset */
  894. __le32 tx_offset;
  895. /* RX delay offset */
  896. __le32 rx_offset;
  897. __le32 reserved[2];
  898. } __packed;
  899. /* WMI Events
  900. * List of Events (target to host)
  901. */
  902. enum wmi_event_id {
  903. WMI_READY_EVENTID = 0x1001,
  904. WMI_CONNECT_EVENTID = 0x1002,
  905. WMI_DISCONNECT_EVENTID = 0x1003,
  906. WMI_SCAN_COMPLETE_EVENTID = 0x100A,
  907. WMI_REPORT_STATISTICS_EVENTID = 0x100B,
  908. WMI_RD_MEM_RSP_EVENTID = 0x1800,
  909. WMI_FW_READY_EVENTID = 0x1801,
  910. WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200,
  911. WMI_ECHO_RSP_EVENTID = 0x1803,
  912. WMI_FS_TUNE_DONE_EVENTID = 0x180A,
  913. WMI_CORR_MEASURE_EVENTID = 0x180B,
  914. WMI_READ_RSSI_EVENTID = 0x180C,
  915. WMI_TEMP_SENSE_DONE_EVENTID = 0x180E,
  916. WMI_DC_CALIB_DONE_EVENTID = 0x180F,
  917. WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811,
  918. WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812,
  919. WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815,
  920. WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816,
  921. WMI_MARLON_R_READ_DONE_EVENTID = 0x1818,
  922. WMI_MARLON_R_WRITE_DONE_EVENTID = 0x1819,
  923. WMI_MARLON_R_TXRX_SEL_DONE_EVENTID = 0x181A,
  924. WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D,
  925. WMI_RF_RX_TEST_DONE_EVENTID = 0x181E,
  926. WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820,
  927. WMI_VRING_CFG_DONE_EVENTID = 0x1821,
  928. WMI_BA_STATUS_EVENTID = 0x1823,
  929. WMI_RCP_ADDBA_REQ_EVENTID = 0x1824,
  930. WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825,
  931. WMI_DELBA_EVENTID = 0x1826,
  932. WMI_GET_SSID_EVENTID = 0x1828,
  933. WMI_GET_PCP_CHANNEL_EVENTID = 0x182A,
  934. WMI_SW_TX_COMPLETE_EVENTID = 0x182B,
  935. WMI_READ_MAC_RXQ_EVENTID = 0x1830,
  936. WMI_READ_MAC_TXQ_EVENTID = 0x1831,
  937. WMI_WRITE_MAC_RXQ_EVENTID = 0x1832,
  938. WMI_WRITE_MAC_TXQ_EVENTID = 0x1833,
  939. WMI_WRITE_MAC_XQ_FIELD_EVENTID = 0x1834,
  940. WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836,
  941. WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837,
  942. WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839,
  943. WMI_RS_MGMT_DONE_EVENTID = 0x1852,
  944. WMI_RF_MGMT_STATUS_EVENTID = 0x1853,
  945. WMI_THERMAL_THROTTLING_STATUS_EVENTID = 0x1855,
  946. WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838,
  947. WMI_RX_MGMT_PACKET_EVENTID = 0x1840,
  948. WMI_TX_MGMT_PACKET_EVENTID = 0x1841,
  949. WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842,
  950. WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843,
  951. WMI_OTP_READ_RESULT_EVENTID = 0x1856,
  952. WMI_LED_CFG_DONE_EVENTID = 0x1858,
  953. /* Performance monitoring events */
  954. WMI_DATA_PORT_OPEN_EVENTID = 0x1860,
  955. WMI_WBE_LINK_DOWN_EVENTID = 0x1861,
  956. WMI_BF_CTRL_DONE_EVENTID = 0x1862,
  957. WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863,
  958. WMI_GET_STATUS_DONE_EVENTID = 0x1864,
  959. WMI_VRING_EN_EVENTID = 0x1865,
  960. WMI_GET_RF_STATUS_EVENTID = 0x1866,
  961. WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867,
  962. WMI_UNIT_TEST_EVENTID = 0x1900,
  963. WMI_FLASH_READ_DONE_EVENTID = 0x1902,
  964. WMI_FLASH_WRITE_DONE_EVENTID = 0x1903,
  965. /* Power management */
  966. WMI_TRAFFIC_DEFERRAL_EVENTID = 0x1904,
  967. WMI_TRAFFIC_RESUME_EVENTID = 0x1905,
  968. /* P2P */
  969. WMI_P2P_CFG_DONE_EVENTID = 0x1910,
  970. WMI_PORT_ALLOCATED_EVENTID = 0x1911,
  971. WMI_PORT_DELETED_EVENTID = 0x1912,
  972. WMI_LISTEN_STARTED_EVENTID = 0x1914,
  973. WMI_SEARCH_STARTED_EVENTID = 0x1915,
  974. WMI_DISCOVERY_STARTED_EVENTID = 0x1916,
  975. WMI_DISCOVERY_STOPPED_EVENTID = 0x1917,
  976. WMI_PCP_STARTED_EVENTID = 0x1918,
  977. WMI_PCP_STOPPED_EVENTID = 0x1919,
  978. WMI_PCP_FACTOR_EVENTID = 0x191A,
  979. /* Power Save Configuration Events */
  980. WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C,
  981. /* Not supported yet */
  982. WMI_PS_DEV_CFG_EVENTID = 0x191D,
  983. /* Not supported yet */
  984. WMI_PS_DEV_CFG_READ_EVENTID = 0x191E,
  985. /* Not supported yet */
  986. WMI_PS_MID_CFG_EVENTID = 0x191F,
  987. /* Not supported yet */
  988. WMI_PS_MID_CFG_READ_EVENTID = 0x1920,
  989. WMI_RS_CFG_DONE_EVENTID = 0x1921,
  990. WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922,
  991. WMI_AOA_MEAS_EVENTID = 0x1923,
  992. WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924,
  993. WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930,
  994. WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931,
  995. WMI_TOF_SESSION_END_EVENTID = 0x1991,
  996. WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992,
  997. WMI_TOF_SET_LCR_EVENTID = 0x1993,
  998. WMI_TOF_SET_LCI_EVENTID = 0x1994,
  999. WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995,
  1000. WMI_TOF_CHANNEL_INFO_EVENTID = 0x1996,
  1001. WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997,
  1002. WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998,
  1003. WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0,
  1004. WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1,
  1005. WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2,
  1006. WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3,
  1007. WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4,
  1008. WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5,
  1009. WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6,
  1010. WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7,
  1011. WMI_SET_CHANNEL_EVENTID = 0x9000,
  1012. WMI_ASSOC_REQ_EVENTID = 0x9001,
  1013. WMI_EAPOL_RX_EVENTID = 0x9002,
  1014. WMI_MAC_ADDR_RESP_EVENTID = 0x9003,
  1015. WMI_FW_VER_EVENTID = 0x9004,
  1016. WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005,
  1017. };
  1018. /* Events data structures */
  1019. enum wmi_fw_status {
  1020. WMI_FW_STATUS_SUCCESS = 0x00,
  1021. WMI_FW_STATUS_FAILURE = 0x01,
  1022. };
  1023. /* WMI_RF_MGMT_STATUS_EVENTID */
  1024. enum wmi_rf_status {
  1025. WMI_RF_ENABLED = 0x00,
  1026. WMI_RF_DISABLED_HW = 0x01,
  1027. WMI_RF_DISABLED_SW = 0x02,
  1028. WMI_RF_DISABLED_HW_SW = 0x03,
  1029. };
  1030. /* WMI_RF_MGMT_STATUS_EVENTID */
  1031. struct wmi_rf_mgmt_status_event {
  1032. __le32 rf_status;
  1033. } __packed;
  1034. /* WMI_THERMAL_THROTTLING_STATUS_EVENTID */
  1035. struct wmi_thermal_throttling_status_event {
  1036. __le32 time_on_usec;
  1037. __le32 time_off_usec;
  1038. __le32 max_txop_length_usec;
  1039. } __packed;
  1040. /* WMI_GET_STATUS_DONE_EVENTID */
  1041. struct wmi_get_status_done_event {
  1042. __le32 is_associated;
  1043. u8 cid;
  1044. u8 reserved0[3];
  1045. u8 bssid[WMI_MAC_LEN];
  1046. u8 channel;
  1047. u8 reserved1;
  1048. u8 network_type;
  1049. u8 reserved2[3];
  1050. __le32 ssid_len;
  1051. u8 ssid[WMI_MAX_SSID_LEN];
  1052. __le32 rf_status;
  1053. __le32 is_secured;
  1054. } __packed;
  1055. /* WMI_FW_VER_EVENTID */
  1056. struct wmi_fw_ver_event {
  1057. /* FW image version */
  1058. __le32 fw_major;
  1059. __le32 fw_minor;
  1060. __le32 fw_subminor;
  1061. __le32 fw_build;
  1062. /* FW image build time stamp */
  1063. __le32 hour;
  1064. __le32 minute;
  1065. __le32 second;
  1066. __le32 day;
  1067. __le32 month;
  1068. __le32 year;
  1069. /* Boot Loader image version */
  1070. __le32 bl_major;
  1071. __le32 bl_minor;
  1072. __le32 bl_subminor;
  1073. __le32 bl_build;
  1074. /* The number of entries in the FW capabilies array */
  1075. u8 fw_capabilities_len;
  1076. u8 reserved[3];
  1077. /* FW capabilities info
  1078. * Must be the last member of the struct
  1079. */
  1080. __le32 fw_capabilities[0];
  1081. } __packed;
  1082. /* WMI_GET_RF_STATUS_EVENTID */
  1083. enum rf_type {
  1084. RF_UNKNOWN = 0x00,
  1085. RF_MARLON = 0x01,
  1086. RF_SPARROW = 0x02,
  1087. };
  1088. /* WMI_GET_RF_STATUS_EVENTID */
  1089. enum board_file_rf_type {
  1090. BF_RF_MARLON = 0x00,
  1091. BF_RF_SPARROW = 0x01,
  1092. };
  1093. /* WMI_GET_RF_STATUS_EVENTID */
  1094. enum rf_status {
  1095. RF_OK = 0x00,
  1096. RF_NO_COMM = 0x01,
  1097. RF_WRONG_BOARD_FILE = 0x02,
  1098. };
  1099. /* WMI_GET_RF_STATUS_EVENTID */
  1100. struct wmi_get_rf_status_event {
  1101. /* enum rf_type */
  1102. __le32 rf_type;
  1103. /* attached RFs bit vector */
  1104. __le32 attached_rf_vector;
  1105. /* enabled RFs bit vector */
  1106. __le32 enabled_rf_vector;
  1107. /* enum rf_status, refers to enabled RFs */
  1108. u8 rf_status[32];
  1109. /* enum board file RF type */
  1110. __le32 board_file_rf_type;
  1111. /* board file platform type */
  1112. __le32 board_file_platform_type;
  1113. /* board file version */
  1114. __le32 board_file_version;
  1115. __le32 reserved[2];
  1116. } __packed;
  1117. /* WMI_GET_BASEBAND_TYPE_EVENTID */
  1118. enum baseband_type {
  1119. BASEBAND_UNKNOWN = 0x00,
  1120. BASEBAND_SPARROW_M_A0 = 0x03,
  1121. BASEBAND_SPARROW_M_A1 = 0x04,
  1122. BASEBAND_SPARROW_M_B0 = 0x05,
  1123. BASEBAND_SPARROW_M_C0 = 0x06,
  1124. BASEBAND_SPARROW_M_D0 = 0x07,
  1125. BASEBAND_TALYN_M_A0 = 0x08,
  1126. };
  1127. /* WMI_GET_BASEBAND_TYPE_EVENTID */
  1128. struct wmi_get_baseband_type_event {
  1129. /* enum baseband_type */
  1130. __le32 baseband_type;
  1131. } __packed;
  1132. /* WMI_MAC_ADDR_RESP_EVENTID */
  1133. struct wmi_mac_addr_resp_event {
  1134. u8 mac[WMI_MAC_LEN];
  1135. u8 auth_mode;
  1136. u8 crypt_mode;
  1137. __le32 offload_mode;
  1138. } __packed;
  1139. /* WMI_EAPOL_RX_EVENTID */
  1140. struct wmi_eapol_rx_event {
  1141. u8 src_mac[WMI_MAC_LEN];
  1142. __le16 eapol_len;
  1143. u8 eapol[0];
  1144. } __packed;
  1145. /* WMI_READY_EVENTID */
  1146. enum wmi_phy_capability {
  1147. WMI_11A_CAPABILITY = 0x01,
  1148. WMI_11G_CAPABILITY = 0x02,
  1149. WMI_11AG_CAPABILITY = 0x03,
  1150. WMI_11NA_CAPABILITY = 0x04,
  1151. WMI_11NG_CAPABILITY = 0x05,
  1152. WMI_11NAG_CAPABILITY = 0x06,
  1153. WMI_11AD_CAPABILITY = 0x07,
  1154. WMI_11N_CAPABILITY_OFFSET = 0x03,
  1155. };
  1156. struct wmi_ready_event {
  1157. __le32 sw_version;
  1158. __le32 abi_version;
  1159. u8 mac[WMI_MAC_LEN];
  1160. /* enum wmi_phy_capability */
  1161. u8 phy_capability;
  1162. u8 numof_additional_mids;
  1163. } __packed;
  1164. /* WMI_NOTIFY_REQ_DONE_EVENTID */
  1165. struct wmi_notify_req_done_event {
  1166. /* beamforming status, 0: fail; 1: OK; 2: retrying */
  1167. __le32 status;
  1168. __le64 tsf;
  1169. __le32 snr_val;
  1170. __le32 tx_tpt;
  1171. __le32 tx_goodput;
  1172. __le32 rx_goodput;
  1173. __le16 bf_mcs;
  1174. __le16 my_rx_sector;
  1175. __le16 my_tx_sector;
  1176. __le16 other_rx_sector;
  1177. __le16 other_tx_sector;
  1178. __le16 range;
  1179. u8 sqi;
  1180. u8 reserved[3];
  1181. } __packed;
  1182. /* WMI_CONNECT_EVENTID */
  1183. struct wmi_connect_event {
  1184. u8 channel;
  1185. u8 reserved0;
  1186. u8 bssid[WMI_MAC_LEN];
  1187. __le16 listen_interval;
  1188. __le16 beacon_interval;
  1189. u8 network_type;
  1190. u8 reserved1[3];
  1191. u8 beacon_ie_len;
  1192. u8 assoc_req_len;
  1193. u8 assoc_resp_len;
  1194. u8 cid;
  1195. u8 aid;
  1196. u8 reserved2[2];
  1197. /* not in use */
  1198. u8 assoc_info[0];
  1199. } __packed;
  1200. /* disconnect_reason */
  1201. enum wmi_disconnect_reason {
  1202. WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01,
  1203. /* bmiss */
  1204. WMI_DIS_REASON_LOST_LINK = 0x02,
  1205. WMI_DIS_REASON_DISCONNECT_CMD = 0x03,
  1206. WMI_DIS_REASON_BSS_DISCONNECTED = 0x04,
  1207. WMI_DIS_REASON_AUTH_FAILED = 0x05,
  1208. WMI_DIS_REASON_ASSOC_FAILED = 0x06,
  1209. WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07,
  1210. WMI_DIS_REASON_CSERV_DISCONNECT = 0x08,
  1211. WMI_DIS_REASON_INVALID_PROFILE = 0x0A,
  1212. WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B,
  1213. WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C,
  1214. WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D,
  1215. WMI_DIS_REASON_IBSS_MERGE = 0x0E,
  1216. };
  1217. /* WMI_DISCONNECT_EVENTID */
  1218. struct wmi_disconnect_event {
  1219. /* reason code, see 802.11 spec. */
  1220. __le16 protocol_reason_status;
  1221. /* set if known */
  1222. u8 bssid[WMI_MAC_LEN];
  1223. /* see enum wmi_disconnect_reason */
  1224. u8 disconnect_reason;
  1225. /* last assoc req may passed to host - not in used */
  1226. u8 assoc_resp_len;
  1227. /* last assoc req may passed to host - not in used */
  1228. u8 assoc_info[0];
  1229. } __packed;
  1230. /* WMI_SCAN_COMPLETE_EVENTID */
  1231. enum scan_status {
  1232. WMI_SCAN_SUCCESS = 0x00,
  1233. WMI_SCAN_FAILED = 0x01,
  1234. WMI_SCAN_ABORTED = 0x02,
  1235. WMI_SCAN_REJECTED = 0x03,
  1236. WMI_SCAN_ABORT_REJECTED = 0x04,
  1237. };
  1238. struct wmi_scan_complete_event {
  1239. /* enum scan_status */
  1240. __le32 status;
  1241. } __packed;
  1242. /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
  1243. enum wmi_acs_info_bitmask {
  1244. WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01,
  1245. WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02,
  1246. WMI_ACS_INFO_BITMASK_TX_TIME = 0x04,
  1247. WMI_ACS_INFO_BITMASK_RX_TIME = 0x08,
  1248. WMI_ACS_INFO_BITMASK_NOISE = 0x10,
  1249. };
  1250. struct scan_acs_info {
  1251. u8 channel;
  1252. u8 beacon_found;
  1253. /* msec */
  1254. __le16 busy_time;
  1255. __le16 tx_time;
  1256. __le16 rx_time;
  1257. u8 noise;
  1258. u8 reserved[3];
  1259. } __packed;
  1260. struct wmi_acs_passive_scan_complete_event {
  1261. __le32 dwell_time;
  1262. /* valid fields within channel info according to
  1263. * their appearance in struct order
  1264. */
  1265. __le16 filled;
  1266. u8 num_scanned_channels;
  1267. u8 reserved;
  1268. struct scan_acs_info scan_info_list[0];
  1269. } __packed;
  1270. /* WMI_BA_STATUS_EVENTID */
  1271. enum wmi_vring_ba_status {
  1272. WMI_BA_AGREED = 0x00,
  1273. WMI_BA_NON_AGREED = 0x01,
  1274. /* BA_EN in middle of teardown flow */
  1275. WMI_BA_TD_WIP = 0x02,
  1276. /* BA_DIS or BA_EN in middle of BA SETUP flow */
  1277. WMI_BA_SETUP_WIP = 0x03,
  1278. /* BA_EN when the BA session is already active */
  1279. WMI_BA_SESSION_ACTIVE = 0x04,
  1280. /* BA_DIS when the BA session is not active */
  1281. WMI_BA_SESSION_NOT_ACTIVE = 0x05,
  1282. };
  1283. struct wmi_ba_status_event {
  1284. /* enum wmi_vring_ba_status */
  1285. __le16 status;
  1286. u8 reserved[2];
  1287. u8 ringid;
  1288. u8 agg_wsize;
  1289. __le16 ba_timeout;
  1290. u8 amsdu;
  1291. } __packed;
  1292. /* WMI_DELBA_EVENTID */
  1293. struct wmi_delba_event {
  1294. u8 cidxtid;
  1295. u8 from_initiator;
  1296. __le16 reason;
  1297. } __packed;
  1298. /* WMI_VRING_CFG_DONE_EVENTID */
  1299. struct wmi_vring_cfg_done_event {
  1300. u8 ringid;
  1301. u8 status;
  1302. u8 reserved[2];
  1303. __le32 tx_vring_tail_ptr;
  1304. } __packed;
  1305. /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
  1306. struct wmi_rcp_addba_resp_sent_event {
  1307. u8 cidxtid;
  1308. u8 reserved;
  1309. __le16 status;
  1310. } __packed;
  1311. /* WMI_RCP_ADDBA_REQ_EVENTID */
  1312. struct wmi_rcp_addba_req_event {
  1313. u8 cidxtid;
  1314. u8 dialog_token;
  1315. /* ieee80211_ba_parameterset as it received */
  1316. __le16 ba_param_set;
  1317. __le16 ba_timeout;
  1318. /* ieee80211_ba_seqstrl field as it received */
  1319. __le16 ba_seq_ctrl;
  1320. } __packed;
  1321. /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
  1322. enum wmi_cfg_rx_chain_done_event_status {
  1323. WMI_CFG_RX_CHAIN_SUCCESS = 0x01,
  1324. };
  1325. struct wmi_cfg_rx_chain_done_event {
  1326. /* V-Ring Tail pointer */
  1327. __le32 rx_ring_tail_ptr;
  1328. __le32 status;
  1329. } __packed;
  1330. /* WMI_WBE_LINK_DOWN_EVENTID */
  1331. enum wmi_wbe_link_down_event_reason {
  1332. WMI_WBE_REASON_USER_REQUEST = 0x00,
  1333. WMI_WBE_REASON_RX_DISASSOC = 0x01,
  1334. WMI_WBE_REASON_BAD_PHY_LINK = 0x02,
  1335. };
  1336. /* WMI_WBE_LINK_DOWN_EVENTID */
  1337. struct wmi_wbe_link_down_event {
  1338. u8 cid;
  1339. u8 reserved[3];
  1340. __le32 reason;
  1341. } __packed;
  1342. /* WMI_DATA_PORT_OPEN_EVENTID */
  1343. struct wmi_data_port_open_event {
  1344. u8 cid;
  1345. u8 reserved[3];
  1346. } __packed;
  1347. /* WMI_VRING_EN_EVENTID */
  1348. struct wmi_vring_en_event {
  1349. u8 vring_index;
  1350. u8 reserved[3];
  1351. } __packed;
  1352. /* WMI_GET_PCP_CHANNEL_EVENTID */
  1353. struct wmi_get_pcp_channel_event {
  1354. u8 channel;
  1355. u8 reserved[3];
  1356. } __packed;
  1357. /* WMI_P2P_CFG_DONE_EVENTID */
  1358. struct wmi_p2p_cfg_done_event {
  1359. /* wmi_fw_status */
  1360. u8 status;
  1361. u8 reserved[3];
  1362. } __packed;
  1363. /* WMI_PORT_ALLOCATED_EVENTID */
  1364. struct wmi_port_allocated_event {
  1365. /* wmi_fw_status */
  1366. u8 status;
  1367. u8 reserved[3];
  1368. } __packed;
  1369. /* WMI_PORT_DELETED_EVENTID */
  1370. struct wmi_port_deleted_event {
  1371. /* wmi_fw_status */
  1372. u8 status;
  1373. u8 reserved[3];
  1374. } __packed;
  1375. /* WMI_LISTEN_STARTED_EVENTID */
  1376. struct wmi_listen_started_event {
  1377. /* wmi_fw_status */
  1378. u8 status;
  1379. u8 reserved[3];
  1380. } __packed;
  1381. /* WMI_SEARCH_STARTED_EVENTID */
  1382. struct wmi_search_started_event {
  1383. /* wmi_fw_status */
  1384. u8 status;
  1385. u8 reserved[3];
  1386. } __packed;
  1387. /* WMI_PCP_STARTED_EVENTID */
  1388. struct wmi_pcp_started_event {
  1389. /* wmi_fw_status */
  1390. u8 status;
  1391. u8 reserved[3];
  1392. } __packed;
  1393. /* WMI_PCP_FACTOR_EVENTID */
  1394. struct wmi_pcp_factor_event {
  1395. __le32 pcp_factor;
  1396. } __packed;
  1397. enum wmi_sw_tx_status {
  1398. WMI_TX_SW_STATUS_SUCCESS = 0x00,
  1399. WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01,
  1400. WMI_TX_SW_STATUS_FAILED_TX = 0x02,
  1401. };
  1402. /* WMI_SW_TX_COMPLETE_EVENTID */
  1403. struct wmi_sw_tx_complete_event {
  1404. /* enum wmi_sw_tx_status */
  1405. u8 status;
  1406. u8 reserved[3];
  1407. } __packed;
  1408. /* WMI_CORR_MEASURE_EVENTID */
  1409. struct wmi_corr_measure_event {
  1410. /* signed */
  1411. __le32 i;
  1412. /* signed */
  1413. __le32 q;
  1414. /* signed */
  1415. __le32 image_i;
  1416. /* signed */
  1417. __le32 image_q;
  1418. } __packed;
  1419. /* WMI_READ_RSSI_EVENTID */
  1420. struct wmi_read_rssi_event {
  1421. __le32 ina_rssi_adc_dbm;
  1422. } __packed;
  1423. /* WMI_GET_SSID_EVENTID */
  1424. struct wmi_get_ssid_event {
  1425. __le32 ssid_len;
  1426. u8 ssid[WMI_MAX_SSID_LEN];
  1427. } __packed;
  1428. /* wmi_rx_mgmt_info */
  1429. struct wmi_rx_mgmt_info {
  1430. u8 mcs;
  1431. s8 snr;
  1432. u8 range;
  1433. u8 sqi;
  1434. __le16 stype;
  1435. __le16 status;
  1436. __le32 len;
  1437. /* Not resolved when == 0xFFFFFFFF ==> Broadcast to all MIDS */
  1438. u8 qid;
  1439. /* Not resolved when == 0xFFFFFFFF ==> Broadcast to all MIDS */
  1440. u8 mid;
  1441. u8 cid;
  1442. /* From Radio MNGR */
  1443. u8 channel;
  1444. } __packed;
  1445. /* wmi_otp_read_write_cmd */
  1446. struct wmi_otp_read_write_cmd {
  1447. __le32 addr;
  1448. __le32 size;
  1449. u8 values[0];
  1450. } __packed;
  1451. /* WMI_OTP_READ_RESULT_EVENTID */
  1452. struct wmi_otp_read_result_event {
  1453. u8 payload[0];
  1454. } __packed;
  1455. /* WMI_TX_MGMT_PACKET_EVENTID */
  1456. struct wmi_tx_mgmt_packet_event {
  1457. u8 payload[0];
  1458. } __packed;
  1459. /* WMI_RX_MGMT_PACKET_EVENTID */
  1460. struct wmi_rx_mgmt_packet_event {
  1461. struct wmi_rx_mgmt_info info;
  1462. u8 payload[0];
  1463. } __packed;
  1464. /* WMI_ECHO_RSP_EVENTID */
  1465. struct wmi_echo_rsp_event {
  1466. __le32 echoed_value;
  1467. } __packed;
  1468. /* WMI_TEMP_SENSE_DONE_EVENTID
  1469. *
  1470. * Measure MAC and radio temperatures
  1471. */
  1472. struct wmi_temp_sense_done_event {
  1473. /* Temperature times 1000 (actual temperature will be achieved by
  1474. * dividing the value by 1000)
  1475. */
  1476. __le32 baseband_t1000;
  1477. /* Temperature times 1000 (actual temperature will be achieved by
  1478. * dividing the value by 1000)
  1479. */
  1480. __le32 rf_t1000;
  1481. } __packed;
  1482. #define WMI_SCAN_DWELL_TIME_MS (100)
  1483. #define WMI_SURVEY_TIMEOUT_MS (10000)
  1484. enum wmi_hidden_ssid {
  1485. WMI_HIDDEN_SSID_DISABLED = 0x00,
  1486. WMI_HIDDEN_SSID_SEND_EMPTY = 0x10,
  1487. WMI_HIDDEN_SSID_CLEAR = 0xFE,
  1488. };
  1489. /* WMI_LED_CFG_CMDID
  1490. *
  1491. * Configure LED On\Off\Blinking operation
  1492. *
  1493. * Returned events:
  1494. * - WMI_LED_CFG_DONE_EVENTID
  1495. */
  1496. enum led_mode {
  1497. LED_DISABLE = 0x00,
  1498. LED_ENABLE = 0x01,
  1499. };
  1500. /* The names of the led as
  1501. * described on HW schemes.
  1502. */
  1503. enum wmi_led_id {
  1504. WMI_LED_WLAN = 0x00,
  1505. WMI_LED_WPAN = 0x01,
  1506. WMI_LED_WWAN = 0x02,
  1507. };
  1508. /* Led polarity mode. */
  1509. enum wmi_led_polarity {
  1510. LED_POLARITY_HIGH_ACTIVE = 0x00,
  1511. LED_POLARITY_LOW_ACTIVE = 0x01,
  1512. };
  1513. /* Combination of on and off
  1514. * creates the blinking period
  1515. */
  1516. struct wmi_led_blink_mode {
  1517. __le32 blink_on;
  1518. __le32 blink_off;
  1519. } __packed;
  1520. /* WMI_LED_CFG_CMDID */
  1521. struct wmi_led_cfg_cmd {
  1522. /* enum led_mode_e */
  1523. u8 led_mode;
  1524. /* enum wmi_led_id_e */
  1525. u8 id;
  1526. /* slow speed blinking combination */
  1527. struct wmi_led_blink_mode slow_blink_cfg;
  1528. /* medium speed blinking combination */
  1529. struct wmi_led_blink_mode medium_blink_cfg;
  1530. /* high speed blinking combination */
  1531. struct wmi_led_blink_mode fast_blink_cfg;
  1532. /* polarity of the led */
  1533. u8 led_polarity;
  1534. /* reserved */
  1535. u8 reserved;
  1536. } __packed;
  1537. /* WMI_LED_CFG_DONE_EVENTID */
  1538. struct wmi_led_cfg_done_event {
  1539. /* led config status */
  1540. __le32 status;
  1541. } __packed;
  1542. #define WMI_NUM_MCS (13)
  1543. /* Rate search parameters configuration per connection */
  1544. struct wmi_rs_cfg {
  1545. /* The maximal allowed PER for each MCS
  1546. * MCS will be considered as failed if PER during RS is higher
  1547. */
  1548. u8 per_threshold[WMI_NUM_MCS];
  1549. /* Number of MPDUs for each MCS
  1550. * this is the minimal statistic required to make an educated
  1551. * decision
  1552. */
  1553. u8 min_frame_cnt[WMI_NUM_MCS];
  1554. /* stop threshold [0-100] */
  1555. u8 stop_th;
  1556. /* MCS1 stop threshold [0-100] */
  1557. u8 mcs1_fail_th;
  1558. u8 max_back_failure_th;
  1559. /* Debug feature for disabling internal RS trigger (which is
  1560. * currently triggered by BF Done)
  1561. */
  1562. u8 dbg_disable_internal_trigger;
  1563. __le32 back_failure_mask;
  1564. __le32 mcs_en_vec;
  1565. } __packed;
  1566. /* WMI_RS_CFG_CMDID */
  1567. struct wmi_rs_cfg_cmd {
  1568. /* connection id */
  1569. u8 cid;
  1570. /* enable or disable rate search */
  1571. u8 rs_enable;
  1572. /* rate search configuration */
  1573. struct wmi_rs_cfg rs_cfg;
  1574. } __packed;
  1575. /* WMI_RS_CFG_DONE_EVENTID */
  1576. struct wmi_rs_cfg_done_event {
  1577. u8 cid;
  1578. /* enum wmi_fw_status */
  1579. u8 status;
  1580. u8 reserved[2];
  1581. } __packed;
  1582. /* WMI_GET_DETAILED_RS_RES_CMDID */
  1583. struct wmi_get_detailed_rs_res_cmd {
  1584. /* connection id */
  1585. u8 cid;
  1586. u8 reserved[3];
  1587. } __packed;
  1588. /* RS results status */
  1589. enum wmi_rs_results_status {
  1590. WMI_RS_RES_VALID = 0x00,
  1591. WMI_RS_RES_INVALID = 0x01,
  1592. };
  1593. /* Rate search results */
  1594. struct wmi_rs_results {
  1595. /* number of sent MPDUs */
  1596. u8 num_of_tx_pkt[WMI_NUM_MCS];
  1597. /* number of non-acked MPDUs */
  1598. u8 num_of_non_acked_pkt[WMI_NUM_MCS];
  1599. /* RS timestamp */
  1600. __le32 tsf;
  1601. /* RS selected MCS */
  1602. u8 mcs;
  1603. } __packed;
  1604. /* WMI_GET_DETAILED_RS_RES_EVENTID */
  1605. struct wmi_get_detailed_rs_res_event {
  1606. u8 cid;
  1607. /* enum wmi_rs_results_status */
  1608. u8 status;
  1609. /* detailed rs results */
  1610. struct wmi_rs_results rs_results;
  1611. u8 reserved[3];
  1612. } __packed;
  1613. /* BRP antenna limit mode */
  1614. enum wmi_brp_ant_limit_mode {
  1615. /* Disable BRP force antenna limit */
  1616. WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00,
  1617. /* Define maximal antennas limit. Only effective antennas will be
  1618. * actually used
  1619. */
  1620. WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01,
  1621. /* Force a specific number of antennas */
  1622. WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02,
  1623. /* number of BRP antenna limit modes */
  1624. WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03,
  1625. };
  1626. /* WMI_BRP_SET_ANT_LIMIT_CMDID */
  1627. struct wmi_brp_set_ant_limit_cmd {
  1628. /* connection id */
  1629. u8 cid;
  1630. /* enum wmi_brp_ant_limit_mode */
  1631. u8 limit_mode;
  1632. /* antenna limit count, 1-27
  1633. * disable_mode - ignored
  1634. * effective_mode - upper limit to number of antennas to be used
  1635. * force_mode - exact number of antennas to be used
  1636. */
  1637. u8 ant_limit;
  1638. u8 reserved;
  1639. } __packed;
  1640. /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
  1641. struct wmi_brp_set_ant_limit_event {
  1642. /* wmi_fw_status */
  1643. u8 status;
  1644. u8 reserved[3];
  1645. } __packed;
  1646. /* broadcast connection ID */
  1647. #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF)
  1648. /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
  1649. enum wmi_link_maintain_cfg_type {
  1650. /* AP/PCP default normal (non-FST) configuration settings */
  1651. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00,
  1652. /* AP/PCP default FST configuration settings */
  1653. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01,
  1654. /* STA default normal (non-FST) configuration settings */
  1655. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02,
  1656. /* STA default FST configuration settings */
  1657. WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03,
  1658. /* custom configuration settings */
  1659. WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04,
  1660. /* number of defined configuration types */
  1661. WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05,
  1662. };
  1663. /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
  1664. enum wmi_link_maintain_cfg_response_status {
  1665. /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
  1666. */
  1667. WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00,
  1668. /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
  1669. * command request
  1670. */
  1671. WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01,
  1672. };
  1673. /* Link Loss and Keep Alive configuration */
  1674. struct wmi_link_maintain_cfg {
  1675. /* link_loss_enable_detectors_vec */
  1676. __le32 link_loss_enable_detectors_vec;
  1677. /* detectors check period usec */
  1678. __le32 check_link_loss_period_usec;
  1679. /* max allowed tx ageing */
  1680. __le32 tx_ageing_threshold_usec;
  1681. /* keep alive period for high SNR */
  1682. __le32 keep_alive_period_usec_high_snr;
  1683. /* keep alive period for low SNR */
  1684. __le32 keep_alive_period_usec_low_snr;
  1685. /* lower snr limit for keep alive period update */
  1686. __le32 keep_alive_snr_threshold_low_db;
  1687. /* upper snr limit for keep alive period update */
  1688. __le32 keep_alive_snr_threshold_high_db;
  1689. /* num of successive bad bcons causing link-loss */
  1690. __le32 bad_beacons_num_threshold;
  1691. /* SNR limit for bad_beacons_detector */
  1692. __le32 bad_beacons_snr_threshold_db;
  1693. } __packed;
  1694. /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
  1695. struct wmi_link_maintain_cfg_write_cmd {
  1696. /* enum wmi_link_maintain_cfg_type_e - type of requested default
  1697. * configuration to be applied
  1698. */
  1699. __le32 cfg_type;
  1700. /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
  1701. __le32 cid;
  1702. /* custom configuration settings to be applied (relevant only if
  1703. * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
  1704. */
  1705. struct wmi_link_maintain_cfg lm_cfg;
  1706. } __packed;
  1707. /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
  1708. struct wmi_link_maintain_cfg_read_cmd {
  1709. /* connection ID which configuration settings are requested */
  1710. __le32 cid;
  1711. } __packed;
  1712. /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
  1713. struct wmi_link_maintain_cfg_write_done_event {
  1714. /* requested connection ID */
  1715. __le32 cid;
  1716. /* wmi_link_maintain_cfg_response_status_e - write status */
  1717. __le32 status;
  1718. } __packed;
  1719. /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
  1720. struct wmi_link_maintain_cfg_read_done_event {
  1721. /* requested connection ID */
  1722. __le32 cid;
  1723. /* wmi_link_maintain_cfg_response_status_e - read status */
  1724. __le32 status;
  1725. /* Retrieved configuration settings */
  1726. struct wmi_link_maintain_cfg lm_cfg;
  1727. } __packed;
  1728. enum wmi_traffic_deferral_status {
  1729. WMI_TRAFFIC_DEFERRAL_APPROVED = 0x0,
  1730. WMI_TRAFFIC_DEFERRAL_REJECTED = 0x1,
  1731. };
  1732. /* WMI_TRAFFIC_DEFERRAL_EVENTID */
  1733. struct wmi_traffic_deferral_event {
  1734. /* enum wmi_traffic_deferral_status_e */
  1735. u8 status;
  1736. } __packed;
  1737. enum wmi_traffic_resume_status {
  1738. WMI_TRAFFIC_RESUME_SUCCESS = 0x0,
  1739. WMI_TRAFFIC_RESUME_FAILED = 0x1,
  1740. };
  1741. /* WMI_TRAFFIC_RESUME_EVENTID */
  1742. struct wmi_traffic_resume_event {
  1743. /* enum wmi_traffic_resume_status_e */
  1744. u8 status;
  1745. } __packed;
  1746. /* Power Save command completion status codes */
  1747. enum wmi_ps_cfg_cmd_status {
  1748. WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00,
  1749. WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01,
  1750. /* other error */
  1751. WMI_PS_CFG_CMD_STATUS_ERROR = 0x02,
  1752. };
  1753. /* Device Power Save Profiles */
  1754. enum wmi_ps_profile_type {
  1755. WMI_PS_PROFILE_TYPE_DEFAULT = 0x00,
  1756. WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01,
  1757. WMI_PS_PROFILE_TYPE_MAX_PS = 0x02,
  1758. WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03,
  1759. };
  1760. /* WMI_PS_DEV_PROFILE_CFG_CMDID
  1761. *
  1762. * Power save profile to be used by the device
  1763. *
  1764. * Returned event:
  1765. * - WMI_PS_DEV_PROFILE_CFG_EVENTID
  1766. */
  1767. struct wmi_ps_dev_profile_cfg_cmd {
  1768. /* wmi_ps_profile_type_e */
  1769. u8 ps_profile;
  1770. u8 reserved[3];
  1771. } __packed;
  1772. /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
  1773. struct wmi_ps_dev_profile_cfg_event {
  1774. /* wmi_ps_cfg_cmd_status_e */
  1775. __le32 status;
  1776. } __packed;
  1777. enum wmi_ps_level {
  1778. WMI_PS_LEVEL_DEEP_SLEEP = 0x00,
  1779. WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01,
  1780. /* awake = all PS mechanisms are disabled */
  1781. WMI_PS_LEVEL_AWAKE = 0x02,
  1782. };
  1783. enum wmi_ps_deep_sleep_clk_level {
  1784. /* 33k */
  1785. WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00,
  1786. /* 10k */
  1787. WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01,
  1788. /* @RTC Low latency */
  1789. WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02,
  1790. WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03,
  1791. WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04,
  1792. /* Not Applicable */
  1793. WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF,
  1794. };
  1795. /* Response by the FW to a D3 entry request */
  1796. enum wmi_ps_d3_resp_policy {
  1797. WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00,
  1798. /* debug -D3 req is always denied */
  1799. WMI_PS_D3_RESP_POLICY_DENIED = 0x01,
  1800. /* debug -D3 req is always approved */
  1801. WMI_PS_D3_RESP_POLICY_APPROVED = 0x02,
  1802. };
  1803. /* Device common power save configurations */
  1804. struct wmi_ps_dev_cfg {
  1805. /* lowest level of PS allowed while unassociated, enum wmi_ps_level_e
  1806. */
  1807. u8 ps_unassoc_min_level;
  1808. /* lowest deep sleep clock level while nonassoc, enum
  1809. * wmi_ps_deep_sleep_clk_level_e
  1810. */
  1811. u8 ps_unassoc_deep_sleep_min_level;
  1812. /* lowest level of PS allowed while associated, enum wmi_ps_level_e */
  1813. u8 ps_assoc_min_level;
  1814. /* lowest deep sleep clock level while assoc, enum
  1815. * wmi_ps_deep_sleep_clk_level_e
  1816. */
  1817. u8 ps_assoc_deep_sleep_min_level;
  1818. /* enum wmi_ps_deep_sleep_clk_level_e */
  1819. u8 ps_assoc_low_latency_ds_min_level;
  1820. /* enum wmi_ps_d3_resp_policy_e */
  1821. u8 ps_D3_response_policy;
  1822. /* BOOL */
  1823. u8 ps_D3_pm_pme_enabled;
  1824. /* BOOL */
  1825. u8 ps_halp_enable;
  1826. u8 ps_deep_sleep_enter_thresh_msec;
  1827. /* BOOL */
  1828. u8 ps_voltage_scaling_en;
  1829. } __packed;
  1830. /* WMI_PS_DEV_CFG_CMDID
  1831. *
  1832. * Configure common Power Save parameters of the device and all MIDs.
  1833. *
  1834. * Returned event:
  1835. * - WMI_PS_DEV_CFG_EVENTID
  1836. */
  1837. struct wmi_ps_dev_cfg_cmd {
  1838. /* Device Power Save configuration to be applied */
  1839. struct wmi_ps_dev_cfg ps_dev_cfg;
  1840. /* alignment to 32b */
  1841. u8 reserved[2];
  1842. } __packed;
  1843. /* WMI_PS_DEV_CFG_EVENTID */
  1844. struct wmi_ps_dev_cfg_event {
  1845. /* wmi_ps_cfg_cmd_status_e */
  1846. __le32 status;
  1847. } __packed;
  1848. /* WMI_PS_DEV_CFG_READ_CMDID
  1849. *
  1850. * request to retrieve device Power Save configuration
  1851. * (WMI_PS_DEV_CFG_CMD params)
  1852. *
  1853. * Returned event:
  1854. * - WMI_PS_DEV_CFG_READ_EVENTID
  1855. */
  1856. struct wmi_ps_dev_cfg_read_cmd {
  1857. __le32 reserved;
  1858. } __packed;
  1859. /* WMI_PS_DEV_CFG_READ_EVENTID */
  1860. struct wmi_ps_dev_cfg_read_event {
  1861. /* wmi_ps_cfg_cmd_status_e */
  1862. __le32 status;
  1863. /* Retrieved device Power Save configuration (WMI_PS_DEV_CFG_CMD
  1864. * params)
  1865. */
  1866. struct wmi_ps_dev_cfg dev_ps_cfg;
  1867. /* alignment to 32b */
  1868. u8 reserved[2];
  1869. } __packed;
  1870. /* Per Mac Power Save configurations */
  1871. struct wmi_ps_mid_cfg {
  1872. /* Low power RX in BTI is enabled, BOOL */
  1873. u8 beacon_lprx_enable;
  1874. /* Sync to sector ID enabled, BOOL */
  1875. u8 beacon_sync_to_sectorId_enable;
  1876. /* Low power RX in DTI is enabled, BOOL */
  1877. u8 frame_exchange_lprx_enable;
  1878. /* Sleep Cycle while in scheduled PS, 1-31 */
  1879. u8 scheduled_sleep_cycle_pow2;
  1880. /* Stay Awake for k BIs every (sleep_cycle - k) BIs, 1-31 */
  1881. u8 scheduled_num_of_awake_bis;
  1882. u8 am_to_traffic_load_thresh_mbp;
  1883. u8 traffic_to_am_load_thresh_mbps;
  1884. u8 traffic_to_am_num_of_no_traffic_bis;
  1885. /* BOOL */
  1886. u8 continuous_traffic_psm;
  1887. __le16 no_traffic_to_min_usec;
  1888. __le16 no_traffic_to_max_usec;
  1889. __le16 snoozing_sleep_interval_milisec;
  1890. u8 max_no_data_awake_events;
  1891. /* Trigger WEB after k failed beacons */
  1892. u8 num_of_failed_beacons_rx_to_trigger_web;
  1893. /* Trigger BF after k failed beacons */
  1894. u8 num_of_failed_beacons_rx_to_trigger_bf;
  1895. /* Trigger SOB after k successful beacons */
  1896. u8 num_of_successful_beacons_rx_to_trigger_sob;
  1897. } __packed;
  1898. /* WMI_PS_MID_CFG_CMDID
  1899. *
  1900. * Configure Power Save parameters of a specific MID.
  1901. * These parameters are relevant for the specific BSS this MID belongs to.
  1902. *
  1903. * Returned event:
  1904. * - WMI_PS_MID_CFG_EVENTID
  1905. */
  1906. struct wmi_ps_mid_cfg_cmd {
  1907. /* MAC ID */
  1908. u8 mid;
  1909. /* mid PS configuration to be applied */
  1910. struct wmi_ps_mid_cfg ps_mid_cfg;
  1911. } __packed;
  1912. /* WMI_PS_MID_CFG_EVENTID */
  1913. struct wmi_ps_mid_cfg_event {
  1914. /* MAC ID */
  1915. u8 mid;
  1916. /* alignment to 32b */
  1917. u8 reserved[3];
  1918. /* wmi_ps_cfg_cmd_status_e */
  1919. __le32 status;
  1920. } __packed;
  1921. /* WMI_PS_MID_CFG_READ_CMDID
  1922. *
  1923. * request to retrieve Power Save configuration of mid
  1924. * (WMI_PS_MID_CFG_CMD params)
  1925. *
  1926. * Returned event:
  1927. * - WMI_PS_MID_CFG_READ_EVENTID
  1928. */
  1929. struct wmi_ps_mid_cfg_read_cmd {
  1930. /* MAC ID */
  1931. u8 mid;
  1932. /* alignment to 32b */
  1933. u8 reserved[3];
  1934. } __packed;
  1935. /* WMI_PS_MID_CFG_READ_EVENTID */
  1936. struct wmi_ps_mid_cfg_read_event {
  1937. /* MAC ID */
  1938. u8 mid;
  1939. /* Retrieved MID Power Save configuration(WMI_PS_MID_CFG_CMD params) */
  1940. struct wmi_ps_mid_cfg mid_ps_cfg;
  1941. /* wmi_ps_cfg_cmd_status_e */
  1942. __le32 status;
  1943. } __packed;
  1944. #define WMI_AOA_MAX_DATA_SIZE (128)
  1945. enum wmi_aoa_meas_status {
  1946. WMI_AOA_MEAS_SUCCESS = 0x00,
  1947. WMI_AOA_MEAS_PEER_INCAPABLE = 0x01,
  1948. WMI_AOA_MEAS_FAILURE = 0x02,
  1949. };
  1950. /* WMI_AOA_MEAS_EVENTID */
  1951. struct wmi_aoa_meas_event {
  1952. u8 mac_addr[WMI_MAC_LEN];
  1953. /* channels IDs:
  1954. * 0 - 58320 MHz
  1955. * 1 - 60480 MHz
  1956. * 2 - 62640 MHz
  1957. */
  1958. u8 channel;
  1959. /* enum wmi_aoa_meas_type */
  1960. u8 aoa_meas_type;
  1961. /* Measurments are from RFs, defined by the mask */
  1962. __le32 meas_rf_mask;
  1963. /* enum wmi_aoa_meas_status */
  1964. u8 meas_status;
  1965. u8 reserved;
  1966. /* Length of meas_data in bytes */
  1967. __le16 length;
  1968. u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
  1969. } __packed;
  1970. /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
  1971. struct wmi_set_mgmt_retry_limit_event {
  1972. /* enum wmi_fw_status */
  1973. u8 status;
  1974. /* alignment to 32b */
  1975. u8 reserved[3];
  1976. } __packed;
  1977. /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
  1978. struct wmi_get_mgmt_retry_limit_event {
  1979. /* MAC retransmit limit for mgmt frames */
  1980. u8 mgmt_retry_limit;
  1981. /* alignment to 32b */
  1982. u8 reserved[3];
  1983. } __packed;
  1984. /* WMI_TOF_GET_CAPABILITIES_EVENTID */
  1985. struct wmi_tof_get_capabilities_event {
  1986. u8 ftm_capability;
  1987. /* maximum supported number of destination to start TOF */
  1988. u8 max_num_of_dest;
  1989. /* maximum supported number of measurements per burst */
  1990. u8 max_num_of_meas_per_burst;
  1991. u8 reserved;
  1992. /* maximum supported multi bursts */
  1993. __le16 max_multi_bursts_sessions;
  1994. /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
  1995. __le16 max_ftm_burst_duration;
  1996. /* AOA supported types */
  1997. __le32 aoa_supported_types;
  1998. } __packed;
  1999. enum wmi_tof_session_end_status {
  2000. WMI_TOF_SESSION_END_NO_ERROR = 0x00,
  2001. WMI_TOF_SESSION_END_FAIL = 0x01,
  2002. WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02,
  2003. WMI_TOF_SESSION_END_ABORTED = 0x03,
  2004. };
  2005. /* WMI_TOF_SESSION_END_EVENTID */
  2006. struct wmi_tof_session_end_event {
  2007. /* FTM session ID */
  2008. __le32 session_id;
  2009. /* wmi_tof_session_end_status_e */
  2010. u8 status;
  2011. u8 reserved[3];
  2012. } __packed;
  2013. /* Responder FTM Results */
  2014. struct wmi_responder_ftm_res {
  2015. u8 t1[6];
  2016. u8 t2[6];
  2017. u8 t3[6];
  2018. u8 t4[6];
  2019. __le16 tod_err;
  2020. __le16 toa_err;
  2021. __le16 tod_err_initiator;
  2022. __le16 toa_err_initiator;
  2023. } __packed;
  2024. enum wmi_tof_ftm_per_dest_res_status {
  2025. WMI_PER_DEST_RES_NO_ERROR = 0x00,
  2026. WMI_PER_DEST_RES_TX_RX_FAIL = 0x01,
  2027. WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02,
  2028. };
  2029. enum wmi_tof_ftm_per_dest_res_flags {
  2030. WMI_PER_DEST_RES_REQ_START = 0x01,
  2031. WMI_PER_DEST_RES_BURST_REPORT_END = 0x02,
  2032. WMI_PER_DEST_RES_REQ_END = 0x04,
  2033. WMI_PER_DEST_RES_PARAM_UPDATE = 0x08,
  2034. };
  2035. /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
  2036. struct wmi_tof_ftm_per_dest_res_event {
  2037. /* FTM session ID */
  2038. __le32 session_id;
  2039. /* destination MAC address */
  2040. u8 dst_mac[WMI_MAC_LEN];
  2041. /* wmi_tof_ftm_per_dest_res_flags_e */
  2042. u8 flags;
  2043. /* wmi_tof_ftm_per_dest_res_status_e */
  2044. u8 status;
  2045. /* responder ASAP */
  2046. u8 responder_asap;
  2047. /* responder number of FTM per burst */
  2048. u8 responder_num_ftm_per_burst;
  2049. /* responder number of FTM burst exponent */
  2050. u8 responder_num_ftm_bursts_exp;
  2051. /* responder burst duration ,wmi_tof_burst_duration_e */
  2052. u8 responder_burst_duration;
  2053. /* responder burst period, indicate interval between two consecutive
  2054. * burst instances, in units of 100 ms
  2055. */
  2056. __le16 responder_burst_period;
  2057. /* receive burst counter */
  2058. __le16 bursts_cnt;
  2059. /* tsf of responder start burst */
  2060. __le32 tsf_sync;
  2061. /* actual received ftm per burst */
  2062. u8 actual_ftm_per_burst;
  2063. u8 reserved0[7];
  2064. struct wmi_responder_ftm_res responder_ftm_res[0];
  2065. } __packed;
  2066. enum wmi_tof_channel_info_type {
  2067. WMI_TOF_CHANNEL_INFO_AOA = 0x00,
  2068. WMI_TOF_CHANNEL_INFO_LCI = 0x01,
  2069. WMI_TOF_CHANNEL_INFO_LCR = 0x02,
  2070. WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03,
  2071. WMI_TOF_CHANNEL_INFO_CIR = 0x04,
  2072. WMI_TOF_CHANNEL_INFO_RSSI = 0x05,
  2073. WMI_TOF_CHANNEL_INFO_SNR = 0x06,
  2074. WMI_TOF_CHANNEL_INFO_DEBUG = 0x07,
  2075. };
  2076. /* WMI_TOF_CHANNEL_INFO_EVENTID */
  2077. struct wmi_tof_channel_info_event {
  2078. /* FTM session ID */
  2079. __le32 session_id;
  2080. /* destination MAC address */
  2081. u8 dst_mac[WMI_MAC_LEN];
  2082. /* wmi_tof_channel_info_type_e */
  2083. u8 type;
  2084. /* data report length */
  2085. u8 len;
  2086. /* data report payload */
  2087. u8 report[0];
  2088. } __packed;
  2089. /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
  2090. struct wmi_tof_set_tx_rx_offset_event {
  2091. /* enum wmi_fw_status */
  2092. u8 status;
  2093. u8 reserved[3];
  2094. } __packed;
  2095. /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
  2096. struct wmi_tof_get_tx_rx_offset_event {
  2097. /* enum wmi_fw_status */
  2098. u8 status;
  2099. u8 reserved1[3];
  2100. /* TX delay offset */
  2101. __le32 tx_offset;
  2102. /* RX delay offset */
  2103. __le32 rx_offset;
  2104. __le32 reserved2[2];
  2105. } __packed;
  2106. /* Result status codes for WMI commands */
  2107. enum wmi_rf_sector_status {
  2108. WMI_RF_SECTOR_STATUS_SUCCESS = 0x00,
  2109. WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01,
  2110. WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02,
  2111. WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03,
  2112. };
  2113. /* Types of the RF sector (TX,RX) */
  2114. enum wmi_rf_sector_type {
  2115. WMI_RF_SECTOR_TYPE_RX = 0x00,
  2116. WMI_RF_SECTOR_TYPE_TX = 0x01,
  2117. };
  2118. /* Content of RF Sector (six 32-bits registers) */
  2119. struct wmi_rf_sector_info {
  2120. /* Phase values for RF Chains[15-0] (2bits per RF chain) */
  2121. __le32 psh_hi;
  2122. /* Phase values for RF Chains[31-16] (2bits per RF chain) */
  2123. __le32 psh_lo;
  2124. /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
  2125. * index
  2126. */
  2127. __le32 etype0;
  2128. /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
  2129. * index
  2130. */
  2131. __le32 etype1;
  2132. /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
  2133. * index
  2134. */
  2135. __le32 etype2;
  2136. /* D-Type values (3bits each) for 8 Distribution amplifiers + X16
  2137. * switch bits
  2138. */
  2139. __le32 dtype_swch_off;
  2140. } __packed;
  2141. #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF)
  2142. #define WMI_MAX_RF_MODULES_NUM (8)
  2143. /* WMI_GET_RF_SECTOR_PARAMS_CMD */
  2144. struct wmi_get_rf_sector_params_cmd {
  2145. /* Sector number to be retrieved */
  2146. __le16 sector_idx;
  2147. /* enum wmi_rf_sector_type - type of requested RF sector */
  2148. u8 sector_type;
  2149. /* bitmask vector specifying destination RF modules */
  2150. u8 rf_modules_vec;
  2151. } __packed;
  2152. /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
  2153. struct wmi_get_rf_sector_params_done_event {
  2154. /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
  2155. * wmi_rf_sector_status)
  2156. */
  2157. u8 status;
  2158. /* align next field to U64 boundary */
  2159. u8 reserved[7];
  2160. /* TSF timestamp when RF sectors where retrieved */
  2161. __le64 tsf;
  2162. /* Content of RF sector retrieved from each RF module */
  2163. struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
  2164. } __packed;
  2165. /* WMI_SET_RF_SECTOR_PARAMS_CMD */
  2166. struct wmi_set_rf_sector_params_cmd {
  2167. /* Sector number to be retrieved */
  2168. __le16 sector_idx;
  2169. /* enum wmi_rf_sector_type - type of requested RF sector */
  2170. u8 sector_type;
  2171. /* bitmask vector specifying destination RF modules */
  2172. u8 rf_modules_vec;
  2173. /* Content of RF sector to be written to each RF module */
  2174. struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
  2175. } __packed;
  2176. /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
  2177. struct wmi_set_rf_sector_params_done_event {
  2178. /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
  2179. * wmi_rf_sector_status)
  2180. */
  2181. u8 status;
  2182. } __packed;
  2183. /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
  2184. * TXSS/BRP for communication with specified CID
  2185. */
  2186. struct wmi_get_selected_rf_sector_index_cmd {
  2187. /* Connection/Station ID in [0:7] range */
  2188. u8 cid;
  2189. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2190. u8 sector_type;
  2191. /* align to U32 boundary */
  2192. u8 reserved[2];
  2193. } __packed;
  2194. /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
  2195. * index selected by TXSS/BRP for communication with specified CID
  2196. */
  2197. struct wmi_get_selected_rf_sector_index_done_event {
  2198. /* Retrieved sector index selected in TXSS (for TX sector request) or
  2199. * BRP (for RX sector request)
  2200. */
  2201. __le16 sector_idx;
  2202. /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
  2203. * wmi_rf_sector_status)
  2204. */
  2205. u8 status;
  2206. /* align next field to U64 boundary */
  2207. u8 reserved[5];
  2208. /* TSF timestamp when result was retrieved */
  2209. __le64 tsf;
  2210. } __packed;
  2211. /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
  2212. * communication with specified CID. Assumes that TXSS/BRP is disabled by
  2213. * other command
  2214. */
  2215. struct wmi_set_selected_rf_sector_index_cmd {
  2216. /* Connection/Station ID in [0:7] range */
  2217. u8 cid;
  2218. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2219. u8 sector_type;
  2220. /* Forced sector index */
  2221. __le16 sector_idx;
  2222. } __packed;
  2223. /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
  2224. * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
  2225. */
  2226. struct wmi_set_selected_rf_sector_index_done_event {
  2227. /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
  2228. * wmi_rf_sector_status)
  2229. */
  2230. u8 status;
  2231. /* align to U32 boundary */
  2232. u8 reserved[3];
  2233. } __packed;
  2234. /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
  2235. * modules
  2236. */
  2237. struct wmi_set_rf_sector_on_cmd {
  2238. /* Sector index to be activated */
  2239. __le16 sector_idx;
  2240. /* type of requested RF sector (enum wmi_rf_sector_type) */
  2241. u8 sector_type;
  2242. /* bitmask vector specifying destination RF modules */
  2243. u8 rf_modules_vec;
  2244. } __packed;
  2245. /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
  2246. * WMI_SET_RF_SECTOR_ON_CMD
  2247. */
  2248. struct wmi_set_rf_sector_on_done_event {
  2249. /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
  2250. * wmi_rf_sector_status)
  2251. */
  2252. u8 status;
  2253. /* align to U32 boundary */
  2254. u8 reserved[3];
  2255. } __packed;
  2256. enum wmi_sector_sweep_type {
  2257. WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00,
  2258. WMI_SECTOR_SWEEP_TYPE_BCON = 0x01,
  2259. WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02,
  2260. WMI_SECTOR_SWEEP_TYPE_NUM = 0x03,
  2261. };
  2262. /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
  2263. *
  2264. * Set the order of TX sectors in TXSS and/or Beacon(AP).
  2265. *
  2266. * Returned event:
  2267. * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
  2268. */
  2269. struct wmi_prio_tx_sectors_order_cmd {
  2270. /* tx sectors order to be applied, 0xFF for end of array */
  2271. u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
  2272. /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
  2273. u8 sector_sweep_type;
  2274. /* needed only for TXSS configuration */
  2275. u8 cid;
  2276. /* alignment to 32b */
  2277. u8 reserved[2];
  2278. } __packed;
  2279. /* completion status codes */
  2280. enum wmi_prio_tx_sectors_cmd_status {
  2281. WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00,
  2282. WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01,
  2283. /* other error */
  2284. WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02,
  2285. };
  2286. /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
  2287. struct wmi_prio_tx_sectors_order_event {
  2288. /* enum wmi_prio_tx_sectors_cmd_status */
  2289. u8 status;
  2290. /* alignment to 32b */
  2291. u8 reserved[3];
  2292. } __packed;
  2293. struct wmi_prio_tx_sectors_num_cmd {
  2294. /* [0-128], 0 = No changes */
  2295. u8 beacon_number_of_sectors;
  2296. /* [0-128], 0 = No changes */
  2297. u8 txss_number_of_sectors;
  2298. /* [0-8] needed only for TXSS configuration */
  2299. u8 cid;
  2300. } __packed;
  2301. /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
  2302. *
  2303. * Set the number of active sectors in TXSS and/or Beacon.
  2304. *
  2305. * Returned event:
  2306. * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
  2307. */
  2308. struct wmi_prio_tx_sectors_number_cmd {
  2309. struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
  2310. /* alignment to 32b */
  2311. u8 reserved;
  2312. } __packed;
  2313. /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
  2314. struct wmi_prio_tx_sectors_number_event {
  2315. /* enum wmi_prio_tx_sectors_cmd_status */
  2316. u8 status;
  2317. /* alignment to 32b */
  2318. u8 reserved[3];
  2319. } __packed;
  2320. /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
  2321. *
  2322. * Set default sectors order and number (hard coded in board file)
  2323. * in TXSS and/or Beacon.
  2324. *
  2325. * Returned event:
  2326. * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
  2327. */
  2328. struct wmi_prio_tx_sectors_set_default_cfg_cmd {
  2329. /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
  2330. u8 sector_sweep_type;
  2331. /* needed only for TXSS configuration */
  2332. u8 cid;
  2333. /* alignment to 32b */
  2334. u8 reserved[2];
  2335. } __packed;
  2336. /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
  2337. struct wmi_prio_tx_sectors_set_default_cfg_event {
  2338. /* enum wmi_prio_tx_sectors_cmd_status */
  2339. u8 status;
  2340. /* alignment to 32b */
  2341. u8 reserved[3];
  2342. } __packed;
  2343. #endif /* __WILOCITY_WMI_H__ */