Home | History | Annotate | Download | only in proto
      1 /*
      2  * Broadcom Event  protocol definitions
      3  *
      4  * Copyright (C) 1999-2011, Broadcom Corporation
      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,v 9.64.2.9 2011-02-01 06:24:21 Exp $
     21  *
     22  */
     23 
     24 
     25 
     26 
     27 #ifndef _BCMEVENT_H_
     28 #define _BCMEVENT_H_
     29 
     30 #ifndef _TYPEDEFS_H_
     31 #include <typedefs.h>
     32 #endif
     33 
     34 
     35 #include <packed_section_start.h>
     36 
     37 #define BCM_EVENT_MSG_VERSION		2
     38 #define BCM_MSG_IFNAME_MAX		16
     39 
     40 
     41 #define WLC_EVENT_MSG_LINK		0x01
     42 #define WLC_EVENT_MSG_FLUSHTXQ		0x02
     43 #define WLC_EVENT_MSG_GROUP		0x04
     44 #define WLC_EVENT_MSG_UNKBSS		0x08
     45 #define WLC_EVENT_MSG_UNKIF		0x10
     46 
     47 
     48 
     49 
     50 typedef BWL_PRE_PACKED_STRUCT struct
     51 {
     52 	uint16	version;
     53 	uint16	flags;
     54 	uint32	event_type;
     55 	uint32	status;
     56 	uint32	reason;
     57 	uint32	auth_type;
     58 	uint32	datalen;
     59 	struct ether_addr	addr;
     60 	char	ifname[BCM_MSG_IFNAME_MAX];
     61 } BWL_POST_PACKED_STRUCT wl_event_msg_v1_t;
     62 
     63 
     64 typedef BWL_PRE_PACKED_STRUCT struct
     65 {
     66 	uint16	version;
     67 	uint16	flags;
     68 	uint32	event_type;
     69 	uint32	status;
     70 	uint32	reason;
     71 	uint32	auth_type;
     72 	uint32	datalen;
     73 	struct ether_addr	addr;
     74 	char	ifname[BCM_MSG_IFNAME_MAX];
     75 	uint8	ifidx;
     76 	uint8	bsscfgidx;
     77 } BWL_POST_PACKED_STRUCT wl_event_msg_t;
     78 
     79 
     80 typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
     81 	struct ether_header eth;
     82 	bcmeth_hdr_t		bcm_hdr;
     83 	wl_event_msg_t		event;
     84 
     85 } BWL_POST_PACKED_STRUCT bcm_event_t;
     86 
     87 #define BCM_MSG_LEN	(sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
     88 
     89 
     90 #define WLC_E_SET_SSID		0
     91 #define WLC_E_JOIN		1
     92 #define WLC_E_START		2
     93 #define WLC_E_AUTH		3
     94 #define WLC_E_AUTH_IND		4
     95 #define WLC_E_DEAUTH		5
     96 #define WLC_E_DEAUTH_IND	6
     97 #define WLC_E_ASSOC		7
     98 #define WLC_E_ASSOC_IND		8
     99 #define WLC_E_REASSOC		9
    100 #define WLC_E_REASSOC_IND	10
    101 #define WLC_E_DISASSOC		11
    102 #define WLC_E_DISASSOC_IND	12
    103 #define WLC_E_QUIET_START	13
    104 #define WLC_E_QUIET_END		14
    105 #define WLC_E_BEACON_RX		15
    106 #define WLC_E_LINK		16
    107 #define WLC_E_MIC_ERROR		17
    108 #define WLC_E_NDIS_LINK		18
    109 #define WLC_E_ROAM		19
    110 #define WLC_E_TXFAIL		20
    111 #define WLC_E_PMKID_CACHE	21
    112 #define WLC_E_RETROGRADE_TSF	22
    113 #define WLC_E_PRUNE		23
    114 #define WLC_E_AUTOAUTH		24
    115 #define WLC_E_EAPOL_MSG		25
    116 #define WLC_E_SCAN_COMPLETE	26
    117 #define WLC_E_ADDTS_IND		27
    118 #define WLC_E_DELTS_IND		28
    119 #define WLC_E_BCNSENT_IND	29
    120 #define WLC_E_BCNRX_MSG		30
    121 #define WLC_E_BCNLOST_MSG	31
    122 #define WLC_E_ROAM_PREP		32
    123 #define WLC_E_PFN_NET_FOUND	33
    124 #define WLC_E_PFN_NET_LOST	34
    125 #define WLC_E_RESET_COMPLETE	35
    126 #define WLC_E_JOIN_START	36
    127 #define WLC_E_ROAM_START	37
    128 #define WLC_E_ASSOC_START	38
    129 #define WLC_E_IBSS_ASSOC	39
    130 #define WLC_E_RADIO		40
    131 #define WLC_E_PSM_WATCHDOG	41
    132 #define WLC_E_PROBREQ_MSG       44
    133 #define WLC_E_SCAN_CONFIRM_IND  45
    134 #define WLC_E_PSK_SUP		46
    135 #define WLC_E_COUNTRY_CODE_CHANGED 47
    136 #define	WLC_E_EXCEEDED_MEDIUM_TIME 48
    137 #define WLC_E_ICV_ERROR		49
    138 #define WLC_E_UNICAST_DECODE_ERROR 50
    139 #define WLC_E_MULTICAST_DECODE_ERROR 51
    140 #define WLC_E_TRACE		52
    141 #define WLC_E_BTA_HCI_EVENT	53
    142 #define WLC_E_IF		54
    143 #ifdef WLP2P
    144 #define WLC_E_P2P_DISC_LISTEN_COMPLETE 	55
    145 #endif
    146 #define WLC_E_RSSI		56
    147 #define WLC_E_PFN_SCAN_COMPLETE	57
    148 #define WLC_E_EXTLOG_MSG	58
    149 #define WLC_E_ACTION_FRAME      59
    150 #define WLC_E_ACTION_FRAME_COMPLETE 60
    151 #define WLC_E_PRE_ASSOC_IND	61
    152 #define WLC_E_PRE_REASSOC_IND	62
    153 #define WLC_E_CHANNEL_ADOPTED	63
    154 #define WLC_E_AP_STARTED	64
    155 #define WLC_E_DFS_AP_STOP	65
    156 #define WLC_E_DFS_AP_RESUME	66
    157 #define WLC_E_WAI_STA_EVENT	67
    158 #define WLC_E_WAI_MSG 		68
    159 #define WLC_E_ESCAN_RESULT 	69
    160 #define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 	70
    161 #if defined(WLP2P)
    162 #define WLC_E_PROBRESP_MSG	71
    163 #define WLC_E_P2P_PROBREQ_MSG	72
    164 #endif
    165 #define WLC_E_DCS_REQUEST 73
    166 
    167 #define WLC_E_FIFO_CREDIT_MAP	74
    168 
    169 #define WLC_E_ACTION_FRAME_RX	75
    170 #define WLC_E_WAKE_EVENT	76
    171 #define WLC_E_RM_COMPLETE	77
    172 #define WLC_E_HTSFSYNC		78
    173 #define WLC_E_OVERLAY_REQ	79
    174 #define WLC_E_CSA_COMPLETE_IND  80
    175 #define WLC_E_EXCESS_PM_WAKE_EVENT	81
    176 #define WLC_E_PFN_SCAN_NONE		82
    177 #define WLC_E_PFN_SCAN_ALLGONE	83
    178 #define WLC_E_LAST		84
    179 
    180 
    181 typedef struct {
    182 	uint event;
    183 	const char *name;
    184 } bcmevent_name_t;
    185 
    186 extern const bcmevent_name_t	bcmevent_names[];
    187 extern const int		bcmevent_names_size;
    188 
    189 
    190 #define WLC_E_STATUS_SUCCESS		0
    191 #define WLC_E_STATUS_FAIL		1
    192 #define WLC_E_STATUS_TIMEOUT		2
    193 #define WLC_E_STATUS_NO_NETWORKS	3
    194 #define WLC_E_STATUS_ABORT		4
    195 #define WLC_E_STATUS_NO_ACK		5
    196 #define WLC_E_STATUS_UNSOLICITED	6
    197 #define WLC_E_STATUS_ATTEMPT		7
    198 #define WLC_E_STATUS_PARTIAL		8
    199 #define WLC_E_STATUS_NEWSCAN		9
    200 #define WLC_E_STATUS_NEWASSOC		10
    201 #define WLC_E_STATUS_11HQUIET		11
    202 #define WLC_E_STATUS_SUPPRESS		12
    203 #define WLC_E_STATUS_NOCHANS		13
    204 #define WLC_E_STATUS_CS_ABORT		15
    205 #define WLC_E_STATUS_ERROR		16
    206 
    207 
    208 #define WLC_E_REASON_INITIAL_ASSOC	0
    209 #define WLC_E_REASON_LOW_RSSI		1
    210 #define WLC_E_REASON_DEAUTH		2
    211 #define WLC_E_REASON_DISASSOC		3
    212 #define WLC_E_REASON_BCNS_LOST		4
    213 #define WLC_E_REASON_MINTXRATE		9
    214 #define WLC_E_REASON_TXFAIL		10
    215 
    216 
    217 #define WLC_E_REASON_FAST_ROAM_FAILED	5
    218 #define WLC_E_REASON_DIRECTED_ROAM	6
    219 #define WLC_E_REASON_TSPEC_REJECTED	7
    220 #define WLC_E_REASON_BETTER_AP		8
    221 
    222 
    223 #define WLC_E_PRUNE_ENCR_MISMATCH	1
    224 #define WLC_E_PRUNE_BCAST_BSSID		2
    225 #define WLC_E_PRUNE_MAC_DENY		3
    226 #define WLC_E_PRUNE_MAC_NA		4
    227 #define WLC_E_PRUNE_REG_PASSV		5
    228 #define WLC_E_PRUNE_SPCT_MGMT		6
    229 #define WLC_E_PRUNE_RADAR		7
    230 #define WLC_E_RSN_MISMATCH		8
    231 #define WLC_E_PRUNE_NO_COMMON_RATES	9
    232 #define WLC_E_PRUNE_BASIC_RATES		10
    233 #define WLC_E_PRUNE_CIPHER_NA		12
    234 #define WLC_E_PRUNE_KNOWN_STA		13
    235 #define WLC_E_PRUNE_WDS_PEER		15
    236 #define WLC_E_PRUNE_QBSS_LOAD		16
    237 #define WLC_E_PRUNE_HOME_AP		17
    238 
    239 
    240 #define WLC_E_SUP_OTHER			0
    241 #define WLC_E_SUP_DECRYPT_KEY_DATA	1
    242 #define WLC_E_SUP_BAD_UCAST_WEP128	2
    243 #define WLC_E_SUP_BAD_UCAST_WEP40	3
    244 #define WLC_E_SUP_UNSUP_KEY_LEN		4
    245 #define WLC_E_SUP_PW_KEY_CIPHER		5
    246 #define WLC_E_SUP_MSG3_TOO_MANY_IE	6
    247 #define WLC_E_SUP_MSG3_IE_MISMATCH	7
    248 #define WLC_E_SUP_NO_INSTALL_FLAG	8
    249 #define WLC_E_SUP_MSG3_NO_GTK		9
    250 #define WLC_E_SUP_GRP_KEY_CIPHER	10
    251 #define WLC_E_SUP_GRP_MSG1_NO_GTK	11
    252 #define WLC_E_SUP_GTK_DECRYPT_FAIL	12
    253 #define WLC_E_SUP_SEND_FAIL		13
    254 #define WLC_E_SUP_DEAUTH		14
    255 #define WLC_E_SUP_WPA_PSK_TMO		15
    256 
    257 
    258 
    259 typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data {
    260 	uint16	version;
    261 	uint16	channel;
    262 	int32	rssi;
    263 	uint32	mactime;
    264 	uint32	rate;
    265 } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_t;
    266 
    267 #define BCM_RX_FRAME_DATA_VERSION 1
    268 
    269 
    270 typedef struct wl_event_data_if {
    271 	uint8 ifidx;
    272 	uint8 opcode;
    273 	uint8 reserved;
    274 	uint8 bssidx;
    275 	uint8 role;
    276 } wl_event_data_if_t;
    277 
    278 
    279 #define WLC_E_IF_ADD		1
    280 #define WLC_E_IF_DEL		2
    281 #define WLC_E_IF_CHANGE		3
    282 
    283 
    284 #define WLC_E_IF_ROLE_STA		0
    285 #define WLC_E_IF_ROLE_AP		1
    286 #define WLC_E_IF_ROLE_WDS		2
    287 #define WLC_E_IF_ROLE_P2P_GO		3
    288 #define WLC_E_IF_ROLE_P2P_CLIENT	4
    289 #define WLC_E_IF_ROLE_BTA_CREATOR	5
    290 #define WLC_E_IF_ROLE_BTA_ACCEPTOR	6
    291 
    292 
    293 #define WLC_E_LINK_BCN_LOSS	1
    294 #define WLC_E_LINK_DISASSOC	2
    295 #define WLC_E_LINK_ASSOC_REC	3
    296 #define WLC_E_LINK_BSSCFG_DIS	4
    297 
    298 
    299 #define WLC_E_OVL_DOWNLOAD	0
    300 #define WLC_E_OVL_UPDATE_IND	1
    301 
    302 
    303 #include <packed_section_end.h>
    304 
    305 #endif
    306