|
1 /* |
|
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Type definitions and constants for core engine |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 93 % |
|
20 */ |
|
21 |
|
22 #ifndef CORE_TYPES_H |
|
23 #define CORE_TYPES_H |
|
24 |
|
25 #include "am_platform_libraries.h" |
|
26 |
|
27 /** The maximum length of SSID. */ |
|
28 const u8_t MAX_SSID_LEN = 32; |
|
29 |
|
30 /** The maximum length of MAC address. */ |
|
31 const u8_t MAC_ADDR_LEN = 6; |
|
32 |
|
33 /** The maximum length of a timestamp (TSF). */ |
|
34 const u8_t TSF_VALUE_LEN = 8; |
|
35 |
|
36 /** |
|
37 * The maximum length of a WEP key. |
|
38 * |
|
39 * 40-bit (64-bit) key has the length of 5. |
|
40 * 104-bit (128-bit) key has the length of 13. |
|
41 * 232-bit (256-bit) key has the length of 29. |
|
42 **/ |
|
43 const u8_t MAX_WEP_KEY_LENGTH = 29; |
|
44 |
|
45 /** |
|
46 * The maximum length of a WPA-PSK key. |
|
47 * |
|
48 * WPA-PSK passphrase is limited to 8 - 63 characters |
|
49 * in the range of 32 to 126 (decimal), inclusive. |
|
50 * |
|
51 * Length of 64 indicates the actual hashed PSK. |
|
52 */ |
|
53 const u8_t MAX_WPA_PSK_LENGTH = 64; |
|
54 |
|
55 /** The maximum length of a cipher key (256 bits). */ |
|
56 const u8_t MAX_CIPHER_KEY_LENGTH = 32; |
|
57 |
|
58 /** The maximum length of a RSN/WPA IE. */ |
|
59 const u8_t MAX_WPAIE_LENGTH = 255; |
|
60 |
|
61 const u8_t MAX_RATES = 40; |
|
62 |
|
63 const u8_t TX_RATE_BASIC_MASK = 0x80; |
|
64 |
|
65 /** Definitions for Capability bitmask in beacons/probe responses. */ |
|
66 const u16_t CAPABILITY_BIT_MASK_ESS = 0x0001; |
|
67 const u16_t CAPABILITY_BIT_MASK_IBSS = 0x0002; |
|
68 const u16_t CAPABILITY_BIT_MASK_PRIVACY = 0x0010; |
|
69 const u16_t CAPABILITY_BIT_MASK_PREAMBLE = 0x0020; |
|
70 const u16_t CAPABILITY_BIT_MASK_SLOT_TIME = 0x0400; |
|
71 |
|
72 const u8_t SCAN_BAND_2DOT4GHZ = 1; |
|
73 const u8_t SCAN_BAND_4DOT9GHZ = 2; |
|
74 const u8_t SCAN_BAND_5GHZ = 4; |
|
75 |
|
76 const u8_t MAX_TX_POWER_LEVEL_NOT_DEFINED = 0xFF; |
|
77 const u32_t MAX_TX_MSDU_LIFETIME_NOT_DEFINED = 0; |
|
78 const u16_t ADMISSION_CAPACITY_NOT_DEFINED = 0xFFFF; |
|
79 |
|
80 const u32_t REQUEST_ID_CORE_INTERNAL = 0; |
|
81 |
|
82 const u32_t WEP_KEY1 = 1; |
|
83 const u32_t WEP_KEY2 = 2; |
|
84 const u32_t WEP_KEY3 = 3; |
|
85 const u32_t WEP_KEY4 = 4; |
|
86 |
|
87 const u32_t EAP_TYPE_NONE = 0; |
|
88 const u32_t EAP_ERROR_NONE = 0; |
|
89 |
|
90 const u8_t RCPI_VALUE_NONE = 0; |
|
91 |
|
92 const u8_t MAX_COUNTRY_STRING_LENGTH = 3; |
|
93 |
|
94 const u8_t SCAN_BAND_2DOT4GHZ_MAX_CHANNEL_FCC = 11; |
|
95 const u8_t SCAN_BAND_2DOT4GHZ_MAX_CHANNEL_EURO = 13; |
|
96 |
|
97 /** Timer value for immediate queue execution. */ |
|
98 const u32_t CORE_TIMER_IMMEDIATELY = 0; |
|
99 |
|
100 const u32_t SECONDS_FROM_MICROSECONDS = 1000000; |
|
101 const u32_t SECONDS_FROM_MILLISECONDS = 1000; |
|
102 const u32_t MILLISECONDS_FROM_MICROSECONDS = 1000; |
|
103 const u32_t TIMEUNITS_FROM_MICROSECONDS = 1024; |
|
104 |
|
105 /** The maximum number of TX rate policies. */ |
|
106 const u8_t MAX_TX_RATE_POLICY = 4; |
|
107 |
|
108 /** The size of MCS information in a TX rate policy. */ |
|
109 const u8_t TX_RATE_POLICY_MCS_SIZE = 10; |
|
110 |
|
111 /** The number of QoS access classes. */ |
|
112 const u8_t MAX_QOS_ACCESS_CLASS = 4; |
|
113 |
|
114 /** The number of QoS user priority values. */ |
|
115 const u8_t MAX_QOS_USER_PRIORITY = 8; |
|
116 |
|
117 /** The maximum and minimum values of different integers. */ |
|
118 const u32_t MAX_U32 = 0xFFFFFFFF; |
|
119 const u32_t MIN_U32 = 0; |
|
120 const i32_t MAX_I32 = 0x7FFFFFFF; |
|
121 const i32_t MIN_I32 = static_cast<i32_t>( 0x80000000 ); |
|
122 |
|
123 const u32_t SCAN_LIST_AGE_ANY = MAX_U32; |
|
124 const u32_t SCAN_LIST_AGE_LAST_SCAN = MIN_U32; |
|
125 |
|
126 /** The length of OUI. */ |
|
127 const u8_t OUI_LENGTH = 3; |
|
128 |
|
129 /** The value for undefined virtual traffic stream TID. */ |
|
130 const u8_t TRAFFIC_STREAM_TID_NONE = 0xFF; |
|
131 |
|
132 /** The number of traffic stream TID values. */ |
|
133 const u8_t MAX_TRAFFIC_STREAM_TID = 8; |
|
134 |
|
135 typedef enum _core_scan_list_tag_e |
|
136 { |
|
137 core_scan_list_tag_none = 0x00, |
|
138 core_scan_list_tag_scan = 0x01, |
|
139 core_scan_list_tag_direct_scan = 0x02, |
|
140 core_scan_list_tag_roam_scan = 0x04, |
|
141 core_scan_list_tag_ibss_merge = 0x08 |
|
142 } core_scan_list_tag_e; |
|
143 |
|
144 /** |
|
145 * Defines the possible 802.11 authentication algorithms. |
|
146 */ |
|
147 typedef enum _core_authentication_mode_e |
|
148 { |
|
149 /** 802.11 Open System authentication algorithm. */ |
|
150 core_authentication_mode_open = 0, |
|
151 /** 802.11 Shared Key authentication algorithm. */ |
|
152 core_authentication_mode_shared = 1, |
|
153 } core_authentication_mode_e; |
|
154 |
|
155 /** |
|
156 * Definitions for the possible states indicated by core engine. |
|
157 */ |
|
158 typedef enum _core_connection_state_e |
|
159 { |
|
160 /** Connection is not active. No data flow. */ |
|
161 core_connection_state_notconnected, |
|
162 /** Connection to an access point is active. */ |
|
163 core_connection_state_infrastructure, |
|
164 /** Searching an access point. No data flow. */ |
|
165 core_connection_state_searching, |
|
166 /** IBSS network is active. */ |
|
167 core_connection_state_ibss, |
|
168 /** Secure connection to an access point is active. */ |
|
169 core_connection_state_secureinfra, |
|
170 /** Secure IBSS network is active. */ |
|
171 core_connection_state_secureibss |
|
172 } core_connection_state_e; |
|
173 |
|
174 /** |
|
175 * Security mode according to IAP definition |
|
176 */ |
|
177 typedef enum _core_security_mode_e |
|
178 { |
|
179 /** No encryption used. */ |
|
180 core_security_mode_allow_unsecure, |
|
181 /** Use WEP encryption with static keys. */ |
|
182 core_security_mode_wep, |
|
183 /** Use WEP encryption, keys are negotiated by EAPOL. */ |
|
184 core_security_mode_802dot1x, |
|
185 /** Use WEP/TKIP/CCMP encryption, keys are negotiated by EAPOL. */ |
|
186 core_security_mode_wpa, |
|
187 /** Use CCMP encryption, keys are negotiated by EAPOL. */ |
|
188 core_security_mode_wpa2only, |
|
189 /** Use Wi-Fi Protected Setup, keys are negotiated by EAPOL. */ |
|
190 core_security_mode_protected_setup, |
|
191 /** Use WAPI, keys are negotiated by EAPOL. */ |
|
192 core_security_mode_wapi |
|
193 } core_security_mode_e; |
|
194 |
|
195 /** |
|
196 * Security mode of the current connection |
|
197 */ |
|
198 typedef enum _core_connection_security_mode_e |
|
199 { |
|
200 /** No security used. */ |
|
201 core_connection_security_mode_open, |
|
202 /** Use Open WEP encryption with static keys. */ |
|
203 core_connection_security_mode_wep_open, |
|
204 /** Use Shared WEP encryption with static keys. */ |
|
205 core_connection_security_mode_wep_shared, |
|
206 /** Use WEP/TKIP/CCMP encryption, keys are negotiated by EAPOL. */ |
|
207 core_connection_security_mode_802d1x, |
|
208 /** Use TKIP/CCMP encryption, keys are negotiated by EAPOL. */ |
|
209 core_connection_security_mode_wpa, |
|
210 /** WPA with preshared key. */ |
|
211 core_connection_security_mode_wpa_psk, |
|
212 /** Use CCMP encryption, keys are negotiated by EAPOL. */ |
|
213 core_connection_security_mode_wpa2, |
|
214 /** WPA2 with preshared key. */ |
|
215 core_connection_security_mode_wpa2_psk, |
|
216 /** WAPI with certificates. */ |
|
217 core_connection_security_mode_wapi, |
|
218 /** WAPI with preshared key. */ |
|
219 core_connection_security_mode_wapi_psk |
|
220 } core_connection_security_mode_e; |
|
221 |
|
222 /** |
|
223 * The possible encryption modes. |
|
224 */ |
|
225 typedef enum _core_encryption_mode_e |
|
226 { |
|
227 /** No encryption used. */ |
|
228 core_encryption_mode_disabled, |
|
229 /** Use WEP encryption with static keys. */ |
|
230 core_encryption_mode_wep, |
|
231 /** Use WEP encryption with static keys in mixed cell. */ |
|
232 core_encryption_mode_wep_mixed_cell, |
|
233 /** Use WEP encryption, keys are negotiated by EAPOL. */ |
|
234 core_encryption_mode_802dot1x, |
|
235 /** Use WEP encryption in mixed cell, keys are negotiated by EAPOL. */ |
|
236 core_encryption_mode_802dot1x_mixed_cell, |
|
237 /** Use WEP/TKIP/CCMP encryption, keys are negotiated by EAPOL. */ |
|
238 core_encryption_mode_wpa, |
|
239 /** Use WPI encryption, keys are negotiated by EAPOL. */ |
|
240 core_encryption_mode_wpi |
|
241 } core_encryption_mode_e; |
|
242 |
|
243 /** |
|
244 * Defines all the possible indications that can be received from adaptation. |
|
245 */ |
|
246 typedef enum _core_am_indication_e |
|
247 { |
|
248 /** |
|
249 * AP has deauthenticated the station. |
|
250 */ |
|
251 core_am_indication_wlan_media_disconnect, |
|
252 /** |
|
253 * A fatal error has occurred in the lower layer. |
|
254 */ |
|
255 core_am_indication_wlan_hw_failed, |
|
256 /** |
|
257 * A number of consecutive beacons has been lost. |
|
258 * |
|
259 * @see core_bss_lost_parameters_s::beacon_lost_count |
|
260 */ |
|
261 core_am_indication_wlan_beacon_lost, |
|
262 /** |
|
263 * UMAC has not been able to perform a power mode state transition. |
|
264 */ |
|
265 core_am_indication_wlan_power_mode_failure, |
|
266 /** |
|
267 * A number of consecutive transmissions has failed. |
|
268 * |
|
269 * @see core_bss_lost_parameters_s::failed_tx_packet_count |
|
270 */ |
|
271 core_am_indication_wlan_tx_fail, |
|
272 /** |
|
273 * Connection to the BSS has been regained. This indication can occur after |
|
274 * core_am_indication_wlan_beacon_lost, |
|
275 * core_am_indication_wlan_power_mode_failure or |
|
276 * core_am_indication_wlan_tx_fail. |
|
277 */ |
|
278 core_am_indication_wlan_bss_regained, |
|
279 /** |
|
280 * Decryption of a received packet failed. |
|
281 */ |
|
282 core_am_indication_wlan_wep_decrypt_failure, |
|
283 /** |
|
284 * A MIC failure has been detected on a received unicast packet. |
|
285 */ |
|
286 core_am_indication_wlan_pairwise_key_mic_failure, |
|
287 /** |
|
288 * A MIC failure has been detected on a received broadcast |
|
289 * or multicast packet. |
|
290 */ |
|
291 core_am_indication_wlan_group_key_mic_failure, |
|
292 /** |
|
293 * Scan has been completed. |
|
294 */ |
|
295 core_am_indication_wlan_scan_complete, |
|
296 /** |
|
297 * Used to indicate that the RCPI trigger level has been been crossed. |
|
298 * This indication is one-shot, it will not be triggered again until |
|
299 * the level is set again. |
|
300 * |
|
301 * @see abs_core_driverif_callback_c::set_rcpi_trigger_level |
|
302 */ |
|
303 core_am_indication_wlan_rcpi_trigger, |
|
304 /** |
|
305 * Signal loss prediction algorithm has indicated an imminent signal |
|
306 * loss. |
|
307 */ |
|
308 core_am_indication_wlan_signal_loss_prediction, |
|
309 /** |
|
310 * UMAC has switched to power save mode after (re-)assocation, indicating |
|
311 * a possibility to run the power save test. |
|
312 */ |
|
313 core_am_indication_wlan_power_save_test_trigger, |
|
314 /** |
|
315 * The lower layer has detected problems with power save in the |
|
316 * current access point. |
|
317 */ |
|
318 core_am_indication_wlan_ap_ps_mode_error, |
|
319 /** |
|
320 * Indication of an imminent power loss. |
|
321 */ |
|
322 core_am_indication_os_power_standby, |
|
323 /** |
|
324 * Bluetooth connection has been established. |
|
325 */ |
|
326 core_am_indication_bt_connection_established, |
|
327 /** |
|
328 * Bluetooth connection has been disconnected. |
|
329 */ |
|
330 core_am_indication_bt_connection_disconnected, |
|
331 /** |
|
332 * Indication that voice call is on. |
|
333 */ |
|
334 core_am_indication_voice_call_on, |
|
335 /** |
|
336 * Indication that voice call is off. |
|
337 */ |
|
338 core_am_indication_voice_call_off |
|
339 } core_am_indication_e; |
|
340 |
|
341 /** |
|
342 * Structure for storing a MAC address. |
|
343 */ |
|
344 typedef struct _core_mac_address_s |
|
345 { |
|
346 u8_t addr[MAC_ADDR_LEN]; |
|
347 } core_mac_address_s; |
|
348 |
|
349 /** |
|
350 * Definition for an undefined MAC address. |
|
351 */ |
|
352 const core_mac_address_s ZERO_MAC_ADDR = {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}; |
|
353 |
|
354 /** |
|
355 * Definition for a broadcast MAC address. |
|
356 */ |
|
357 const core_mac_address_s BROADCAST_MAC_ADDR = {{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }}; |
|
358 |
|
359 /** |
|
360 * Structure for storing a timestamp (TSF) from a beacon/probe response. |
|
361 */ |
|
362 typedef struct _core_tsf_value_s |
|
363 { |
|
364 u8_t tsf[TSF_VALUE_LEN]; |
|
365 } core_tsf_value_s; |
|
366 |
|
367 /** |
|
368 * Data values for operating modes. |
|
369 */ |
|
370 typedef enum _core_operating_mode_e |
|
371 { |
|
372 /** The BSS is operating in infrastructure mode. */ |
|
373 core_operating_mode_infrastructure = CAPABILITY_BIT_MASK_ESS, |
|
374 /** The BSS is operating in IBSS (ad-hoc) mode. */ |
|
375 core_operating_mode_ibss = CAPABILITY_BIT_MASK_IBSS |
|
376 } core_operating_mode_e; |
|
377 |
|
378 /** |
|
379 * The possible scan modes. |
|
380 */ |
|
381 typedef enum _core_scan_mode_e |
|
382 { |
|
383 /** Send probe requests and listen to beacons and probe responses. */ |
|
384 core_scan_mode_active, |
|
385 /** Listen to beacons and probe responses. */ |
|
386 core_scan_mode_passive |
|
387 } core_scan_mode_e; |
|
388 |
|
389 /** |
|
390 * Structure for storing an SSID. |
|
391 */ |
|
392 typedef struct _core_ssid_s |
|
393 { |
|
394 /** Length of the SSID. */ |
|
395 u32_t length; |
|
396 /** SSID data. */ |
|
397 u8_t ssid[MAX_SSID_LEN]; |
|
398 } core_ssid_s; |
|
399 |
|
400 /** |
|
401 * Definition for a broadcast SSID. |
|
402 */ |
|
403 const core_ssid_s BROADCAST_SSID = { 0, { 0x00 }}; |
|
404 |
|
405 /** |
|
406 * Data structure for storing a WEP key. |
|
407 */ |
|
408 typedef struct _core_wep_key_s |
|
409 { |
|
410 /** Specifies which key to add or remove. Range: 0-3. */ |
|
411 u32_t key_index; |
|
412 /** The length of KeyMaterial in bytes. Range: 0-29. */ |
|
413 u32_t key_length; |
|
414 /** Array that stores the WEP key. */ |
|
415 u8_t key_data[MAX_WEP_KEY_LENGTH]; |
|
416 } core_wep_key_s; |
|
417 |
|
418 /** |
|
419 * Data structure for storing an ARP filters. |
|
420 */ |
|
421 typedef struct _core_arp_filter_s |
|
422 { |
|
423 u32_t ipv4_addr; |
|
424 bool_t enable_filter; |
|
425 } core_arp_filter_s; |
|
426 |
|
427 /** |
|
428 * Defines the possible error codes core engine can return. |
|
429 */ |
|
430 typedef enum _core_error_e |
|
431 { |
|
432 core_error_ok = 0, |
|
433 core_error_not_found, |
|
434 core_error_general, |
|
435 core_error_no_memory, |
|
436 core_error_illegal_rate, |
|
437 core_error_failed, |
|
438 core_error_drivers_not_loaded, |
|
439 core_error_in_power_save, |
|
440 core_error_challenge_failure, |
|
441 core_error_not_connected, |
|
442 core_error_illegal_argument, |
|
443 core_error_not_supported, |
|
444 core_error_in_use, |
|
445 core_error_timeout, |
|
446 core_error_internal_error, |
|
447 core_error_request_pending, |
|
448 core_error_cancel, |
|
449 core_error_eapol_total_failure, |
|
450 core_error_eapol_failure, |
|
451 core_error_eapol_canceled_by_user, |
|
452 core_error_connection_already_active, |
|
453 core_error_wlan_disabled, |
|
454 core_error_already_exists, |
|
455 core_error_eapol_auth_start_timeout, |
|
456 } core_error_e; |
|
457 |
|
458 /** |
|
459 * Defines the notification core engine can send to adaptation. |
|
460 */ |
|
461 typedef enum _core_notification_e |
|
462 { |
|
463 /** |
|
464 * Indicates a change in connection state. |
|
465 * |
|
466 * This indication has one to four bytes of payload data. The first byte |
|
467 * always contains the current connection state (core_connection_state_e). |
|
468 * |
|
469 * If the state is core_connection_state_notconnected, the second byte |
|
470 * contains the reason connection was closed (core_release_reason_e). |
|
471 * |
|
472 * If the state is core_connection_state_notconnected and the release reason |
|
473 * is core_release_reason_max_roam_attempts_exceeded, there are two more |
|
474 * bytes of payload data. The third byte contains the reason roaming was |
|
475 * attempted (core_roam_reason_e) and the fourth byte has the reason why |
|
476 * roaming failed (core_roam_failed_reason_e). |
|
477 */ |
|
478 core_notification_connection_state_changed, |
|
479 /** |
|
480 * Indicates a successful roam to another AP has been done. |
|
481 * |
|
482 * The payload data contains the BSSID of the AP as a core_mac_address_s |
|
483 * structure. |
|
484 */ |
|
485 core_notification_bssid_changed, |
|
486 /** |
|
487 * Indicates a temporary loss of connection. |
|
488 */ |
|
489 core_notification_bss_lost, |
|
490 /** |
|
491 * Indicates that connection has been regained after a |
|
492 * core_notification_bss_lost indication. |
|
493 */ |
|
494 core_notification_bss_regained, |
|
495 /** |
|
496 * Indicates the currently allowed maximum tx power. |
|
497 * |
|
498 * The payload data is four bytes, containing the maximum tx power |
|
499 * as u32_t. The value is in dBm. |
|
500 */ |
|
501 core_notification_tx_power_level_changed, |
|
502 /** |
|
503 * Indicates the RCPI indication threshold has been crossed. |
|
504 * |
|
505 * The first byte of payload data indicates the direction (core_rcp_class_e). |
|
506 * The second byte contains the current RCPI value. |
|
507 */ |
|
508 core_notification_rcp_changed, |
|
509 /** |
|
510 * Indicates a status change in a virtual traffic stream. |
|
511 * |
|
512 * The first four bytes of payload data contains the ID of the affected virtual |
|
513 * traffic stream. The second byte contains the status of the traffic stream |
|
514 * (core_traffic_stream_status_e). |
|
515 */ |
|
516 core_notification_ts_status_changed, |
|
517 /** |
|
518 * Indicates a change in the parameters of the current AP. |
|
519 * |
|
520 * The payload data consists of core_ap_information_s structure. |
|
521 * |
|
522 * While this indication is most likely triggered by a successful roam, |
|
523 * it should not be considered as an indication that a roam has happened. |
|
524 */ |
|
525 core_notification_ap_info_changed, |
|
526 /** |
|
527 * Indicates that an RCPI based roaming attempt has been started. |
|
528 * |
|
529 * If the roam attempt is successful, core_notification_bssid_changed and |
|
530 * core_notification_rcpi_roam_attempt_completed indications will be sent. |
|
531 * |
|
532 * If no suitable AP to roam to is found, only core_notification_rcpi_roam_attempt_completed |
|
533 * indication will be sent. |
|
534 * |
|
535 * If the attempt fails due to an association or authentication failure, |
|
536 * core_notification_connection_state_changed( core_connection_state_searching ) |
|
537 * will be sent to indicate that the terminal is no longer connected to |
|
538 * the previous AP. |
|
539 */ |
|
540 core_notification_rcpi_roam_attempt_started, |
|
541 /** |
|
542 * Indicates that the RCPI based roaming attempt has been completed. |
|
543 * |
|
544 * See the description of core_notification_rcpi_roam_attempt_started |
|
545 * for further information on this indication. |
|
546 */ |
|
547 core_notification_rcpi_roam_attempt_completed, |
|
548 /** |
|
549 * Indicates that the Broken Power Save test has failed. |
|
550 * |
|
551 * If the Broken Power Save test fails, the engine will not allow the any power |
|
552 * save functionality to be used with this BSSID, decreasing battery life. |
|
553 */ |
|
554 core_notification_broken_power_save_test_failed, |
|
555 /** |
|
556 * Indicates the traffic mode of an access class has changed. |
|
557 * |
|
558 * The first byte of payload data contains the access class |
|
559 * (core_access_class_e). The second byte contains the traffic mode |
|
560 * of the access class (core_access_class_traffic_mode_e). |
|
561 */ |
|
562 core_notification_ac_traffic_mode_changed, |
|
563 /** |
|
564 * Indicates the traffic status of an access class has changed. |
|
565 * |
|
566 * The first byte of payload data contains the access class |
|
567 * (core_access_class_e). The second byte contains the traffic status |
|
568 * of the access class (core_access_class_traffic_status_e). |
|
569 */ |
|
570 core_notification_ac_traffic_status_changed |
|
571 } core_notification_e; |
|
572 |
|
573 /** |
|
574 * The possible completion statuses for a connect request. |
|
575 */ |
|
576 typedef enum _core_connect_status_e |
|
577 { |
|
578 core_connect_undefined, |
|
579 core_connect_ok, |
|
580 core_connect_unspecified_failure, |
|
581 core_connect_network_not_found, |
|
582 core_connect_mode_infra_required_but_ibss_found, |
|
583 core_connect_mode_ibss_required_but_infra_found, |
|
584 core_connect_ap_full, |
|
585 core_connect_ap_not_whitelisted, |
|
586 core_connect_ap_permanently_blacklisted, |
|
587 core_connect_ap_temporarily_blacklisted, |
|
588 core_connect_ap_outside_defined_region, |
|
589 core_connect_ap_signal_too_weak, |
|
590 core_connect_ap_has_no_admission_control, |
|
591 core_connect_ap_has_no_free_admission_capability, |
|
592 core_connect_iap_open_but_ap_requires_encryption, |
|
593 core_connect_iap_wep_but_ap_has_no_privacy, |
|
594 core_connect_iap_wep_but_ap_has_wpa_ie, |
|
595 core_connect_iap_wpa_but_ap_has_no_privacy, |
|
596 core_connect_wep_open_authentication_unsupported, |
|
597 core_connect_wep_open_echo_test_failed, |
|
598 core_connect_wep_shared_authentication_unsupported, |
|
599 core_connect_wep_shared_authentication_failed, |
|
600 core_connect_wpa_ie_required_but_ap_has_none, |
|
601 core_connect_wpa_psk_required_but_ap_has_no_support, |
|
602 core_connect_wpa_eap_required_but_ap_has_no_support, |
|
603 core_connect_wpa_ap_has_no_valid_ciphers, |
|
604 core_connect_wpa_counter_measures_active, |
|
605 core_connect_wpa_authentication_canceled_by_user, |
|
606 core_connect_wpa_eap_failure, |
|
607 core_connect_wpa_psk_failure, |
|
608 core_connect_802_1x_authentication_canceled_by_user, |
|
609 core_connect_802_1x_authentication_algorithm_not_supported, |
|
610 core_connect_802_1x_failure, |
|
611 core_connect_eap_gtc_failure, |
|
612 core_connect_eap_tls_failure, |
|
613 core_connect_eap_tls_server_certificate_expired, |
|
614 core_connect_eap_tls_server_certificate_unknown, |
|
615 core_connect_eap_tls_user_certificate_expired, |
|
616 core_connect_eap_tls_user_certificate_unknown, |
|
617 core_connect_eap_tls_illegal_cipher_suite, |
|
618 core_connect_eap_tls_user_rejected, |
|
619 core_connect_eap_leap_failure, |
|
620 core_connect_eap_sim_failure, |
|
621 core_connect_eap_sim_identity_query_failed, |
|
622 core_connect_eap_sim_user_has_not_subscribed_to_the_requested_service, |
|
623 core_connect_eap_sim_users_calls_are_barred, |
|
624 core_connect_eap_ttls_failure, |
|
625 core_connect_eap_ttls_server_certificate_expired, |
|
626 core_connect_eap_ttls_server_certificate_unknown, |
|
627 core_connect_eap_ttls_user_certificate_expired, |
|
628 core_connect_eap_ttls_user_certificate_unknown, |
|
629 core_connect_eap_ttls_illegal_cipher_suite, |
|
630 core_connect_eap_ttls_user_rejected, |
|
631 core_connect_eap_aka_failure, |
|
632 core_connect_eap_aka_identity_query_failed, |
|
633 core_connect_eap_aka_user_has_not_subscribed_to_the_requested_service, |
|
634 core_connect_eap_aka_users_calls_are_barred, |
|
635 core_connect_eap_peap_failure, |
|
636 core_connect_eap_peap_server_certificate_expired, |
|
637 core_connect_eap_peap_server_certificate_unknown, |
|
638 core_connect_eap_peap_user_certificate_expired, |
|
639 core_connect_eap_peap_user_certificate_unknown, |
|
640 core_connect_eap_peap_illegal_cipher_suite, |
|
641 core_connect_eap_peap_user_rejected, |
|
642 core_connect_eap_mschapv2_failure, |
|
643 core_connect_eap_mschapv2_password_expired, |
|
644 core_connect_eap_mschapv2_no_dialin_permission, |
|
645 core_connect_eap_mschapv2_account_disabled, |
|
646 core_connect_eap_mschapv2_restricted_logon_hours, |
|
647 core_connect_eapol_auth_start_timeout, |
|
648 core_connect_eap_fast_tunnel_compromise_error, |
|
649 core_connect_eap_fast_unexpected_tlv_exhanged, |
|
650 core_connect_eap_fast_no_pac_nor_certs_to_authenticate_with_provision_disabled, |
|
651 core_connect_eap_fast_no_matching_pac_for_aid, |
|
652 core_connect_eap_fast_pac_store_corrupted, |
|
653 core_connect_eap_fast_authentication_failed, |
|
654 core_connect_iap_wapi_but_ap_has_no_privacy, |
|
655 core_connect_wapi_ie_required_but_ap_has_none, |
|
656 core_connect_wapi_certificate_required_but_ap_has_no_support, |
|
657 core_connect_wapi_psk_required_but_ap_has_no_support, |
|
658 core_connect_wapi_ap_has_no_valid_ciphers, |
|
659 core_connect_wapi_psk_failure, |
|
660 core_connect_wapi_certificate_failure, |
|
661 } core_connect_status_e; |
|
662 |
|
663 /** |
|
664 * Possible completion status for a protected setup request. |
|
665 */ |
|
666 typedef enum _core_protected_setup_status_e |
|
667 { |
|
668 core_protected_setup_status_undefined, |
|
669 core_protected_setup_status_ok, |
|
670 core_protected_setup_status_session_overlap, |
|
671 core_protected_setup_status_walktime_expired, |
|
672 core_protected_setup_status_network_auth_failure, |
|
673 core_protected_setup_status_network_assoc_failure, |
|
674 core_protected_setup_status_OOB_interface_read_error, |
|
675 core_protected_setup_status_decryption_CRC_failure, |
|
676 core_protected_setup_status_RF_band_2_4_ghz_not_supported, |
|
677 core_protected_setup_status_RF_band_5_0_ghz_not_supported, |
|
678 core_protected_setup_status_signal_too_weak, |
|
679 core_protected_setup_status_no_DHCP_response, |
|
680 core_protected_setup_status_failed_DHCP_configure, |
|
681 core_protected_setup_status_ip_address_conflict, |
|
682 core_protected_setup_status_could_not_connect_to_registrar, |
|
683 core_protected_setup_status_multiple_PBC_sessions_detected, |
|
684 core_protected_setup_status_rogue_activity_suspected, |
|
685 core_protected_setup_status_device_busy, |
|
686 core_protected_setup_status_setup_locked, |
|
687 core_protected_setup_status_message_timeout, |
|
688 core_protected_setup_status_registration_session_timeout, |
|
689 core_protected_setup_status_device_password_authentication_failure, |
|
690 core_protected_setup_status_pin_code_authentication_not_supported, |
|
691 core_protected_setup_status_push_button_authentication_not_supported |
|
692 } core_protected_setup_status_e; |
|
693 |
|
694 typedef enum _core_rcp_class_e |
|
695 { |
|
696 core_rcp_normal, |
|
697 core_rcp_weak |
|
698 } core_rcp_class_e; |
|
699 |
|
700 /** |
|
701 * Definitions for possible WLAN regions. |
|
702 */ |
|
703 typedef enum _core_wlan_region_e |
|
704 { |
|
705 /** Undefined region */ |
|
706 core_wlan_region_undefined = 0x00, |
|
707 /** Channels 1-11, USA */ |
|
708 core_wlan_region_fcc = 0x10, |
|
709 /** Channels 1-13, Europe */ |
|
710 core_wlan_region_etsi = 0x30, |
|
711 } core_wlan_region_e; |
|
712 |
|
713 typedef struct _core_wpa_preshared_key_s |
|
714 { |
|
715 /** The length of KeyMaterial in bytes. Range: 0-63 */ |
|
716 uint_t key_length; |
|
717 /** Array of that stores the WPA Pre-Shared Key. */ |
|
718 u8_t key_data[MAX_WPA_PSK_LENGTH]; |
|
719 } core_wpa_preshared_key_s; |
|
720 |
|
721 typedef enum _core_cipher_key_type_e |
|
722 { |
|
723 core_cipher_key_type_none, |
|
724 core_cipher_key_type_tkip, |
|
725 core_cipher_key_type_ccmp, |
|
726 core_cipher_key_type_wep, |
|
727 core_cipher_key_type_wpi, |
|
728 } core_cipher_key_type_e; |
|
729 |
|
730 typedef enum _core_cipher_suite_e |
|
731 { |
|
732 core_cipher_suite_none = 0, |
|
733 core_cipher_suite_wep40 = 1, |
|
734 core_cipher_suite_wep104 = 2, |
|
735 core_cipher_suite_tkip = 4, |
|
736 core_cipher_suite_ccmp = 8, |
|
737 core_cipher_suite_wpi = 16 |
|
738 } core_cipher_suite_e; |
|
739 |
|
740 typedef enum _core_key_management_e |
|
741 { |
|
742 core_key_management_none = 0, |
|
743 core_key_management_eap = 1, |
|
744 core_key_management_preshared = 2, |
|
745 core_key_management_wpx_fast_roam = 4, |
|
746 core_key_management_wapi_certificate = 8, |
|
747 core_key_management_wapi_psk = 16 |
|
748 } core_key_management_e; |
|
749 |
|
750 /** |
|
751 * Definitions for power save modes. |
|
752 */ |
|
753 typedef enum _core_power_save_mode_e |
|
754 { |
|
755 /** |
|
756 * Automatic mode, wake-up mode and interval adjusted automatically. |
|
757 */ |
|
758 core_power_save_mode_automatic, |
|
759 /** |
|
760 * Continuous access mode (CAM), no power save. |
|
761 */ |
|
762 core_power_save_mode_none, |
|
763 /** |
|
764 * Power save, wake-up at every Nth beacon. |
|
765 */ |
|
766 core_power_save_mode_beacon, |
|
767 /** |
|
768 * Power save, wake-up at every Nth DTIM. |
|
769 */ |
|
770 core_power_save_mode_dtim, |
|
771 /** |
|
772 * Power save, wake-up at every Nth DTIM, where N is defined by |
|
773 * DTIM skipping interval. |
|
774 */ |
|
775 core_power_save_mode_dtim_skipping |
|
776 } core_power_save_mode_e; |
|
777 |
|
778 typedef enum _core_slot_time_e |
|
779 { |
|
780 core_slot_time_short, |
|
781 core_slot_time_long |
|
782 } core_slot_time_e; |
|
783 |
|
784 /** |
|
785 * Possible 802.11b and 802.11g status codes |
|
786 */ |
|
787 typedef enum _core_management_status_e |
|
788 { |
|
789 core_management_status_success = 0, |
|
790 core_management_status_unspecified_failure = 1, |
|
791 // 2 - 9 are reserved. |
|
792 core_management_status_unsupported_capabilities = 10, |
|
793 core_management_status_reassociation_denied_other = 11, |
|
794 core_management_status_association_denied_other = 12, |
|
795 core_management_status_auth_algo_not_supported = 13, |
|
796 core_management_status_auth_frame_out_of_sequence = 14, |
|
797 core_management_status_auth_challenge_failure = 15, |
|
798 core_management_status_auth_timeout = 16, |
|
799 core_management_status_assoc_denied_full_ap = 17, |
|
800 core_management_status_assoc_unsup_basic_rates = 18, |
|
801 core_management_status_assoc_unsup_short_preamble = 19, |
|
802 core_management_status_assoc_unsup_pbcc = 20, |
|
803 core_management_status_assoc_unsup_channel_agility = 21, |
|
804 // 22 - 24 reserved. |
|
805 core_management_status_assoc_unsup_short_slot_time = 25, |
|
806 core_management_status_assoc_unsup_dsss_ofdm = 26 |
|
807 // 27 - 65,535 reserved |
|
808 } core_management_status_e; |
|
809 |
|
810 /** |
|
811 * The frame types the core server can send and receive. |
|
812 */ |
|
813 typedef enum _core_frame_type_e |
|
814 { |
|
815 core_frame_type_ethernet, |
|
816 core_frame_type_dot11, |
|
817 core_frame_type_snap, |
|
818 core_frame_type_test |
|
819 } core_frame_type_e; |
|
820 |
|
821 /** |
|
822 * The possible physical medium types. |
|
823 */ |
|
824 typedef enum _core_phy_type_e |
|
825 { |
|
826 core_phy_type_ofdm, |
|
827 core_phy_type_high_rate_dss, |
|
828 core_phy_type_erp |
|
829 } core_phy_type_e; |
|
830 |
|
831 /** |
|
832 * operation types. |
|
833 */ |
|
834 typedef enum _core_operation_type_e |
|
835 { |
|
836 core_operation_unspecified, |
|
837 core_operation_check_rcpi, |
|
838 core_operation_configure_multicast_group, |
|
839 core_operation_connect, |
|
840 core_operation_get_available_iaps, |
|
841 core_operation_get_rcpi, |
|
842 core_operation_handle_bss_lost, |
|
843 core_operation_handle_frame, |
|
844 core_operation_handle_delete_ts, |
|
845 core_operation_handle_measurement_request, |
|
846 core_operation_handle_neighbor_response, |
|
847 core_operation_ibss_merge, |
|
848 core_operation_null, |
|
849 core_operation_release, |
|
850 core_operation_roam, |
|
851 core_operation_scan, |
|
852 core_operation_set_cipher_key, |
|
853 core_operation_unload_drivers, |
|
854 core_operation_update_device_settings, |
|
855 core_operation_update_power_mode, |
|
856 core_operation_update_rxtx_parameters, |
|
857 core_operation_create_ts, |
|
858 core_operation_delete_ts, |
|
859 core_operation_get_statistics, |
|
860 core_operation_set_uapsd_settings, |
|
861 core_operation_set_power_save_settings, |
|
862 core_operation_protected_setup, |
|
863 core_operation_power_save_test, |
|
864 core_operation_set_arp_filter, |
|
865 core_operation_directed_roam, |
|
866 /** Not a real operation, defined as upper bound. */ |
|
867 core_operation_max |
|
868 } core_operation_type_e; |
|
869 |
|
870 /** |
|
871 * Defines the possible values of maximum service period length. |
|
872 */ |
|
873 typedef enum _core_max_service_period_length_e |
|
874 { |
|
875 core_max_service_period_length_all, |
|
876 core_max_service_period_length_two, |
|
877 core_max_service_period_length_four, |
|
878 core_max_service_period_length_six |
|
879 } core_max_service_period_length_e; |
|
880 |
|
881 /** |
|
882 * Defines the possible QoS Access Classes. |
|
883 */ |
|
884 typedef enum _core_access_class_e |
|
885 { |
|
886 core_access_class_best_effort = 0, |
|
887 core_access_class_background = 1, |
|
888 core_access_class_video = 2, |
|
889 core_access_class_voice = 3 |
|
890 } core_access_class_e; |
|
891 |
|
892 /** |
|
893 * Defines the possible TX rate values. |
|
894 */ |
|
895 typedef enum _core_tx_rate_e |
|
896 { |
|
897 core_tx_rate_none = 0x00000000, |
|
898 core_tx_rate_1mbit = 0x00000001, |
|
899 core_tx_rate_2mbit = 0x00000002, |
|
900 core_tx_rate_5p5mbit = 0x00000004, |
|
901 core_tx_rate_6mbit = 0x00000008, |
|
902 core_tx_rate_9mbit = 0x00000010, |
|
903 core_tx_rate_11mbit = 0x00000020, |
|
904 core_tx_rate_12mbit = 0x00000040, |
|
905 core_tx_rate_18mbit = 0x00000080, |
|
906 core_tx_rate_22mbit = 0x00000100, |
|
907 core_tx_rate_24mbit = 0x00000200, |
|
908 core_tx_rate_33mbit = 0x00000400, |
|
909 core_tx_rate_36mbit = 0x00000800, |
|
910 core_tx_rate_48mbit = 0x00001000, |
|
911 core_tx_rate_54mbit = 0x00002000 |
|
912 } core_tx_rate_e; |
|
913 |
|
914 const u32_t CORE_TX_RATES_802P11B = |
|
915 core_tx_rate_1mbit | |
|
916 core_tx_rate_2mbit | |
|
917 core_tx_rate_5p5mbit | |
|
918 core_tx_rate_11mbit; |
|
919 |
|
920 const u32_t CORE_TX_RATES_802P11G = |
|
921 core_tx_rate_6mbit | |
|
922 core_tx_rate_9mbit | |
|
923 core_tx_rate_12mbit | |
|
924 core_tx_rate_18mbit | |
|
925 core_tx_rate_22mbit | |
|
926 core_tx_rate_24mbit | |
|
927 core_tx_rate_33mbit | |
|
928 core_tx_rate_36mbit | |
|
929 core_tx_rate_48mbit | |
|
930 core_tx_rate_54mbit; |
|
931 |
|
932 const u32_t CORE_TX_RATES_802P11BG = |
|
933 CORE_TX_RATES_802P11B | |
|
934 CORE_TX_RATES_802P11G; |
|
935 |
|
936 /** |
|
937 * Define the possible TX rate value as units of 500kbit/s. |
|
938 */ |
|
939 typedef enum _core_tx_rate_value_e |
|
940 { |
|
941 core_tx_rate_value_none = 0, |
|
942 core_tx_rate_value_1mbit = 2, |
|
943 core_tx_rate_value_2mbit = 4, |
|
944 core_tx_rate_value_5p5mbit = 11, |
|
945 core_tx_rate_value_6mbit = 12, |
|
946 core_tx_rate_value_9mbit = 18, |
|
947 core_tx_rate_value_11mbit = 22, |
|
948 core_tx_rate_value_12mbit = 24, |
|
949 core_tx_rate_value_18mbit = 36, |
|
950 core_tx_rate_value_22mbit = 44, |
|
951 core_tx_rate_value_24mbit = 48, |
|
952 core_tx_rate_value_33mbit = 66, |
|
953 core_tx_rate_value_36mbit = 72, |
|
954 core_tx_rate_value_48mbit = 96, |
|
955 core_tx_rate_value_54mbit = 108, |
|
956 } _core_tx_rate_value_e; |
|
957 |
|
958 /** |
|
959 * The possible statuses of a virtual traffic stream. |
|
960 */ |
|
961 typedef enum _core_traffic_stream_status_e |
|
962 { |
|
963 /** |
|
964 * Initialization value, never returned as a status. |
|
965 */ |
|
966 core_traffic_stream_status_undefined, |
|
967 /** |
|
968 * The traffic stream is active in the current access point. |
|
969 */ |
|
970 core_traffic_stream_status_active, |
|
971 /** |
|
972 * The traffic stream is not active in the current access point |
|
973 * because the AP doesn't require admission control. |
|
974 */ |
|
975 core_traffic_stream_status_inactive_not_required, |
|
976 /** |
|
977 * The traffic stream is not active in the current access point |
|
978 * because the AP has deleted the traffic stream. |
|
979 */ |
|
980 core_traffic_stream_status_inactive_deleted_by_ap, |
|
981 /** |
|
982 * The traffic stream is not active in the current access point |
|
983 * because the AP has refused the traffic stream request due to |
|
984 * insufficient over-the-air bandwidth. |
|
985 */ |
|
986 core_traffic_stream_status_inactive_no_bandwidth, |
|
987 /** |
|
988 * The traffic stream is not active in the current access point |
|
989 * because the AP has refused the traffic stream request due to |
|
990 * invalid traffic stream parameters. |
|
991 */ |
|
992 core_traffic_stream_status_inactive_invalid_parameters, |
|
993 /** |
|
994 * The traffic stream is not active in the current access point |
|
995 * because the AP has refused the traffic stream request due to |
|
996 * other reasons. |
|
997 */ |
|
998 core_traffic_stream_status_inactive_other |
|
999 } core_traffic_stream_status_e; |
|
1000 |
|
1001 /** |
|
1002 * The possible reasons for a roam. |
|
1003 */ |
|
1004 typedef enum _core_roam_reason_e |
|
1005 { |
|
1006 /** Initial value if no roaming has been done. */ |
|
1007 core_roam_reason_none, |
|
1008 /** Initial connection attempt. */ |
|
1009 core_roam_reason_initial_connect, |
|
1010 /** Connection to the previous AP has been lost. */ |
|
1011 core_roam_reason_bss_lost, |
|
1012 /** The previous AP has deauthenticated us. */ |
|
1013 core_roam_reason_media_disconnect, |
|
1014 /** Signal strength was too low. */ |
|
1015 core_roam_reason_signal_strength, |
|
1016 /** Signal loss was predicted. */ |
|
1017 core_roam_reason_signal_loss_prediction, |
|
1018 /** Failed EAPOL reauthentication. */ |
|
1019 core_roam_reason_failed_reauthentication, |
|
1020 /** Due to directed roam request. */ |
|
1021 core_roam_reason_directed_roam, |
|
1022 /** Not a real reason, defined as an upper bound. */ |
|
1023 core_roam_reason_max |
|
1024 } core_roam_reason_e; |
|
1025 |
|
1026 /** |
|
1027 * The possible reasons for a failed roaming attempt. |
|
1028 */ |
|
1029 typedef enum _core_roam_failed_reason_e |
|
1030 { |
|
1031 /** Initial value if no roaming has been done. */ |
|
1032 core_roam_failed_reason_none, |
|
1033 /** Authentication or (re-)association has timed out. */ |
|
1034 core_roam_failed_reason_timeout, |
|
1035 /** No suitable AP found either due to an empty scan or blacklisting. */ |
|
1036 core_roam_failed_reason_no_suitable_ap, |
|
1037 /** AP has rejected authentication or (re-)association with a status code. */ |
|
1038 core_roam_failed_reason_ap_status_code, |
|
1039 /** EAPOL authentication has failed. */ |
|
1040 core_roam_failed_reason_eapol_failure, |
|
1041 /** Failures not covered by defined reasons above. */ |
|
1042 core_roam_failed_reason_other_failure, |
|
1043 /** Not a real reason, defined as an upper bound. */ |
|
1044 core_roam_failed_reason_max |
|
1045 } core_roam_failed_reason_e; |
|
1046 |
|
1047 /** |
|
1048 * The possible reasons why a connection was released. |
|
1049 */ |
|
1050 typedef enum _core_release_reason_e |
|
1051 { |
|
1052 /** Release was requested by an external party. */ |
|
1053 core_release_reason_external_request, |
|
1054 /** Maximum number of roaming attempts was exceeded. */ |
|
1055 core_release_reason_max_roam_attempts_exceeded, |
|
1056 /** Release was due to a HW failure indication. */ |
|
1057 core_release_reason_hw_failure, |
|
1058 /** Release was due to TKIP MIC failure. */ |
|
1059 core_release_reason_tkip_mic_failure, |
|
1060 /** Reasons not covered by defined reasons above. */ |
|
1061 core_release_reason_other, |
|
1062 /** Not a real reason, defined as an upper bound. */ |
|
1063 core_release_reason_max |
|
1064 } core_release_reason_e; |
|
1065 |
|
1066 /** |
|
1067 * The possible reasons an access point was blacklisted. |
|
1068 */ |
|
1069 typedef enum _core_ap_blacklist_reason_e |
|
1070 { |
|
1071 /** No blacklisting required. */ |
|
1072 core_ap_blacklist_reason_none = 0, |
|
1073 /** Blacklisting was requested by an external party. */ |
|
1074 core_ap_blacklist_reason_external = 1, |
|
1075 /** Blacklisting was based on failed WPA/802.1x authentication. */ |
|
1076 core_ap_blacklist_reason_eapol_failure = 2, |
|
1077 /** Blacklisting was based on association response status. */ |
|
1078 core_ap_blacklist_reason_association_status = 4, |
|
1079 /** Blacklisting due to exceeded max_ap_association_failure_count. */ |
|
1080 core_ap_blacklist_reason_max_association_failure_count = 8, |
|
1081 /** Blacklisting due to exceeded max_ap_deauthentication_count. */ |
|
1082 core_ap_blacklist_reason_max_deauthentication_count = 16, |
|
1083 /** Not a real reason, defined as an upper bound. */ |
|
1084 core_ap_blacklist_reason_max |
|
1085 } core_ap_blacklist_reason_e; |
|
1086 |
|
1087 /** |
|
1088 * Defines the operating modes of EAPOL stack. |
|
1089 */ |
|
1090 typedef enum _core_eapol_operating_mode_e |
|
1091 { |
|
1092 core_eapol_operating_mode_wfa, |
|
1093 core_eapol_operating_mode_wapi |
|
1094 } core_eapol_operating_mode_e; |
|
1095 |
|
1096 /** |
|
1097 * Definitions for possible power modes. |
|
1098 */ |
|
1099 typedef enum _core_power_mode_e |
|
1100 { |
|
1101 /** Continuous access mode (CAM), no power save. */ |
|
1102 core_power_mode_cam, |
|
1103 /** Power save mode (PS). */ |
|
1104 core_power_mode_ps |
|
1105 } core_power_mode_e; |
|
1106 |
|
1107 /** |
|
1108 * Definitions for power save wake-up modes. |
|
1109 */ |
|
1110 typedef enum _core_power_save_wakeup_mode_e |
|
1111 { |
|
1112 /** Wake-up at every Nth beacon. */ |
|
1113 core_power_save_wakeup_mode_beacon, |
|
1114 /** Wake-up at every Nth DTIM. */ |
|
1115 core_power_save_wakeup_mode_dtim |
|
1116 } core_power_save_wakeup_mode_e; |
|
1117 |
|
1118 /** |
|
1119 * Definitions for run-time feature configuration flags. |
|
1120 */ |
|
1121 typedef enum _core_feature_e |
|
1122 { |
|
1123 /** No configurable features enabled. */ |
|
1124 core_feature_none = 0, |
|
1125 /** Power save test enabled. */ |
|
1126 core_feature_power_save_test = 1, |
|
1127 /** 802.11k support enabled. */ |
|
1128 core_feature_802dot11k = 2 |
|
1129 } core_feature_e; |
|
1130 |
|
1131 /** |
|
1132 * Definitions for possible traffic modes for an access class. |
|
1133 */ |
|
1134 typedef enum _core_access_class_traffic_mode_e |
|
1135 { |
|
1136 /** Automatic traffic stream creation is allowed. */ |
|
1137 core_access_class_traffic_mode_automatic, |
|
1138 /** Automatic traffic stream creation is NOT allowed. */ |
|
1139 core_access_class_traffic_mode_manual |
|
1140 } core_access_class_traffic_mode_e; |
|
1141 |
|
1142 /** |
|
1143 * Definitions for possible traffic statuses for an access class. |
|
1144 */ |
|
1145 typedef enum _core_access_class_traffic_status_e |
|
1146 { |
|
1147 /** |
|
1148 * Traffic for this access class has been admitted. |
|
1149 */ |
|
1150 core_access_class_traffic_status_admitted, |
|
1151 /** |
|
1152 * Traffic for this access class has NOT been admitted, |
|
1153 * traffic needs to be downgraded to a lower access class. |
|
1154 */ |
|
1155 core_access_class_traffic_status_not_admitted |
|
1156 } core_access_class_traffic_status_e; |
|
1157 |
|
1158 /** |
|
1159 * Enumeration for traffic stream direction. |
|
1160 */ |
|
1161 typedef enum _core_traffic_stream_direction_e |
|
1162 { |
|
1163 /** Admission is requested for uplink traffic. */ |
|
1164 core_traffic_stream_direction_uplink = 0, |
|
1165 /** Admission is requested for downlink traffic. */ |
|
1166 core_traffic_stream_direction_downlink = 1, |
|
1167 /** Admission is requested for both uplink and downlink traffic. */ |
|
1168 core_traffic_stream_direction_bidirectional = 3 |
|
1169 } core_traffic_stream_direction_e; |
|
1170 |
|
1171 /** |
|
1172 * Structure for storing WLAN packet statistics. |
|
1173 */ |
|
1174 struct core_packet_statistics_s |
|
1175 { |
|
1176 /** |
|
1177 * Number of successfully received data frames. |
|
1178 */ |
|
1179 u32_t rx_frames; |
|
1180 /** |
|
1181 * Number of sent data frames. |
|
1182 */ |
|
1183 u32_t tx_frames; |
|
1184 /** |
|
1185 * Number of successfully received multicast data frames. |
|
1186 */ |
|
1187 u32_t rx_multicast_frames; |
|
1188 /** |
|
1189 * Number of sent multicast data frames. |
|
1190 */ |
|
1191 u32_t tx_multicast_frames; |
|
1192 /** |
|
1193 * Number of received frames with FCS errors. |
|
1194 */ |
|
1195 u32_t fcs_errors; |
|
1196 /** |
|
1197 * Total number of retransmissions done. |
|
1198 */ |
|
1199 u32_t tx_retries; |
|
1200 /** |
|
1201 * Number of data frames that could not be to delivered. |
|
1202 */ |
|
1203 u32_t tx_errors; |
|
1204 }; |
|
1205 |
|
1206 /** |
|
1207 * Structure for storing WLAN packet statistics per access category. |
|
1208 */ |
|
1209 struct core_packet_statistics_for_access_category_s |
|
1210 { |
|
1211 /** |
|
1212 * Number of successfully received data frames. |
|
1213 */ |
|
1214 u32_t rx_frames; |
|
1215 /** |
|
1216 * Number of sent data frames. |
|
1217 */ |
|
1218 u32_t tx_frames; |
|
1219 /** |
|
1220 * Number of successfully received multicast data frames. |
|
1221 */ |
|
1222 u32_t rx_multicast_frames; |
|
1223 /** |
|
1224 * Number of sent multicast data frames. |
|
1225 */ |
|
1226 u32_t tx_multicast_frames; |
|
1227 /** |
|
1228 * Total number of retransmissions done. |
|
1229 */ |
|
1230 u32_t tx_retries; |
|
1231 /** |
|
1232 * Number of data frames that could not be to delivered. |
|
1233 */ |
|
1234 u32_t tx_errors; |
|
1235 /** |
|
1236 * Average data frame Transmit / Media Delay in microseconds. |
|
1237 */ |
|
1238 u32_t tx_media_delay; |
|
1239 /** |
|
1240 * Average data frame Total Transmit Delay in microseconds. |
|
1241 */ |
|
1242 u32_t tx_total_delay; |
|
1243 /** |
|
1244 * Number of frame whose whose total transmit delay was <= 10ms. |
|
1245 */ |
|
1246 u32_t tx_total_delay_bin0; |
|
1247 /** |
|
1248 * Number of frame whose whose total transmit delay was ]10,20]ms. |
|
1249 */ |
|
1250 u32_t tx_total_delay_bin1; |
|
1251 /** |
|
1252 * Number of frame whose whose total transmit delay was ]20,40]ms. |
|
1253 */ |
|
1254 u32_t tx_total_delay_bin2; |
|
1255 /** |
|
1256 * Number of frame whose whose total transmit delay was > 40ms. |
|
1257 */ |
|
1258 u32_t tx_total_delay_bin3; |
|
1259 }; |
|
1260 |
|
1261 /** |
|
1262 * Structure for storing WLAN packet statistics for all the access categories. |
|
1263 */ |
|
1264 struct core_packet_statistics_by_access_category_s |
|
1265 { |
|
1266 /** |
|
1267 * Statistics per access category. |
|
1268 */ |
|
1269 core_packet_statistics_for_access_category_s ac[MAX_QOS_ACCESS_CLASS]; |
|
1270 /** |
|
1271 * Number of received frames with FCS errors. |
|
1272 */ |
|
1273 u32_t fcs_errors; |
|
1274 }; |
|
1275 |
|
1276 /** |
|
1277 * Structure for storing U-APSD settings for the access categories. |
|
1278 */ |
|
1279 struct core_uapsd_settings_s |
|
1280 { |
|
1281 /** |
|
1282 * Defines the maximum number of frames to send during a service period. |
|
1283 */ |
|
1284 core_max_service_period_length_e max_service_period; |
|
1285 /** |
|
1286 * Whether U-APSD is trigger and delivery-enabled for Voice. |
|
1287 */ |
|
1288 bool_t uapsd_enabled_for_voice; |
|
1289 /** |
|
1290 * Whether U-APSD is trigger and delivery-enabled for Video. |
|
1291 */ |
|
1292 bool_t uapsd_enabled_for_video; |
|
1293 /** |
|
1294 * Whether U-APSD is trigger and delivery-enabled for BestEffort. |
|
1295 */ |
|
1296 bool_t uapsd_enabled_for_best_effort; |
|
1297 /** |
|
1298 * Whether U-APSD is trigger and delivery-enabled for Background. |
|
1299 */ |
|
1300 bool_t uapsd_enabled_for_background; |
|
1301 }; |
|
1302 |
|
1303 /** |
|
1304 * Structure for storing parameters related to AP lost indications. |
|
1305 */ |
|
1306 struct core_bss_lost_parameters_s |
|
1307 { |
|
1308 /** |
|
1309 * The number of consecutive beacons that can be lost before |
|
1310 * core_am_indication_wlan_beacon_lost is indicated. |
|
1311 */ |
|
1312 u32_t beacon_lost_count; |
|
1313 /** |
|
1314 * The number of consecutive transmissions that can fail |
|
1315 * before core_am_indication_wlan_tx_fail indicated. |
|
1316 */ |
|
1317 u8_t failed_tx_packet_count; |
|
1318 }; |
|
1319 |
|
1320 /** |
|
1321 * Structure for storing parameters related to tx rate adaptation algorithm. |
|
1322 */ |
|
1323 struct core_tx_rate_adaptation_parameters_s |
|
1324 { |
|
1325 /** |
|
1326 * Minimum and initial rate increase checkpoint in units of frames. |
|
1327 */ |
|
1328 u8_t min_stepup_checkpoint; |
|
1329 /** |
|
1330 * Maximum rate increase checkpoint in units of frames. |
|
1331 */ |
|
1332 u8_t max_stepup_checkpoint; |
|
1333 /** |
|
1334 * Rate increase checkpoint is multiplied with this value if sending of a probe frame fails. |
|
1335 */ |
|
1336 u8_t stepup_checkpoint_factor; |
|
1337 /** |
|
1338 * After this many frames the need to decrease the rate is checked. |
|
1339 */ |
|
1340 u8_t stepdown_checkpoint; |
|
1341 /** |
|
1342 * Minimum and initial rate increase threshold percentage. |
|
1343 */ |
|
1344 u8_t min_stepup_threshold; |
|
1345 /** |
|
1346 * Maximum rate increase threshold percentage value. |
|
1347 */ |
|
1348 u8_t max_stepup_threshold; |
|
1349 /** |
|
1350 * Rate increase threshold is incremented by this value if sending of a probe frame fails. |
|
1351 */ |
|
1352 u8_t stepup_threshold_increment; |
|
1353 /** |
|
1354 * Rate decrease threshold percentage. |
|
1355 */ |
|
1356 u8_t stepdown_threshold; |
|
1357 /** |
|
1358 * If false_t, the rate adaptation algorithm handles the first frame transmitted after a |
|
1359 * rate increase in a special way. |
|
1360 */ |
|
1361 bool_t disable_probe_handling; |
|
1362 }; |
|
1363 |
|
1364 /** |
|
1365 * Structure for storing parameters related to power mode management algorithm. |
|
1366 */ |
|
1367 struct core_power_mode_mgmt_parameters_s |
|
1368 { |
|
1369 /** |
|
1370 * Time interval in microseconds after which transition from Active mode |
|
1371 * to Light PS mode is considered. |
|
1372 */ |
|
1373 u32_t active_to_light_timeout; |
|
1374 /** |
|
1375 * Frame count threshold used when considering transition from Active |
|
1376 * to Light PS mode. |
|
1377 */ |
|
1378 u16_t active_to_light_threshold; |
|
1379 /** |
|
1380 * Time interval in microseconds after which the frame counter used when |
|
1381 * considering transition from Light PS to Active mode is reset. |
|
1382 */ |
|
1383 u32_t light_to_active_timeout; |
|
1384 /** |
|
1385 * Frame count threshold used when considering transition from Light PS |
|
1386 * to Active mode. |
|
1387 */ |
|
1388 u16_t light_to_active_threshold; |
|
1389 /** |
|
1390 * Time interval in microseconds after which transition from Light PS mode |
|
1391 * to Deep PS mode is considered. |
|
1392 */ |
|
1393 u32_t light_to_deep_timeout; |
|
1394 /** |
|
1395 * Frame count threshold used when considering transition from Light PS |
|
1396 * to Deep PS mode. |
|
1397 */ |
|
1398 u16_t light_to_deep_threshold; |
|
1399 /** |
|
1400 * Received frame payload length (in bytes) threshold in U-APSD network for |
|
1401 * Best Effort Access Category. |
|
1402 */ |
|
1403 u16_t uapsd_rx_frame_length_threshold; |
|
1404 }; |
|
1405 |
|
1406 struct core_device_settings_s |
|
1407 { |
|
1408 u32_t beacon; ///< IBSS beacon interval in TUs. |
|
1409 u32_t long_retry; ///< How many times packets bigger than 'rts' will be resent. |
|
1410 u32_t short_retry; ///< How many times packets smaller than 'rts' will be resent. |
|
1411 u32_t rts; ///< Minimum size of a packet for CTS/RTS handshake. |
|
1412 u32_t tx_power_level; ///< Maximum allowed transmission power level in dBm. |
|
1413 u32_t scan_rate; ///< Data rate used to send probe requests. |
|
1414 ///< The rate is defined in units of 500kbit/s. |
|
1415 u32_t rcpi_trigger; ///< Roaming is attemped when RCPI value is lower than this. |
|
1416 u32_t active_scan_min_ch_time; ///< Min time (TUs) to listen a channel in active scanning. |
|
1417 u32_t active_scan_max_ch_time; ///< Max time (TUs) to listen a channel in active scanning. |
|
1418 u32_t passive_scan_min_ch_time; ///< Min time (TUs) to listen a channel in passive scanning. |
|
1419 u32_t passive_scan_max_ch_time; ///< Max time (TUs) to listen a channel in passive scanning. |
|
1420 u32_t max_tx_msdu_life_time; ///< Max time (TUs) to (re-)send one (fragmented) packet. |
|
1421 u32_t unload_driver_timer; ///< Number of seconds to wait before unloading WLAN drivers |
|
1422 ///< if no WLAN connection is active. |
|
1423 u32_t roam_timer; ///< Defines how often to search for a better AP in poor |
|
1424 ///< signal conditions. The value is in microseconds. |
|
1425 u32_t rcpi_difference; ///< Difference in dBm required between an AP and the current |
|
1426 ///< AP before roaming is attemped. |
|
1427 u32_t max_tries_to_find_nw; ///< Defines how many are made to find a suitable AP before |
|
1428 ///< giving up during initial connect. |
|
1429 u32_t delay_between_find_nw; ///< Defines the amount of microseconds to wait between |
|
1430 ///< initial connection attempts. |
|
1431 bool_t power_save_enabled; ///< true_t if WLAN power save is allowed, false_t if not. |
|
1432 bool_t allow_radio_measurements; ///< true_t if radio measurements are allowed, false_t if not. |
|
1433 u32_t max_ap_association_failure_count; ///< Number of times association may fail before the AP |
|
1434 ///< is blacklisted for the duration of the connection. |
|
1435 u32_t max_ap_authentication_failure_count; ///< Number of times authentication may fail before the AP |
|
1436 ///< is blacklisted for the duration of the connection. |
|
1437 u32_t max_ap_deauthentication_count; ///< The maximum number of times AP can deauthenticate the |
|
1438 ///< terminal within ap_deauthentication_timeout after a |
|
1439 ///< successful roam before it's blacklisted for the |
|
1440 ///< duration of the connection. |
|
1441 u32_t ap_deauthentication_timeout; ///< Deauthentication within this many microseconds after |
|
1442 ///< a successful roam is calculated towards AP's |
|
1443 ///< deauthentication count. |
|
1444 u32_t long_beacon_find_count; ///< Number of attempts to find an AP with long beacon |
|
1445 ///< interval. |
|
1446 u32_t qos_null_frame_interval; ///< Defines how often (in microseconds) a QoS NULL data frame |
|
1447 ///< is sent during a VoIP call if no other frames to send. |
|
1448 u32_t qos_null_frame_exit_timeout; ///< Defines how soon after the last Voice AC packet QoS NULL |
|
1449 ///< data frame sending is stopped (in microseconds). |
|
1450 u32_t qos_null_frame_entry_timeout; ///< Defines the time period in microseconds which is used |
|
1451 ///< to evaluate whether QoS NULL data frame sending should |
|
1452 ///< be started. |
|
1453 u32_t qos_null_frame_entry_tx_count; ///< Defines how many Voice AC packets must be sent during |
|
1454 ///< the time period defined in qos_null_frame_entry_timeout |
|
1455 ///< before QoS NULL data frame sending is started. |
|
1456 u32_t keep_alive_interval; ///< How often NULL data frames are sent when nothing is being |
|
1457 ///< transmitted. The value is in microseconds. |
|
1458 u32_t scan_stop_rcpi_threshold; ///< If AP RCPI value is better than this, roaming scan can be |
|
1459 ///< stopped. |
|
1460 u32_t iap_availability_rcpi_threshold; ///< If AP RCPI value is less than this, IAP will not marked |
|
1461 ///< as active. |
|
1462 u32_t sp_rcpi_target; ///< Defines the signal predictor algorithm "target" RCPI |
|
1463 ///< value for roam indication. |
|
1464 u32_t sp_time_target; ///< Defines the signal predictor algorithm "target" time for |
|
1465 //// roam indication (in microseconds). |
|
1466 u32_t sp_min_indication_interval; ///< Defines the minimum time interval for consecutive roam |
|
1467 ///< indications from the signal predictor algorithm |
|
1468 ///< (in microseconds). |
|
1469 u32_t scan_list_expiration_time; ///< This value defines how long beacons/probe responses are |
|
1470 ///< stored in the internal scan list (in microseconds). |
|
1471 u32_t rcpi_roam_min_interval; ///< Minimum delay between RCPI checks (in microseconds). |
|
1472 u32_t rcpi_roam_max_interval; ///< Maximum delay between RCPI checks (in microseconds). |
|
1473 u32_t rcpi_roam_attempts_per_interval; ///< Number of times to try with the current interval value. |
|
1474 u32_t rcpi_roam_next_interval_factor; ///< The current interval value is multiplied by this factor |
|
1475 ///< to get the next interval value. |
|
1476 u32_t rcpi_roam_next_interval_addition; ///< This value is added to the multiplied interval value |
|
1477 ///< (in microseconds). |
|
1478 u32_t bss_lost_roam_min_interval; ///< Minimum delay between roam attempts due to BSS lost. |
|
1479 u32_t bss_lost_roam_max_interval; ///< Maximum delay between roam attempts due to BSS lost. |
|
1480 u32_t bss_lost_roam_attempts_per_interval; ///< Number of times to try with the current interval value. |
|
1481 u32_t bss_lost_roam_next_interval_factor; ///< The current interval value is multiplied by this factor |
|
1482 ///< to get the next interval value. |
|
1483 u32_t bss_lost_roam_next_interval_addition; ///< This value is added to the multiplied interval value |
|
1484 ///< (in microseconds). |
|
1485 u32_t bss_lost_roam_max_tries_to_find_nw; ///< Defines how many are made to find a suitable AP before |
|
1486 ///< giving up during BSS lost. |
|
1487 u32_t max_dtim_skip_interval; ///< Maximum amount of microseconds to sleep when waking up |
|
1488 ///< on DTIMs. Zero value means waking up on every DTIM. |
|
1489 u32_t ps_active_to_light_timeout; ///< Time interval in microseconds after which transition |
|
1490 ///< from Active mode to Light PS mode is considered. |
|
1491 u16_t ps_active_to_light_threshold; ///< Frame count threshold used when considering transition |
|
1492 ///< from Active to Light PS mode. |
|
1493 u32_t ps_light_to_active_timeout; ///< Time interval in microseconds after which the frame counter |
|
1494 ///< used when considering transition from Light PS to Active mode is reset. |
|
1495 u16_t ps_light_to_active_threshold; ///< Frame count threshold used when considering transition |
|
1496 ///< from Light PS to Active mode. |
|
1497 u32_t ps_light_to_deep_timeout; ///< Time interval in microseconds after which transition |
|
1498 ///< from Light PS mode to Deep PS mode is considered. |
|
1499 u16_t ps_light_to_deep_threshold; ///< Frame count threshold used when considering transition |
|
1500 ///< from Light PS to Deep PS mode. |
|
1501 u16_t ps_uapsd_rx_frame_length; ///< Received frame payload length (in bytes) threshold in |
|
1502 ///< U-APSD network for Best Effort Access Category. |
|
1503 u32_t rrm_min_measurement_interval; ///< This value defines how often 802.11k Measurement Request are accepted. |
|
1504 ///< The value is in microseconds. If zero, request coming with any |
|
1505 ///< interval are accepted. |
|
1506 }; |
|
1507 |
|
1508 struct core_iap_data_s |
|
1509 { |
|
1510 /** ID of the IAP in CommsDB. */ |
|
1511 u32_t id; |
|
1512 /** Is the connection mode IBSS or Infrastructure. */ |
|
1513 core_operating_mode_e op_mode; |
|
1514 /** Name of the network. */ |
|
1515 core_ssid_s ssid; |
|
1516 /** Is SSID hidden */ |
|
1517 bool_t is_hidden; |
|
1518 /** WEP key 1. */ |
|
1519 core_wep_key_s wep_key1; |
|
1520 /** WEP key 2. */ |
|
1521 core_wep_key_s wep_key2; |
|
1522 /** WEP key 3. */ |
|
1523 core_wep_key_s wep_key3; |
|
1524 /** WEP key 4. */ |
|
1525 core_wep_key_s wep_key4; |
|
1526 /** Default WEP key id. */ |
|
1527 u32_t default_wep_key; |
|
1528 /** Security mode. */ |
|
1529 core_security_mode_e security_mode; |
|
1530 /** Authentication mode (open, shared). */ |
|
1531 core_authentication_mode_e authentication_mode; |
|
1532 /** Is preshared key in use (ETrue) or not (EFalse). */ |
|
1533 bool_t wpa_preshared_key_in_use; |
|
1534 /** Is WPA settings overriden or not. */ |
|
1535 bool_t is_wpa_overriden; |
|
1536 /** Overridden WPA PSK */ |
|
1537 core_wpa_preshared_key_s wpa_preshared_key; |
|
1538 /** Used channel in IBSS (ad-hoc) mode */ |
|
1539 u32_t used_adhoc_channel; |
|
1540 /** Is IP address configured dynamically. */ |
|
1541 bool_t is_dynamic_ip_addr; |
|
1542 /** Is roaming between APs allowed. */ |
|
1543 bool_t is_roaming_allowed; |
|
1544 /** ID of the IAP. */ |
|
1545 u32_t iap_id; |
|
1546 }; |
|
1547 |
|
1548 /** |
|
1549 * Struct containing SSIDs related to secondary SSID feature. |
|
1550 */ |
|
1551 struct core_ssid_entry_s |
|
1552 { |
|
1553 /** ID of the IAP this entry refers to. */ |
|
1554 u32_t id; |
|
1555 /** Defines the SSID to look for in the scan results. */ |
|
1556 core_ssid_s ssid; |
|
1557 /** Defines the SSID used for connecting. */ |
|
1558 core_ssid_s used_ssid; |
|
1559 }; |
|
1560 |
|
1561 struct core_scan_channels_s |
|
1562 { |
|
1563 u8_t band; ///< 1 = 2.4GHz, 2 = 4.9GHz, 4 = 5GHz |
|
1564 u8_t channels2dot4ghz[2]; |
|
1565 u8_t channels4dot9ghz[3]; |
|
1566 u8_t channels5ghz[26]; |
|
1567 }; |
|
1568 |
|
1569 const core_scan_channels_s SCAN_CHANNELS_2DOT4GHZ_US = |
|
1570 { SCAN_BAND_2DOT4GHZ, { 0xFF, 0x07 }, { 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; |
|
1571 |
|
1572 const core_scan_channels_s SCAN_CHANNELS_2DOT4GHZ_ETSI = |
|
1573 { SCAN_BAND_2DOT4GHZ, { 0xFF, 0x1F }, { 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; |
|
1574 |
|
1575 /** |
|
1576 * Structure for storing 802.11d country strings. |
|
1577 */ |
|
1578 struct core_country_string_s |
|
1579 { |
|
1580 u8_t country[MAX_COUNTRY_STRING_LENGTH]; |
|
1581 }; |
|
1582 |
|
1583 /** Definition for an empty country string. */ |
|
1584 const core_country_string_s COUNTRY_STRING_NONE = { 0, 0, 0 }; |
|
1585 |
|
1586 /** AP country information for Canada, North America, Taiwan, Brazil, Argentina, Mexico and Colombia. */ |
|
1587 const core_country_string_s country_info_table[] = { {'C','A','0'}, {'U','S','0'}, {'V','I','0'}, {'T','W','0'}, {'B','R','0'}, {'A','R','0'}, {'M','X','0'}, {'C','O','0'} }; |
|
1588 const u8_t country_info_table_length = 8; |
|
1589 |
|
1590 /** |
|
1591 * Structure for storing a single TX rate policy. |
|
1592 */ |
|
1593 struct core_tx_rate_policy_s |
|
1594 { |
|
1595 /** Number of attempts to transmit at 54 Mbits/s. */ |
|
1596 u8_t tx_policy_54; |
|
1597 /** Number of attempts to transmit at 48 Mbits/s. */ |
|
1598 u8_t tx_policy_48; |
|
1599 /** Number of attempts to transmit at 36 Mbits/s. */ |
|
1600 u8_t tx_policy_36; |
|
1601 /** Number of attempts to transmit at 33 Mbits/s. */ |
|
1602 u8_t tx_policy_33; |
|
1603 /** Number of attempts to transmit at 24 Mbits/s. */ |
|
1604 u8_t tx_policy_24; |
|
1605 /** Number of attempts to transmit at 22 Mbits/s. */ |
|
1606 u8_t tx_policy_22; |
|
1607 /** Number of attempts to transmit at 18 Mbits/s. */ |
|
1608 u8_t tx_policy_18; |
|
1609 /** Number of attempts to transmit at 12 Mbits/s. */ |
|
1610 u8_t tx_policy_12; |
|
1611 /** Number of attempts to transmit at 11 Mbits/s. */ |
|
1612 u8_t tx_policy_11; |
|
1613 /** Number of attempts to transmit at 9 Mbits/s. */ |
|
1614 u8_t tx_policy_9; |
|
1615 /** Number of attempts to transmit at 6 Mbits/s. */ |
|
1616 u8_t tx_policy_6; |
|
1617 /** Number of attempts to transmit at 5.5 Mbits/s. */ |
|
1618 u8_t tx_policy_5p5; |
|
1619 /** Number of attempts to transmit at 2 Mbits/s. */ |
|
1620 u8_t tx_policy_2; |
|
1621 /** Number of attempts to transmit at 1 Mbits/s. */ |
|
1622 u8_t tx_policy_1; |
|
1623 /** Number of retransmissions to packets that are smaller than RTS. */ |
|
1624 u8_t short_retry_limit; |
|
1625 /** Number of retransmissions to packets that are bigger than RTS. */ |
|
1626 u8_t long_retry_limit; |
|
1627 /** Flags defined in HAL API that apply to this policy. */ |
|
1628 u32_t flags; |
|
1629 /** Initial TX rate used for transmitting. */ |
|
1630 core_tx_rate_e initial_tx_rate; |
|
1631 /** TX rate mask for auto rate policy. */ |
|
1632 u32_t tx_auto_rate_policy; |
|
1633 /** Bitmap of enabled 802.11n modulation and coding schemes. */ |
|
1634 u8_t mcs_set[TX_RATE_POLICY_MCS_SIZE]; |
|
1635 }; |
|
1636 |
|
1637 /** |
|
1638 * Structure for storing a group of TX rate policies. |
|
1639 */ |
|
1640 struct core_tx_rate_policies_s |
|
1641 { |
|
1642 /** Number of TX rate policies in the array. */ |
|
1643 u8_t policy_count; |
|
1644 /** Array of TX rate policies. */ |
|
1645 core_tx_rate_policy_s policy[MAX_TX_RATE_POLICY]; |
|
1646 }; |
|
1647 |
|
1648 /** |
|
1649 * Structure for storing mappings between QoS Access Classes and TX rate policies. |
|
1650 */ |
|
1651 struct core_tx_rate_policy_mappings_s |
|
1652 { |
|
1653 u8_t policy_for_best_effort; |
|
1654 u8_t policy_for_background; |
|
1655 u8_t policy_for_video; |
|
1656 u8_t policy_for_voice; |
|
1657 }; |
|
1658 |
|
1659 /** |
|
1660 * Structure for storing traffic stream parameters. |
|
1661 */ |
|
1662 struct core_traffic_stream_params_s |
|
1663 { |
|
1664 /** |
|
1665 * Whether the traffic pattern is periodic or aperiodic. |
|
1666 */ |
|
1667 bool_t is_periodic_traffic; |
|
1668 /** |
|
1669 * Traffic stream direction. |
|
1670 */ |
|
1671 core_traffic_stream_direction_e direction; |
|
1672 /** |
|
1673 * The current value of Nominal MSDU Size. |
|
1674 */ |
|
1675 u16_t nominal_msdu_size; |
|
1676 /** |
|
1677 * The current value of Maximum MSDU Size. |
|
1678 */ |
|
1679 u16_t maximum_msdu_size; |
|
1680 /** |
|
1681 * The current value of Minimum Service Interval. |
|
1682 */ |
|
1683 u32_t minimum_service_interval; |
|
1684 /** |
|
1685 * The current value of Maximum Service Interval. |
|
1686 */ |
|
1687 u32_t maximum_service_interval; |
|
1688 /** |
|
1689 * The current value of Inactivity Interval. |
|
1690 */ |
|
1691 u32_t inactivity_interval; |
|
1692 /** |
|
1693 * The current value of Suspension Interval. |
|
1694 */ |
|
1695 u32_t suspension_interval; |
|
1696 /** |
|
1697 * The current value of Service Start Time. |
|
1698 */ |
|
1699 u32_t service_start_time; |
|
1700 /** |
|
1701 * The current value of Minimum Data Rate. |
|
1702 */ |
|
1703 u32_t minimum_data_rate; |
|
1704 /** |
|
1705 * The current value of Mean Data Rate. |
|
1706 */ |
|
1707 u32_t mean_data_rate; |
|
1708 /** |
|
1709 * The current value of Peak Data Rate. |
|
1710 */ |
|
1711 u32_t peak_data_rate; |
|
1712 /** |
|
1713 * The current value of Maximum Burst Size. |
|
1714 */ |
|
1715 u32_t maximum_burst_size; |
|
1716 /** |
|
1717 * The current value of Delay Bound |
|
1718 */ |
|
1719 u32_t delay_bound; |
|
1720 /** |
|
1721 * The current value of Minimum PHY Rate. |
|
1722 */ |
|
1723 u32_t minimum_phy_rate; |
|
1724 /** |
|
1725 * The current value of Nominal PHY Rate in units |
|
1726 */ |
|
1727 core_tx_rate_e nominal_phy_rate; |
|
1728 /** |
|
1729 * The current value of Bandwidth Allowance. |
|
1730 */ |
|
1731 u16_t surplus_bandwidth_allowance; |
|
1732 /** |
|
1733 * Whether re-creation of traffic streams is allowed. |
|
1734 */ |
|
1735 bool_t is_retry_allowed; |
|
1736 /** |
|
1737 * The current value of Medium Time. |
|
1738 */ |
|
1739 u16_t medium_time; |
|
1740 /** |
|
1741 * The tx rates to be used with this AC, 0 if defaults are used. |
|
1742 */ |
|
1743 u32_t override_rates; |
|
1744 /** |
|
1745 * The Maximum Transmit MSDU Lifetime, 0 if default is used. |
|
1746 */ |
|
1747 u32_t override_max_tx_msdu_lifetime; |
|
1748 }; |
|
1749 |
|
1750 /** |
|
1751 * Structure for storing information about channels that have |
|
1752 * APs with long beacon intervals. |
|
1753 */ |
|
1754 struct core_long_beacon_interval_channels_s |
|
1755 { |
|
1756 u8_t channel_scan_count[SCAN_BAND_2DOT4GHZ_MAX_CHANNEL_EURO]; |
|
1757 }; |
|
1758 |
|
1759 /** |
|
1760 * Structure for storing power save settings for the access categories. |
|
1761 */ |
|
1762 struct core_power_save_settings_s |
|
1763 { |
|
1764 /** Whether the terminal stays in U-APSD power save when using Voice. */ |
|
1765 bool_t stay_in_uapsd_power_save_for_voice; |
|
1766 /** Whether the terminal stays in U-APSD power save when using Video. */ |
|
1767 bool_t stay_in_uapsd_power_save_for_video; |
|
1768 /** Whether the terminal stays in U-APSD power save when using BestEffort. */ |
|
1769 bool_t stay_in_uapsd_power_save_for_best_effort; |
|
1770 /** Whether the terminal stays in U-APSD power save when using Background. */ |
|
1771 bool_t stay_in_uapsd_power_save_for_background; |
|
1772 /** Whether the terminal stays in legacy power save when using Voice. */ |
|
1773 bool_t stay_in_legacy_power_save_for_voice; |
|
1774 /** Whether the terminal stays in legacy power save when using Video. */ |
|
1775 bool_t stay_in_legacy_power_save_for_video; |
|
1776 /** Whether the terminal stays in legacy power save when using BestEffort. */ |
|
1777 bool_t stay_in_legacy_power_save_for_best_effort; |
|
1778 /** Whether the terminal stays in legacy power save when using Background. */ |
|
1779 bool_t stay_in_legacy_power_save_for_background; |
|
1780 }; |
|
1781 |
|
1782 /** |
|
1783 * Structure for storing RCPI roam interval parameters. |
|
1784 */ |
|
1785 struct core_rcpi_roam_interval_s |
|
1786 { |
|
1787 /** Number of times the current interval has been tried. */ |
|
1788 u32_t count; |
|
1789 /** The current interval value. */ |
|
1790 u32_t interval; |
|
1791 }; |
|
1792 |
|
1793 /** |
|
1794 * Structure for storing information about an access point. |
|
1795 */ |
|
1796 struct core_ap_information_s |
|
1797 { |
|
1798 /** The SSID of the AP. */ |
|
1799 core_ssid_s ssid; |
|
1800 /** The BSSID of the AP. */ |
|
1801 core_mac_address_s bssid; |
|
1802 /** Capabilities of the AP. */ |
|
1803 u16_t capabilities; |
|
1804 /** The channel AP is on. */ |
|
1805 u8_t channel; |
|
1806 /** The received channel power indicator (RCPI). */ |
|
1807 u8_t rcpi; |
|
1808 /** Basic rates of the AP. */ |
|
1809 u32_t basic_rates; |
|
1810 /** Supported rates of the AP. */ |
|
1811 u32_t supported_rates; |
|
1812 /** The security mode of the AP. */ |
|
1813 core_connection_security_mode_e security_mode; |
|
1814 /** Whether the AP supports WPX. */ |
|
1815 bool_t is_wpx; |
|
1816 /** Whether Admission Control must be used with Voice. */ |
|
1817 bool_t is_ac_required_for_voice; |
|
1818 /** Whether Admission Control must be used with Video. */ |
|
1819 bool_t is_ac_required_for_video; |
|
1820 /** Whether Admission Control must be used with BestEffort. */ |
|
1821 bool_t is_ac_required_for_best_effort; |
|
1822 /** Whether Admission Control must be used with Background. */ |
|
1823 bool_t is_ac_required_for_background; |
|
1824 }; |
|
1825 |
|
1826 /** |
|
1827 * Structure for storing roaming metrics information. |
|
1828 */ |
|
1829 struct core_roam_metrics_s |
|
1830 { |
|
1831 /** Connection attempt total counter. */ |
|
1832 u32_t connection_attempt_total_count; |
|
1833 /** Unsuccesfull connection attempt counter. */ |
|
1834 u32_t unsuccesfull_connection_attempt_count; |
|
1835 /** Roaming counter. */ |
|
1836 u32_t roaming_counter; |
|
1837 /** Coverage loss counter. */ |
|
1838 u32_t coverage_loss_count; |
|
1839 |
|
1840 /** The total duration (ms) of the last roaming (= data path broken time + scanning time). */ |
|
1841 u32_t last_roam_total_duration; |
|
1842 /** The duration (ms) how long the data path was broken during the last roaming. */ |
|
1843 u32_t last_roam_data_path_broken_duration; |
|
1844 /** The cause for the last roaming. */ |
|
1845 core_roam_reason_e last_roam_reason; |
|
1846 }; |
|
1847 |
|
1848 /** |
|
1849 * Structure for storing parameters related to power save mode. |
|
1850 */ |
|
1851 struct core_power_save_mode_s |
|
1852 { |
|
1853 /** The power save mode to use. */ |
|
1854 core_power_save_mode_e mode; |
|
1855 /** |
|
1856 * The wake-up interval. |
|
1857 * @note This parameter is only applicable if the mode is |
|
1858 * core_power_save_mode_beacon or core_power_save_mode_dtim, |
|
1859 * otherwise it should set to zero. |
|
1860 */ |
|
1861 u8_t wakeup_interval; |
|
1862 }; |
|
1863 |
|
1864 const core_power_save_mode_s CORE_POWER_SAVE_MODE_EVERY_BEACON = |
|
1865 { core_power_save_mode_beacon, 1 }; |
|
1866 const core_power_save_mode_s CORE_POWER_SAVE_MODE_EVERY_DTIM = |
|
1867 { core_power_save_mode_dtim, 1 }; |
|
1868 const core_power_save_mode_s CORE_POWER_SAVE_MODE_NONE = |
|
1869 { core_power_save_mode_none, 0 }; |
|
1870 const core_power_save_mode_s CORE_POWER_SAVE_MODE_AUTOMATIC = |
|
1871 { core_power_save_mode_automatic, 0 }; |
|
1872 const core_power_save_mode_s CORE_POWER_SAVE_MODE_DTIM_SKIPPING = |
|
1873 { core_power_save_mode_dtim_skipping, 0 }; |
|
1874 |
|
1875 /** |
|
1876 * Structure for storing parameters related to power mode. |
|
1877 */ |
|
1878 struct core_power_mode_s |
|
1879 { |
|
1880 /** The power mode to use. */ |
|
1881 core_power_mode_e mode; |
|
1882 /** Disable dynamic power save management. */ |
|
1883 bool_t disable_dynamic_ps; |
|
1884 /** Defines the wake-up mode for Light PS mode. */ |
|
1885 core_power_save_wakeup_mode_e wakeup_mode_light; |
|
1886 /** Defines the wake-up interval (N) for Light PS mode. */ |
|
1887 u8_t wakeup_interval_light; |
|
1888 /** Defines the wake-up mode for Deep PS mode. */ |
|
1889 core_power_save_wakeup_mode_e wakeup_mode_deep; |
|
1890 /** Defines the wake-up interval (N) for Deep PS mode. */ |
|
1891 u8_t wakeup_interval_deep; |
|
1892 }; |
|
1893 |
|
1894 const core_power_mode_s CORE_POWER_MODE_CAM = |
|
1895 { core_power_mode_cam, true_t, core_power_save_wakeup_mode_beacon, 1, core_power_save_wakeup_mode_beacon, 1 }; |
|
1896 const core_power_mode_s CORE_POWER_MODE_PS = |
|
1897 { core_power_mode_ps, false_t, core_power_save_wakeup_mode_beacon, 1, core_power_save_wakeup_mode_dtim, 1 }; |
|
1898 const core_power_mode_s CORE_POWER_MODE_PS_BEACON = |
|
1899 { core_power_mode_ps, true_t, core_power_save_wakeup_mode_beacon, 1, core_power_save_wakeup_mode_beacon, 1 }; |
|
1900 const core_power_mode_s CORE_POWER_MODE_PS_DTIM = |
|
1901 { core_power_mode_ps, true_t, core_power_save_wakeup_mode_dtim, 1, core_power_save_wakeup_mode_dtim, 1 }; |
|
1902 |
|
1903 /** |
|
1904 * Structure for storing an access point blacklist entry. |
|
1905 */ |
|
1906 struct core_ap_blacklist_entry_s |
|
1907 { |
|
1908 /** BSSID of the AP. */ |
|
1909 core_mac_address_s bssid; |
|
1910 /** Reason the AP was blacklisted. */ |
|
1911 core_ap_blacklist_reason_e reason; |
|
1912 }; |
|
1913 |
|
1914 /** |
|
1915 * Structure for storing block ACK usage information. |
|
1916 */ |
|
1917 struct core_block_ack_usage_s |
|
1918 { |
|
1919 /** Bitmap of TIDs where TX block ACK is allowed. */ |
|
1920 u8_t tx_usage; |
|
1921 /** Bitmap of TIDs where RX block ACK is allowed. */ |
|
1922 u8_t rx_usage; |
|
1923 }; |
|
1924 |
|
1925 /** |
|
1926 * Structure for storing a SNAP header. |
|
1927 */ |
|
1928 struct core_snap_header_s |
|
1929 { |
|
1930 /** Destination Service Access Point. */ |
|
1931 u8_t dsap; |
|
1932 /** Source Service Access Point. */ |
|
1933 u8_t ssap; |
|
1934 /** Control Field. */ |
|
1935 u8_t control; |
|
1936 /** Organizationally Unique Identifier (OUI). */ |
|
1937 u8_t oui[OUI_LENGTH]; |
|
1938 }; |
|
1939 |
|
1940 /** |
|
1941 * Structure for access class traffic statuses and traffic modes. |
|
1942 */ |
|
1943 struct core_ac_traffic_information_s |
|
1944 { |
|
1945 /** Current traffic status for Voice. */ |
|
1946 core_access_class_traffic_status_e status_for_voice; |
|
1947 /** Current traffic status for Video. */ |
|
1948 core_access_class_traffic_status_e status_for_video; |
|
1949 /** Current traffic status for BestEffort. */ |
|
1950 core_access_class_traffic_status_e status_for_best_effort; |
|
1951 /** Current traffic status for Background. */ |
|
1952 core_access_class_traffic_status_e status_for_background; |
|
1953 /** Current traffic mode for Voice. */ |
|
1954 core_access_class_traffic_mode_e mode_for_voice; |
|
1955 /** Current traffic mode for Video. */ |
|
1956 core_access_class_traffic_mode_e mode_for_video; |
|
1957 /** Current traffic mode for BestEffort. */ |
|
1958 core_access_class_traffic_mode_e mode_for_best_effort; |
|
1959 /** Current traffic mode for Background. */ |
|
1960 core_access_class_traffic_mode_e mode_for_background; |
|
1961 }; |
|
1962 |
|
1963 /** |
|
1964 * Enums for WLAN Engine - EAPOL interface datatypes. |
|
1965 */ |
|
1966 |
|
1967 typedef enum _wlan_eapol_if_eap_protocol_layer_e |
|
1968 { |
|
1969 wlan_eapol_if_eap_protocol_layer_none, |
|
1970 wlan_eapol_if_eap_protocol_layer_general, |
|
1971 wlan_eapol_if_eap_protocol_layer_internal_type, |
|
1972 wlan_eapol_if_eap_protocol_layer_am_eap_type, |
|
1973 wlan_eapol_if_eap_protocol_layer_radius, |
|
1974 wlan_eapol_if_eap_protocol_layer_eap_type, |
|
1975 wlan_eapol_if_eap_protocol_layer_eap, |
|
1976 wlan_eapol_if_eap_protocol_layer_eapol, |
|
1977 wlan_eapol_if_eap_protocol_layer_eapol_key, |
|
1978 wlan_eapol_if_eap_protocol_layer_ethernet, |
|
1979 wlan_eapol_if_eap_protocol_layer_wlan_authentication, |
|
1980 wlan_eapol_if_eap_protocol_layer_authentication_server, |
|
1981 wlan_eapol_if_eap_protocol_layer_wapi |
|
1982 } wlan_eapol_if_eap_protocol_layer_e; |
|
1983 |
|
1984 typedef enum _wlan_eapol_if_eapol_key_authentication_mode_e |
|
1985 { |
|
1986 wlan_eapol_if_eapol_key_authentication_mode_none, |
|
1987 wlan_eapol_if_eapol_key_authentication_mode_open, |
|
1988 wlan_eapol_if_eapol_key_authentication_mode_shared, |
|
1989 wlan_eapol_if_eapol_key_authentication_mode_wpx, |
|
1990 } wlan_eapol_if_eapol_key_authentication_mode_e; |
|
1991 |
|
1992 typedef enum _wlan_eapol_if_eapol_key_authentication_type_e |
|
1993 { |
|
1994 wlan_eapol_if_eapol_key_authentication_type_none, |
|
1995 wlan_eapol_if_eapol_key_authentication_type_rsna_eap, |
|
1996 wlan_eapol_if_eapol_key_authentication_type_rsna_psk, |
|
1997 wlan_eapol_if_eapol_key_authentication_type_wpa_eap, |
|
1998 wlan_eapol_if_eapol_key_authentication_type_wpa_psk, |
|
1999 wlan_eapol_if_eapol_key_authentication_type_802_1x, |
|
2000 wlan_eapol_if_eapol_key_authentication_type_wpx_fast_roam, |
|
2001 wlan_eapol_if_eapol_key_authentication_type_wfa_sc, |
|
2002 wlan_eapol_if_eapol_key_authentication_type_wapi_psk, |
|
2003 wlan_eapol_if_eapol_key_authentication_type_wapi |
|
2004 } wlan_eapol_if_eapol_key_authentication_type_e; |
|
2005 |
|
2006 typedef enum _wlan_eapol_if_eapol_key_type_e |
|
2007 { |
|
2008 wlan_eapol_if_eapol_key_type_broadcast, |
|
2009 wlan_eapol_if_eapol_key_type_unicast, |
|
2010 wlan_eapol_if_eapol_key_type_wpx_fast_roam_krk, |
|
2011 wlan_eapol_if_eapol_key_type_wpx_fast_roam_btk, |
|
2012 wlan_eapol_if_eapol_key_type_pmkid, |
|
2013 } wlan_eapol_if_eapol_key_type_e; |
|
2014 |
|
2015 typedef enum _wlan_eapol_if_eapol_tkip_mic_failure_type_e |
|
2016 { |
|
2017 wlan_eapol_if_eapol_tkip_mic_failure_type_group_key, |
|
2018 wlan_eapol_if_eapol_tkip_mic_failure_type_pairwise_key, |
|
2019 } wlan_eapol_if_eapol_tkip_mic_failure_type_e; |
|
2020 |
|
2021 typedef enum _wlan_eapol_if_eapol_wlan_authentication_state_e |
|
2022 { |
|
2023 wlan_eapol_if_eapol_wlan_authentication_state_none, |
|
2024 wlan_eapol_if_eapol_wlan_authentication_state_association_ok, |
|
2025 wlan_eapol_if_eapol_wlan_authentication_state_this_ap_failed, |
|
2026 wlan_eapol_if_eapol_wlan_authentication_state_failed_completely, |
|
2027 wlan_eapol_if_eapol_wlan_authentication_state_802_11_auth_algorithm_not_supported, |
|
2028 wlan_eapol_if_eapol_wlan_authentication_state_obsolete, // <- Do not use this value. |
|
2029 wlan_eapol_if_eapol_wlan_authentication_state_eap_authentication_running, |
|
2030 wlan_eapol_if_eapol_wlan_authentication_state_no_response, |
|
2031 wlan_eapol_if_eapol_wlan_authentication_state_4_way_handshake_running, |
|
2032 wlan_eapol_if_eapol_wlan_authentication_state_authentication_successfull, |
|
2033 wlan_eapol_if_eapol_wlan_authentication_state_authentication_cancelled, |
|
2034 wlan_eapol_if_eapol_wlan_authentication_state_immediate_reconnect, |
|
2035 wlan_eapol_if_eapol_wlan_authentication_state_wapi_authentication_running |
|
2036 } wlan_eapol_if_eapol_wlan_authentication_state_e; |
|
2037 |
|
2038 typedef enum _wlan_eapol_if_error_e |
|
2039 { |
|
2040 wlan_eapol_if_error_ok, |
|
2041 wlan_eapol_if_error_pending_request, |
|
2042 wlan_eapol_if_error_allocation_error, |
|
2043 wlan_eapol_if_error_illegal_parameter, |
|
2044 wlan_eapol_if_error_process_general_error, |
|
2045 } wlan_eapol_if_error_e; |
|
2046 |
|
2047 typedef enum _wlan_eapol_if_rsna_cipher_e |
|
2048 { |
|
2049 wlan_eapol_if_rsna_cipher_none, |
|
2050 wlan_eapol_if_rsna_cipher_ccmp, |
|
2051 wlan_eapol_if_rsna_cipher_tkip, |
|
2052 wlan_eapol_if_rsna_cipher_wep_40, |
|
2053 wlan_eapol_if_rsna_cipher_wep_104, |
|
2054 wlan_eapol_if_wapi_cipher_wpi |
|
2055 } wlan_eapol_if_rsna_cipher_e; |
|
2056 |
|
2057 typedef enum _wlan_eapol_ethernet_type_e |
|
2058 { |
|
2059 wlan_eapol_ethernet_type_none = 0, |
|
2060 wlan_eapol_ethernet_type_pae = 0x888e, ///< Ethernet type Port Access Entity (PAE) |
|
2061 wlan_eapol_ethernet_type_preauthentication = 0x88c7, ///< Ethernet type Preauthentication |
|
2062 wlan_eapol_ethernet_type_wapi = 0x88b4 ///< Ethernet type WAPI |
|
2063 } wlan_eapol_ethernet_type_e; |
|
2064 |
|
2065 typedef enum _wlan_eapol_if_eap_type_e |
|
2066 { |
|
2067 wlan_eapol_if_eap_type_none = 0, ///< This is internal value for no type case. |
|
2068 wlan_eapol_if_eap_type_tls = 13, ///< This is Transport Layer Security (TLS) type. |
|
2069 wlan_eapol_if_eap_type_leap = 17, ///< This is LEAP type. |
|
2070 wlan_eapol_if_eap_type_gsmsim = 18, ///< This is SIM type. |
|
2071 wlan_eapol_if_eap_type_ttls = 21, ///< This is tunneled TLS. |
|
2072 wlan_eapol_if_eap_type_aka = 23, ///< This is AKA type. |
|
2073 wlan_eapol_if_eap_type_peap = 25, ///< This is PEAP type. |
|
2074 wlan_eapol_if_eap_type_mschapv2 = 26, ///< This is MsChapv2 type. |
|
2075 wlan_eapol_if_eap_type_fast = 43, ///< This is EAP-FAST type. |
|
2076 } wlan_eapol_if_eap_type_e; |
|
2077 |
|
2078 typedef enum _wlan_eapol_if_eap_status_e |
|
2079 { |
|
2080 wlan_eapol_if_eap_status_none = 0, |
|
2081 wlan_eapol_if_eap_status_authentication_failure = 14, |
|
2082 wlan_eapol_if_eap_status_illegal_cipher_suite = 70, |
|
2083 wlan_eapol_if_eap_status_bad_certificate = 71, |
|
2084 wlan_eapol_if_eap_status_unsupported_certificate = 72, |
|
2085 wlan_eapol_if_eap_status_certificate_revoked = 73, |
|
2086 wlan_eapol_if_eap_status_certificate_expired = 74, |
|
2087 wlan_eapol_if_eap_status_user_certificate_unknown = 76, |
|
2088 wlan_eapol_if_eap_status_identity_query_failed = 94, |
|
2089 wlan_eapol_if_eap_status_user_has_not_subscribed_to_the_requested_service = 96, |
|
2090 wlan_eapol_if_eap_status_users_calls_are_barred = 97, |
|
2091 wlan_eapol_if_eap_status_restricted_logon_hours = 98, |
|
2092 wlan_eapol_if_eap_status_account_disabled = 99, |
|
2093 wlan_eapol_if_eap_status_no_dialin_permission = 100, |
|
2094 wlan_eapol_if_eap_status_password_expired = 101, |
|
2095 wlan_eapol_if_eap_status_OOB_interface_read_error = 103, |
|
2096 wlan_eapol_if_eap_status_decryption_CRC_failure = 104, |
|
2097 wlan_eapol_if_eap_status_RF_band_2_4_ghz_not_supported = 105, |
|
2098 wlan_eapol_if_eap_status_RF_band_5_0_ghz_not_supported = 106, |
|
2099 wlan_eapol_if_eap_status_signal_too_weak = 107, |
|
2100 wlan_eapol_if_eap_status_network_authentication_failure = 108, |
|
2101 wlan_eapol_if_eap_status_network_association_failure = 109, |
|
2102 wlan_eapol_if_eap_status_no_DHCP_response = 110, |
|
2103 wlan_eapol_if_eap_status_failed_DHCP_configure = 111, |
|
2104 wlan_eapol_if_eap_status_ip_address_conflict = 112, |
|
2105 wlan_eapol_if_eap_status_could_not_connect_to_registrar = 113, |
|
2106 wlan_eapol_if_eap_status_multiple_PBC_sessions_detected = 114, |
|
2107 wlan_eapol_if_eap_status_rogue_activity_suspected = 115, |
|
2108 wlan_eapol_if_eap_status_device_busy = 116, |
|
2109 wlan_eapol_if_eap_status_setup_locked = 117, |
|
2110 wlan_eapol_if_eap_status_message_timeout = 118, |
|
2111 wlan_eapol_if_eap_status_registration_session_timeout = 119, |
|
2112 wlan_eapol_if_eap_status_device_password_authentication_failure = 120, |
|
2113 wlan_eapol_if_eap_status_pin_code_authentication_not_supported = 121, |
|
2114 wlan_eapol_if_eap_status_push_button_authentication_not_supported = 122, |
|
2115 wlan_eapol_if_eap_status_tunnel_compromise_error = 124, |
|
2116 wlan_eapol_if_eap_status_unexpected_tlv_exhanged = 125, |
|
2117 wlan_eapol_if_eap_status_no_pac_nor_certs_to_authenticate_with_provision_disabled = 126, |
|
2118 wlan_eapol_if_eap_status_no_matching_pac_for_aid = 127, |
|
2119 wlan_eapol_if_eap_status_pac_store_corrupted = 128, |
|
2120 } wlan_eapol_if_eap_status_e; |
|
2121 |
|
2122 enum wlan_eapol_if_eap_state_e |
|
2123 { |
|
2124 wlan_eapol_if_eap_state_general_authentication_error = 4, |
|
2125 wlan_eapol_if_eap_state_authentication_terminated_unsuccessfully = 7, |
|
2126 }; |
|
2127 |
|
2128 /** |
|
2129 * Structure for storing medium time by user priority. |
|
2130 */ |
|
2131 typedef u16_t medium_time_by_user_priority[MAX_QOS_USER_PRIORITY]; |
|
2132 |
|
2133 /** |
|
2134 * Structure for storing medium time by access class. |
|
2135 */ |
|
2136 typedef u16_t medium_time_by_access_class[MAX_QOS_ACCESS_CLASS]; |
|
2137 |
|
2138 /** |
|
2139 * Structure for storing medium time by user priority and by access class. |
|
2140 */ |
|
2141 typedef struct _medium_time_s |
|
2142 { |
|
2143 /** Admission capacity by user priority. */ |
|
2144 medium_time_by_user_priority up; |
|
2145 /** Admission capacity by access class. */ |
|
2146 medium_time_by_access_class ac; |
|
2147 } medium_time_s; |
|
2148 |
|
2149 const medium_time_s ADMISSION_CAPACITIES_NOT_DEFINED = { 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF }; |
|
2150 const medium_time_s MEDIUM_TIME_NOT_DEFINED = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
|
2151 |
|
2152 #endif // CORE_TYPES_H |