1e5b75505Sopenharmony_ci/* 2e5b75505Sopenharmony_ci * WPA Supplicant - Common definitions 3e5b75505Sopenharmony_ci * Copyright (c) 2004-2018, Jouni Malinen <j@w1.fi> 4e5b75505Sopenharmony_ci * 5e5b75505Sopenharmony_ci * This software may be distributed under the terms of the BSD license. 6e5b75505Sopenharmony_ci * See README for more details. 7e5b75505Sopenharmony_ci */ 8e5b75505Sopenharmony_ci 9e5b75505Sopenharmony_ci#ifndef DEFS_H 10e5b75505Sopenharmony_ci#define DEFS_H 11e5b75505Sopenharmony_ci 12e5b75505Sopenharmony_ci#ifdef FALSE 13e5b75505Sopenharmony_ci#undef FALSE 14e5b75505Sopenharmony_ci#endif 15e5b75505Sopenharmony_ci#ifdef TRUE 16e5b75505Sopenharmony_ci#undef TRUE 17e5b75505Sopenharmony_ci#endif 18e5b75505Sopenharmony_citypedef enum { FALSE = 0, TRUE = 1 } Boolean; 19e5b75505Sopenharmony_ci 20e5b75505Sopenharmony_ci 21e5b75505Sopenharmony_ci#define WPA_CIPHER_NONE BIT(0) 22e5b75505Sopenharmony_ci#define WPA_CIPHER_WEP40 BIT(1) 23e5b75505Sopenharmony_ci#define WPA_CIPHER_WEP104 BIT(2) 24e5b75505Sopenharmony_ci#define WPA_CIPHER_TKIP BIT(3) 25e5b75505Sopenharmony_ci#define WPA_CIPHER_CCMP BIT(4) 26e5b75505Sopenharmony_ci#define WPA_CIPHER_AES_128_CMAC BIT(5) 27e5b75505Sopenharmony_ci#define WPA_CIPHER_GCMP BIT(6) 28e5b75505Sopenharmony_ci#define WPA_CIPHER_SMS4 BIT(7) 29e5b75505Sopenharmony_ci#define WPA_CIPHER_GCMP_256 BIT(8) 30e5b75505Sopenharmony_ci#define WPA_CIPHER_CCMP_256 BIT(9) 31e5b75505Sopenharmony_ci#define WPA_CIPHER_BIP_GMAC_128 BIT(11) 32e5b75505Sopenharmony_ci#define WPA_CIPHER_BIP_GMAC_256 BIT(12) 33e5b75505Sopenharmony_ci#define WPA_CIPHER_BIP_CMAC_256 BIT(13) 34e5b75505Sopenharmony_ci#define WPA_CIPHER_GTK_NOT_USED BIT(14) 35e5b75505Sopenharmony_ci 36e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_IEEE8021X BIT(0) 37e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_PSK BIT(1) 38e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_NONE BIT(2) 39e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3) 40e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_WPA_NONE BIT(4) 41e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT_IEEE8021X BIT(5) 42e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT_PSK BIT(6) 43e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_IEEE8021X_SHA256 BIT(7) 44e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_PSK_SHA256 BIT(8) 45e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_WPS BIT(9) 46e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_SAE BIT(10) 47e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT_SAE BIT(11) 48e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_WAPI_PSK BIT(12) 49e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_WAPI_CERT BIT(13) 50e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_CCKM BIT(14) 51e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_OSEN BIT(15) 52e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_IEEE8021X_SUITE_B BIT(16) 53e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_IEEE8021X_SUITE_B_192 BIT(17) 54e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FILS_SHA256 BIT(18) 55e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FILS_SHA384 BIT(19) 56e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT_FILS_SHA256 BIT(20) 57e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT_FILS_SHA384 BIT(21) 58e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_OWE BIT(22) 59e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_DPP BIT(23) 60e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT_IEEE8021X_SHA384 BIT(24) 61e5b75505Sopenharmony_ci 62e5b75505Sopenharmony_ci#define WPA_KEY_MGMT_FT (WPA_KEY_MGMT_FT_PSK | \ 63e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_IEEE8021X | \ 64e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_IEEE8021X_SHA384 | \ 65e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_SAE | \ 66e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA256 | \ 67e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA384) 68e5b75505Sopenharmony_ci 69e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_wpa_ieee8021x(int akm) 70e5b75505Sopenharmony_ci{ 71e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_IEEE8021X | 72e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_IEEE8021X | 73e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_IEEE8021X_SHA384 | 74e5b75505Sopenharmony_ci WPA_KEY_MGMT_CCKM | 75e5b75505Sopenharmony_ci WPA_KEY_MGMT_OSEN | 76e5b75505Sopenharmony_ci WPA_KEY_MGMT_IEEE8021X_SHA256 | 77e5b75505Sopenharmony_ci WPA_KEY_MGMT_IEEE8021X_SUITE_B | 78e5b75505Sopenharmony_ci WPA_KEY_MGMT_IEEE8021X_SUITE_B_192 | 79e5b75505Sopenharmony_ci WPA_KEY_MGMT_FILS_SHA256 | 80e5b75505Sopenharmony_ci WPA_KEY_MGMT_FILS_SHA384 | 81e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA256 | 82e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA384)); 83e5b75505Sopenharmony_ci} 84e5b75505Sopenharmony_ci 85e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_wpa_psk(int akm) 86e5b75505Sopenharmony_ci{ 87e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_PSK | 88e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_PSK | 89e5b75505Sopenharmony_ci WPA_KEY_MGMT_PSK_SHA256 | 90e5b75505Sopenharmony_ci WPA_KEY_MGMT_SAE | 91e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_SAE)); 92e5b75505Sopenharmony_ci} 93e5b75505Sopenharmony_ci 94e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_ft(int akm) 95e5b75505Sopenharmony_ci{ 96e5b75505Sopenharmony_ci return !!(akm & WPA_KEY_MGMT_FT); 97e5b75505Sopenharmony_ci} 98e5b75505Sopenharmony_ci 99e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_only_ft(int akm) 100e5b75505Sopenharmony_ci{ 101e5b75505Sopenharmony_ci int ft = wpa_key_mgmt_ft(akm); 102e5b75505Sopenharmony_ci akm &= ~WPA_KEY_MGMT_FT; 103e5b75505Sopenharmony_ci return ft && !akm; 104e5b75505Sopenharmony_ci} 105e5b75505Sopenharmony_ci 106e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_ft_psk(int akm) 107e5b75505Sopenharmony_ci{ 108e5b75505Sopenharmony_ci return !!(akm & WPA_KEY_MGMT_FT_PSK); 109e5b75505Sopenharmony_ci} 110e5b75505Sopenharmony_ci 111e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_sae(int akm) 112e5b75505Sopenharmony_ci{ 113e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_SAE | 114e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_SAE)); 115e5b75505Sopenharmony_ci} 116e5b75505Sopenharmony_ci 117e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_fils(int akm) 118e5b75505Sopenharmony_ci{ 119e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_FILS_SHA256 | 120e5b75505Sopenharmony_ci WPA_KEY_MGMT_FILS_SHA384 | 121e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA256 | 122e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA384)); 123e5b75505Sopenharmony_ci} 124e5b75505Sopenharmony_ci 125e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_sha256(int akm) 126e5b75505Sopenharmony_ci{ 127e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_PSK_SHA256 | 128e5b75505Sopenharmony_ci WPA_KEY_MGMT_IEEE8021X_SHA256 | 129e5b75505Sopenharmony_ci WPA_KEY_MGMT_SAE | 130e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_SAE | 131e5b75505Sopenharmony_ci WPA_KEY_MGMT_OSEN | 132e5b75505Sopenharmony_ci WPA_KEY_MGMT_IEEE8021X_SUITE_B | 133e5b75505Sopenharmony_ci WPA_KEY_MGMT_FILS_SHA256 | 134e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA256)); 135e5b75505Sopenharmony_ci} 136e5b75505Sopenharmony_ci 137e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_sha384(int akm) 138e5b75505Sopenharmony_ci{ 139e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_IEEE8021X_SUITE_B_192 | 140e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_IEEE8021X_SHA384 | 141e5b75505Sopenharmony_ci WPA_KEY_MGMT_FILS_SHA384 | 142e5b75505Sopenharmony_ci WPA_KEY_MGMT_FT_FILS_SHA384)); 143e5b75505Sopenharmony_ci} 144e5b75505Sopenharmony_ci 145e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_suite_b(int akm) 146e5b75505Sopenharmony_ci{ 147e5b75505Sopenharmony_ci return !!(akm & (WPA_KEY_MGMT_IEEE8021X_SUITE_B | 148e5b75505Sopenharmony_ci WPA_KEY_MGMT_IEEE8021X_SUITE_B_192)); 149e5b75505Sopenharmony_ci} 150e5b75505Sopenharmony_ci 151e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_wpa(int akm) 152e5b75505Sopenharmony_ci{ 153e5b75505Sopenharmony_ci return wpa_key_mgmt_wpa_ieee8021x(akm) || 154e5b75505Sopenharmony_ci wpa_key_mgmt_wpa_psk(akm) || 155e5b75505Sopenharmony_ci wpa_key_mgmt_fils(akm) || 156e5b75505Sopenharmony_ci wpa_key_mgmt_sae(akm) || 157e5b75505Sopenharmony_ci akm == WPA_KEY_MGMT_OWE || 158e5b75505Sopenharmony_ci akm == WPA_KEY_MGMT_DPP; 159e5b75505Sopenharmony_ci} 160e5b75505Sopenharmony_ci 161e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_wpa_any(int akm) 162e5b75505Sopenharmony_ci{ 163e5b75505Sopenharmony_ci return wpa_key_mgmt_wpa(akm) || (akm & WPA_KEY_MGMT_WPA_NONE); 164e5b75505Sopenharmony_ci} 165e5b75505Sopenharmony_ci 166e5b75505Sopenharmony_cistatic inline int wpa_key_mgmt_cckm(int akm) 167e5b75505Sopenharmony_ci{ 168e5b75505Sopenharmony_ci return akm == WPA_KEY_MGMT_CCKM; 169e5b75505Sopenharmony_ci} 170e5b75505Sopenharmony_ci 171e5b75505Sopenharmony_ci 172e5b75505Sopenharmony_ci#define WPA_PROTO_WPA BIT(0) 173e5b75505Sopenharmony_ci#define WPA_PROTO_RSN BIT(1) 174e5b75505Sopenharmony_ci#define WPA_PROTO_WAPI BIT(2) 175e5b75505Sopenharmony_ci#define WPA_PROTO_OSEN BIT(3) 176e5b75505Sopenharmony_ci 177e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_OPEN BIT(0) 178e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_SHARED BIT(1) 179e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_LEAP BIT(2) 180e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_FT BIT(3) 181e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_SAE BIT(4) 182e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_FILS BIT(5) 183e5b75505Sopenharmony_ci#define WPA_AUTH_ALG_FILS_SK_PFS BIT(6) 184e5b75505Sopenharmony_ci 185e5b75505Sopenharmony_cistatic inline int wpa_auth_alg_fils(int alg) 186e5b75505Sopenharmony_ci{ 187e5b75505Sopenharmony_ci return !!(alg & (WPA_AUTH_ALG_FILS | WPA_AUTH_ALG_FILS_SK_PFS)); 188e5b75505Sopenharmony_ci} 189e5b75505Sopenharmony_ci 190e5b75505Sopenharmony_cienum wpa_alg { 191e5b75505Sopenharmony_ci WPA_ALG_NONE, 192e5b75505Sopenharmony_ci WPA_ALG_WEP, 193e5b75505Sopenharmony_ci WPA_ALG_TKIP, 194e5b75505Sopenharmony_ci WPA_ALG_CCMP, 195e5b75505Sopenharmony_ci WPA_ALG_IGTK, 196e5b75505Sopenharmony_ci WPA_ALG_PMK, 197e5b75505Sopenharmony_ci WPA_ALG_GCMP, 198e5b75505Sopenharmony_ci WPA_ALG_SMS4, 199e5b75505Sopenharmony_ci WPA_ALG_KRK, 200e5b75505Sopenharmony_ci WPA_ALG_GCMP_256, 201e5b75505Sopenharmony_ci WPA_ALG_CCMP_256, 202e5b75505Sopenharmony_ci WPA_ALG_BIP_GMAC_128, 203e5b75505Sopenharmony_ci WPA_ALG_BIP_GMAC_256, 204e5b75505Sopenharmony_ci WPA_ALG_BIP_CMAC_256 205e5b75505Sopenharmony_ci}; 206e5b75505Sopenharmony_ci 207e5b75505Sopenharmony_ci/** 208e5b75505Sopenharmony_ci * enum wpa_states - wpa_supplicant state 209e5b75505Sopenharmony_ci * 210e5b75505Sopenharmony_ci * These enumeration values are used to indicate the current wpa_supplicant 211e5b75505Sopenharmony_ci * state (wpa_s->wpa_state). The current state can be retrieved with 212e5b75505Sopenharmony_ci * wpa_supplicant_get_state() function and the state can be changed by calling 213e5b75505Sopenharmony_ci * wpa_supplicant_set_state(). In WPA state machine (wpa.c and preauth.c), the 214e5b75505Sopenharmony_ci * wrapper functions wpa_sm_get_state() and wpa_sm_set_state() should be used 215e5b75505Sopenharmony_ci * to access the state variable. 216e5b75505Sopenharmony_ci */ 217e5b75505Sopenharmony_cienum wpa_states { 218e5b75505Sopenharmony_ci /** 219e5b75505Sopenharmony_ci * WPA_DISCONNECTED - Disconnected state 220e5b75505Sopenharmony_ci * 221e5b75505Sopenharmony_ci * This state indicates that client is not associated, but is likely to 222e5b75505Sopenharmony_ci * start looking for an access point. This state is entered when a 223e5b75505Sopenharmony_ci * connection is lost. 224e5b75505Sopenharmony_ci */ 225e5b75505Sopenharmony_ci WPA_DISCONNECTED, 226e5b75505Sopenharmony_ci 227e5b75505Sopenharmony_ci /** 228e5b75505Sopenharmony_ci * WPA_INTERFACE_DISABLED - Interface disabled 229e5b75505Sopenharmony_ci * 230e5b75505Sopenharmony_ci * This state is entered if the network interface is disabled, e.g., 231e5b75505Sopenharmony_ci * due to rfkill. wpa_supplicant refuses any new operations that would 232e5b75505Sopenharmony_ci * use the radio until the interface has been enabled. 233e5b75505Sopenharmony_ci */ 234e5b75505Sopenharmony_ci WPA_INTERFACE_DISABLED, 235e5b75505Sopenharmony_ci 236e5b75505Sopenharmony_ci /** 237e5b75505Sopenharmony_ci * WPA_INACTIVE - Inactive state (wpa_supplicant disabled) 238e5b75505Sopenharmony_ci * 239e5b75505Sopenharmony_ci * This state is entered if there are no enabled networks in the 240e5b75505Sopenharmony_ci * configuration. wpa_supplicant is not trying to associate with a new 241e5b75505Sopenharmony_ci * network and external interaction (e.g., ctrl_iface call to add or 242e5b75505Sopenharmony_ci * enable a network) is needed to start association. 243e5b75505Sopenharmony_ci */ 244e5b75505Sopenharmony_ci WPA_INACTIVE, 245e5b75505Sopenharmony_ci 246e5b75505Sopenharmony_ci /** 247e5b75505Sopenharmony_ci * WPA_SCANNING - Scanning for a network 248e5b75505Sopenharmony_ci * 249e5b75505Sopenharmony_ci * This state is entered when wpa_supplicant starts scanning for a 250e5b75505Sopenharmony_ci * network. 251e5b75505Sopenharmony_ci */ 252e5b75505Sopenharmony_ci WPA_SCANNING, 253e5b75505Sopenharmony_ci 254e5b75505Sopenharmony_ci /** 255e5b75505Sopenharmony_ci * WPA_AUTHENTICATING - Trying to authenticate with a BSS/SSID 256e5b75505Sopenharmony_ci * 257e5b75505Sopenharmony_ci * This state is entered when wpa_supplicant has found a suitable BSS 258e5b75505Sopenharmony_ci * to authenticate with and the driver is configured to try to 259e5b75505Sopenharmony_ci * authenticate with this BSS. This state is used only with drivers 260e5b75505Sopenharmony_ci * that use wpa_supplicant as the SME. 261e5b75505Sopenharmony_ci */ 262e5b75505Sopenharmony_ci WPA_AUTHENTICATING, 263e5b75505Sopenharmony_ci 264e5b75505Sopenharmony_ci /** 265e5b75505Sopenharmony_ci * WPA_ASSOCIATING - Trying to associate with a BSS/SSID 266e5b75505Sopenharmony_ci * 267e5b75505Sopenharmony_ci * This state is entered when wpa_supplicant has found a suitable BSS 268e5b75505Sopenharmony_ci * to associate with and the driver is configured to try to associate 269e5b75505Sopenharmony_ci * with this BSS in ap_scan=1 mode. When using ap_scan=2 mode, this 270e5b75505Sopenharmony_ci * state is entered when the driver is configured to try to associate 271e5b75505Sopenharmony_ci * with a network using the configured SSID and security policy. 272e5b75505Sopenharmony_ci */ 273e5b75505Sopenharmony_ci WPA_ASSOCIATING, 274e5b75505Sopenharmony_ci 275e5b75505Sopenharmony_ci /** 276e5b75505Sopenharmony_ci * WPA_ASSOCIATED - Association completed 277e5b75505Sopenharmony_ci * 278e5b75505Sopenharmony_ci * This state is entered when the driver reports that association has 279e5b75505Sopenharmony_ci * been successfully completed with an AP. If IEEE 802.1X is used 280e5b75505Sopenharmony_ci * (with or without WPA/WPA2), wpa_supplicant remains in this state 281e5b75505Sopenharmony_ci * until the IEEE 802.1X/EAPOL authentication has been completed. 282e5b75505Sopenharmony_ci */ 283e5b75505Sopenharmony_ci WPA_ASSOCIATED, 284e5b75505Sopenharmony_ci 285e5b75505Sopenharmony_ci /** 286e5b75505Sopenharmony_ci * WPA_4WAY_HANDSHAKE - WPA 4-Way Key Handshake in progress 287e5b75505Sopenharmony_ci * 288e5b75505Sopenharmony_ci * This state is entered when WPA/WPA2 4-Way Handshake is started. In 289e5b75505Sopenharmony_ci * case of WPA-PSK, this happens when receiving the first EAPOL-Key 290e5b75505Sopenharmony_ci * frame after association. In case of WPA-EAP, this state is entered 291e5b75505Sopenharmony_ci * when the IEEE 802.1X/EAPOL authentication has been completed. 292e5b75505Sopenharmony_ci */ 293e5b75505Sopenharmony_ci WPA_4WAY_HANDSHAKE, 294e5b75505Sopenharmony_ci 295e5b75505Sopenharmony_ci /** 296e5b75505Sopenharmony_ci * WPA_GROUP_HANDSHAKE - WPA Group Key Handshake in progress 297e5b75505Sopenharmony_ci * 298e5b75505Sopenharmony_ci * This state is entered when 4-Way Key Handshake has been completed 299e5b75505Sopenharmony_ci * (i.e., when the supplicant sends out message 4/4) and when Group 300e5b75505Sopenharmony_ci * Key rekeying is started by the AP (i.e., when supplicant receives 301e5b75505Sopenharmony_ci * message 1/2). 302e5b75505Sopenharmony_ci */ 303e5b75505Sopenharmony_ci WPA_GROUP_HANDSHAKE, 304e5b75505Sopenharmony_ci 305e5b75505Sopenharmony_ci /** 306e5b75505Sopenharmony_ci * WPA_COMPLETED - All authentication completed 307e5b75505Sopenharmony_ci * 308e5b75505Sopenharmony_ci * This state is entered when the full authentication process is 309e5b75505Sopenharmony_ci * completed. In case of WPA2, this happens when the 4-Way Handshake is 310e5b75505Sopenharmony_ci * successfully completed. With WPA, this state is entered after the 311e5b75505Sopenharmony_ci * Group Key Handshake; with IEEE 802.1X (non-WPA) connection is 312e5b75505Sopenharmony_ci * completed after dynamic keys are received (or if not used, after 313e5b75505Sopenharmony_ci * the EAP authentication has been completed). With static WEP keys and 314e5b75505Sopenharmony_ci * plaintext connections, this state is entered when an association 315e5b75505Sopenharmony_ci * has been completed. 316e5b75505Sopenharmony_ci * 317e5b75505Sopenharmony_ci * This state indicates that the supplicant has completed its 318e5b75505Sopenharmony_ci * processing for the association phase and that data connection is 319e5b75505Sopenharmony_ci * fully configured. 320e5b75505Sopenharmony_ci */ 321e5b75505Sopenharmony_ci WPA_COMPLETED 322e5b75505Sopenharmony_ci}; 323e5b75505Sopenharmony_ci 324e5b75505Sopenharmony_ci#define MLME_SETPROTECTION_PROTECT_TYPE_NONE 0 325e5b75505Sopenharmony_ci#define MLME_SETPROTECTION_PROTECT_TYPE_RX 1 326e5b75505Sopenharmony_ci#define MLME_SETPROTECTION_PROTECT_TYPE_TX 2 327e5b75505Sopenharmony_ci#define MLME_SETPROTECTION_PROTECT_TYPE_RX_TX 3 328e5b75505Sopenharmony_ci 329e5b75505Sopenharmony_ci#define MLME_SETPROTECTION_KEY_TYPE_GROUP 0 330e5b75505Sopenharmony_ci#define MLME_SETPROTECTION_KEY_TYPE_PAIRWISE 1 331e5b75505Sopenharmony_ci 332e5b75505Sopenharmony_ci 333e5b75505Sopenharmony_ci/** 334e5b75505Sopenharmony_ci * enum mfp_options - Management frame protection (IEEE 802.11w) options 335e5b75505Sopenharmony_ci */ 336e5b75505Sopenharmony_cienum mfp_options { 337e5b75505Sopenharmony_ci NO_MGMT_FRAME_PROTECTION = 0, 338e5b75505Sopenharmony_ci MGMT_FRAME_PROTECTION_OPTIONAL = 1, 339e5b75505Sopenharmony_ci MGMT_FRAME_PROTECTION_REQUIRED = 2, 340e5b75505Sopenharmony_ci}; 341e5b75505Sopenharmony_ci#define MGMT_FRAME_PROTECTION_DEFAULT 3 342e5b75505Sopenharmony_ci 343e5b75505Sopenharmony_ci/** 344e5b75505Sopenharmony_ci * enum hostapd_hw_mode - Hardware mode 345e5b75505Sopenharmony_ci */ 346e5b75505Sopenharmony_cienum hostapd_hw_mode { 347e5b75505Sopenharmony_ci HOSTAPD_MODE_IEEE80211B, 348e5b75505Sopenharmony_ci HOSTAPD_MODE_IEEE80211G, 349e5b75505Sopenharmony_ci HOSTAPD_MODE_IEEE80211A, 350e5b75505Sopenharmony_ci HOSTAPD_MODE_IEEE80211AD, 351e5b75505Sopenharmony_ci HOSTAPD_MODE_IEEE80211ANY, 352e5b75505Sopenharmony_ci NUM_HOSTAPD_MODES 353e5b75505Sopenharmony_ci}; 354e5b75505Sopenharmony_ci 355e5b75505Sopenharmony_ci/** 356e5b75505Sopenharmony_ci * enum wpa_ctrl_req_type - Control interface request types 357e5b75505Sopenharmony_ci */ 358e5b75505Sopenharmony_cienum wpa_ctrl_req_type { 359e5b75505Sopenharmony_ci WPA_CTRL_REQ_UNKNOWN, 360e5b75505Sopenharmony_ci WPA_CTRL_REQ_EAP_IDENTITY, 361e5b75505Sopenharmony_ci WPA_CTRL_REQ_EAP_PASSWORD, 362e5b75505Sopenharmony_ci WPA_CTRL_REQ_EAP_NEW_PASSWORD, 363e5b75505Sopenharmony_ci WPA_CTRL_REQ_EAP_PIN, 364e5b75505Sopenharmony_ci WPA_CTRL_REQ_EAP_OTP, 365e5b75505Sopenharmony_ci WPA_CTRL_REQ_EAP_PASSPHRASE, 366e5b75505Sopenharmony_ci WPA_CTRL_REQ_SIM, 367e5b75505Sopenharmony_ci WPA_CTRL_REQ_PSK_PASSPHRASE, 368e5b75505Sopenharmony_ci WPA_CTRL_REQ_EXT_CERT_CHECK, 369e5b75505Sopenharmony_ci NUM_WPA_CTRL_REQS 370e5b75505Sopenharmony_ci}; 371e5b75505Sopenharmony_ci 372e5b75505Sopenharmony_ci/* Maximum number of EAP methods to store for EAP server user information */ 373e5b75505Sopenharmony_ci#define EAP_MAX_METHODS 8 374e5b75505Sopenharmony_ci 375e5b75505Sopenharmony_cienum mesh_plink_state { 376e5b75505Sopenharmony_ci PLINK_IDLE = 1, 377e5b75505Sopenharmony_ci PLINK_OPN_SNT, 378e5b75505Sopenharmony_ci PLINK_OPN_RCVD, 379e5b75505Sopenharmony_ci PLINK_CNF_RCVD, 380e5b75505Sopenharmony_ci PLINK_ESTAB, 381e5b75505Sopenharmony_ci PLINK_HOLDING, 382e5b75505Sopenharmony_ci PLINK_BLOCKED, /* not defined in the IEEE 802.11 standard */ 383e5b75505Sopenharmony_ci}; 384e5b75505Sopenharmony_ci 385e5b75505Sopenharmony_cienum set_band { 386e5b75505Sopenharmony_ci WPA_SETBAND_AUTO, 387e5b75505Sopenharmony_ci WPA_SETBAND_5G, 388e5b75505Sopenharmony_ci WPA_SETBAND_2G 389e5b75505Sopenharmony_ci}; 390e5b75505Sopenharmony_ci 391e5b75505Sopenharmony_cienum wpa_radio_work_band { 392e5b75505Sopenharmony_ci BAND_2_4_GHZ = 1, 393e5b75505Sopenharmony_ci BAND_5_GHZ = 2, 394e5b75505Sopenharmony_ci BAND_60_GHZ = 4, 395e5b75505Sopenharmony_ci}; 396e5b75505Sopenharmony_ci 397e5b75505Sopenharmony_cienum beacon_rate_type { 398e5b75505Sopenharmony_ci BEACON_RATE_LEGACY, 399e5b75505Sopenharmony_ci BEACON_RATE_HT, 400e5b75505Sopenharmony_ci BEACON_RATE_VHT 401e5b75505Sopenharmony_ci}; 402e5b75505Sopenharmony_ci 403e5b75505Sopenharmony_cienum eap_proxy_sim_state { 404e5b75505Sopenharmony_ci SIM_STATE_ERROR, 405e5b75505Sopenharmony_ci}; 406e5b75505Sopenharmony_ci 407e5b75505Sopenharmony_ci#define OCE_STA BIT(0) 408e5b75505Sopenharmony_ci#define OCE_STA_CFON BIT(1) 409e5b75505Sopenharmony_ci#define OCE_AP BIT(2) 410e5b75505Sopenharmony_ci 411e5b75505Sopenharmony_ci/* enum chan_width - Channel width definitions */ 412e5b75505Sopenharmony_cienum chan_width { 413e5b75505Sopenharmony_ci CHAN_WIDTH_20_NOHT, 414e5b75505Sopenharmony_ci CHAN_WIDTH_20, 415e5b75505Sopenharmony_ci CHAN_WIDTH_40, 416e5b75505Sopenharmony_ci CHAN_WIDTH_80, 417e5b75505Sopenharmony_ci CHAN_WIDTH_80P80, 418e5b75505Sopenharmony_ci CHAN_WIDTH_160, 419e5b75505Sopenharmony_ci CHAN_WIDTH_UNKNOWN 420e5b75505Sopenharmony_ci}; 421e5b75505Sopenharmony_ci 422e5b75505Sopenharmony_ci#endif /* DEFS_H */ 423