Broadcom SDK and wireless driver: another attempt to update to ver. 5.10.147.0
[tomato.git] / release / src-rt / include / proto / bcmevent.h
blob9373a569954883076441e2420cecfb1afa334f09
1 /*
2 * Broadcom Event protocol definitions
4 * Copyright (C) 2009, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
12 * Dependencies: proto/bcmeth.h
14 * $Id: bcmevent.h,v 9.35.2.6 2009/08/10 07:58:32 Exp $
19 * Broadcom Ethernet Events protocol defines
23 #ifndef _BCMEVENT_H_
24 #define _BCMEVENT_H_
26 /* enable structure packing */
27 #if defined(__GNUC__)
28 #define PACKED __attribute__((packed))
29 #else
30 #pragma pack(1)
31 #define PACKED
32 #endif /* defined(__GNUC__) */
34 #define BCM_EVENT_MSG_VERSION 1 /* wl_event_msg_t struct version */
35 #define BCM_MSG_IFNAME_MAX 16 /* max length of interface name */
37 /* flags */
38 #define WLC_EVENT_MSG_LINK 0x01 /* link is up */
39 #define WLC_EVENT_MSG_FLUSHTXQ 0x02 /* flush tx queue on MIC error */
40 #define WLC_EVENT_MSG_GROUP 0x04 /* group MIC error */
42 /* these fields are stored in network order */
43 typedef struct
45 uint16 version;
46 uint16 flags; /* see flags below */
47 uint32 event_type; /* Message (see below) */
48 uint32 status; /* Status code (see below) */
49 uint32 reason; /* Reason code (if applicable) */
50 uint32 auth_type; /* WLC_E_AUTH */
51 uint32 datalen; /* data buf */
52 struct ether_addr addr; /* Station address (if applicable) */
53 char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
54 } PACKED wl_event_msg_t;
56 /* used by driver msgs */
57 typedef struct bcm_event {
58 struct ether_header eth;
59 bcmeth_hdr_t bcm_hdr;
60 wl_event_msg_t event;
61 /* data portion follows */
62 } PACKED bcm_event_t;
64 #define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
66 /* Event messages */
67 #define WLC_E_SET_SSID 0 /* indicates status of set SSID */
68 #define WLC_E_JOIN 1 /* differentiates join IBSS from found (WLC_E_START) IBSS */
69 #define WLC_E_START 2 /* STA founded an IBSS or AP started a BSS */
70 #define WLC_E_AUTH 3 /* 802.11 AUTH request */
71 #define WLC_E_AUTH_IND 4 /* 802.11 AUTH indication */
72 #define WLC_E_DEAUTH 5 /* 802.11 DEAUTH request */
73 #define WLC_E_DEAUTH_IND 6 /* 802.11 DEAUTH indication */
74 #define WLC_E_ASSOC 7 /* 802.11 ASSOC request */
75 #define WLC_E_ASSOC_IND 8 /* 802.11 ASSOC indication */
76 #define WLC_E_REASSOC 9 /* 802.11 REASSOC request */
77 #define WLC_E_REASSOC_IND 10 /* 802.11 REASSOC indication */
78 #define WLC_E_DISASSOC 11 /* 802.11 DISASSOC request */
79 #define WLC_E_DISASSOC_IND 12 /* 802.11 DISASSOC indication */
80 #define WLC_E_QUIET_START 13 /* 802.11h Quiet period started */
81 #define WLC_E_QUIET_END 14 /* 802.11h Quiet period ended */
82 #define WLC_E_BEACON_RX 15 /* BEACONS received/lost indication */
83 #define WLC_E_LINK 16 /* generic link indication */
84 #define WLC_E_MIC_ERROR 17 /* TKIP MIC error occurred */
85 #define WLC_E_NDIS_LINK 18 /* NDIS style link indication */
86 #define WLC_E_ROAM 19 /* roam attempt occurred: indicate status & reason */
87 #define WLC_E_TXFAIL 20 /* change in dot11FailedCount (txfail) */
88 #define WLC_E_PMKID_CACHE 21 /* WPA2 pmkid cache indication */
89 #define WLC_E_RETROGRADE_TSF 22 /* current AP's TSF value went backward */
90 #define WLC_E_PRUNE 23 /* AP was pruned from join list for reason */
91 #define WLC_E_AUTOAUTH 24 /* report AutoAuth table entry match for join attempt */
92 #define WLC_E_EAPOL_MSG 25 /* Event encapsulating an EAPOL message */
93 #define WLC_E_SCAN_COMPLETE 26 /* Scan results are ready or scan was aborted */
94 #define WLC_E_ADDTS_IND 27 /* indicate to host addts fail/success */
95 #define WLC_E_DELTS_IND 28 /* indicate to host delts fail/success */
96 #define WLC_E_BCNSENT_IND 29 /* indicate to host of beacon transmit */
97 #define WLC_E_BCNRX_MSG 30 /* Send the received beacon up to the host */
98 #define WLC_E_BCNLOST_MSG 31 /* indicate to host loss of beacon */
99 #define WLC_E_ROAM_PREP 32 /* before attempting to roam */
100 #define WLC_E_PFN_NET_FOUND 33 /* PFN network found event */
101 #define WLC_E_PFN_NET_LOST 34 /* PFN network lost event */
102 #define WLC_E_RESET_COMPLETE 35
103 #define WLC_E_JOIN_START 36
104 #define WLC_E_ROAM_START 37
105 #define WLC_E_ASSOC_START 38
106 #define WLC_E_IBSS_ASSOC 39
107 #define WLC_E_RADIO 40
108 #define WLC_E_PSM_WATCHDOG 41 /* PSM microcode watchdog fired */
109 #define WLC_E_PROBREQ_MSG 44 /* probe request received */
110 #define WLC_E_SCAN_CONFIRM_IND 45
111 #define WLC_E_PSK_SUP 46 /* WPA Handshake fail */
112 #define WLC_E_COUNTRY_CODE_CHANGED 47
113 #define WLC_E_EXCEEDED_MEDIUM_TIME 48 /* WMMAC excedded medium time */
114 #define WLC_E_ICV_ERROR 49 /* WEP ICV error occurred */
115 #define WLC_E_UNICAST_DECODE_ERROR 50 /* Unsupported unicast encrypted frame */
116 #define WLC_E_MULTICAST_DECODE_ERROR 51 /* Unsupported multicast encrypted frame */
117 #define WLC_E_EXTLOG_MSG 52
118 #define WLC_E_LAST 55 /* highest val + 1 for range checking */
121 /* Event status codes */
122 #define WLC_E_STATUS_SUCCESS 0 /* operation was successful */
123 #define WLC_E_STATUS_FAIL 1 /* operation failed */
124 #define WLC_E_STATUS_TIMEOUT 2 /* operation timed out */
125 #define WLC_E_STATUS_NO_NETWORKS 3 /* failed due to no matching network found */
126 #define WLC_E_STATUS_ABORT 4 /* operation was aborted */
127 #define WLC_E_STATUS_NO_ACK 5 /* protocol failure: packet not ack'd */
128 #define WLC_E_STATUS_UNSOLICITED 6 /* AUTH or ASSOC packet was unsolicited */
129 #define WLC_E_STATUS_ATTEMPT 7 /* attempt to assoc to an auto auth configuration */
130 #define WLC_E_STATUS_PARTIAL 8 /* scan results are incomplete */
131 #define WLC_E_STATUS_NEWSCAN 9 /* scan aborted by another scan */
132 #define WLC_E_STATUS_NEWASSOC 10 /* scan aborted due to assoc in progress */
133 #define WLC_E_STATUS_11HQUIET 11 /* 802.11h quiet period started */
134 #define WLC_E_STATUS_SUPPRESS 12 /* user disabled scanning (WLC_SET_SCANSUPPRESS) */
135 #define WLC_E_STATUS_NOCHANS 13 /* no allowable channels to scan */
137 /* roam reason codes */
138 #define WLC_E_REASON_INITIAL_ASSOC 0 /* initial assoc */
139 #define WLC_E_REASON_LOW_RSSI 1 /* roamed due to low RSSI */
140 #define WLC_E_REASON_DEAUTH 2 /* roamed due to DEAUTH indication */
141 #define WLC_E_REASON_DISASSOC 3 /* roamed due to DISASSOC indication */
142 #define WLC_E_REASON_BCNS_LOST 4 /* roamed due to lost beacons */
143 #define WLC_E_REASON_MINTXRATE 9 /* roamed because at mintxrate for too long */
144 #define WLC_E_REASON_TXFAIL 10 /* We can hear AP, but AP can't hear us */
146 /* Roam codes used primarily by CCX */
147 #define WLC_E_REASON_FAST_ROAM_FAILED 5 /* roamed due to fast roam failure */
148 #define WLC_E_REASON_DIRECTED_ROAM 6 /* roamed due to request by AP */
149 #define WLC_E_REASON_TSPEC_REJECTED 7 /* roamed due to TSPEC rejection */
150 #define WLC_E_REASON_BETTER_AP 8 /* roamed due to finding better AP */
152 /* prune reason codes */
153 #define WLC_E_PRUNE_ENCR_MISMATCH 1 /* encryption mismatch */
154 #define WLC_E_PRUNE_BCAST_BSSID 2 /* AP uses a broadcast BSSID */
155 #define WLC_E_PRUNE_MAC_DENY 3 /* STA's MAC addr is in AP's MAC deny list */
156 #define WLC_E_PRUNE_MAC_NA 4 /* STA's MAC addr is not in AP's MAC allow list */
157 #define WLC_E_PRUNE_REG_PASSV 5 /* AP not allowed due to regulatory restriction */
158 #define WLC_E_PRUNE_SPCT_MGMT 6 /* AP does not support STA locale spectrum mgmt */
159 #define WLC_E_PRUNE_RADAR 7 /* AP is on a radar channel of STA locale */
160 #define WLC_E_RSN_MISMATCH 8 /* STA does not support AP's RSN */
161 #define WLC_E_PRUNE_NO_COMMON_RATES 9 /* No rates in common with AP */
162 #define WLC_E_PRUNE_BASIC_RATES 10 /* STA does not support all basic rates of BSS */
163 #define WLC_E_PRUNE_CIPHER_NA 12 /* BSS's cipher not supported */
164 #define WLC_E_PRUNE_KNOWN_STA 13 /* AP is already known to us as a STA */
165 #define WLC_E_PRUNE_WDS_PEER 15 /* AP is already known to us as a WDS peer */
166 #define WLC_E_PRUNE_QBSS_LOAD 16 /* QBSS LOAD - AAC is too low */
167 #define WLC_E_PRUNE_HOME_AP 17 /* prune home AP */
169 /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
170 #define WLC_E_SUP_OTHER 0 /* Other reason */
171 #define WLC_E_SUP_DECRYPT_KEY_DATA 1 /* Decryption of key data failed */
172 #define WLC_E_SUP_BAD_UCAST_WEP128 2 /* Illegal use of ucast WEP128 */
173 #define WLC_E_SUP_BAD_UCAST_WEP40 3 /* Illegal use of ucast WEP40 */
174 #define WLC_E_SUP_UNSUP_KEY_LEN 4 /* Unsupported key length */
175 #define WLC_E_SUP_PW_KEY_CIPHER 5 /* Unicast cipher mismatch in pairwise key */
176 #define WLC_E_SUP_MSG3_TOO_MANY_IE 6 /* WPA IE contains > 1 RSN IE in key msg 3 */
177 #define WLC_E_SUP_MSG3_IE_MISMATCH 7 /* WPA IE mismatch in key message 3 */
178 #define WLC_E_SUP_NO_INSTALL_FLAG 8 /* INSTALL flag unset in 4-way msg */
179 #define WLC_E_SUP_MSG3_NO_GTK 9 /* encapsulated GTK missing from msg 3 */
180 #define WLC_E_SUP_GRP_KEY_CIPHER 10 /* Multicast cipher mismatch in group key */
181 #define WLC_E_SUP_GRP_MSG1_NO_GTK 11 /* encapsulated GTK missing from group msg 1 */
182 #define WLC_E_SUP_GTK_DECRYPT_FAIL 12 /* GTK decrypt failure */
183 #define WLC_E_SUP_SEND_FAIL 13 /* message send failure */
184 #define WLC_E_SUP_DEAUTH 14 /* received FC_DEAUTH */
186 /* Reason codes for LINK */
187 #define WLC_E_LINK_BCN_LOSS 1 /* Link down because of beacon loss */
188 #define WLC_E_LINK_DISASSOC 2 /* Link down because of disassoc */
189 #define WLC_E_LINK_ASSOC_REC 3 /* Link down because assoc recreate failed */
190 #define WLC_E_LINK_BSSCFG_DIS 4 /* Link down due to bsscfg down */
192 #undef PACKED
193 #if !defined(__GNUC__)
194 #pragma pack()
195 #endif /* PACKED */
197 #endif /* _BCMEVENT_H_ */