2 * Broadcom Event protocol definitions
4 * $Copyright Open Broadcom Corporation$
6 * Dependencies: proto/bcmeth.h
8 * $Id: bcmevent.h 490387 2014-07-10 15:12:52Z $
13 * Broadcom Ethernet Events protocol defines
23 /* #include <ethernet.h> -- TODO: req., excluded to overwhelming coupling (break up ethernet.h) */
24 #include <proto/bcmeth.h>
26 /* This marks the start of a packed structure section. */
27 #include <packed_section_start.h>
29 #define BCM_EVENT_MSG_VERSION 2 /* wl_event_msg_t struct version */
30 #define BCM_MSG_IFNAME_MAX 16 /* max length of interface name */
33 #define WLC_EVENT_MSG_LINK 0x01 /* link is up */
34 #define WLC_EVENT_MSG_FLUSHTXQ 0x02 /* flush tx queue on MIC error */
35 #define WLC_EVENT_MSG_GROUP 0x04 /* group MIC error */
36 #define WLC_EVENT_MSG_UNKBSS 0x08 /* unknown source bsscfg */
37 #define WLC_EVENT_MSG_UNKIF 0x10 /* unknown source OS i/f */
39 /* these fields are stored in network order */
42 typedef BWL_PRE_PACKED_STRUCT struct
45 uint16 flags; /* see flags below */
46 uint32 event_type; /* Message (see below) */
47 uint32 status; /* Status code (see below) */
48 uint32 reason; /* Reason code (if applicable) */
49 uint32 auth_type; /* WLC_E_AUTH */
50 uint32 datalen; /* data buf */
51 struct ether_addr addr; /* Station address (if applicable) */
52 char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
53 } BWL_POST_PACKED_STRUCT wl_event_msg_v1_t;
55 /* the current version */
56 typedef BWL_PRE_PACKED_STRUCT struct
59 uint16 flags; /* see flags below */
60 uint32 event_type; /* Message (see below) */
61 uint32 status; /* Status code (see below) */
62 uint32 reason; /* Reason code (if applicable) */
63 uint32 auth_type; /* WLC_E_AUTH */
64 uint32 datalen; /* data buf */
65 struct ether_addr addr; /* Station address (if applicable) */
66 char ifname[BCM_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
67 uint8 ifidx; /* destination OS i/f index */
68 uint8 bsscfgidx; /* source bsscfg index */
69 } BWL_POST_PACKED_STRUCT wl_event_msg_t;
71 /* used by driver msgs */
72 typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
73 struct ether_header eth;
76 /* data portion follows */
77 } BWL_POST_PACKED_STRUCT bcm_event_t;
79 #define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - sizeof(struct ether_header))
82 #define WLC_E_SET_SSID 0 /* indicates status of set SSID */
83 #define WLC_E_JOIN 1 /* differentiates join IBSS from found (WLC_E_START) IBSS */
84 #define WLC_E_START 2 /* STA founded an IBSS or AP started a BSS */
85 #define WLC_E_AUTH 3 /* 802.11 AUTH request */
86 #define WLC_E_AUTH_IND 4 /* 802.11 AUTH indication */
87 #define WLC_E_DEAUTH 5 /* 802.11 DEAUTH request */
88 #define WLC_E_DEAUTH_IND 6 /* 802.11 DEAUTH indication */
89 #define WLC_E_ASSOC 7 /* 802.11 ASSOC request */
90 #define WLC_E_ASSOC_IND 8 /* 802.11 ASSOC indication */
91 #define WLC_E_REASSOC 9 /* 802.11 REASSOC request */
92 #define WLC_E_REASSOC_IND 10 /* 802.11 REASSOC indication */
93 #define WLC_E_DISASSOC 11 /* 802.11 DISASSOC request */
94 #define WLC_E_DISASSOC_IND 12 /* 802.11 DISASSOC indication */
95 #define WLC_E_QUIET_START 13 /* 802.11h Quiet period started */
96 #define WLC_E_QUIET_END 14 /* 802.11h Quiet period ended */
97 #define WLC_E_BEACON_RX 15 /* BEACONS received/lost indication */
98 #define WLC_E_LINK 16 /* generic link indication */
99 #define WLC_E_MIC_ERROR 17 /* TKIP MIC error occurred */
100 #define WLC_E_NDIS_LINK 18 /* NDIS style link indication */
101 #define WLC_E_ROAM 19 /* roam attempt occurred: indicate status & reason */
102 #define WLC_E_TXFAIL 20 /* change in dot11FailedCount (txfail) */
103 #define WLC_E_PMKID_CACHE 21 /* WPA2 pmkid cache indication */
104 #define WLC_E_RETROGRADE_TSF 22 /* current AP's TSF value went backward */
105 #define WLC_E_PRUNE 23 /* AP was pruned from join list for reason */
106 #define WLC_E_AUTOAUTH 24 /* report AutoAuth table entry match for join attempt */
107 #define WLC_E_EAPOL_MSG 25 /* Event encapsulating an EAPOL message */
108 #define WLC_E_SCAN_COMPLETE 26 /* Scan results are ready or scan was aborted */
109 #define WLC_E_ADDTS_IND 27 /* indicate to host addts fail/success */
110 #define WLC_E_DELTS_IND 28 /* indicate to host delts fail/success */
111 #define WLC_E_BCNSENT_IND 29 /* indicate to host of beacon transmit */
112 #define WLC_E_BCNRX_MSG 30 /* Send the received beacon up to the host */
113 #define WLC_E_BCNLOST_MSG 31 /* indicate to host loss of beacon */
114 #define WLC_E_ROAM_PREP 32 /* before attempting to roam */
115 #define WLC_E_PFN_NET_FOUND 33 /* PFN network found event */
116 #define WLC_E_PFN_NET_LOST 34 /* PFN network lost event */
117 #define WLC_E_RESET_COMPLETE 35
118 #define WLC_E_JOIN_START 36
119 #define WLC_E_ROAM_START 37
120 #define WLC_E_ASSOC_START 38
121 #define WLC_E_IBSS_ASSOC 39
122 #define WLC_E_RADIO 40
123 #define WLC_E_PSM_WATCHDOG 41 /* PSM microcode watchdog fired */
124 #if defined(BCMCCX) && defined(CCX_SDK)
125 #define WLC_E_CCX_ASSOC_START 42 /* CCX association start */
126 #define WLC_E_CCX_ASSOC_ABORT 43 /* CCX association abort */
127 #endif /* BCMCCX && CCX_SDK */
128 #define WLC_E_PROBREQ_MSG 44 /* probe request received */
129 #define WLC_E_SCAN_CONFIRM_IND 45
130 #define WLC_E_PSK_SUP 46 /* WPA Handshake fail */
131 #define WLC_E_COUNTRY_CODE_CHANGED 47
132 #define WLC_E_EXCEEDED_MEDIUM_TIME 48 /* WMMAC excedded medium time */
133 #define WLC_E_ICV_ERROR 49 /* WEP ICV error occurred */
134 #define WLC_E_UNICAST_DECODE_ERROR 50 /* Unsupported unicast encrypted frame */
135 #define WLC_E_MULTICAST_DECODE_ERROR 51 /* Unsupported multicast encrypted frame */
136 #define WLC_E_TRACE 52
138 #define WLC_E_BTA_HCI_EVENT 53 /* BT-AMP HCI event */
140 #define WLC_E_IF 54 /* I/F change (for dongle host notification) */
141 #define WLC_E_P2P_DISC_LISTEN_COMPLETE 55 /* listen state expires */
142 #define WLC_E_RSSI 56 /* indicate RSSI change based on configured levels */
143 #define WLC_E_PFN_SCAN_COMPLETE 57 /* PFN completed scan of network list */
144 /* PFN best network batching event, re-use obsolete WLC_E_PFN_SCAN_COMPLETE */
145 #define WLC_E_PFN_BEST_BATCHING 57
146 #define WLC_E_EXTLOG_MSG 58
147 #define WLC_E_ACTION_FRAME 59 /* Action frame Rx */
148 #define WLC_E_ACTION_FRAME_COMPLETE 60 /* Action frame Tx complete */
149 #define WLC_E_PRE_ASSOC_IND 61 /* assoc request received */
150 #define WLC_E_PRE_REASSOC_IND 62 /* re-assoc request received */
151 #define WLC_E_CHANNEL_ADOPTED 63
152 #define WLC_E_AP_STARTED 64 /* AP started */
153 #define WLC_E_DFS_AP_STOP 65 /* AP stopped due to DFS */
154 #define WLC_E_DFS_AP_RESUME 66 /* AP resumed due to DFS */
155 #define WLC_E_WAI_STA_EVENT 67 /* WAI stations event */
156 #define WLC_E_WAI_MSG 68 /* event encapsulating an WAI message */
157 #define WLC_E_ESCAN_RESULT 69 /* escan result event */
158 #define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 70 /* action frame off channel complete */
159 #define WLC_E_PROBRESP_MSG 71 /* probe response received */
160 #define WLC_E_P2P_PROBREQ_MSG 72 /* P2P Probe request received */
161 #define WLC_E_DCS_REQUEST 73
162 #define WLC_E_FIFO_CREDIT_MAP 74 /* credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */
163 #define WLC_E_ACTION_FRAME_RX 75 /* Received action frame event WITH
164 * wl_event_rx_frame_data_t header
166 #define WLC_E_WAKE_EVENT 76 /* Wake Event timer fired, used for wake WLAN test mode */
167 #define WLC_E_RM_COMPLETE 77 /* Radio measurement complete */
168 #define WLC_E_HTSFSYNC 78 /* Synchronize TSF with the host */
169 #define WLC_E_OVERLAY_REQ 79 /* request an overlay IOCTL/iovar from the host */
170 #define WLC_E_CSA_COMPLETE_IND 80 /* 802.11 CHANNEL SWITCH ACTION completed */
171 #define WLC_E_EXCESS_PM_WAKE_EVENT 81 /* excess PM Wake Event to inform host */
172 #define WLC_E_PFN_SCAN_NONE 82 /* no PFN networks around */
173 /* PFN BSSID network found event, conflict/share with WLC_E_PFN_SCAN_NONE */
174 #define WLC_E_PFN_BSSID_NET_FOUND 82
175 #define WLC_E_PFN_SCAN_ALLGONE 83 /* last found PFN network gets lost */
176 /* PFN BSSID network lost event, conflict/share with WLC_E_PFN_SCAN_ALLGONE */
177 #define WLC_E_PFN_BSSID_NET_LOST 83
178 #define WLC_E_GTK_PLUMBED 84
179 #define WLC_E_ASSOC_IND_NDIS 85 /* 802.11 ASSOC indication for NDIS only */
180 #define WLC_E_REASSOC_IND_NDIS 86 /* 802.11 REASSOC indication for NDIS only */
181 #define WLC_E_ASSOC_REQ_IE 87
182 #define WLC_E_ASSOC_RESP_IE 88
183 #define WLC_E_ASSOC_RECREATED 89 /* association recreated on resume */
184 #define WLC_E_ACTION_FRAME_RX_NDIS 90 /* rx action frame event for NDIS only */
185 #define WLC_E_AUTH_REQ 91 /* authentication request received */
186 #define WLC_E_TDLS_PEER_EVENT 92 /* discovered peer, connected/disconnected peer */
187 #define WLC_E_SPEEDY_RECREATE_FAIL 93 /* fast assoc recreation failed */
188 #define WLC_E_NATIVE 94 /* port-specific event and payload (e.g. NDIS) */
189 #define WLC_E_PKTDELAY_IND 95 /* event for tx pkt delay suddently jump */
190 #define WLC_E_PSTA_PRIMARY_INTF_IND 99 /* psta primary interface indication */
191 #define WLC_E_NAN 100 /* NAN event */
192 #define WLC_E_BEACON_FRAME_RX 101
193 #define WLC_E_SERVICE_FOUND 102 /* desired service found */
194 #define WLC_E_GAS_FRAGMENT_RX 103 /* GAS fragment received */
195 #define WLC_E_GAS_COMPLETE 104 /* GAS sessions all complete */
196 #define WLC_E_P2PO_ADD_DEVICE 105 /* New device found by p2p offload */
197 #define WLC_E_P2PO_DEL_DEVICE 106 /* device has been removed by p2p offload */
198 #define WLC_E_WNM_STA_SLEEP 107 /* WNM event to notify STA enter sleep mode */
199 #define WLC_E_TXFAIL_THRESH 108 /* Indication of MAC tx failures (exhaustion of
200 * 802.11 retries) exceeding threshold(s)
202 #define WLC_E_PROXD 109 /* Proximity Detection event */
203 #define WLC_E_IBSS_COALESCE 110 /* IBSS Coalescing */
204 #define WLC_E_AIBSS_TXFAIL 110 /* TXFAIL event for AIBSS, re using event 110 */
205 #define WLC_E_BSS_LOAD 114 /* Inform host of beacon bss load */
206 #define WLC_E_CSA_START_IND 121
207 #define WLC_E_CSA_DONE_IND 122
208 #define WLC_E_CSA_FAILURE_IND 123
209 #define WLC_E_CCA_CHAN_QUAL 124 /* CCA based channel quality report */
210 #define WLC_E_BSSID 125 /* to report change in BSSID while roaming */
211 #define WLC_E_TX_STAT_ERROR 126 /* tx error indication */
212 #define WLC_E_BCMC_CREDIT_SUPPORT 127 /* credit check for BCMC supported */
213 #define WLC_E_BT_WIFI_HANDOVER_REQ 130 /* Handover Request Initiated */
214 #define WLC_E_SPW_TXINHIBIT 131 /* Southpaw TxInhibit notification */
215 #define WLC_E_FBT_AUTH_REQ_IND 132 /* FBT Authentication Request Indication */
216 #define WLC_E_RSSI_LQM 133 /* Enhancement addition for WLC_E_RSSI */
217 #define WLC_E_PFN_GSCAN_FULL_RESULT 134 /* Full probe/beacon (IEs etc) results */
218 #define WLC_E_PFN_SWC 135 /* Significant change in rssi of bssids being tracked */
219 #define WLC_E_RMC_EVENT 139 /* RMC event */
220 #define WLC_E_LAST 140 /* highest val + 1 for range checking */
222 #if (WLC_E_LAST > 140)
223 #error "WLC_E_LAST: Invalid value for last event; must be <= 140."
224 #endif /* WLC_E_LAST */
226 /* define an API for getting the string name of an event */
227 extern const char *bcmevent_get_name(uint event_type);
231 /* Event status codes */
232 #define WLC_E_STATUS_SUCCESS 0 /* operation was successful */
233 #define WLC_E_STATUS_FAIL 1 /* operation failed */
234 #define WLC_E_STATUS_TIMEOUT 2 /* operation timed out */
235 #define WLC_E_STATUS_NO_NETWORKS 3 /* failed due to no matching network found */
236 #define WLC_E_STATUS_ABORT 4 /* operation was aborted */
237 #define WLC_E_STATUS_NO_ACK 5 /* protocol failure: packet not ack'd */
238 #define WLC_E_STATUS_UNSOLICITED 6 /* AUTH or ASSOC packet was unsolicited */
239 #define WLC_E_STATUS_ATTEMPT 7 /* attempt to assoc to an auto auth configuration */
240 #define WLC_E_STATUS_PARTIAL 8 /* scan results are incomplete */
241 #define WLC_E_STATUS_NEWSCAN 9 /* scan aborted by another scan */
242 #define WLC_E_STATUS_NEWASSOC 10 /* scan aborted due to assoc in progress */
243 #define WLC_E_STATUS_11HQUIET 11 /* 802.11h quiet period started */
244 #define WLC_E_STATUS_SUPPRESS 12 /* user disabled scanning (WLC_SET_SCANSUPPRESS) */
245 #define WLC_E_STATUS_NOCHANS 13 /* no allowable channels to scan */
247 #define WLC_E_STATUS_CCXFASTRM 14 /* scan aborted due to CCX fast roam */
249 #define WLC_E_STATUS_CS_ABORT 15 /* abort channel select */
250 #define WLC_E_STATUS_ERROR 16 /* request failed due to error */
251 #define WLC_E_STATUS_INVALID 0xff /* Invalid status code to init variables. */
254 /* roam reason codes */
255 #define WLC_E_REASON_INITIAL_ASSOC 0 /* initial assoc */
256 #define WLC_E_REASON_LOW_RSSI 1 /* roamed due to low RSSI */
257 #define WLC_E_REASON_DEAUTH 2 /* roamed due to DEAUTH indication */
258 #define WLC_E_REASON_DISASSOC 3 /* roamed due to DISASSOC indication */
259 #define WLC_E_REASON_BCNS_LOST 4 /* roamed due to lost beacons */
261 /* Roam codes used primarily by CCX */
262 #define WLC_E_REASON_FAST_ROAM_FAILED 5 /* roamed due to fast roam failure */
263 #define WLC_E_REASON_DIRECTED_ROAM 6 /* roamed due to request by AP */
264 #define WLC_E_REASON_TSPEC_REJECTED 7 /* roamed due to TSPEC rejection */
265 #define WLC_E_REASON_BETTER_AP 8 /* roamed due to finding better AP */
266 #define WLC_E_REASON_MINTXRATE 9 /* roamed because at mintxrate for too long */
267 #define WLC_E_REASON_TXFAIL 10 /* We can hear AP, but AP can't hear us */
268 /* retained for precommit auto-merging errors; remove once all branches are synced */
269 #define WLC_E_REASON_REQUESTED_ROAM 11
270 #define WLC_E_REASON_BSSTRANS_REQ 11 /* roamed due to BSS Transition request by AP */
272 /* prune reason codes */
273 #define WLC_E_PRUNE_ENCR_MISMATCH 1 /* encryption mismatch */
274 #define WLC_E_PRUNE_BCAST_BSSID 2 /* AP uses a broadcast BSSID */
275 #define WLC_E_PRUNE_MAC_DENY 3 /* STA's MAC addr is in AP's MAC deny list */
276 #define WLC_E_PRUNE_MAC_NA 4 /* STA's MAC addr is not in AP's MAC allow list */
277 #define WLC_E_PRUNE_REG_PASSV 5 /* AP not allowed due to regulatory restriction */
278 #define WLC_E_PRUNE_SPCT_MGMT 6 /* AP does not support STA locale spectrum mgmt */
279 #define WLC_E_PRUNE_RADAR 7 /* AP is on a radar channel of STA locale */
280 #define WLC_E_RSN_MISMATCH 8 /* STA does not support AP's RSN */
281 #define WLC_E_PRUNE_NO_COMMON_RATES 9 /* No rates in common with AP */
282 #define WLC_E_PRUNE_BASIC_RATES 10 /* STA does not support all basic rates of BSS */
284 #define WLC_E_PRUNE_CCXFAST_PREVAP 11 /* CCX FAST ROAM: prune previous AP */
285 #endif /* def BCMCCX */
286 #define WLC_E_PRUNE_CIPHER_NA 12 /* BSS's cipher not supported */
287 #define WLC_E_PRUNE_KNOWN_STA 13 /* AP is already known to us as a STA */
289 #define WLC_E_PRUNE_CCXFAST_DROAM 14 /* CCX FAST ROAM: prune unqualified AP */
290 #endif /* def BCMCCX */
291 #define WLC_E_PRUNE_WDS_PEER 15 /* AP is already known to us as a WDS peer */
292 #define WLC_E_PRUNE_QBSS_LOAD 16 /* QBSS LOAD - AAC is too low */
293 #define WLC_E_PRUNE_HOME_AP 17 /* prune home AP */
295 #define WLC_E_PRUNE_AP_BLOCKED 18 /* prune blocked AP */
296 #define WLC_E_PRUNE_NO_DIAG_SUPPORT 19 /* prune due to diagnostic mode not supported */
299 /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
300 #define WLC_E_SUP_OTHER 0 /* Other reason */
301 #define WLC_E_SUP_DECRYPT_KEY_DATA 1 /* Decryption of key data failed */
302 #define WLC_E_SUP_BAD_UCAST_WEP128 2 /* Illegal use of ucast WEP128 */
303 #define WLC_E_SUP_BAD_UCAST_WEP40 3 /* Illegal use of ucast WEP40 */
304 #define WLC_E_SUP_UNSUP_KEY_LEN 4 /* Unsupported key length */
305 #define WLC_E_SUP_PW_KEY_CIPHER 5 /* Unicast cipher mismatch in pairwise key */
306 #define WLC_E_SUP_MSG3_TOO_MANY_IE 6 /* WPA IE contains > 1 RSN IE in key msg 3 */
307 #define WLC_E_SUP_MSG3_IE_MISMATCH 7 /* WPA IE mismatch in key message 3 */
308 #define WLC_E_SUP_NO_INSTALL_FLAG 8 /* INSTALL flag unset in 4-way msg */
309 #define WLC_E_SUP_MSG3_NO_GTK 9 /* encapsulated GTK missing from msg 3 */
310 #define WLC_E_SUP_GRP_KEY_CIPHER 10 /* Multicast cipher mismatch in group key */
311 #define WLC_E_SUP_GRP_MSG1_NO_GTK 11 /* encapsulated GTK missing from group msg 1 */
312 #define WLC_E_SUP_GTK_DECRYPT_FAIL 12 /* GTK decrypt failure */
313 #define WLC_E_SUP_SEND_FAIL 13 /* message send failure */
314 #define WLC_E_SUP_DEAUTH 14 /* received FC_DEAUTH */
315 #define WLC_E_SUP_WPA_PSK_TMO 15 /* WPA PSK 4-way handshake timeout */
317 /* Event data for events that include frames received over the air */
318 /* WLC_E_PROBRESP_MSG
319 * WLC_E_P2P_PROBREQ_MSG
320 * WLC_E_ACTION_FRAME_RX
322 typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data {
324 uint16 channel; /* Matches chanspec_t format from bcmwifi_channels.h */
328 } BWL_POST_PACKED_STRUCT wl_event_rx_frame_data_t;
330 #define BCM_RX_FRAME_DATA_VERSION 1
332 /* WLC_E_IF event data */
333 typedef struct wl_event_data_if {
334 uint8 ifidx; /* RTE virtual device index (for dongle) */
335 uint8 opcode; /* see I/F opcode */
336 uint8 reserved; /* bit mask (WLC_E_IF_FLAGS_XXX ) */
337 uint8 bssidx; /* bsscfg index */
338 uint8 role; /* see I/F role */
339 } wl_event_data_if_t;
341 /* opcode in WLC_E_IF event */
342 #define WLC_E_IF_ADD 1 /* bsscfg add */
343 #define WLC_E_IF_DEL 2 /* bsscfg delete */
344 #define WLC_E_IF_CHANGE 3 /* bsscfg role change */
346 /* I/F role code in WLC_E_IF event */
347 #define WLC_E_IF_ROLE_STA 0 /* Infra STA */
348 #define WLC_E_IF_ROLE_AP 1 /* Access Point */
349 #define WLC_E_IF_ROLE_WDS 2 /* WDS link */
350 #define WLC_E_IF_ROLE_P2P_GO 3 /* P2P Group Owner */
351 #define WLC_E_IF_ROLE_P2P_CLIENT 4 /* P2P Client */
353 #define WLC_E_IF_ROLE_BTA_CREATOR 5 /* BT-AMP Creator */
354 #define WLC_E_IF_ROLE_BTA_ACCEPTOR 6 /* BT-AMP Acceptor */
357 /* WLC_E_RSSI event data */
358 typedef struct wl_event_data_rssi {
362 } wl_event_data_rssi_t;
365 #define WLC_E_IF_FLAGS_BSSCFG_NOIF 0x1 /* no host I/F creation needed */
367 /* Reason codes for LINK */
368 #define WLC_E_LINK_BCN_LOSS 1 /* Link down because of beacon loss */
369 #define WLC_E_LINK_DISASSOC 2 /* Link down because of disassoc */
370 #define WLC_E_LINK_ASSOC_REC 3 /* Link down because assoc recreate failed */
371 #define WLC_E_LINK_BSSCFG_DIS 4 /* Link down due to bsscfg down */
373 /* reason codes for WLC_E_OVERLAY_REQ event */
374 #define WLC_E_OVL_DOWNLOAD 0 /* overlay download request */
375 #define WLC_E_OVL_UPDATE_IND 1 /* device indication of host overlay update */
377 /* reason codes for WLC_E_TDLS_PEER_EVENT event */
378 #define WLC_E_TDLS_PEER_DISCOVERED 0 /* peer is ready to establish TDLS */
379 #define WLC_E_TDLS_PEER_CONNECTED 1
380 #define WLC_E_TDLS_PEER_DISCONNECTED 2
382 /* reason codes for WLC_E_RMC_EVENT event */
383 #define WLC_E_REASON_RMC_NONE 0
384 #define WLC_E_REASON_RMC_AR_LOST 1
385 #define WLC_E_REASON_RMC_AR_NO_ACK 2
389 typedef BWL_PRE_PACKED_STRUCT struct wl_event_gas {
390 uint16 channel; /* channel of GAS protocol */
391 uint8 dialog_token; /* GAS dialog token */
392 uint8 fragment_id; /* fragment id */
393 uint16 status_code; /* status code on GAS completion */
394 uint16 data_len; /* length of data to follow */
395 uint8 data[1]; /* variable length specified by data_len */
396 } BWL_POST_PACKED_STRUCT wl_event_gas_t;
398 /* service discovery TLV */
399 typedef BWL_PRE_PACKED_STRUCT struct wl_sd_tlv {
400 uint16 length; /* length of response_data */
401 uint8 protocol; /* service protocol type */
402 uint8 transaction_id; /* service transaction id */
403 uint8 status_code; /* status code */
404 uint8 data[1]; /* response data */
405 } BWL_POST_PACKED_STRUCT wl_sd_tlv_t;
407 /* service discovery event data */
408 typedef BWL_PRE_PACKED_STRUCT struct wl_event_sd {
409 uint16 channel; /* channel */
410 uint8 count; /* number of tlvs */
411 wl_sd_tlv_t tlv[1]; /* service discovery TLV */
412 } BWL_POST_PACKED_STRUCT wl_event_sd_t;
414 /* Reason codes for WLC_E_PROXD */
415 #define WLC_E_PROXD_FOUND 1 /* Found a proximity device */
416 #define WLC_E_PROXD_GONE 2 /* Lost a proximity device */
417 #define WLC_E_PROXD_START 3 /* used by: target */
418 #define WLC_E_PROXD_STOP 4 /* used by: target */
419 #define WLC_E_PROXD_COMPLETED 5 /* used by: initiator completed */
420 #define WLC_E_PROXD_ERROR 6 /* used by both initiator and target */
421 #define WLC_E_PROXD_COLLECT_START 7 /* used by: target & initiator */
422 #define WLC_E_PROXD_COLLECT_STOP 8 /* used by: target */
423 #define WLC_E_PROXD_COLLECT_COMPLETED 9 /* used by: initiator completed */
424 #define WLC_E_PROXD_COLLECT_ERROR 10 /* used by both initiator and target */
425 #define WLC_E_PROXD_NAN_EVENT 11 /* used by both initiator and target */
427 /* proxd_event data */
428 typedef struct ftm_sample {
429 uint32 value; /* RTT in ns */
430 int8 rssi; /* RSSI */
433 typedef BWL_PRE_PACKED_STRUCT struct proxd_event_data {
434 uint16 ver; /* version */
435 uint16 mode; /* mode: target/initiator */
436 uint16 method; /* method: rssi/TOF/AOA */
437 uint8 err_code; /* error classification */
438 uint8 TOF_type; /* one way or two way TOF */
439 uint8 OFDM_frame_type; /* legacy or VHT */
440 uint8 bandwidth; /* Bandwidth is 20, 40,80, MHZ */
441 struct ether_addr peer_mac; /* (e.g for tgt:initiator's */
442 uint32 distance; /* dst to tgt, units meter */
443 uint32 meanrtt; /* mean delta */
444 uint32 modertt; /* Mode delta */
445 uint32 medianrtt; /* median RTT */
446 uint32 sdrtt; /* Standard deviation of RTT */
447 int gdcalcresult; /* Software or Hardware Kind of redundant, but if */
448 /* frame type is VHT, then we should do it by hardware */
449 int16 avg_rssi; /* avg rssi accroos the ftm frames */
450 int16 validfrmcnt; /* Firmware's valid frame counts */
451 char *peer_router_info; /* Peer router information if available in TLV, */
452 /* We will add this field later */
453 int32 var1; /* average of group delay */
454 int32 var2; /* average of threshold crossing */
455 int32 var3; /* difference between group delay and threshold crossing */
456 /* raw Fine Time Measurements (ftm) data */
457 uint16 ftm_unit; /* ftm cnt resolution in picoseconds , 6250ps - default */
458 uint16 ftm_cnt; /* num of rtd measurments/length in the ftm buffer */
459 ftm_sample_t ftm_buff[1]; /* 1 ... ftm_cnt */
460 } BWL_POST_PACKED_STRUCT wl_proxd_event_data_t;
463 /* Video Traffic Interference Monitor Event */
464 #define INTFER_EVENT_VERSION 1
465 #define INTFER_STREAM_TYPE_NONTCP 1
466 #define INTFER_STREAM_TYPE_TCP 2
467 #define WLINTFER_STATS_NSMPLS 4
468 typedef struct wl_intfer_event {
469 uint16 version; /* version */
470 uint16 status; /* status */
471 uint8 txfail_histo[WLINTFER_STATS_NSMPLS]; /* txfail histo */
474 /* WLC_E_PSTA_PRIMARY_INTF_IND event data */
475 typedef struct wl_psta_primary_intf_event {
476 struct ether_addr prim_ea; /* primary intf ether addr */
477 } wl_psta_primary_intf_event_t;
480 /* ********** NAN protocol events/subevents ********** */
481 #define NAN_EVENT_BUFFER_SIZE 512 /* max size */
482 /* nan application events to the host driver */
483 enum nan_app_events {
484 WL_NAN_EVENT_START = 1, /* NAN cluster started */
485 WL_NAN_EVENT_JOIN = 2, /* Joined to a NAN cluster */
486 WL_NAN_EVENT_ROLE = 3, /* Role or State changed */
487 WL_NAN_EVENT_SCAN_COMPLETE = 4,
488 WL_NAN_EVENT_DISCOVERY_RESULT = 5,
489 WL_NAN_EVENT_REPLIED = 6,
490 WL_NAN_EVENT_TERMINATED = 7, /* the instance ID will be present in the ev data */
491 WL_NAN_EVENT_RECEIVE = 8,
492 WL_NAN_EVENT_STATUS_CHG = 9, /* generated on any change in nan_mac status */
493 WL_NAN_EVENT_MERGE = 10, /* Merged to a NAN cluster */
494 WL_NAN_EVENT_STOP = 11, /* NAN stopped */
495 WL_NAN_EVENT_INVALID = 12, /* delimiter for max value */
497 #define IS_NAN_EVT_ON(var, evt) ((var & (1 << (evt-1))) != 0)
498 /* ******************* end of NAN section *************** */
500 /* This marks the end of a packed structure section. */
501 #include <packed_section_end.h>
503 #endif /* _BCMEVENT_H_ */