wmi.h 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487
  1. /*
  2. * Copyright (c) 2010-2011 Atheros Communications Inc.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /*
  17. * This file contains the definitions of the WMI protocol specified in the
  18. * Wireless Module Interface (WMI). It includes definitions of all the
  19. * commands and events. Commands are messages from the host to the WM.
  20. * Events and Replies are messages from the WM to the host.
  21. */
  22. #ifndef WMI_H
  23. #define WMI_H
  24. #include <linux/ieee80211.h>
  25. #include "htc.h"
  26. #define HTC_PROTOCOL_VERSION 0x0002
  27. #define WMI_PROTOCOL_VERSION 0x0002
  28. #define WMI_CONTROL_MSG_MAX_LEN 256
  29. #define is_ethertype(type_or_len) ((type_or_len) >= 0x0600)
  30. #define IP_ETHERTYPE 0x0800
  31. #define WMI_IMPLICIT_PSTREAM 0xFF
  32. #define WMI_MAX_THINSTREAM 15
  33. #define SSID_IE_LEN_INDEX 13
  34. /* Host side link management data structures */
  35. #define SIG_QUALITY_THRESH_LVLS 6
  36. #define SIG_QUALITY_UPPER_THRESH_LVLS SIG_QUALITY_THRESH_LVLS
  37. #define SIG_QUALITY_LOWER_THRESH_LVLS SIG_QUALITY_THRESH_LVLS
  38. #define A_BAND_24GHZ 0
  39. #define A_BAND_5GHZ 1
  40. #define A_NUM_BANDS 2
  41. /* in ms */
  42. #define WMI_IMPLICIT_PSTREAM_INACTIVITY_INT 5000
  43. /*
  44. * There are no signed versions of __le16 and __le32, so for a temporary
  45. * solution come up with our own version. The idea is from fs/ntfs/types.h.
  46. *
  47. * Use a_ prefix so that it doesn't conflict if we get proper support to
  48. * linux/types.h.
  49. */
  50. typedef __s16 __bitwise a_sle16;
  51. typedef __s32 __bitwise a_sle32;
  52. static inline a_sle32 a_cpu_to_sle32(s32 val)
  53. {
  54. return (__force a_sle32) cpu_to_le32(val);
  55. }
  56. static inline s32 a_sle32_to_cpu(a_sle32 val)
  57. {
  58. return le32_to_cpu((__force __le32) val);
  59. }
  60. static inline a_sle16 a_cpu_to_sle16(s16 val)
  61. {
  62. return (__force a_sle16) cpu_to_le16(val);
  63. }
  64. static inline s16 a_sle16_to_cpu(a_sle16 val)
  65. {
  66. return le16_to_cpu((__force __le16) val);
  67. }
  68. struct sq_threshold_params {
  69. s16 upper_threshold[SIG_QUALITY_UPPER_THRESH_LVLS];
  70. s16 lower_threshold[SIG_QUALITY_LOWER_THRESH_LVLS];
  71. u32 upper_threshold_valid_count;
  72. u32 lower_threshold_valid_count;
  73. u32 polling_interval;
  74. u8 weight;
  75. u8 last_rssi;
  76. u8 last_rssi_poll_event;
  77. };
  78. struct wmi_data_sync_bufs {
  79. u8 traffic_class;
  80. struct sk_buff *skb;
  81. };
  82. /* WMM stream classes */
  83. #define WMM_NUM_AC 4
  84. #define WMM_AC_BE 0 /* best effort */
  85. #define WMM_AC_BK 1 /* background */
  86. #define WMM_AC_VI 2 /* video */
  87. #define WMM_AC_VO 3 /* voice */
  88. struct wmi {
  89. u16 stream_exist_for_ac[WMM_NUM_AC];
  90. u8 fat_pipe_exist;
  91. struct ath6kl *parent_dev;
  92. u8 pwr_mode;
  93. spinlock_t lock;
  94. enum htc_endpoint_id ep_id;
  95. struct sq_threshold_params
  96. sq_threshld[SIGNAL_QUALITY_METRICS_NUM_MAX];
  97. bool is_wmm_enabled;
  98. u8 traffic_class;
  99. bool is_probe_ssid;
  100. u8 *last_mgmt_tx_frame;
  101. size_t last_mgmt_tx_frame_len;
  102. u8 saved_pwr_mode;
  103. };
  104. struct host_app_area {
  105. __le32 wmi_protocol_ver;
  106. } __packed;
  107. enum wmi_msg_type {
  108. DATA_MSGTYPE = 0x0,
  109. CNTL_MSGTYPE,
  110. SYNC_MSGTYPE,
  111. OPT_MSGTYPE,
  112. };
  113. /*
  114. * Macros for operating on WMI_DATA_HDR (info) field
  115. */
  116. #define WMI_DATA_HDR_MSG_TYPE_MASK 0x03
  117. #define WMI_DATA_HDR_MSG_TYPE_SHIFT 0
  118. #define WMI_DATA_HDR_UP_MASK 0x07
  119. #define WMI_DATA_HDR_UP_SHIFT 2
  120. /* In AP mode, the same bit (b5) is used to indicate Power save state in
  121. * the Rx dir and More data bit state in the tx direction.
  122. */
  123. #define WMI_DATA_HDR_PS_MASK 0x1
  124. #define WMI_DATA_HDR_PS_SHIFT 5
  125. #define WMI_DATA_HDR_MORE_MASK 0x1
  126. #define WMI_DATA_HDR_MORE_SHIFT 5
  127. enum wmi_data_hdr_data_type {
  128. WMI_DATA_HDR_DATA_TYPE_802_3 = 0,
  129. WMI_DATA_HDR_DATA_TYPE_802_11,
  130. /* used to be used for the PAL */
  131. WMI_DATA_HDR_DATA_TYPE_ACL,
  132. };
  133. #define WMI_DATA_HDR_DATA_TYPE_MASK 0x3
  134. #define WMI_DATA_HDR_DATA_TYPE_SHIFT 6
  135. /* Macros for operating on WMI_DATA_HDR (info2) field */
  136. #define WMI_DATA_HDR_SEQNO_MASK 0xFFF
  137. #define WMI_DATA_HDR_SEQNO_SHIFT 0
  138. #define WMI_DATA_HDR_AMSDU_MASK 0x1
  139. #define WMI_DATA_HDR_AMSDU_SHIFT 12
  140. #define WMI_DATA_HDR_META_MASK 0x7
  141. #define WMI_DATA_HDR_META_SHIFT 13
  142. #define WMI_DATA_HDR_IF_IDX_MASK 0xF
  143. struct wmi_data_hdr {
  144. s8 rssi;
  145. /*
  146. * usage of 'info' field(8-bit):
  147. *
  148. * b1:b0 - WMI_MSG_TYPE
  149. * b4:b3:b2 - UP(tid)
  150. * b5 - Used in AP mode.
  151. * More-data in tx dir, PS in rx.
  152. * b7:b6 - Dot3 header(0),
  153. * Dot11 Header(1),
  154. * ACL data(2)
  155. */
  156. u8 info;
  157. /*
  158. * usage of 'info2' field(16-bit):
  159. *
  160. * b11:b0 - seq_no
  161. * b12 - A-MSDU?
  162. * b15:b13 - META_DATA_VERSION 0 - 7
  163. */
  164. __le16 info2;
  165. /*
  166. * usage of info3, 16-bit:
  167. * b3:b0 - Interface index
  168. * b15:b4 - Reserved
  169. */
  170. __le16 info3;
  171. } __packed;
  172. static inline u8 wmi_data_hdr_get_up(struct wmi_data_hdr *dhdr)
  173. {
  174. return (dhdr->info >> WMI_DATA_HDR_UP_SHIFT) & WMI_DATA_HDR_UP_MASK;
  175. }
  176. static inline void wmi_data_hdr_set_up(struct wmi_data_hdr *dhdr,
  177. u8 usr_pri)
  178. {
  179. dhdr->info &= ~(WMI_DATA_HDR_UP_MASK << WMI_DATA_HDR_UP_SHIFT);
  180. dhdr->info |= usr_pri << WMI_DATA_HDR_UP_SHIFT;
  181. }
  182. static inline u8 wmi_data_hdr_get_dot11(struct wmi_data_hdr *dhdr)
  183. {
  184. u8 data_type;
  185. data_type = (dhdr->info >> WMI_DATA_HDR_DATA_TYPE_SHIFT) &
  186. WMI_DATA_HDR_DATA_TYPE_MASK;
  187. return (data_type == WMI_DATA_HDR_DATA_TYPE_802_11);
  188. }
  189. static inline u16 wmi_data_hdr_get_seqno(struct wmi_data_hdr *dhdr)
  190. {
  191. return (le16_to_cpu(dhdr->info2) >> WMI_DATA_HDR_SEQNO_SHIFT) &
  192. WMI_DATA_HDR_SEQNO_MASK;
  193. }
  194. static inline u8 wmi_data_hdr_is_amsdu(struct wmi_data_hdr *dhdr)
  195. {
  196. return (le16_to_cpu(dhdr->info2) >> WMI_DATA_HDR_AMSDU_SHIFT) &
  197. WMI_DATA_HDR_AMSDU_MASK;
  198. }
  199. static inline u8 wmi_data_hdr_get_meta(struct wmi_data_hdr *dhdr)
  200. {
  201. return (le16_to_cpu(dhdr->info2) >> WMI_DATA_HDR_META_SHIFT) &
  202. WMI_DATA_HDR_META_MASK;
  203. }
  204. static inline u8 wmi_data_hdr_get_if_idx(struct wmi_data_hdr *dhdr)
  205. {
  206. return le16_to_cpu(dhdr->info3) & WMI_DATA_HDR_IF_IDX_MASK;
  207. }
  208. /* Tx meta version definitions */
  209. #define WMI_MAX_TX_META_SZ 12
  210. #define WMI_META_VERSION_1 0x01
  211. #define WMI_META_VERSION_2 0x02
  212. /* Flag to signal to FW to calculate TCP checksum */
  213. #define WMI_META_V2_FLAG_CSUM_OFFLOAD 0x01
  214. struct wmi_tx_meta_v1 {
  215. /* packet ID to identify the tx request */
  216. u8 pkt_id;
  217. /* rate policy to be used for the tx of this frame */
  218. u8 rate_plcy_id;
  219. } __packed;
  220. struct wmi_tx_meta_v2 {
  221. /*
  222. * Offset from start of the WMI header for csum calculation to
  223. * begin.
  224. */
  225. u8 csum_start;
  226. /* offset from start of WMI header where final csum goes */
  227. u8 csum_dest;
  228. /* no of bytes over which csum is calculated */
  229. u8 csum_flags;
  230. } __packed;
  231. struct wmi_rx_meta_v1 {
  232. u8 status;
  233. /* rate index mapped to rate at which this packet was received. */
  234. u8 rix;
  235. /* rssi of packet */
  236. u8 rssi;
  237. /* rf channel during packet reception */
  238. u8 channel;
  239. __le16 flags;
  240. } __packed;
  241. struct wmi_rx_meta_v2 {
  242. __le16 csum;
  243. /* bit 0 set -partial csum valid bit 1 set -test mode */
  244. u8 csum_flags;
  245. } __packed;
  246. #define WMI_CMD_HDR_IF_ID_MASK 0xF
  247. /* Control Path */
  248. struct wmi_cmd_hdr {
  249. __le16 cmd_id;
  250. /* info1 - 16 bits
  251. * b03:b00 - id
  252. * b15:b04 - unused */
  253. __le16 info1;
  254. /* for alignment */
  255. __le16 reserved;
  256. } __packed;
  257. static inline u8 wmi_cmd_hdr_get_if_idx(struct wmi_cmd_hdr *chdr)
  258. {
  259. return le16_to_cpu(chdr->info1) & WMI_CMD_HDR_IF_ID_MASK;
  260. }
  261. /* List of WMI commands */
  262. enum wmi_cmd_id {
  263. WMI_CONNECT_CMDID = 0x0001,
  264. WMI_RECONNECT_CMDID,
  265. WMI_DISCONNECT_CMDID,
  266. WMI_SYNCHRONIZE_CMDID,
  267. WMI_CREATE_PSTREAM_CMDID,
  268. WMI_DELETE_PSTREAM_CMDID,
  269. /* WMI_START_SCAN_CMDID is to be deprecated. Use
  270. * WMI_BEGIN_SCAN_CMDID instead. The new cmd supports P2P mgmt
  271. * operations using station interface.
  272. */
  273. WMI_START_SCAN_CMDID,
  274. WMI_SET_SCAN_PARAMS_CMDID,
  275. WMI_SET_BSS_FILTER_CMDID,
  276. WMI_SET_PROBED_SSID_CMDID, /* 10 */
  277. WMI_SET_LISTEN_INT_CMDID,
  278. WMI_SET_BMISS_TIME_CMDID,
  279. WMI_SET_DISC_TIMEOUT_CMDID,
  280. WMI_GET_CHANNEL_LIST_CMDID,
  281. WMI_SET_BEACON_INT_CMDID,
  282. WMI_GET_STATISTICS_CMDID,
  283. WMI_SET_CHANNEL_PARAMS_CMDID,
  284. WMI_SET_POWER_MODE_CMDID,
  285. WMI_SET_IBSS_PM_CAPS_CMDID,
  286. WMI_SET_POWER_PARAMS_CMDID, /* 20 */
  287. WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID,
  288. WMI_ADD_CIPHER_KEY_CMDID,
  289. WMI_DELETE_CIPHER_KEY_CMDID,
  290. WMI_ADD_KRK_CMDID,
  291. WMI_DELETE_KRK_CMDID,
  292. WMI_SET_PMKID_CMDID,
  293. WMI_SET_TX_PWR_CMDID,
  294. WMI_GET_TX_PWR_CMDID,
  295. WMI_SET_ASSOC_INFO_CMDID,
  296. WMI_ADD_BAD_AP_CMDID, /* 30 */
  297. WMI_DELETE_BAD_AP_CMDID,
  298. WMI_SET_TKIP_COUNTERMEASURES_CMDID,
  299. WMI_RSSI_THRESHOLD_PARAMS_CMDID,
  300. WMI_TARGET_ERROR_REPORT_BITMASK_CMDID,
  301. WMI_SET_ACCESS_PARAMS_CMDID,
  302. WMI_SET_RETRY_LIMITS_CMDID,
  303. WMI_SET_OPT_MODE_CMDID,
  304. WMI_OPT_TX_FRAME_CMDID,
  305. WMI_SET_VOICE_PKT_SIZE_CMDID,
  306. WMI_SET_MAX_SP_LEN_CMDID, /* 40 */
  307. WMI_SET_ROAM_CTRL_CMDID,
  308. WMI_GET_ROAM_TBL_CMDID,
  309. WMI_GET_ROAM_DATA_CMDID,
  310. WMI_ENABLE_RM_CMDID,
  311. WMI_SET_MAX_OFFHOME_DURATION_CMDID,
  312. WMI_EXTENSION_CMDID, /* Non-wireless extensions */
  313. WMI_SNR_THRESHOLD_PARAMS_CMDID,
  314. WMI_LQ_THRESHOLD_PARAMS_CMDID,
  315. WMI_SET_LPREAMBLE_CMDID,
  316. WMI_SET_RTS_CMDID, /* 50 */
  317. WMI_CLR_RSSI_SNR_CMDID,
  318. WMI_SET_FIXRATES_CMDID,
  319. WMI_GET_FIXRATES_CMDID,
  320. WMI_SET_AUTH_MODE_CMDID,
  321. WMI_SET_REASSOC_MODE_CMDID,
  322. WMI_SET_WMM_CMDID,
  323. WMI_SET_WMM_TXOP_CMDID,
  324. WMI_TEST_CMDID,
  325. /* COEX AR6002 only */
  326. WMI_SET_BT_STATUS_CMDID,
  327. WMI_SET_BT_PARAMS_CMDID, /* 60 */
  328. WMI_SET_KEEPALIVE_CMDID,
  329. WMI_GET_KEEPALIVE_CMDID,
  330. WMI_SET_APPIE_CMDID,
  331. WMI_GET_APPIE_CMDID,
  332. WMI_SET_WSC_STATUS_CMDID,
  333. /* Wake on Wireless */
  334. WMI_SET_HOST_SLEEP_MODE_CMDID,
  335. WMI_SET_WOW_MODE_CMDID,
  336. WMI_GET_WOW_LIST_CMDID,
  337. WMI_ADD_WOW_PATTERN_CMDID,
  338. WMI_DEL_WOW_PATTERN_CMDID, /* 70 */
  339. WMI_SET_FRAMERATES_CMDID,
  340. WMI_SET_AP_PS_CMDID,
  341. WMI_SET_QOS_SUPP_CMDID,
  342. /* WMI_THIN_RESERVED_... mark the start and end
  343. * values for WMI_THIN_RESERVED command IDs. These
  344. * command IDs can be found in wmi_thin.h */
  345. WMI_THIN_RESERVED_START = 0x8000,
  346. WMI_THIN_RESERVED_END = 0x8fff,
  347. /* Developer commands starts at 0xF000 */
  348. WMI_SET_BITRATE_CMDID = 0xF000,
  349. WMI_GET_BITRATE_CMDID,
  350. WMI_SET_WHALPARAM_CMDID,
  351. WMI_SET_MAC_ADDRESS_CMDID,
  352. WMI_SET_AKMP_PARAMS_CMDID,
  353. WMI_SET_PMKID_LIST_CMDID,
  354. WMI_GET_PMKID_LIST_CMDID,
  355. WMI_ABORT_SCAN_CMDID,
  356. WMI_SET_TARGET_EVENT_REPORT_CMDID,
  357. /* Unused */
  358. WMI_UNUSED1,
  359. WMI_UNUSED2,
  360. /* AP mode commands */
  361. WMI_AP_HIDDEN_SSID_CMDID,
  362. WMI_AP_SET_NUM_STA_CMDID,
  363. WMI_AP_ACL_POLICY_CMDID,
  364. WMI_AP_ACL_MAC_LIST_CMDID,
  365. WMI_AP_CONFIG_COMMIT_CMDID,
  366. WMI_AP_SET_MLME_CMDID,
  367. WMI_AP_SET_PVB_CMDID,
  368. WMI_AP_CONN_INACT_CMDID,
  369. WMI_AP_PROT_SCAN_TIME_CMDID,
  370. WMI_AP_SET_COUNTRY_CMDID,
  371. WMI_AP_SET_DTIM_CMDID,
  372. WMI_AP_MODE_STAT_CMDID,
  373. WMI_SET_IP_CMDID,
  374. WMI_SET_PARAMS_CMDID,
  375. WMI_SET_MCAST_FILTER_CMDID,
  376. WMI_DEL_MCAST_FILTER_CMDID,
  377. WMI_ALLOW_AGGR_CMDID,
  378. WMI_ADDBA_REQ_CMDID,
  379. WMI_DELBA_REQ_CMDID,
  380. WMI_SET_HT_CAP_CMDID,
  381. WMI_SET_HT_OP_CMDID,
  382. WMI_SET_TX_SELECT_RATES_CMDID,
  383. WMI_SET_TX_SGI_PARAM_CMDID,
  384. WMI_SET_RATE_POLICY_CMDID,
  385. WMI_HCI_CMD_CMDID,
  386. WMI_RX_FRAME_FORMAT_CMDID,
  387. WMI_SET_THIN_MODE_CMDID,
  388. WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID,
  389. WMI_AP_SET_11BG_RATESET_CMDID,
  390. WMI_SET_PMK_CMDID,
  391. WMI_MCAST_FILTER_CMDID,
  392. /* COEX CMDID AR6003 */
  393. WMI_SET_BTCOEX_FE_ANT_CMDID,
  394. WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID,
  395. WMI_SET_BTCOEX_SCO_CONFIG_CMDID,
  396. WMI_SET_BTCOEX_A2DP_CONFIG_CMDID,
  397. WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID,
  398. WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID,
  399. WMI_SET_BTCOEX_DEBUG_CMDID,
  400. WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID,
  401. WMI_GET_BTCOEX_STATS_CMDID,
  402. WMI_GET_BTCOEX_CONFIG_CMDID,
  403. WMI_SET_DFS_ENABLE_CMDID, /* F034 */
  404. WMI_SET_DFS_MINRSSITHRESH_CMDID,
  405. WMI_SET_DFS_MAXPULSEDUR_CMDID,
  406. WMI_DFS_RADAR_DETECTED_CMDID,
  407. /* P2P commands */
  408. WMI_P2P_SET_CONFIG_CMDID, /* F038 */
  409. WMI_WPS_SET_CONFIG_CMDID,
  410. WMI_SET_REQ_DEV_ATTR_CMDID,
  411. WMI_P2P_FIND_CMDID,
  412. WMI_P2P_STOP_FIND_CMDID,
  413. WMI_P2P_GO_NEG_START_CMDID,
  414. WMI_P2P_LISTEN_CMDID,
  415. WMI_CONFIG_TX_MAC_RULES_CMDID, /* F040 */
  416. WMI_SET_PROMISCUOUS_MODE_CMDID,
  417. WMI_RX_FRAME_FILTER_CMDID,
  418. WMI_SET_CHANNEL_CMDID,
  419. /* WAC commands */
  420. WMI_ENABLE_WAC_CMDID,
  421. WMI_WAC_SCAN_REPLY_CMDID,
  422. WMI_WAC_CTRL_REQ_CMDID,
  423. WMI_SET_DIV_PARAMS_CMDID,
  424. WMI_GET_PMK_CMDID,
  425. WMI_SET_PASSPHRASE_CMDID,
  426. WMI_SEND_ASSOC_RES_CMDID,
  427. WMI_SET_ASSOC_REQ_RELAY_CMDID,
  428. /* ACS command, consists of sub-commands */
  429. WMI_ACS_CTRL_CMDID,
  430. WMI_SET_EXCESS_TX_RETRY_THRES_CMDID,
  431. WMI_SET_TBD_TIME_CMDID, /*added for wmiconfig command for TBD */
  432. /* Pktlog cmds */
  433. WMI_PKTLOG_ENABLE_CMDID,
  434. WMI_PKTLOG_DISABLE_CMDID,
  435. /* More P2P Cmds */
  436. WMI_P2P_GO_NEG_REQ_RSP_CMDID,
  437. WMI_P2P_GRP_INIT_CMDID,
  438. WMI_P2P_GRP_FORMATION_DONE_CMDID,
  439. WMI_P2P_INVITE_CMDID,
  440. WMI_P2P_INVITE_REQ_RSP_CMDID,
  441. WMI_P2P_PROV_DISC_REQ_CMDID,
  442. WMI_P2P_SET_CMDID,
  443. WMI_GET_RFKILL_MODE_CMDID,
  444. WMI_SET_RFKILL_MODE_CMDID,
  445. WMI_AP_SET_APSD_CMDID,
  446. WMI_AP_APSD_BUFFERED_TRAFFIC_CMDID,
  447. WMI_P2P_SDPD_TX_CMDID, /* F05C */
  448. WMI_P2P_STOP_SDPD_CMDID,
  449. WMI_P2P_CANCEL_CMDID,
  450. /* Ultra low power store / recall commands */
  451. WMI_STORERECALL_CONFIGURE_CMDID,
  452. WMI_STORERECALL_RECALL_CMDID,
  453. WMI_STORERECALL_HOST_READY_CMDID,
  454. WMI_FORCE_TARGET_ASSERT_CMDID,
  455. WMI_SET_PROBED_SSID_EX_CMDID,
  456. WMI_SET_NETWORK_LIST_OFFLOAD_CMDID,
  457. WMI_SET_ARP_NS_OFFLOAD_CMDID,
  458. WMI_ADD_WOW_EXT_PATTERN_CMDID,
  459. WMI_GTK_OFFLOAD_OP_CMDID,
  460. WMI_REMAIN_ON_CHNL_CMDID,
  461. WMI_CANCEL_REMAIN_ON_CHNL_CMDID,
  462. /* WMI_SEND_ACTION_CMDID is to be deprecated. Use
  463. * WMI_SEND_MGMT_CMDID instead. The new cmd supports P2P mgmt
  464. * operations using station interface.
  465. */
  466. WMI_SEND_ACTION_CMDID,
  467. WMI_PROBE_REQ_REPORT_CMDID,
  468. WMI_DISABLE_11B_RATES_CMDID,
  469. WMI_SEND_PROBE_RESPONSE_CMDID,
  470. WMI_GET_P2P_INFO_CMDID,
  471. WMI_AP_JOIN_BSS_CMDID,
  472. WMI_SMPS_ENABLE_CMDID,
  473. WMI_SMPS_CONFIG_CMDID,
  474. WMI_SET_RATECTRL_PARM_CMDID,
  475. /* LPL specific commands*/
  476. WMI_LPL_FORCE_ENABLE_CMDID,
  477. WMI_LPL_SET_POLICY_CMDID,
  478. WMI_LPL_GET_POLICY_CMDID,
  479. WMI_LPL_GET_HWSTATE_CMDID,
  480. WMI_LPL_SET_PARAMS_CMDID,
  481. WMI_LPL_GET_PARAMS_CMDID,
  482. WMI_SET_BUNDLE_PARAM_CMDID,
  483. /*GreenTx specific commands*/
  484. WMI_GREENTX_PARAMS_CMDID,
  485. WMI_RTT_MEASREQ_CMDID,
  486. WMI_RTT_CAPREQ_CMDID,
  487. WMI_RTT_STATUSREQ_CMDID,
  488. /* WPS Commands */
  489. WMI_WPS_START_CMDID,
  490. WMI_GET_WPS_STATUS_CMDID,
  491. /* More P2P commands */
  492. WMI_SET_NOA_CMDID,
  493. WMI_GET_NOA_CMDID,
  494. WMI_SET_OPPPS_CMDID,
  495. WMI_GET_OPPPS_CMDID,
  496. WMI_ADD_PORT_CMDID,
  497. WMI_DEL_PORT_CMDID,
  498. /* 802.11w cmd */
  499. WMI_SET_RSN_CAP_CMDID,
  500. WMI_GET_RSN_CAP_CMDID,
  501. WMI_SET_IGTK_CMDID,
  502. WMI_RX_FILTER_COALESCE_FILTER_OP_CMDID,
  503. WMI_RX_FILTER_SET_FRAME_TEST_LIST_CMDID,
  504. WMI_SEND_MGMT_CMDID,
  505. WMI_BEGIN_SCAN_CMDID,
  506. };
  507. enum wmi_mgmt_frame_type {
  508. WMI_FRAME_BEACON = 0,
  509. WMI_FRAME_PROBE_REQ,
  510. WMI_FRAME_PROBE_RESP,
  511. WMI_FRAME_ASSOC_REQ,
  512. WMI_FRAME_ASSOC_RESP,
  513. WMI_NUM_MGMT_FRAME
  514. };
  515. /* WMI_CONNECT_CMDID */
  516. enum network_type {
  517. INFRA_NETWORK = 0x01,
  518. ADHOC_NETWORK = 0x02,
  519. ADHOC_CREATOR = 0x04,
  520. AP_NETWORK = 0x10,
  521. };
  522. enum network_subtype {
  523. SUBTYPE_NONE,
  524. SUBTYPE_BT,
  525. SUBTYPE_P2PDEV,
  526. SUBTYPE_P2PCLIENT,
  527. SUBTYPE_P2PGO,
  528. };
  529. enum dot11_auth_mode {
  530. OPEN_AUTH = 0x01,
  531. SHARED_AUTH = 0x02,
  532. /* different from IEEE_AUTH_MODE definitions */
  533. LEAP_AUTH = 0x04,
  534. };
  535. enum auth_mode {
  536. NONE_AUTH = 0x01,
  537. WPA_AUTH = 0x02,
  538. WPA2_AUTH = 0x04,
  539. WPA_PSK_AUTH = 0x08,
  540. WPA2_PSK_AUTH = 0x10,
  541. WPA_AUTH_CCKM = 0x20,
  542. WPA2_AUTH_CCKM = 0x40,
  543. };
  544. #define WMI_MAX_KEY_INDEX 3
  545. #define WMI_MAX_KEY_LEN 32
  546. /*
  547. * NB: these values are ordered carefully; there are lots of
  548. * of implications in any reordering. In particular beware
  549. * that 4 is not used to avoid conflicting with IEEE80211_F_PRIVACY.
  550. */
  551. #define ATH6KL_CIPHER_WEP 0
  552. #define ATH6KL_CIPHER_TKIP 1
  553. #define ATH6KL_CIPHER_AES_OCB 2
  554. #define ATH6KL_CIPHER_AES_CCM 3
  555. #define ATH6KL_CIPHER_CKIP 5
  556. #define ATH6KL_CIPHER_CCKM_KRK 6
  557. #define ATH6KL_CIPHER_NONE 7 /* pseudo value */
  558. /*
  559. * 802.11 rate set.
  560. */
  561. #define ATH6KL_RATE_MAXSIZE 15 /* max rates we'll handle */
  562. #define ATH_OUI_TYPE 0x01
  563. #define WPA_OUI_TYPE 0x01
  564. #define WMM_PARAM_OUI_SUBTYPE 0x01
  565. #define WMM_OUI_TYPE 0x02
  566. #define WSC_OUT_TYPE 0x04
  567. enum wmi_connect_ctrl_flags_bits {
  568. CONNECT_ASSOC_POLICY_USER = 0x0001,
  569. CONNECT_SEND_REASSOC = 0x0002,
  570. CONNECT_IGNORE_WPAx_GROUP_CIPHER = 0x0004,
  571. CONNECT_PROFILE_MATCH_DONE = 0x0008,
  572. CONNECT_IGNORE_AAC_BEACON = 0x0010,
  573. CONNECT_CSA_FOLLOW_BSS = 0x0020,
  574. CONNECT_DO_WPA_OFFLOAD = 0x0040,
  575. CONNECT_DO_NOT_DEAUTH = 0x0080,
  576. CONNECT_WPS_FLAG = 0x0100,
  577. };
  578. struct wmi_connect_cmd {
  579. u8 nw_type;
  580. u8 dot11_auth_mode;
  581. u8 auth_mode;
  582. u8 prwise_crypto_type;
  583. u8 prwise_crypto_len;
  584. u8 grp_crypto_type;
  585. u8 grp_crypto_len;
  586. u8 ssid_len;
  587. u8 ssid[IEEE80211_MAX_SSID_LEN];
  588. __le16 ch;
  589. u8 bssid[ETH_ALEN];
  590. __le32 ctrl_flags;
  591. u8 nw_subtype;
  592. } __packed;
  593. /* WMI_RECONNECT_CMDID */
  594. struct wmi_reconnect_cmd {
  595. /* channel hint */
  596. __le16 channel;
  597. /* mandatory if set */
  598. u8 bssid[ETH_ALEN];
  599. } __packed;
  600. /* WMI_ADD_CIPHER_KEY_CMDID */
  601. enum key_usage {
  602. PAIRWISE_USAGE = 0x00,
  603. GROUP_USAGE = 0x01,
  604. /* default Tx Key - static WEP only */
  605. TX_USAGE = 0x02,
  606. };
  607. /*
  608. * Bit Flag
  609. * Bit 0 - Initialise TSC - default is Initialize
  610. */
  611. #define KEY_OP_INIT_TSC 0x01
  612. #define KEY_OP_INIT_RSC 0x02
  613. /* default initialise the TSC & RSC */
  614. #define KEY_OP_INIT_VAL 0x03
  615. #define KEY_OP_VALID_MASK 0x03
  616. struct wmi_add_cipher_key_cmd {
  617. u8 key_index;
  618. u8 key_type;
  619. /* enum key_usage */
  620. u8 key_usage;
  621. u8 key_len;
  622. /* key replay sequence counter */
  623. u8 key_rsc[8];
  624. u8 key[WLAN_MAX_KEY_LEN];
  625. /* additional key control info */
  626. u8 key_op_ctrl;
  627. u8 key_mac_addr[ETH_ALEN];
  628. } __packed;
  629. /* WMI_DELETE_CIPHER_KEY_CMDID */
  630. struct wmi_delete_cipher_key_cmd {
  631. u8 key_index;
  632. } __packed;
  633. #define WMI_KRK_LEN 16
  634. /* WMI_ADD_KRK_CMDID */
  635. struct wmi_add_krk_cmd {
  636. u8 krk[WMI_KRK_LEN];
  637. } __packed;
  638. /* WMI_SETPMKID_CMDID */
  639. #define WMI_PMKID_LEN 16
  640. enum pmkid_enable_flg {
  641. PMKID_DISABLE = 0,
  642. PMKID_ENABLE = 1,
  643. };
  644. struct wmi_setpmkid_cmd {
  645. u8 bssid[ETH_ALEN];
  646. /* enum pmkid_enable_flg */
  647. u8 enable;
  648. u8 pmkid[WMI_PMKID_LEN];
  649. } __packed;
  650. /* WMI_START_SCAN_CMD */
  651. enum wmi_scan_type {
  652. WMI_LONG_SCAN = 0,
  653. WMI_SHORT_SCAN = 1,
  654. };
  655. struct wmi_supp_rates {
  656. u8 nrates;
  657. u8 rates[ATH6KL_RATE_MAXSIZE];
  658. };
  659. struct wmi_begin_scan_cmd {
  660. __le32 force_fg_scan;
  661. /* for legacy cisco AP compatibility */
  662. __le32 is_legacy;
  663. /* max duration in the home channel(msec) */
  664. __le32 home_dwell_time;
  665. /* time interval between scans (msec) */
  666. __le32 force_scan_intvl;
  667. /* no CCK rates */
  668. __le32 no_cck;
  669. /* enum wmi_scan_type */
  670. u8 scan_type;
  671. /* Supported rates to advertise in the probe request frames */
  672. struct wmi_supp_rates supp_rates[IEEE80211_NUM_BANDS];
  673. /* how many channels follow */
  674. u8 num_ch;
  675. /* channels in Mhz */
  676. __le16 ch_list[1];
  677. } __packed;
  678. /* wmi_start_scan_cmd is to be deprecated. Use
  679. * wmi_begin_scan_cmd instead. The new structure supports P2P mgmt
  680. * operations using station interface.
  681. */
  682. struct wmi_start_scan_cmd {
  683. __le32 force_fg_scan;
  684. /* for legacy cisco AP compatibility */
  685. __le32 is_legacy;
  686. /* max duration in the home channel(msec) */
  687. __le32 home_dwell_time;
  688. /* time interval between scans (msec) */
  689. __le32 force_scan_intvl;
  690. /* enum wmi_scan_type */
  691. u8 scan_type;
  692. /* how many channels follow */
  693. u8 num_ch;
  694. /* channels in Mhz */
  695. __le16 ch_list[1];
  696. } __packed;
  697. /*
  698. * Warning: scan control flag value of 0xFF is used to disable
  699. * all flags in WMI_SCAN_PARAMS_CMD. Do not add any more
  700. * flags here
  701. */
  702. enum wmi_scan_ctrl_flags_bits {
  703. /* set if can scan in the connect cmd */
  704. CONNECT_SCAN_CTRL_FLAGS = 0x01,
  705. /* set if scan for the SSID it is already connected to */
  706. SCAN_CONNECTED_CTRL_FLAGS = 0x02,
  707. /* set if enable active scan */
  708. ACTIVE_SCAN_CTRL_FLAGS = 0x04,
  709. /* set if enable roam scan when bmiss and lowrssi */
  710. ROAM_SCAN_CTRL_FLAGS = 0x08,
  711. /* set if follows customer BSSINFO reporting rule */
  712. REPORT_BSSINFO_CTRL_FLAGS = 0x10,
  713. /* if disabled, target doesn't scan after a disconnect event */
  714. ENABLE_AUTO_CTRL_FLAGS = 0x20,
  715. /*
  716. * Scan complete event with canceled status will be generated when
  717. * a scan is prempted before it gets completed.
  718. */
  719. ENABLE_SCAN_ABORT_EVENT = 0x40
  720. };
  721. struct wmi_scan_params_cmd {
  722. /* sec */
  723. __le16 fg_start_period;
  724. /* sec */
  725. __le16 fg_end_period;
  726. /* sec */
  727. __le16 bg_period;
  728. /* msec */
  729. __le16 maxact_chdwell_time;
  730. /* msec */
  731. __le16 pas_chdwell_time;
  732. /* how many shorts scan for one long */
  733. u8 short_scan_ratio;
  734. u8 scan_ctrl_flags;
  735. /* msec */
  736. __le16 minact_chdwell_time;
  737. /* max active scans per ssid */
  738. __le16 maxact_scan_per_ssid;
  739. /* msecs */
  740. __le32 max_dfsch_act_time;
  741. } __packed;
  742. /* WMI_SET_BSS_FILTER_CMDID */
  743. enum wmi_bss_filter {
  744. /* no beacons forwarded */
  745. NONE_BSS_FILTER = 0x0,
  746. /* all beacons forwarded */
  747. ALL_BSS_FILTER,
  748. /* only beacons matching profile */
  749. PROFILE_FILTER,
  750. /* all but beacons matching profile */
  751. ALL_BUT_PROFILE_FILTER,
  752. /* only beacons matching current BSS */
  753. CURRENT_BSS_FILTER,
  754. /* all but beacons matching BSS */
  755. ALL_BUT_BSS_FILTER,
  756. /* beacons matching probed ssid */
  757. PROBED_SSID_FILTER,
  758. /* marker only */
  759. LAST_BSS_FILTER,
  760. };
  761. struct wmi_bss_filter_cmd {
  762. /* see, enum wmi_bss_filter */
  763. u8 bss_filter;
  764. /* for alignment */
  765. u8 reserved1;
  766. /* for alignment */
  767. __le16 reserved2;
  768. __le32 ie_mask;
  769. } __packed;
  770. /* WMI_SET_PROBED_SSID_CMDID */
  771. #define MAX_PROBED_SSID_INDEX 9
  772. enum wmi_ssid_flag {
  773. /* disables entry */
  774. DISABLE_SSID_FLAG = 0,
  775. /* probes specified ssid */
  776. SPECIFIC_SSID_FLAG = 0x01,
  777. /* probes for any ssid */
  778. ANY_SSID_FLAG = 0x02,
  779. };
  780. struct wmi_probed_ssid_cmd {
  781. /* 0 to MAX_PROBED_SSID_INDEX */
  782. u8 entry_index;
  783. /* see, enum wmi_ssid_flg */
  784. u8 flag;
  785. u8 ssid_len;
  786. u8 ssid[IEEE80211_MAX_SSID_LEN];
  787. } __packed;
  788. /*
  789. * WMI_SET_LISTEN_INT_CMDID
  790. * The Listen interval is between 15 and 3000 TUs
  791. */
  792. struct wmi_listen_int_cmd {
  793. __le16 listen_intvl;
  794. __le16 num_beacons;
  795. } __packed;
  796. /* WMI_SET_POWER_MODE_CMDID */
  797. enum wmi_power_mode {
  798. REC_POWER = 0x01,
  799. MAX_PERF_POWER,
  800. };
  801. struct wmi_power_mode_cmd {
  802. /* see, enum wmi_power_mode */
  803. u8 pwr_mode;
  804. } __packed;
  805. /*
  806. * Policy to determnine whether power save failure event should be sent to
  807. * host during scanning
  808. */
  809. enum power_save_fail_event_policy {
  810. SEND_POWER_SAVE_FAIL_EVENT_ALWAYS = 1,
  811. IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN = 2,
  812. };
  813. struct wmi_power_params_cmd {
  814. /* msec */
  815. __le16 idle_period;
  816. __le16 pspoll_number;
  817. __le16 dtim_policy;
  818. __le16 tx_wakeup_policy;
  819. __le16 num_tx_to_wakeup;
  820. __le16 ps_fail_event_policy;
  821. } __packed;
  822. /* WMI_SET_DISC_TIMEOUT_CMDID */
  823. struct wmi_disc_timeout_cmd {
  824. /* seconds */
  825. u8 discon_timeout;
  826. } __packed;
  827. enum dir_type {
  828. UPLINK_TRAFFIC = 0,
  829. DNLINK_TRAFFIC = 1,
  830. BIDIR_TRAFFIC = 2,
  831. };
  832. enum voiceps_cap_type {
  833. DISABLE_FOR_THIS_AC = 0,
  834. ENABLE_FOR_THIS_AC = 1,
  835. ENABLE_FOR_ALL_AC = 2,
  836. };
  837. enum traffic_type {
  838. TRAFFIC_TYPE_APERIODIC = 0,
  839. TRAFFIC_TYPE_PERIODIC = 1,
  840. };
  841. /* WMI_SYNCHRONIZE_CMDID */
  842. struct wmi_sync_cmd {
  843. u8 data_sync_map;
  844. } __packed;
  845. /* WMI_CREATE_PSTREAM_CMDID */
  846. struct wmi_create_pstream_cmd {
  847. /* msec */
  848. __le32 min_service_int;
  849. /* msec */
  850. __le32 max_service_int;
  851. /* msec */
  852. __le32 inactivity_int;
  853. /* msec */
  854. __le32 suspension_int;
  855. __le32 service_start_time;
  856. /* in bps */
  857. __le32 min_data_rate;
  858. /* in bps */
  859. __le32 mean_data_rate;
  860. /* in bps */
  861. __le32 peak_data_rate;
  862. __le32 max_burst_size;
  863. __le32 delay_bound;
  864. /* in bps */
  865. __le32 min_phy_rate;
  866. __le32 sba;
  867. __le32 medium_time;
  868. /* in octects */
  869. __le16 nominal_msdu;
  870. /* in octects */
  871. __le16 max_msdu;
  872. u8 traffic_class;
  873. /* see, enum dir_type */
  874. u8 traffic_direc;
  875. u8 rx_queue_num;
  876. /* see, enum traffic_type */
  877. u8 traffic_type;
  878. /* see, enum voiceps_cap_type */
  879. u8 voice_psc_cap;
  880. u8 tsid;
  881. /* 802.1D user priority */
  882. u8 user_pri;
  883. /* nominal phy rate */
  884. u8 nominal_phy;
  885. } __packed;
  886. /* WMI_DELETE_PSTREAM_CMDID */
  887. struct wmi_delete_pstream_cmd {
  888. u8 tx_queue_num;
  889. u8 rx_queue_num;
  890. u8 traffic_direc;
  891. u8 traffic_class;
  892. u8 tsid;
  893. } __packed;
  894. /* WMI_SET_CHANNEL_PARAMS_CMDID */
  895. enum wmi_phy_mode {
  896. WMI_11A_MODE = 0x1,
  897. WMI_11G_MODE = 0x2,
  898. WMI_11AG_MODE = 0x3,
  899. WMI_11B_MODE = 0x4,
  900. WMI_11GONLY_MODE = 0x5,
  901. };
  902. #define WMI_MAX_CHANNELS 32
  903. /*
  904. * WMI_RSSI_THRESHOLD_PARAMS_CMDID
  905. * Setting the polltime to 0 would disable polling. Threshold values are
  906. * in the ascending order, and should agree to:
  907. * (lowThreshold_lowerVal < lowThreshold_upperVal < highThreshold_lowerVal
  908. * < highThreshold_upperVal)
  909. */
  910. struct wmi_rssi_threshold_params_cmd {
  911. /* polling time as a factor of LI */
  912. __le32 poll_time;
  913. /* lowest of upper */
  914. a_sle16 thresh_above1_val;
  915. a_sle16 thresh_above2_val;
  916. a_sle16 thresh_above3_val;
  917. a_sle16 thresh_above4_val;
  918. a_sle16 thresh_above5_val;
  919. /* highest of upper */
  920. a_sle16 thresh_above6_val;
  921. /* lowest of bellow */
  922. a_sle16 thresh_below1_val;
  923. a_sle16 thresh_below2_val;
  924. a_sle16 thresh_below3_val;
  925. a_sle16 thresh_below4_val;
  926. a_sle16 thresh_below5_val;
  927. /* highest of bellow */
  928. a_sle16 thresh_below6_val;
  929. /* "alpha" */
  930. u8 weight;
  931. u8 reserved[3];
  932. } __packed;
  933. /*
  934. * WMI_SNR_THRESHOLD_PARAMS_CMDID
  935. * Setting the polltime to 0 would disable polling.
  936. */
  937. struct wmi_snr_threshold_params_cmd {
  938. /* polling time as a factor of LI */
  939. __le32 poll_time;
  940. /* "alpha" */
  941. u8 weight;
  942. /* lowest of uppper */
  943. u8 thresh_above1_val;
  944. u8 thresh_above2_val;
  945. u8 thresh_above3_val;
  946. /* highest of upper */
  947. u8 thresh_above4_val;
  948. /* lowest of bellow */
  949. u8 thresh_below1_val;
  950. u8 thresh_below2_val;
  951. u8 thresh_below3_val;
  952. /* highest of bellow */
  953. u8 thresh_below4_val;
  954. u8 reserved[3];
  955. } __packed;
  956. enum wmi_preamble_policy {
  957. WMI_IGNORE_BARKER_IN_ERP = 0,
  958. WMI_DONOT_IGNORE_BARKER_IN_ERP
  959. };
  960. struct wmi_set_lpreamble_cmd {
  961. u8 status;
  962. u8 preamble_policy;
  963. } __packed;
  964. struct wmi_set_rts_cmd {
  965. __le16 threshold;
  966. } __packed;
  967. /* WMI_SET_TX_PWR_CMDID */
  968. struct wmi_set_tx_pwr_cmd {
  969. /* in dbM units */
  970. u8 dbM;
  971. } __packed;
  972. struct wmi_tx_pwr_reply {
  973. /* in dbM units */
  974. u8 dbM;
  975. } __packed;
  976. struct wmi_report_sleep_state_event {
  977. __le32 sleep_state;
  978. };
  979. enum wmi_report_sleep_status {
  980. WMI_REPORT_SLEEP_STATUS_IS_DEEP_SLEEP = 0,
  981. WMI_REPORT_SLEEP_STATUS_IS_AWAKE
  982. };
  983. enum target_event_report_config {
  984. /* default */
  985. DISCONN_EVT_IN_RECONN = 0,
  986. NO_DISCONN_EVT_IN_RECONN
  987. };
  988. /* Command Replies */
  989. /* WMI_GET_CHANNEL_LIST_CMDID reply */
  990. struct wmi_channel_list_reply {
  991. u8 reserved;
  992. /* number of channels in reply */
  993. u8 num_ch;
  994. /* channel in Mhz */
  995. __le16 ch_list[1];
  996. } __packed;
  997. /* List of Events (target to host) */
  998. enum wmi_event_id {
  999. WMI_READY_EVENTID = 0x1001,
  1000. WMI_CONNECT_EVENTID,
  1001. WMI_DISCONNECT_EVENTID,
  1002. WMI_BSSINFO_EVENTID,
  1003. WMI_CMDERROR_EVENTID,
  1004. WMI_REGDOMAIN_EVENTID,
  1005. WMI_PSTREAM_TIMEOUT_EVENTID,
  1006. WMI_NEIGHBOR_REPORT_EVENTID,
  1007. WMI_TKIP_MICERR_EVENTID,
  1008. WMI_SCAN_COMPLETE_EVENTID, /* 0x100a */
  1009. WMI_REPORT_STATISTICS_EVENTID,
  1010. WMI_RSSI_THRESHOLD_EVENTID,
  1011. WMI_ERROR_REPORT_EVENTID,
  1012. WMI_OPT_RX_FRAME_EVENTID,
  1013. WMI_REPORT_ROAM_TBL_EVENTID,
  1014. WMI_EXTENSION_EVENTID,
  1015. WMI_CAC_EVENTID,
  1016. WMI_SNR_THRESHOLD_EVENTID,
  1017. WMI_LQ_THRESHOLD_EVENTID,
  1018. WMI_TX_RETRY_ERR_EVENTID, /* 0x1014 */
  1019. WMI_REPORT_ROAM_DATA_EVENTID,
  1020. WMI_TEST_EVENTID,
  1021. WMI_APLIST_EVENTID,
  1022. WMI_GET_WOW_LIST_EVENTID,
  1023. WMI_GET_PMKID_LIST_EVENTID,
  1024. WMI_CHANNEL_CHANGE_EVENTID,
  1025. WMI_PEER_NODE_EVENTID,
  1026. WMI_PSPOLL_EVENTID,
  1027. WMI_DTIMEXPIRY_EVENTID,
  1028. WMI_WLAN_VERSION_EVENTID,
  1029. WMI_SET_PARAMS_REPLY_EVENTID,
  1030. WMI_ADDBA_REQ_EVENTID, /*0x1020 */
  1031. WMI_ADDBA_RESP_EVENTID,
  1032. WMI_DELBA_REQ_EVENTID,
  1033. WMI_TX_COMPLETE_EVENTID,
  1034. WMI_HCI_EVENT_EVENTID,
  1035. WMI_ACL_DATA_EVENTID,
  1036. WMI_REPORT_SLEEP_STATE_EVENTID,
  1037. WMI_REPORT_BTCOEX_STATS_EVENTID,
  1038. WMI_REPORT_BTCOEX_CONFIG_EVENTID,
  1039. WMI_GET_PMK_EVENTID,
  1040. /* DFS Events */
  1041. WMI_DFS_HOST_ATTACH_EVENTID,
  1042. WMI_DFS_HOST_INIT_EVENTID,
  1043. WMI_DFS_RESET_DELAYLINES_EVENTID,
  1044. WMI_DFS_RESET_RADARQ_EVENTID,
  1045. WMI_DFS_RESET_AR_EVENTID,
  1046. WMI_DFS_RESET_ARQ_EVENTID,
  1047. WMI_DFS_SET_DUR_MULTIPLIER_EVENTID,
  1048. WMI_DFS_SET_BANGRADAR_EVENTID,
  1049. WMI_DFS_SET_DEBUGLEVEL_EVENTID,
  1050. WMI_DFS_PHYERR_EVENTID,
  1051. /* CCX Evants */
  1052. WMI_CCX_RM_STATUS_EVENTID,
  1053. /* P2P Events */
  1054. WMI_P2P_GO_NEG_RESULT_EVENTID,
  1055. WMI_WAC_SCAN_DONE_EVENTID,
  1056. WMI_WAC_REPORT_BSS_EVENTID,
  1057. WMI_WAC_START_WPS_EVENTID,
  1058. WMI_WAC_CTRL_REQ_REPLY_EVENTID,
  1059. WMI_REPORT_WMM_PARAMS_EVENTID,
  1060. WMI_WAC_REJECT_WPS_EVENTID,
  1061. /* More P2P Events */
  1062. WMI_P2P_GO_NEG_REQ_EVENTID,
  1063. WMI_P2P_INVITE_REQ_EVENTID,
  1064. WMI_P2P_INVITE_RCVD_RESULT_EVENTID,
  1065. WMI_P2P_INVITE_SENT_RESULT_EVENTID,
  1066. WMI_P2P_PROV_DISC_RESP_EVENTID,
  1067. WMI_P2P_PROV_DISC_REQ_EVENTID,
  1068. /* RFKILL Events */
  1069. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1070. WMI_RFKILL_GET_MODE_CMD_EVENTID,
  1071. WMI_P2P_START_SDPD_EVENTID,
  1072. WMI_P2P_SDPD_RX_EVENTID,
  1073. WMI_THIN_RESERVED_START_EVENTID = 0x8000,
  1074. /* Events in this range are reserved for thinmode */
  1075. WMI_THIN_RESERVED_END_EVENTID = 0x8fff,
  1076. WMI_SET_CHANNEL_EVENTID,
  1077. WMI_ASSOC_REQ_EVENTID,
  1078. /* Generic ACS event */
  1079. WMI_ACS_EVENTID,
  1080. WMI_STORERECALL_STORE_EVENTID,
  1081. WMI_WOW_EXT_WAKE_EVENTID,
  1082. WMI_GTK_OFFLOAD_STATUS_EVENTID,
  1083. WMI_NETWORK_LIST_OFFLOAD_EVENTID,
  1084. WMI_REMAIN_ON_CHNL_EVENTID,
  1085. WMI_CANCEL_REMAIN_ON_CHNL_EVENTID,
  1086. WMI_TX_STATUS_EVENTID,
  1087. WMI_RX_PROBE_REQ_EVENTID,
  1088. WMI_P2P_CAPABILITIES_EVENTID,
  1089. WMI_RX_ACTION_EVENTID,
  1090. WMI_P2P_INFO_EVENTID,
  1091. };
  1092. struct wmi_ready_event_2 {
  1093. __le32 sw_version;
  1094. __le32 abi_version;
  1095. u8 mac_addr[ETH_ALEN];
  1096. u8 phy_cap;
  1097. } __packed;
  1098. /* Connect Event */
  1099. struct wmi_connect_event {
  1100. union {
  1101. struct {
  1102. __le16 ch;
  1103. u8 bssid[ETH_ALEN];
  1104. __le16 listen_intvl;
  1105. __le16 beacon_intvl;
  1106. __le32 nw_type;
  1107. } sta;
  1108. struct {
  1109. u8 phymode;
  1110. u8 aid;
  1111. u8 mac_addr[ETH_ALEN];
  1112. u8 auth;
  1113. u8 keymgmt;
  1114. __le16 cipher;
  1115. u8 apsd_info;
  1116. u8 unused[3];
  1117. } ap_sta;
  1118. struct {
  1119. __le16 ch;
  1120. u8 bssid[ETH_ALEN];
  1121. u8 unused[8];
  1122. } ap_bss;
  1123. } u;
  1124. u8 beacon_ie_len;
  1125. u8 assoc_req_len;
  1126. u8 assoc_resp_len;
  1127. u8 assoc_info[1];
  1128. } __packed;
  1129. /* Disconnect Event */
  1130. enum wmi_disconnect_reason {
  1131. NO_NETWORK_AVAIL = 0x01,
  1132. /* bmiss */
  1133. LOST_LINK = 0x02,
  1134. DISCONNECT_CMD = 0x03,
  1135. BSS_DISCONNECTED = 0x04,
  1136. AUTH_FAILED = 0x05,
  1137. ASSOC_FAILED = 0x06,
  1138. NO_RESOURCES_AVAIL = 0x07,
  1139. CSERV_DISCONNECT = 0x08,
  1140. INVALID_PROFILE = 0x0a,
  1141. DOT11H_CHANNEL_SWITCH = 0x0b,
  1142. PROFILE_MISMATCH = 0x0c,
  1143. CONNECTION_EVICTED = 0x0d,
  1144. IBSS_MERGE = 0xe,
  1145. };
  1146. #define ATH6KL_COUNTRY_RD_SHIFT 16
  1147. struct ath6kl_wmi_regdomain {
  1148. __le32 reg_code;
  1149. };
  1150. struct wmi_disconnect_event {
  1151. /* reason code, see 802.11 spec. */
  1152. __le16 proto_reason_status;
  1153. /* set if known */
  1154. u8 bssid[ETH_ALEN];
  1155. /* see WMI_DISCONNECT_REASON */
  1156. u8 disconn_reason;
  1157. u8 assoc_resp_len;
  1158. u8 assoc_info[1];
  1159. } __packed;
  1160. /*
  1161. * BSS Info Event.
  1162. * Mechanism used to inform host of the presence and characteristic of
  1163. * wireless networks present. Consists of bss info header followed by
  1164. * the beacon or probe-response frame body. The 802.11 header is no included.
  1165. */
  1166. enum wmi_bi_ftype {
  1167. BEACON_FTYPE = 0x1,
  1168. PROBERESP_FTYPE,
  1169. ACTION_MGMT_FTYPE,
  1170. PROBEREQ_FTYPE,
  1171. };
  1172. #define DEF_LRSSI_SCAN_PERIOD 5
  1173. #define DEF_LRSSI_ROAM_THRESHOLD 20
  1174. #define DEF_LRSSI_ROAM_FLOOR 60
  1175. #define DEF_SCAN_FOR_ROAM_INTVL 2
  1176. enum wmi_roam_ctrl {
  1177. WMI_FORCE_ROAM = 1,
  1178. WMI_SET_ROAM_MODE,
  1179. WMI_SET_HOST_BIAS,
  1180. WMI_SET_LRSSI_SCAN_PARAMS,
  1181. };
  1182. enum wmi_roam_mode {
  1183. WMI_DEFAULT_ROAM_MODE = 1, /* RSSI based roam */
  1184. WMI_HOST_BIAS_ROAM_MODE = 2, /* Host bias based roam */
  1185. WMI_LOCK_BSS_MODE = 3, /* Lock to the current BSS */
  1186. };
  1187. struct bss_bias {
  1188. u8 bssid[ETH_ALEN];
  1189. s8 bias;
  1190. } __packed;
  1191. struct bss_bias_info {
  1192. u8 num_bss;
  1193. struct bss_bias bss_bias[0];
  1194. } __packed;
  1195. struct low_rssi_scan_params {
  1196. __le16 lrssi_scan_period;
  1197. a_sle16 lrssi_scan_threshold;
  1198. a_sle16 lrssi_roam_threshold;
  1199. u8 roam_rssi_floor;
  1200. u8 reserved[1];
  1201. } __packed;
  1202. struct roam_ctrl_cmd {
  1203. union {
  1204. u8 bssid[ETH_ALEN]; /* WMI_FORCE_ROAM */
  1205. u8 roam_mode; /* WMI_SET_ROAM_MODE */
  1206. struct bss_bias_info bss; /* WMI_SET_HOST_BIAS */
  1207. struct low_rssi_scan_params params; /* WMI_SET_LRSSI_SCAN_PARAMS
  1208. */
  1209. } __packed info;
  1210. u8 roam_ctrl;
  1211. } __packed;
  1212. /* BSS INFO HDR version 2.0 */
  1213. struct wmi_bss_info_hdr2 {
  1214. __le16 ch; /* frequency in MHz */
  1215. /* see, enum wmi_bi_ftype */
  1216. u8 frame_type;
  1217. u8 snr; /* note: rssi = snr - 95 dBm */
  1218. u8 bssid[ETH_ALEN];
  1219. __le16 ie_mask;
  1220. } __packed;
  1221. /* Command Error Event */
  1222. enum wmi_error_code {
  1223. INVALID_PARAM = 0x01,
  1224. ILLEGAL_STATE = 0x02,
  1225. INTERNAL_ERROR = 0x03,
  1226. };
  1227. struct wmi_cmd_error_event {
  1228. __le16 cmd_id;
  1229. u8 err_code;
  1230. } __packed;
  1231. struct wmi_pstream_timeout_event {
  1232. u8 tx_queue_num;
  1233. u8 rx_queue_num;
  1234. u8 traffic_direc;
  1235. u8 traffic_class;
  1236. } __packed;
  1237. /*
  1238. * The WMI_NEIGHBOR_REPORT Event is generated by the target to inform
  1239. * the host of BSS's it has found that matches the current profile.
  1240. * It can be used by the host to cache PMKs and/to initiate pre-authentication
  1241. * if the BSS supports it. The first bssid is always the current associated
  1242. * BSS.
  1243. * The bssid and bssFlags information repeats according to the number
  1244. * or APs reported.
  1245. */
  1246. enum wmi_bss_flags {
  1247. WMI_DEFAULT_BSS_FLAGS = 0x00,
  1248. WMI_PREAUTH_CAPABLE_BSS = 0x01,
  1249. WMI_PMKID_VALID_BSS = 0x02,
  1250. };
  1251. struct wmi_neighbor_info {
  1252. u8 bssid[ETH_ALEN];
  1253. u8 bss_flags; /* enum wmi_bss_flags */
  1254. } __packed;
  1255. struct wmi_neighbor_report_event {
  1256. u8 num_neighbors;
  1257. struct wmi_neighbor_info neighbor[0];
  1258. } __packed;
  1259. /* TKIP MIC Error Event */
  1260. struct wmi_tkip_micerr_event {
  1261. u8 key_id;
  1262. u8 is_mcast;
  1263. } __packed;
  1264. enum wmi_scan_status {
  1265. WMI_SCAN_STATUS_SUCCESS = 0,
  1266. };
  1267. /* WMI_SCAN_COMPLETE_EVENTID */
  1268. struct wmi_scan_complete_event {
  1269. a_sle32 status;
  1270. } __packed;
  1271. #define MAX_OPT_DATA_LEN 1400
  1272. /*
  1273. * Special frame receive Event.
  1274. * Mechanism used to inform host of the receiption of the special frames.
  1275. * Consists of special frame info header followed by special frame body.
  1276. * The 802.11 header is not included.
  1277. */
  1278. struct wmi_opt_rx_info_hdr {
  1279. __le16 ch;
  1280. u8 frame_type;
  1281. s8 snr;
  1282. u8 src_addr[ETH_ALEN];
  1283. u8 bssid[ETH_ALEN];
  1284. } __packed;
  1285. /* Reporting statistic */
  1286. struct tx_stats {
  1287. __le32 pkt;
  1288. __le32 byte;
  1289. __le32 ucast_pkt;
  1290. __le32 ucast_byte;
  1291. __le32 mcast_pkt;
  1292. __le32 mcast_byte;
  1293. __le32 bcast_pkt;
  1294. __le32 bcast_byte;
  1295. __le32 rts_success_cnt;
  1296. __le32 pkt_per_ac[4];
  1297. __le32 err_per_ac[4];
  1298. __le32 err;
  1299. __le32 fail_cnt;
  1300. __le32 retry_cnt;
  1301. __le32 mult_retry_cnt;
  1302. __le32 rts_fail_cnt;
  1303. a_sle32 ucast_rate;
  1304. } __packed;
  1305. struct rx_stats {
  1306. __le32 pkt;
  1307. __le32 byte;
  1308. __le32 ucast_pkt;
  1309. __le32 ucast_byte;
  1310. __le32 mcast_pkt;
  1311. __le32 mcast_byte;
  1312. __le32 bcast_pkt;
  1313. __le32 bcast_byte;
  1314. __le32 frgment_pkt;
  1315. __le32 err;
  1316. __le32 crc_err;
  1317. __le32 key_cache_miss;
  1318. __le32 decrypt_err;
  1319. __le32 dupl_frame;
  1320. a_sle32 ucast_rate;
  1321. } __packed;
  1322. struct tkip_ccmp_stats {
  1323. __le32 tkip_local_mic_fail;
  1324. __le32 tkip_cnter_measures_invoked;
  1325. __le32 tkip_replays;
  1326. __le32 tkip_fmt_err;
  1327. __le32 ccmp_fmt_err;
  1328. __le32 ccmp_replays;
  1329. } __packed;
  1330. struct pm_stats {
  1331. __le32 pwr_save_failure_cnt;
  1332. __le16 stop_tx_failure_cnt;
  1333. __le16 atim_tx_failure_cnt;
  1334. __le16 atim_rx_failure_cnt;
  1335. __le16 bcn_rx_failure_cnt;
  1336. } __packed;
  1337. struct cserv_stats {
  1338. __le32 cs_bmiss_cnt;
  1339. __le32 cs_low_rssi_cnt;
  1340. __le16 cs_connect_cnt;
  1341. __le16 cs_discon_cnt;
  1342. a_sle16 cs_ave_beacon_rssi;
  1343. __le16 cs_roam_count;
  1344. a_sle16 cs_rssi;
  1345. u8 cs_snr;
  1346. u8 cs_ave_beacon_snr;
  1347. u8 cs_last_roam_msec;
  1348. } __packed;
  1349. struct wlan_net_stats {
  1350. struct tx_stats tx;
  1351. struct rx_stats rx;
  1352. struct tkip_ccmp_stats tkip_ccmp_stats;
  1353. } __packed;
  1354. struct arp_stats {
  1355. __le32 arp_received;
  1356. __le32 arp_matched;
  1357. __le32 arp_replied;
  1358. } __packed;
  1359. struct wlan_wow_stats {
  1360. __le32 wow_pkt_dropped;
  1361. __le16 wow_evt_discarded;
  1362. u8 wow_host_pkt_wakeups;
  1363. u8 wow_host_evt_wakeups;
  1364. } __packed;
  1365. struct wmi_target_stats {
  1366. __le32 lq_val;
  1367. a_sle32 noise_floor_calib;
  1368. struct pm_stats pm_stats;
  1369. struct wlan_net_stats stats;
  1370. struct wlan_wow_stats wow_stats;
  1371. struct arp_stats arp_stats;
  1372. struct cserv_stats cserv_stats;
  1373. } __packed;
  1374. /*
  1375. * WMI_RSSI_THRESHOLD_EVENTID.
  1376. * Indicate the RSSI events to host. Events are indicated when we breach a
  1377. * thresold value.
  1378. */
  1379. enum wmi_rssi_threshold_val {
  1380. WMI_RSSI_THRESHOLD1_ABOVE = 0,
  1381. WMI_RSSI_THRESHOLD2_ABOVE,
  1382. WMI_RSSI_THRESHOLD3_ABOVE,
  1383. WMI_RSSI_THRESHOLD4_ABOVE,
  1384. WMI_RSSI_THRESHOLD5_ABOVE,
  1385. WMI_RSSI_THRESHOLD6_ABOVE,
  1386. WMI_RSSI_THRESHOLD1_BELOW,
  1387. WMI_RSSI_THRESHOLD2_BELOW,
  1388. WMI_RSSI_THRESHOLD3_BELOW,
  1389. WMI_RSSI_THRESHOLD4_BELOW,
  1390. WMI_RSSI_THRESHOLD5_BELOW,
  1391. WMI_RSSI_THRESHOLD6_BELOW
  1392. };
  1393. struct wmi_rssi_threshold_event {
  1394. a_sle16 rssi;
  1395. u8 range;
  1396. } __packed;
  1397. enum wmi_snr_threshold_val {
  1398. WMI_SNR_THRESHOLD1_ABOVE = 1,
  1399. WMI_SNR_THRESHOLD1_BELOW,
  1400. WMI_SNR_THRESHOLD2_ABOVE,
  1401. WMI_SNR_THRESHOLD2_BELOW,
  1402. WMI_SNR_THRESHOLD3_ABOVE,
  1403. WMI_SNR_THRESHOLD3_BELOW,
  1404. WMI_SNR_THRESHOLD4_ABOVE,
  1405. WMI_SNR_THRESHOLD4_BELOW
  1406. };
  1407. struct wmi_snr_threshold_event {
  1408. /* see, enum wmi_snr_threshold_val */
  1409. u8 range;
  1410. u8 snr;
  1411. } __packed;
  1412. /* WMI_REPORT_ROAM_TBL_EVENTID */
  1413. #define MAX_ROAM_TBL_CAND 5
  1414. struct wmi_bss_roam_info {
  1415. a_sle32 roam_util;
  1416. u8 bssid[ETH_ALEN];
  1417. s8 rssi;
  1418. s8 rssidt;
  1419. s8 last_rssi;
  1420. s8 util;
  1421. s8 bias;
  1422. /* for alignment */
  1423. u8 reserved;
  1424. } __packed;
  1425. struct wmi_target_roam_tbl {
  1426. __le16 roam_mode;
  1427. __le16 num_entries;
  1428. struct wmi_bss_roam_info info[];
  1429. } __packed;
  1430. /* WMI_CAC_EVENTID */
  1431. enum cac_indication {
  1432. CAC_INDICATION_ADMISSION = 0x00,
  1433. CAC_INDICATION_ADMISSION_RESP = 0x01,
  1434. CAC_INDICATION_DELETE = 0x02,
  1435. CAC_INDICATION_NO_RESP = 0x03,
  1436. };
  1437. #define WMM_TSPEC_IE_LEN 63
  1438. struct wmi_cac_event {
  1439. u8 ac;
  1440. u8 cac_indication;
  1441. u8 status_code;
  1442. u8 tspec_suggestion[WMM_TSPEC_IE_LEN];
  1443. } __packed;
  1444. /* WMI_APLIST_EVENTID */
  1445. enum aplist_ver {
  1446. APLIST_VER1 = 1,
  1447. };
  1448. struct wmi_ap_info_v1 {
  1449. u8 bssid[ETH_ALEN];
  1450. __le16 channel;
  1451. } __packed;
  1452. union wmi_ap_info {
  1453. struct wmi_ap_info_v1 ap_info_v1;
  1454. } __packed;
  1455. struct wmi_aplist_event {
  1456. u8 ap_list_ver;
  1457. u8 num_ap;
  1458. union wmi_ap_info ap_list[1];
  1459. } __packed;
  1460. /* Developer Commands */
  1461. /*
  1462. * WMI_SET_BITRATE_CMDID
  1463. *
  1464. * Get bit rate cmd uses same definition as set bit rate cmd
  1465. */
  1466. enum wmi_bit_rate {
  1467. RATE_AUTO = -1,
  1468. RATE_1Mb = 0,
  1469. RATE_2Mb = 1,
  1470. RATE_5_5Mb = 2,
  1471. RATE_11Mb = 3,
  1472. RATE_6Mb = 4,
  1473. RATE_9Mb = 5,
  1474. RATE_12Mb = 6,
  1475. RATE_18Mb = 7,
  1476. RATE_24Mb = 8,
  1477. RATE_36Mb = 9,
  1478. RATE_48Mb = 10,
  1479. RATE_54Mb = 11,
  1480. RATE_MCS_0_20 = 12,
  1481. RATE_MCS_1_20 = 13,
  1482. RATE_MCS_2_20 = 14,
  1483. RATE_MCS_3_20 = 15,
  1484. RATE_MCS_4_20 = 16,
  1485. RATE_MCS_5_20 = 17,
  1486. RATE_MCS_6_20 = 18,
  1487. RATE_MCS_7_20 = 19,
  1488. RATE_MCS_0_40 = 20,
  1489. RATE_MCS_1_40 = 21,
  1490. RATE_MCS_2_40 = 22,
  1491. RATE_MCS_3_40 = 23,
  1492. RATE_MCS_4_40 = 24,
  1493. RATE_MCS_5_40 = 25,
  1494. RATE_MCS_6_40 = 26,
  1495. RATE_MCS_7_40 = 27,
  1496. };
  1497. struct wmi_bit_rate_reply {
  1498. /* see, enum wmi_bit_rate */
  1499. s8 rate_index;
  1500. } __packed;
  1501. /*
  1502. * WMI_SET_FIXRATES_CMDID
  1503. *
  1504. * Get fix rates cmd uses same definition as set fix rates cmd
  1505. */
  1506. struct wmi_fix_rates_reply {
  1507. /* see wmi_bit_rate */
  1508. __le32 fix_rate_mask;
  1509. } __packed;
  1510. enum roam_data_type {
  1511. /* get the roam time data */
  1512. ROAM_DATA_TIME = 1,
  1513. };
  1514. struct wmi_target_roam_time {
  1515. __le32 disassoc_time;
  1516. __le32 no_txrx_time;
  1517. __le32 assoc_time;
  1518. __le32 allow_txrx_time;
  1519. u8 disassoc_bssid[ETH_ALEN];
  1520. s8 disassoc_bss_rssi;
  1521. u8 assoc_bssid[ETH_ALEN];
  1522. s8 assoc_bss_rssi;
  1523. } __packed;
  1524. enum wmi_txop_cfg {
  1525. WMI_TXOP_DISABLED = 0,
  1526. WMI_TXOP_ENABLED
  1527. };
  1528. struct wmi_set_wmm_txop_cmd {
  1529. u8 txop_enable;
  1530. } __packed;
  1531. struct wmi_set_keepalive_cmd {
  1532. u8 keep_alive_intvl;
  1533. } __packed;
  1534. struct wmi_get_keepalive_cmd {
  1535. __le32 configured;
  1536. u8 keep_alive_intvl;
  1537. } __packed;
  1538. struct wmi_set_appie_cmd {
  1539. u8 mgmt_frm_type; /* enum wmi_mgmt_frame_type */
  1540. u8 ie_len;
  1541. u8 ie_info[0];
  1542. } __packed;
  1543. /* Notify the WSC registration status to the target */
  1544. #define WSC_REG_ACTIVE 1
  1545. #define WSC_REG_INACTIVE 0
  1546. #define WOW_MAX_FILTERS_PER_LIST 4
  1547. #define WOW_PATTERN_SIZE 64
  1548. #define WOW_MASK_SIZE 64
  1549. #define MAC_MAX_FILTERS_PER_LIST 4
  1550. struct wow_filter {
  1551. u8 wow_valid_filter;
  1552. u8 wow_filter_id;
  1553. u8 wow_filter_size;
  1554. u8 wow_filter_offset;
  1555. u8 wow_filter_mask[WOW_MASK_SIZE];
  1556. u8 wow_filter_pattern[WOW_PATTERN_SIZE];
  1557. } __packed;
  1558. #define MAX_IP_ADDRS 2
  1559. struct wmi_set_ip_cmd {
  1560. /* IP in network byte order */
  1561. __be32 ips[MAX_IP_ADDRS];
  1562. } __packed;
  1563. enum ath6kl_wow_filters {
  1564. WOW_FILTER_SSID = BIT(1),
  1565. WOW_FILTER_OPTION_MAGIC_PACKET = BIT(2),
  1566. WOW_FILTER_OPTION_EAP_REQ = BIT(3),
  1567. WOW_FILTER_OPTION_PATTERNS = BIT(4),
  1568. WOW_FILTER_OPTION_OFFLOAD_ARP = BIT(5),
  1569. WOW_FILTER_OPTION_OFFLOAD_NS = BIT(6),
  1570. WOW_FILTER_OPTION_OFFLOAD_GTK = BIT(7),
  1571. WOW_FILTER_OPTION_8021X_4WAYHS = BIT(8),
  1572. WOW_FILTER_OPTION_NLO_DISCVRY = BIT(9),
  1573. WOW_FILTER_OPTION_NWK_DISASSOC = BIT(10),
  1574. WOW_FILTER_OPTION_GTK_ERROR = BIT(11),
  1575. WOW_FILTER_OPTION_TEST_MODE = BIT(15),
  1576. };
  1577. enum ath6kl_host_mode {
  1578. ATH6KL_HOST_MODE_AWAKE,
  1579. ATH6KL_HOST_MODE_ASLEEP,
  1580. };
  1581. struct wmi_set_host_sleep_mode_cmd {
  1582. __le32 awake;
  1583. __le32 asleep;
  1584. } __packed;
  1585. enum ath6kl_wow_mode {
  1586. ATH6KL_WOW_MODE_DISABLE,
  1587. ATH6KL_WOW_MODE_ENABLE,
  1588. };
  1589. struct wmi_set_wow_mode_cmd {
  1590. __le32 enable_wow;
  1591. __le32 filter;
  1592. __le16 host_req_delay;
  1593. } __packed;
  1594. struct wmi_add_wow_pattern_cmd {
  1595. u8 filter_list_id;
  1596. u8 filter_size;
  1597. u8 filter_offset;
  1598. u8 filter[0];
  1599. } __packed;
  1600. struct wmi_del_wow_pattern_cmd {
  1601. __le16 filter_list_id;
  1602. __le16 filter_id;
  1603. } __packed;
  1604. /* WMI_SET_AKMP_PARAMS_CMD */
  1605. struct wmi_pmkid {
  1606. u8 pmkid[WMI_PMKID_LEN];
  1607. } __packed;
  1608. /* WMI_GET_PMKID_LIST_CMD Reply */
  1609. struct wmi_pmkid_list_reply {
  1610. __le32 num_pmkid;
  1611. u8 bssid_list[ETH_ALEN][1];
  1612. struct wmi_pmkid pmkid_list[1];
  1613. } __packed;
  1614. /* WMI_ADDBA_REQ_EVENTID */
  1615. struct wmi_addba_req_event {
  1616. u8 tid;
  1617. u8 win_sz;
  1618. __le16 st_seq_no;
  1619. /* f/w response for ADDBA Req; OK (0) or failure (!=0) */
  1620. u8 status;
  1621. } __packed;
  1622. /* WMI_ADDBA_RESP_EVENTID */
  1623. struct wmi_addba_resp_event {
  1624. u8 tid;
  1625. /* OK (0), failure (!=0) */
  1626. u8 status;
  1627. /* three values: not supported(0), 3839, 8k */
  1628. __le16 amsdu_sz;
  1629. } __packed;
  1630. /* WMI_DELBA_EVENTID
  1631. * f/w received a DELBA for peer and processed it.
  1632. * Host is notified of this
  1633. */
  1634. struct wmi_delba_event {
  1635. u8 tid;
  1636. u8 is_peer_initiator;
  1637. __le16 reason_code;
  1638. } __packed;
  1639. #define PEER_NODE_JOIN_EVENT 0x00
  1640. #define PEER_NODE_LEAVE_EVENT 0x01
  1641. #define PEER_FIRST_NODE_JOIN_EVENT 0x10
  1642. #define PEER_LAST_NODE_LEAVE_EVENT 0x11
  1643. struct wmi_peer_node_event {
  1644. u8 event_code;
  1645. u8 peer_mac_addr[ETH_ALEN];
  1646. } __packed;
  1647. /* Transmit complete event data structure(s) */
  1648. /* version 1 of tx complete msg */
  1649. struct tx_complete_msg_v1 {
  1650. #define TX_COMPLETE_STATUS_SUCCESS 0
  1651. #define TX_COMPLETE_STATUS_RETRIES 1
  1652. #define TX_COMPLETE_STATUS_NOLINK 2
  1653. #define TX_COMPLETE_STATUS_TIMEOUT 3
  1654. #define TX_COMPLETE_STATUS_OTHER 4
  1655. u8 status;
  1656. /* packet ID to identify parent packet */
  1657. u8 pkt_id;
  1658. /* rate index on successful transmission */
  1659. u8 rate_idx;
  1660. /* number of ACK failures in tx attempt */
  1661. u8 ack_failures;
  1662. } __packed;
  1663. struct wmi_tx_complete_event {
  1664. /* no of tx comp msgs following this struct */
  1665. u8 num_msg;
  1666. /* length in bytes for each individual msg following this struct */
  1667. u8 msg_len;
  1668. /* version of tx complete msg data following this struct */
  1669. u8 msg_type;
  1670. /* individual messages follow this header */
  1671. u8 reserved;
  1672. } __packed;
  1673. /*
  1674. * ------- AP Mode definitions --------------
  1675. */
  1676. /*
  1677. * !!! Warning !!!
  1678. * -Changing the following values needs compilation of both driver and firmware
  1679. */
  1680. #define AP_MAX_NUM_STA 10
  1681. /* Spl. AID used to set DTIM flag in the beacons */
  1682. #define MCAST_AID 0xFF
  1683. #define DEF_AP_COUNTRY_CODE "US "
  1684. /* Used with WMI_AP_SET_NUM_STA_CMDID */
  1685. /*
  1686. * Used with WMI_AP_SET_MLME_CMDID
  1687. */
  1688. /* MLME Commands */
  1689. #define WMI_AP_MLME_ASSOC 1 /* associate station */
  1690. #define WMI_AP_DISASSOC 2 /* disassociate station */
  1691. #define WMI_AP_DEAUTH 3 /* deauthenticate station */
  1692. #define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
  1693. #define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */
  1694. struct wmi_ap_set_mlme_cmd {
  1695. u8 mac[ETH_ALEN];
  1696. __le16 reason; /* 802.11 reason code */
  1697. u8 cmd; /* operation to perform (WMI_AP_*) */
  1698. } __packed;
  1699. struct wmi_ap_set_pvb_cmd {
  1700. __le32 flag;
  1701. __le16 rsvd;
  1702. __le16 aid;
  1703. } __packed;
  1704. struct wmi_rx_frame_format_cmd {
  1705. /* version of meta data for rx packets <0 = default> (0-7 = valid) */
  1706. u8 meta_ver;
  1707. /*
  1708. * 1 == leave .11 header intact,
  1709. * 0 == replace .11 header with .3 <default>
  1710. */
  1711. u8 dot11_hdr;
  1712. /*
  1713. * 1 == defragmentation is performed by host,
  1714. * 0 == performed by target <default>
  1715. */
  1716. u8 defrag_on_host;
  1717. /* for alignment */
  1718. u8 reserved[1];
  1719. } __packed;
  1720. /* AP mode events */
  1721. /* WMI_PS_POLL_EVENT */
  1722. struct wmi_pspoll_event {
  1723. __le16 aid;
  1724. } __packed;
  1725. struct wmi_per_sta_stat {
  1726. __le32 tx_bytes;
  1727. __le32 tx_pkts;
  1728. __le32 tx_error;
  1729. __le32 tx_discard;
  1730. __le32 rx_bytes;
  1731. __le32 rx_pkts;
  1732. __le32 rx_error;
  1733. __le32 rx_discard;
  1734. __le32 aid;
  1735. } __packed;
  1736. struct wmi_ap_mode_stat {
  1737. __le32 action;
  1738. struct wmi_per_sta_stat sta[AP_MAX_NUM_STA + 1];
  1739. } __packed;
  1740. /* End of AP mode definitions */
  1741. struct wmi_remain_on_chnl_cmd {
  1742. __le32 freq;
  1743. __le32 duration;
  1744. } __packed;
  1745. /* wmi_send_action_cmd is to be deprecated. Use
  1746. * wmi_send_mgmt_cmd instead. The new structure supports P2P mgmt
  1747. * operations using station interface.
  1748. */
  1749. struct wmi_send_action_cmd {
  1750. __le32 id;
  1751. __le32 freq;
  1752. __le32 wait;
  1753. __le16 len;
  1754. u8 data[0];
  1755. } __packed;
  1756. struct wmi_send_mgmt_cmd {
  1757. __le32 id;
  1758. __le32 freq;
  1759. __le32 wait;
  1760. __le32 no_cck;
  1761. __le16 len;
  1762. u8 data[0];
  1763. } __packed;
  1764. struct wmi_tx_status_event {
  1765. __le32 id;
  1766. u8 ack_status;
  1767. } __packed;
  1768. struct wmi_probe_req_report_cmd {
  1769. u8 enable;
  1770. } __packed;
  1771. struct wmi_disable_11b_rates_cmd {
  1772. u8 disable;
  1773. } __packed;
  1774. struct wmi_set_appie_extended_cmd {
  1775. u8 role_id;
  1776. u8 mgmt_frm_type;
  1777. u8 ie_len;
  1778. u8 ie_info[0];
  1779. } __packed;
  1780. struct wmi_remain_on_chnl_event {
  1781. __le32 freq;
  1782. __le32 duration;
  1783. } __packed;
  1784. struct wmi_cancel_remain_on_chnl_event {
  1785. __le32 freq;
  1786. __le32 duration;
  1787. u8 status;
  1788. } __packed;
  1789. struct wmi_rx_action_event {
  1790. __le32 freq;
  1791. __le16 len;
  1792. u8 data[0];
  1793. } __packed;
  1794. struct wmi_p2p_capabilities_event {
  1795. __le16 len;
  1796. u8 data[0];
  1797. } __packed;
  1798. struct wmi_p2p_rx_probe_req_event {
  1799. __le32 freq;
  1800. __le16 len;
  1801. u8 data[0];
  1802. } __packed;
  1803. #define P2P_FLAG_CAPABILITIES_REQ (0x00000001)
  1804. #define P2P_FLAG_MACADDR_REQ (0x00000002)
  1805. #define P2P_FLAG_HMODEL_REQ (0x00000002)
  1806. struct wmi_get_p2p_info {
  1807. __le32 info_req_flags;
  1808. } __packed;
  1809. struct wmi_p2p_info_event {
  1810. __le32 info_req_flags;
  1811. __le16 len;
  1812. u8 data[0];
  1813. } __packed;
  1814. struct wmi_p2p_capabilities {
  1815. u8 go_power_save;
  1816. } __packed;
  1817. struct wmi_p2p_macaddr {
  1818. u8 mac_addr[ETH_ALEN];
  1819. } __packed;
  1820. struct wmi_p2p_hmodel {
  1821. u8 p2p_model;
  1822. } __packed;
  1823. struct wmi_p2p_probe_response_cmd {
  1824. __le32 freq;
  1825. u8 destination_addr[ETH_ALEN];
  1826. __le16 len;
  1827. u8 data[0];
  1828. } __packed;
  1829. /* Extended WMI (WMIX)
  1830. *
  1831. * Extended WMIX commands are encapsulated in a WMI message with
  1832. * cmd=WMI_EXTENSION_CMD.
  1833. *
  1834. * Extended WMI commands are those that are needed during wireless
  1835. * operation, but which are not really wireless commands. This allows,
  1836. * for instance, platform-specific commands. Extended WMI commands are
  1837. * embedded in a WMI command message with WMI_COMMAND_ID=WMI_EXTENSION_CMDID.
  1838. * Extended WMI events are similarly embedded in a WMI event message with
  1839. * WMI_EVENT_ID=WMI_EXTENSION_EVENTID.
  1840. */
  1841. struct wmix_cmd_hdr {
  1842. __le32 cmd_id;
  1843. } __packed;
  1844. enum wmix_command_id {
  1845. WMIX_DSETOPEN_REPLY_CMDID = 0x2001,
  1846. WMIX_DSETDATA_REPLY_CMDID,
  1847. WMIX_GPIO_OUTPUT_SET_CMDID,
  1848. WMIX_GPIO_INPUT_GET_CMDID,
  1849. WMIX_GPIO_REGISTER_SET_CMDID,
  1850. WMIX_GPIO_REGISTER_GET_CMDID,
  1851. WMIX_GPIO_INTR_ACK_CMDID,
  1852. WMIX_HB_CHALLENGE_RESP_CMDID,
  1853. WMIX_DBGLOG_CFG_MODULE_CMDID,
  1854. WMIX_PROF_CFG_CMDID, /* 0x200a */
  1855. WMIX_PROF_ADDR_SET_CMDID,
  1856. WMIX_PROF_START_CMDID,
  1857. WMIX_PROF_STOP_CMDID,
  1858. WMIX_PROF_COUNT_GET_CMDID,
  1859. };
  1860. enum wmix_event_id {
  1861. WMIX_DSETOPENREQ_EVENTID = 0x3001,
  1862. WMIX_DSETCLOSE_EVENTID,
  1863. WMIX_DSETDATAREQ_EVENTID,
  1864. WMIX_GPIO_INTR_EVENTID,
  1865. WMIX_GPIO_DATA_EVENTID,
  1866. WMIX_GPIO_ACK_EVENTID,
  1867. WMIX_HB_CHALLENGE_RESP_EVENTID,
  1868. WMIX_DBGLOG_EVENTID,
  1869. WMIX_PROF_COUNT_EVENTID,
  1870. };
  1871. /*
  1872. * ------Error Detection support-------
  1873. */
  1874. /*
  1875. * WMIX_HB_CHALLENGE_RESP_CMDID
  1876. * Heartbeat Challenge Response command
  1877. */
  1878. struct wmix_hb_challenge_resp_cmd {
  1879. __le32 cookie;
  1880. __le32 source;
  1881. } __packed;
  1882. struct ath6kl_wmix_dbglog_cfg_module_cmd {
  1883. __le32 valid;
  1884. __le32 config;
  1885. } __packed;
  1886. /* End of Extended WMI (WMIX) */
  1887. enum wmi_sync_flag {
  1888. NO_SYNC_WMIFLAG = 0,
  1889. /* transmit all queued data before cmd */
  1890. SYNC_BEFORE_WMIFLAG,
  1891. /* any new data waits until cmd execs */
  1892. SYNC_AFTER_WMIFLAG,
  1893. SYNC_BOTH_WMIFLAG,
  1894. /* end marker */
  1895. END_WMIFLAG
  1896. };
  1897. enum htc_endpoint_id ath6kl_wmi_get_control_ep(struct wmi *wmi);
  1898. void ath6kl_wmi_set_control_ep(struct wmi *wmi, enum htc_endpoint_id ep_id);
  1899. int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb);
  1900. int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb,
  1901. u8 msg_type, bool more_data,
  1902. enum wmi_data_hdr_data_type data_type,
  1903. u8 meta_ver, void *tx_meta_info, u8 if_idx);
  1904. int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb);
  1905. int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb);
  1906. int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx,
  1907. struct sk_buff *skb, u32 layer2_priority,
  1908. bool wmm_enabled, u8 *ac);
  1909. int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb);
  1910. int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb,
  1911. enum wmi_cmd_id cmd_id, enum wmi_sync_flag sync_flag);
  1912. int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx,
  1913. enum network_type nw_type,
  1914. enum dot11_auth_mode dot11_auth_mode,
  1915. enum auth_mode auth_mode,
  1916. enum crypto_type pairwise_crypto,
  1917. u8 pairwise_crypto_len,
  1918. enum crypto_type group_crypto,
  1919. u8 group_crypto_len, int ssid_len, u8 *ssid,
  1920. u8 *bssid, u16 channel, u32 ctrl_flags,
  1921. u8 nw_subtype);
  1922. int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 if_idx, u8 *bssid,
  1923. u16 channel);
  1924. int ath6kl_wmi_disconnect_cmd(struct wmi *wmi, u8 if_idx);
  1925. int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx,
  1926. enum wmi_scan_type scan_type,
  1927. u32 force_fgscan, u32 is_legacy,
  1928. u32 home_dwell_time, u32 force_scan_interval,
  1929. s8 num_chan, u16 *ch_list);
  1930. int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
  1931. enum wmi_scan_type scan_type,
  1932. u32 force_fgscan, u32 is_legacy,
  1933. u32 home_dwell_time, u32 force_scan_interval,
  1934. s8 num_chan, u16 *ch_list, u32 no_cck,
  1935. u32 *rates);
  1936. int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, u16 fg_start_sec,
  1937. u16 fg_end_sec, u16 bg_sec,
  1938. u16 minact_chdw_msec, u16 maxact_chdw_msec,
  1939. u16 pas_chdw_msec, u8 short_scan_ratio,
  1940. u8 scan_ctrl_flag, u32 max_dfsch_act_time,
  1941. u16 maxact_scan_per_ssid);
  1942. int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 if_idx, u8 filter,
  1943. u32 ie_mask);
  1944. int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag,
  1945. u8 ssid_len, u8 *ssid);
  1946. int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u8 if_idx,
  1947. u16 listen_interval,
  1948. u16 listen_beacons);
  1949. int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 if_idx, u8 pwr_mode);
  1950. int ath6kl_wmi_pmparams_cmd(struct wmi *wmi, u8 if_idx, u16 idle_period,
  1951. u16 ps_poll_num, u16 dtim_policy,
  1952. u16 tx_wakup_policy, u16 num_tx_to_wakeup,
  1953. u16 ps_fail_event_policy);
  1954. int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, u8 if_idx,
  1955. struct wmi_create_pstream_cmd *pstream);
  1956. int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class,
  1957. u8 tsid);
  1958. int ath6kl_wmi_disctimeout_cmd(struct wmi *wmi, u8 if_idx, u8 timeout);
  1959. int ath6kl_wmi_set_rts_cmd(struct wmi *wmi, u16 threshold);
  1960. int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 if_idx, u8 status,
  1961. u8 preamble_policy);
  1962. int ath6kl_wmi_get_challenge_resp_cmd(struct wmi *wmi, u32 cookie, u32 source);
  1963. int ath6kl_wmi_config_debug_module_cmd(struct wmi *wmi, u32 valid, u32 config);
  1964. int ath6kl_wmi_get_stats_cmd(struct wmi *wmi, u8 if_idx);
  1965. int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index,
  1966. enum crypto_type key_type,
  1967. u8 key_usage, u8 key_len,
  1968. u8 *key_rsc, unsigned int key_rsc_len,
  1969. u8 *key_material,
  1970. u8 key_op_ctrl, u8 *mac_addr,
  1971. enum wmi_sync_flag sync_flag);
  1972. int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, u8 *krk);
  1973. int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index);
  1974. int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid,
  1975. const u8 *pmkid, bool set);
  1976. int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 if_idx, u8 dbM);
  1977. int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi, u8 if_idx);
  1978. int ath6kl_wmi_get_roam_tbl_cmd(struct wmi *wmi);
  1979. int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, u8 if_idx, enum wmi_txop_cfg cfg);
  1980. int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx,
  1981. u8 keep_alive_intvl);
  1982. int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len);
  1983. s32 ath6kl_wmi_get_rate(s8 rate_index);
  1984. int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, u8 if_idx,
  1985. __be32 ips0, __be32 ips1);
  1986. int ath6kl_wmi_set_host_sleep_mode_cmd(struct wmi *wmi, u8 if_idx,
  1987. enum ath6kl_host_mode host_mode);
  1988. int ath6kl_wmi_set_wow_mode_cmd(struct wmi *wmi, u8 if_idx,
  1989. enum ath6kl_wow_mode wow_mode,
  1990. u32 filter, u16 host_req_delay);
  1991. int ath6kl_wmi_add_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
  1992. u8 list_id, u8 filter_size,
  1993. u8 filter_offset, u8 *filter, u8 *mask);
  1994. int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
  1995. u16 list_id, u16 filter_id);
  1996. int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi);
  1997. int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid);
  1998. int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode);
  1999. /* AP mode */
  2000. int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx,
  2001. struct wmi_connect_cmd *p);
  2002. int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 if_idx, u8 cmd,
  2003. const u8 *mac, u16 reason);
  2004. int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u8 if_idx, u16 aid, bool flag);
  2005. int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 if_idx,
  2006. u8 rx_meta_version,
  2007. bool rx_dot11_hdr, bool defrag_on_host);
  2008. int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type,
  2009. const u8 *ie, u8 ie_len);
  2010. /* P2P */
  2011. int ath6kl_wmi_disable_11b_rates_cmd(struct wmi *wmi, bool disable);
  2012. int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq,
  2013. u32 dur);
  2014. int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq,
  2015. u32 wait, const u8 *data, u16 data_len);
  2016. int ath6kl_wmi_send_mgmt_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq,
  2017. u32 wait, const u8 *data, u16 data_len,
  2018. u32 no_cck);
  2019. int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq,
  2020. const u8 *dst, const u8 *data,
  2021. u16 data_len);
  2022. int ath6kl_wmi_probe_report_req_cmd(struct wmi *wmi, u8 if_idx, bool enable);
  2023. int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u8 if_idx, u32 info_req_flags);
  2024. int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx);
  2025. int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type,
  2026. const u8 *ie, u8 ie_len);
  2027. void ath6kl_wmi_sscan_timer(unsigned long ptr);
  2028. struct ath6kl_vif *ath6kl_get_vif_by_index(struct ath6kl *ar, u8 if_idx);
  2029. void *ath6kl_wmi_init(struct ath6kl *devt);
  2030. void ath6kl_wmi_shutdown(struct wmi *wmi);
  2031. void ath6kl_wmi_reset(struct wmi *wmi);
  2032. #endif /* WMI_H */