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