1 /* 2 * Broadcom Event protocol definitions 3 * 4 * Dependencies: bcmeth.h 5 * 6 * Portions of this code are copyright (c) 2021 Cypress Semiconductor Corporation 7 * 8 * Copyright (C) 1999-2017, Broadcom Corporation 9 * 10 * Unless you and Broadcom execute a separate written software license 11 * agreement governing use of this software, this software is licensed to you 12 * under the terms of the GNU General Public License version 2 (the "GPL"), 13 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 14 * following added to such license: 15 * 16 * As a special exception, the copyright holders of this software give you 17 * permission to link this software with independent modules, and to copy and 18 * distribute the resulting executable under terms of your choice, provided that 19 * you also meet, for each linked independent module, the terms and conditions of 20 * the license of that module. An independent module is a module which is not 21 * derived from this software. The special exception does not apply to any 22 * modifications of the software. 23 * 24 * Notwithstanding the above, under no circumstances may you combine this 25 * software in any way with any other Broadcom software provided under a license 26 * other than the GPL, without Broadcom's express prior written consent. 27 * 28 * 29 * <<Broadcom-WL-IPTag/Open:>> 30 * 31 * $Id$ 32 * 33 */ 34 35 /* 36 * Broadcom Ethernet Events protocol defines 37 * 38 */ 39 40 #ifndef _BCMEVENT_H_ 41 #define _BCMEVENT_H_ 42 43 #include <typedefs.h> 44 /* #include <ethernet.h> -- TODO: req., excluded to overwhelming coupling (break up ethernet.h) */ 45 #include <bcmeth.h> 46 #if defined(DNGL_EVENT_SUPPORT) 47 #include <dnglevent.h> 48 #endif // endif 49 50 /* This marks the start of a packed structure section. */ 51 #include <packed_section_start.h> 52 53 #define BCM_EVENT_MSG_VERSION 2 /* wl_event_msg_t struct version */ 54 #define BCM_MSG_IFNAME_MAX 16 /* max length of interface name */ 55 56 /* flags */ 57 #define WLC_EVENT_MSG_LINK 0x01 /* link is up */ 58 #define WLC_EVENT_MSG_FLUSHTXQ 0x02 /* flush tx queue on MIC error */ 59 #define WLC_EVENT_MSG_GROUP 0x04 /* group MIC error */ 60 #define WLC_EVENT_MSG_UNKBSS 0x08 /* unknown source bsscfg */ 61 #define WLC_EVENT_MSG_UNKIF 0x10 /* unknown source OS i/f */ 62 63 /* these fields are stored in network order */ 64 65 /* version 1 */ 66 typedef BWL_PRE_PACKED_STRUCT struct 67 { 68 uint16 version; 69 uint16 flags; /* see flags below */ 70 uint32 event_type; /* Message (see below) */ 71 uint32 status; /* Status code (see below) */ 72 uint32 reason; /* Reason code (if applicable) */ 73 uint32 auth_type; /* WLC_E_AUTH */ 74 uint32 datalen; /* data buf */ 75 struct ether_addr addr; /* Station address (if applicable) */ 76 char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */ 77 } BWL_POST_PACKED_STRUCT wl_event_msg_v1_t; 78 79 /* the current version */ 80 typedef BWL_PRE_PACKED_STRUCT struct 81 { 82 uint16 version; 83 uint16 flags; /* see flags below */ 84 uint32 event_type; /* Message (see below) */ 85 uint32 status; /* Status code (see below) */ 86 uint32 reason; /* Reason code (if applicable) */ 87 uint32 auth_type; /* WLC_E_AUTH */ 88 uint32 datalen; /* data buf */ 89 struct ether_addr addr; /* Station address (if applicable) */ 90 char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */ 91 uint8 ifidx; /* destination OS i/f index */ 92 uint8 bsscfgidx; /* source bsscfg index */ 93 } BWL_POST_PACKED_STRUCT wl_event_msg_t; 94 95 /* used by driver msgs */ 96 typedef BWL_PRE_PACKED_STRUCT struct bcm_event { 97 struct ether_header eth; 98 bcmeth_hdr_t bcm_hdr; 99 wl_event_msg_t event; 100 /* data portion follows */ 101 } BWL_POST_PACKED_STRUCT bcm_event_t; 102 103 /* 104 * used by host event 105 * note: if additional event types are added, it should go with is_wlc_event_frame() as well. 106 */ 107 typedef union bcm_event_msg_u { 108 wl_event_msg_t event; 109 #if defined(DNGL_EVENT_SUPPORT) 110 bcm_dngl_event_msg_t dngl_event; 111 #endif // endif 112 113 /* add new event here */ 114 } bcm_event_msg_u_t; 115 116 #define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header)) 117 118 /* Event messages */ 119 #define WLC_E_SET_SSID 0 /* indicates status of set SSID */ 120 #define WLC_E_JOIN 1 /* differentiates join IBSS from found (WLC_E_START) IBSS */ 121 #define WLC_E_START 2 /* STA founded an IBSS or AP started a BSS */ 122 #define WLC_E_AUTH 3 /* 802.11 AUTH request */ 123 #define WLC_E_AUTH_IND 4 /* 802.11 AUTH indication */ 124 #define WLC_E_DEAUTH 5 /* 802.11 DEAUTH request */ 125 #define WLC_E_DEAUTH_IND 6 /* 802.11 DEAUTH indication */ 126 #define WLC_E_ASSOC 7 /* 802.11 ASSOC request */ 127 #define WLC_E_ASSOC_IND 8 /* 802.11 ASSOC indication */ 128 #define WLC_E_REASSOC 9 /* 802.11 REASSOC request */ 129 #define WLC_E_REASSOC_IND 10 /* 802.11 REASSOC indication */ 130 #define WLC_E_DISASSOC 11 /* 802.11 DISASSOC request */ 131 #define WLC_E_DISASSOC_IND 12 /* 802.11 DISASSOC indication */ 132 #define WLC_E_QUIET_START 13 /* 802.11h Quiet period started */ 133 #define WLC_E_QUIET_END 14 /* 802.11h Quiet period ended */ 134 #define WLC_E_BEACON_RX 15 /* BEACONS received/lost indication */ 135 #define WLC_E_LINK 16 /* generic link indication */ 136 #define WLC_E_MIC_ERROR 17 /* TKIP MIC error occurred */ 137 #define WLC_E_NDIS_LINK 18 /* NDIS style link indication */ 138 #define WLC_E_ROAM 19 /* roam complete: indicate status & reason */ 139 #define WLC_E_TXFAIL 20 /* change in dot11FailedCount (txfail) */ 140 #define WLC_E_PMKID_CACHE 21 /* WPA2 pmkid cache indication */ 141 #define WLC_E_RETROGRADE_TSF 22 /* current AP's TSF value went backward */ 142 #define WLC_E_PRUNE 23 /* AP was pruned from join list for reason */ 143 #define WLC_E_AUTOAUTH 24 /* report AutoAuth table entry match for join attempt */ 144 #define WLC_E_EAPOL_MSG 25 /* Event encapsulating an EAPOL message */ 145 #define WLC_E_SCAN_COMPLETE 26 /* Scan results are ready or scan was aborted */ 146 #define WLC_E_ADDTS_IND 27 /* indicate to host addts fail/success */ 147 #define WLC_E_DELTS_IND 28 /* indicate to host delts fail/success */ 148 #define WLC_E_BCNSENT_IND 29 /* indicate to host of beacon transmit */ 149 #define WLC_E_BCNRX_MSG 30 /* Send the received beacon up to the host */ 150 #define WLC_E_BCNLOST_MSG 31 /* indicate to host loss of beacon */ 151 #define WLC_E_ROAM_PREP 32 /* before attempting to roam association */ 152 #define WLC_E_PFN_NET_FOUND 33 /* PFN network found event */ 153 #define WLC_E_PFN_NET_LOST 34 /* PFN network lost event */ 154 #define WLC_E_RESET_COMPLETE 35 155 #define WLC_E_JOIN_START 36 156 #define WLC_E_ROAM_START 37 /* roam attempt started: indicate reason */ 157 #define WLC_E_ASSOC_START 38 158 #define WLC_E_IBSS_ASSOC 39 159 #define WLC_E_RADIO 40 160 #define WLC_E_PSM_WATCHDOG 41 /* PSM microcode watchdog fired */ 161 162 #define WLC_E_PROBREQ_MSG 44 /* probe request received */ 163 #define WLC_E_SCAN_CONFIRM_IND 45 164 #define WLC_E_PSK_SUP 46 /* WPA Handshake fail */ 165 #define WLC_E_COUNTRY_CODE_CHANGED 47 166 #define WLC_E_EXCEEDED_MEDIUM_TIME 48 /* WMMAC excedded medium time */ 167 #define WLC_E_ICV_ERROR 49 /* WEP ICV error occurred */ 168 #define WLC_E_UNICAST_DECODE_ERROR 50 /* Unsupported unicast encrypted frame */ 169 #define WLC_E_MULTICAST_DECODE_ERROR 51 /* Unsupported multicast encrypted frame */ 170 #define WLC_E_TRACE 52 171 #define WLC_E_IF 54 /* I/F change (for dongle host notification) */ 172 #define WLC_E_P2P_DISC_LISTEN_COMPLETE 55 /* listen state expires */ 173 #define WLC_E_RSSI 56 /* indicate RSSI change based on configured levels */ 174 #define WLC_E_PFN_BEST_BATCHING 57 /* PFN best network batching event */ 175 #define WLC_E_EXTLOG_MSG 58 176 #define WLC_E_ACTION_FRAME 59 /* Action frame Rx */ 177 #define WLC_E_ACTION_FRAME_COMPLETE 60 /* Action frame Tx complete */ 178 #define WLC_E_PRE_ASSOC_IND 61 /* assoc request received */ 179 #define WLC_E_PRE_REASSOC_IND 62 /* re-assoc request received */ 180 #define WLC_E_CHANNEL_ADOPTED 63 181 #define WLC_E_AP_STARTED 64 /* AP started */ 182 #define WLC_E_DFS_AP_STOP 65 /* AP stopped due to DFS */ 183 #define WLC_E_DFS_AP_RESUME 66 /* AP resumed due to DFS */ 184 #define WLC_E_WAI_STA_EVENT 67 /* WAI stations event */ 185 #define WLC_E_WAI_MSG 68 /* event encapsulating an WAI message */ 186 #define WLC_E_ESCAN_RESULT 69 /* escan result event */ 187 #define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 70 /* action frame off channel complete */ 188 #define WLC_E_PROBRESP_MSG 71 /* probe response received */ 189 #define WLC_E_P2P_PROBREQ_MSG 72 /* P2P Probe request received */ 190 #define WLC_E_DCS_REQUEST 73 191 #define WLC_E_FIFO_CREDIT_MAP 74 /* credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */ 192 #define WLC_E_ACTION_FRAME_RX 75 /* Received action frame event WITH 193 * wl_event_rx_frame_data_t header 194 */ 195 #define WLC_E_WAKE_EVENT 76 /* Wake Event timer fired, used for wake WLAN test mode */ 196 #define WLC_E_RM_COMPLETE 77 /* Radio measurement complete */ 197 #define WLC_E_HTSFSYNC 78 /* Synchronize TSF with the host */ 198 #define WLC_E_OVERLAY_REQ 79 /* request an overlay IOCTL/iovar from the host */ 199 #define WLC_E_CSA_COMPLETE_IND 80 /* 802.11 CHANNEL SWITCH ACTION completed */ 200 #define WLC_E_EXCESS_PM_WAKE_EVENT 81 /* excess PM Wake Event to inform host */ 201 #define WLC_E_PFN_SCAN_NONE 82 /* no PFN networks around */ 202 /* PFN BSSID network found event, conflict/share with WLC_E_PFN_SCAN_NONE */ 203 #define WLC_E_PFN_BSSID_NET_FOUND 82 204 #define WLC_E_PFN_SCAN_ALLGONE 83 /* last found PFN network gets lost */ 205 /* PFN BSSID network lost event, conflict/share with WLC_E_PFN_SCAN_ALLGONE */ 206 #define WLC_E_PFN_BSSID_NET_LOST 83 207 #define WLC_E_GTK_PLUMBED 84 208 #define WLC_E_ASSOC_IND_NDIS 85 /* 802.11 ASSOC indication for NDIS only */ 209 #define WLC_E_REASSOC_IND_NDIS 86 /* 802.11 REASSOC indication for NDIS only */ 210 #define WLC_E_ASSOC_REQ_IE 87 211 #define WLC_E_ASSOC_RESP_IE 88 212 #define WLC_E_ASSOC_RECREATED 89 /* association recreated on resume */ 213 #define WLC_E_ACTION_FRAME_RX_NDIS 90 /* rx action frame event for NDIS only */ 214 #define WLC_E_AUTH_REQ 91 /* authentication request received */ 215 #define WLC_E_TDLS_PEER_EVENT 92 /* discovered peer, connected/disconnected peer */ 216 #define WLC_E_SPEEDY_RECREATE_FAIL 93 /* fast assoc recreation failed */ 217 #define WLC_E_NATIVE 94 /* port-specific event and payload (e.g. NDIS) */ 218 #define WLC_E_PKTDELAY_IND 95 /* event for tx pkt delay suddently jump */ 219 #define WLC_E_PSTA_PRIMARY_INTF_IND 99 /* psta primary interface indication */ 220 #define WLC_E_NAN 100 /* NAN event - Reserved for future */ 221 #define WLC_E_BEACON_FRAME_RX 101 222 #define WLC_E_SERVICE_FOUND 102 /* desired service found */ 223 #define WLC_E_GAS_FRAGMENT_RX 103 /* GAS fragment received */ 224 #define WLC_E_GAS_COMPLETE 104 /* GAS sessions all complete */ 225 #define WLC_E_P2PO_ADD_DEVICE 105 /* New device found by p2p offload */ 226 #define WLC_E_P2PO_DEL_DEVICE 106 /* device has been removed by p2p offload */ 227 #define WLC_E_WNM_STA_SLEEP 107 /* WNM event to notify STA enter sleep mode */ 228 #define WLC_E_TXFAIL_THRESH 108 /* Indication of MAC tx failures (exhaustion of 229 * 802.11 retries) exceeding threshold(s) 230 */ 231 #define WLC_E_PROXD 109 /* Proximity Detection event */ 232 #define WLC_E_IBSS_COALESCE 110 /* IBSS Coalescing */ 233 #define WLC_E_AIBSS_TXFAIL 110 /* TXFAIL event for AIBSS, re using event 110 */ 234 #define WLC_E_BSS_LOAD 114 /* Inform host of beacon bss load */ 235 #define WLC_E_MIMO_PWR_SAVE 115 /* Inform host MIMO PWR SAVE learning events */ 236 #define WLC_E_LEAKY_AP_STATS 116 /* Inform host leaky Ap stats events */ 237 #define WLC_E_ALLOW_CREDIT_BORROW 117 /* Allow or disallow wlfc credit borrowing in DHD */ 238 #define WLC_E_MSCH 120 /* Multiple channel scheduler event */ 239 #define WLC_E_CSA_START_IND 121 240 #define WLC_E_CSA_DONE_IND 122 241 #define WLC_E_CSA_FAILURE_IND 123 242 #define WLC_E_CCA_CHAN_QUAL 124 /* CCA based channel quality report */ 243 #define WLC_E_BSSID 125 /* to report change in BSSID while roaming */ 244 #define WLC_E_TX_STAT_ERROR 126 /* tx error indication */ 245 #define WLC_E_BCMC_CREDIT_SUPPORT 127 /* credit check for BCMC supported */ 246 #define WLC_E_PEER_TIMEOUT 128 /* silently drop a STA because of inactivity */ 247 #define WLC_E_BT_WIFI_HANDOVER_REQ 130 /* Handover Request Initiated */ 248 #define WLC_E_SPW_TXINHIBIT 131 /* Southpaw TxInhibit notification */ 249 #define WLC_E_FBT_AUTH_REQ_IND 132 /* FBT Authentication Request Indication */ 250 #define WLC_E_RSSI_LQM 133 /* Enhancement addition for WLC_E_RSSI */ 251 #define WLC_E_PFN_GSCAN_FULL_RESULT 134 /* Full probe/beacon (IEs etc) results */ 252 #define WLC_E_PFN_SWC 135 /* Significant change in rssi of bssids being tracked */ 253 #define WLC_E_AUTHORIZED 136 /* a STA been authroized for traffic */ 254 #define WLC_E_PROBREQ_MSG_RX 137 /* probe req with wl_event_rx_frame_data_t header */ 255 #define WLC_E_PFN_SCAN_COMPLETE 138 /* PFN completed scan of network list */ 256 #define WLC_E_RMC_EVENT 139 /* RMC Event */ 257 #define WLC_E_DPSTA_INTF_IND 140 /* DPSTA interface indication */ 258 #define WLC_E_RRM 141 /* RRM Event */ 259 #define WLC_E_PFN_SSID_EXT 142 /* SSID EXT event */ 260 #define WLC_E_ROAM_EXP_EVENT 143 /* Expanded roam event */ 261 #define WLC_E_ULP 146 /* ULP entered indication */ 262 #define WLC_E_MACDBG 147 /* Ucode debugging event */ 263 #define WLC_E_RESERVED 148 /* reserved */ 264 #define WLC_E_PRE_ASSOC_RSEP_IND 149 /* assoc resp received */ 265 #define WLC_E_PSK_AUTH 150 /* PSK AUTH WPA2-PSK 4 WAY Handshake failure */ 266 #define WLC_E_TKO 151 /* TCP keepalive offload */ 267 #define WLC_E_SDB_TRANSITION 152 /* SDB mode-switch event */ 268 #define WLC_E_NATOE_NFCT 153 /* natoe event */ 269 #define WLC_E_TEMP_THROTTLE 154 /* Temperature throttling control event */ 270 #define WLC_E_LINK_QUALITY 155 /* Link quality measurement complete */ 271 #define WLC_E_BSSTRANS_RESP 156 /* BSS Transition Response received */ 272 #define WLC_E_TWT_SETUP 157 /* TWT Setup Complete event */ 273 #define WLC_E_HE_TWT_SETUP 157 /* TODO:Remove after merging TWT changes to trunk */ 274 #define WLC_E_NAN_CRITICAL 158 /* NAN Critical Event */ 275 #define WLC_E_NAN_NON_CRITICAL 159 /* NAN Non-Critical Event */ 276 #define WLC_E_RADAR_DETECTED 160 /* Radar Detected event */ 277 #define WLC_E_RANGING_EVENT 161 /* Ranging event */ 278 #define WLC_E_INVALID_IE 162 /* Received invalid IE */ 279 #define WLC_E_MODE_SWITCH 163 /* Mode switch event */ 280 #define WLC_E_PKT_FILTER 164 /* Packet filter event */ 281 #define WLC_E_DMA_TXFLUSH_COMPLETE 165 /* TxFlush done before changing 282 * tx/rxchain 283 */ 284 #define WLC_E_FBT 166 /* FBT event */ 285 #define WLC_E_PFN_SCAN_BACKOFF 167 /* PFN SCAN Backoff event */ 286 #define WLC_E_PFN_BSSID_SCAN_BACKOFF 168 /* PFN BSSID SCAN BAckoff event */ 287 #define WLC_E_AGGR_EVENT 169 /* Aggregated event */ 288 #define WLC_E_TVPM_MITIGATION 171 /* Change in mitigation applied by TVPM */ 289 #define WLC_E_SCAN_START 172 /* Deprecated */ 290 #define WLC_E_SCAN 172 /* Scan event */ 291 #define WLC_E_MBO 173 /* MBO event */ 292 #define WLC_E_PHY_CAL 174 /* Phy calibration start indication to host */ 293 #define WLC_E_RPSNOA 175 /* Radio power save start/end indication to host */ 294 #define WLC_E_ADPS 176 /* ADPS event */ 295 #define WLC_E_SLOTTED_BSS_PEER_OP 177 /* Per peer SCB delete */ 296 #define WLC_E_HWA 178 /* HWA events */ 297 #define WLC_E_GTK_KEYROT_NO_CHANSW 179 /* Avoid Chanswitch while GTK key rotation */ 298 #define WLC_E_ONBODY_STATUS_CHANGE 180 /* Indication of onbody status change */ 299 #define WLC_E_BCNRECV_ABORTED 181 /* Fake AP bcnrecv aborted roam event */ 300 #define WLC_E_PMK_INFO 182 /* PMK,PMKID information event */ 301 #define WLC_E_BSSTRANS 183 /* BSS Transition request / Response */ 302 #define WLC_E_WA_LQM 184 /* link quality monitoring */ 303 #define WLC_E_ACTION_FRAME_OFF_CHAN_DWELL_COMPLETE 185 /* action frame off channel 304 * dwell time complete 305 */ 306 #define WLC_E_WSEC 186 /* wsec keymgmt event */ 307 308 #ifdef CONFIG_DHD_CYW43455 309 #define WLC_E_EXT_AUTH_REQ 166 /* authentication request received */ 310 #define WLC_E_EXT_AUTH_FRAME_RX 167 /* authentication request received */ 311 #else /* CONFIG_DHD_CYW43455 */ 312 #define WLC_E_EXT_AUTH_REQ 187 /* authentication request received */ 313 #define WLC_E_EXT_AUTH_FRAME_RX 188 /* authentication request received */ 314 #endif /* CONFIG_DHD_CYW43455 */ 315 #define WLC_E_MGMT_FRAME_TXSTATUS 189 /* mgmt frame Tx complete */ 316 #define WLC_E_MGMT_FRAME_OFF_CHAN_COMPLETE 190 317 #define WLC_E_IND_DOS_STATUS 191 318 #define WLC_E_LDF_HOGGER 192 /* Detection Hogger Squasher -Cambium */ 319 #define WLC_E_DLTRO 193 /* DHCP lease time renew offload */ 320 #define WLC_E_LAST 194 /* highest val + 1 for range checking */ 321 #if (WLC_E_LAST > 194) 322 #error "WLC_E_LAST: Invalid value for last event; must be <= 193." 323 #endif /* WLC_E_LAST */ 324 325 /* define an API for getting the string name of an event */ 326 extern const char *bcmevent_get_name(uint event_type); 327 extern void wl_event_to_host_order(wl_event_msg_t * evt); 328 extern void wl_event_to_network_order(wl_event_msg_t * evt); 329 330 /* validate if the event is proper and if valid copy event header to event */ 331 extern int is_wlc_event_frame(void *pktdata, uint pktlen, uint16 exp_usr_subtype, 332 bcm_event_msg_u_t *out_event); 333 334 /* conversion between host and network order for events */ 335 void wl_event_to_host_order(wl_event_msg_t * evt); 336 void wl_event_to_network_order(wl_event_msg_t * evt); 337 338 /* Event status codes */ 339 #define WLC_E_STATUS_SUCCESS 0 /* operation was successful */ 340 #define WLC_E_STATUS_FAIL 1 /* operation failed */ 341 #define WLC_E_STATUS_TIMEOUT 2 /* operation timed out */ 342 #define WLC_E_STATUS_NO_NETWORKS 3 /* failed due to no matching network found */ 343 #define WLC_E_STATUS_ABORT 4 /* operation was aborted */ 344 #define WLC_E_STATUS_NO_ACK 5 /* protocol failure: packet not ack'd */ 345 #define WLC_E_STATUS_UNSOLICITED 6 /* AUTH or ASSOC packet was unsolicited */ 346 #define WLC_E_STATUS_ATTEMPT 7 /* attempt to assoc to an auto auth configuration */ 347 #define WLC_E_STATUS_PARTIAL 8 /* scan results are incomplete */ 348 #define WLC_E_STATUS_NEWSCAN 9 /* scan aborted by another scan */ 349 #define WLC_E_STATUS_NEWASSOC 10 /* scan aborted due to assoc in progress */ 350 #define WLC_E_STATUS_11HQUIET 11 /* 802.11h quiet period started */ 351 #define WLC_E_STATUS_SUPPRESS 12 /* user disabled scanning (WLC_SET_SCANSUPPRESS) */ 352 #define WLC_E_STATUS_NOCHANS 13 /* no allowable channels to scan */ 353 #ifdef BCMCCX 354 #define WLC_E_STATUS_CCXFASTRM 14 /* scan aborted due to CCX fast roam */ 355 #endif /* BCMCCX */ 356 #define WLC_E_STATUS_CS_ABORT 15 /* abort channel select */ 357 #define WLC_E_STATUS_ERROR 16 /* request failed due to error */ 358 #define WLC_E_STATUS_SLOTTED_PEER_ADD 17 /* Slotted scb for peer addition status */ 359 #define WLC_E_STATUS_SLOTTED_PEER_DEL 18 /* Slotted scb for peer deletion status */ 360 #define WLC_E_STATUS_RXBCN 19 /* Rx Beacon event for FAKEAP feature */ 361 #define WLC_E_STATUS_INVALID 0xff /* Invalid status code to init variables. */ 362 363 /* 4-way handshake event type */ 364 #define WLC_E_PSK_AUTH_SUB_EAPOL_START 1 /* EAPOL start */ 365 #define WLC_E_PSK_AUTH_SUB_EAPOL_DONE 2 /* EAPOL end */ 366 /* GTK event type */ 367 #define WLC_E_PSK_AUTH_SUB_GTK_DONE 3 /* GTK end */ 368 369 /* 4-way handshake event status code */ 370 #define WLC_E_STATUS_PSK_AUTH_WPA_TIMOUT 1 /* operation timed out */ 371 #define WLC_E_STATUS_PSK_AUTH_MIC_WPA_ERR 2 /* MIC error */ 372 #define WLC_E_STATUS_PSK_AUTH_IE_MISMATCH_ERR 3 /* IE Missmatch error */ 373 #define WLC_E_STATUS_PSK_AUTH_REPLAY_COUNT_ERR 4 374 #define WLC_E_STATUS_PSK_AUTH_PEER_BLACKISTED 5 /* Blaclisted peer */ 375 #define WLC_E_STATUS_PSK_AUTH_GTK_REKEY_FAIL 6 /* GTK event status code */ 376 377 /* SDB transition status code */ 378 #define WLC_E_STATUS_SDB_START 1 379 #define WLC_E_STATUS_SDB_COMPLETE 2 380 /* Slice-swap status code */ 381 #define WLC_E_STATUS_SLICE_SWAP_START 3 382 #define WLC_E_STATUS_SLICE_SWAP_COMPLETE 4 383 384 /* SDB transition reason code */ 385 #define WLC_E_REASON_HOST_DIRECT 0 386 #define WLC_E_REASON_INFRA_ASSOC 1 387 #define WLC_E_REASON_INFRA_ROAM 2 388 #define WLC_E_REASON_INFRA_DISASSOC 3 389 #define WLC_E_REASON_NO_MODE_CHANGE_NEEDED 4 390 #define WLC_E_REASON_AWDL_ENABLE 5 391 #define WLC_E_REASON_AWDL_DISABLE 6 392 393 /* WLC_E_SDB_TRANSITION event data */ 394 #define WL_MAX_BSSCFG 4 395 #define WL_EVENT_SDB_TRANSITION_VER 1 396 typedef struct wl_event_sdb_data { 397 uint8 wlunit; /* Core index */ 398 uint8 is_iftype; /* Interface Type(Station, SoftAP, P2P_GO, P2P_GC */ 399 uint16 chanspec; /* Interface Channel/Chanspec */ 400 char ssidbuf[(4 * 32) + 1]; /* SSID_FMT_BUF_LEN: ((4 * DOT11_MAX_SSID_LEN) + 1) */ 401 } wl_event_sdb_data_t; 402 403 typedef struct wl_event_sdb_trans { 404 uint8 version; /* Event Data Version */ 405 uint8 rsdb_mode; 406 uint8 enable_bsscfg; 407 uint8 reserved; 408 struct wl_event_sdb_data values[WL_MAX_BSSCFG]; 409 } wl_event_sdb_trans_t; 410 411 /* reason codes for WLC_E_GTK_KEYROT_NO_CHANSW event */ 412 #define WLC_E_GTKKEYROT_SCANDELAY 0 /* Delay scan while gtk in progress */ 413 #define WLC_E_GTKKEYROT_SKIPCHANSW_AWDL 1 /* Avoid chansw by awdl while gtk in progress */ 414 #define WLC_E_GTKKEYROT_SKIPCHANSW_P2P 2 /* Avoid chansw by p2p while gtk in progress */ 415 416 /* roam reason codes */ 417 #define WLC_E_REASON_INITIAL_ASSOC 0 /* initial assoc */ 418 #define WLC_E_REASON_LOW_RSSI 1 /* roamed due to low RSSI */ 419 #define WLC_E_REASON_DEAUTH 2 /* roamed due to DEAUTH indication */ 420 #define WLC_E_REASON_DISASSOC 3 /* roamed due to DISASSOC indication */ 421 #define WLC_E_REASON_BCNS_LOST 4 /* roamed due to lost beacons */ 422 423 #define WLC_E_REASON_FAST_ROAM_FAILED 5 /* roamed due to fast roam failure */ 424 #define WLC_E_REASON_DIRECTED_ROAM 6 /* roamed due to request by AP */ 425 #define WLC_E_REASON_TSPEC_REJECTED 7 /* roamed due to TSPEC rejection */ 426 #define WLC_E_REASON_BETTER_AP 8 /* roamed due to finding better AP */ 427 #define WLC_E_REASON_MINTXRATE 9 /* roamed because at mintxrate for too long */ 428 #define WLC_E_REASON_TXFAIL 10 /* We can hear AP, but AP can't hear us */ 429 /* retained for precommit auto-merging errors; remove once all branches are synced */ 430 #define WLC_E_REASON_REQUESTED_ROAM 11 431 #define WLC_E_REASON_BSSTRANS_REQ 11 /* roamed due to BSS Transition request by AP */ 432 #define WLC_E_REASON_LOW_RSSI_CU 12 /* roamed due to low RSSI and Channel Usage */ 433 #define WLC_E_REASON_RADAR_DETECTED 13 /* roamed due to radar detection by STA */ 434 #define WLC_E_REASON_CSA 14 /* roamed due to CSA from AP */ 435 #define WLC_E_REASON_ESTM_LOW 15 /* roamed due to ESTM low tput */ 436 #define WLC_E_REASON_LAST 16 /* NOTE: increment this as you add reasons above */ 437 438 /* prune reason codes */ 439 #define WLC_E_PRUNE_ENCR_MISMATCH 1 /* encryption mismatch */ 440 #define WLC_E_PRUNE_BCAST_BSSID 2 /* AP uses a broadcast BSSID */ 441 #define WLC_E_PRUNE_MAC_DENY 3 /* STA's MAC addr is in AP's MAC deny list */ 442 #define WLC_E_PRUNE_MAC_NA 4 /* STA's MAC addr is not in AP's MAC allow list */ 443 #define WLC_E_PRUNE_REG_PASSV 5 /* AP not allowed due to regulatory restriction */ 444 #define WLC_E_PRUNE_SPCT_MGMT 6 /* AP does not support STA locale spectrum mgmt */ 445 #define WLC_E_PRUNE_RADAR 7 /* AP is on a radar channel of STA locale */ 446 #define WLC_E_RSN_MISMATCH 8 /* STA does not support AP's RSN */ 447 #define WLC_E_PRUNE_NO_COMMON_RATES 9 /* No rates in common with AP */ 448 #define WLC_E_PRUNE_BASIC_RATES 10 /* STA does not support all basic rates of BSS */ 449 #ifdef BCMCCX 450 #define WLC_E_PRUNE_CCXFAST_PREVAP 11 /* CCX FAST ROAM: prune previous AP */ 451 #endif /* def BCMCCX */ 452 #define WLC_E_PRUNE_CIPHER_NA 12 /* BSS's cipher not supported */ 453 #define WLC_E_PRUNE_KNOWN_STA 13 /* AP is already known to us as a STA */ 454 #ifdef BCMCCX 455 #define WLC_E_PRUNE_CCXFAST_DROAM 14 /* CCX FAST ROAM: prune unqualified AP */ 456 #endif /* def BCMCCX */ 457 #define WLC_E_PRUNE_WDS_PEER 15 /* AP is already known to us as a WDS peer */ 458 #define WLC_E_PRUNE_QBSS_LOAD 16 /* QBSS LOAD - AAC is too low */ 459 #define WLC_E_PRUNE_HOME_AP 17 /* prune home AP */ 460 #ifdef BCMCCX 461 #define WLC_E_PRUNE_AP_BLOCKED 18 /* prune blocked AP */ 462 #define WLC_E_PRUNE_NO_DIAG_SUPPORT 19 /* prune due to diagnostic mode not supported */ 463 #endif /* BCMCCX */ 464 #define WLC_E_PRUNE_AUTH_RESP_MAC 20 /* suppress auth resp by MAC filter */ 465 #define WLC_E_PRUNE_ASSOC_RETRY_DELAY 21 /* MBO assoc retry delay */ 466 #define WLC_E_PRUNE_RSSI_ASSOC_REJ 22 /* OCE RSSI-based assoc rejection */ 467 468 /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */ 469 #define WLC_E_SUP_OTHER 0 /* Other reason */ 470 #define WLC_E_SUP_DECRYPT_KEY_DATA 1 /* Decryption of key data failed */ 471 #define WLC_E_SUP_BAD_UCAST_WEP128 2 /* Illegal use of ucast WEP128 */ 472 #define WLC_E_SUP_BAD_UCAST_WEP40 3 /* Illegal use of ucast WEP40 */ 473 #define WLC_E_SUP_UNSUP_KEY_LEN 4 /* Unsupported key length */ 474 #define WLC_E_SUP_PW_KEY_CIPHER 5 /* Unicast cipher mismatch in pairwise key */ 475 #define WLC_E_SUP_MSG3_TOO_MANY_IE 6 /* WPA IE contains > 1 RSN IE in key msg 3 */ 476 #define WLC_E_SUP_MSG3_IE_MISMATCH 7 /* WPA IE mismatch in key message 3 */ 477 #define WLC_E_SUP_NO_INSTALL_FLAG 8 /* INSTALL flag unset in 4-way msg */ 478 #define WLC_E_SUP_MSG3_NO_GTK 9 /* encapsulated GTK missing from msg 3 */ 479 #define WLC_E_SUP_GRP_KEY_CIPHER 10 /* Multicast cipher mismatch in group key */ 480 #define WLC_E_SUP_GRP_MSG1_NO_GTK 11 /* encapsulated GTK missing from group msg 1 */ 481 #define WLC_E_SUP_GTK_DECRYPT_FAIL 12 /* GTK decrypt failure */ 482 #define WLC_E_SUP_SEND_FAIL 13 /* message send failure */ 483 #define WLC_E_SUP_DEAUTH 14 /* received FC_DEAUTH */ 484 #define WLC_E_SUP_WPA_PSK_TMO 15 /* WPA PSK 4-way handshake timeout */ 485 #define WLC_E_SUP_WPA_PSK_M1_TMO 16 /* WPA PSK 4-way handshake M1 timeout */ 486 #define WLC_E_SUP_WPA_PSK_M3_TMO 17 /* WPA PSK 4-way handshake M3 timeout */ 487 #define WLC_E_SUP_GTK_UPDATE_FAIL 18 /* GTK update failure */ 488 #define WLC_E_SUP_TK_UPDATE_FAIL 19 /* TK update failure */ 489 #define WLC_E_SUP_KEY_INSTALL_FAIL 20 /* Buffered key install failure */ 490 491 /* Ucode reason codes carried in the WLC_E_MACDBG event */ 492 #define WLC_E_MACDBG_LIST_PSM 0 /* Dump list update for PSM registers */ 493 #define WLC_E_MACDBG_LIST_PSMX 1 /* Dump list update for PSMx registers */ 494 #define WLC_E_MACDBG_REGALL 2 /* Dump all registers */ 495 496 /* Event data for events that include frames received over the air */ 497 /* WLC_E_PROBRESP_MSG 498 * WLC_E_P2P_PROBREQ_MSG 499 * WLC_E_ACTION_FRAME_RX 500 */ 501 502 #define MAX_PHY_CORE_NUM 4u 503 504 #define BCM_RX_FRAME_DATA_VERSION_2 2u 505 506 typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data_v2 { 507 uint16 version; 508 uint16 len; 509 uint16 channel; /* Matches chanspec_t format from bcmwifi_channels.h */ 510 uint16 pad; 511 int32 rssi; 512 uint32 mactime; 513 uint32 rate; 514 int8 per_core_rssi[MAX_PHY_CORE_NUM]; 515 } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_v2_t; 516 517 typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data_v1 { 518 uint16 version; 519 uint16 channel; /* Matches chanspec_t format from bcmwifi_channels.h */ 520 int32 rssi; 521 uint32 mactime; 522 uint32 rate; 523 } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_v1_t; 524 525 #define BCM_RX_FRAME_DATA_VERSION_1 1u 526 527 #ifndef WL_EVENT_RX_FRAME_DATA_ALIAS 528 #define BCM_RX_FRAME_DATA_VERSION BCM_RX_FRAME_DATA_VERSION_1 529 typedef wl_event_rx_frame_data_v1_t wl_event_rx_frame_data_t; 530 #endif // endif 531 532 /* WLC_E_IF event data */ 533 typedef struct wl_event_data_if { 534 uint8 ifidx; /* RTE virtual device index (for dongle) */ 535 uint8 opcode; /* see I/F opcode */ 536 uint8 reserved; /* bit mask (WLC_E_IF_FLAGS_XXX ) */ 537 uint8 bssidx; /* bsscfg index */ 538 uint8 role; /* see I/F role */ 539 } wl_event_data_if_t; 540 541 /* WLC_E_NATOE event data */ 542 typedef struct wl_event_data_natoe { 543 uint32 natoe_active; 544 uint32 sta_ip; 545 uint16 start_port; 546 uint16 end_port; 547 } wl_event_data_natoe_t; 548 549 /* opcode in WLC_E_IF event */ 550 #define WLC_E_IF_ADD 1 /* bsscfg add */ 551 #define WLC_E_IF_DEL 2 /* bsscfg delete */ 552 #define WLC_E_IF_CHANGE 3 /* bsscfg role change */ 553 554 /* I/F role code in WLC_E_IF event */ 555 #define WLC_E_IF_ROLE_STA 0 /* Infra STA */ 556 #define WLC_E_IF_ROLE_AP 1 /* Access Point */ 557 #define WLC_E_IF_ROLE_WDS 2 /* WDS link */ 558 #define WLC_E_IF_ROLE_P2P_GO 3 /* P2P Group Owner */ 559 #define WLC_E_IF_ROLE_P2P_CLIENT 4 /* P2P Client */ 560 #define WLC_E_IF_ROLE_IBSS 8 /* IBSS */ 561 #define WLC_E_IF_ROLE_NAN 9 /* NAN */ 562 563 /* WLC_E_RSSI event data */ 564 typedef struct wl_event_data_rssi { 565 int32 rssi; 566 int32 snr; 567 int32 noise; 568 } wl_event_data_rssi_t; 569 570 #define WL_EVENT_WA_LQM_VER 0 /* initial version */ 571 572 #define WL_EVENT_WA_LQM_BASIC 0 /* event sub-types */ 573 typedef struct { /* payload of subevent in xtlv */ 574 int32 rssi; 575 int32 snr; 576 uint32 tx_rate; 577 uint32 rx_rate; 578 } wl_event_wa_lqm_basic_t; 579 580 typedef struct wl_event_wa_lqm { 581 uint16 ver; /* version */ 582 uint16 len; /* total length structure */ 583 uint8 subevent[]; /* sub-event data in bcm_xtlv_t format */ 584 } wl_event_wa_lqm_t; 585 586 /* WLC_E_IF flag */ 587 #define WLC_E_IF_FLAGS_BSSCFG_NOIF 0x1 /* no host I/F creation needed */ 588 589 /* Reason codes for LINK */ 590 #define WLC_E_LINK_BCN_LOSS 1 /* Link down because of beacon loss */ 591 #define WLC_E_LINK_DISASSOC 2 /* Link down because of disassoc */ 592 #define WLC_E_LINK_ASSOC_REC 3 /* Link down because assoc recreate failed */ 593 #define WLC_E_LINK_BSSCFG_DIS 4 /* Link down due to bsscfg down */ 594 595 /* WLC_E_NDIS_LINK event data */ 596 typedef BWL_PRE_PACKED_STRUCT struct ndis_link_parms { 597 struct ether_addr peer_mac; /* 6 bytes */ 598 uint16 chanspec; /* 2 bytes */ 599 uint32 link_speed; /* current datarate in units of 500 Kbit/s */ 600 uint32 max_link_speed; /* max possible datarate for link in units of 500 Kbit/s */ 601 int32 rssi; /* average rssi */ 602 } BWL_POST_PACKED_STRUCT ndis_link_parms_t; 603 604 /* reason codes for WLC_E_OVERLAY_REQ event */ 605 #define WLC_E_OVL_DOWNLOAD 0 /* overlay download request */ 606 #define WLC_E_OVL_UPDATE_IND 1 /* device indication of host overlay update */ 607 608 /* reason codes for WLC_E_TDLS_PEER_EVENT event */ 609 #define WLC_E_TDLS_PEER_DISCOVERED 0 /* peer is ready to establish TDLS */ 610 #define WLC_E_TDLS_PEER_CONNECTED 1 611 #define WLC_E_TDLS_PEER_DISCONNECTED 2 612 613 /* reason codes for WLC_E_RMC_EVENT event */ 614 #define WLC_E_REASON_RMC_NONE 0 615 #define WLC_E_REASON_RMC_AR_LOST 1 616 #define WLC_E_REASON_RMC_AR_NO_ACK 2 617 618 #ifdef WLTDLS 619 /* TDLS Action Category code */ 620 #define TDLS_AF_CATEGORY 12 621 /* Wi-Fi Display (WFD) Vendor Specific Category */ 622 /* used for WFD Tunneled Probe Request and Response */ 623 #define TDLS_VENDOR_SPECIFIC 127 624 /* TDLS Action Field Values */ 625 #define TDLS_ACTION_SETUP_REQ 0 626 #define TDLS_ACTION_SETUP_RESP 1 627 #define TDLS_ACTION_SETUP_CONFIRM 2 628 #define TDLS_ACTION_TEARDOWN 3 629 #define WLAN_TDLS_SET_PROBE_WFD_IE 11 630 #define WLAN_TDLS_SET_SETUP_WFD_IE 12 631 #define WLAN_TDLS_SET_WFD_ENABLED 13 632 #define WLAN_TDLS_SET_WFD_DISABLED 14 633 #endif // endif 634 635 /* WLC_E_RANGING_EVENT subtypes */ 636 #define WLC_E_RANGING_RESULTS 0 637 638 #define PHY_CAL_EVT_VERSION 1 639 typedef struct wlc_phy_cal_info { 640 uint16 version; /* structure version */ 641 uint16 length; /* length of the rest of the structure - pad */ 642 uint16 chanspec; 643 uint8 start; 644 uint8 phase; 645 int16 temp; 646 uint8 reason; 647 uint8 pad; 648 } wlc_phy_cal_info_t; 649 650 /* GAS event data */ 651 typedef BWL_PRE_PACKED_STRUCT struct wl_event_gas { 652 uint16 channel; /* channel of GAS protocol */ 653 uint8 dialog_token; /* GAS dialog token */ 654 uint8 fragment_id; /* fragment id */ 655 uint16 status_code; /* status code on GAS completion */ 656 uint16 data_len; /* length of data to follow */ 657 uint8 data[1]; /* variable length specified by data_len */ 658 } BWL_POST_PACKED_STRUCT wl_event_gas_t; 659 660 /* service discovery TLV */ 661 typedef BWL_PRE_PACKED_STRUCT struct wl_sd_tlv { 662 uint16 length; /* length of response_data */ 663 uint8 protocol; /* service protocol type */ 664 uint8 transaction_id; /* service transaction id */ 665 uint8 status_code; /* status code */ 666 uint8 data[1]; /* response data */ 667 } BWL_POST_PACKED_STRUCT wl_sd_tlv_t; 668 669 /* service discovery event data */ 670 typedef BWL_PRE_PACKED_STRUCT struct wl_event_sd { 671 uint16 channel; /* channel */ 672 uint8 count; /* number of tlvs */ 673 wl_sd_tlv_t tlv[1]; /* service discovery TLV */ 674 } BWL_POST_PACKED_STRUCT wl_event_sd_t; 675 676 /* WLC_E_PKT_FILTER event sub-classification codes */ 677 #define WLC_E_PKT_FILTER_TIMEOUT 1 /* Matching packet not received in last timeout seconds */ 678 679 /* Note: proxd has a new API (ver 3.0) deprecates the following */ 680 681 /* Reason codes for WLC_E_PROXD */ 682 #define WLC_E_PROXD_FOUND 1 /* Found a proximity device */ 683 #define WLC_E_PROXD_GONE 2 /* Lost a proximity device */ 684 #define WLC_E_PROXD_START 3 /* used by: target */ 685 #define WLC_E_PROXD_STOP 4 /* used by: target */ 686 #define WLC_E_PROXD_COMPLETED 5 /* used by: initiator completed */ 687 #define WLC_E_PROXD_ERROR 6 /* used by both initiator and target */ 688 #define WLC_E_PROXD_COLLECT_START 7 /* used by: target & initiator */ 689 #define WLC_E_PROXD_COLLECT_STOP 8 /* used by: target */ 690 #define WLC_E_PROXD_COLLECT_COMPLETED 9 /* used by: initiator completed */ 691 #define WLC_E_PROXD_COLLECT_ERROR 10 /* used by both initiator and target */ 692 #define WLC_E_PROXD_NAN_EVENT 11 /* used by both initiator and target */ 693 #define WLC_E_PROXD_TS_RESULTS 12 /* used by: initiator completed */ 694 695 /* proxd_event data */ 696 typedef struct ftm_sample { 697 uint32 value; /* RTT in ns */ 698 int8 rssi; /* RSSI */ 699 } ftm_sample_t; 700 701 typedef struct ts_sample { 702 uint32 t1; 703 uint32 t2; 704 uint32 t3; 705 uint32 t4; 706 } ts_sample_t; 707 708 typedef BWL_PRE_PACKED_STRUCT struct proxd_event_data { 709 uint16 ver; /* version */ 710 uint16 mode; /* mode: target/initiator */ 711 uint16 method; /* method: rssi/TOF/AOA */ 712 uint8 err_code; /* error classification */ 713 uint8 TOF_type; /* one way or two way TOF */ 714 uint8 OFDM_frame_type; /* legacy or VHT */ 715 uint8 bandwidth; /* Bandwidth is 20, 40,80, MHZ */ 716 struct ether_addr peer_mac; /* (e.g for tgt:initiator's */ 717 uint32 distance; /* dst to tgt, units meter */ 718 uint32 meanrtt; /* mean delta */ 719 uint32 modertt; /* Mode delta */ 720 uint32 medianrtt; /* median RTT */ 721 uint32 sdrtt; /* Standard deviation of RTT */ 722 int32 gdcalcresult; /* Software or Hardware Kind of redundant, but if */ 723 /* frame type is VHT, then we should do it by hardware */ 724 int16 avg_rssi; /* avg rssi accroos the ftm frames */ 725 int16 validfrmcnt; /* Firmware's valid frame counts */ 726 int32 peer_router_info; /* Peer router information if available in TLV, */ 727 /* We will add this field later */ 728 int32 var1; /* average of group delay */ 729 int32 var2; /* average of threshold crossing */ 730 int32 var3; /* difference between group delay and threshold crossing */ 731 /* raw Fine Time Measurements (ftm) data */ 732 uint16 ftm_unit; /* ftm cnt resolution in picoseconds , 6250ps - default */ 733 uint16 ftm_cnt; /* num of rtd measurments/length in the ftm buffer */ 734 ftm_sample_t ftm_buff[1]; /* 1 ... ftm_cnt */ 735 } BWL_POST_PACKED_STRUCT wl_proxd_event_data_t; 736 737 typedef BWL_PRE_PACKED_STRUCT struct proxd_event_ts_results { 738 uint16 ver; /* version */ 739 uint16 mode; /* mode: target/initiator */ 740 uint16 method; /* method: rssi/TOF/AOA */ 741 uint8 err_code; /* error classification */ 742 uint8 TOF_type; /* one way or two way TOF */ 743 uint16 ts_cnt; /* number of timestamp measurements */ 744 ts_sample_t ts_buff[1]; /* Timestamps */ 745 } BWL_POST_PACKED_STRUCT wl_proxd_event_ts_results_t; 746 747 /* Video Traffic Interference Monitor Event */ 748 #define INTFER_EVENT_VERSION 1 749 #define INTFER_STREAM_TYPE_NONTCP 1 750 #define INTFER_STREAM_TYPE_TCP 2 751 #define WLINTFER_STATS_NSMPLS 4 752 typedef struct wl_intfer_event { 753 uint16 version; /* version */ 754 uint16 status; /* status */ 755 uint8 txfail_histo[WLINTFER_STATS_NSMPLS]; /* txfail histo */ 756 } wl_intfer_event_t; 757 758 #define RRM_EVENT_VERSION 0 759 typedef struct wl_rrm_event { 760 int16 version; 761 int16 len; 762 int16 cat; /* Category */ 763 int16 subevent; 764 char payload[1]; /* Measurement payload */ 765 } wl_rrm_event_t; 766 767 /* WLC_E_PSTA_PRIMARY_INTF_IND event data */ 768 typedef struct wl_psta_primary_intf_event { 769 struct ether_addr prim_ea; /* primary intf ether addr */ 770 } wl_psta_primary_intf_event_t; 771 772 /* WLC_E_DPSTA_INTF_IND event data */ 773 typedef enum { 774 WL_INTF_PSTA = 1, 775 WL_INTF_DWDS = 2 776 } wl_dpsta_intf_type; 777 778 typedef struct wl_dpsta_intf_event { 779 wl_dpsta_intf_type intf_type; /* dwds/psta intf register */ 780 } wl_dpsta_intf_event_t; 781 782 /* ********** NAN protocol events/subevents ********** */ 783 #ifndef NAN_EVENT_BUFFER_SIZE 784 #define NAN_EVENT_BUFFER_SIZE 512 /* max size */ 785 #endif /* NAN_EVENT_BUFFER_SIZE */ 786 /* NAN Events sent by firmware */ 787 788 /* 789 * If you make changes to this enum, dont forget to update the mask (if need be). 790 */ 791 typedef enum wl_nan_events { 792 WL_NAN_EVENT_START = 1, /* NAN cluster started */ 793 WL_NAN_EVENT_JOIN = 2, /* To be deprecated */ 794 WL_NAN_EVENT_ROLE = 3, /* Role changed */ 795 WL_NAN_EVENT_SCAN_COMPLETE = 4, /* To be deprecated */ 796 WL_NAN_EVENT_DISCOVERY_RESULT = 5, /* Subscribe Received */ 797 WL_NAN_EVENT_REPLIED = 6, /* Publish Sent */ 798 WL_NAN_EVENT_TERMINATED = 7, /* sub / pub is terminated */ 799 WL_NAN_EVENT_RECEIVE = 8, /* Follow up Received */ 800 WL_NAN_EVENT_STATUS_CHG = 9, /* change in nan_mac status */ 801 WL_NAN_EVENT_MERGE = 10, /* Merged to a NAN cluster */ 802 WL_NAN_EVENT_STOP = 11, /* To be deprecated */ 803 WL_NAN_EVENT_P2P = 12, /* Unused */ 804 WL_NAN_EVENT_WINDOW_BEGIN_P2P = 13, /* Unused */ 805 WL_NAN_EVENT_WINDOW_BEGIN_MESH = 14, /* Unused */ 806 WL_NAN_EVENT_WINDOW_BEGIN_IBSS = 15, /* Unused */ 807 WL_NAN_EVENT_WINDOW_BEGIN_RANGING = 16, /* Unused */ 808 WL_NAN_EVENT_POST_DISC = 17, /* Event for post discovery data */ 809 WL_NAN_EVENT_DATA_IF_ADD = 18, /* Unused */ 810 WL_NAN_EVENT_DATA_PEER_ADD = 19, /* Event for peer add */ 811 /* nan 2.0 */ 812 WL_NAN_EVENT_PEER_DATAPATH_IND = 20, /* Incoming DP req */ 813 WL_NAN_EVENT_DATAPATH_ESTB = 21, /* DP Established */ 814 WL_NAN_EVENT_SDF_RX = 22, /* SDF payload */ 815 WL_NAN_EVENT_DATAPATH_END = 23, /* DP Terminate recvd */ 816 WL_NAN_EVENT_BCN_RX = 24, /* received beacon payload */ 817 WL_NAN_EVENT_PEER_DATAPATH_RESP = 25, /* Peer's DP response */ 818 WL_NAN_EVENT_PEER_DATAPATH_CONF = 26, /* Peer's DP confirm */ 819 WL_NAN_EVENT_RNG_REQ_IND = 27, /* Range Request */ 820 WL_NAN_EVENT_RNG_RPT_IND = 28, /* Range Report */ 821 WL_NAN_EVENT_RNG_TERM_IND = 29, /* Range Termination */ 822 WL_NAN_EVENT_PEER_DATAPATH_SEC_INST = 30, /* Peer's DP sec install */ 823 WL_NAN_EVENT_TXS = 31, /* for tx status of follow-up and SDFs */ 824 WL_NAN_EVENT_DW_START = 32, /* dw start */ 825 WL_NAN_EVENT_DW_END = 33, /* dw end */ 826 WL_NAN_EVENT_CHAN_BOUNDARY = 34, /* channel switch event */ 827 WL_NAN_EVENT_MR_CHANGED = 35, /* AMR or IMR changed event during DW */ 828 WL_NAN_EVENT_RNG_RESP_IND = 36, /* Range Response Rx */ 829 WL_NAN_EVENT_PEER_SCHED_UPD_NOTIF = 37, /* Peer's schedule update notification */ 830 WL_NAN_EVENT_PEER_SCHED_REQ = 38, /* Peer's schedule request */ 831 WL_NAN_EVENT_PEER_SCHED_RESP = 39, /* Peer's schedule response */ 832 WL_NAN_EVENT_PEER_SCHED_CONF = 40, /* Peer's schedule confirm */ 833 WL_NAN_EVENT_SENT_DATAPATH_END = 41, /* Sent DP terminate frame */ 834 WL_NAN_EVENT_SLOT_START = 42, /* SLOT_START event */ 835 WL_NAN_EVENT_SLOT_END = 43, /* SLOT_END event */ 836 WL_NAN_EVENT_HOST_ASSIST_REQ = 44, /* Requesting host assist */ 837 WL_NAN_EVENT_RX_MGMT_FRM = 45, /* NAN management frame received */ 838 WL_NAN_EVENT_DISC_CACHE_TIMEOUT = 46, /* Disc cache timeout */ 839 840 WL_NAN_EVENT_INVALID /* delimiter for max value */ 841 } nan_app_events_e; 842 843 #define NAN_EV_MASK(ev) (1 << (ev - 1)) 844 #define IS_NAN_EVT_ON(var, evt) ((var & (1 << (evt-1))) != 0) 845 846 #define NAN_EV_MASK_SET(var, evt) \ 847 ((evt < WL_NAN_EVMASK_EXTN_LEN * 8) ? \ 848 ((*((uint8 *)var + ((evt - 1)/8))) |= (1 << ((evt - 1) %8))) : 0) 849 #define IS_NAN_EVENT_ON(var, evt) \ 850 ((evt < WL_NAN_EVMASK_EXTN_LEN * 8) && \ 851 (((*((uint8 *)var + ((evt - 1)/8))) & (1 << ((evt - 1) %8))) != 0)) 852 853 /* ******************* end of NAN section *************** */ 854 855 typedef enum wl_scan_events { 856 WL_SCAN_START = 1, 857 WL_SCAN_END = 2 858 } wl_scan_events; 859 860 /* WLC_E_ULP event data */ 861 #define WL_ULP_EVENT_VERSION 1 862 #define WL_ULP_DISABLE_CONSOLE 1 /* Disable console message on ULP entry */ 863 #define WL_ULP_UCODE_DOWNLOAD 2 /* Download ULP ucode file */ 864 865 typedef struct wl_ulp_event { 866 uint16 version; 867 uint16 ulp_dongle_action; 868 } wl_ulp_event_t; 869 870 /* TCP keepalive event data */ 871 typedef BWL_PRE_PACKED_STRUCT struct wl_event_tko { 872 uint8 index; /* TCP connection index, 0 to max-1 */ 873 uint8 pad[3]; /* 4-byte struct alignment */ 874 } BWL_POST_PACKED_STRUCT wl_event_tko_t; 875 876 /* DHCP lease time renew event data */ 877 typedef BWL_PRE_PACKED_STRUCT struct wl_event_dltro { 878 uint8 index; /* DLTRO connection index, 0 to max-1 */ 879 uint8 pad[3]; /* 4-byte struct alignment */ 880 } BWL_POST_PACKED_STRUCT wl_event_dltro_t; 881 882 typedef struct { 883 uint8 radar_type; /* one of RADAR_TYPE_XXX */ 884 uint16 min_pw; /* minimum pulse-width (usec * 20) */ 885 uint16 max_pw; /* maximum pulse-width (usec * 20) */ 886 uint16 min_pri; /* minimum pulse repetition interval (usec) */ 887 uint16 max_pri; /* maximum pulse repetition interval (usec) */ 888 uint16 subband; /* subband/frequency */ 889 } radar_detected_event_info_t; 890 typedef struct wl_event_radar_detect_data { 891 892 uint32 version; 893 uint16 current_chanspec; /* chanspec on which the radar is recieved */ 894 uint16 target_chanspec; /* Target chanspec after detection of radar on current_chanspec */ 895 radar_detected_event_info_t radar_info[2]; 896 } wl_event_radar_detect_data_t; 897 898 #define WL_EVENT_MODESW_VER_1 1 899 #define WL_EVENT_MODESW_VER_CURRENT WL_EVENT_MODESW_VER_1 900 901 #define WL_E_MODESW_FLAG_MASK_DEVICE 0x01u /* mask of device: belongs to local or peer */ 902 #define WL_E_MODESW_FLAG_MASK_FROM 0x02u /* mask of origin: firmware or user */ 903 #define WL_E_MODESW_FLAG_MASK_STATE 0x0Cu /* mask of state: modesw progress state */ 904 905 #define WL_E_MODESW_FLAG_DEVICE_LOCAL 0x00u /* flag - device: info is about self/local */ 906 #define WL_E_MODESW_FLAG_DEVICE_PEER 0x01u /* flag - device: info is about peer */ 907 908 #define WL_E_MODESW_FLAG_FROM_FIRMWARE 0x00u /* flag - from: request is from firmware */ 909 #define WL_E_MODESW_FLAG_FROM_USER 0x02u /* flag - from: request is from user/iov */ 910 911 #define WL_E_MODESW_FLAG_STATE_REQUESTED 0x00u /* flag - state: mode switch request */ 912 #define WL_E_MODESW_FLAG_STATE_INITIATED 0x04u /* flag - state: switch initiated */ 913 #define WL_E_MODESW_FLAG_STATE_COMPLETE 0x08u /* flag - state: switch completed/success */ 914 #define WL_E_MODESW_FLAG_STATE_FAILURE 0x0Cu /* flag - state: failed to switch */ 915 916 /* Get sizeof *X including variable data's length where X is pointer to wl_event_mode_switch_t */ 917 #define WL_E_MODESW_SIZE(X) (sizeof(*(X)) + (X)->length) 918 919 /* Get variable data's length where X is pointer to wl_event_mode_switch_t */ 920 #define WL_E_MODESW_DATA_SIZE(X) (((X)->length > sizeof(*(X))) ? ((X)->length - sizeof(*(X))) : 0) 921 922 #define WL_E_MODESW_REASON_UNKNOWN 0u /* reason: UNKNOWN */ 923 #define WL_E_MODESW_REASON_ACSD 1u /* reason: ACSD (based on events from FW */ 924 #define WL_E_MODESW_REASON_OBSS_DBS 2u /* reason: OBSS DBS (eg. on interference) */ 925 #define WL_E_MODESW_REASON_DFS 3u /* reason: DFS (eg. on subband radar) */ 926 #define WL_E_MODESW_REASON_DYN160 4u /* reason: DYN160 (160/2x2 - 80/4x4) */ 927 928 /* event structure for WLC_E_MODE_SWITCH */ 929 typedef struct { 930 uint16 version; 931 uint16 length; /* size including 'data' field */ 932 uint16 opmode_from; 933 uint16 opmode_to; 934 uint32 flags; /* bit 0: peer(/local==0); 935 * bit 1: user(/firmware==0); 936 * bits 3,2: 00==requested, 01==initiated, 937 * 10==complete, 11==failure; 938 * rest: reserved 939 */ 940 uint16 reason; /* value 0: unknown, 1: ACSD, 2: OBSS_DBS, 941 * 3: DFS, 4: DYN160, rest: reserved 942 */ 943 uint16 data_offset; /* offset to 'data' from beginning of this struct. 944 * fields may be added between data_offset and data 945 */ 946 /* ADD NEW FIELDS HERE */ 947 uint8 data[]; /* reason specific data; could be empty */ 948 } wl_event_mode_switch_t; 949 950 /* when reason in WLC_E_MODE_SWITCH is DYN160, data will carry the following structure */ 951 typedef struct { 952 uint16 trigger; /* value 0: MU to SU, 1: SU to MU, 2: metric_dyn160, 3:re-/assoc, 953 * 4: disassoc, 5: rssi, 6: traffic, 7: interference, 954 * 8: chanim_stats 955 */ 956 struct ether_addr sta_addr; /* causal STA's MAC address when known */ 957 uint16 metric_160_80; /* latest dyn160 metric */ 958 uint8 nss; /* NSS of the STA */ 959 uint8 bw; /* BW of the STA */ 960 int8 rssi; /* RSSI of the STA */ 961 uint8 traffic; /* internal metric of traffic */ 962 } wl_event_mode_switch_dyn160; 963 964 #define WL_EVENT_FBT_VER_1 1 965 966 #define WL_E_FBT_TYPE_FBT_OTD_AUTH 1 967 #define WL_E_FBT_TYPE_FBT_OTA_AUTH 2 968 969 /* event structure for WLC_E_FBT */ 970 typedef struct { 971 uint16 version; 972 uint16 length; /* size including 'data' field */ 973 uint16 type; /* value 0: unknown, 1: FBT OTD Auth Req */ 974 uint16 data_offset; /* offset to 'data' from beginning of this struct. 975 * fields may be added between data_offset and data 976 */ 977 /* ADD NEW FIELDS HERE */ 978 uint8 data[]; /* type specific data; could be empty */ 979 } wl_event_fbt_t; 980 981 /* TWT Setup Completion is designed to notify the user of TWT Setup process 982 * status. When 'status' field is value of BCME_OK, the user must check the 983 * 'setup_cmd' field value in 'wl_twt_sdesc_t' structure that at the end of 984 * the event data to see the response from the TWT Responding STA; when 985 * 'status' field is value of BCME_ERROR or non BCME_OK, user must not use 986 * anything from 'wl_twt_sdesc_t' structure as it is the TWT Requesting STA's 987 * own TWT parameter. 988 */ 989 990 #define WL_TWT_SETUP_CPLT_VER 0 991 992 /* TWT Setup Completion event data */ 993 typedef struct wl_twt_setup_cplt { 994 uint16 version; 995 uint16 length; /* the byte count of fields from 'dialog' onwards */ 996 uint8 dialog; /* the dialog token user supplied to the TWT setup API */ 997 uint8 pad[3]; 998 int32 status; 999 /* wl_twt_sdesc_t desc; - defined in wlioctl.h */ 1000 } wl_twt_setup_cplt_t; 1001 1002 #define WL_INVALID_IE_EVENT_VERSION 0 1003 1004 /* Invalid IE Event data */ 1005 typedef struct wl_invalid_ie_event { 1006 uint16 version; 1007 uint16 len; /* Length of the invalid IE copy */ 1008 uint16 type; /* Type/subtype of the frame which contains the invalid IE */ 1009 uint16 error; /* error code of the wrong IE, defined in ie_error_code_t */ 1010 uint8 ie[]; /* Variable length buffer for the invalid IE copy */ 1011 } wl_invalid_ie_event_t; 1012 1013 /* Fixed header portion of Invalid IE Event */ 1014 typedef struct wl_invalid_ie_event_hdr { 1015 uint16 version; 1016 uint16 len; /* Length of the invalid IE copy */ 1017 uint16 type; /* Type/subtype of the frame which contains the invalid IE */ 1018 uint16 error; /* error code of the wrong IE, defined in ie_error_code_t */ 1019 /* var length IE data follows */ 1020 } wl_invalid_ie_event_hdr_t; 1021 1022 typedef enum ie_error_code { 1023 IE_ERROR_OUT_OF_RANGE = 0x01 1024 } ie_error_code_t; 1025 1026 /* This marks the end of a packed structure section. */ 1027 #include <packed_section_end.h> 1028 1029 /* reason of channel switch */ 1030 typedef enum { 1031 CHANSW_DFS = 10, /* channel switch due to DFS module */ 1032 CHANSW_HOMECH_REQ = 14, /* channel switch due to HOME Channel Request */ 1033 CHANSW_STA = 15, /* channel switch due to STA */ 1034 CHANSW_SOFTAP = 16, /* channel switch due to SodtAP */ 1035 CHANSW_AIBSS = 17, /* channel switch due to AIBSS */ 1036 CHANSW_NAN = 18, /* channel switch due to NAN */ 1037 CHANSW_NAN_DISC = 19, /* channel switch due to NAN Disc */ 1038 CHANSW_NAN_SCHED = 20, /* channel switch due to NAN Sched */ 1039 CHANSW_AWDL_AW = 21, /* channel switch due to AWDL aw */ 1040 CHANSW_AWDL_SYNC = 22, /* channel switch due to AWDL sync */ 1041 CHANSW_AWDL_CAL = 23, /* channel switch due to AWDL Cal */ 1042 CHANSW_AWDL_PSF = 24, /* channel switch due to AWDL PSF */ 1043 CHANSW_AWDL_OOB_AF = 25, /* channel switch due to AWDL OOB action frame */ 1044 CHANSW_TDLS = 26, /* channel switch due to TDLS */ 1045 CHANSW_PROXD = 27, /* channel switch due to PROXD */ 1046 CHANSW_SLOTTED_BSS = 28, /* channel switch due to slotted bss */ 1047 CHANSW_SLOTTED_CMN_SYNC = 29, /* channel switch due to Common Sync Layer */ 1048 CHANSW_SLOTTED_BSS_CAL = 30, /* channel switch due to Cal request from slotted bss */ 1049 CHANSW_MAX_NUMBER = 31 /* max channel switch reason */ 1050 } wl_chansw_reason_t; 1051 1052 #define CHANSW_REASON(reason) (1 << reason) 1053 1054 #define EVENT_AGGR_DATA_HDR_LEN 8 1055 1056 typedef struct event_aggr_data { 1057 uint16 num_events; /* No of events aggregated */ 1058 uint16 len; /* length of the aggregated events, excludes padding */ 1059 uint8 pad[4]; /* Padding to make aggr event packet header aligned 1060 * on 64-bit boundary, for a 64-bit host system. 1061 */ 1062 uint8 data[]; /* Aggregate buffer containing Events */ 1063 } event_aggr_data_t; 1064 1065 /* WLC_E_TVPM_MITIGATION event structure version */ 1066 #define WL_TVPM_MITIGATION_VERSION 1 1067 1068 /* TVPM mitigation on/off status bits */ 1069 #define WL_TVPM_MITIGATION_TXDC 0x1 1070 #define WL_TVPM_MITIGATION_TXPOWER 0x2 1071 #define WL_TVPM_MITIGATION_TXCHAINS 0x4 1072 1073 /* Event structure for WLC_E_TVPM_MITIGATION */ 1074 typedef struct wl_event_tvpm_mitigation { 1075 uint16 version; /* structure version */ 1076 uint16 length; /* length of this structure */ 1077 uint32 timestamp_ms; /* millisecond timestamp */ 1078 uint8 slice; /* slice number */ 1079 uint8 pad; 1080 uint16 on_off; /* mitigation status bits */ 1081 } wl_event_tvpm_mitigation_t; 1082 1083 /* Event structures for sub health checks of PHY */ 1084 1085 #define WL_PHY_HC_DESENSE_STATS_VER (1) 1086 typedef struct wl_hc_desense_stats { 1087 uint16 version; 1088 uint16 chanspec; 1089 int8 allowed_weakest_rssi; /* based on weakest link RSSI */ 1090 uint8 ofdm_desense; /* Desense requested for OFDM */ 1091 uint8 bphy_desense; /* Desense requested for bphy */ 1092 int8 glitch_upd_wait; /* wait post ACI mitigation */ 1093 } wl_hc_desense_stats_v1_t; 1094 1095 #define WL_PHY_HC_TEMP_STATS_VER (1) 1096 typedef struct wl_hc_temp_stats { 1097 uint16 version; 1098 uint16 chanspec; 1099 int16 curtemp; /* Temperature */ 1100 uint8 temp_disthresh; /* Threshold to reduce tx chain */ 1101 uint8 temp_enthresh; /* Threshold to increase tx chains */ 1102 uint tempsense_period; /* Temperature check period */ 1103 bool heatedup; /* 1: temp throttling on */ 1104 uint8 bitmap; /* Indicating rx and tx chains */ 1105 uint8 pad[2]; 1106 } wl_hc_temp_stats_v1_t; 1107 1108 #define WL_PHY_HC_TEMP_STATS_VER_2 (2) 1109 typedef struct { 1110 uint16 version; 1111 uint16 chanspec; 1112 int16 curtemp; /* Temperature */ 1113 uint8 pad[2]; 1114 } wl_hc_temp_stats_v2_t; 1115 1116 #define WL_PHY_HC_VCOCAL_STATS_VER (1) 1117 typedef struct wl_hc_vcocal_stats { 1118 uint16 version; 1119 uint16 chanspec; 1120 int16 curtemp; /* Temperature */ 1121 /* Ring buffer - Maintains history of previous 16 wake/sleep cycles */ 1122 uint16 vcocal_status_wake; 1123 uint16 vcocal_status_sleep; 1124 uint16 plllock_status_wake; 1125 uint16 plllock_status_sleep; 1126 /* Cal Codes */ 1127 uint16 cc_maincap; 1128 uint16 cc_secondcap; 1129 uint16 cc_auxcap; 1130 } wl_hc_vcocal_stats_v1_t; 1131 1132 #define WL_PHY_HC_TXPWR_STATS_VER (1) 1133 typedef struct wl_hc_tx_stats { 1134 uint16 version; 1135 uint16 chanspec; 1136 int8 tgt_pwr[MAX_PHY_CORE_NUM]; /* Target pwr (qdBm) */ 1137 int8 estPwr[MAX_PHY_CORE_NUM]; /* Rate corrected (qdBm) */ 1138 int8 estPwr_adj[MAX_PHY_CORE_NUM]; /* Max power (qdBm) */ 1139 uint8 baseindex[MAX_PHY_CORE_NUM]; /* Tx base index */ 1140 int16 temp; /* Temperature */ 1141 uint16 TxCtrlWrd[3]; /* 6 PHY ctrl bytes */ 1142 int8 min_txpower; /* min tx power per ant */ 1143 uint8 pad[3]; 1144 } wl_hc_txpwr_stats_v1_t; 1145 1146 #define WL_PHY_HC_TXPWR_STATS_VER_2 (2) 1147 typedef struct { 1148 uint16 version; 1149 uint16 chanspec; 1150 int8 tgt_pwr[MAX_PHY_CORE_NUM]; /* Target pwr (qdBm) */ 1151 uint8 estPwr[MAX_PHY_CORE_NUM]; /* Rate corrected (qdBm) */ 1152 uint8 estPwr_adj[MAX_PHY_CORE_NUM]; /* Max power (qdBm) */ 1153 uint8 baseindex[MAX_PHY_CORE_NUM]; /* Tx base index */ 1154 int16 temp; /* Temperature */ 1155 uint16 TxCtrlWrd[3]; /* 6 PHY ctrl bytes */ 1156 int8 min_txpower; /* min tx power per ant */ 1157 uint8 pad[3]; 1158 } wl_hc_txpwr_stats_v2_t; 1159 1160 typedef enum wl_mbo_event_type { 1161 WL_MBO_E_CELLULAR_NW_SWITCH = 1, 1162 WL_MBO_E_BTM_RCVD = 2, 1163 /* ADD before this */ 1164 WL_MBO_E_LAST = 3 /* highest val + 1 for range checking */ 1165 } wl_mbo_event_type_t; 1166 1167 /* WLC_E_MBO event structure version */ 1168 #define WL_MBO_EVT_VER 1 1169 1170 struct wl_event_mbo { 1171 uint16 version; /* structure version */ 1172 uint16 length; /* length of the rest of the structure from type */ 1173 wl_mbo_event_type_t type; /* Event type */ 1174 uint8 data[]; /* Variable length data */ 1175 }; 1176 1177 /* WLC_E_MBO_CELLULAR_NW_SWITCH event structure version */ 1178 #define WL_MBO_CELLULAR_NW_SWITCH_VER 1 1179 1180 /* WLC_E_MBO_CELLULAR_NW_SWITCH event data */ 1181 struct wl_event_mbo_cell_nw_switch { 1182 uint16 version; /* structure version */ 1183 uint16 length; /* length of the rest of the structure from reason */ 1184 /* Reason of switch as per MBO Tech spec */ 1185 uint8 reason; 1186 /* pad */ 1187 uint8 pad; 1188 /* delay after which re-association can be tried to current BSS (seconds) */ 1189 uint16 reassoc_delay; 1190 /* How long current association will be there (milli seconds). 1191 * This is zero if not known or value is overflowing. 1192 */ 1193 uint32 assoc_time_remain; 1194 }; 1195 1196 /* WLC_E_MBO_BTM_RCVD event structure version */ 1197 #define WL_BTM_EVENT_DATA_VER_1 1 1198 /* Specific btm event type data */ 1199 struct wl_btm_event_type_data { 1200 uint16 version; 1201 uint16 len; 1202 uint8 transition_reason; /* transition reason code */ 1203 uint8 pad[3]; /* pad */ 1204 }; 1205 1206 /* WLC_E_PRUNE event structure version */ 1207 #define WL_BSSID_PRUNE_EVT_VER_1 1 1208 /* MBO-OCE params */ 1209 struct wl_bssid_prune_evt_info { 1210 uint16 version; 1211 uint16 len; 1212 uint8 SSID[32]; 1213 uint32 time_remaining; /* Time remaining */ 1214 struct ether_addr BSSID; 1215 uint8 SSID_len; 1216 uint8 reason; /* Reason code */ 1217 int8 rssi_threshold; /* RSSI threshold */ 1218 uint8 pad[3]; /* pad */ 1219 }; 1220 1221 /* WLC_E_HWA Event structure */ 1222 typedef struct wl_event_hwa { 1223 uint16 version; /* structure version */ 1224 uint16 length; /* length of structure */ 1225 uint32 sub_type; /* Sub event type */ 1226 uint8 data[0]; /* variable length data */ 1227 } wl_event_hwa_t; 1228 1229 #define WL_HWA_EVENT_VER 1 1230 1231 typedef enum wl_event_hwa_subtype { 1232 WL_HWA_EVENT_SUBTYPE_ERROR = 1, 1233 WL_HWA_EVENT_SUBTYPE_LAST = 2 1234 } wl_event_hwa_subtype_t; 1235 1236 /* WLC_E_ADPS status */ 1237 enum { 1238 WL_E_STATUS_ADPS_DEAUTH = 0, 1239 WL_E_STATUS_ADPS_MAX 1240 }; 1241 1242 /* WLC_E_ADPS event data */ 1243 #define WL_EVENT_ADPS_VER_1 1 1244 1245 /* WLC_E_ADPS event type */ 1246 #define WL_E_TYPE_ADPS_BAD_AP 1 1247 1248 typedef struct wl_event_adps_bad_ap { 1249 uint32 status; 1250 uint32 reason; 1251 struct ether_addr ea; /* bssid */ 1252 } wl_event_adps_bad_ap_t; 1253 1254 typedef struct wl_event_adps { 1255 uint16 version; /* structure version */ 1256 uint16 length; /* length of structure */ 1257 uint32 type; /* event type */ 1258 uint8 data[]; /* variable length data */ 1259 } wl_event_adps_v1_t; 1260 1261 typedef wl_event_adps_v1_t wl_event_adps_t; 1262 #endif /* _BCMEVENT_H_ */ 1263