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