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 2021, Cypress Semiconductor Corporation (an Infineon company)
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 /**
176  * Enumerated list of error types
177  */
178 typedef enum
179 {
180  WLC_ERR_NONE = 0x00,
181  WLC_ERR_BUS = 0x01, /** indicates BUS got wrong */
182  WLC_ERR_FW = 0x02, /** FW halt or crash */
183 } whd_error_num_t;
184 
185 #define WLC_SUP_STATUS_OFFSET (256)
186 #define WLC_DOT11_SC_STATUS_OFFSET (512)
187 /**
188  * Enumerated list of event status codes
189  * @note : WLC_SUP values overlap other values, so it is necessary
190  * to check the event type
191  */
192 typedef enum
193 {
194  WLC_E_STATUS_SUCCESS = 0, /** operation was successful */
195  WLC_E_STATUS_FAIL = 1, /** operation failed */
196  WLC_E_STATUS_TIMEOUT = 2, /** operation timed out */
197  WLC_E_STATUS_NO_NETWORKS = 3, /** failed due to no matching network found */
198  WLC_E_STATUS_ABORT = 4, /** operation was aborted */
199  WLC_E_STATUS_NO_ACK = 5, /** protocol failure: packet not ack'd */
200  WLC_E_STATUS_UNSOLICITED = 6, /** AUTH or ASSOC packet was unsolicited */
201  WLC_E_STATUS_ATTEMPT = 7, /** attempt to assoc to an auto auth configuration */
202  WLC_E_STATUS_PARTIAL = 8, /** scan results are incomplete */
203  WLC_E_STATUS_NEWSCAN = 9, /** scan aborted by another scan */
204  WLC_E_STATUS_NEWASSOC = 10, /** scan aborted due to assoc in progress */
205  WLC_E_STATUS_11HQUIET = 11, /** 802.11h quiet period started */
206  WLC_E_STATUS_SUPPRESS = 12, /** user disabled scanning (WLC_SET_SCANSUPPRESS) */
207  WLC_E_STATUS_NOCHANS = 13, /** no allowable channels to scan */
208  WLC_E_STATUS_CCXFASTRM = 14, /** scan aborted due to CCX fast roam */
209  WLC_E_STATUS_CS_ABORT = 15, /** abort channel select */
210 
211  /* for WLC_SUP messages */
217  /* Extended supplicant authentication states */
218  WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED, /** Waiting to receive handshake msg M1 */
219  WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE, /** Preparing to send handshake msg M2 */
220  WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE, /** Waiting to receive handshake msg M3 */
221  WLC_SUP_KEYXCHANGE_PREP_M4 = 9 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg M4 */
222  WLC_SUP_KEYXCHANGE_WAIT_G1 = 10 + WLC_SUP_STATUS_OFFSET, /** Waiting to receive handshake msg G1 */
223  WLC_SUP_KEYXCHANGE_PREP_G2 = 11 + WLC_SUP_STATUS_OFFSET, /** Preparing to send handshake msg G2 */
224 
225  WLC_DOT11_SC_SUCCESS = 0 + WLC_DOT11_SC_STATUS_OFFSET, /* Successful */
226  WLC_DOT11_SC_FAILURE = 1 + WLC_DOT11_SC_STATUS_OFFSET, /* Unspecified failure */
227  WLC_DOT11_SC_CAP_MISMATCH = 10 + WLC_DOT11_SC_STATUS_OFFSET, /* Cannot support all requested capabilities in the Capability Information field */
228  WLC_DOT11_SC_REASSOC_FAIL = 11 + WLC_DOT11_SC_STATUS_OFFSET, /* Reassociation denied due to inability to confirm that association exists */
229  WLC_DOT11_SC_ASSOC_FAIL = 12 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to reason outside the scope of this standard */
230  WLC_DOT11_SC_AUTH_MISMATCH = 13 + WLC_DOT11_SC_STATUS_OFFSET, /* Responding station does not support the specified authentication algorithm */
231  WLC_DOT11_SC_AUTH_SEQ = 14 + WLC_DOT11_SC_STATUS_OFFSET, /* Received an Authentication frame with authentication transaction sequence number out of expected sequence */
232  WLC_DOT11_SC_AUTH_CHALLENGE_FAIL = 15 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected because of challenge failure */
233  WLC_DOT11_SC_AUTH_TIMEOUT = 16 + WLC_DOT11_SC_STATUS_OFFSET, /* Authentication rejected due to timeout waiting for next frame in sequence */
234  WLC_DOT11_SC_ASSOC_BUSY_FAIL = 17 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because AP is unable to handle additional associated stations */
235  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 */
236  WLC_DOT11_SC_ASSOC_SHORT_REQUIRED = 19 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Short Preamble option */
237  WLC_DOT11_SC_ASSOC_PBCC_REQUIRED = 20 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the PBCC Modulation option */
238  WLC_DOT11_SC_ASSOC_AGILITY_REQUIRED = 21 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the Channel Agility option */
239  WLC_DOT11_SC_ASSOC_SPECTRUM_REQUIRED = 22 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied because Spectrum Management capability is required. */
240  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. */
241  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 */
242  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 */
243  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 */
244  WLC_DOT11_SC_ASSOC_DSSOFDM_REQUIRED = 27 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to requesting station not supporting the DSS-OFDM option */
245  WLC_DOT11_SC_DECLINED = 37 + WLC_DOT11_SC_STATUS_OFFSET, /* request declined */
246  WLC_DOT11_SC_INVALID_PARAMS = 38 + WLC_DOT11_SC_STATUS_OFFSET, /* One or more params have invalid values */
247  WLC_DOT11_SC_INVALID_AKMP = 43 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid AKMP */
248  WLC_DOT11_SC_INVALID_MDID = 54 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid MDID */
249  WLC_DOT11_SC_INVALID_FTIE = 55 + WLC_DOT11_SC_STATUS_OFFSET, /* Association denied due to invalid FTIE */
250 
251  WLC_E_STATUS_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */
252 } whd_event_status_t;
253 
254 #define WLC_E_PRUNE_REASON_OFFSET (256)
255 #define WLC_E_SUP_REASON_OFFSET (512)
256 #define WLC_E_DOT11_RC_REASON_OFFSET (768)
257 
258 /**
259  * Enumerated list of event reason codes
260  * @note : Several values overlap other values, so it is necessary
261  * to check the event type
262  */
263 typedef enum
264 {
265  /* roam reason codes */
266  WLC_E_REASON_INITIAL_ASSOC = 0, /** initial assoc */
267  WLC_E_REASON_LOW_RSSI = 1, /** roamed due to low RSSI */
268  WLC_E_REASON_DEAUTH = 2, /** roamed due to DEAUTH indication */
269  WLC_E_REASON_DISASSOC = 3, /** roamed due to DISASSOC indication */
270  WLC_E_REASON_BCNS_LOST = 4, /** roamed due to lost beacons */
271  WLC_E_REASON_FAST_ROAM_FAILED = 5, /** roamed due to fast roam failure */
272  WLC_E_REASON_DIRECTED_ROAM = 6, /** roamed due to request by AP */
273  WLC_E_REASON_TSPEC_REJECTED = 7, /** roamed due to TSPEC rejection */
274  WLC_E_REASON_BETTER_AP = 8, /** roamed due to finding better AP */
275 
276  /* NAN sub-events comes as a reason code with event as WLC_E_NAN */
277  WLC_E_NAN_EVENT_STATUS_CHG = 9, /* generated on any change in nan_mac status */
278  WLC_E_NAN_EVENT_MERGE = 10, /* Merged to a NAN cluster */
279  WLC_E_NAN_EVENT_STOP = 11, /* NAN stopped */
280  WLC_E_NAN_EVENT_P2P = 12, /* NAN P2P EVENT */
281 
282  /* XXX: Dont use below four events: They will be cleanup, use WL_NAN_EVENT_POST_DISC */
283  WLC_E_NAN_EVENT_WINDOW_BEGIN_P2P = 13, /* Event for begin of P2P further availability window */
284  WLC_E_NAN_EVENT_WINDOW_BEGIN_MESH = 14, WLC_E_NAN_EVENT_WINDOW_BEGIN_IBSS = 15,
285  WLC_E_NAN_EVENT_WINDOW_BEGIN_RANGING = 16, WLC_E_NAN_EVENT_POST_DISC = 17, /* Event for post discovery data */
286  WLC_E_NAN_EVENT_DATA_IF_ADD = 18, /* Event for Data IF add */
287  WLC_E_NAN_EVENT_DATA_PEER_ADD = 19, /* Event for peer add */
288 
289  /* nan 2.0 */
290  WLC_E_NAN_EVENT_DATA_IND = 20, /* Data Indication to Host */
291  WLC_E_NAN_EVENT_DATA_CONF = 21, /* Data Response to Host */
292  WLC_E_NAN_EVENT_SDF_RX = 22, /* entire service discovery frame */
293  WLC_E_NAN_EVENT_DATA_END = 23, WLC_E_NAN_EVENT_BCN_RX = 24, /* received beacon payload */
294 
295  /* prune reason codes */
296  WLC_E_PRUNE_ENCR_MISMATCH = 1 + WLC_E_PRUNE_REASON_OFFSET, /** encryption mismatch */
297  WLC_E_PRUNE_BCAST_BSSID = 2 + WLC_E_PRUNE_REASON_OFFSET, /** AP uses a broadcast BSSID */
298  WLC_E_PRUNE_MAC_DENY = 3 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is in AP's MAC deny list */
299  WLC_E_PRUNE_MAC_NA = 4 + WLC_E_PRUNE_REASON_OFFSET, /** STA's MAC addr is not in AP's MAC allow list */
300  WLC_E_PRUNE_REG_PASSV = 5 + WLC_E_PRUNE_REASON_OFFSET, /** AP not allowed due to regulatory restriction */
301  WLC_E_PRUNE_SPCT_MGMT = 6 + WLC_E_PRUNE_REASON_OFFSET, /** AP does not support STA locale spectrum mgmt */
302  WLC_E_PRUNE_RADAR = 7 + WLC_E_PRUNE_REASON_OFFSET, /** AP is on a radar channel of STA locale */
303  WLC_E_RSN_MISMATCH = 8 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support AP's RSN */
304  WLC_E_PRUNE_NO_COMMON_RATES = 9 + WLC_E_PRUNE_REASON_OFFSET, /** No rates in common with AP */
305  WLC_E_PRUNE_BASIC_RATES = 10 + WLC_E_PRUNE_REASON_OFFSET, /** STA does not support all basic rates of BSS */
306  WLC_E_PRUNE_CCXFAST_PREVAP = 11 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune previous AP */
307  WLC_E_PRUNE_CIPHER_NA = 12 + WLC_E_PRUNE_REASON_OFFSET, /** BSS's cipher not supported */
308  WLC_E_PRUNE_KNOWN_STA = 13 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a STA */
309  WLC_E_PRUNE_CCXFAST_DROAM = 14 + WLC_E_PRUNE_REASON_OFFSET, /** CCX FAST ROAM: prune unqualified AP */
310  WLC_E_PRUNE_WDS_PEER = 15 + WLC_E_PRUNE_REASON_OFFSET, /** AP is already known to us as a WDS peer */
311  WLC_E_PRUNE_QBSS_LOAD = 16 + WLC_E_PRUNE_REASON_OFFSET, /** QBSS LOAD - AAC is too low */
312  WLC_E_PRUNE_HOME_AP = 17 + WLC_E_PRUNE_REASON_OFFSET, /** prune home AP */
313  WLC_E_PRUNE_AP_BLOCKED = 18 + WLC_E_PRUNE_REASON_OFFSET, /** prune blocked AP */
314  WLC_E_PRUNE_NO_DIAG_SUPPORT = 19 + WLC_E_PRUNE_REASON_OFFSET, /** prune due to diagnostic mode not supported */
315 
316  /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
317  WLC_E_SUP_OTHER = 0 + WLC_E_SUP_REASON_OFFSET, /** Other reason */
318  WLC_E_SUP_DECRYPT_KEY_DATA = 1 + WLC_E_SUP_REASON_OFFSET, /** Decryption of key data failed */
319  WLC_E_SUP_BAD_UCAST_WEP128 = 2 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP128 */
320  WLC_E_SUP_BAD_UCAST_WEP40 = 3 + WLC_E_SUP_REASON_OFFSET, /** Illegal use of ucast WEP40 */
321  WLC_E_SUP_UNSUP_KEY_LEN = 4 + WLC_E_SUP_REASON_OFFSET, /** Unsupported key length */
322  WLC_E_SUP_PW_KEY_CIPHER = 5 + WLC_E_SUP_REASON_OFFSET, /** Unicast cipher mismatch in pairwise key */
323  WLC_E_SUP_MSG3_TOO_MANY_IE = 6 + WLC_E_SUP_REASON_OFFSET, /** WPA IE contains > 1 RSN IE in key msg 3 */
324  WLC_E_SUP_MSG3_IE_MISMATCH = 7 + WLC_E_SUP_REASON_OFFSET, /** WPA IE mismatch in key message 3 */
325  WLC_E_SUP_NO_INSTALL_FLAG = 8 + WLC_E_SUP_REASON_OFFSET, /** INSTALL flag unset in 4-way msg */
326  WLC_E_SUP_MSG3_NO_GTK = 9 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from msg 3 */
327  WLC_E_SUP_GRP_KEY_CIPHER = 10 + WLC_E_SUP_REASON_OFFSET, /** Multicast cipher mismatch in group key */
328  WLC_E_SUP_GRP_MSG1_NO_GTK = 11 + WLC_E_SUP_REASON_OFFSET, /** encapsulated GTK missing from group msg 1 */
329  WLC_E_SUP_GTK_DECRYPT_FAIL = 12 + WLC_E_SUP_REASON_OFFSET, /** GTK decrypt failure */
330  WLC_E_SUP_SEND_FAIL = 13 + WLC_E_SUP_REASON_OFFSET, /** message send failure */
331  WLC_E_SUP_DEAUTH = 14 + WLC_E_SUP_REASON_OFFSET, /** received FC_DEAUTH */
332  WLC_E_SUP_WPA_PSK_TMO = 15 + WLC_E_SUP_REASON_OFFSET, /** WPA PSK 4-way handshake timeout */
333 
334  DOT11_RC_RESERVED = 0 + WLC_E_DOT11_RC_REASON_OFFSET, /* d11 RC reserved */
335  DOT11_RC_UNSPECIFIED = 1 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unspecified reason */
336  DOT11_RC_AUTH_INVAL = 2 + WLC_E_DOT11_RC_REASON_OFFSET, /* Previous authentication no longer valid */
337  DOT11_RC_DEAUTH_LEAVING = 3 + WLC_E_DOT11_RC_REASON_OFFSET, /* Deauthenticated because sending station is leaving (or has left) IBSS or ESS */
338  DOT11_RC_INACTIVITY = 4 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated due to inactivity */
339  DOT11_RC_BUSY = 5 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because AP is unable to handle all currently associated stations */
340  DOT11_RC_INVAL_CLASS_2 = 6 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 2 frame received from nonauthenticated station */
341  DOT11_RC_INVAL_CLASS_3 = 7 + WLC_E_DOT11_RC_REASON_OFFSET, /* Class 3 frame received from nonassociated station */
342  DOT11_RC_DISASSOC_LEAVING = 8 + WLC_E_DOT11_RC_REASON_OFFSET, /* Disassociated because sending station is leaving (or has left) BSS */
343  DOT11_RC_NOT_AUTH = 9 + WLC_E_DOT11_RC_REASON_OFFSET, /* Station requesting (re)association is not * authenticated with responding station */
344  DOT11_RC_BAD_PC = 10 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable power capability element */
345  DOT11_RC_BAD_CHANNELS = 11 + WLC_E_DOT11_RC_REASON_OFFSET, /* Unacceptable supported channels element */
346  /* 12 is unused */
347  /* XXX 13-23 are WPA/802.11i reason codes defined in proto/wpa.h */
348  /* 32-39 are QSTA specific reasons added in 11e */
349  DOT11_RC_UNSPECIFIED_QOS = 32 + WLC_E_DOT11_RC_REASON_OFFSET, /* unspecified QoS-related reason */
350  DOT11_RC_INSUFFCIENT_BW = 33 + WLC_E_DOT11_RC_REASON_OFFSET, /* QAP lacks sufficient bandwidth */
351  DOT11_RC_EXCESSIVE_FRAMES = 34 + WLC_E_DOT11_RC_REASON_OFFSET, /* excessive number of frames need ack */
352  DOT11_RC_TX_OUTSIDE_TXOP = 35 + WLC_E_DOT11_RC_REASON_OFFSET, /* transmitting outside the limits of txop */
353  DOT11_RC_LEAVING_QBSS = 36 + WLC_E_DOT11_RC_REASON_OFFSET, /* QSTA is leaving the QBSS (or restting) */
354  DOT11_RC_BAD_MECHANISM = 37 + WLC_E_DOT11_RC_REASON_OFFSET, /* does not want to use the mechanism */
355  DOT11_RC_SETUP_NEEDED = 38 + WLC_E_DOT11_RC_REASON_OFFSET, /* mechanism needs a setup */
356  DOT11_RC_TIMEOUT = 39 + WLC_E_DOT11_RC_REASON_OFFSET, /* timeout */
357  DOT11_RC_MAX = 23 + WLC_E_DOT11_RC_REASON_OFFSET, /* Reason codes > 23 are reserved */
358 
359  WLC_E_REASON_FORCE_32_BIT = 0x7FFFFFFE /** Force enum to be stored in 32 bit variable */
360 } whd_event_reason_t;
361 
362 typedef enum
363 {
364  WLC_E_NAN_EVENT_START = 1, /* NAN cluster started */
365  WLC_E_NAN_EVENT_JOIN = 2, /* Joined to a NAN cluster */
366  WLC_E_NAN_EVENT_ROLE = 3, /* Role or State changed */
367  WLC_E_NAN_EVENT_SCAN_COMPLETE = 4, WLC_E_NAN_EVENT_DISCOVERY_RESULT = 5, WLC_E_NAN_EVENT_REPLIED = 6,
368  WLC_E_NAN_EVENT_TERMINATED = 7, /* the instance ID will be present in the ev data */
369  WLC_E_NAN_EVENT_RECEIVE = 8
370 
371 } whd_nan_events_t;
372 
373 /**
374  * Event handler prototype definition
375  *
376  * @param[out] whd_event_header_t : whd event header
377  * @param[out] uint8_t* : event data
378  * @param[out] handler_user_data : semaphore data
379  */
380 typedef void *(*whd_event_handler_t)(whd_interface_t ifp, const whd_event_header_t *event_header,
381  const uint8_t *event_data, void *handler_user_data);
382 /** @endcond */
383 
384 /**
385  * Error handler prototype definition
386  *
387  * @param[out] uint8_t : error_type
388  * @param[out] uint8_t* : event data
389  * @param[out] handler_user_data : semaphore data
390  */
391 typedef void *(*whd_error_handler_t)(whd_driver_t whd_driver, const uint8_t *error_type,
392  const uint8_t *event_data, void *handler_user_data);
393 /** @endcond */
394 extern whd_result_t whd_management_set_event_handler_locally(whd_interface_t ifp,
395  const whd_event_num_t *event_nums,
396  whd_event_handler_t handler_func,
397  void *handler_user_data, uint16_t *event_index);
398 
399 extern whd_result_t whd_management_set_event_handler(whd_interface_t ifp, const whd_event_num_t *event_nums,
400  whd_event_handler_t handler_func,
401  void *handler_user_data, uint16_t *event_index);
402 
403 extern uint32_t whd_wifi_set_event_handler(whd_interface_t ifp, const uint32_t *event_type,
404  whd_event_handler_t handler_func,
405  void *handler_user_data, uint16_t *event_index);
406 
407 extern uint32_t whd_wifi_deregister_event_handler(whd_interface_t ifp, uint16_t event_index);
408 
409 extern whd_result_t whd_set_error_handler_locally(whd_driver_t whd_driver, const uint8_t *error_nums,
410  whd_error_handler_t handler_func,
411  void *handler_user_data, uint16_t *error_index);
412 
413 extern whd_result_t whd_wifi_set_error_handler(whd_interface_t ifp, const uint8_t *error_type,
414  whd_error_handler_t handler_func,
415  void *handler_user_data, uint16_t *error_index);
416 
417 extern uint32_t whd_wifi_deregister_error_handler(whd_interface_t ifp, uint16_t error_index);
418 
419 /** @cond */
420 
421 //extern void* whd_rrm_report_handler( const whd_event_header_t* event_header, const uint8_t* event_data, void* handler_user_data );
422 
423 extern void *whd_nan_scan_handler(const whd_event_header_t *event_header, const uint8_t *event_data,
424  void *handler_user_data);
425 
426 #define WHD_MSG_IFNAME_MAX 16
427 
428 /* Maximum number of events registered at a time */
429 #define WHD_MAX_EVENT_SUBSCRIPTION 33
430 
431 #define WHD_EVENT_NOT_REGISTERED 0xFF
432 /* Enum to index and find the entry of paricular event registered */
433 typedef enum
434 {
435  WHD_SCAN_EVENT_ENTRY = 0,
436  WHD_JOIN_EVENT_ENTRY,
437  WHD_AP_EVENT_ENTRY,
438  WHD_P2P_EVENT_ENTRY,
439  WHD_EVENT_ENTRY_MAX
440 } whd_event_entry_t;
441 
442 #pragma pack(1)
443 typedef struct whd_event_eth_hdr
444 {
445  uint16_t subtype; /** Vendor specific..32769 */
446  uint16_t length;
447  uint8_t version; /** Version is 0 */
448  uint8_t oui[3]; /** OUI */
449  uint16_t usr_subtype; /** user specific Data */
451 
452 typedef struct whd_event_ether_header
453 {
454  whd_mac_t destination_address;
455  whd_mac_t source_address;
456  uint16_t ethertype;
458 
459 struct whd_event_msg
460 {
461  uint16_t version;
462  uint16_t flags; /* see flags below */
463  uint32_t event_type; /* Message (see below) */
464  uint32_t status; /* Status code (see below) */
465  uint32_t reason; /* Reason code (if applicable) */
466  uint32_t auth_type; /* WLC_E_AUTH */
467  uint32_t datalen; /* data buf */
468  whd_mac_t addr; /* Station address (if applicable) */
469  char ifname[WHD_MSG_IFNAME_MAX]; /* name of the packet incoming interface */
470  uint8_t ifidx; /* destination OS i/f index */
471  uint8_t bsscfgidx; /* source bsscfg index */
472 };
473 
474 /* used by driver msgs */
475 typedef struct whd_event
476 {
478  whd_event_eth_hdr_t eth_evt_hdr;
479  whd_event_header_t whd_event;
480  /* data portion follows */
481 } whd_event_t;
482 
483 #pragma pack()
484 
485 /** @endcond */
486 
487 /** @} */
488 
489 #ifdef __cplusplus
490 } /* extern "C" */
491 #endif
492 #endif /* ifndef INCLUDED_WHD_EVENTS_H */
493 
#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
#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
#define WLC_E_STATUS_ABORT
operation was aborted
Definition: whd_events.h:61
struct whd_event_eth_hdr whd_event_eth_hdr_t
Structure to store ethernet header fields in event packets.
#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
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:114
void *(* whd_error_handler_t)(whd_driver_t whd_driver, const uint8_t *error_type, const uint8_t *event_data, void *handler_user_data)
Error handler prototype definition.
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:105
#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
#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
uint16_t length
Length of ethernet header.
Definition: whd_events.h:129
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
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:108
#define WLC_E_STATUS_ATTEMPT
attempt to assoc to an auto auth configuration
Definition: whd_events.h:64
Event structure used by driver msgs.
Definition: whd_events.h:166
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:116
uint32_t whd_wifi_set_error_handler(whd_interface_t ifp, const uint8_t *error_nums, whd_error_handler_t handler_func, void *handler_user_data, uint16_t *error_index)
Registers a handler to receive error callbacks.
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
Waiting to receive handshake msg M1.
Definition: whd_events.h:111
uint16_t subtype
Vendor specific..32769.
Definition: whd_events.h:128
Structure to store fields after ethernet header in event message.
Definition: whd_events.h:148
uint8_t version
Version is 0.
Definition: whd_events.h:130
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
uint16_t usr_subtype
User specific data.
Definition: whd_events.h:132
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 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
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:102
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:110
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
#define WLC_E_STATUS_SUCCESS
operation was successful
Definition: whd_events.h:57
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:109
#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
#define WHD_MSG_IFNAME_MAX
Max length of Interface name.
Definition: whd_events.h:119
Preparing to send handshake msg M2.
Definition: whd_events.h:112
#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
uint32_t whd_wifi_deregister_error_handler(whd_interface_t ifp, uint16_t error_index)
Delete/Deregister the error entry where callback is registered.
#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
uint8_t oui[3]
Organizationally Unique Identifier.
Definition: whd_events.h:131
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:107
#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:106
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
Status offset added to the status codes to match the values from firmware.
Definition: whd_events.h:103
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.