wmi.h 51 KB

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