Mistake on this page?
Report an issue in GitHub or email us
whd_events_int.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 Cypress Semiconductor Corporation
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /** @file
19  * Header for Event detection
20  *
21  * Provides constants and prototypes for functions that allow both
22  * whd and user applications to receive event callbacks.
23  */
24 
25 #include "whd.h"
26 
27 #ifndef INCLUDED_WHD_EVENTS_INT_H
28 #define INCLUDED_WHD_EVENTS_INT_H
29 
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34 
35 /******************************************************
36 * @cond Typedefs
37 ******************************************************/
38 
39 /**
40  * Enumerated list of event types
41  */
42 typedef enum
43 {
44  WLC_E_NONE = 0x7FFFFFFE,
45  WLC_E_SET_SSID = 0 /** indicates status of set SSID */,
46  WLC_E_JOIN = 1, /** differentiates join IBSS from found (WLC_E_START) IBSS */
47  WLC_E_START = 2, /** STA founded an IBSS or AP started a BSS */
48  WLC_E_AUTH = 3, /** 802.11 AUTH request */
49  WLC_E_AUTH_IND = 4, /** 802.11 AUTH indication */
50  WLC_E_DEAUTH = 5, /** 802.11 DEAUTH request */
51  WLC_E_DEAUTH_IND = 6, /** 802.11 DEAUTH indication */
52  WLC_E_ASSOC = 7, /** 802.11 ASSOC request */
53  WLC_E_ASSOC_IND = 8, /** 802.11 ASSOC indication */
54  WLC_E_REASSOC = 9, /** 802.11 REASSOC request */
55  WLC_E_REASSOC_IND = 10, /** 802.11 REASSOC indication */
56  WLC_E_DISASSOC = 11, /** 802.11 DISASSOC request */
57  WLC_E_DISASSOC_IND = 12, /** 802.11 DISASSOC indication */
58  WLC_E_QUIET_START = 13, /** 802.11h Quiet period started */
59  WLC_E_QUIET_END = 14, /** 802.11h Quiet period ended */
60  WLC_E_BEACON_RX = 15, /** BEACONS received/lost indication */
61  WLC_E_LINK = 16, /** generic link indication */
62  WLC_E_MIC_ERROR = 17, /** TKIP MIC error occurred */
63  WLC_E_NDIS_LINK = 18, /** NDIS style link indication */
64  WLC_E_ROAM = 19, /** roam attempt occurred: indicate status & reason */
65  WLC_E_TXFAIL = 20, /** change in dot11FailedCount (txfail) */
66  WLC_E_PMKID_CACHE = 21, /** WPA2 pmkid cache indication */
67  WLC_E_RETROGRADE_TSF = 22, /** current AP's TSF value went backward */
68  WLC_E_PRUNE = 23, /** AP was pruned from join list for reason */
69  WLC_E_AUTOAUTH = 24, /** report AutoAuth table entry match for join attempt */
70  WLC_E_EAPOL_MSG = 25, /** Event encapsulating an EAPOL message */
71  WLC_E_SCAN_COMPLETE = 26, /** Scan results are ready or scan was aborted */
72  WLC_E_ADDTS_IND = 27, /** indicate to host addts fail/success */
73  WLC_E_DELTS_IND = 28, /** indicate to host delts fail/success */
74  WLC_E_BCNSENT_IND = 29, /** indicate to host of beacon transmit */
75  WLC_E_BCNRX_MSG = 30, /** Send the received beacon up to the host */
76  WLC_E_BCNLOST_MSG = 31, /** indicate to host loss of beacon */
77  WLC_E_ROAM_PREP = 32, /** before attempting to roam */
78  WLC_E_PFN_NET_FOUND = 33, /** PFN network found event */
79  WLC_E_PFN_NET_LOST = 34, /** PFN network lost event */
80  WLC_E_RESET_COMPLETE = 35, WLC_E_JOIN_START = 36, WLC_E_ROAM_START = 37, WLC_E_ASSOC_START = 38,
81  WLC_E_IBSS_ASSOC = 39, WLC_E_RADIO = 40, WLC_E_PSM_WATCHDOG = 41, /** PSM microcode watchdog fired */
82  WLC_E_CCX_ASSOC_START = 42, /** CCX association start */
83  WLC_E_CCX_ASSOC_ABORT = 43, /** CCX association abort */
84  WLC_E_PROBREQ_MSG = 44, /** probe request received */
85  WLC_E_SCAN_CONFIRM_IND = 45, WLC_E_PSK_SUP = 46, /** WPA Handshake */
86  WLC_E_COUNTRY_CODE_CHANGED = 47, WLC_E_EXCEEDED_MEDIUM_TIME = 48, /** WMMAC excedded medium time */
87  WLC_E_ICV_ERROR = 49, /** WEP ICV error occurred */
88  WLC_E_UNICAST_DECODE_ERROR = 50, /** Unsupported unicast encrypted frame */
89  WLC_E_MULTICAST_DECODE_ERROR = 51, /** Unsupported multicast encrypted frame */
90  WLC_E_TRACE = 52, WLC_E_BTA_HCI_EVENT = 53, /** BT-AMP HCI event */
91  WLC_E_IF = 54, /** I/F change (for wlan host notification) */
92  WLC_E_P2P_DISC_LISTEN_COMPLETE = 55, /** P2P Discovery listen state expires */
93  WLC_E_RSSI = 56, /** indicate RSSI change based on configured levels */
94  WLC_E_PFN_BEST_BATCHING = 57, /** PFN best network batching event */
95  WLC_E_EXTLOG_MSG = 58, WLC_E_ACTION_FRAME = 59, /** Action frame reception */
96  WLC_E_ACTION_FRAME_COMPLETE = 60, /** Action frame Tx complete */
97  WLC_E_PRE_ASSOC_IND = 61, /** assoc request received */
98  WLC_E_PRE_REASSOC_IND = 62, /** re-assoc request received */
99  WLC_E_CHANNEL_ADOPTED = 63, /** channel adopted (xxx: obsoleted) */
100  WLC_E_AP_STARTED = 64, /** AP started */
101  WLC_E_DFS_AP_STOP = 65, /** AP stopped due to DFS */
102  WLC_E_DFS_AP_RESUME = 66, /** AP resumed due to DFS */
103  WLC_E_WAI_STA_EVENT = 67, /** WAI stations event */
104  WLC_E_WAI_MSG = 68, /** event encapsulating an WAI message */
105  WLC_E_ESCAN_RESULT = 69, /** escan result event */
106  WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE = 70, /** action frame off channel complete *//* NOTE - This used to be WLC_E_WAKE_EVENT */
107  WLC_E_PROBRESP_MSG = 71, /** probe response received */
108  WLC_E_P2P_PROBREQ_MSG = 72, /** P2P Probe request received */
109  WLC_E_DCS_REQUEST = 73, WLC_E_FIFO_CREDIT_MAP = 74, /** credits for D11 FIFOs. [AC0,AC1,AC2,AC3,BC_MC,ATIM] */
110  WLC_E_ACTION_FRAME_RX = 75, /** Received action frame event WITH wl_event_rx_frame_data_t header */
111  WLC_E_WAKE_EVENT = 76, /** Wake Event timer fired, used for wake WLAN test mode */
112  WLC_E_RM_COMPLETE = 77, /** Radio measurement complete */
113  WLC_E_HTSFSYNC = 78, /** Synchronize TSF with the host */
114  WLC_E_OVERLAY_REQ = 79, /** request an overlay IOCTL/iovar from the host */
115  WLC_E_CSA_COMPLETE_IND = 80, WLC_E_EXCESS_PM_WAKE_EVENT = 81, /** excess PM Wake Event to inform host */
116  WLC_E_PFN_SCAN_NONE = 82, /** no PFN networks around */
117  WLC_E_PFN_SCAN_ALLGONE = 83, /** last found PFN network gets lost */
118  WLC_E_GTK_PLUMBED = 84, WLC_E_ASSOC_IND_NDIS = 85, /** 802.11 ASSOC indication for NDIS only */
119  WLC_E_REASSOC_IND_NDIS = 86, /** 802.11 REASSOC indication for NDIS only */
120  WLC_E_ASSOC_REQ_IE = 87, WLC_E_ASSOC_RESP_IE = 88, WLC_E_ASSOC_RECREATED = 89, /** association recreated on resume */
121  WLC_E_ACTION_FRAME_RX_NDIS = 90, /** rx action frame event for NDIS only */
122  WLC_E_AUTH_REQ = 91, /** authentication request received */
123  WLC_E_TDLS_PEER_EVENT = 92, /** discovered peer, connected/disconnected peer */
124  WLC_E_MESH_DHCP_SUCCESS = 92, /** DHCP handshake successful for a mesh interface */
125  WLC_E_SPEEDY_RECREATE_FAIL = 93, /** fast assoc recreation failed */
126  WLC_E_NATIVE = 94, /** port-specific event and payload (e.g. NDIS) */
127  WLC_E_PKTDELAY_IND = 95, /** event for tx pkt delay suddently jump */
128  WLC_E_AWDL_AW = 96, /** AWDL AW period starts */
129  WLC_E_AWDL_ROLE = 97, /** AWDL Master/Slave/NE master role event */
130  WLC_E_AWDL_EVENT = 98, /** Generic AWDL event */
131  WLC_E_NIC_AF_TXS = 99, /** NIC AF txstatus */
132  WLC_E_NAN = 100, /** NAN event */
133  WLC_E_BEACON_FRAME_RX = 101, WLC_E_SERVICE_FOUND = 102, /** desired service found */
134  WLC_E_GAS_FRAGMENT_RX = 103, /** GAS fragment received */
135  WLC_E_GAS_COMPLETE = 104, /** GAS sessions all complete */
136  WLC_E_P2PO_ADD_DEVICE = 105, /** New device found by p2p offload */
137  WLC_E_P2PO_DEL_DEVICE = 106, /** device has been removed by p2p offload */
138  WLC_E_WNM_STA_SLEEP = 107, /** WNM event to notify STA enter sleep mode */
139  WLC_E_TXFAIL_THRESH = 108, /** Indication of MAC tx failures (exhaustion of 802.11 retries) exceeding threshold(s) */
140  WLC_E_PROXD = 109, /** Proximity Detection event */
141  WLC_E_IBSS_COALESCE = 110, /** IBSS Coalescing */
142  WLC_E_MESH_PAIRED = 110, /** Mesh peer found and paired */
143  WLC_E_AWDL_RX_PRB_RESP = 111, /** AWDL RX Probe response */
144  WLC_E_AWDL_RX_ACT_FRAME = 112, /** AWDL RX Action Frames */
145  WLC_E_AWDL_WOWL_NULLPKT = 113, /** AWDL Wowl nulls */
146  WLC_E_AWDL_PHYCAL_STATUS = 114, /** AWDL Phycal status */
147  WLC_E_AWDL_OOB_AF_STATUS = 115, /** AWDL OOB AF status */
148  WLC_E_AWDL_SCAN_STATUS = 116, /** Interleaved Scan status */
149  WLC_E_AWDL_AW_START = 117, /** AWDL AW Start */
150  WLC_E_AWDL_AW_END = 118, /** AWDL AW End */
151  WLC_E_AWDL_AW_EXT = 119, /** AWDL AW Extensions */
152  WLC_E_AWDL_PEER_CACHE_CONTROL = 120, WLC_E_CSA_START_IND = 121, WLC_E_CSA_DONE_IND = 122,
153  WLC_E_CSA_FAILURE_IND = 123, WLC_E_CCA_CHAN_QUAL = 124, /** CCA based channel quality report */
154  WLC_E_BSSID = 125, /** to report change in BSSID while roaming */
155  WLC_E_TX_STAT_ERROR = 126, /** tx error indication */
156  WLC_E_BCMC_CREDIT_SUPPORT = 127, /** credit check for BCMC supported */
157  WLC_E_PSTA_PRIMARY_INTF_IND = 128, /** psta primary interface indication */
158  WLC_E_BT_WIFI_HANDOVER_REQ = 130, /* Handover Request Initiated */
159  WLC_E_SPW_TXINHIBIT = 131, /* Southpaw TxInhibit notification */
160  WLC_E_FBT_AUTH_REQ_IND = 132, /* FBT Authentication Request Indication */
161  WLC_E_RSSI_LQM = 133, /* Enhancement addition for WLC_E_RSSI */
162  WLC_E_PFN_GSCAN_FULL_RESULT = 134, /* Full probe/beacon (IEs etc) results */
163  WLC_E_PFN_SWC = 135, /* Significant change in rssi of bssids being tracked */
164  WLC_E_AUTHORIZED = 136, /* a STA been authroized for traffic */
165  WLC_E_PROBREQ_MSG_RX = 137, /* probe req with wl_event_rx_frame_data_t header */
166  WLC_E_PFN_SCAN_COMPLETE = 138, /* PFN completed scan of network list */
167  WLC_E_RMC_EVENT = 139, /* RMC Event */
168  WLC_E_DPSTA_INTF_IND = 140, /* DPSTA interface indication */
169  WLC_E_RRM = 141, /* RRM Event */
170  WLC_E_ULP = 146, /* ULP entry event */
171  WLC_E_TKO = 151, /* TCP Keep Alive Offload Event */
172  WLC_E_LAST = 152, /* highest val + 1 for range checking */
173 } whd_event_num_t;
174 
175 #define WLC_SUP_STATUS_OFFSET (256)
176 #define WLC_DOT11_SC_STATUS_OFFSET (512)
177 /**
178  * Enumerated list of event status codes
179  * @note : WLC_SUP values overlap other values, so it is necessary
180  * to check the event type
181  */
182 typedef enum
183 {
184  WLC_E_STATUS_SUCCESS = 0, /** operation was successful */
185  WLC_E_STATUS_FAIL = 1, /** operation failed */
186  WLC_E_STATUS_TIMEOUT = 2, /** operation timed out */
187  WLC_E_STATUS_NO_NETWORKS = 3, /** failed due to no matching network found */
188  WLC_E_STATUS_ABORT = 4, /** operation was aborted */
189  WLC_E_STATUS_NO_ACK = 5, /** protocol failure: packet not ack'd */
190  WLC_E_STATUS_UNSOLICITED = 6, /** AUTH or ASSOC packet was unsolicited */
191  WLC_E_STATUS_ATTEMPT = 7, /** attempt to assoc to an auto auth configuration */
192  WLC_E_STATUS_PARTIAL = 8, /** scan results are incomplete */
193  WLC_E_STATUS_NEWSCAN = 9, /** scan aborted by another scan */
194  WLC_E_STATUS_NEWASSOC = 10, /** scan aborted due to assoc in progress */
195  WLC_E_STATUS_11HQUIET = 11, /** 802.11h quiet period started */
196  WLC_E_STATUS_SUPPRESS = 12, /** user disabled scanning (WLC_SET_SCANSUPPRESS) */
197  WLC_E_STATUS_NOCHANS = 13, /** no allowable channels to scan */
198  WLC_E_STATUS_CCXFASTRM = 14, /** scan aborted due to CCX fast roam */
199  WLC_E_STATUS_CS_ABORT = 15, /** abort channel select */
200 
201  /* for WLC_SUP messages */
207  /* Extended supplicant authentication states */
208  WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED, /** Waiting to receive handshake msg M1 */
209  WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE, /** Preparing to send handshake msg M2 */
210  WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE, /** Waiting to receive handshake msg M3 */
211  WLC_SUP_KEYXCHANGE_PREP_M4 = 9 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg M4 */
212  WLC_SUP_KEYXCHANGE_WAIT_G1 = 10 + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg G1 */
213  WLC_SUP_KEYXCHANGE_PREP_G2 = 11 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg G2 */
214 
215  WLC_DOT11_SC_SUCCESS = 0 + WLC_DOT11_SC_STATUS_OFFSET, /* Successful */
216  WLC_DOT11_SC_FAILURE = 1 + WLC_DOT11_SC_STATUS_OFFSET, /* Unspecified failure */
217  WLC_DOT11_SC_CAP_MISMATCH = 10 + WLC_DOT11_SC_STATUS_OFFSET, /* Cannot support all requested capabilities in the Capability Information field */
218  WLC_DOT11_SC_REASSOC_FAIL = 11 + WLC_DOT11_SC_STATUS_OFFSET, /* Reassociation denied due to inability to confirm that association exists */
219  WLC_DOT11_SC_ASSOC_FAIL = 12 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to reason outside the scope of this standard */
220  WLC_DOT11_SC_AUTH_MISMATCH = 13 + WLC_DOT11_SC_STATUS_OFFSET, /* Responding station does not support the specified authentication algorithm */
221  WLC_DOT11_SC_AUTH_SEQ = 14 + WLC_DOT11_SC_STATUS_OFFSET, /* Received an Authentication frame with authentication transaction sequence number out of expected sequence */
222  WLC_DOT11_SC_AUTH_CHALLENGE_FAIL = 15 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected because of challenge failure */
223  WLC_DOT11_SC_AUTH_TIMEOUT = 16 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected due to timeout waiting for next frame in sequence */
224  WLC_DOT11_SC_ASSOC_BUSY_FAIL = 17 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because AP is unable to handle additional associated stations */
225  WLC_DOT11_SC_ASSOC_RATE_MISMATCH = 18 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting all of the data rates in the BSSBasicRateSet parameter */
226  WLC_DOT11_SC_ASSOC_SHORT_REQUIRED = 19 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Preamble option */
227  WLC_DOT11_SC_ASSOC_PBCC_REQUIRED = 20 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the PBCC Modulation option */
228  WLC_DOT11_SC_ASSOC_AGILITY_REQUIRED = 21 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Channel Agility option */
229  WLC_DOT11_SC_ASSOC_SPECTRUM_REQUIRED = 22 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because Spectrum Management capability is required. */
230  WLC_DOT11_SC_ASSOC_BAD_POWER_CAP = 23 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because the info in the Power Cap element is unacceptable. */
231  WLC_DOT11_SC_ASSOC_BAD_SUP_CHANNELS = 24 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because the info in the Supported Channel element is unacceptable */
232  WLC_DOT11_SC_ASSOC_SHORTSLOT_REQUIRED = 25 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Slot Time option */
233  WLC_DOT11_SC_ASSOC_ERPBCC_REQUIRED = 26 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the ER-PBCC Modulation option */
234  WLC_DOT11_SC_ASSOC_DSSOFDM_REQUIRED = 27 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the DSS-OFDM option */
235  WLC_DOT11_SC_DECLINED = 37 + WLC_DOT11_SC_STATUS_OFFSET, /* request declined */
236  WLC_DOT11_SC_INVALID_PARAMS = 38 + WLC_DOT11_SC_STATUS_OFFSET, /* One or more params have invalid values */
237  WLC_DOT11_SC_INVALID_AKMP = 43 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid AKMP */
238  WLC_DOT11_SC_INVALID_MDID = 54 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid MDID */
239  WLC_DOT11_SC_INVALID_FTIE = 55 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid FTIE */
240 
241  WLC_E_STATUS_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */
242 } whd_event_status_t;
243 
244 #define WLC_E_PRUNE_REASON_OFFSET (256)
245 #define WLC_E_SUP_REASON_OFFSET (512)
246 #define WLC_E_DOT11_RC_REASON_OFFSET (768)
247 
248 /**
249  * Enumerated list of event reason codes
250  * @note : Several values overlap other values, so it is necessary
251  * to check the event type
252  */
253 typedef enum
254 {
255  /* roam reason codes */
256  WLC_E_REASON_INITIAL_ASSOC = 0, /** initial assoc */
257  WLC_E_REASON_LOW_RSSI = 1, /** roamed due to low RSSI */
258  WLC_E_REASON_DEAUTH = 2, /** roamed due to DEAUTH indication */
259  WLC_E_REASON_DISASSOC = 3, /** roamed due to DISASSOC indication */
260  WLC_E_REASON_BCNS_LOST = 4, /** roamed due to lost beacons */
261  WLC_E_REASON_FAST_ROAM_FAILED = 5, /** roamed due to fast roam failure */
262  WLC_E_REASON_DIRECTED_ROAM = 6, /** roamed due to request by AP */
263  WLC_E_REASON_TSPEC_REJECTED = 7, /** roamed due to TSPEC rejection */
264  WLC_E_REASON_BETTER_AP = 8, /** roamed due to finding better AP */
265 
266  /* NAN sub-events comes as a reason code with event as WLC_E_NAN */
267  WLC_E_NAN_EVENT_STATUS_CHG = 9, /* generated on any change in nan_mac status */
268  WLC_E_NAN_EVENT_MERGE = 10, /* Merged to a NAN cluster */
269  WLC_E_NAN_EVENT_STOP = 11, /* NAN stopped */
270  WLC_E_NAN_EVENT_P2P = 12, /* NAN P2P EVENT */
271 
272  /* XXX: Dont use below four events: They will be cleanup, use WL_NAN_EVENT_POST_DISC */
273  WLC_E_NAN_EVENT_WINDOW_BEGIN_P2P = 13, /* Event for begin of P2P further availability window */
274  WLC_E_NAN_EVENT_WINDOW_BEGIN_MESH = 14, WLC_E_NAN_EVENT_WINDOW_BEGIN_IBSS = 15,
275  WLC_E_NAN_EVENT_WINDOW_BEGIN_RANGING = 16, WLC_E_NAN_EVENT_POST_DISC = 17, /* Event for post discovery data */
276  WLC_E_NAN_EVENT_DATA_IF_ADD = 18, /* Event for Data IF add */
277  WLC_E_NAN_EVENT_DATA_PEER_ADD = 19, /* Event for peer add */
278 
279  /* nan 2.0 */
280  WLC_E_NAN_EVENT_DATA_IND = 20, /* Data Indication to Host */
281  WLC_E_NAN_EVENT_DATA_CONF = 21, /* Data Response to Host */
282  WLC_E_NAN_EVENT_SDF_RX = 22, /* entire service discovery frame */
283  WLC_E_NAN_EVENT_DATA_END = 23, WLC_E_NAN_EVENT_BCN_RX = 24, /* received beacon payload */
284 
285  /* prune reason codes */
286  WLC_E_PRUNE_ENCR_MISMATCH = 1 + WLC_E_PRUNE_REASON_OFFSET, /** encryption mismatch */
287  WLC_E_PRUNE_BCAST_BSSID = 2 + WLC_E_PRUNE_REASON_OFFSET, /** AP uses a broadcast BSSID */
288  WLC_E_PRUNE_MAC_DENY = 3 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is in AP's MAC deny list */
289  WLC_E_PRUNE_MAC_NA = 4 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is not in AP's MAC allow list */
290  WLC_E_PRUNE_REG_PASSV = 5 + WLC_E_PRUNE_REASON_OFFSET, /** AP not allowed due to regulatory restriction */
291  WLC_E_PRUNE_SPCT_MGMT = 6 + WLC_E_PRUNE_REASON_OFFSET, /** AP does not support STA locale spectrum mgmt */
292  WLC_E_PRUNE_RADAR = 7 + WLC_E_PRUNE_REASON_OFFSET, /** AP is on a radar channel of STA locale */
293  WLC_E_RSN_MISMATCH = 8 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support AP's RSN */
294  WLC_E_PRUNE_NO_COMMON_RATES = 9 + WLC_E_PRUNE_REASON_OFFSET, /** No rates in common with AP */
295  WLC_E_PRUNE_BASIC_RATES = 10 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support all basic rates of BSS */
296  WLC_E_PRUNE_CCXFAST_PREVAP = 11 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune previous AP */
297  WLC_E_PRUNE_CIPHER_NA = 12 + WLC_E_PRUNE_REASON_OFFSET, /** BSS's cipher not supported */
298  WLC_E_PRUNE_KNOWN_STA = 13 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a STA */
299  WLC_E_PRUNE_CCXFAST_DROAM = 14 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune unqualified AP */
300  WLC_E_PRUNE_WDS_PEER = 15 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a WDS peer */
301  WLC_E_PRUNE_QBSS_LOAD = 16 + WLC_E_PRUNE_REASON_OFFSET, /** QBSS LOAD - AAC is too low */
302  WLC_E_PRUNE_HOME_AP = 17 + WLC_E_PRUNE_REASON_OFFSET, /** prune home AP */
303  WLC_E_PRUNE_AP_BLOCKED = 18 + WLC_E_PRUNE_REASON_OFFSET, /** prune blocked AP */
304  WLC_E_PRUNE_NO_DIAG_SUPPORT = 19 + WLC_E_PRUNE_REASON_OFFSET, /** prune due to diagnostic mode not supported */
305 
306  /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
307  WLC_E_SUP_OTHER = 0 + WLC_E_SUP_REASON_OFFSET, /** Other reason */
308  WLC_E_SUP_DECRYPT_KEY_DATA = 1 + WLC_E_SUP_REASON_OFFSET, /** Decryption of key data failed */
309  WLC_E_SUP_BAD_UCAST_WEP128 = 2 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP128 */
310  WLC_E_SUP_BAD_UCAST_WEP40 = 3 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP40 */
311  WLC_E_SUP_UNSUP_KEY_LEN = 4 + WLC_E_SUP_REASON_OFFSET, /** Unsupported key length */
312  WLC_E_SUP_PW_KEY_CIPHER = 5 + WLC_E_SUP_REASON_OFFSET, /** Unicast cipher mismatch in pairwise key */
313  WLC_E_SUP_MSG3_TOO_MANY_IE = 6 + WLC_E_SUP_REASON_OFFSET, /** WPA IE contains > 1 RSN IE in key msg 3 */
314  WLC_E_SUP_MSG3_IE_MISMATCH = 7 + WLC_E_SUP_REASON_OFFSET, /** WPA IE mismatch in key message 3 */
315  WLC_E_SUP_NO_INSTALL_FLAG = 8 + WLC_E_SUP_REASON_OFFSET, /** INSTALL flag unset in 4-way msg */
316  WLC_E_SUP_MSG3_NO_GTK = 9 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from msg 3 */
317  WLC_E_SUP_GRP_KEY_CIPHER = 10 + WLC_E_SUP_REASON_OFFSET, /** Multicast cipher mismatch in group key */
318  WLC_E_SUP_GRP_MSG1_NO_GTK = 11 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from group msg 1 */
319  WLC_E_SUP_GTK_DECRYPT_FAIL = 12 + WLC_E_SUP_REASON_OFFSET, /** GTK decrypt failure */
320  WLC_E_SUP_SEND_FAIL = 13 + WLC_E_SUP_REASON_OFFSET, /** message send failure */
321  WLC_E_SUP_DEAUTH = 14 + WLC_E_SUP_REASON_OFFSET, /** received FC_DEAUTH */
322  WLC_E_SUP_WPA_PSK_TMO = 15 + WLC_E_SUP_REASON_OFFSET, /** WPA PSK 4-way handshake timeout */
323 
324  DOT11_RC_RESERVED = 0 + WLC_E_DOT11_RC_REASON_OFFSET, /* d11 RC reserved */
325  DOT11_RC_UNSPECIFIED = 1 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unspecified reason */
326  DOT11_RC_AUTH_INVAL = 2 + WLC_E_DOT11_RC_REASON_OFFSET, /* Previous authentication no longer valid */
327  DOT11_RC_DEAUTH_LEAVING = 3 + WLC_E_DOT11_RC_REASON_OFFSET, /* Deauthenticated because sending station is leaving (or has left) IBSS or ESS */
328  DOT11_RC_INACTIVITY = 4 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated due to inactivity */
329  DOT11_RC_BUSY = 5 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because AP is unable to handle all currently associated stations */
330  DOT11_RC_INVAL_CLASS_2 = 6 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 2 frame received from nonauthenticated station */
331  DOT11_RC_INVAL_CLASS_3 = 7 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 3 frame received from nonassociated station */
332  DOT11_RC_DISASSOC_LEAVING = 8 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because sending station is leaving (or has left) BSS */
333  DOT11_RC_NOT_AUTH = 9 + WLC_E_DOT11_RC_REASON_OFFSET, /* Station requesting (re)association is not * authenticated with responding station */
334  DOT11_RC_BAD_PC = 10 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable power capability element */
335  DOT11_RC_BAD_CHANNELS = 11 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable supported channels element */
336  /* 12 is unused */
337  /* XXX 13-23 are WPA/802.11i reason codes defined in proto/wpa.h */
338  /* 32-39 are QSTA specific reasons added in 11e */
339  DOT11_RC_UNSPECIFIED_QOS = 32 + WLC_E_DOT11_RC_REASON_OFFSET, /* unspecified QoS-related reason */
340  DOT11_RC_INSUFFCIENT_BW = 33 + WLC_E_DOT11_RC_REASON_OFFSET, /* QAP lacks sufficient bandwidth */
341  DOT11_RC_EXCESSIVE_FRAMES = 34 + WLC_E_DOT11_RC_REASON_OFFSET, /* excessive number of frames need ack */
342  DOT11_RC_TX_OUTSIDE_TXOP = 35 + WLC_E_DOT11_RC_REASON_OFFSET, /* transmitting outside the limits of txop */
343  DOT11_RC_LEAVING_QBSS = 36 + WLC_E_DOT11_RC_REASON_OFFSET, /* QSTA is leaving the QBSS (or restting) */
344  DOT11_RC_BAD_MECHANISM = 37 + WLC_E_DOT11_RC_REASON_OFFSET, /* does not want to use the mechanism */
345  DOT11_RC_SETUP_NEEDED = 38 + WLC_E_DOT11_RC_REASON_OFFSET, /* mechanism needs a setup */
346  DOT11_RC_TIMEOUT = 39 + WLC_E_DOT11_RC_REASON_OFFSET, /* timeout */
347  DOT11_RC_MAX = 23 + WLC_E_DOT11_RC_REASON_OFFSET, /* Reason codes > 23 are reserved */
348 
349  WLC_E_REASON_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */
350 } whd_event_reason_t;
351 
352 typedef enum
353 {
354  WLC_E_NAN_EVENT_START = 1, /* NAN cluster started */
355  WLC_E_NAN_EVENT_JOIN = 2, /* Joined to a NAN cluster */
356  WLC_E_NAN_EVENT_ROLE = 3, /* Role or State changed */
357  WLC_E_NAN_EVENT_SCAN_COMPLETE = 4, WLC_E_NAN_EVENT_DISCOVERY_RESULT = 5, WLC_E_NAN_EVENT_REPLIED = 6,
358  WLC_E_NAN_EVENT_TERMINATED = 7, /* the instance ID will be present in the ev data */
359  WLC_E_NAN_EVENT_RECEIVE = 8
360 
361 } whd_nan_events_t;
362 
363 /**
364  * Event handler prototype definition
365  *
366  * @param[out] whd_event_header_t : whd event header
367  * @param[out] uint8_t* : event data
368  * @param[out] handler_user_data : semaphore data
369  */
370 typedef void *(*whd_event_handler_t)(whd_interface_t ifp, const whd_event_header_t *event_header,
371  const uint8_t *event_data, void *handler_user_data);
372 /** @endcond */
373 
374 
375 extern whd_result_t whd_management_set_event_handler_locally(whd_interface_t ifp,
376  const whd_event_num_t *event_nums,
377  whd_event_handler_t handler_func,
378  void *handler_user_data, uint16_t *event_index);
379 
380 extern whd_result_t whd_management_set_event_handler(whd_interface_t ifp, const whd_event_num_t *event_nums,
381  whd_event_handler_t handler_func,
382  void *handler_user_data, uint16_t *event_index);
383 
384 extern uint32_t whd_wifi_set_event_handler(whd_interface_t ifp, const uint32_t *event_type,
385  whd_event_handler_t handler_func,
386  void *handler_user_data, uint16_t *event_index);
387 
388 extern uint32_t whd_wifi_deregister_event_handler(whd_interface_t ifp, uint16_t event_index);
389 
390 /** @cond */
391 
392 //extern void* whd_rrm_report_handler( const whd_event_header_t* event_header, const uint8_t* event_data, void* handler_user_data );
393 
394 extern void *whd_nan_scan_handler(const whd_event_header_t *event_header, const uint8_t *event_data,
395  void *handler_user_data);
396 
397 #define WHD_MSG_IFNAME_MAX 16
398 
399 /* Maximum number of events registered at a time */
400 #define WHD_MAX_EVENT_SUBSCRIPTION 33
401 
402 #define WHD_EVENT_NOT_REGISTERED 0xFF
403 /* Enum to index and find the entry of paricular event registered */
404 typedef enum
405 {
406  WHD_SCAN_EVENT_ENTRY = 0,
407  WHD_JOIN_EVENT_ENTRY,
408  WHD_AP_EVENT_ENTRY,
409  WHD_P2P_EVENT_ENTRY,
410  WHD_EVENT_ENTRY_MAX
411 } whd_event_entry_t;
412 
413 #pragma pack(1)
414 typedef struct whd_event_eth_hdr
415 {
416  uint16_t subtype; /** Vendor specific..32769 */
417  uint16_t length;
418  uint8_t version; /** Version is 0 */
419  uint8_t oui[3]; /** OUI */
420  uint16_t usr_subtype; /** user specific Data */
422 
423 typedef struct whd_event_ether_header
424 {
425  whd_mac_t destination_address;
426  whd_mac_t source_address;
427  uint16_t ethertype;
429 
430 struct whd_event_msg
431 {
432  uint16_t version;
433  uint16_t flags; /* see flags below */
434  uint32_t event_type; /* Message (see below) */
435  uint32_t status; /* Status code (see below) */
436  uint32_t reason; /* Reason code (if applicable) */
437  uint32_t auth_type; /* WLC_E_AUTH */
438  uint32_t datalen; /* data buf */
439  whd_mac_t addr; /* Station address (if applicable) */
440  char ifname[WHD_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
441  uint8_t ifidx; /* destination OS i/f index */
442  uint8_t bsscfgidx; /* source bsscfg index */
443 };
444 
445 /* used by driver msgs */
446 typedef struct whd_event
447 {
449  whd_event_eth_hdr_t eth_evt_hdr;
450  whd_event_header_t whd_event;
451  /* data portion follows */
452 } whd_event_t;
453 
454 #pragma pack()
455 
456 /** @endcond */
457 
458 /** @} */
459 
460 #ifdef __cplusplus
461 } /* extern "C" */
462 #endif
463 #endif /* ifndef INCLUDED_WHD_EVENTS_H */
464 
#define WLC_E_REASSOC
802.11 REASSOC request event when the STA again gets associated with the AP
Definition: whd_events.h:43
void *(* whd_event_handler_t)(whd_interface_t ifp, const whd_event_header_t *event_header, const uint8_t *event_data, void *handler_user_data)
Event handler prototype definition.
Definition: whd_events.h:187
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:116
#define WLC_E_PROBREQ_MSG
Indicates probe request received for the SOFTAP started.
Definition: whd_events.h:50
#define WLC_E_STATUS_NEWSCAN
scan aborted by another scan
Definition: whd_events.h:66
uint8_t oui[3]
Organizationally Unique Identifier.
Definition: whd_events.h:131
#define WLC_E_STATUS_ABORT
operation was aborted
Definition: whd_events.h:61
uint16_t usr_subtype
User specific data.
Definition: whd_events.h:132
struct whd_event_eth_hdr whd_event_eth_hdr_t
Structure to store ethernet header fields in event packets.
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:102
#define WLC_E_NONE
Indicates the end of the event array list.
Definition: whd_events.h:35
#define WLC_E_ACTION_FRAME_COMPLETE
Indicates Action frame Tx complete.
Definition: whd_events.h:53
#define WLC_E_STATUS_FAIL
operation failed
Definition: whd_events.h:58
Provides abstract pointer type to act as instance for: driver, interface, buffer funcs, network funcs, resource funcs and bus funcs.
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:107
#define WLC_E_STATUS_SUPPRESS
user disabled scanning (WLC_SET_SCANSUPPRESS)
Definition: whd_events.h:69
#define WLC_E_STATUS_NEWASSOC
scan aborted due to assoc in progress
Definition: whd_events.h:67
#define WLC_E_STATUS_NO_ACK
protocol failure: packet not ack'd
Definition: whd_events.h:62
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:103
#define WLC_E_DEAUTH
802.11 DEAUTH request event occurs when the the SOFTAP is stopped to deuthenticate the connected stat...
Definition: whd_events.h:39
Preparing to send handshake msg M2.
Definition: whd_events.h:112
struct whd_event_ether_header whd_event_ether_header_t
Structure to store ethernet destination, source and ethertype in event packets.
#define WLC_E_REASSOC_IND
802.11 REASSOC indication occurs when a station again reassociates with the SOFTAP ...
Definition: whd_events.h:44
#define WLC_E_STATUS_11HQUIET
802.11h quiet period started
Definition: whd_events.h:68
uint32_t whd_wifi_set_event_handler(whd_interface_t ifp, const uint32_t *event_type, whd_event_handler_t handler_func, void *handler_user_data, uint16_t *event_index)
Registers a handler to receive event callbacks.
#define WLC_E_STATUS_CS_ABORT
abort channel select
Definition: whd_events.h:72
#define WLC_E_SET_SSID
Indicates status of set SSID.
Definition: whd_events.h:37
#define WLC_E_STATUS_ATTEMPT
attempt to assoc to an auto auth configuration
Definition: whd_events.h:64
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:109
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:108
Event structure used by driver msgs.
Definition: whd_events.h:166
uint16_t length
Length of ethernet header.
Definition: whd_events.h:129
uint16_t subtype
Vendor specific..32769.
Definition: whd_events.h:128
Waiting to receive handshake msg M1.
Definition: whd_events.h:111
Structure for storing a MAC address (Wi-Fi Media Access Control address).
Definition: whd_types.h:385
#define WLC_E_STATUS_PARTIAL
scan results are incomplete
Definition: whd_events.h:65
uint32_t whd_result_t
WHD result is specified as uint32_t value.
Definition: whd_types.h:776
Structure to store fields after ethernet header in event message.
Definition: whd_events.h:148
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:110
struct whd_event whd_event_t
Event structure used by driver msgs.
#define WLC_E_STATUS_NOCHANS
no allowable channels to scan
Definition: whd_events.h:70
#define WLC_E_LINK
generic link indication
Definition: whd_events.h:49
#define WLC_E_DISASSOC
802.11 DISASSOC request occurs when the STA the tries to leave the AP
Definition: whd_events.h:45
#define WLC_E_ASSOC_IND
802.11 ASSOC indication occurs when a station joins the SOFTAP that is started
Definition: whd_events.h:42
#define WLC_E_STATUS_NO_NETWORKS
failed due to no matching network found
Definition: whd_events.h:60
Structure to store ethernet destination, source and ethertype in event packets.
Definition: whd_events.h:138
#define WLC_E_STATUS_CCXFASTRM
scan aborted due to CCX fast roam
Definition: whd_events.h:71
Structure to store ethernet header fields in event packets.
Definition: whd_events.h:126
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:114
#define WLC_E_STATUS_SUCCESS
operation was successful
Definition: whd_events.h:57
#define WLC_E_ACTION_FRAME
Indicates Action frame Rx.
Definition: whd_events.h:52
#define WLC_E_STATUS_TIMEOUT
operation timed out
Definition: whd_events.h:59
#define WLC_SUP_STATUS_OFFSET
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:76
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:106
uint32_t whd_wifi_deregister_event_handler(whd_interface_t ifp, uint16_t event_index)
Delete/Deregister the event entry where callback is registered.
#define WHD_MSG_IFNAME_MAX
Max length of Interface name.
Definition: whd_events.h:119
#define WLC_E_ASSOC
802.11 ASSOC request event occurs when STA joins the AP
Definition: whd_events.h:41
Waiting to receive handshake msg M3.
Definition: whd_events.h:113
#define WLC_E_PSK_SUP
WPA Handshake fail during association.
Definition: whd_events.h:51
#define WLC_E_DISASSOC_IND
802.11 DISASSOC indication occurs when the connected station gets disassociates from SOFTAP...
Definition: whd_events.h:46
#define WLC_E_DEAUTH_IND
802.11 DEAUTH indication event occurs when the STA gets deauthenticated by the AP ...
Definition: whd_events.h:40
#define WLC_E_STATUS_UNSOLICITED
AUTH or ASSOC packet was unsolicited.
Definition: whd_events.h:63
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:115
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:105
uint8_t version
Version is 0.
Definition: whd_events.h:130
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:104
#define WLC_E_ESCAN_RESULT
escan result event occurs when we scan for the networks
Definition: whd_events.h:54
#define WLC_E_AUTH
802.11 AUTH request event occurs when STA tries to get authenticated with the AP
Definition: whd_events.h:38
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.