ath6kl: add blocking debugfs file for retrieving firmware logs
[deliverable/linux.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
081c7a84
RM
1360 WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID = 0x1047,
1361
6465ddcf
JM
1362 WMI_THIN_RESERVED_START_EVENTID = 0x8000,
1363 /* Events in this range are reserved for thinmode */
bdcd8170
KV
1364 WMI_THIN_RESERVED_END_EVENTID = 0x8fff,
1365
1366 WMI_SET_CHANNEL_EVENTID,
1367 WMI_ASSOC_REQ_EVENTID,
1368
1369 /* Generic ACS event */
1370 WMI_ACS_EVENTID,
6465ddcf
JM
1371 WMI_STORERECALL_STORE_EVENTID,
1372 WMI_WOW_EXT_WAKE_EVENTID,
1373 WMI_GTK_OFFLOAD_STATUS_EVENTID,
1374 WMI_NETWORK_LIST_OFFLOAD_EVENTID,
1375 WMI_REMAIN_ON_CHNL_EVENTID,
1376 WMI_CANCEL_REMAIN_ON_CHNL_EVENTID,
1377 WMI_TX_STATUS_EVENTID,
1378 WMI_RX_PROBE_REQ_EVENTID,
1379 WMI_P2P_CAPABILITIES_EVENTID,
1380 WMI_RX_ACTION_EVENTID,
1381 WMI_P2P_INFO_EVENTID,
bdcd8170
KV
1382};
1383
1384struct wmi_ready_event_2 {
1385 __le32 sw_version;
1386 __le32 abi_version;
1387 u8 mac_addr[ETH_ALEN];
1388 u8 phy_cap;
1389} __packed;
1390
1391/* Connect Event */
1392struct wmi_connect_event {
572e27c0
JM
1393 union {
1394 struct {
1395 __le16 ch;
1396 u8 bssid[ETH_ALEN];
1397 __le16 listen_intvl;
1398 __le16 beacon_intvl;
1399 __le32 nw_type;
1400 } sta;
1401 struct {
1402 u8 phymode;
1403 u8 aid;
1404 u8 mac_addr[ETH_ALEN];
1405 u8 auth;
1406 u8 keymgmt;
1407 __le16 cipher;
1408 u8 apsd_info;
1409 u8 unused[3];
1410 } ap_sta;
1411 struct {
1412 __le16 ch;
1413 u8 bssid[ETH_ALEN];
1414 u8 unused[8];
1415 } ap_bss;
1416 } u;
bdcd8170
KV
1417 u8 beacon_ie_len;
1418 u8 assoc_req_len;
1419 u8 assoc_resp_len;
1420 u8 assoc_info[1];
1421} __packed;
1422
1423/* Disconnect Event */
1424enum wmi_disconnect_reason {
1425 NO_NETWORK_AVAIL = 0x01,
1426
1427 /* bmiss */
1428 LOST_LINK = 0x02,
1429
1430 DISCONNECT_CMD = 0x03,
1431 BSS_DISCONNECTED = 0x04,
1432 AUTH_FAILED = 0x05,
1433 ASSOC_FAILED = 0x06,
1434 NO_RESOURCES_AVAIL = 0x07,
1435 CSERV_DISCONNECT = 0x08,
1436 INVALID_PROFILE = 0x0a,
1437 DOT11H_CHANNEL_SWITCH = 0x0b,
1438 PROFILE_MISMATCH = 0x0c,
1439 CONNECTION_EVICTED = 0x0d,
1440 IBSS_MERGE = 0xe,
1441};
1442
06033760
VN
1443#define ATH6KL_COUNTRY_RD_SHIFT 16
1444
1445struct ath6kl_wmi_regdomain {
1446 __le32 reg_code;
1447};
1448
bdcd8170
KV
1449struct wmi_disconnect_event {
1450 /* reason code, see 802.11 spec. */
1451 __le16 proto_reason_status;
1452
1453 /* set if known */
1454 u8 bssid[ETH_ALEN];
1455
1456 /* see WMI_DISCONNECT_REASON */
1457 u8 disconn_reason;
1458
1459 u8 assoc_resp_len;
1460 u8 assoc_info[1];
1461} __packed;
1462
1463/*
1464 * BSS Info Event.
1465 * Mechanism used to inform host of the presence and characteristic of
1466 * wireless networks present. Consists of bss info header followed by
1467 * the beacon or probe-response frame body. The 802.11 header is no included.
1468 */
1469enum wmi_bi_ftype {
1470 BEACON_FTYPE = 0x1,
1471 PROBERESP_FTYPE,
1472 ACTION_MGMT_FTYPE,
1473 PROBEREQ_FTYPE,
1474};
1475
e5090444
VN
1476#define DEF_LRSSI_SCAN_PERIOD 5
1477#define DEF_LRSSI_ROAM_THRESHOLD 20
1478#define DEF_LRSSI_ROAM_FLOOR 60
1479#define DEF_SCAN_FOR_ROAM_INTVL 2
1480
1481enum wmi_roam_ctrl {
1482 WMI_FORCE_ROAM = 1,
1483 WMI_SET_ROAM_MODE,
1484 WMI_SET_HOST_BIAS,
1485 WMI_SET_LRSSI_SCAN_PARAMS,
1486};
1487
1261875f
JM
1488enum wmi_roam_mode {
1489 WMI_DEFAULT_ROAM_MODE = 1, /* RSSI based roam */
1490 WMI_HOST_BIAS_ROAM_MODE = 2, /* Host bias based roam */
1491 WMI_LOCK_BSS_MODE = 3, /* Lock to the current BSS */
1492};
1493
e5090444
VN
1494struct bss_bias {
1495 u8 bssid[ETH_ALEN];
1261875f 1496 s8 bias;
e5090444
VN
1497} __packed;
1498
1499struct bss_bias_info {
1500 u8 num_bss;
1261875f 1501 struct bss_bias bss_bias[0];
e5090444
VN
1502} __packed;
1503
1504struct low_rssi_scan_params {
1505 __le16 lrssi_scan_period;
1506 a_sle16 lrssi_scan_threshold;
1507 a_sle16 lrssi_roam_threshold;
1508 u8 roam_rssi_floor;
1509 u8 reserved[1];
1510} __packed;
1511
1512struct roam_ctrl_cmd {
1513 union {
1261875f
JM
1514 u8 bssid[ETH_ALEN]; /* WMI_FORCE_ROAM */
1515 u8 roam_mode; /* WMI_SET_ROAM_MODE */
1516 struct bss_bias_info bss; /* WMI_SET_HOST_BIAS */
1517 struct low_rssi_scan_params params; /* WMI_SET_LRSSI_SCAN_PARAMS
1518 */
e5090444
VN
1519 } __packed info;
1520 u8 roam_ctrl;
1521} __packed;
1522
82e14f56 1523/* BSS INFO HDR version 2.0 */
bdcd8170 1524struct wmi_bss_info_hdr2 {
82e14f56 1525 __le16 ch; /* frequency in MHz */
bdcd8170
KV
1526
1527 /* see, enum wmi_bi_ftype */
1528 u8 frame_type;
1529
82e14f56 1530 u8 snr; /* note: rssi = snr - 95 dBm */
bdcd8170
KV
1531 u8 bssid[ETH_ALEN];
1532 __le16 ie_mask;
1533} __packed;
1534
1535/* Command Error Event */
1536enum wmi_error_code {
1537 INVALID_PARAM = 0x01,
1538 ILLEGAL_STATE = 0x02,
1539 INTERNAL_ERROR = 0x03,
1540};
1541
1542struct wmi_cmd_error_event {
1543 __le16 cmd_id;
1544 u8 err_code;
1545} __packed;
1546
1547struct wmi_pstream_timeout_event {
1548 u8 tx_queue_num;
1549 u8 rx_queue_num;
1550 u8 traffic_direc;
1551 u8 traffic_class;
1552} __packed;
1553
1554/*
1555 * The WMI_NEIGHBOR_REPORT Event is generated by the target to inform
1556 * the host of BSS's it has found that matches the current profile.
1557 * It can be used by the host to cache PMKs and/to initiate pre-authentication
1558 * if the BSS supports it. The first bssid is always the current associated
1559 * BSS.
1560 * The bssid and bssFlags information repeats according to the number
1561 * or APs reported.
1562 */
1563enum wmi_bss_flags {
1564 WMI_DEFAULT_BSS_FLAGS = 0x00,
1565 WMI_PREAUTH_CAPABLE_BSS = 0x01,
1566 WMI_PMKID_VALID_BSS = 0x02,
1567};
1568
86512136
JM
1569struct wmi_neighbor_info {
1570 u8 bssid[ETH_ALEN];
1571 u8 bss_flags; /* enum wmi_bss_flags */
1572} __packed;
1573
1574struct wmi_neighbor_report_event {
1575 u8 num_neighbors;
1576 struct wmi_neighbor_info neighbor[0];
1577} __packed;
1578
bdcd8170
KV
1579/* TKIP MIC Error Event */
1580struct wmi_tkip_micerr_event {
1581 u8 key_id;
1582 u8 is_mcast;
1583} __packed;
1584
1c17d313
KV
1585enum wmi_scan_status {
1586 WMI_SCAN_STATUS_SUCCESS = 0,
1587};
1588
bdcd8170
KV
1589/* WMI_SCAN_COMPLETE_EVENTID */
1590struct wmi_scan_complete_event {
1591 a_sle32 status;
1592} __packed;
1593
1594#define MAX_OPT_DATA_LEN 1400
1595
1596/*
1597 * Special frame receive Event.
1598 * Mechanism used to inform host of the receiption of the special frames.
1599 * Consists of special frame info header followed by special frame body.
1600 * The 802.11 header is not included.
1601 */
1602struct wmi_opt_rx_info_hdr {
1603 __le16 ch;
1604 u8 frame_type;
1605 s8 snr;
1606 u8 src_addr[ETH_ALEN];
1607 u8 bssid[ETH_ALEN];
1608} __packed;
1609
1610/* Reporting statistic */
1611struct tx_stats {
1612 __le32 pkt;
1613 __le32 byte;
1614 __le32 ucast_pkt;
1615 __le32 ucast_byte;
1616 __le32 mcast_pkt;
1617 __le32 mcast_byte;
1618 __le32 bcast_pkt;
1619 __le32 bcast_byte;
1620 __le32 rts_success_cnt;
1621 __le32 pkt_per_ac[4];
1622 __le32 err_per_ac[4];
1623
1624 __le32 err;
1625 __le32 fail_cnt;
1626 __le32 retry_cnt;
1627 __le32 mult_retry_cnt;
1628 __le32 rts_fail_cnt;
1629 a_sle32 ucast_rate;
1630} __packed;
1631
1632struct rx_stats {
1633 __le32 pkt;
1634 __le32 byte;
1635 __le32 ucast_pkt;
1636 __le32 ucast_byte;
1637 __le32 mcast_pkt;
1638 __le32 mcast_byte;
1639 __le32 bcast_pkt;
1640 __le32 bcast_byte;
1641 __le32 frgment_pkt;
1642
1643 __le32 err;
1644 __le32 crc_err;
1645 __le32 key_cache_miss;
1646 __le32 decrypt_err;
1647 __le32 dupl_frame;
1648 a_sle32 ucast_rate;
1649} __packed;
1650
1651struct tkip_ccmp_stats {
1652 __le32 tkip_local_mic_fail;
1653 __le32 tkip_cnter_measures_invoked;
1654 __le32 tkip_replays;
1655 __le32 tkip_fmt_err;
1656 __le32 ccmp_fmt_err;
1657 __le32 ccmp_replays;
1658} __packed;
1659
1660struct pm_stats {
1661 __le32 pwr_save_failure_cnt;
1662 __le16 stop_tx_failure_cnt;
1663 __le16 atim_tx_failure_cnt;
1664 __le16 atim_rx_failure_cnt;
1665 __le16 bcn_rx_failure_cnt;
1666} __packed;
1667
1668struct cserv_stats {
1669 __le32 cs_bmiss_cnt;
1670 __le32 cs_low_rssi_cnt;
1671 __le16 cs_connect_cnt;
1672 __le16 cs_discon_cnt;
1673 a_sle16 cs_ave_beacon_rssi;
1674 __le16 cs_roam_count;
1675 a_sle16 cs_rssi;
1676 u8 cs_snr;
1677 u8 cs_ave_beacon_snr;
1678 u8 cs_last_roam_msec;
1679} __packed;
1680
1681struct wlan_net_stats {
1682 struct tx_stats tx;
1683 struct rx_stats rx;
1684 struct tkip_ccmp_stats tkip_ccmp_stats;
1685} __packed;
1686
1687struct arp_stats {
1688 __le32 arp_received;
1689 __le32 arp_matched;
1690 __le32 arp_replied;
1691} __packed;
1692
1693struct wlan_wow_stats {
1694 __le32 wow_pkt_dropped;
1695 __le16 wow_evt_discarded;
1696 u8 wow_host_pkt_wakeups;
1697 u8 wow_host_evt_wakeups;
1698} __packed;
1699
1700struct wmi_target_stats {
1701 __le32 lq_val;
1702 a_sle32 noise_floor_calib;
1703 struct pm_stats pm_stats;
1704 struct wlan_net_stats stats;
1705 struct wlan_wow_stats wow_stats;
1706 struct arp_stats arp_stats;
1707 struct cserv_stats cserv_stats;
1708} __packed;
1709
1710/*
1711 * WMI_RSSI_THRESHOLD_EVENTID.
1712 * Indicate the RSSI events to host. Events are indicated when we breach a
1713 * thresold value.
1714 */
1715enum wmi_rssi_threshold_val {
1716 WMI_RSSI_THRESHOLD1_ABOVE = 0,
1717 WMI_RSSI_THRESHOLD2_ABOVE,
1718 WMI_RSSI_THRESHOLD3_ABOVE,
1719 WMI_RSSI_THRESHOLD4_ABOVE,
1720 WMI_RSSI_THRESHOLD5_ABOVE,
1721 WMI_RSSI_THRESHOLD6_ABOVE,
1722 WMI_RSSI_THRESHOLD1_BELOW,
1723 WMI_RSSI_THRESHOLD2_BELOW,
1724 WMI_RSSI_THRESHOLD3_BELOW,
1725 WMI_RSSI_THRESHOLD4_BELOW,
1726 WMI_RSSI_THRESHOLD5_BELOW,
1727 WMI_RSSI_THRESHOLD6_BELOW
1728};
1729
1730struct wmi_rssi_threshold_event {
1731 a_sle16 rssi;
1732 u8 range;
1733} __packed;
1734
1735enum wmi_snr_threshold_val {
1736 WMI_SNR_THRESHOLD1_ABOVE = 1,
1737 WMI_SNR_THRESHOLD1_BELOW,
1738 WMI_SNR_THRESHOLD2_ABOVE,
1739 WMI_SNR_THRESHOLD2_BELOW,
1740 WMI_SNR_THRESHOLD3_ABOVE,
1741 WMI_SNR_THRESHOLD3_BELOW,
1742 WMI_SNR_THRESHOLD4_ABOVE,
1743 WMI_SNR_THRESHOLD4_BELOW
1744};
1745
1746struct wmi_snr_threshold_event {
1747 /* see, enum wmi_snr_threshold_val */
1748 u8 range;
1749
1750 u8 snr;
1751} __packed;
1752
1753/* WMI_REPORT_ROAM_TBL_EVENTID */
1754#define MAX_ROAM_TBL_CAND 5
1755
1756struct wmi_bss_roam_info {
1757 a_sle32 roam_util;
1758 u8 bssid[ETH_ALEN];
1759 s8 rssi;
1760 s8 rssidt;
1761 s8 last_rssi;
1762 s8 util;
1763 s8 bias;
1764
1765 /* for alignment */
1766 u8 reserved;
1767} __packed;
1768
4b28a80d
JM
1769struct wmi_target_roam_tbl {
1770 __le16 roam_mode;
1771 __le16 num_entries;
1772 struct wmi_bss_roam_info info[];
1773} __packed;
1774
bdcd8170
KV
1775/* WMI_CAC_EVENTID */
1776enum cac_indication {
1777 CAC_INDICATION_ADMISSION = 0x00,
1778 CAC_INDICATION_ADMISSION_RESP = 0x01,
1779 CAC_INDICATION_DELETE = 0x02,
1780 CAC_INDICATION_NO_RESP = 0x03,
1781};
1782
1783#define WMM_TSPEC_IE_LEN 63
1784
1785struct wmi_cac_event {
1786 u8 ac;
1787 u8 cac_indication;
1788 u8 status_code;
1789 u8 tspec_suggestion[WMM_TSPEC_IE_LEN];
1790} __packed;
1791
1792/* WMI_APLIST_EVENTID */
1793
1794enum aplist_ver {
1795 APLIST_VER1 = 1,
1796};
1797
1798struct wmi_ap_info_v1 {
1799 u8 bssid[ETH_ALEN];
1800 __le16 channel;
1801} __packed;
1802
1803union wmi_ap_info {
1804 struct wmi_ap_info_v1 ap_info_v1;
1805} __packed;
1806
1807struct wmi_aplist_event {
1808 u8 ap_list_ver;
1809 u8 num_ap;
1810 union wmi_ap_info ap_list[1];
1811} __packed;
1812
1813/* Developer Commands */
1814
1815/*
1816 * WMI_SET_BITRATE_CMDID
1817 *
1818 * Get bit rate cmd uses same definition as set bit rate cmd
1819 */
1820enum wmi_bit_rate {
1821 RATE_AUTO = -1,
1822 RATE_1Mb = 0,
1823 RATE_2Mb = 1,
1824 RATE_5_5Mb = 2,
1825 RATE_11Mb = 3,
1826 RATE_6Mb = 4,
1827 RATE_9Mb = 5,
1828 RATE_12Mb = 6,
1829 RATE_18Mb = 7,
1830 RATE_24Mb = 8,
1831 RATE_36Mb = 9,
1832 RATE_48Mb = 10,
1833 RATE_54Mb = 11,
1834 RATE_MCS_0_20 = 12,
1835 RATE_MCS_1_20 = 13,
1836 RATE_MCS_2_20 = 14,
1837 RATE_MCS_3_20 = 15,
1838 RATE_MCS_4_20 = 16,
1839 RATE_MCS_5_20 = 17,
1840 RATE_MCS_6_20 = 18,
1841 RATE_MCS_7_20 = 19,
1842 RATE_MCS_0_40 = 20,
1843 RATE_MCS_1_40 = 21,
1844 RATE_MCS_2_40 = 22,
1845 RATE_MCS_3_40 = 23,
1846 RATE_MCS_4_40 = 24,
1847 RATE_MCS_5_40 = 25,
1848 RATE_MCS_6_40 = 26,
1849 RATE_MCS_7_40 = 27,
1850};
1851
1852struct wmi_bit_rate_reply {
1853 /* see, enum wmi_bit_rate */
1854 s8 rate_index;
1855} __packed;
1856
1857/*
1858 * WMI_SET_FIXRATES_CMDID
1859 *
1860 * Get fix rates cmd uses same definition as set fix rates cmd
1861 */
1862struct wmi_fix_rates_reply {
1863 /* see wmi_bit_rate */
1864 __le32 fix_rate_mask;
1865} __packed;
1866
1867enum roam_data_type {
1868 /* get the roam time data */
1869 ROAM_DATA_TIME = 1,
1870};
1871
1872struct wmi_target_roam_time {
1873 __le32 disassoc_time;
1874 __le32 no_txrx_time;
1875 __le32 assoc_time;
1876 __le32 allow_txrx_time;
1877 u8 disassoc_bssid[ETH_ALEN];
1878 s8 disassoc_bss_rssi;
1879 u8 assoc_bssid[ETH_ALEN];
1880 s8 assoc_bss_rssi;
1881} __packed;
1882
1883enum wmi_txop_cfg {
1884 WMI_TXOP_DISABLED = 0,
1885 WMI_TXOP_ENABLED
1886};
1887
1888struct wmi_set_wmm_txop_cmd {
1889 u8 txop_enable;
1890} __packed;
1891
1892struct wmi_set_keepalive_cmd {
1893 u8 keep_alive_intvl;
1894} __packed;
1895
1896struct wmi_get_keepalive_cmd {
1897 __le32 configured;
1898 u8 keep_alive_intvl;
1899} __packed;
1900
6a7c9bad
JM
1901struct wmi_set_appie_cmd {
1902 u8 mgmt_frm_type; /* enum wmi_mgmt_frame_type */
1903 u8 ie_len;
1904 u8 ie_info[0];
1905} __packed;
1906
bdcd8170
KV
1907/* Notify the WSC registration status to the target */
1908#define WSC_REG_ACTIVE 1
1909#define WSC_REG_INACTIVE 0
1910
bdcd8170
KV
1911#define WOW_MAX_FILTERS_PER_LIST 4
1912#define WOW_PATTERN_SIZE 64
1913#define WOW_MASK_SIZE 64
1914
1915#define MAC_MAX_FILTERS_PER_LIST 4
1916
1917struct wow_filter {
1918 u8 wow_valid_filter;
1919 u8 wow_filter_id;
1920 u8 wow_filter_size;
1921 u8 wow_filter_offset;
1922 u8 wow_filter_mask[WOW_MASK_SIZE];
1923 u8 wow_filter_pattern[WOW_PATTERN_SIZE];
1924} __packed;
1925
1926#define MAX_IP_ADDRS 2
1927
1928struct wmi_set_ip_cmd {
1929 /* IP in network byte order */
ca1d16a0 1930 __be32 ips[MAX_IP_ADDRS];
bdcd8170
KV
1931} __packed;
1932
45cf110b 1933enum ath6kl_wow_filters {
75ae3bc4 1934 WOW_FILTER_SSID = BIT(1),
45cf110b
RM
1935 WOW_FILTER_OPTION_MAGIC_PACKET = BIT(2),
1936 WOW_FILTER_OPTION_EAP_REQ = BIT(3),
1937 WOW_FILTER_OPTION_PATTERNS = BIT(4),
1938 WOW_FILTER_OPTION_OFFLOAD_ARP = BIT(5),
1939 WOW_FILTER_OPTION_OFFLOAD_NS = BIT(6),
1940 WOW_FILTER_OPTION_OFFLOAD_GTK = BIT(7),
1941 WOW_FILTER_OPTION_8021X_4WAYHS = BIT(8),
1942 WOW_FILTER_OPTION_NLO_DISCVRY = BIT(9),
1943 WOW_FILTER_OPTION_NWK_DISASSOC = BIT(10),
1944 WOW_FILTER_OPTION_GTK_ERROR = BIT(11),
1945 WOW_FILTER_OPTION_TEST_MODE = BIT(15),
1946};
1947
1948enum ath6kl_host_mode {
1949 ATH6KL_HOST_MODE_AWAKE,
1950 ATH6KL_HOST_MODE_ASLEEP,
1951};
1952
1953struct wmi_set_host_sleep_mode_cmd {
1954 __le32 awake;
1955 __le32 asleep;
1956} __packed;
1957
1958enum ath6kl_wow_mode {
1959 ATH6KL_WOW_MODE_DISABLE,
1960 ATH6KL_WOW_MODE_ENABLE,
1961};
1962
1963struct wmi_set_wow_mode_cmd {
1964 __le32 enable_wow;
1965 __le32 filter;
1966 __le16 host_req_delay;
1967} __packed;
1968
5c9b4fa1
RM
1969struct wmi_add_wow_pattern_cmd {
1970 u8 filter_list_id;
1971 u8 filter_size;
1972 u8 filter_offset;
1973 u8 filter[0];
1974} __packed;
1975
1976struct wmi_del_wow_pattern_cmd {
1977 __le16 filter_list_id;
1978 __le16 filter_id;
1979} __packed;
1980
bdcd8170
KV
1981/* WMI_SET_AKMP_PARAMS_CMD */
1982
1983struct wmi_pmkid {
1984 u8 pmkid[WMI_PMKID_LEN];
1985} __packed;
1986
1987/* WMI_GET_PMKID_LIST_CMD Reply */
1988struct wmi_pmkid_list_reply {
1989 __le32 num_pmkid;
1990 u8 bssid_list[ETH_ALEN][1];
1991 struct wmi_pmkid pmkid_list[1];
1992} __packed;
1993
1994/* WMI_ADDBA_REQ_EVENTID */
1995struct wmi_addba_req_event {
1996 u8 tid;
1997 u8 win_sz;
1998 __le16 st_seq_no;
1999
2000 /* f/w response for ADDBA Req; OK (0) or failure (!=0) */
2001 u8 status;
2002} __packed;
2003
2004/* WMI_ADDBA_RESP_EVENTID */
2005struct wmi_addba_resp_event {
2006 u8 tid;
2007
2008 /* OK (0), failure (!=0) */
2009 u8 status;
2010
2011 /* three values: not supported(0), 3839, 8k */
2012 __le16 amsdu_sz;
2013} __packed;
2014
2015/* WMI_DELBA_EVENTID
2016 * f/w received a DELBA for peer and processed it.
2017 * Host is notified of this
2018 */
2019struct wmi_delba_event {
2020 u8 tid;
2021 u8 is_peer_initiator;
2022 __le16 reason_code;
2023} __packed;
2024
2025#define PEER_NODE_JOIN_EVENT 0x00
2026#define PEER_NODE_LEAVE_EVENT 0x01
2027#define PEER_FIRST_NODE_JOIN_EVENT 0x10
2028#define PEER_LAST_NODE_LEAVE_EVENT 0x11
2029
2030struct wmi_peer_node_event {
2031 u8 event_code;
2032 u8 peer_mac_addr[ETH_ALEN];
2033} __packed;
2034
2035/* Transmit complete event data structure(s) */
2036
2037/* version 1 of tx complete msg */
2038struct tx_complete_msg_v1 {
2039#define TX_COMPLETE_STATUS_SUCCESS 0
2040#define TX_COMPLETE_STATUS_RETRIES 1
2041#define TX_COMPLETE_STATUS_NOLINK 2
2042#define TX_COMPLETE_STATUS_TIMEOUT 3
2043#define TX_COMPLETE_STATUS_OTHER 4
2044
2045 u8 status;
2046
2047 /* packet ID to identify parent packet */
2048 u8 pkt_id;
2049
2050 /* rate index on successful transmission */
2051 u8 rate_idx;
2052
2053 /* number of ACK failures in tx attempt */
2054 u8 ack_failures;
2055} __packed;
2056
2057struct wmi_tx_complete_event {
2058 /* no of tx comp msgs following this struct */
2059 u8 num_msg;
2060
2061 /* length in bytes for each individual msg following this struct */
2062 u8 msg_len;
2063
2064 /* version of tx complete msg data following this struct */
2065 u8 msg_type;
2066
2067 /* individual messages follow this header */
2068 u8 reserved;
2069} __packed;
2070
2071/*
2072 * ------- AP Mode definitions --------------
2073 */
2074
2075/*
2076 * !!! Warning !!!
2077 * -Changing the following values needs compilation of both driver and firmware
2078 */
5081c80c 2079#define AP_MAX_NUM_STA 10
bdcd8170
KV
2080
2081/* Spl. AID used to set DTIM flag in the beacons */
2082#define MCAST_AID 0xFF
2083
2084#define DEF_AP_COUNTRY_CODE "US "
2085
2086/* Used with WMI_AP_SET_NUM_STA_CMDID */
2087
23875136
JM
2088/*
2089 * Used with WMI_AP_SET_MLME_CMDID
2090 */
2091
2092/* MLME Commands */
2093#define WMI_AP_MLME_ASSOC 1 /* associate station */
2094#define WMI_AP_DISASSOC 2 /* disassociate station */
2095#define WMI_AP_DEAUTH 3 /* deauthenticate station */
2096#define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
2097#define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */
2098
2099struct wmi_ap_set_mlme_cmd {
2100 u8 mac[ETH_ALEN];
2101 __le16 reason; /* 802.11 reason code */
2102 u8 cmd; /* operation to perform (WMI_AP_*) */
2103} __packed;
2104
bdcd8170
KV
2105struct wmi_ap_set_pvb_cmd {
2106 __le32 flag;
d6e51e6a 2107 __le16 rsvd;
bdcd8170
KV
2108 __le16 aid;
2109} __packed;
2110
2111struct wmi_rx_frame_format_cmd {
2112 /* version of meta data for rx packets <0 = default> (0-7 = valid) */
2113 u8 meta_ver;
2114
2115 /*
2116 * 1 == leave .11 header intact,
2117 * 0 == replace .11 header with .3 <default>
2118 */
2119 u8 dot11_hdr;
2120
2121 /*
2122 * 1 == defragmentation is performed by host,
2123 * 0 == performed by target <default>
2124 */
2125 u8 defrag_on_host;
2126
2127 /* for alignment */
2128 u8 reserved[1];
2129} __packed;
2130
2131/* AP mode events */
c1762a3f
TP
2132struct wmi_ap_set_apsd_cmd {
2133 u8 enable;
2134} __packed;
2135
2136enum wmi_ap_apsd_buffered_traffic_flags {
2137 WMI_AP_APSD_NO_DELIVERY_FRAMES = 0x1,
2138};
2139
2140struct wmi_ap_apsd_buffered_traffic_cmd {
2141 __le16 aid;
2142 __le16 bitmap;
2143 __le32 flags;
2144} __packed;
bdcd8170
KV
2145
2146/* WMI_PS_POLL_EVENT */
2147struct wmi_pspoll_event {
2148 __le16 aid;
2149} __packed;
2150
2151struct wmi_per_sta_stat {
2152 __le32 tx_bytes;
2153 __le32 tx_pkts;
2154 __le32 tx_error;
2155 __le32 tx_discard;
2156 __le32 rx_bytes;
2157 __le32 rx_pkts;
2158 __le32 rx_error;
2159 __le32 rx_discard;
2160 __le32 aid;
2161} __packed;
2162
2163struct wmi_ap_mode_stat {
2164 __le32 action;
2165 struct wmi_per_sta_stat sta[AP_MAX_NUM_STA + 1];
2166} __packed;
2167
2168/* End of AP mode definitions */
2169
6465ddcf
JM
2170struct wmi_remain_on_chnl_cmd {
2171 __le32 freq;
2172 __le32 duration;
2173} __packed;
2174
3ca9d1fc
AT
2175/* wmi_send_action_cmd is to be deprecated. Use
2176 * wmi_send_mgmt_cmd instead. The new structure supports P2P mgmt
2177 * operations using station interface.
2178 */
6465ddcf
JM
2179struct wmi_send_action_cmd {
2180 __le32 id;
2181 __le32 freq;
2182 __le32 wait;
2183 __le16 len;
2184 u8 data[0];
2185} __packed;
2186
3ca9d1fc
AT
2187struct wmi_send_mgmt_cmd {
2188 __le32 id;
2189 __le32 freq;
2190 __le32 wait;
2191 __le32 no_cck;
2192 __le16 len;
2193 u8 data[0];
2194} __packed;
2195
6465ddcf
JM
2196struct wmi_tx_status_event {
2197 __le32 id;
2198 u8 ack_status;
2199} __packed;
2200
2201struct wmi_probe_req_report_cmd {
2202 u8 enable;
2203} __packed;
2204
2205struct wmi_disable_11b_rates_cmd {
2206 u8 disable;
2207} __packed;
2208
2209struct wmi_set_appie_extended_cmd {
2210 u8 role_id;
2211 u8 mgmt_frm_type;
2212 u8 ie_len;
2213 u8 ie_info[0];
2214} __packed;
2215
2216struct wmi_remain_on_chnl_event {
2217 __le32 freq;
2218 __le32 duration;
2219} __packed;
2220
2221struct wmi_cancel_remain_on_chnl_event {
2222 __le32 freq;
2223 __le32 duration;
2224 u8 status;
2225} __packed;
2226
2227struct wmi_rx_action_event {
2228 __le32 freq;
2229 __le16 len;
2230 u8 data[0];
2231} __packed;
2232
2233struct wmi_p2p_capabilities_event {
2234 __le16 len;
2235 u8 data[0];
2236} __packed;
2237
2238struct wmi_p2p_rx_probe_req_event {
2239 __le32 freq;
2240 __le16 len;
2241 u8 data[0];
2242} __packed;
2243
2244#define P2P_FLAG_CAPABILITIES_REQ (0x00000001)
2245#define P2P_FLAG_MACADDR_REQ (0x00000002)
2246#define P2P_FLAG_HMODEL_REQ (0x00000002)
2247
2248struct wmi_get_p2p_info {
2249 __le32 info_req_flags;
2250} __packed;
2251
2252struct wmi_p2p_info_event {
2253 __le32 info_req_flags;
2254 __le16 len;
2255 u8 data[0];
2256} __packed;
2257
2258struct wmi_p2p_capabilities {
2259 u8 go_power_save;
2260} __packed;
2261
2262struct wmi_p2p_macaddr {
2263 u8 mac_addr[ETH_ALEN];
2264} __packed;
2265
2266struct wmi_p2p_hmodel {
2267 u8 p2p_model;
2268} __packed;
2269
2270struct wmi_p2p_probe_response_cmd {
2271 __le32 freq;
2272 u8 destination_addr[ETH_ALEN];
2273 __le16 len;
2274 u8 data[0];
2275} __packed;
2276
bdcd8170
KV
2277/* Extended WMI (WMIX)
2278 *
2279 * Extended WMIX commands are encapsulated in a WMI message with
2280 * cmd=WMI_EXTENSION_CMD.
2281 *
2282 * Extended WMI commands are those that are needed during wireless
2283 * operation, but which are not really wireless commands. This allows,
2284 * for instance, platform-specific commands. Extended WMI commands are
2285 * embedded in a WMI command message with WMI_COMMAND_ID=WMI_EXTENSION_CMDID.
2286 * Extended WMI events are similarly embedded in a WMI event message with
2287 * WMI_EVENT_ID=WMI_EXTENSION_EVENTID.
2288 */
2289struct wmix_cmd_hdr {
2290 __le32 cmd_id;
2291} __packed;
2292
2293enum wmix_command_id {
2294 WMIX_DSETOPEN_REPLY_CMDID = 0x2001,
2295 WMIX_DSETDATA_REPLY_CMDID,
2296 WMIX_GPIO_OUTPUT_SET_CMDID,
2297 WMIX_GPIO_INPUT_GET_CMDID,
2298 WMIX_GPIO_REGISTER_SET_CMDID,
2299 WMIX_GPIO_REGISTER_GET_CMDID,
2300 WMIX_GPIO_INTR_ACK_CMDID,
2301 WMIX_HB_CHALLENGE_RESP_CMDID,
2302 WMIX_DBGLOG_CFG_MODULE_CMDID,
2303 WMIX_PROF_CFG_CMDID, /* 0x200a */
2304 WMIX_PROF_ADDR_SET_CMDID,
2305 WMIX_PROF_START_CMDID,
2306 WMIX_PROF_STOP_CMDID,
2307 WMIX_PROF_COUNT_GET_CMDID,
2308};
2309
2310enum wmix_event_id {
2311 WMIX_DSETOPENREQ_EVENTID = 0x3001,
2312 WMIX_DSETCLOSE_EVENTID,
2313 WMIX_DSETDATAREQ_EVENTID,
2314 WMIX_GPIO_INTR_EVENTID,
2315 WMIX_GPIO_DATA_EVENTID,
2316 WMIX_GPIO_ACK_EVENTID,
2317 WMIX_HB_CHALLENGE_RESP_EVENTID,
2318 WMIX_DBGLOG_EVENTID,
2319 WMIX_PROF_COUNT_EVENTID,
2320};
2321
2322/*
2323 * ------Error Detection support-------
2324 */
2325
2326/*
2327 * WMIX_HB_CHALLENGE_RESP_CMDID
2328 * Heartbeat Challenge Response command
2329 */
2330struct wmix_hb_challenge_resp_cmd {
2331 __le32 cookie;
2332 __le32 source;
2333} __packed;
2334
939f1cce
KV
2335struct ath6kl_wmix_dbglog_cfg_module_cmd {
2336 __le32 valid;
2337 __le32 config;
2338} __packed;
2339
bdcd8170
KV
2340/* End of Extended WMI (WMIX) */
2341
2342enum wmi_sync_flag {
2343 NO_SYNC_WMIFLAG = 0,
2344
2345 /* transmit all queued data before cmd */
2346 SYNC_BEFORE_WMIFLAG,
2347
2348 /* any new data waits until cmd execs */
2349 SYNC_AFTER_WMIFLAG,
2350
2351 SYNC_BOTH_WMIFLAG,
2352
2353 /* end marker */
2354 END_WMIFLAG
2355};
2356
2357enum htc_endpoint_id ath6kl_wmi_get_control_ep(struct wmi *wmi);
2358void ath6kl_wmi_set_control_ep(struct wmi *wmi, enum htc_endpoint_id ep_id);
2359int ath6kl_wmi_dix_2_dot3(struct wmi *wmi, struct sk_buff *skb);
2360int ath6kl_wmi_data_hdr_add(struct wmi *wmi, struct sk_buff *skb,
c1762a3f 2361 u8 msg_type, u32 flags,
bdcd8170 2362 enum wmi_data_hdr_data_type data_type,
6765d0aa 2363 u8 meta_ver, void *tx_meta_info, u8 if_idx);
bdcd8170
KV
2364
2365int ath6kl_wmi_dot11_hdr_remove(struct wmi *wmi, struct sk_buff *skb);
2366int ath6kl_wmi_dot3_2_dix(struct sk_buff *skb);
240d2799
VT
2367int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx,
2368 struct sk_buff *skb, u32 layer2_priority,
2369 bool wmm_enabled, u8 *ac);
bdcd8170
KV
2370
2371int ath6kl_wmi_control_rx(struct wmi *wmi, struct sk_buff *skb);
bdcd8170 2372
334234b5 2373int ath6kl_wmi_cmd_send(struct wmi *wmi, u8 if_idx, struct sk_buff *skb,
bdcd8170
KV
2374 enum wmi_cmd_id cmd_id, enum wmi_sync_flag sync_flag);
2375
334234b5
VT
2376int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx,
2377 enum network_type nw_type,
bdcd8170
KV
2378 enum dot11_auth_mode dot11_auth_mode,
2379 enum auth_mode auth_mode,
2380 enum crypto_type pairwise_crypto,
2381 u8 pairwise_crypto_len,
2382 enum crypto_type group_crypto,
2383 u8 group_crypto_len, int ssid_len, u8 *ssid,
3ca9d1fc
AT
2384 u8 *bssid, u16 channel, u32 ctrl_flags,
2385 u8 nw_subtype);
bdcd8170 2386
334234b5
VT
2387int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 if_idx, u8 *bssid,
2388 u16 channel);
2389int ath6kl_wmi_disconnect_cmd(struct wmi *wmi, u8 if_idx);
2390int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx,
2391 enum wmi_scan_type scan_type,
bdcd8170
KV
2392 u32 force_fgscan, u32 is_legacy,
2393 u32 home_dwell_time, u32 force_scan_interval,
2394 s8 num_chan, u16 *ch_list);
3ca9d1fc
AT
2395
2396int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
2397 enum wmi_scan_type scan_type,
2398 u32 force_fgscan, u32 is_legacy,
2399 u32 home_dwell_time, u32 force_scan_interval,
2400 s8 num_chan, u16 *ch_list, u32 no_cck,
2401 u32 *rates);
2402
334234b5 2403int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, u16 fg_start_sec,
bdcd8170
KV
2404 u16 fg_end_sec, u16 bg_sec,
2405 u16 minact_chdw_msec, u16 maxact_chdw_msec,
2406 u16 pas_chdw_msec, u8 short_scan_ratio,
2407 u8 scan_ctrl_flag, u32 max_dfsch_act_time,
2408 u16 maxact_scan_per_ssid);
240d2799
VT
2409int ath6kl_wmi_bssfilter_cmd(struct wmi *wmi, u8 if_idx, u8 filter,
2410 u32 ie_mask);
334234b5 2411int ath6kl_wmi_probedssid_cmd(struct wmi *wmi, u8 if_idx, u8 index, u8 flag,
bdcd8170 2412 u8 ssid_len, u8 *ssid);
334234b5
VT
2413int ath6kl_wmi_listeninterval_cmd(struct wmi *wmi, u8 if_idx,
2414 u16 listen_interval,
bdcd8170 2415 u16 listen_beacons);
334234b5 2416int ath6kl_wmi_powermode_cmd(struct wmi *wmi, u8 if_idx, u8 pwr_mode);
0ce59445 2417int ath6kl_wmi_pmparams_cmd(struct wmi *wmi, u8 if_idx, u16 idle_period,
bdcd8170
KV
2418 u16 ps_poll_num, u16 dtim_policy,
2419 u16 tx_wakup_policy, u16 num_tx_to_wakeup,
2420 u16 ps_fail_event_policy);
240d2799 2421int ath6kl_wmi_create_pstream_cmd(struct wmi *wmi, u8 if_idx,
bdcd8170 2422 struct wmi_create_pstream_cmd *pstream);
240d2799
VT
2423int ath6kl_wmi_delete_pstream_cmd(struct wmi *wmi, u8 if_idx, u8 traffic_class,
2424 u8 tsid);
0ce59445 2425int ath6kl_wmi_disctimeout_cmd(struct wmi *wmi, u8 if_idx, u8 timeout);
bdcd8170
KV
2426
2427int ath6kl_wmi_set_rts_cmd(struct wmi *wmi, u16 threshold);
0ce59445 2428int ath6kl_wmi_set_lpreamble_cmd(struct wmi *wmi, u8 if_idx, u8 status,
bdcd8170
KV
2429 u8 preamble_policy);
2430
2431int ath6kl_wmi_get_challenge_resp_cmd(struct wmi *wmi, u32 cookie, u32 source);
939f1cce 2432int ath6kl_wmi_config_debug_module_cmd(struct wmi *wmi, u32 valid, u32 config);
bdcd8170 2433
334234b5
VT
2434int ath6kl_wmi_get_stats_cmd(struct wmi *wmi, u8 if_idx);
2435int ath6kl_wmi_addkey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index,
bdcd8170
KV
2436 enum crypto_type key_type,
2437 u8 key_usage, u8 key_len,
f4bb9a6f
JM
2438 u8 *key_rsc, unsigned int key_rsc_len,
2439 u8 *key_material,
bdcd8170
KV
2440 u8 key_op_ctrl, u8 *mac_addr,
2441 enum wmi_sync_flag sync_flag);
240d2799 2442int ath6kl_wmi_add_krk_cmd(struct wmi *wmi, u8 if_idx, u8 *krk);
334234b5
VT
2443int ath6kl_wmi_deletekey_cmd(struct wmi *wmi, u8 if_idx, u8 key_index);
2444int ath6kl_wmi_setpmkid_cmd(struct wmi *wmi, u8 if_idx, const u8 *bssid,
bdcd8170 2445 const u8 *pmkid, bool set);
990bd915
VT
2446int ath6kl_wmi_set_tx_pwr_cmd(struct wmi *wmi, u8 if_idx, u8 dbM);
2447int ath6kl_wmi_get_tx_pwr_cmd(struct wmi *wmi, u8 if_idx);
4b28a80d 2448int ath6kl_wmi_get_roam_tbl_cmd(struct wmi *wmi);
bdcd8170 2449
0ce59445
VT
2450int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, u8 if_idx, enum wmi_txop_cfg cfg);
2451int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx,
2452 u8 keep_alive_intvl);
003353b0 2453int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len);
bdcd8170
KV
2454
2455s32 ath6kl_wmi_get_rate(s8 rate_index);
2456
ca1d16a0
RM
2457int ath6kl_wmi_set_ip_cmd(struct wmi *wmi, u8 if_idx,
2458 __be32 ips0, __be32 ips1);
45cf110b
RM
2459int ath6kl_wmi_set_host_sleep_mode_cmd(struct wmi *wmi, u8 if_idx,
2460 enum ath6kl_host_mode host_mode);
2461int ath6kl_wmi_set_wow_mode_cmd(struct wmi *wmi, u8 if_idx,
2462 enum ath6kl_wow_mode wow_mode,
2463 u32 filter, u16 host_req_delay);
5c9b4fa1
RM
2464int ath6kl_wmi_add_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
2465 u8 list_id, u8 filter_size,
d91e8eee
RM
2466 u8 filter_offset, const u8 *filter,
2467 const u8 *mask);
5c9b4fa1
RM
2468int ath6kl_wmi_del_wow_pattern_cmd(struct wmi *wmi, u8 if_idx,
2469 u16 list_id, u16 filter_id);
e5090444 2470int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi);
1261875f
JM
2471int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid);
2472int ath6kl_wmi_set_roam_mode_cmd(struct wmi *wmi, enum wmi_roam_mode mode);
3f3c4ee7 2473int ath6kl_wmi_mcast_filter_cmd(struct wmi *wmi, u8 if_idx, bool mc_all_on);
f914edd3
VT
2474int ath6kl_wmi_add_del_mcast_filter_cmd(struct wmi *wmi, u8 if_idx,
2475 u8 *filter, bool add_filter);
c1762a3f
TP
2476/* AP mode uAPSD */
2477int ath6kl_wmi_ap_set_apsd(struct wmi *wmi, u8 if_idx, u8 enable);
2478
2479int ath6kl_wmi_set_apsd_bfrd_traf(struct wmi *wmi,
2480 u8 if_idx, u16 aid,
2481 u16 bitmap, u32 flags);
2482
2483u8 ath6kl_wmi_get_traffic_class(u8 user_priority);
bdcd8170 2484
c1762a3f 2485u8 ath6kl_wmi_determine_user_priority(u8 *pkt, u32 layer2_pri);
bdcd8170 2486/* AP mode */
334234b5
VT
2487int ath6kl_wmi_ap_profile_commit(struct wmi *wmip, u8 if_idx,
2488 struct wmi_connect_cmd *p);
6a7c9bad 2489
334234b5
VT
2490int ath6kl_wmi_ap_set_mlme(struct wmi *wmip, u8 if_idx, u8 cmd,
2491 const u8 *mac, u16 reason);
23875136 2492
334234b5 2493int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u8 if_idx, u16 aid, bool flag);
bdcd8170 2494
0ce59445
VT
2495int ath6kl_wmi_set_rx_frame_format_cmd(struct wmi *wmi, u8 if_idx,
2496 u8 rx_meta_version,
bdcd8170
KV
2497 bool rx_dot11_hdr, bool defrag_on_host);
2498
334234b5
VT
2499int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type,
2500 const u8 *ie, u8 ie_len);
6a7c9bad 2501
6465ddcf
JM
2502/* P2P */
2503int ath6kl_wmi_disable_11b_rates_cmd(struct wmi *wmi, bool disable);
2504
334234b5
VT
2505int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq,
2506 u32 dur);
6465ddcf 2507
334234b5
VT
2508int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq,
2509 u32 wait, const u8 *data, u16 data_len);
6465ddcf 2510
3ca9d1fc
AT
2511int ath6kl_wmi_send_mgmt_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq,
2512 u32 wait, const u8 *data, u16 data_len,
2513 u32 no_cck);
2514
334234b5
VT
2515int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq,
2516 const u8 *dst, const u8 *data,
2517 u16 data_len);
6465ddcf 2518
0ce59445 2519int ath6kl_wmi_probe_report_req_cmd(struct wmi *wmi, u8 if_idx, bool enable);
6465ddcf 2520
0ce59445 2521int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u8 if_idx, u32 info_req_flags);
6465ddcf 2522
334234b5 2523int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx);
6465ddcf 2524
334234b5
VT
2525int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 if_idx, u8 mgmt_frm_type,
2526 const u8 *ie, u8 ie_len);
b84da8c7 2527
10509f90
KV
2528void ath6kl_wmi_sscan_timer(unsigned long ptr);
2529
6765d0aa 2530struct ath6kl_vif *ath6kl_get_vif_by_index(struct ath6kl *ar, u8 if_idx);
2865785e 2531void *ath6kl_wmi_init(struct ath6kl *devt);
bdcd8170 2532void ath6kl_wmi_shutdown(struct wmi *wmi);
c89c591d 2533void ath6kl_wmi_reset(struct wmi *wmi);
bdcd8170
KV
2534
2535#endif /* WMI_H */
This page took 0.161624 seconds and 5 git commands to generate.