139beb93cSSam Leffler /* 239beb93cSSam Leffler * WPA Supplicant / Network configuration structures 35b9c547cSRui Paulo * Copyright (c) 2003-2013, Jouni Malinen <j@w1.fi> 439beb93cSSam Leffler * 5f05cddf9SRui Paulo * This software may be distributed under the terms of the BSD license. 6f05cddf9SRui Paulo * See README for more details. 739beb93cSSam Leffler */ 839beb93cSSam Leffler 939beb93cSSam Leffler #ifndef CONFIG_SSID_H 1039beb93cSSam Leffler #define CONFIG_SSID_H 1139beb93cSSam Leffler 12e28a4053SRui Paulo #include "common/defs.h" 135b9c547cSRui Paulo #include "utils/list.h" 1439beb93cSSam Leffler #include "eap_peer/eap_config.h" 1539beb93cSSam Leffler 1639beb93cSSam Leffler 1739beb93cSSam Leffler #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) 1839beb93cSSam Leffler #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \ 1939beb93cSSam Leffler EAPOL_FLAG_REQUIRE_KEY_BROADCAST) 2039beb93cSSam Leffler #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN) 2139beb93cSSam Leffler #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X) 22c1d255d3SCy Schubert #ifdef CONFIG_NO_TKIP 23c1d255d3SCy Schubert #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP) 24c1d255d3SCy Schubert #define DEFAULT_GROUP (WPA_CIPHER_CCMP) 25c1d255d3SCy Schubert #else /* CONFIG_NO_TKIP */ 2639beb93cSSam Leffler #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 27325151a3SRui Paulo #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 28c1d255d3SCy Schubert #endif /* CONFIG_NO_TKIP */ 2939beb93cSSam Leffler #define DEFAULT_FRAGMENT_SIZE 1398 3039beb93cSSam Leffler 31f05cddf9SRui Paulo #define DEFAULT_BG_SCAN_PERIOD -1 325b9c547cSRui Paulo #define DEFAULT_MESH_MAX_RETRIES 2 335b9c547cSRui Paulo #define DEFAULT_MESH_RETRY_TIMEOUT 40 345b9c547cSRui Paulo #define DEFAULT_MESH_CONFIRM_TIMEOUT 40 355b9c547cSRui Paulo #define DEFAULT_MESH_HOLDING_TIMEOUT 40 3685732ac8SCy Schubert #define DEFAULT_MESH_RSSI_THRESHOLD 1 /* no change */ 37f05cddf9SRui Paulo #define DEFAULT_DISABLE_HT 0 38f05cddf9SRui Paulo #define DEFAULT_DISABLE_HT40 0 39f05cddf9SRui Paulo #define DEFAULT_DISABLE_SGI 0 405b9c547cSRui Paulo #define DEFAULT_DISABLE_LDPC 0 414bc52338SCy Schubert #define DEFAULT_TX_STBC -1 /* no change */ 424bc52338SCy Schubert #define DEFAULT_RX_STBC -1 /* no change */ 43f05cddf9SRui Paulo #define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */ 44f05cddf9SRui Paulo #define DEFAULT_AMPDU_FACTOR -1 /* no change */ 45f05cddf9SRui Paulo #define DEFAULT_AMPDU_DENSITY -1 /* no change */ 465b9c547cSRui Paulo #define DEFAULT_USER_SELECTED_SIM 1 474bc52338SCy Schubert #define DEFAULT_MAX_OPER_CHWIDTH -1 485b9c547cSRui Paulo 49*4b72b91aSCy Schubert /* Consider global sae_pwe for SAE mechanism for PWE derivation */ 50*4b72b91aSCy Schubert #define DEFAULT_SAE_PWE 4 51*4b72b91aSCy Schubert 525b9c547cSRui Paulo struct psk_list_entry { 535b9c547cSRui Paulo struct dl_list list; 545b9c547cSRui Paulo u8 addr[ETH_ALEN]; 555b9c547cSRui Paulo u8 psk[32]; 565b9c547cSRui Paulo u8 p2p; 575b9c547cSRui Paulo }; 58f05cddf9SRui Paulo 59206b73d0SCy Schubert enum wpas_mode { 60206b73d0SCy Schubert WPAS_MODE_INFRA = 0, 61206b73d0SCy Schubert WPAS_MODE_IBSS = 1, 62206b73d0SCy Schubert WPAS_MODE_AP = 2, 63206b73d0SCy Schubert WPAS_MODE_P2P_GO = 3, 64206b73d0SCy Schubert WPAS_MODE_P2P_GROUP_FORMATION = 4, 65206b73d0SCy Schubert WPAS_MODE_MESH = 5, 66206b73d0SCy Schubert }; 67206b73d0SCy Schubert 68c1d255d3SCy Schubert enum sae_pk_mode { 69c1d255d3SCy Schubert SAE_PK_MODE_AUTOMATIC = 0, 70c1d255d3SCy Schubert SAE_PK_MODE_ONLY = 1, 71c1d255d3SCy Schubert SAE_PK_MODE_DISABLED = 2, 72c1d255d3SCy Schubert }; 73c1d255d3SCy Schubert 7439beb93cSSam Leffler /** 7539beb93cSSam Leffler * struct wpa_ssid - Network configuration data 7639beb93cSSam Leffler * 7739beb93cSSam Leffler * This structure includes all the configuration variables for a network. This 7839beb93cSSam Leffler * data is included in the per-interface configuration data as an element of 7939beb93cSSam Leffler * the network list, struct wpa_config::ssid. Each network block in the 8039beb93cSSam Leffler * configuration is mapped to a struct wpa_ssid instance. 8139beb93cSSam Leffler */ 8239beb93cSSam Leffler struct wpa_ssid { 8339beb93cSSam Leffler /** 8439beb93cSSam Leffler * next - Next network in global list 8539beb93cSSam Leffler * 8639beb93cSSam Leffler * This pointer can be used to iterate over all networks. The head of 8739beb93cSSam Leffler * this list is stored in the ssid field of struct wpa_config. 8839beb93cSSam Leffler */ 8939beb93cSSam Leffler struct wpa_ssid *next; 9039beb93cSSam Leffler 9139beb93cSSam Leffler /** 9239beb93cSSam Leffler * pnext - Next network in per-priority list 9339beb93cSSam Leffler * 9439beb93cSSam Leffler * This pointer can be used to iterate over all networks in the same 9539beb93cSSam Leffler * priority class. The heads of these list are stored in the pssid 9639beb93cSSam Leffler * fields of struct wpa_config. 9739beb93cSSam Leffler */ 9839beb93cSSam Leffler struct wpa_ssid *pnext; 9939beb93cSSam Leffler 10039beb93cSSam Leffler /** 10139beb93cSSam Leffler * id - Unique id for the network 10239beb93cSSam Leffler * 10339beb93cSSam Leffler * This identifier is used as a unique identifier for each network 10439beb93cSSam Leffler * block when using the control interface. Each network is allocated an 10539beb93cSSam Leffler * id when it is being created, either when reading the configuration 10639beb93cSSam Leffler * file or when a new network is added through the control interface. 10739beb93cSSam Leffler */ 10839beb93cSSam Leffler int id; 10939beb93cSSam Leffler 11039beb93cSSam Leffler /** 11139beb93cSSam Leffler * priority - Priority group 11239beb93cSSam Leffler * 11339beb93cSSam Leffler * By default, all networks will get same priority group (0). If some 11439beb93cSSam Leffler * of the networks are more desirable, this field can be used to change 11539beb93cSSam Leffler * the order in which wpa_supplicant goes through the networks when 11639beb93cSSam Leffler * selecting a BSS. The priority groups will be iterated in decreasing 11739beb93cSSam Leffler * priority (i.e., the larger the priority value, the sooner the 11839beb93cSSam Leffler * network is matched against the scan results). Within each priority 11939beb93cSSam Leffler * group, networks will be selected based on security policy, signal 12039beb93cSSam Leffler * strength, etc. 12139beb93cSSam Leffler * 12239beb93cSSam Leffler * Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are 12339beb93cSSam Leffler * not using this priority to select the order for scanning. Instead, 12439beb93cSSam Leffler * they try the networks in the order that used in the configuration 12539beb93cSSam Leffler * file. 12639beb93cSSam Leffler */ 12739beb93cSSam Leffler int priority; 12839beb93cSSam Leffler 12939beb93cSSam Leffler /** 13039beb93cSSam Leffler * ssid - Service set identifier (network name) 13139beb93cSSam Leffler * 13239beb93cSSam Leffler * This is the SSID for the network. For wireless interfaces, this is 13339beb93cSSam Leffler * used to select which network will be used. If set to %NULL (or 13439beb93cSSam Leffler * ssid_len=0), any SSID can be used. For wired interfaces, this must 13539beb93cSSam Leffler * be set to %NULL. Note: SSID may contain any characters, even nul 13639beb93cSSam Leffler * (ASCII 0) and as such, this should not be assumed to be a nul 13739beb93cSSam Leffler * terminated string. ssid_len defines how many characters are valid 13839beb93cSSam Leffler * and the ssid field is not guaranteed to be nul terminated. 13939beb93cSSam Leffler */ 14039beb93cSSam Leffler u8 *ssid; 14139beb93cSSam Leffler 14239beb93cSSam Leffler /** 14339beb93cSSam Leffler * ssid_len - Length of the SSID 14439beb93cSSam Leffler */ 14539beb93cSSam Leffler size_t ssid_len; 14639beb93cSSam Leffler 14739beb93cSSam Leffler /** 14839beb93cSSam Leffler * bssid - BSSID 14939beb93cSSam Leffler * 15039beb93cSSam Leffler * If set, this network block is used only when associating with the AP 15139beb93cSSam Leffler * using the configured BSSID 152f05cddf9SRui Paulo * 153f05cddf9SRui Paulo * If this is a persistent P2P group (disabled == 2), this is the GO 154f05cddf9SRui Paulo * Device Address. 15539beb93cSSam Leffler */ 15639beb93cSSam Leffler u8 bssid[ETH_ALEN]; 15739beb93cSSam Leffler 15839beb93cSSam Leffler /** 159c1d255d3SCy Schubert * bssid_ignore - List of inacceptable BSSIDs 1605b9c547cSRui Paulo */ 161c1d255d3SCy Schubert u8 *bssid_ignore; 162c1d255d3SCy Schubert size_t num_bssid_ignore; 1635b9c547cSRui Paulo 1645b9c547cSRui Paulo /** 165c1d255d3SCy Schubert * bssid_accept - List of acceptable BSSIDs 1665b9c547cSRui Paulo */ 167c1d255d3SCy Schubert u8 *bssid_accept; 168c1d255d3SCy Schubert size_t num_bssid_accept; 1695b9c547cSRui Paulo 1705b9c547cSRui Paulo /** 17139beb93cSSam Leffler * bssid_set - Whether BSSID is configured for this network 17239beb93cSSam Leffler */ 17339beb93cSSam Leffler int bssid_set; 17439beb93cSSam Leffler 17539beb93cSSam Leffler /** 17685732ac8SCy Schubert * bssid_hint - BSSID hint 17785732ac8SCy Schubert * 17885732ac8SCy Schubert * If set, this is configured to the driver as a preferred initial BSSID 17985732ac8SCy Schubert * while connecting to this network. 18085732ac8SCy Schubert */ 18185732ac8SCy Schubert u8 bssid_hint[ETH_ALEN]; 18285732ac8SCy Schubert 18385732ac8SCy Schubert /** 18485732ac8SCy Schubert * bssid_hint_set - Whether BSSID hint is configured for this network 18585732ac8SCy Schubert */ 18685732ac8SCy Schubert int bssid_hint_set; 18785732ac8SCy Schubert 18885732ac8SCy Schubert /** 1895b9c547cSRui Paulo * go_p2p_dev_addr - GO's P2P Device Address or all zeros if not set 1905b9c547cSRui Paulo */ 1915b9c547cSRui Paulo u8 go_p2p_dev_addr[ETH_ALEN]; 1925b9c547cSRui Paulo 1935b9c547cSRui Paulo /** 19439beb93cSSam Leffler * psk - WPA pre-shared key (256 bits) 19539beb93cSSam Leffler */ 19639beb93cSSam Leffler u8 psk[32]; 19739beb93cSSam Leffler 19839beb93cSSam Leffler /** 19939beb93cSSam Leffler * psk_set - Whether PSK field is configured 20039beb93cSSam Leffler */ 20139beb93cSSam Leffler int psk_set; 20239beb93cSSam Leffler 20339beb93cSSam Leffler /** 20439beb93cSSam Leffler * passphrase - WPA ASCII passphrase 20539beb93cSSam Leffler * 20639beb93cSSam Leffler * If this is set, psk will be generated using the SSID and passphrase 20739beb93cSSam Leffler * configured for the network. ASCII passphrase must be between 8 and 20839beb93cSSam Leffler * 63 characters (inclusive). 20939beb93cSSam Leffler */ 21039beb93cSSam Leffler char *passphrase; 21139beb93cSSam Leffler 21239beb93cSSam Leffler /** 21385732ac8SCy Schubert * sae_password - SAE password 21485732ac8SCy Schubert * 21585732ac8SCy Schubert * This parameter can be used to set a password for SAE. By default, the 21685732ac8SCy Schubert * passphrase value is used if this separate parameter is not used, but 21785732ac8SCy Schubert * passphrase follows the WPA-PSK constraints (8..63 characters) even 21885732ac8SCy Schubert * though SAE passwords do not have such constraints. 21985732ac8SCy Schubert */ 22085732ac8SCy Schubert char *sae_password; 22185732ac8SCy Schubert 22285732ac8SCy Schubert /** 22385732ac8SCy Schubert * sae_password_id - SAE password identifier 22485732ac8SCy Schubert * 22585732ac8SCy Schubert * This parameter can be used to identify a specific SAE password. If 22685732ac8SCy Schubert * not included, the default SAE password is used instead. 22785732ac8SCy Schubert */ 22885732ac8SCy Schubert char *sae_password_id; 22985732ac8SCy Schubert 230c1d255d3SCy Schubert struct sae_pt *pt; 231c1d255d3SCy Schubert 23285732ac8SCy Schubert /** 233f05cddf9SRui Paulo * ext_psk - PSK/passphrase name in external storage 234f05cddf9SRui Paulo * 235f05cddf9SRui Paulo * If this is set, PSK/passphrase will be fetched from external storage 236f05cddf9SRui Paulo * when requesting association with the network. 237f05cddf9SRui Paulo */ 238f05cddf9SRui Paulo char *ext_psk; 239f05cddf9SRui Paulo 240f05cddf9SRui Paulo /** 241325151a3SRui Paulo * mem_only_psk - Whether to keep PSK/passphrase only in memory 242325151a3SRui Paulo * 243325151a3SRui Paulo * 0 = allow psk/passphrase to be stored to the configuration file 244325151a3SRui Paulo * 1 = do not store psk/passphrase to the configuration file 245325151a3SRui Paulo */ 246325151a3SRui Paulo int mem_only_psk; 247325151a3SRui Paulo 248325151a3SRui Paulo /** 24939beb93cSSam Leffler * pairwise_cipher - Bitfield of allowed pairwise ciphers, WPA_CIPHER_* 25039beb93cSSam Leffler */ 25139beb93cSSam Leffler int pairwise_cipher; 25239beb93cSSam Leffler 25339beb93cSSam Leffler /** 25439beb93cSSam Leffler * group_cipher - Bitfield of allowed group ciphers, WPA_CIPHER_* 25539beb93cSSam Leffler */ 25639beb93cSSam Leffler int group_cipher; 25739beb93cSSam Leffler 25839beb93cSSam Leffler /** 25985732ac8SCy Schubert * group_mgmt_cipher - Bitfield of allowed group management ciphers 26085732ac8SCy Schubert * 26185732ac8SCy Schubert * This is a bitfield of WPA_CIPHER_AES_128_CMAC and WPA_CIPHER_BIP_* 26285732ac8SCy Schubert * values. If 0, no constraint is used for the cipher, i.e., whatever 26385732ac8SCy Schubert * the AP uses is accepted. 26485732ac8SCy Schubert */ 26585732ac8SCy Schubert int group_mgmt_cipher; 26685732ac8SCy Schubert 26785732ac8SCy Schubert /** 26839beb93cSSam Leffler * key_mgmt - Bitfield of allowed key management protocols 26939beb93cSSam Leffler * 27039beb93cSSam Leffler * WPA_KEY_MGMT_* 27139beb93cSSam Leffler */ 27239beb93cSSam Leffler int key_mgmt; 27339beb93cSSam Leffler 27439beb93cSSam Leffler /** 275f05cddf9SRui Paulo * bg_scan_period - Background scan period in seconds, 0 to disable, or 276f05cddf9SRui Paulo * -1 to indicate no change to default driver configuration 277f05cddf9SRui Paulo */ 278f05cddf9SRui Paulo int bg_scan_period; 279f05cddf9SRui Paulo 280f05cddf9SRui Paulo /** 28139beb93cSSam Leffler * proto - Bitfield of allowed protocols, WPA_PROTO_* 28239beb93cSSam Leffler */ 28339beb93cSSam Leffler int proto; 28439beb93cSSam Leffler 28539beb93cSSam Leffler /** 28639beb93cSSam Leffler * auth_alg - Bitfield of allowed authentication algorithms 28739beb93cSSam Leffler * 28839beb93cSSam Leffler * WPA_AUTH_ALG_* 28939beb93cSSam Leffler */ 29039beb93cSSam Leffler int auth_alg; 29139beb93cSSam Leffler 29239beb93cSSam Leffler /** 29339beb93cSSam Leffler * scan_ssid - Scan this SSID with Probe Requests 29439beb93cSSam Leffler * 29539beb93cSSam Leffler * scan_ssid can be used to scan for APs using hidden SSIDs. 29639beb93cSSam Leffler * Note: Many drivers do not support this. ap_mode=2 can be used with 297325151a3SRui Paulo * such drivers to use hidden SSIDs. Note2: Most nl80211-based drivers 298325151a3SRui Paulo * do support scan_ssid=1 and that should be used with them instead of 299325151a3SRui Paulo * ap_scan=2. 30039beb93cSSam Leffler */ 30139beb93cSSam Leffler int scan_ssid; 30239beb93cSSam Leffler 30339beb93cSSam Leffler #ifdef IEEE8021X_EAPOL 30439beb93cSSam Leffler #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0) 30539beb93cSSam Leffler #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1) 30639beb93cSSam Leffler /** 30739beb93cSSam Leffler * eapol_flags - Bit field of IEEE 802.1X/EAPOL options (EAPOL_FLAG_*) 30839beb93cSSam Leffler */ 30939beb93cSSam Leffler int eapol_flags; 31039beb93cSSam Leffler 31139beb93cSSam Leffler /** 31239beb93cSSam Leffler * eap - EAP peer configuration for this network 31339beb93cSSam Leffler */ 31439beb93cSSam Leffler struct eap_peer_config eap; 31539beb93cSSam Leffler #endif /* IEEE8021X_EAPOL */ 31639beb93cSSam Leffler 317c1d255d3SCy Schubert #ifdef CONFIG_WEP 31839beb93cSSam Leffler #define NUM_WEP_KEYS 4 31939beb93cSSam Leffler #define MAX_WEP_KEY_LEN 16 32039beb93cSSam Leffler /** 32139beb93cSSam Leffler * wep_key - WEP keys 32239beb93cSSam Leffler */ 32339beb93cSSam Leffler u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN]; 32439beb93cSSam Leffler 32539beb93cSSam Leffler /** 32639beb93cSSam Leffler * wep_key_len - WEP key lengths 32739beb93cSSam Leffler */ 32839beb93cSSam Leffler size_t wep_key_len[NUM_WEP_KEYS]; 32939beb93cSSam Leffler 33039beb93cSSam Leffler /** 33139beb93cSSam Leffler * wep_tx_keyidx - Default key index for TX frames using WEP 33239beb93cSSam Leffler */ 33339beb93cSSam Leffler int wep_tx_keyidx; 334c1d255d3SCy Schubert #endif /* CONFIG_WEP */ 33539beb93cSSam Leffler 33639beb93cSSam Leffler /** 33739beb93cSSam Leffler * proactive_key_caching - Enable proactive key caching 33839beb93cSSam Leffler * 33939beb93cSSam Leffler * This field can be used to enable proactive key caching which is also 34039beb93cSSam Leffler * known as opportunistic PMKSA caching for WPA2. This is disabled (0) 341f05cddf9SRui Paulo * by default unless default value is changed with the global okc=1 342f05cddf9SRui Paulo * parameter. Enable by setting this to 1. 34339beb93cSSam Leffler * 34439beb93cSSam Leffler * Proactive key caching is used to make supplicant assume that the APs 34539beb93cSSam Leffler * are using the same PMK and generate PMKSA cache entries without 34639beb93cSSam Leffler * doing RSN pre-authentication. This requires support from the AP side 34739beb93cSSam Leffler * and is normally used with wireless switches that co-locate the 34839beb93cSSam Leffler * authenticator. 349f05cddf9SRui Paulo * 350f05cddf9SRui Paulo * Internally, special value -1 is used to indicate that the parameter 351f05cddf9SRui Paulo * was not specified in the configuration (i.e., default behavior is 352f05cddf9SRui Paulo * followed). 35339beb93cSSam Leffler */ 35439beb93cSSam Leffler int proactive_key_caching; 35539beb93cSSam Leffler 35639beb93cSSam Leffler /** 35739beb93cSSam Leffler * mixed_cell - Whether mixed cells are allowed 35839beb93cSSam Leffler * 35939beb93cSSam Leffler * This option can be used to configure whether so called mixed cells, 36039beb93cSSam Leffler * i.e., networks that use both plaintext and encryption in the same 36139beb93cSSam Leffler * SSID, are allowed. This is disabled (0) by default. Enable by 36239beb93cSSam Leffler * setting this to 1. 36339beb93cSSam Leffler */ 36439beb93cSSam Leffler int mixed_cell; 36539beb93cSSam Leffler 36639beb93cSSam Leffler #ifdef IEEE8021X_EAPOL 36739beb93cSSam Leffler 36839beb93cSSam Leffler /** 36939beb93cSSam Leffler * leap - Number of EAP methods using LEAP 37039beb93cSSam Leffler * 37139beb93cSSam Leffler * This field should be set to 1 if LEAP is enabled. This is used to 37239beb93cSSam Leffler * select IEEE 802.11 authentication algorithm. 37339beb93cSSam Leffler */ 37439beb93cSSam Leffler int leap; 37539beb93cSSam Leffler 37639beb93cSSam Leffler /** 37739beb93cSSam Leffler * non_leap - Number of EAP methods not using LEAP 37839beb93cSSam Leffler * 37939beb93cSSam Leffler * This field should be set to >0 if any EAP method other than LEAP is 38039beb93cSSam Leffler * enabled. This is used to select IEEE 802.11 authentication 38139beb93cSSam Leffler * algorithm. 38239beb93cSSam Leffler */ 38339beb93cSSam Leffler int non_leap; 38439beb93cSSam Leffler 38539beb93cSSam Leffler /** 38639beb93cSSam Leffler * eap_workaround - EAP workarounds enabled 38739beb93cSSam Leffler * 38839beb93cSSam Leffler * wpa_supplicant supports number of "EAP workarounds" to work around 38939beb93cSSam Leffler * interoperability issues with incorrectly behaving authentication 39039beb93cSSam Leffler * servers. This is recommended to be enabled by default because some 39139beb93cSSam Leffler * of the issues are present in large number of authentication servers. 39239beb93cSSam Leffler * 39339beb93cSSam Leffler * Strict EAP conformance mode can be configured by disabling 39439beb93cSSam Leffler * workarounds with eap_workaround = 0. 39539beb93cSSam Leffler */ 39639beb93cSSam Leffler unsigned int eap_workaround; 39739beb93cSSam Leffler 39839beb93cSSam Leffler #endif /* IEEE8021X_EAPOL */ 39939beb93cSSam Leffler 40039beb93cSSam Leffler /** 40139beb93cSSam Leffler * mode - IEEE 802.11 operation mode (Infrastucture/IBSS) 40239beb93cSSam Leffler * 40339beb93cSSam Leffler * 0 = infrastructure (Managed) mode, i.e., associate with an AP. 40439beb93cSSam Leffler * 40539beb93cSSam Leffler * 1 = IBSS (ad-hoc, peer-to-peer) 40639beb93cSSam Leffler * 407e28a4053SRui Paulo * 2 = AP (access point) 408e28a4053SRui Paulo * 409f05cddf9SRui Paulo * 3 = P2P Group Owner (can be set in the configuration file) 410f05cddf9SRui Paulo * 411f05cddf9SRui Paulo * 4 = P2P Group Formation (used internally; not in configuration 412f05cddf9SRui Paulo * files) 413f05cddf9SRui Paulo * 4145b9c547cSRui Paulo * 5 = Mesh 4155b9c547cSRui Paulo * 4165b9c547cSRui Paulo * Note: IBSS can only be used with key_mgmt NONE (plaintext and static 4175b9c547cSRui Paulo * WEP) and WPA-PSK (with proto=RSN). In addition, key_mgmt=WPA-NONE 4185b9c547cSRui Paulo * (fixed group key TKIP/CCMP) is available for backwards compatibility, 4195b9c547cSRui Paulo * but its use is deprecated. WPA-None requires following network block 4205b9c547cSRui Paulo * options: proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or 4215b9c547cSRui Paulo * CCMP, but not both), and psk must also be set (either directly or 4225b9c547cSRui Paulo * using ASCII passphrase). 42339beb93cSSam Leffler */ 424206b73d0SCy Schubert enum wpas_mode mode; 42539beb93cSSam Leffler 42639beb93cSSam Leffler /** 427780fb4a2SCy Schubert * pbss - Whether to use PBSS. Relevant to DMG networks only. 428780fb4a2SCy Schubert * 0 = do not use PBSS 429780fb4a2SCy Schubert * 1 = use PBSS 430780fb4a2SCy Schubert * 2 = don't care (not allowed in AP mode) 431780fb4a2SCy Schubert * Used together with mode configuration. When mode is AP, it 432780fb4a2SCy Schubert * means to start a PCP instead of a regular AP. When mode is INFRA it 433780fb4a2SCy Schubert * means connect to a PCP instead of AP. In this mode you can also 434780fb4a2SCy Schubert * specify 2 (don't care) meaning connect to either AP or PCP. 435780fb4a2SCy Schubert * P2P_GO and P2P_GROUP_FORMATION modes must use PBSS in DMG network. 436780fb4a2SCy Schubert */ 437780fb4a2SCy Schubert int pbss; 438780fb4a2SCy Schubert 439780fb4a2SCy Schubert /** 44039beb93cSSam Leffler * disabled - Whether this network is currently disabled 44139beb93cSSam Leffler * 44239beb93cSSam Leffler * 0 = this network can be used (default). 44339beb93cSSam Leffler * 1 = this network block is disabled (can be enabled through 44439beb93cSSam Leffler * ctrl_iface, e.g., with wpa_cli or wpa_gui). 445f05cddf9SRui Paulo * 2 = this network block includes parameters for a persistent P2P 446f05cddf9SRui Paulo * group (can be used with P2P ctrl_iface commands) 44739beb93cSSam Leffler */ 44839beb93cSSam Leffler int disabled; 44939beb93cSSam Leffler 45039beb93cSSam Leffler /** 451f05cddf9SRui Paulo * disabled_for_connect - Whether this network was temporarily disabled 452f05cddf9SRui Paulo * 453f05cddf9SRui Paulo * This flag is used to reenable all the temporarily disabled networks 454f05cddf9SRui Paulo * after either the success or failure of a WPS connection. 455f05cddf9SRui Paulo */ 456f05cddf9SRui Paulo int disabled_for_connect; 457f05cddf9SRui Paulo 458f05cddf9SRui Paulo /** 45939beb93cSSam Leffler * id_str - Network identifier string for external scripts 46039beb93cSSam Leffler * 46139beb93cSSam Leffler * This value is passed to external ctrl_iface monitors in 46239beb93cSSam Leffler * WPA_EVENT_CONNECTED event and wpa_cli sets this as WPA_ID_STR 46339beb93cSSam Leffler * environment variable for action scripts. 46439beb93cSSam Leffler */ 46539beb93cSSam Leffler char *id_str; 46639beb93cSSam Leffler 46739beb93cSSam Leffler /** 46839beb93cSSam Leffler * ieee80211w - Whether management frame protection is enabled 46939beb93cSSam Leffler * 47039beb93cSSam Leffler * This value is used to configure policy for management frame 47139beb93cSSam Leffler * protection (IEEE 802.11w). 0 = disabled, 1 = optional, 2 = required. 472f05cddf9SRui Paulo * This is disabled by default unless the default value has been changed 473f05cddf9SRui Paulo * with the global pmf=1/2 parameter. 474f05cddf9SRui Paulo * 475f05cddf9SRui Paulo * Internally, special value 3 is used to indicate that the parameter 476f05cddf9SRui Paulo * was not specified in the configuration (i.e., default behavior is 477f05cddf9SRui Paulo * followed). 47839beb93cSSam Leffler */ 479e28a4053SRui Paulo enum mfp_options ieee80211w; 48039beb93cSSam Leffler 4814bc52338SCy Schubert #ifdef CONFIG_OCV 4824bc52338SCy Schubert /** 4834bc52338SCy Schubert * ocv - Enable/disable operating channel validation 4844bc52338SCy Schubert * 4854bc52338SCy Schubert * If this parameter is set to 1, stations will exchange OCI element 4864bc52338SCy Schubert * to cryptographically verify the operating channel. Setting this 4874bc52338SCy Schubert * parameter to 0 disables this option. Default value: 0. 4884bc52338SCy Schubert */ 4894bc52338SCy Schubert int ocv; 4904bc52338SCy Schubert #endif /* CONFIG_OCV */ 4914bc52338SCy Schubert 49239beb93cSSam Leffler /** 49339beb93cSSam Leffler * frequency - Channel frequency in megahertz (MHz) for IBSS 49439beb93cSSam Leffler * 49539beb93cSSam Leffler * This value is used to configure the initial channel for IBSS (adhoc) 49639beb93cSSam Leffler * networks, e.g., 2412 = IEEE 802.11b/g channel 1. It is ignored in 49739beb93cSSam Leffler * the infrastructure mode. In addition, this value is only used by the 49839beb93cSSam Leffler * station that creates the IBSS. If an IBSS network with the 49939beb93cSSam Leffler * configured SSID is already present, the frequency of the network 50039beb93cSSam Leffler * will be used instead of this configured value. 50139beb93cSSam Leffler */ 50239beb93cSSam Leffler int frequency; 50339beb93cSSam Leffler 5045b9c547cSRui Paulo /** 505c1d255d3SCy Schubert * enable_edmg - Enable EDMG feature in STA/AP mode 506c1d255d3SCy Schubert * 507c1d255d3SCy Schubert * This flag is used for enabling the EDMG capability in STA/AP mode. 508c1d255d3SCy Schubert */ 509c1d255d3SCy Schubert int enable_edmg; 510c1d255d3SCy Schubert 511c1d255d3SCy Schubert /** 512c1d255d3SCy Schubert * edmg_channel - EDMG channel number 513c1d255d3SCy Schubert * 514c1d255d3SCy Schubert * This value is used to configure the EDMG channel bonding feature. 515c1d255d3SCy Schubert * In AP mode it defines the EDMG channel to start the AP on. 516c1d255d3SCy Schubert * in STA mode it defines the EDMG channel to use for connection 517c1d255d3SCy Schubert * (if supported by AP). 518c1d255d3SCy Schubert */ 519c1d255d3SCy Schubert u8 edmg_channel; 520c1d255d3SCy Schubert 521c1d255d3SCy Schubert /** 5225b9c547cSRui Paulo * fixed_freq - Use fixed frequency for IBSS 5235b9c547cSRui Paulo */ 5245b9c547cSRui Paulo int fixed_freq; 5255b9c547cSRui Paulo 526780fb4a2SCy Schubert #ifdef CONFIG_ACS 527780fb4a2SCy Schubert /** 528780fb4a2SCy Schubert * ACS - Automatic Channel Selection for AP mode 529780fb4a2SCy Schubert * 530780fb4a2SCy Schubert * If present, it will be handled together with frequency. 531780fb4a2SCy Schubert * frequency will be used to determine hardware mode only, when it is 532780fb4a2SCy Schubert * used for both hardware mode and channel when used alone. This will 533780fb4a2SCy Schubert * force the channel to be set to 0, thus enabling ACS. 534780fb4a2SCy Schubert */ 535780fb4a2SCy Schubert int acs; 536780fb4a2SCy Schubert #endif /* CONFIG_ACS */ 537780fb4a2SCy Schubert 5385b9c547cSRui Paulo /** 5395b9c547cSRui Paulo * mesh_basic_rates - BSS Basic rate set for mesh network 5405b9c547cSRui Paulo * 5415b9c547cSRui Paulo */ 5425b9c547cSRui Paulo int *mesh_basic_rates; 5435b9c547cSRui Paulo 5445b9c547cSRui Paulo /** 5455b9c547cSRui Paulo * Mesh network plink parameters 5465b9c547cSRui Paulo */ 5475b9c547cSRui Paulo int dot11MeshMaxRetries; 5485b9c547cSRui Paulo int dot11MeshRetryTimeout; /* msec */ 5495b9c547cSRui Paulo int dot11MeshConfirmTimeout; /* msec */ 5505b9c547cSRui Paulo int dot11MeshHoldingTimeout; /* msec */ 5515b9c547cSRui Paulo 55285732ac8SCy Schubert int ht; 553f05cddf9SRui Paulo int ht40; 554f05cddf9SRui Paulo 5555b9c547cSRui Paulo int vht; 5565b9c547cSRui Paulo 5574bc52338SCy Schubert int he; 5584bc52338SCy Schubert 55985732ac8SCy Schubert int max_oper_chwidth; 560780fb4a2SCy Schubert 56185732ac8SCy Schubert unsigned int vht_center_freq1; 562780fb4a2SCy Schubert unsigned int vht_center_freq2; 563780fb4a2SCy Schubert 56439beb93cSSam Leffler /** 56539beb93cSSam Leffler * wpa_ptk_rekey - Maximum lifetime for PTK in seconds 56639beb93cSSam Leffler * 56739beb93cSSam Leffler * This value can be used to enforce rekeying of PTK to mitigate some 56839beb93cSSam Leffler * attacks against TKIP deficiencies. 56939beb93cSSam Leffler */ 57039beb93cSSam Leffler int wpa_ptk_rekey; 571e28a4053SRui Paulo 572c1d255d3SCy Schubert /** wpa_deny_ptk0_rekey - Control PTK0 rekeying 573c1d255d3SCy Schubert * 574c1d255d3SCy Schubert * Rekeying a pairwise key using only keyid 0 (PTK0 rekey) has many 575c1d255d3SCy Schubert * broken implementations and should be avoided when using or 576c1d255d3SCy Schubert * interacting with one. 577c1d255d3SCy Schubert * 578c1d255d3SCy Schubert * 0 = always rekey when configured/instructed 579c1d255d3SCy Schubert * 1 = only rekey when the local driver is explicitly indicating it can 580c1d255d3SCy Schubert * perform this operation without issues 581c1d255d3SCy Schubert * 2 = never allow PTK0 rekeys 582c1d255d3SCy Schubert */ 583c1d255d3SCy Schubert enum ptk0_rekey_handling wpa_deny_ptk0_rekey; 584c1d255d3SCy Schubert 585e28a4053SRui Paulo /** 586780fb4a2SCy Schubert * group_rekey - Group rekeying time in seconds 587780fb4a2SCy Schubert * 588780fb4a2SCy Schubert * This value, if non-zero, is used as the dot11RSNAConfigGroupRekeyTime 589780fb4a2SCy Schubert * parameter when operating in Authenticator role in IBSS. 590780fb4a2SCy Schubert */ 591780fb4a2SCy Schubert int group_rekey; 592780fb4a2SCy Schubert 593780fb4a2SCy Schubert /** 594e28a4053SRui Paulo * scan_freq - Array of frequencies to scan or %NULL for all 595e28a4053SRui Paulo * 596e28a4053SRui Paulo * This is an optional zero-terminated array of frequencies in 597e28a4053SRui Paulo * megahertz (MHz) to include in scan requests when searching for this 598e28a4053SRui Paulo * network. This can be used to speed up scanning when the network is 599e28a4053SRui Paulo * known to not use all possible channels. 600e28a4053SRui Paulo */ 601e28a4053SRui Paulo int *scan_freq; 602e28a4053SRui Paulo 603e28a4053SRui Paulo /** 604e28a4053SRui Paulo * bgscan - Background scan and roaming parameters or %NULL if none 605e28a4053SRui Paulo * 606e28a4053SRui Paulo * This is an optional set of parameters for background scanning and 607e28a4053SRui Paulo * roaming within a network (ESS) in following format: 608e28a4053SRui Paulo * <bgscan module name>:<module parameters> 609e28a4053SRui Paulo */ 610e28a4053SRui Paulo char *bgscan; 611e28a4053SRui Paulo 612e28a4053SRui Paulo /** 613f05cddf9SRui Paulo * ignore_broadcast_ssid - Hide SSID in AP mode 614f05cddf9SRui Paulo * 615f05cddf9SRui Paulo * Send empty SSID in beacons and ignore probe request frames that do 616f05cddf9SRui Paulo * not specify full SSID, i.e., require stations to know SSID. 617f05cddf9SRui Paulo * default: disabled (0) 618f05cddf9SRui Paulo * 1 = send empty (length=0) SSID in beacon and ignore probe request 619f05cddf9SRui Paulo * for broadcast SSID 620f05cddf9SRui Paulo * 2 = clear SSID (ASCII 0), but keep the original length (this may be 621f05cddf9SRui Paulo * required with some clients that do not support empty SSID) and 622f05cddf9SRui Paulo * ignore probe requests for broadcast SSID 623f05cddf9SRui Paulo */ 624f05cddf9SRui Paulo int ignore_broadcast_ssid; 625f05cddf9SRui Paulo 626f05cddf9SRui Paulo /** 627e28a4053SRui Paulo * freq_list - Array of allowed frequencies or %NULL for all 628e28a4053SRui Paulo * 629e28a4053SRui Paulo * This is an optional zero-terminated array of frequencies in 630e28a4053SRui Paulo * megahertz (MHz) to allow for selecting the BSS. If set, scan results 631e28a4053SRui Paulo * that do not match any of the specified frequencies are not 632e28a4053SRui Paulo * considered when selecting a BSS. 633e28a4053SRui Paulo */ 634e28a4053SRui Paulo int *freq_list; 635f05cddf9SRui Paulo 636f05cddf9SRui Paulo /** 637f05cddf9SRui Paulo * p2p_client_list - List of P2P Clients in a persistent group (GO) 638f05cddf9SRui Paulo * 639f05cddf9SRui Paulo * This is a list of P2P Clients (P2P Device Address) that have joined 640f05cddf9SRui Paulo * the persistent group. This is maintained on the GO for persistent 641f05cddf9SRui Paulo * group entries (disabled == 2). 642f05cddf9SRui Paulo */ 643f05cddf9SRui Paulo u8 *p2p_client_list; 644f05cddf9SRui Paulo 645f05cddf9SRui Paulo /** 646f05cddf9SRui Paulo * num_p2p_clients - Number of entries in p2p_client_list 647f05cddf9SRui Paulo */ 648f05cddf9SRui Paulo size_t num_p2p_clients; 649f05cddf9SRui Paulo 650f05cddf9SRui Paulo #ifndef P2P_MAX_STORED_CLIENTS 651f05cddf9SRui Paulo #define P2P_MAX_STORED_CLIENTS 100 652f05cddf9SRui Paulo #endif /* P2P_MAX_STORED_CLIENTS */ 653f05cddf9SRui Paulo 654f05cddf9SRui Paulo /** 6555b9c547cSRui Paulo * psk_list - Per-client PSKs (struct psk_list_entry) 6565b9c547cSRui Paulo */ 6575b9c547cSRui Paulo struct dl_list psk_list; 6585b9c547cSRui Paulo 6595b9c547cSRui Paulo /** 660f05cddf9SRui Paulo * p2p_group - Network generated as a P2P group (used internally) 661f05cddf9SRui Paulo */ 662f05cddf9SRui Paulo int p2p_group; 663f05cddf9SRui Paulo 664f05cddf9SRui Paulo /** 665f05cddf9SRui Paulo * p2p_persistent_group - Whether this is a persistent group 666f05cddf9SRui Paulo */ 667f05cddf9SRui Paulo int p2p_persistent_group; 668f05cddf9SRui Paulo 669f05cddf9SRui Paulo /** 670f05cddf9SRui Paulo * temporary - Whether this network is temporary and not to be saved 671f05cddf9SRui Paulo */ 672f05cddf9SRui Paulo int temporary; 673f05cddf9SRui Paulo 674f05cddf9SRui Paulo /** 675f05cddf9SRui Paulo * export_keys - Whether keys may be exported 676f05cddf9SRui Paulo * 677f05cddf9SRui Paulo * This attribute will be set when keys are determined through 678f05cddf9SRui Paulo * WPS or similar so that they may be exported. 679f05cddf9SRui Paulo */ 680f05cddf9SRui Paulo int export_keys; 681f05cddf9SRui Paulo 682f05cddf9SRui Paulo #ifdef CONFIG_HT_OVERRIDES 683f05cddf9SRui Paulo /** 684f05cddf9SRui Paulo * disable_ht - Disable HT (IEEE 802.11n) for this network 685f05cddf9SRui Paulo * 686f05cddf9SRui Paulo * By default, use it if it is available, but this can be configured 687f05cddf9SRui Paulo * to 1 to have it disabled. 688f05cddf9SRui Paulo */ 689f05cddf9SRui Paulo int disable_ht; 690f05cddf9SRui Paulo 691f05cddf9SRui Paulo /** 692f05cddf9SRui Paulo * disable_ht40 - Disable HT40 for this network 693f05cddf9SRui Paulo * 694f05cddf9SRui Paulo * By default, use it if it is available, but this can be configured 695f05cddf9SRui Paulo * to 1 to have it disabled. 696f05cddf9SRui Paulo */ 697f05cddf9SRui Paulo int disable_ht40; 698f05cddf9SRui Paulo 699f05cddf9SRui Paulo /** 700f05cddf9SRui Paulo * disable_sgi - Disable SGI (Short Guard Interval) for this network 701f05cddf9SRui Paulo * 702f05cddf9SRui Paulo * By default, use it if it is available, but this can be configured 703f05cddf9SRui Paulo * to 1 to have it disabled. 704f05cddf9SRui Paulo */ 705f05cddf9SRui Paulo int disable_sgi; 706f05cddf9SRui Paulo 707f05cddf9SRui Paulo /** 7085b9c547cSRui Paulo * disable_ldpc - Disable LDPC for this network 7095b9c547cSRui Paulo * 7105b9c547cSRui Paulo * By default, use it if it is available, but this can be configured 7115b9c547cSRui Paulo * to 1 to have it disabled. 7125b9c547cSRui Paulo */ 7135b9c547cSRui Paulo int disable_ldpc; 7145b9c547cSRui Paulo 7155b9c547cSRui Paulo /** 7165b9c547cSRui Paulo * ht40_intolerant - Indicate 40 MHz intolerant for this network 7175b9c547cSRui Paulo */ 7185b9c547cSRui Paulo int ht40_intolerant; 7195b9c547cSRui Paulo 7205b9c547cSRui Paulo /** 721f05cddf9SRui Paulo * disable_max_amsdu - Disable MAX A-MSDU 722f05cddf9SRui Paulo * 723f05cddf9SRui Paulo * A-MDSU will be 3839 bytes when disabled, or 7935 724f05cddf9SRui Paulo * when enabled (assuming it is otherwise supported) 725f05cddf9SRui Paulo * -1 (default) means do not apply any settings to the kernel. 726f05cddf9SRui Paulo */ 727f05cddf9SRui Paulo int disable_max_amsdu; 728f05cddf9SRui Paulo 729f05cddf9SRui Paulo /** 730f05cddf9SRui Paulo * ampdu_factor - Maximum A-MPDU Length Exponent 731f05cddf9SRui Paulo * 732f05cddf9SRui Paulo * Value: 0-3, see 7.3.2.56.3 in IEEE Std 802.11n-2009. 733f05cddf9SRui Paulo */ 734f05cddf9SRui Paulo int ampdu_factor; 735f05cddf9SRui Paulo 736f05cddf9SRui Paulo /** 737f05cddf9SRui Paulo * ampdu_density - Minimum A-MPDU Start Spacing 738f05cddf9SRui Paulo * 739f05cddf9SRui Paulo * Value: 0-7, see 7.3.2.56.3 in IEEE Std 802.11n-2009. 740f05cddf9SRui Paulo */ 741f05cddf9SRui Paulo int ampdu_density; 742f05cddf9SRui Paulo 743f05cddf9SRui Paulo /** 744f05cddf9SRui Paulo * ht_mcs - Allowed HT-MCS rates, in ASCII hex: ffff0000... 745f05cddf9SRui Paulo * 746f05cddf9SRui Paulo * By default (empty string): Use whatever the OS has configured. 747f05cddf9SRui Paulo */ 748f05cddf9SRui Paulo char *ht_mcs; 7494bc52338SCy Schubert 7504bc52338SCy Schubert /** 7514bc52338SCy Schubert * tx_stbc - Indicate STBC support for TX streams 7524bc52338SCy Schubert * 7534bc52338SCy Schubert * Value: -1..1, by default (-1): use whatever the OS or card has 7544bc52338SCy Schubert * configured. See IEEE Std 802.11-2016, 9.4.2.56.2. 7554bc52338SCy Schubert */ 7564bc52338SCy Schubert int tx_stbc; 7574bc52338SCy Schubert 7584bc52338SCy Schubert /** 7594bc52338SCy Schubert * rx_stbc - Indicate STBC support for RX streams 7604bc52338SCy Schubert * 7614bc52338SCy Schubert * Value: -1..3, by default (-1): use whatever the OS or card has 7624bc52338SCy Schubert * configured. See IEEE Std 802.11-2016, 9.4.2.56.2. 7634bc52338SCy Schubert */ 7644bc52338SCy Schubert int rx_stbc; 765f05cddf9SRui Paulo #endif /* CONFIG_HT_OVERRIDES */ 766f05cddf9SRui Paulo 7675b9c547cSRui Paulo #ifdef CONFIG_VHT_OVERRIDES 7685b9c547cSRui Paulo /** 7695b9c547cSRui Paulo * disable_vht - Disable VHT (IEEE 802.11ac) for this network 7705b9c547cSRui Paulo * 7715b9c547cSRui Paulo * By default, use it if it is available, but this can be configured 7725b9c547cSRui Paulo * to 1 to have it disabled. 7735b9c547cSRui Paulo */ 7745b9c547cSRui Paulo int disable_vht; 7755b9c547cSRui Paulo 7765b9c547cSRui Paulo /** 7775b9c547cSRui Paulo * vht_capa - VHT capabilities to use 7785b9c547cSRui Paulo */ 7795b9c547cSRui Paulo unsigned int vht_capa; 7805b9c547cSRui Paulo 7815b9c547cSRui Paulo /** 7825b9c547cSRui Paulo * vht_capa_mask - mask for VHT capabilities 7835b9c547cSRui Paulo */ 7845b9c547cSRui Paulo unsigned int vht_capa_mask; 7855b9c547cSRui Paulo 7865b9c547cSRui Paulo int vht_rx_mcs_nss_1, vht_rx_mcs_nss_2, 7875b9c547cSRui Paulo vht_rx_mcs_nss_3, vht_rx_mcs_nss_4, 7885b9c547cSRui Paulo vht_rx_mcs_nss_5, vht_rx_mcs_nss_6, 7895b9c547cSRui Paulo vht_rx_mcs_nss_7, vht_rx_mcs_nss_8; 7905b9c547cSRui Paulo int vht_tx_mcs_nss_1, vht_tx_mcs_nss_2, 7915b9c547cSRui Paulo vht_tx_mcs_nss_3, vht_tx_mcs_nss_4, 7925b9c547cSRui Paulo vht_tx_mcs_nss_5, vht_tx_mcs_nss_6, 7935b9c547cSRui Paulo vht_tx_mcs_nss_7, vht_tx_mcs_nss_8; 7945b9c547cSRui Paulo #endif /* CONFIG_VHT_OVERRIDES */ 7955b9c547cSRui Paulo 796c1d255d3SCy Schubert #ifdef CONFIG_HE_OVERRIDES 797c1d255d3SCy Schubert /** 798c1d255d3SCy Schubert * disable_he - Disable HE (IEEE 802.11ax) for this network 799c1d255d3SCy Schubert * 800c1d255d3SCy Schubert * By default, use it if it is available, but this can be configured 801c1d255d3SCy Schubert * to 1 to have it disabled. 802c1d255d3SCy Schubert */ 803c1d255d3SCy Schubert int disable_he; 804c1d255d3SCy Schubert #endif /* CONFIG_HE_OVERRIDES */ 805c1d255d3SCy Schubert 806f05cddf9SRui Paulo /** 807f05cddf9SRui Paulo * ap_max_inactivity - Timeout in seconds to detect STA's inactivity 808f05cddf9SRui Paulo * 809f05cddf9SRui Paulo * This timeout value is used in AP mode to clean up inactive stations. 810f05cddf9SRui Paulo * By default: 300 seconds. 811f05cddf9SRui Paulo */ 812f05cddf9SRui Paulo int ap_max_inactivity; 813f05cddf9SRui Paulo 814f05cddf9SRui Paulo /** 815f05cddf9SRui Paulo * dtim_period - DTIM period in Beacon intervals 816f05cddf9SRui Paulo * By default: 2 817f05cddf9SRui Paulo */ 818f05cddf9SRui Paulo int dtim_period; 819f05cddf9SRui Paulo 820f05cddf9SRui Paulo /** 8215b9c547cSRui Paulo * beacon_int - Beacon interval (default: 100 TU) 8225b9c547cSRui Paulo */ 8235b9c547cSRui Paulo int beacon_int; 8245b9c547cSRui Paulo 8255b9c547cSRui Paulo /** 826f05cddf9SRui Paulo * auth_failures - Number of consecutive authentication failures 827f05cddf9SRui Paulo */ 828f05cddf9SRui Paulo unsigned int auth_failures; 829f05cddf9SRui Paulo 830f05cddf9SRui Paulo /** 831f05cddf9SRui Paulo * disabled_until - Network block disabled until this time if non-zero 832f05cddf9SRui Paulo */ 8335b9c547cSRui Paulo struct os_reltime disabled_until; 834f05cddf9SRui Paulo 835f05cddf9SRui Paulo /** 836f05cddf9SRui Paulo * parent_cred - Pointer to parent wpa_cred entry 837f05cddf9SRui Paulo * 838f05cddf9SRui Paulo * This pointer can be used to delete temporary networks when a wpa_cred 839f05cddf9SRui Paulo * that was used to create them is removed. This pointer should not be 840f05cddf9SRui Paulo * dereferences since it may not be updated in all cases. 841f05cddf9SRui Paulo */ 842f05cddf9SRui Paulo void *parent_cred; 8435b9c547cSRui Paulo 8445b9c547cSRui Paulo #ifdef CONFIG_MACSEC 8455b9c547cSRui Paulo /** 8465b9c547cSRui Paulo * macsec_policy - Determines the policy for MACsec secure session 8475b9c547cSRui Paulo * 8485b9c547cSRui Paulo * 0: MACsec not in use (default) 8495b9c547cSRui Paulo * 1: MACsec enabled - Should secure, accept key server's advice to 8505b9c547cSRui Paulo * determine whether to use a secure session or not. 8515b9c547cSRui Paulo */ 8525b9c547cSRui Paulo int macsec_policy; 85385732ac8SCy Schubert 85485732ac8SCy Schubert /** 85585732ac8SCy Schubert * macsec_integ_only - Determines how MACsec are transmitted 85685732ac8SCy Schubert * 85785732ac8SCy Schubert * This setting applies only when MACsec is in use, i.e., 85885732ac8SCy Schubert * - macsec_policy is enabled 85985732ac8SCy Schubert * - the key server has decided to enable MACsec 86085732ac8SCy Schubert * 86185732ac8SCy Schubert * 0: Encrypt traffic (default) 86285732ac8SCy Schubert * 1: Integrity only 86385732ac8SCy Schubert */ 86485732ac8SCy Schubert int macsec_integ_only; 86585732ac8SCy Schubert 86685732ac8SCy Schubert /** 8674bc52338SCy Schubert * macsec_replay_protect - Enable MACsec replay protection 8684bc52338SCy Schubert * 8694bc52338SCy Schubert * This setting applies only when MACsec is in use, i.e., 8704bc52338SCy Schubert * - macsec_policy is enabled 8714bc52338SCy Schubert * - the key server has decided to enable MACsec 8724bc52338SCy Schubert * 8734bc52338SCy Schubert * 0: Replay protection disabled (default) 8744bc52338SCy Schubert * 1: Replay protection enabled 8754bc52338SCy Schubert */ 8764bc52338SCy Schubert int macsec_replay_protect; 8774bc52338SCy Schubert 8784bc52338SCy Schubert /** 8794bc52338SCy Schubert * macsec_replay_window - MACsec replay protection window 8804bc52338SCy Schubert * 8814bc52338SCy Schubert * A window in which replay is tolerated, to allow receipt of frames 8824bc52338SCy Schubert * that have been misordered by the network. 8834bc52338SCy Schubert * 8844bc52338SCy Schubert * This setting applies only when MACsec replay protection active, i.e., 8854bc52338SCy Schubert * - macsec_replay_protect is enabled 8864bc52338SCy Schubert * - the key server has decided to enable MACsec 8874bc52338SCy Schubert * 8884bc52338SCy Schubert * 0: No replay window, strict check (default) 8894bc52338SCy Schubert * 1..2^32-1: number of packets that could be misordered 8904bc52338SCy Schubert */ 8914bc52338SCy Schubert u32 macsec_replay_window; 8924bc52338SCy Schubert 8934bc52338SCy Schubert /** 89485732ac8SCy Schubert * macsec_port - MACsec port (in SCI) 89585732ac8SCy Schubert * 89685732ac8SCy Schubert * Port component of the SCI. 89785732ac8SCy Schubert * 89885732ac8SCy Schubert * Range: 1-65534 (default: 1) 89985732ac8SCy Schubert */ 90085732ac8SCy Schubert int macsec_port; 90185732ac8SCy Schubert 90285732ac8SCy Schubert /** 90385732ac8SCy Schubert * mka_priority - Priority of MKA Actor 90485732ac8SCy Schubert * 90585732ac8SCy Schubert * Range: 0-255 (default: 255) 90685732ac8SCy Schubert */ 90785732ac8SCy Schubert int mka_priority; 90885732ac8SCy Schubert 90985732ac8SCy Schubert /** 91085732ac8SCy Schubert * mka_ckn - MKA pre-shared CKN 91185732ac8SCy Schubert */ 9124bc52338SCy Schubert #define MACSEC_CKN_MAX_LEN 32 9134bc52338SCy Schubert size_t mka_ckn_len; 9144bc52338SCy Schubert u8 mka_ckn[MACSEC_CKN_MAX_LEN]; 91585732ac8SCy Schubert 91685732ac8SCy Schubert /** 91785732ac8SCy Schubert * mka_cak - MKA pre-shared CAK 91885732ac8SCy Schubert */ 9194bc52338SCy Schubert #define MACSEC_CAK_MAX_LEN 32 9204bc52338SCy Schubert size_t mka_cak_len; 9214bc52338SCy Schubert u8 mka_cak[MACSEC_CAK_MAX_LEN]; 92285732ac8SCy Schubert 92385732ac8SCy Schubert #define MKA_PSK_SET_CKN BIT(0) 92485732ac8SCy Schubert #define MKA_PSK_SET_CAK BIT(1) 92585732ac8SCy Schubert #define MKA_PSK_SET (MKA_PSK_SET_CKN | MKA_PSK_SET_CAK) 92685732ac8SCy Schubert /** 92785732ac8SCy Schubert * mka_psk_set - Whether mka_ckn and mka_cak are set 92885732ac8SCy Schubert */ 92985732ac8SCy Schubert u8 mka_psk_set; 9305b9c547cSRui Paulo #endif /* CONFIG_MACSEC */ 9315b9c547cSRui Paulo 9325b9c547cSRui Paulo #ifdef CONFIG_HS20 9335b9c547cSRui Paulo int update_identifier; 93485732ac8SCy Schubert 93585732ac8SCy Schubert /** 93685732ac8SCy Schubert * roaming_consortium_selection - Roaming Consortium Selection 93785732ac8SCy Schubert * 93885732ac8SCy Schubert * The matching Roaming Consortium OI that was used to generate this 93985732ac8SCy Schubert * network profile. 94085732ac8SCy Schubert */ 94185732ac8SCy Schubert u8 *roaming_consortium_selection; 94285732ac8SCy Schubert 94385732ac8SCy Schubert /** 94485732ac8SCy Schubert * roaming_consortium_selection_len - roaming_consortium_selection len 94585732ac8SCy Schubert */ 94685732ac8SCy Schubert size_t roaming_consortium_selection_len; 9475b9c547cSRui Paulo #endif /* CONFIG_HS20 */ 9485b9c547cSRui Paulo 9495b9c547cSRui Paulo unsigned int wps_run; 9505b9c547cSRui Paulo 9515b9c547cSRui Paulo /** 9525b9c547cSRui Paulo * mac_addr - MAC address policy 9535b9c547cSRui Paulo * 9545b9c547cSRui Paulo * 0 = use permanent MAC address 9555b9c547cSRui Paulo * 1 = use random MAC address for each ESS connection 9565b9c547cSRui Paulo * 2 = like 1, but maintain OUI (with local admin bit set) 9575b9c547cSRui Paulo * 9585b9c547cSRui Paulo * Internally, special value -1 is used to indicate that the parameter 9595b9c547cSRui Paulo * was not specified in the configuration (i.e., default behavior is 9605b9c547cSRui Paulo * followed). 9615b9c547cSRui Paulo */ 9625b9c547cSRui Paulo int mac_addr; 9635b9c547cSRui Paulo 9645b9c547cSRui Paulo /** 9655b9c547cSRui Paulo * no_auto_peer - Do not automatically peer with compatible mesh peers 9665b9c547cSRui Paulo * 9675b9c547cSRui Paulo * When unset, the reception of a beacon from a another mesh peer in 9685b9c547cSRui Paulo * this MBSS will trigger a peering attempt. 9695b9c547cSRui Paulo */ 9705b9c547cSRui Paulo int no_auto_peer; 971780fb4a2SCy Schubert 972780fb4a2SCy Schubert /** 97385732ac8SCy Schubert * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm) 97485732ac8SCy Schubert * 97585732ac8SCy Schubert * -255..-1 = threshold value in dBm 97685732ac8SCy Schubert * 0 = not using RSSI threshold 97785732ac8SCy Schubert * 1 = do not change driver default 97885732ac8SCy Schubert */ 97985732ac8SCy Schubert int mesh_rssi_threshold; 98085732ac8SCy Schubert 98185732ac8SCy Schubert /** 982780fb4a2SCy Schubert * wps_disabled - WPS disabled in AP mode 983780fb4a2SCy Schubert * 984780fb4a2SCy Schubert * 0 = WPS enabled and configured (default) 985780fb4a2SCy Schubert * 1 = WPS disabled 986780fb4a2SCy Schubert */ 987780fb4a2SCy Schubert int wps_disabled; 98885732ac8SCy Schubert 98985732ac8SCy Schubert /** 99085732ac8SCy Schubert * fils_dh_group - FILS DH Group 99185732ac8SCy Schubert * 99285732ac8SCy Schubert * 0 = PFS disabled with FILS shared key authentication 99385732ac8SCy Schubert * 1-65535 DH Group to use for FILS PFS 99485732ac8SCy Schubert */ 99585732ac8SCy Schubert int fils_dh_group; 99685732ac8SCy Schubert 99785732ac8SCy Schubert /** 99885732ac8SCy Schubert * dpp_connector - DPP Connector (signedConnector as string) 99985732ac8SCy Schubert */ 100085732ac8SCy Schubert char *dpp_connector; 100185732ac8SCy Schubert 100285732ac8SCy Schubert /** 100385732ac8SCy Schubert * dpp_netaccesskey - DPP netAccessKey (own private key) 100485732ac8SCy Schubert */ 100585732ac8SCy Schubert u8 *dpp_netaccesskey; 100685732ac8SCy Schubert 100785732ac8SCy Schubert /** 100885732ac8SCy Schubert * dpp_netaccesskey_len - DPP netAccessKey length in octets 100985732ac8SCy Schubert */ 101085732ac8SCy Schubert size_t dpp_netaccesskey_len; 101185732ac8SCy Schubert 101285732ac8SCy Schubert /** 101385732ac8SCy Schubert * net_access_key_expiry - DPP netAccessKey expiry in UNIX time stamp 101485732ac8SCy Schubert * 101585732ac8SCy Schubert * 0 indicates no expiration. 101685732ac8SCy Schubert */ 101785732ac8SCy Schubert unsigned int dpp_netaccesskey_expiry; 101885732ac8SCy Schubert 101985732ac8SCy Schubert /** 102085732ac8SCy Schubert * dpp_csign - C-sign-key (Configurator public key) 102185732ac8SCy Schubert */ 102285732ac8SCy Schubert u8 *dpp_csign; 102385732ac8SCy Schubert 102485732ac8SCy Schubert /** 102585732ac8SCy Schubert * dpp_csign_len - C-sign-key length in octets 102685732ac8SCy Schubert */ 102785732ac8SCy Schubert size_t dpp_csign_len; 102885732ac8SCy Schubert 102985732ac8SCy Schubert /** 1030c1d255d3SCy Schubert * dpp_pp_key - ppKey (Configurator privacy protection public key) 1031c1d255d3SCy Schubert */ 1032c1d255d3SCy Schubert u8 *dpp_pp_key; 1033c1d255d3SCy Schubert 1034c1d255d3SCy Schubert /** 1035c1d255d3SCy Schubert * dpp_pp_key_len - ppKey length in octets 1036c1d255d3SCy Schubert */ 1037c1d255d3SCy Schubert size_t dpp_pp_key_len; 1038c1d255d3SCy Schubert 1039c1d255d3SCy Schubert /** 1040c1d255d3SCy Schubert * dpp_pfs - DPP PFS 1041c1d255d3SCy Schubert * 0: allow PFS to be used or not used 1042c1d255d3SCy Schubert * 1: require PFS to be used (note: not compatible with DPP R1) 1043c1d255d3SCy Schubert * 2: do not allow PFS to be used 1044c1d255d3SCy Schubert */ 1045c1d255d3SCy Schubert int dpp_pfs; 1046c1d255d3SCy Schubert 1047c1d255d3SCy Schubert /** 1048c1d255d3SCy Schubert * dpp_pfs_fallback - DPP PFS fallback selection 1049c1d255d3SCy Schubert * 1050c1d255d3SCy Schubert * This is an internally used variable (i.e., not used in external 1051c1d255d3SCy Schubert * configuration) to track state of the DPP PFS fallback mechanism. 1052c1d255d3SCy Schubert */ 1053c1d255d3SCy Schubert int dpp_pfs_fallback; 1054c1d255d3SCy Schubert 1055c1d255d3SCy Schubert /** 105685732ac8SCy Schubert * owe_group - OWE DH Group 105785732ac8SCy Schubert * 105885732ac8SCy Schubert * 0 = use default (19) first and then try all supported groups one by 105985732ac8SCy Schubert * one if AP rejects the selected group 106085732ac8SCy Schubert * 1-65535 DH Group to use for OWE 106185732ac8SCy Schubert * 106285732ac8SCy Schubert * Groups 19 (NIST P-256), 20 (NIST P-384), and 21 (NIST P-521) are 106385732ac8SCy Schubert * currently supported. 106485732ac8SCy Schubert */ 106585732ac8SCy Schubert int owe_group; 106685732ac8SCy Schubert 106785732ac8SCy Schubert /** 106885732ac8SCy Schubert * owe_only - OWE-only mode (disable transition mode) 106985732ac8SCy Schubert * 107085732ac8SCy Schubert * 0 = enable transition mode (allow connection to either OWE or open 107185732ac8SCy Schubert * BSS) 107285732ac8SCy Schubert * 1 = disable transition mode (allow connection only with OWE) 107385732ac8SCy Schubert */ 107485732ac8SCy Schubert int owe_only; 107585732ac8SCy Schubert 107685732ac8SCy Schubert /** 1077c1d255d3SCy Schubert * owe_ptk_workaround - OWE PTK derivation workaround 1078c1d255d3SCy Schubert * 1079c1d255d3SCy Schubert * Initial OWE implementation used SHA256 when deriving the PTK for all 1080c1d255d3SCy Schubert * OWE groups. This was supposed to change to SHA384 for group 20 and 1081c1d255d3SCy Schubert * SHA512 for group 21. This parameter can be used to enable older 1082c1d255d3SCy Schubert * behavior mainly for testing purposes. There is no impact to group 19 1083c1d255d3SCy Schubert * behavior, but if enabled, this will make group 20 and 21 cases use 1084c1d255d3SCy Schubert * SHA256-based PTK derivation which will not work with the updated 1085c1d255d3SCy Schubert * OWE implementation on the AP side. 1086c1d255d3SCy Schubert */ 1087c1d255d3SCy Schubert int owe_ptk_workaround; 1088c1d255d3SCy Schubert 1089c1d255d3SCy Schubert /** 109085732ac8SCy Schubert * owe_transition_bss_select_count - OWE transition BSS select count 109185732ac8SCy Schubert * 109285732ac8SCy Schubert * This is an internally used variable (i.e., not used in external 109385732ac8SCy Schubert * configuration) to track the number of selection attempts done for 109485732ac8SCy Schubert * OWE BSS in transition mode. This allows fallback to an open BSS if 109585732ac8SCy Schubert * the selection attempts for OWE BSS exceed the configured threshold. 109685732ac8SCy Schubert */ 109785732ac8SCy Schubert int owe_transition_bss_select_count; 10984bc52338SCy Schubert 10994bc52338SCy Schubert /** 11004bc52338SCy Schubert * multi_ap_backhaul_sta - Multi-AP backhaul STA 11014bc52338SCy Schubert * 0 = normal (non-Multi-AP) station 11024bc52338SCy Schubert * 1 = Multi-AP backhaul station 11034bc52338SCy Schubert */ 11044bc52338SCy Schubert int multi_ap_backhaul_sta; 1105206b73d0SCy Schubert 1106206b73d0SCy Schubert /** 1107206b73d0SCy Schubert * ft_eap_pmksa_caching - Whether FT-EAP PMKSA caching is allowed 1108206b73d0SCy Schubert * 0 = do not try to use PMKSA caching with FT-EAP 1109206b73d0SCy Schubert * 1 = try to use PMKSA caching with FT-EAP 1110206b73d0SCy Schubert * 1111206b73d0SCy Schubert * This controls whether to try to use PMKSA caching with FT-EAP for the 1112206b73d0SCy Schubert * FT initial mobility domain association. 1113206b73d0SCy Schubert */ 1114206b73d0SCy Schubert int ft_eap_pmksa_caching; 1115c1d255d3SCy Schubert 1116c1d255d3SCy Schubert /** 1117c1d255d3SCy Schubert * beacon_prot - Whether Beacon protection is enabled 1118c1d255d3SCy Schubert * 1119c1d255d3SCy Schubert * This depends on management frame protection (ieee80211w) being 1120c1d255d3SCy Schubert * enabled. 1121c1d255d3SCy Schubert */ 1122c1d255d3SCy Schubert int beacon_prot; 1123c1d255d3SCy Schubert 1124c1d255d3SCy Schubert /** 1125c1d255d3SCy Schubert * transition_disable - Transition Disable indication 1126c1d255d3SCy Schubert * The AP can notify authenticated stations to disable transition mode 1127c1d255d3SCy Schubert * in their network profiles when the network has completed transition 1128c1d255d3SCy Schubert * steps, i.e., once sufficiently large number of APs in the ESS have 1129c1d255d3SCy Schubert * been updated to support the more secure alternative. When this 1130c1d255d3SCy Schubert * indication is used, the stations are expected to automatically 1131c1d255d3SCy Schubert * disable transition mode and less secure security options. This 1132c1d255d3SCy Schubert * includes use of WEP, TKIP (including use of TKIP as the group 1133c1d255d3SCy Schubert * cipher), and connections without PMF. 1134c1d255d3SCy Schubert * Bitmap bits: 1135c1d255d3SCy Schubert * bit 0 (0x01): WPA3-Personal (i.e., disable WPA2-Personal = WPA-PSK 1136c1d255d3SCy Schubert * and only allow SAE to be used) 1137c1d255d3SCy Schubert * bit 1 (0x02): SAE-PK (disable SAE without use of SAE-PK) 1138c1d255d3SCy Schubert * bit 2 (0x04): WPA3-Enterprise (move to requiring PMF) 1139c1d255d3SCy Schubert * bit 3 (0x08): Enhanced Open (disable use of open network; require 1140c1d255d3SCy Schubert * OWE) 1141c1d255d3SCy Schubert */ 1142c1d255d3SCy Schubert u8 transition_disable; 1143c1d255d3SCy Schubert 1144c1d255d3SCy Schubert /** 1145c1d255d3SCy Schubert * sae_pk - SAE-PK mode 1146c1d255d3SCy Schubert * 0 = automatic SAE/SAE-PK selection based on password; enable 1147c1d255d3SCy Schubert * transition mode (allow SAE authentication without SAE-PK) 1148c1d255d3SCy Schubert * 1 = SAE-PK only (disable transition mode; allow SAE authentication 1149c1d255d3SCy Schubert * only with SAE-PK) 1150c1d255d3SCy Schubert * 2 = disable SAE-PK (allow SAE authentication only without SAE-PK) 1151c1d255d3SCy Schubert */ 1152c1d255d3SCy Schubert enum sae_pk_mode sae_pk; 1153c1d255d3SCy Schubert 1154c1d255d3SCy Schubert /** 1155c1d255d3SCy Schubert * was_recently_reconfigured - Whether this SSID config has been changed 1156c1d255d3SCy Schubert * recently 1157c1d255d3SCy Schubert * 1158c1d255d3SCy Schubert * This is an internally used variable, i.e., not used in external 1159c1d255d3SCy Schubert * configuration. 1160c1d255d3SCy Schubert */ 1161c1d255d3SCy Schubert bool was_recently_reconfigured; 1162*4b72b91aSCy Schubert 1163*4b72b91aSCy Schubert /** 1164*4b72b91aSCy Schubert * sae_pwe - SAE mechanism for PWE derivation 1165*4b72b91aSCy Schubert * 1166*4b72b91aSCy Schubert * Internally, special value 4 (DEFAULT_SAE_PWE) is used to indicate 1167*4b72b91aSCy Schubert * that the parameter is not set and the global sae_pwe value needs to 1168*4b72b91aSCy Schubert * be considered. 1169*4b72b91aSCy Schubert * 1170*4b72b91aSCy Schubert * 0 = hunting-and-pecking loop only 1171*4b72b91aSCy Schubert * 1 = hash-to-element only 1172*4b72b91aSCy Schubert * 2 = both hunting-and-pecking loop and hash-to-element enabled 1173*4b72b91aSCy Schubert */ 1174*4b72b91aSCy Schubert int sae_pwe; 117539beb93cSSam Leffler }; 117639beb93cSSam Leffler 117739beb93cSSam Leffler #endif /* CONFIG_SSID_H */ 1178