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