1 /* 2 * Broadcom Event protocol definitions 3 * 4 * Copyright (C) 1999-2012, 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 326276 2012-04-06 23:16:42Z $ 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 #ifdef WLBTAMP 142 #define WLC_E_BTA_HCI_EVENT 53 143 #endif 144 #define WLC_E_IF 54 145 #define WLC_E_P2P_DISC_LISTEN_COMPLETE 55 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 #define WLC_E_PROBRESP_MSG 71 162 #define WLC_E_P2P_PROBREQ_MSG 72 163 #define WLC_E_DCS_REQUEST 73 164 165 #define WLC_E_FIFO_CREDIT_MAP 74 166 167 #define WLC_E_ACTION_FRAME_RX 75 168 #define WLC_E_WAKE_EVENT 76 169 #define WLC_E_RM_COMPLETE 77 170 #define WLC_E_HTSFSYNC 78 171 #define WLC_E_OVERLAY_REQ 79 172 #define WLC_E_CSA_COMPLETE_IND 80 173 #define WLC_E_EXCESS_PM_WAKE_EVENT 81 174 #define WLC_E_PFN_SCAN_NONE 82 175 #define WLC_E_PFN_SCAN_ALLGONE 83 176 #define WLC_E_GTK_PLUMBED 84 177 #define WLC_E_ASSOC_IND_NDIS 85 178 #define WLC_E_REASSOC_IND_NDIS 86 179 #define WLC_E_ASSOC_REQ_IE 87 180 #define WLC_E_ASSOC_RESP_IE 88 181 #define WLC_E_ASSOC_RECREATED 89 182 #define WLC_E_ACTION_FRAME_RX_NDIS 90 183 #define WLC_E_AUTH_REQ 91 184 #define WLC_E_TDLS_PEER_EVENT 92 185 #define WLC_E_SPEEDY_RECREATE_FAIL 93 186 #define WLC_E_LAST 94 187 188 189 190 typedef struct { 191 uint event; 192 const char *name; 193 } bcmevent_name_t; 194 195 extern const bcmevent_name_t bcmevent_names[]; 196 extern const int bcmevent_names_size; 197 198 199 #define WLC_E_STATUS_SUCCESS 0 200 #define WLC_E_STATUS_FAIL 1 201 #define WLC_E_STATUS_TIMEOUT 2 202 #define WLC_E_STATUS_NO_NETWORKS 3 203 #define WLC_E_STATUS_ABORT 4 204 #define WLC_E_STATUS_NO_ACK 5 205 #define WLC_E_STATUS_UNSOLICITED 6 206 #define WLC_E_STATUS_ATTEMPT 7 207 #define WLC_E_STATUS_PARTIAL 8 208 #define WLC_E_STATUS_NEWSCAN 9 209 #define WLC_E_STATUS_NEWASSOC 10 210 #define WLC_E_STATUS_11HQUIET 11 211 #define WLC_E_STATUS_SUPPRESS 12 212 #define WLC_E_STATUS_NOCHANS 13 213 #define WLC_E_STATUS_CS_ABORT 15 214 #define WLC_E_STATUS_ERROR 16 215 216 217 #define WLC_E_REASON_INITIAL_ASSOC 0 218 #define WLC_E_REASON_LOW_RSSI 1 219 #define WLC_E_REASON_DEAUTH 2 220 #define WLC_E_REASON_DISASSOC 3 221 #define WLC_E_REASON_BCNS_LOST 4 222 #define WLC_E_REASON_MINTXRATE 9 223 #define WLC_E_REASON_TXFAIL 10 224 225 226 #define WLC_E_REASON_FAST_ROAM_FAILED 5 227 #define WLC_E_REASON_DIRECTED_ROAM 6 228 #define WLC_E_REASON_TSPEC_REJECTED 7 229 #define WLC_E_REASON_BETTER_AP 8 230 231 232 #define WLC_E_REASON_REQUESTED_ROAM 11 233 234 #define WLC_E_PRUNE_ENCR_MISMATCH 1 235 #define WLC_E_PRUNE_BCAST_BSSID 2 236 #define WLC_E_PRUNE_MAC_DENY 3 237 #define WLC_E_PRUNE_MAC_NA 4 238 #define WLC_E_PRUNE_REG_PASSV 5 239 #define WLC_E_PRUNE_SPCT_MGMT 6 240 #define WLC_E_PRUNE_RADAR 7 241 #define WLC_E_RSN_MISMATCH 8 242 #define WLC_E_PRUNE_NO_COMMON_RATES 9 243 #define WLC_E_PRUNE_BASIC_RATES 10 244 #define WLC_E_PRUNE_CIPHER_NA 12 245 #define WLC_E_PRUNE_KNOWN_STA 13 246 #define WLC_E_PRUNE_WDS_PEER 15 247 #define WLC_E_PRUNE_QBSS_LOAD 16 248 #define WLC_E_PRUNE_HOME_AP 17 249 250 251 #define WLC_E_SUP_OTHER 0 252 #define WLC_E_SUP_DECRYPT_KEY_DATA 1 253 #define WLC_E_SUP_BAD_UCAST_WEP128 2 254 #define WLC_E_SUP_BAD_UCAST_WEP40 3 255 #define WLC_E_SUP_UNSUP_KEY_LEN 4 256 #define WLC_E_SUP_PW_KEY_CIPHER 5 257 #define WLC_E_SUP_MSG3_TOO_MANY_IE 6 258 #define WLC_E_SUP_MSG3_IE_MISMATCH 7 259 #define WLC_E_SUP_NO_INSTALL_FLAG 8 260 #define WLC_E_SUP_MSG3_NO_GTK 9 261 #define WLC_E_SUP_GRP_KEY_CIPHER 10 262 #define WLC_E_SUP_GRP_MSG1_NO_GTK 11 263 #define WLC_E_SUP_GTK_DECRYPT_FAIL 12 264 #define WLC_E_SUP_SEND_FAIL 13 265 #define WLC_E_SUP_DEAUTH 14 266 #define WLC_E_SUP_WPA_PSK_TMO 15 267 268 269 270 typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data { 271 uint16 version; 272 uint16 channel; 273 int32 rssi; 274 uint32 mactime; 275 uint32 rate; 276 } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_t; 277 278 #define BCM_RX_FRAME_DATA_VERSION 1 279 280 281 typedef struct wl_event_data_if { 282 uint8 ifidx; 283 uint8 opcode; 284 uint8 reserved; 285 uint8 bssidx; 286 uint8 role; 287 } wl_event_data_if_t; 288 289 290 #define WLC_E_IF_ADD 1 291 #define WLC_E_IF_DEL 2 292 #define WLC_E_IF_CHANGE 3 293 294 295 #define WLC_E_IF_ROLE_STA 0 296 #define WLC_E_IF_ROLE_AP 1 297 #define WLC_E_IF_ROLE_WDS 2 298 #define WLC_E_IF_ROLE_P2P_GO 3 299 #define WLC_E_IF_ROLE_P2P_CLIENT 4 300 #ifdef WLBTAMP 301 #define WLC_E_IF_ROLE_BTA_CREATOR 5 302 #define WLC_E_IF_ROLE_BTA_ACCEPTOR 6 303 #endif 304 305 306 #define WLC_E_LINK_BCN_LOSS 1 307 #define WLC_E_LINK_DISASSOC 2 308 #define WLC_E_LINK_ASSOC_REC 3 309 #define WLC_E_LINK_BSSCFG_DIS 4 310 311 312 #define WLC_E_OVL_DOWNLOAD 0 313 #define WLC_E_OVL_UPDATE_IND 1 314 315 316 #define WLC_E_TDLS_PEER_DISCOVERED 0 317 #define WLC_E_TDLS_PEER_CONNECTED 1 318 #define WLC_E_TDLS_PEER_DISCONNECTED 2 319 320 #include <packed_section_end.h> 321 322 #endif 323