16dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt/*
26dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * Broadcom Event  protocol definitions
36dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt *
438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt * Copyright (C) 1999-2013, Broadcom Corporation
538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt *
66dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * Permission to use, copy, modify, and/or distribute this software for any
76dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * purpose with or without fee is hereby granted, provided that the above
86dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * copyright notice and this permission notice appear in all copies.
96dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt *
106dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
116dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
126dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
136dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
146dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
156dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
166dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
176dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt *
186dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt * Dependencies: proto/bcmeth.h
196dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt *
2038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt * $Id: bcmevent.h 386716 2013-02-21 18:16:10Z $
216dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt *
226dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt */
236dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
2438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/*
2538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt * Broadcom Ethernet Events protocol defines
2638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt *
2738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt */
286dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
296dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#ifndef _BCMEVENT_H_
306dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define _BCMEVENT_H_
316dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
326dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#ifndef _TYPEDEFS_H_
336dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#include <typedefs.h>
346dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#endif
3538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* #include <ethernet.h> -- TODO: req., excluded to overwhelming coupling (break up ethernet.h) */
3638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#include <proto/bcmeth.h>
376dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
3838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* This marks the start of a packed structure section. */
396dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#include <packed_section_start.h>
406dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
4138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define BCM_EVENT_MSG_VERSION		2	/* wl_event_msg_t struct version */
4238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define BCM_MSG_IFNAME_MAX		16	/* max length of interface name */
436dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
4438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* flags */
4538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_EVENT_MSG_LINK		0x01	/* link is up */
4638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_EVENT_MSG_FLUSHTXQ		0x02	/* flush tx queue on MIC error */
4738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_EVENT_MSG_GROUP		0x04	/* group MIC error */
4838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_EVENT_MSG_UNKBSS		0x08	/* unknown source bsscfg */
4938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_EVENT_MSG_UNKIF		0x10	/* unknown source OS i/f */
506dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
5138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* these fields are stored in network order */
526dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
5338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* version 1 */
546dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct
556dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt{
566dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	uint16	version;
5738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	flags;			/* see flags below */
5838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	event_type;		/* Message (see below) */
5938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	status;			/* Status code (see below) */
6038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	reason;			/* Reason code (if applicable) */
6138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	auth_type;		/* WLC_E_AUTH */
6238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	datalen;		/* data buf */
6338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	struct ether_addr	addr;	/* Station address (if applicable) */
6438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	char	ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
656dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt} BWL_POST_PACKED_STRUCT wl_event_msg_v1_t;
666dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
6738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* the current version */
686dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct
696dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt{
706dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	uint16	version;
7138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	flags;			/* see flags below */
7238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	event_type;		/* Message (see below) */
7338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	status;			/* Status code (see below) */
7438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	reason;			/* Reason code (if applicable) */
7538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	auth_type;		/* WLC_E_AUTH */
7638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	datalen;		/* data buf */
7738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	struct ether_addr	addr;	/* Station address (if applicable) */
7838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	char	ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
7938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	ifidx;			/* destination OS i/f index */
8038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	bsscfgidx;		/* source bsscfg index */
816dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt} BWL_POST_PACKED_STRUCT wl_event_msg_t;
826dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
8338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* used by driver msgs */
846dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct bcm_event {
856dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	struct ether_header eth;
866dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	bcmeth_hdr_t		bcm_hdr;
876dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	wl_event_msg_t		event;
8838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	/* data portion follows */
896dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt} BWL_POST_PACKED_STRUCT bcm_event_t;
906dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
916dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define BCM_MSG_LEN	(sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
926dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
9338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Event messages */
9438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SET_SSID		0	/* indicates status of set SSID */
9538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_JOIN		1	/* differentiates join IBSS from found (WLC_E_START) IBSS */
9638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_START		2	/* STA founded an IBSS or AP started a BSS */
9738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AUTH		3	/* 802.11 AUTH request */
9838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AUTH_IND		4	/* 802.11 AUTH indication */
9938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DEAUTH		5	/* 802.11 DEAUTH request */
10038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DEAUTH_IND	6	/* 802.11 DEAUTH indication */
10138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ASSOC		7	/* 802.11 ASSOC request */
10238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ASSOC_IND		8	/* 802.11 ASSOC indication */
10338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASSOC		9	/* 802.11 REASSOC request */
10438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASSOC_IND	10	/* 802.11 REASSOC indication */
10538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DISASSOC		11	/* 802.11 DISASSOC request */
10638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DISASSOC_IND	12	/* 802.11 DISASSOC indication */
10738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_QUIET_START	13	/* 802.11h Quiet period started */
10838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_QUIET_END		14	/* 802.11h Quiet period ended */
10938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_BEACON_RX		15	/* BEACONS received/lost indication */
11038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_LINK		16	/* generic link indication */
11138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_MIC_ERROR		17	/* TKIP MIC error occurred */
11238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_NDIS_LINK		18	/* NDIS style link indication */
11338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ROAM		19	/* roam attempt occurred: indicate status & reason */
11438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_TXFAIL		20	/* change in dot11FailedCount (txfail) */
11538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PMKID_CACHE	21	/* WPA2 pmkid cache indication */
11638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_RETROGRADE_TSF	22	/* current AP's TSF value went backward */
11738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE		23	/* AP was pruned from join list for reason */
11838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AUTOAUTH		24	/* report AutoAuth table entry match for join attempt */
11938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_EAPOL_MSG		25	/* Event encapsulating an EAPOL message */
12038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SCAN_COMPLETE	26	/* Scan results are ready or scan was aborted */
12138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ADDTS_IND		27	/* indicate to host addts fail/success */
12238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DELTS_IND		28	/* indicate to host delts fail/success */
12338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_BCNSENT_IND	29	/* indicate to host of beacon transmit */
12438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_BCNRX_MSG		30	/* Send the received beacon up to the host */
12538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_BCNLOST_MSG	31	/* indicate to host loss of beacon */
12638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ROAM_PREP		32	/* before attempting to roam */
12738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PFN_NET_FOUND	33	/* PFN network found event */
12838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PFN_NET_LOST	34	/* PFN network lost event */
1296dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_RESET_COMPLETE	35
1306dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_JOIN_START	36
1316dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_ROAM_START	37
1326dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_ASSOC_START	38
1336dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_IBSS_ASSOC	39
1346dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_RADIO		40
13538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PSM_WATCHDOG	41	/* PSM microcode watchdog fired */
13638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PROBREQ_MSG       44      /* probe request received */
1376dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_SCAN_CONFIRM_IND  45
13838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PSK_SUP		46	/* WPA Handshake fail */
13938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_COUNTRY_CODE_CHANGED	47
14038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define	WLC_E_EXCEEDED_MEDIUM_TIME	48	/* WMMAC excedded medium time */
14138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ICV_ERROR		49	/* WEP ICV error occurred */
14238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_UNICAST_DECODE_ERROR	50	/* Unsupported unicast encrypted frame */
14338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_MULTICAST_DECODE_ERROR	51	/* Unsupported multicast encrypted frame */
1446dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_TRACE		52
14538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF		54	/* I/F change (for dongle host notification) */
14638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_P2P_DISC_LISTEN_COMPLETE	55	/* listen state expires */
14738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_RSSI		56	/* indicate RSSI change based on configured levels */
14838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PFN_SCAN_COMPLETE	57	/* PFN completed scan of network list */
1496dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_EXTLOG_MSG	58
15038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ACTION_FRAME      59 	/* Action frame Rx */
15138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ACTION_FRAME_COMPLETE	60	/* Action frame Tx complete */
15238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRE_ASSOC_IND	61	/* assoc request received */
15338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRE_REASSOC_IND	62	/* re-assoc request received */
1546dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define WLC_E_CHANNEL_ADOPTED	63
15538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AP_STARTED	64	/* AP started */
15638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DFS_AP_STOP	65	/* AP stopped due to DFS */
15738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DFS_AP_RESUME	66	/* AP resumed due to DFS */
15838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_WAI_STA_EVENT	67	/* WAI stations event */
15938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_WAI_MSG 		68	/* event encapsulating an WAI message */
16038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ESCAN_RESULT 	69	/* escan result event */
16138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 	70	/* action frame off channel complete */
16238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PROBRESP_MSG	71	/* probe response received */
16338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_P2P_PROBREQ_MSG	72	/* P2P Probe request received */
16438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_DCS_REQUEST	73
16538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_FIFO_CREDIT_MAP	74	/* credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */
16638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ACTION_FRAME_RX	75	/* Received action frame event WITH
16738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt					 * wl_event_rx_frame_data_t header
16838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt					 */
16938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_WAKE_EVENT	76	/* Wake Event timer fired, used for wake WLAN test mode */
17038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_RM_COMPLETE	77	/* Radio measurement complete */
17138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_HTSFSYNC		78	/* Synchronize TSF with the host */
17238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_OVERLAY_REQ	79	/* request an overlay IOCTL/iovar from the host */
17338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_CSA_COMPLETE_IND		80	/* 802.11 CHANNEL SWITCH ACTION completed */
17438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_EXCESS_PM_WAKE_EVENT	81	/* excess PM Wake Event to inform host  */
17538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PFN_SCAN_NONE		82	/* no PFN networks around */
17638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PFN_SCAN_ALLGONE		83	/* last found PFN network gets lost */
17738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_GTK_PLUMBED		84
17838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ASSOC_IND_NDIS		85	/* 802.11 ASSOC indication for NDIS only */
17938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASSOC_IND_NDIS		86	/* 802.11 REASSOC indication for NDIS only */
18038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ASSOC_REQ_IE		87
18138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ASSOC_RESP_IE		88
18238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ASSOC_RECREATED		89	/* association recreated on resume */
18338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_ACTION_FRAME_RX_NDIS	90	/* rx action frame event for NDIS only */
18438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AUTH_REQ			91	/* authentication request received */
18538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_TDLS_PEER_EVENT		92	/* discovered peer, connected/disconnected peer */
18638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SPEEDY_RECREATE_FAIL	93	/* fast assoc recreation failed */
18738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_NATIVE			94	/* port-specific event and payload (e.g. NDIS) */
18838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PKTDELAY_IND		95	/* event for tx pkt delay suddently jump */
18938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_AW			96	/* AWDL AW period starts */
19038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_ROLE			97	/* AWDL Master/Slave/NE master role event */
19138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_EVENT		98	/* Generic AWDL event */
19238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#ifdef WLNIC
19338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_NIC_AF_TXS		99	/* NIC AF txstatus */
19438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_NIC_NIC_REPORT		100	/* NIC period report */
19538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#endif
19638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_BEACON_FRAME_RX		101
19738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SERVICE_FOUND		102	/* desired service found */
19838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_GAS_FRAGMENT_RX		103	/* GAS fragment received */
19938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_GAS_COMPLETE		104	/* GAS sessions all complete */
20038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_P2PO_ADD_DEVICE		105	/* New device found by p2p offload */
20138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_P2PO_DEL_DEVICE		106	/* device has been removed by p2p offload */
20238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_WNM_STA_SLEEP		107	/* WNM event to notify STA enter sleep mode */
20338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_NONE			108	/* event removed, free to be reused */
20438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PROXD			109	/* Proximity Detection event */
20538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IBSS_COALESCE		110	/* IBSS Coalescing */
20638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_AW_EXT_END		111	/* AWDL extended period ends */
20738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_AW_EXT_START		112	/* SWDL AW extension start */
20838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_AW_START		113	/* AWDL start Event to inform host  */
20938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_RADIO_OFF		114	/* Radio Off  */
21038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_PEER_STATE		115	/* AWDL peer state open/close */
21138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_SYNC_STATE_CHANGED	116	/* AWDL sync role changed */
21238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_CHIP_RESET		117	/* infroms the interface of a chip rest */
21338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_INTERLEAVED_SCAN_START		118
21438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_INTERLEAVED_SCAN_STOP		119
21538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_PEER_CACHE_CONTROL			120
21638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_CSA_START_IND		121
21738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_CSA_DONE_IND		122
21838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_CSA_FAILURE_IND		123
21938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_CCA_CHAN_QUAL		124	/* CCA based channel quality report */
22038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_LAST			125	/* highest val + 1 for range checking */
22138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
22238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
22338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Table of event name strings for UIs and debugging dumps */
2246dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidttypedef struct {
2256dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	uint event;
2266dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	const char *name;
2276dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt} bcmevent_name_t;
2286dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
2296dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidtextern const bcmevent_name_t	bcmevent_names[];
2306dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidtextern const int		bcmevent_names_size;
2316dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
23238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Event status codes */
23338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_SUCCESS		0	/* operation was successful */
23438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_FAIL		1	/* operation failed */
23538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_TIMEOUT		2	/* operation timed out */
23638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_NO_NETWORKS	3	/* failed due to no matching network found */
23738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_ABORT		4	/* operation was aborted */
23838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_NO_ACK		5	/* protocol failure: packet not ack'd */
23938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_UNSOLICITED	6	/* AUTH or ASSOC packet was unsolicited */
24038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_ATTEMPT		7	/* attempt to assoc to an auto auth configuration */
24138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_PARTIAL		8	/* scan results are incomplete */
24238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_NEWSCAN		9	/* scan aborted by another scan */
24338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_NEWASSOC		10	/* scan aborted due to assoc in progress */
24438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_11HQUIET		11	/* 802.11h quiet period started */
24538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_SUPPRESS		12	/* user disabled scanning (WLC_SET_SCANSUPPRESS) */
24638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_NOCHANS		13	/* no allowable channels to scan */
24738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_CS_ABORT		15	/* abort channel select */
24838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_STATUS_ERROR		16	/* request failed due to error */
24938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
25038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* roam reason codes */
25138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_INITIAL_ASSOC	0	/* initial assoc */
25238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_LOW_RSSI		1	/* roamed due to low RSSI */
25338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_DEAUTH		2	/* roamed due to DEAUTH indication */
25438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_DISASSOC		3	/* roamed due to DISASSOC indication */
25538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_BCNS_LOST		4	/* roamed due to lost beacons */
25638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
25738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Roam codes used primarily by CCX */
25838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_FAST_ROAM_FAILED	5	/* roamed due to fast roam failure */
25938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_DIRECTED_ROAM	6	/* roamed due to request by AP */
26038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_TSPEC_REJECTED	7	/* roamed due to TSPEC rejection */
26138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_BETTER_AP		8	/* roamed due to finding better AP */
26238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_MINTXRATE		9	/* roamed because at mintxrate for too long */
26338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_TXFAIL		10	/* We can hear AP, but AP can't hear us */
26438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
26538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_REASON_REQUESTED_ROAM 11	/* roamed due to BSS Mgmt Transition request by AP */
26638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
26738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
26838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* prune reason codes */
26938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_ENCR_MISMATCH	1	/* encryption mismatch */
27038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_BCAST_BSSID		2	/* AP uses a broadcast BSSID */
27138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_MAC_DENY		3	/* STA's MAC addr is in AP's MAC deny list */
27238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_MAC_NA		4	/* STA's MAC addr is not in AP's MAC allow list */
27338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_REG_PASSV		5	/* AP not allowed due to regulatory restriction */
27438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_SPCT_MGMT		6	/* AP does not support STA locale spectrum mgmt */
27538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_RADAR		7	/* AP is on a radar channel of STA locale */
27638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_RSN_MISMATCH		8	/* STA does not support AP's RSN */
27738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_NO_COMMON_RATES	9	/* No rates in common with AP */
27838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_BASIC_RATES		10	/* STA does not support all basic rates of BSS */
27938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_CIPHER_NA		12	/* BSS's cipher not supported */
28038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_KNOWN_STA		13	/* AP is already known to us as a STA */
28138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_WDS_PEER		15	/* AP is already known to us as a WDS peer */
28238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_QBSS_LOAD		16	/* QBSS LOAD - AAC is too low */
28338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PRUNE_HOME_AP		17	/* prune home AP */
28438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
28538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
28638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_OTHER			0	/* Other reason */
28738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_DECRYPT_KEY_DATA	1	/* Decryption of key data failed */
28838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_BAD_UCAST_WEP128	2	/* Illegal use of ucast WEP128 */
28938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_BAD_UCAST_WEP40	3	/* Illegal use of ucast WEP40 */
29038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_UNSUP_KEY_LEN		4	/* Unsupported key length */
29138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_PW_KEY_CIPHER		5	/* Unicast cipher mismatch in pairwise key */
29238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_MSG3_TOO_MANY_IE	6	/* WPA IE contains > 1 RSN IE in key msg 3 */
29338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_MSG3_IE_MISMATCH	7	/* WPA IE mismatch in key message 3 */
29438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_NO_INSTALL_FLAG	8	/* INSTALL flag unset in 4-way msg */
29538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_MSG3_NO_GTK		9	/* encapsulated GTK missing from msg 3 */
29638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_GRP_KEY_CIPHER	10	/* Multicast cipher mismatch in group key */
29738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_GRP_MSG1_NO_GTK	11	/* encapsulated GTK missing from group msg 1 */
29838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_GTK_DECRYPT_FAIL	12	/* GTK decrypt failure */
29938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_SEND_FAIL		13	/* message send failure */
30038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_DEAUTH		14	/* received FC_DEAUTH */
30138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_SUP_WPA_PSK_TMO		15	/* WPA PSK 4-way handshake timeout */
30238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
30338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Event data for events that include frames received over the air */
30438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_PROBRESP_MSG
30538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt * WLC_E_P2P_PROBREQ_MSG
30638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt * WLC_E_ACTION_FRAME_RX
30738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt */
30838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#ifdef WLAWDL
30938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_SCAN_START		1	/* Scan start indication to host */
31038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_SCAN_DONE		0	/* Scan Done indication to host */
3116dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
31238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_RX_ACT_FRAME					1
31338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_RX_PRB_RESP					2
3146dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
31538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#endif
3166dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data {
3176dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	uint16	version;
31838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	channel;	/* Matches chanspec_t format from bcmwifi_channels.h */
3196dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	int32	rssi;
3206dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	uint32	mactime;
3216dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt	uint32	rate;
3226dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt} BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_t;
3236dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
3246dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#define BCM_RX_FRAME_DATA_VERSION 1
3256dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
32638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_IF event data */
3276dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidttypedef struct wl_event_data_if {
32838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8 ifidx;		/* RTE virtual device index (for dongle) */
32938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8 opcode;		/* see I/F opcode */
33038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8 reserved;		/* bit mask (WLC_E_IF_FLAGS_XXX ) */
33138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8 bssidx;		/* bsscfg index */
33238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8 role;		/* see I/F role */
3336dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt} wl_event_data_if_t;
3346dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
33538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* opcode in WLC_E_IF event */
33638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_ADD		1	/* bsscfg add */
33738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_DEL		2	/* bsscfg delete */
33838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_CHANGE		3	/* bsscfg role change */
33938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
34038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* I/F role code in WLC_E_IF event */
34138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_ROLE_STA		0	/* Infra STA */
34238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_ROLE_AP		1	/* Access Point */
34338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_ROLE_WDS		2	/* WDS link */
34438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_ROLE_P2P_GO		3	/* P2P Group Owner */
34538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_ROLE_P2P_CLIENT	4	/* P2P Client */
34638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
34738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_RSSI event data */
34838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidttypedef struct wl_event_data_rssi {
34938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	int32 rssi;
35038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	int32 snr;
35138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	int32 noise;
35238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt} wl_event_data_rssi_t;
35338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
35438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_IF flag */
35538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_IF_FLAGS_BSSCFG_NOIF	0x1	/* no host I/F creation needed */
35638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
35738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Reason codes for LINK */
35838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_LINK_BCN_LOSS	1	/* Link down because of beacon loss */
35938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_LINK_DISASSOC	2	/* Link down because of disassoc */
36038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_LINK_ASSOC_REC	3	/* Link down because assoc recreate failed */
36138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_LINK_BSSCFG_DIS	4	/* Link down due to bsscfg down */
36238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
36338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* reason codes for WLC_E_OVERLAY_REQ event */
36438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_OVL_DOWNLOAD		0	/* overlay download request */
36538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_OVL_UPDATE_IND	1	/* device indication of host overlay update */
36638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
36738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* reason codes for WLC_E_TDLS_PEER_EVENT event */
36838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_TDLS_PEER_DISCOVERED		0	/* peer is ready to establish TDLS */
369ac2bc7e7aaad957f235992ff74d5f9af34dc5f88Dmitry Shmidt#define WLC_E_TDLS_PEER_CONNECTED		1
370ac2bc7e7aaad957f235992ff74d5f9af34dc5f88Dmitry Shmidt#define WLC_E_TDLS_PEER_DISCONNECTED	2
3716dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
37238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#ifdef WLAWDL
37338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_AWDL_EVENT subtypes */
37438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_SCAN_STATUS	0
37538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_RX_ACT_FRAME	1
37638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_RX_PRB_RESP	2
37738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_PHYCAL_STATUS	3
37838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_WOWL_NULLPKT	4
37938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_OOB_AF_STATUS	5
38038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
38138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_AWDL_SCAN_STATUS status values */
38238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_SCAN_START		1	/* Scan start indication to host */
38338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_SCAN_DONE		0	/* Scan Done indication to host */
38438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_PHYCAL_START		1	/* Phy calibration start indication to host */
38538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_AWDL_PHYCAL_DONE		0	/* Phy calibration done indication to host */
38638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#endif
38738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
38838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* GAS event data */
38938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct wl_event_gas {
39038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	channel;		/* channel of GAS protocol */
39138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	dialog_token;	/* GAS dialog token */
39238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	fragment_id;	/* fragment id */
39338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	status_code;	/* status code on GAS completion */
39438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16 	data_len;		/* length of data to follow */
39538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	data[1];		/* variable length specified by data_len */
39638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt} BWL_POST_PACKED_STRUCT wl_event_gas_t;
39738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
39838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* service discovery TLV */
39938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct wl_sd_tlv {
40038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	length;			/* length of response_data */
40138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	protocol;		/* service protocol type */
40238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	transaction_id;		/* service transaction id */
40338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	status_code;		/* status code */
40438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	data[1];		/* response data */
40538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt} BWL_POST_PACKED_STRUCT wl_sd_tlv_t;
40638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
40738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* service discovery event data */
40838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct wl_event_sd {
40938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	channel;		/* channel */
41038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	count;			/* number of tlvs */
41138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	wl_sd_tlv_t	tlv[1];		/* service discovery TLV */
41238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt} BWL_POST_PACKED_STRUCT wl_event_sd_t;
41338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
41438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* Reason codes for WLC_E_PROXD */
41538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PROXD_FOUND	1	/* Found a proximity device */
41638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define WLC_E_PROXD_GONE	2	/* Lost a proximity device */
41738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
41838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* WLC_E_AWDL_AW event data */
41938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct awdl_aws_event_data {
42038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint32	fw_time;			/* firmware PMU time */
42138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	struct	ether_addr current_master;	/* Current master Mac addr */
42238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	aw_counter;			/* AW seq# */
42338eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	aw_ext_count;			/* AW extension count */
42438eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	aw_role;			/* AW role */
42538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint8	flags;				/* AW event flag */
42638eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt	uint16	aw_chan;
42738eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt} BWL_POST_PACKED_STRUCT awdl_aws_event_data_t;
42838eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
42938eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* For awdl_aws_event_data_t.flags */
43038eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#define AWDL_AW_LAST_EXT	0x01
43138eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt
43238eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt/* This marks the end of a packed structure section. */
4336dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt#include <packed_section_end.h>
4346dbcf2181152a81ab5f3bc5fa765288341a1b7abDmitry Shmidt
43538eaaf5a34502fe465cf8b6ac7a2dfcafa17ba41Dmitry Shmidt#endif /* _BCMEVENT_H_ */
436