1/*
2 * Broadcom Event  protocol definitions
3 *
4 * Copyright (C) 2013, Broadcom Corporation. All Rights Reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * Dependencies: proto/bcmeth.h
19 *
20 * $Id: bcmevent.h 408951 2013-06-21 09:07:25Z $
21 *
22 */
23
24/*
25 * Broadcom Ethernet Events protocol defines
26 *
27 */
28
29#ifndef _BCMEVENT_H_
30#define _BCMEVENT_H_
31
32#ifndef _TYPEDEFS_H_
33#include <typedefs.h>
34#endif
35/* #include <ethernet.h> -- TODO: req., excluded to overwhelming coupling (break up ethernet.h) */
36#include <proto/bcmeth.h>
37
38/* This marks the start of a packed structure section. */
39#include <packed_section_start.h>
40
41#define BCM_EVENT_MSG_VERSION		2	/* wl_event_msg_t struct version */
42#define BCM_MSG_IFNAME_MAX		16	/* max length of interface name */
43
44/* flags */
45#define WLC_EVENT_MSG_LINK		0x01	/* link is up */
46#define WLC_EVENT_MSG_FLUSHTXQ		0x02	/* flush tx queue on MIC error */
47#define WLC_EVENT_MSG_GROUP		0x04	/* group MIC error */
48#define WLC_EVENT_MSG_UNKBSS		0x08	/* unknown source bsscfg */
49#define WLC_EVENT_MSG_UNKIF		0x10	/* unknown source OS i/f */
50
51/* these fields are stored in network order */
52
53/* version 1 */
54typedef BWL_PRE_PACKED_STRUCT struct
55{
56	uint16	version;
57	uint16	flags;			/* see flags below */
58	uint32	event_type;		/* Message (see below) */
59	uint32	status;			/* Status code (see below) */
60	uint32	reason;			/* Reason code (if applicable) */
61	uint32	auth_type;		/* WLC_E_AUTH */
62	uint32	datalen;		/* data buf */
63	struct ether_addr	addr;	/* Station address (if applicable) */
64	char	ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
65} BWL_POST_PACKED_STRUCT wl_event_msg_v1_t;
66
67/* the current version */
68typedef BWL_PRE_PACKED_STRUCT struct
69{
70	uint16	version;
71	uint16	flags;			/* see flags below */
72	uint32	event_type;		/* Message (see below) */
73	uint32	status;			/* Status code (see below) */
74	uint32	reason;			/* Reason code (if applicable) */
75	uint32	auth_type;		/* WLC_E_AUTH */
76	uint32	datalen;		/* data buf */
77	struct ether_addr	addr;	/* Station address (if applicable) */
78	char	ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
79	uint8	ifidx;			/* destination OS i/f index */
80	uint8	bsscfgidx;		/* source bsscfg index */
81} BWL_POST_PACKED_STRUCT wl_event_msg_t;
82
83/* used by driver msgs */
84typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
85	struct ether_header eth;
86	bcmeth_hdr_t		bcm_hdr;
87	wl_event_msg_t		event;
88	/* data portion follows */
89} BWL_POST_PACKED_STRUCT bcm_event_t;
90
91#define BCM_MSG_LEN	(sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
92
93/* Event messages */
94#define WLC_E_SET_SSID		0	/* indicates status of set SSID */
95#define WLC_E_JOIN		1	/* differentiates join IBSS from found (WLC_E_START) IBSS */
96#define WLC_E_START		2	/* STA founded an IBSS or AP started a BSS */
97#define WLC_E_AUTH		3	/* 802.11 AUTH request */
98#define WLC_E_AUTH_IND		4	/* 802.11 AUTH indication */
99#define WLC_E_DEAUTH		5	/* 802.11 DEAUTH request */
100#define WLC_E_DEAUTH_IND	6	/* 802.11 DEAUTH indication */
101#define WLC_E_ASSOC		7	/* 802.11 ASSOC request */
102#define WLC_E_ASSOC_IND		8	/* 802.11 ASSOC indication */
103#define WLC_E_REASSOC		9	/* 802.11 REASSOC request */
104#define WLC_E_REASSOC_IND	10	/* 802.11 REASSOC indication */
105#define WLC_E_DISASSOC		11	/* 802.11 DISASSOC request */
106#define WLC_E_DISASSOC_IND	12	/* 802.11 DISASSOC indication */
107#define WLC_E_QUIET_START	13	/* 802.11h Quiet period started */
108#define WLC_E_QUIET_END		14	/* 802.11h Quiet period ended */
109#define WLC_E_BEACON_RX		15	/* BEACONS received/lost indication */
110#define WLC_E_LINK		16	/* generic link indication */
111#define WLC_E_MIC_ERROR		17	/* TKIP MIC error occurred */
112#define WLC_E_NDIS_LINK		18	/* NDIS style link indication */
113#define WLC_E_ROAM		19	/* roam attempt occurred: indicate status & reason */
114#define WLC_E_TXFAIL		20	/* change in dot11FailedCount (txfail) */
115#define WLC_E_PMKID_CACHE	21	/* WPA2 pmkid cache indication */
116#define WLC_E_RETROGRADE_TSF	22	/* current AP's TSF value went backward */
117#define WLC_E_PRUNE		23	/* AP was pruned from join list for reason */
118#define WLC_E_AUTOAUTH		24	/* report AutoAuth table entry match for join attempt */
119#define WLC_E_EAPOL_MSG		25	/* Event encapsulating an EAPOL message */
120#define WLC_E_SCAN_COMPLETE	26	/* Scan results are ready or scan was aborted */
121#define WLC_E_ADDTS_IND		27	/* indicate to host addts fail/success */
122#define WLC_E_DELTS_IND		28	/* indicate to host delts fail/success */
123#define WLC_E_BCNSENT_IND	29	/* indicate to host of beacon transmit */
124#define WLC_E_BCNRX_MSG		30	/* Send the received beacon up to the host */
125#define WLC_E_BCNLOST_MSG	31	/* indicate to host loss of beacon */
126#define WLC_E_ROAM_PREP		32	/* before attempting to roam */
127#define WLC_E_PFN_NET_FOUND	33	/* PFN network found event */
128#define WLC_E_PFN_NET_LOST	34	/* PFN network lost event */
129#define WLC_E_RESET_COMPLETE	35
130#define WLC_E_JOIN_START	36
131#define WLC_E_ROAM_START	37
132#define WLC_E_ASSOC_START	38
133#define WLC_E_IBSS_ASSOC	39
134#define WLC_E_RADIO		40
135#define WLC_E_PSM_WATCHDOG	41	/* PSM microcode watchdog fired */
136#define WLC_E_PROBREQ_MSG       44      /* probe request received */
137#define WLC_E_SCAN_CONFIRM_IND  45
138#define WLC_E_PSK_SUP		46	/* WPA Handshake fail */
139#define WLC_E_COUNTRY_CODE_CHANGED	47
140#define	WLC_E_EXCEEDED_MEDIUM_TIME	48	/* WMMAC excedded medium time */
141#define WLC_E_ICV_ERROR		49	/* WEP ICV error occurred */
142#define WLC_E_UNICAST_DECODE_ERROR	50	/* Unsupported unicast encrypted frame */
143#define WLC_E_MULTICAST_DECODE_ERROR	51	/* Unsupported multicast encrypted frame */
144#define WLC_E_TRACE		52
145#define WLC_E_IF		54	/* I/F change (for dongle host notification) */
146#define WLC_E_P2P_DISC_LISTEN_COMPLETE	55	/* listen state expires */
147#define WLC_E_RSSI		56	/* indicate RSSI change based on configured levels */
148#define WLC_E_PFN_SCAN_COMPLETE	57	/* PFN completed scan of network list */
149#define WLC_E_EXTLOG_MSG	58
150#define WLC_E_ACTION_FRAME      59 	/* Action frame Rx */
151#define WLC_E_ACTION_FRAME_COMPLETE	60	/* Action frame Tx complete */
152#define WLC_E_PRE_ASSOC_IND	61	/* assoc request received */
153#define WLC_E_PRE_REASSOC_IND	62	/* re-assoc request received */
154#define WLC_E_CHANNEL_ADOPTED	63
155#define WLC_E_AP_STARTED	64	/* AP started */
156#define WLC_E_DFS_AP_STOP	65	/* AP stopped due to DFS */
157#define WLC_E_DFS_AP_RESUME	66	/* AP resumed due to DFS */
158#define WLC_E_WAI_STA_EVENT	67	/* WAI stations event */
159#define WLC_E_WAI_MSG 		68	/* event encapsulating an WAI message */
160#define WLC_E_ESCAN_RESULT 	69	/* escan result event */
161#define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 	70	/* action frame off channel complete */
162#define WLC_E_PROBRESP_MSG	71	/* probe response received */
163#define WLC_E_P2P_PROBREQ_MSG	72	/* P2P Probe request received */
164#define WLC_E_DCS_REQUEST	73
165#define WLC_E_FIFO_CREDIT_MAP	74	/* credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */
166#define WLC_E_ACTION_FRAME_RX	75	/* Received action frame event WITH
167					 * wl_event_rx_frame_data_t header
168					 */
169#define WLC_E_WAKE_EVENT	76	/* Wake Event timer fired, used for wake WLAN test mode */
170#define WLC_E_RM_COMPLETE	77	/* Radio measurement complete */
171#define WLC_E_HTSFSYNC		78	/* Synchronize TSF with the host */
172#define WLC_E_OVERLAY_REQ	79	/* request an overlay IOCTL/iovar from the host */
173#define WLC_E_CSA_COMPLETE_IND		80	/* 802.11 CHANNEL SWITCH ACTION completed */
174#define WLC_E_EXCESS_PM_WAKE_EVENT	81	/* excess PM Wake Event to inform host  */
175#define WLC_E_PFN_SCAN_NONE		82	/* no PFN networks around */
176#define WLC_E_PFN_SCAN_ALLGONE		83	/* last found PFN network gets lost */
177#define WLC_E_GTK_PLUMBED		84
178#define WLC_E_ASSOC_IND_NDIS		85	/* 802.11 ASSOC indication for NDIS only */
179#define WLC_E_REASSOC_IND_NDIS		86	/* 802.11 REASSOC indication for NDIS only */
180#define WLC_E_ASSOC_REQ_IE		87
181#define WLC_E_ASSOC_RESP_IE		88
182#define WLC_E_ASSOC_RECREATED		89	/* association recreated on resume */
183#define WLC_E_ACTION_FRAME_RX_NDIS	90	/* rx action frame event for NDIS only */
184#define WLC_E_AUTH_REQ			91	/* authentication request received */
185#define WLC_E_TDLS_PEER_EVENT		92	/* discovered peer, connected/disconnected peer */
186#define WLC_E_SPEEDY_RECREATE_FAIL	93	/* fast assoc recreation failed */
187#define WLC_E_NATIVE			94	/* port-specific event and payload (e.g. NDIS) */
188#define WLC_E_PKTDELAY_IND		95	/* event for tx pkt delay suddently jump */
189#define WLC_E_AWDL_AW			96	/* AWDL AW period starts */
190#define WLC_E_AWDL_ROLE			97	/* AWDL Master/Slave/NE master role event */
191#define WLC_E_AWDL_EVENT		98	/* Generic AWDL event */
192#ifdef WLNIC
193#define WLC_E_NIC_AF_TXS		99	/* NIC AF txstatus */
194#define WLC_E_NIC_NIC_REPORT		100	/* NIC period report */
195#endif
196#define WLC_E_BEACON_FRAME_RX		101
197#define WLC_E_SERVICE_FOUND		102	/* desired service found */
198#define WLC_E_GAS_FRAGMENT_RX		103	/* GAS fragment received */
199#define WLC_E_GAS_COMPLETE		104	/* GAS sessions all complete */
200#define WLC_E_P2PO_ADD_DEVICE		105	/* New device found by p2p offload */
201#define WLC_E_P2PO_DEL_DEVICE		106	/* device has been removed by p2p offload */
202#define WLC_E_WNM_STA_SLEEP		107	/* WNM event to notify STA enter sleep mode */
203#define WLC_E_TXFAIL_THRESH		108	/* Indication of MAC tx failures (exhaustion of
204						 * 802.11 retries) exceeding threshold(s)
205						 */
206#define WLC_E_PROXD			109	/* Proximity Detection event */
207#define WLC_E_IBSS_COALESCE		110	/* IBSS Coalescing */
208#define WLC_E_AWDL_AW_EXT_END		111	/* AWDL extended period ends */
209#define WLC_E_AWDL_AW_EXT_START		112	/* SWDL AW extension start */
210#define WLC_E_AWDL_AW_START		113	/* AWDL start Event to inform host  */
211#define WLC_E_AWDL_RADIO_OFF		114	/* Radio Off  */
212#define WLC_E_AWDL_PEER_STATE		115	/* AWDL peer state open/close */
213#define WLC_E_AWDL_SYNC_STATE_CHANGED	116	/* AWDL sync role changed */
214#define WLC_E_AWDL_CHIP_RESET		117	/* infroms the interface of a chip rest */
215#define WLC_E_AWDL_INTERLEAVED_SCAN_START		118
216#define WLC_E_AWDL_INTERLEAVED_SCAN_STOP		119
217#define WLC_E_AWDL_PEER_CACHE_CONTROL			120
218#define WLC_E_CSA_START_IND		121
219#define WLC_E_CSA_DONE_IND		122
220#define WLC_E_CSA_FAILURE_IND		123
221#define WLC_E_CCA_CHAN_QUAL		124	/* CCA based channel quality report */
222#define WLC_E_BSSID		125	/* to report change in BSSID while roaming */
223#define WLC_E_TX_STAT_ERROR		126	/* tx error indication */
224#define WLC_E_BCMC_CREDIT_SUPPORT	127	/* credit check for BCMC supported */
225#define WLC_E_PSTA_PRIMARY_INTF_IND	128	/* psta primary interface indication */
226#define WLC_E_AUTHORIZED	129	/* event for a STA been authroized for traffic */
227#define WLC_E_PROBREQ_RSSI_RATE       130      /* probe request rssi & rate */
228
229#define WLC_E_LAST			131	/* highest val + 1 for range checking */
230
231
232/* Table of event name strings for UIs and debugging dumps */
233typedef struct {
234	uint event;
235	const char *name;
236} bcmevent_name_t;
237
238extern const bcmevent_name_t	bcmevent_names[];
239extern const int		bcmevent_names_size;
240
241/* Event status codes */
242#define WLC_E_STATUS_SUCCESS		0	/* operation was successful */
243#define WLC_E_STATUS_FAIL		1	/* operation failed */
244#define WLC_E_STATUS_TIMEOUT		2	/* operation timed out */
245#define WLC_E_STATUS_NO_NETWORKS	3	/* failed due to no matching network found */
246#define WLC_E_STATUS_ABORT		4	/* operation was aborted */
247#define WLC_E_STATUS_NO_ACK		5	/* protocol failure: packet not ack'd */
248#define WLC_E_STATUS_UNSOLICITED	6	/* AUTH or ASSOC packet was unsolicited */
249#define WLC_E_STATUS_ATTEMPT		7	/* attempt to assoc to an auto auth configuration */
250#define WLC_E_STATUS_PARTIAL		8	/* scan results are incomplete */
251#define WLC_E_STATUS_NEWSCAN		9	/* scan aborted by another scan */
252#define WLC_E_STATUS_NEWASSOC		10	/* scan aborted due to assoc in progress */
253#define WLC_E_STATUS_11HQUIET		11	/* 802.11h quiet period started */
254#define WLC_E_STATUS_SUPPRESS		12	/* user disabled scanning (WLC_SET_SCANSUPPRESS) */
255#define WLC_E_STATUS_NOCHANS		13	/* no allowable channels to scan */
256#define WLC_E_STATUS_CS_ABORT		15	/* abort channel select */
257#define WLC_E_STATUS_ERROR		16	/* request failed due to error */
258
259/* roam reason codes */
260#define WLC_E_REASON_INITIAL_ASSOC	0	/* initial assoc */
261#define WLC_E_REASON_LOW_RSSI		1	/* roamed due to low RSSI */
262#define WLC_E_REASON_DEAUTH		2	/* roamed due to DEAUTH indication */
263#define WLC_E_REASON_DISASSOC		3	/* roamed due to DISASSOC indication */
264#define WLC_E_REASON_BCNS_LOST		4	/* roamed due to lost beacons */
265
266/* Roam codes used primarily by CCX */
267#define WLC_E_REASON_FAST_ROAM_FAILED	5	/* roamed due to fast roam failure */
268#define WLC_E_REASON_DIRECTED_ROAM	6	/* roamed due to request by AP */
269#define WLC_E_REASON_TSPEC_REJECTED	7	/* roamed due to TSPEC rejection */
270#define WLC_E_REASON_BETTER_AP		8	/* roamed due to finding better AP */
271#define WLC_E_REASON_MINTXRATE		9	/* roamed because at mintxrate for too long */
272#define WLC_E_REASON_TXFAIL		10	/* We can hear AP, but AP can't hear us */
273
274#define WLC_E_REASON_REQUESTED_ROAM 11	/* roamed due to BSS Mgmt Transition request by AP */
275
276
277/* prune reason codes */
278#define WLC_E_PRUNE_ENCR_MISMATCH	1	/* encryption mismatch */
279#define WLC_E_PRUNE_BCAST_BSSID		2	/* AP uses a broadcast BSSID */
280#define WLC_E_PRUNE_MAC_DENY		3	/* STA's MAC addr is in AP's MAC deny list */
281#define WLC_E_PRUNE_MAC_NA		4	/* STA's MAC addr is not in AP's MAC allow list */
282#define WLC_E_PRUNE_REG_PASSV		5	/* AP not allowed due to regulatory restriction */
283#define WLC_E_PRUNE_SPCT_MGMT		6	/* AP does not support STA locale spectrum mgmt */
284#define WLC_E_PRUNE_RADAR		7	/* AP is on a radar channel of STA locale */
285#define WLC_E_RSN_MISMATCH		8	/* STA does not support AP's RSN */
286#define WLC_E_PRUNE_NO_COMMON_RATES	9	/* No rates in common with AP */
287#define WLC_E_PRUNE_BASIC_RATES		10	/* STA does not support all basic rates of BSS */
288#define WLC_E_PRUNE_CIPHER_NA		12	/* BSS's cipher not supported */
289#define WLC_E_PRUNE_KNOWN_STA		13	/* AP is already known to us as a STA */
290#define WLC_E_PRUNE_WDS_PEER		15	/* AP is already known to us as a WDS peer */
291#define WLC_E_PRUNE_QBSS_LOAD		16	/* QBSS LOAD - AAC is too low */
292#define WLC_E_PRUNE_HOME_AP		17	/* prune home AP */
293
294/* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
295#define WLC_E_SUP_OTHER			0	/* Other reason */
296#define WLC_E_SUP_DECRYPT_KEY_DATA	1	/* Decryption of key data failed */
297#define WLC_E_SUP_BAD_UCAST_WEP128	2	/* Illegal use of ucast WEP128 */
298#define WLC_E_SUP_BAD_UCAST_WEP40	3	/* Illegal use of ucast WEP40 */
299#define WLC_E_SUP_UNSUP_KEY_LEN		4	/* Unsupported key length */
300#define WLC_E_SUP_PW_KEY_CIPHER		5	/* Unicast cipher mismatch in pairwise key */
301#define WLC_E_SUP_MSG3_TOO_MANY_IE	6	/* WPA IE contains > 1 RSN IE in key msg 3 */
302#define WLC_E_SUP_MSG3_IE_MISMATCH	7	/* WPA IE mismatch in key message 3 */
303#define WLC_E_SUP_NO_INSTALL_FLAG	8	/* INSTALL flag unset in 4-way msg */
304#define WLC_E_SUP_MSG3_NO_GTK		9	/* encapsulated GTK missing from msg 3 */
305#define WLC_E_SUP_GRP_KEY_CIPHER	10	/* Multicast cipher mismatch in group key */
306#define WLC_E_SUP_GRP_MSG1_NO_GTK	11	/* encapsulated GTK missing from group msg 1 */
307#define WLC_E_SUP_GTK_DECRYPT_FAIL	12	/* GTK decrypt failure */
308#define WLC_E_SUP_SEND_FAIL		13	/* message send failure */
309#define WLC_E_SUP_DEAUTH		14	/* received FC_DEAUTH */
310#define WLC_E_SUP_WPA_PSK_TMO		15	/* WPA PSK 4-way handshake timeout */
311
312/* Event data for events that include frames received over the air */
313/* WLC_E_PROBRESP_MSG
314 * WLC_E_P2P_PROBREQ_MSG
315 * WLC_E_ACTION_FRAME_RX
316 */
317#ifdef WLAWDL
318#define WLC_E_AWDL_SCAN_START		1	/* Scan start indication to host */
319#define WLC_E_AWDL_SCAN_DONE		0	/* Scan Done indication to host */
320
321#define WLC_E_AWDL_RX_ACT_FRAME					1
322#define WLC_E_AWDL_RX_PRB_RESP					2
323
324#endif
325typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data {
326	uint16	version;
327	uint16	channel;	/* Matches chanspec_t format from bcmwifi_channels.h */
328	int32	rssi;
329	uint32	mactime;
330	uint32	rate;
331} BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_t;
332
333#define BCM_RX_FRAME_DATA_VERSION 1
334
335/* WLC_E_IF event data */
336typedef struct wl_event_data_if {
337	uint8 ifidx;		/* RTE virtual device index (for dongle) */
338	uint8 opcode;		/* see I/F opcode */
339	uint8 reserved;		/* bit mask (WLC_E_IF_FLAGS_XXX ) */
340	uint8 bssidx;		/* bsscfg index */
341	uint8 role;		/* see I/F role */
342} wl_event_data_if_t;
343
344/* opcode in WLC_E_IF event */
345#define WLC_E_IF_ADD		1	/* bsscfg add */
346#define WLC_E_IF_DEL		2	/* bsscfg delete */
347#define WLC_E_IF_CHANGE		3	/* bsscfg role change */
348
349/* I/F role code in WLC_E_IF event */
350#define WLC_E_IF_ROLE_STA		0	/* Infra STA */
351#define WLC_E_IF_ROLE_AP		1	/* Access Point */
352#define WLC_E_IF_ROLE_WDS		2	/* WDS link */
353#define WLC_E_IF_ROLE_P2P_GO		3	/* P2P Group Owner */
354#define WLC_E_IF_ROLE_P2P_CLIENT	4	/* P2P Client */
355
356/* WLC_E_RSSI event data */
357typedef struct wl_event_data_rssi {
358	int32 rssi;
359	int32 snr;
360	int32 noise;
361} wl_event_data_rssi_t;
362
363/* WLC_E_IF flag */
364#define WLC_E_IF_FLAGS_BSSCFG_NOIF	0x1	/* no host I/F creation needed */
365
366/* Reason codes for LINK */
367#define WLC_E_LINK_BCN_LOSS	1	/* Link down because of beacon loss */
368#define WLC_E_LINK_DISASSOC	2	/* Link down because of disassoc */
369#define WLC_E_LINK_ASSOC_REC	3	/* Link down because assoc recreate failed */
370#define WLC_E_LINK_BSSCFG_DIS	4	/* Link down due to bsscfg down */
371
372/* reason codes for WLC_E_OVERLAY_REQ event */
373#define WLC_E_OVL_DOWNLOAD		0	/* overlay download request */
374#define WLC_E_OVL_UPDATE_IND	1	/* device indication of host overlay update */
375
376/* reason codes for WLC_E_TDLS_PEER_EVENT event */
377#define WLC_E_TDLS_PEER_DISCOVERED		0	/* peer is ready to establish TDLS */
378#define WLC_E_TDLS_PEER_CONNECTED		1
379#define WLC_E_TDLS_PEER_DISCONNECTED	2
380
381#ifdef WLAWDL
382/* WLC_E_AWDL_EVENT subtypes */
383#define WLC_E_AWDL_SCAN_STATUS	0
384#define WLC_E_AWDL_RX_ACT_FRAME	1
385#define WLC_E_AWDL_RX_PRB_RESP	2
386#define WLC_E_AWDL_PHYCAL_STATUS	3
387#define WLC_E_AWDL_WOWL_NULLPKT	4
388#define WLC_E_AWDL_OOB_AF_STATUS	5
389
390/* WLC_E_AWDL_SCAN_STATUS status values */
391#define WLC_E_AWDL_SCAN_START		1	/* Scan start indication to host */
392#define WLC_E_AWDL_SCAN_DONE		0	/* Scan Done indication to host */
393#define WLC_E_AWDL_PHYCAL_START		1	/* Phy calibration start indication to host */
394#define WLC_E_AWDL_PHYCAL_DONE		0	/* Phy calibration done indication to host */
395#endif
396
397/* GAS event data */
398typedef BWL_PRE_PACKED_STRUCT struct wl_event_gas {
399	uint16	channel;		/* channel of GAS protocol */
400	uint8	dialog_token;	/* GAS dialog token */
401	uint8	fragment_id;	/* fragment id */
402	uint16	status_code;	/* status code on GAS completion */
403	uint16 	data_len;		/* length of data to follow */
404	uint8	data[1];		/* variable length specified by data_len */
405} BWL_POST_PACKED_STRUCT wl_event_gas_t;
406
407/* service discovery TLV */
408typedef BWL_PRE_PACKED_STRUCT struct wl_sd_tlv {
409	uint16	length;			/* length of response_data */
410	uint8	protocol;		/* service protocol type */
411	uint8	transaction_id;		/* service transaction id */
412	uint8	status_code;		/* status code */
413	uint8	data[1];		/* response data */
414} BWL_POST_PACKED_STRUCT wl_sd_tlv_t;
415
416/* service discovery event data */
417typedef BWL_PRE_PACKED_STRUCT struct wl_event_sd {
418	uint16	channel;		/* channel */
419	uint8	count;			/* number of tlvs */
420	wl_sd_tlv_t	tlv[1];		/* service discovery TLV */
421} BWL_POST_PACKED_STRUCT wl_event_sd_t;
422
423/* Reason codes for WLC_E_PROXD */
424#define WLC_E_PROXD_FOUND	1	/* Found a proximity device */
425#define WLC_E_PROXD_GONE	2	/* Lost a proximity device */
426
427/* WLC_E_AWDL_AW event data */
428typedef BWL_PRE_PACKED_STRUCT struct awdl_aws_event_data {
429	uint32	fw_time;			/* firmware PMU time */
430	struct	ether_addr current_master;	/* Current master Mac addr */
431	uint16	aw_counter;			/* AW seq# */
432	uint8	aw_ext_count;			/* AW extension count */
433	uint8	aw_role;			/* AW role */
434	uint8	flags;				/* AW event flag */
435	uint16	aw_chan;
436	uint8	infra_rssi;			/* rssi on the infra channel */
437	uint32 	infra_rxbcn_count; 	/* number of beacons received */
438} BWL_POST_PACKED_STRUCT awdl_aws_event_data_t;
439
440/* For awdl_aws_event_data_t.flags */
441#define AWDL_AW_LAST_EXT	0x01
442
443/* WLC_E_AWDL_OOB_AF_STATUS event data */
444typedef BWL_PRE_PACKED_STRUCT struct awdl_oob_af_status_data {
445	uint32	tx_time_diff;
446	uint16	pkt_tag;
447	uint8	tx_chan;
448} BWL_POST_PACKED_STRUCT awdl_oob_af_status_data_t;
449
450/* Video Traffic Interference Monitor Event */
451#define INTFER_EVENT_VERSION		1
452#define INTFER_STREAM_TYPE_NONTCP	1
453#define INTFER_STREAM_TYPE_TCP		2
454#define WLINTFER_STATS_NSMPLS		4
455typedef struct wl_intfer_event {
456	uint16 version;			/* version */
457	uint16 status;			/* status */
458	uint8 txfail_histo[WLINTFER_STATS_NSMPLS]; /* txfail histo */
459} wl_intfer_event_t;
460
461/* WLC_E_PSTA_PRIMARY_INTF_IND event data */
462typedef struct wl_psta_primary_intf_event {
463	struct ether_addr prim_ea;	/* primary intf ether addr */
464} wl_psta_primary_intf_event_t;
465
466/* This marks the end of a packed structure section. */
467#include <packed_section_end.h>
468
469typedef struct _wlc_mgmt_macevt_info
470{
471	int8 rssi;
472	uint32 rspec;
473} wlc_mgmt_macevt_info;
474
475#endif /* _BCMEVENT_H_ */
476