wmi.h 56 KB

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