1 /* 2 * WPA Supplicant / Network configuration structures 3 * Copyright (c) 2003-2013, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef CONFIG_SSID_H 10 #define CONFIG_SSID_H 11 12 #include "common/defs.h" 13 #include "utils/list.h" 14 #include "eap_peer/eap_config.h" 15 16 17 #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) 18 #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \ 19 EAPOL_FLAG_REQUIRE_KEY_BROADCAST) 20 #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN) 21 #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X) 22 #ifdef CONFIG_NO_TKIP 23 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP) 24 #define DEFAULT_GROUP (WPA_CIPHER_CCMP) 25 #else /* CONFIG_NO_TKIP */ 26 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 27 #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 28 #endif /* CONFIG_NO_TKIP */ 29 #define DEFAULT_FRAGMENT_SIZE 1398 30 31 #define DEFAULT_BG_SCAN_PERIOD -1 32 #define DEFAULT_MESH_MAX_RETRIES 2 33 #define DEFAULT_MESH_RETRY_TIMEOUT 40 34 #define DEFAULT_MESH_CONFIRM_TIMEOUT 40 35 #define DEFAULT_MESH_HOLDING_TIMEOUT 40 36 #define DEFAULT_MESH_RSSI_THRESHOLD 1 /* no change */ 37 #define DEFAULT_DISABLE_HT 0 38 #define DEFAULT_DISABLE_HT40 0 39 #define DEFAULT_DISABLE_SGI 0 40 #define DEFAULT_DISABLE_LDPC 0 41 #define DEFAULT_TX_STBC -1 /* no change */ 42 #define DEFAULT_RX_STBC -1 /* no change */ 43 #define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */ 44 #define DEFAULT_AMPDU_FACTOR -1 /* no change */ 45 #define DEFAULT_AMPDU_DENSITY -1 /* no change */ 46 #define DEFAULT_USER_SELECTED_SIM 1 47 #define DEFAULT_MAX_OPER_CHWIDTH -1 48 49 struct psk_list_entry { 50 struct dl_list list; 51 u8 addr[ETH_ALEN]; 52 u8 psk[32]; 53 u8 p2p; 54 }; 55 56 enum wpas_mode { 57 WPAS_MODE_INFRA = 0, 58 WPAS_MODE_IBSS = 1, 59 WPAS_MODE_AP = 2, 60 WPAS_MODE_P2P_GO = 3, 61 WPAS_MODE_P2P_GROUP_FORMATION = 4, 62 WPAS_MODE_MESH = 5, 63 }; 64 65 enum sae_pk_mode { 66 SAE_PK_MODE_AUTOMATIC = 0, 67 SAE_PK_MODE_ONLY = 1, 68 SAE_PK_MODE_DISABLED = 2, 69 }; 70 71 /** 72 * struct wpa_ssid - Network configuration data 73 * 74 * This structure includes all the configuration variables for a network. This 75 * data is included in the per-interface configuration data as an element of 76 * the network list, struct wpa_config::ssid. Each network block in the 77 * configuration is mapped to a struct wpa_ssid instance. 78 */ 79 struct wpa_ssid { 80 /** 81 * next - Next network in global list 82 * 83 * This pointer can be used to iterate over all networks. The head of 84 * this list is stored in the ssid field of struct wpa_config. 85 */ 86 struct wpa_ssid *next; 87 88 /** 89 * pnext - Next network in per-priority list 90 * 91 * This pointer can be used to iterate over all networks in the same 92 * priority class. The heads of these list are stored in the pssid 93 * fields of struct wpa_config. 94 */ 95 struct wpa_ssid *pnext; 96 97 /** 98 * id - Unique id for the network 99 * 100 * This identifier is used as a unique identifier for each network 101 * block when using the control interface. Each network is allocated an 102 * id when it is being created, either when reading the configuration 103 * file or when a new network is added through the control interface. 104 */ 105 int id; 106 107 /** 108 * priority - Priority group 109 * 110 * By default, all networks will get same priority group (0). If some 111 * of the networks are more desirable, this field can be used to change 112 * the order in which wpa_supplicant goes through the networks when 113 * selecting a BSS. The priority groups will be iterated in decreasing 114 * priority (i.e., the larger the priority value, the sooner the 115 * network is matched against the scan results). Within each priority 116 * group, networks will be selected based on security policy, signal 117 * strength, etc. 118 * 119 * Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are 120 * not using this priority to select the order for scanning. Instead, 121 * they try the networks in the order that used in the configuration 122 * file. 123 */ 124 int priority; 125 126 /** 127 * ssid - Service set identifier (network name) 128 * 129 * This is the SSID for the network. For wireless interfaces, this is 130 * used to select which network will be used. If set to %NULL (or 131 * ssid_len=0), any SSID can be used. For wired interfaces, this must 132 * be set to %NULL. Note: SSID may contain any characters, even nul 133 * (ASCII 0) and as such, this should not be assumed to be a nul 134 * terminated string. ssid_len defines how many characters are valid 135 * and the ssid field is not guaranteed to be nul terminated. 136 */ 137 u8 *ssid; 138 139 /** 140 * ssid_len - Length of the SSID 141 */ 142 size_t ssid_len; 143 144 /** 145 * bssid - BSSID 146 * 147 * If set, this network block is used only when associating with the AP 148 * using the configured BSSID 149 * 150 * If this is a persistent P2P group (disabled == 2), this is the GO 151 * Device Address. 152 */ 153 u8 bssid[ETH_ALEN]; 154 155 /** 156 * bssid_ignore - List of inacceptable BSSIDs 157 */ 158 u8 *bssid_ignore; 159 size_t num_bssid_ignore; 160 161 /** 162 * bssid_accept - List of acceptable BSSIDs 163 */ 164 u8 *bssid_accept; 165 size_t num_bssid_accept; 166 167 /** 168 * bssid_set - Whether BSSID is configured for this network 169 */ 170 int bssid_set; 171 172 /** 173 * bssid_hint - BSSID hint 174 * 175 * If set, this is configured to the driver as a preferred initial BSSID 176 * while connecting to this network. 177 */ 178 u8 bssid_hint[ETH_ALEN]; 179 180 /** 181 * bssid_hint_set - Whether BSSID hint is configured for this network 182 */ 183 int bssid_hint_set; 184 185 /** 186 * go_p2p_dev_addr - GO's P2P Device Address or all zeros if not set 187 */ 188 u8 go_p2p_dev_addr[ETH_ALEN]; 189 190 /** 191 * psk - WPA pre-shared key (256 bits) 192 */ 193 u8 psk[32]; 194 195 /** 196 * psk_set - Whether PSK field is configured 197 */ 198 int psk_set; 199 200 /** 201 * passphrase - WPA ASCII passphrase 202 * 203 * If this is set, psk will be generated using the SSID and passphrase 204 * configured for the network. ASCII passphrase must be between 8 and 205 * 63 characters (inclusive). 206 */ 207 char *passphrase; 208 209 /** 210 * sae_password - SAE password 211 * 212 * This parameter can be used to set a password for SAE. By default, the 213 * passphrase value is used if this separate parameter is not used, but 214 * passphrase follows the WPA-PSK constraints (8..63 characters) even 215 * though SAE passwords do not have such constraints. 216 */ 217 char *sae_password; 218 219 /** 220 * sae_password_id - SAE password identifier 221 * 222 * This parameter can be used to identify a specific SAE password. If 223 * not included, the default SAE password is used instead. 224 */ 225 char *sae_password_id; 226 227 struct sae_pt *pt; 228 229 /** 230 * ext_psk - PSK/passphrase name in external storage 231 * 232 * If this is set, PSK/passphrase will be fetched from external storage 233 * when requesting association with the network. 234 */ 235 char *ext_psk; 236 237 /** 238 * mem_only_psk - Whether to keep PSK/passphrase only in memory 239 * 240 * 0 = allow psk/passphrase to be stored to the configuration file 241 * 1 = do not store psk/passphrase to the configuration file 242 */ 243 int mem_only_psk; 244 245 /** 246 * pairwise_cipher - Bitfield of allowed pairwise ciphers, WPA_CIPHER_* 247 */ 248 int pairwise_cipher; 249 250 /** 251 * group_cipher - Bitfield of allowed group ciphers, WPA_CIPHER_* 252 */ 253 int group_cipher; 254 255 /** 256 * group_mgmt_cipher - Bitfield of allowed group management ciphers 257 * 258 * This is a bitfield of WPA_CIPHER_AES_128_CMAC and WPA_CIPHER_BIP_* 259 * values. If 0, no constraint is used for the cipher, i.e., whatever 260 * the AP uses is accepted. 261 */ 262 int group_mgmt_cipher; 263 264 /** 265 * key_mgmt - Bitfield of allowed key management protocols 266 * 267 * WPA_KEY_MGMT_* 268 */ 269 int key_mgmt; 270 271 /** 272 * bg_scan_period - Background scan period in seconds, 0 to disable, or 273 * -1 to indicate no change to default driver configuration 274 */ 275 int bg_scan_period; 276 277 /** 278 * proto - Bitfield of allowed protocols, WPA_PROTO_* 279 */ 280 int proto; 281 282 /** 283 * auth_alg - Bitfield of allowed authentication algorithms 284 * 285 * WPA_AUTH_ALG_* 286 */ 287 int auth_alg; 288 289 /** 290 * scan_ssid - Scan this SSID with Probe Requests 291 * 292 * scan_ssid can be used to scan for APs using hidden SSIDs. 293 * Note: Many drivers do not support this. ap_mode=2 can be used with 294 * such drivers to use hidden SSIDs. Note2: Most nl80211-based drivers 295 * do support scan_ssid=1 and that should be used with them instead of 296 * ap_scan=2. 297 */ 298 int scan_ssid; 299 300 #ifdef IEEE8021X_EAPOL 301 #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0) 302 #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1) 303 /** 304 * eapol_flags - Bit field of IEEE 802.1X/EAPOL options (EAPOL_FLAG_*) 305 */ 306 int eapol_flags; 307 308 /** 309 * eap - EAP peer configuration for this network 310 */ 311 struct eap_peer_config eap; 312 #endif /* IEEE8021X_EAPOL */ 313 314 #ifdef CONFIG_WEP 315 #define NUM_WEP_KEYS 4 316 #define MAX_WEP_KEY_LEN 16 317 /** 318 * wep_key - WEP keys 319 */ 320 u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN]; 321 322 /** 323 * wep_key_len - WEP key lengths 324 */ 325 size_t wep_key_len[NUM_WEP_KEYS]; 326 327 /** 328 * wep_tx_keyidx - Default key index for TX frames using WEP 329 */ 330 int wep_tx_keyidx; 331 #endif /* CONFIG_WEP */ 332 333 /** 334 * proactive_key_caching - Enable proactive key caching 335 * 336 * This field can be used to enable proactive key caching which is also 337 * known as opportunistic PMKSA caching for WPA2. This is disabled (0) 338 * by default unless default value is changed with the global okc=1 339 * parameter. Enable by setting this to 1. 340 * 341 * Proactive key caching is used to make supplicant assume that the APs 342 * are using the same PMK and generate PMKSA cache entries without 343 * doing RSN pre-authentication. This requires support from the AP side 344 * and is normally used with wireless switches that co-locate the 345 * authenticator. 346 * 347 * Internally, special value -1 is used to indicate that the parameter 348 * was not specified in the configuration (i.e., default behavior is 349 * followed). 350 */ 351 int proactive_key_caching; 352 353 /** 354 * mixed_cell - Whether mixed cells are allowed 355 * 356 * This option can be used to configure whether so called mixed cells, 357 * i.e., networks that use both plaintext and encryption in the same 358 * SSID, are allowed. This is disabled (0) by default. Enable by 359 * setting this to 1. 360 */ 361 int mixed_cell; 362 363 #ifdef IEEE8021X_EAPOL 364 365 /** 366 * leap - Number of EAP methods using LEAP 367 * 368 * This field should be set to 1 if LEAP is enabled. This is used to 369 * select IEEE 802.11 authentication algorithm. 370 */ 371 int leap; 372 373 /** 374 * non_leap - Number of EAP methods not using LEAP 375 * 376 * This field should be set to >0 if any EAP method other than LEAP is 377 * enabled. This is used to select IEEE 802.11 authentication 378 * algorithm. 379 */ 380 int non_leap; 381 382 /** 383 * eap_workaround - EAP workarounds enabled 384 * 385 * wpa_supplicant supports number of "EAP workarounds" to work around 386 * interoperability issues with incorrectly behaving authentication 387 * servers. This is recommended to be enabled by default because some 388 * of the issues are present in large number of authentication servers. 389 * 390 * Strict EAP conformance mode can be configured by disabling 391 * workarounds with eap_workaround = 0. 392 */ 393 unsigned int eap_workaround; 394 395 #endif /* IEEE8021X_EAPOL */ 396 397 /** 398 * mode - IEEE 802.11 operation mode (Infrastucture/IBSS) 399 * 400 * 0 = infrastructure (Managed) mode, i.e., associate with an AP. 401 * 402 * 1 = IBSS (ad-hoc, peer-to-peer) 403 * 404 * 2 = AP (access point) 405 * 406 * 3 = P2P Group Owner (can be set in the configuration file) 407 * 408 * 4 = P2P Group Formation (used internally; not in configuration 409 * files) 410 * 411 * 5 = Mesh 412 * 413 * Note: IBSS can only be used with key_mgmt NONE (plaintext and static 414 * WEP) and WPA-PSK (with proto=RSN). In addition, key_mgmt=WPA-NONE 415 * (fixed group key TKIP/CCMP) is available for backwards compatibility, 416 * but its use is deprecated. WPA-None requires following network block 417 * options: proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or 418 * CCMP, but not both), and psk must also be set (either directly or 419 * using ASCII passphrase). 420 */ 421 enum wpas_mode mode; 422 423 /** 424 * pbss - Whether to use PBSS. Relevant to DMG networks only. 425 * 0 = do not use PBSS 426 * 1 = use PBSS 427 * 2 = don't care (not allowed in AP mode) 428 * Used together with mode configuration. When mode is AP, it 429 * means to start a PCP instead of a regular AP. When mode is INFRA it 430 * means connect to a PCP instead of AP. In this mode you can also 431 * specify 2 (don't care) meaning connect to either AP or PCP. 432 * P2P_GO and P2P_GROUP_FORMATION modes must use PBSS in DMG network. 433 */ 434 int pbss; 435 436 /** 437 * disabled - Whether this network is currently disabled 438 * 439 * 0 = this network can be used (default). 440 * 1 = this network block is disabled (can be enabled through 441 * ctrl_iface, e.g., with wpa_cli or wpa_gui). 442 * 2 = this network block includes parameters for a persistent P2P 443 * group (can be used with P2P ctrl_iface commands) 444 */ 445 int disabled; 446 447 /** 448 * disabled_for_connect - Whether this network was temporarily disabled 449 * 450 * This flag is used to reenable all the temporarily disabled networks 451 * after either the success or failure of a WPS connection. 452 */ 453 int disabled_for_connect; 454 455 /** 456 * id_str - Network identifier string for external scripts 457 * 458 * This value is passed to external ctrl_iface monitors in 459 * WPA_EVENT_CONNECTED event and wpa_cli sets this as WPA_ID_STR 460 * environment variable for action scripts. 461 */ 462 char *id_str; 463 464 /** 465 * ieee80211w - Whether management frame protection is enabled 466 * 467 * This value is used to configure policy for management frame 468 * protection (IEEE 802.11w). 0 = disabled, 1 = optional, 2 = required. 469 * This is disabled by default unless the default value has been changed 470 * with the global pmf=1/2 parameter. 471 * 472 * Internally, special value 3 is used to indicate that the parameter 473 * was not specified in the configuration (i.e., default behavior is 474 * followed). 475 */ 476 enum mfp_options ieee80211w; 477 478 #ifdef CONFIG_OCV 479 /** 480 * ocv - Enable/disable operating channel validation 481 * 482 * If this parameter is set to 1, stations will exchange OCI element 483 * to cryptographically verify the operating channel. Setting this 484 * parameter to 0 disables this option. Default value: 0. 485 */ 486 int ocv; 487 #endif /* CONFIG_OCV */ 488 489 /** 490 * frequency - Channel frequency in megahertz (MHz) for IBSS 491 * 492 * This value is used to configure the initial channel for IBSS (adhoc) 493 * networks, e.g., 2412 = IEEE 802.11b/g channel 1. It is ignored in 494 * the infrastructure mode. In addition, this value is only used by the 495 * station that creates the IBSS. If an IBSS network with the 496 * configured SSID is already present, the frequency of the network 497 * will be used instead of this configured value. 498 */ 499 int frequency; 500 501 /** 502 * enable_edmg - Enable EDMG feature in STA/AP mode 503 * 504 * This flag is used for enabling the EDMG capability in STA/AP mode. 505 */ 506 int enable_edmg; 507 508 /** 509 * edmg_channel - EDMG channel number 510 * 511 * This value is used to configure the EDMG channel bonding feature. 512 * In AP mode it defines the EDMG channel to start the AP on. 513 * in STA mode it defines the EDMG channel to use for connection 514 * (if supported by AP). 515 */ 516 u8 edmg_channel; 517 518 /** 519 * fixed_freq - Use fixed frequency for IBSS 520 */ 521 int fixed_freq; 522 523 #ifdef CONFIG_ACS 524 /** 525 * ACS - Automatic Channel Selection for AP mode 526 * 527 * If present, it will be handled together with frequency. 528 * frequency will be used to determine hardware mode only, when it is 529 * used for both hardware mode and channel when used alone. This will 530 * force the channel to be set to 0, thus enabling ACS. 531 */ 532 int acs; 533 #endif /* CONFIG_ACS */ 534 535 /** 536 * mesh_basic_rates - BSS Basic rate set for mesh network 537 * 538 */ 539 int *mesh_basic_rates; 540 541 /** 542 * Mesh network plink parameters 543 */ 544 int dot11MeshMaxRetries; 545 int dot11MeshRetryTimeout; /* msec */ 546 int dot11MeshConfirmTimeout; /* msec */ 547 int dot11MeshHoldingTimeout; /* msec */ 548 549 int ht; 550 int ht40; 551 552 int vht; 553 554 int he; 555 556 int max_oper_chwidth; 557 558 unsigned int vht_center_freq1; 559 unsigned int vht_center_freq2; 560 561 /** 562 * wpa_ptk_rekey - Maximum lifetime for PTK in seconds 563 * 564 * This value can be used to enforce rekeying of PTK to mitigate some 565 * attacks against TKIP deficiencies. 566 */ 567 int wpa_ptk_rekey; 568 569 /** wpa_deny_ptk0_rekey - Control PTK0 rekeying 570 * 571 * Rekeying a pairwise key using only keyid 0 (PTK0 rekey) has many 572 * broken implementations and should be avoided when using or 573 * interacting with one. 574 * 575 * 0 = always rekey when configured/instructed 576 * 1 = only rekey when the local driver is explicitly indicating it can 577 * perform this operation without issues 578 * 2 = never allow PTK0 rekeys 579 */ 580 enum ptk0_rekey_handling wpa_deny_ptk0_rekey; 581 582 /** 583 * group_rekey - Group rekeying time in seconds 584 * 585 * This value, if non-zero, is used as the dot11RSNAConfigGroupRekeyTime 586 * parameter when operating in Authenticator role in IBSS. 587 */ 588 int group_rekey; 589 590 /** 591 * scan_freq - Array of frequencies to scan or %NULL for all 592 * 593 * This is an optional zero-terminated array of frequencies in 594 * megahertz (MHz) to include in scan requests when searching for this 595 * network. This can be used to speed up scanning when the network is 596 * known to not use all possible channels. 597 */ 598 int *scan_freq; 599 600 /** 601 * bgscan - Background scan and roaming parameters or %NULL if none 602 * 603 * This is an optional set of parameters for background scanning and 604 * roaming within a network (ESS) in following format: 605 * <bgscan module name>:<module parameters> 606 */ 607 char *bgscan; 608 609 /** 610 * ignore_broadcast_ssid - Hide SSID in AP mode 611 * 612 * Send empty SSID in beacons and ignore probe request frames that do 613 * not specify full SSID, i.e., require stations to know SSID. 614 * default: disabled (0) 615 * 1 = send empty (length=0) SSID in beacon and ignore probe request 616 * for broadcast SSID 617 * 2 = clear SSID (ASCII 0), but keep the original length (this may be 618 * required with some clients that do not support empty SSID) and 619 * ignore probe requests for broadcast SSID 620 */ 621 int ignore_broadcast_ssid; 622 623 /** 624 * freq_list - Array of allowed frequencies or %NULL for all 625 * 626 * This is an optional zero-terminated array of frequencies in 627 * megahertz (MHz) to allow for selecting the BSS. If set, scan results 628 * that do not match any of the specified frequencies are not 629 * considered when selecting a BSS. 630 */ 631 int *freq_list; 632 633 /** 634 * p2p_client_list - List of P2P Clients in a persistent group (GO) 635 * 636 * This is a list of P2P Clients (P2P Device Address) that have joined 637 * the persistent group. This is maintained on the GO for persistent 638 * group entries (disabled == 2). 639 */ 640 u8 *p2p_client_list; 641 642 /** 643 * num_p2p_clients - Number of entries in p2p_client_list 644 */ 645 size_t num_p2p_clients; 646 647 #ifndef P2P_MAX_STORED_CLIENTS 648 #define P2P_MAX_STORED_CLIENTS 100 649 #endif /* P2P_MAX_STORED_CLIENTS */ 650 651 /** 652 * psk_list - Per-client PSKs (struct psk_list_entry) 653 */ 654 struct dl_list psk_list; 655 656 /** 657 * p2p_group - Network generated as a P2P group (used internally) 658 */ 659 int p2p_group; 660 661 /** 662 * p2p_persistent_group - Whether this is a persistent group 663 */ 664 int p2p_persistent_group; 665 666 /** 667 * temporary - Whether this network is temporary and not to be saved 668 */ 669 int temporary; 670 671 /** 672 * export_keys - Whether keys may be exported 673 * 674 * This attribute will be set when keys are determined through 675 * WPS or similar so that they may be exported. 676 */ 677 int export_keys; 678 679 #ifdef CONFIG_HT_OVERRIDES 680 /** 681 * disable_ht - Disable HT (IEEE 802.11n) for this network 682 * 683 * By default, use it if it is available, but this can be configured 684 * to 1 to have it disabled. 685 */ 686 int disable_ht; 687 688 /** 689 * disable_ht40 - Disable HT40 for this network 690 * 691 * By default, use it if it is available, but this can be configured 692 * to 1 to have it disabled. 693 */ 694 int disable_ht40; 695 696 /** 697 * disable_sgi - Disable SGI (Short Guard Interval) for this network 698 * 699 * By default, use it if it is available, but this can be configured 700 * to 1 to have it disabled. 701 */ 702 int disable_sgi; 703 704 /** 705 * disable_ldpc - Disable LDPC for this network 706 * 707 * By default, use it if it is available, but this can be configured 708 * to 1 to have it disabled. 709 */ 710 int disable_ldpc; 711 712 /** 713 * ht40_intolerant - Indicate 40 MHz intolerant for this network 714 */ 715 int ht40_intolerant; 716 717 /** 718 * disable_max_amsdu - Disable MAX A-MSDU 719 * 720 * A-MDSU will be 3839 bytes when disabled, or 7935 721 * when enabled (assuming it is otherwise supported) 722 * -1 (default) means do not apply any settings to the kernel. 723 */ 724 int disable_max_amsdu; 725 726 /** 727 * ampdu_factor - Maximum A-MPDU Length Exponent 728 * 729 * Value: 0-3, see 7.3.2.56.3 in IEEE Std 802.11n-2009. 730 */ 731 int ampdu_factor; 732 733 /** 734 * ampdu_density - Minimum A-MPDU Start Spacing 735 * 736 * Value: 0-7, see 7.3.2.56.3 in IEEE Std 802.11n-2009. 737 */ 738 int ampdu_density; 739 740 /** 741 * ht_mcs - Allowed HT-MCS rates, in ASCII hex: ffff0000... 742 * 743 * By default (empty string): Use whatever the OS has configured. 744 */ 745 char *ht_mcs; 746 747 /** 748 * tx_stbc - Indicate STBC support for TX streams 749 * 750 * Value: -1..1, by default (-1): use whatever the OS or card has 751 * configured. See IEEE Std 802.11-2016, 9.4.2.56.2. 752 */ 753 int tx_stbc; 754 755 /** 756 * rx_stbc - Indicate STBC support for RX streams 757 * 758 * Value: -1..3, by default (-1): use whatever the OS or card has 759 * configured. See IEEE Std 802.11-2016, 9.4.2.56.2. 760 */ 761 int rx_stbc; 762 #endif /* CONFIG_HT_OVERRIDES */ 763 764 #ifdef CONFIG_VHT_OVERRIDES 765 /** 766 * disable_vht - Disable VHT (IEEE 802.11ac) for this network 767 * 768 * By default, use it if it is available, but this can be configured 769 * to 1 to have it disabled. 770 */ 771 int disable_vht; 772 773 /** 774 * vht_capa - VHT capabilities to use 775 */ 776 unsigned int vht_capa; 777 778 /** 779 * vht_capa_mask - mask for VHT capabilities 780 */ 781 unsigned int vht_capa_mask; 782 783 int vht_rx_mcs_nss_1, vht_rx_mcs_nss_2, 784 vht_rx_mcs_nss_3, vht_rx_mcs_nss_4, 785 vht_rx_mcs_nss_5, vht_rx_mcs_nss_6, 786 vht_rx_mcs_nss_7, vht_rx_mcs_nss_8; 787 int vht_tx_mcs_nss_1, vht_tx_mcs_nss_2, 788 vht_tx_mcs_nss_3, vht_tx_mcs_nss_4, 789 vht_tx_mcs_nss_5, vht_tx_mcs_nss_6, 790 vht_tx_mcs_nss_7, vht_tx_mcs_nss_8; 791 #endif /* CONFIG_VHT_OVERRIDES */ 792 793 #ifdef CONFIG_HE_OVERRIDES 794 /** 795 * disable_he - Disable HE (IEEE 802.11ax) for this network 796 * 797 * By default, use it if it is available, but this can be configured 798 * to 1 to have it disabled. 799 */ 800 int disable_he; 801 #endif /* CONFIG_HE_OVERRIDES */ 802 803 /** 804 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity 805 * 806 * This timeout value is used in AP mode to clean up inactive stations. 807 * By default: 300 seconds. 808 */ 809 int ap_max_inactivity; 810 811 /** 812 * dtim_period - DTIM period in Beacon intervals 813 * By default: 2 814 */ 815 int dtim_period; 816 817 /** 818 * beacon_int - Beacon interval (default: 100 TU) 819 */ 820 int beacon_int; 821 822 /** 823 * auth_failures - Number of consecutive authentication failures 824 */ 825 unsigned int auth_failures; 826 827 /** 828 * disabled_until - Network block disabled until this time if non-zero 829 */ 830 struct os_reltime disabled_until; 831 832 /** 833 * parent_cred - Pointer to parent wpa_cred entry 834 * 835 * This pointer can be used to delete temporary networks when a wpa_cred 836 * that was used to create them is removed. This pointer should not be 837 * dereferences since it may not be updated in all cases. 838 */ 839 void *parent_cred; 840 841 #ifdef CONFIG_MACSEC 842 /** 843 * macsec_policy - Determines the policy for MACsec secure session 844 * 845 * 0: MACsec not in use (default) 846 * 1: MACsec enabled - Should secure, accept key server's advice to 847 * determine whether to use a secure session or not. 848 */ 849 int macsec_policy; 850 851 /** 852 * macsec_integ_only - Determines how MACsec are transmitted 853 * 854 * This setting applies only when MACsec is in use, i.e., 855 * - macsec_policy is enabled 856 * - the key server has decided to enable MACsec 857 * 858 * 0: Encrypt traffic (default) 859 * 1: Integrity only 860 */ 861 int macsec_integ_only; 862 863 /** 864 * macsec_replay_protect - Enable MACsec replay protection 865 * 866 * This setting applies only when MACsec is in use, i.e., 867 * - macsec_policy is enabled 868 * - the key server has decided to enable MACsec 869 * 870 * 0: Replay protection disabled (default) 871 * 1: Replay protection enabled 872 */ 873 int macsec_replay_protect; 874 875 /** 876 * macsec_replay_window - MACsec replay protection window 877 * 878 * A window in which replay is tolerated, to allow receipt of frames 879 * that have been misordered by the network. 880 * 881 * This setting applies only when MACsec replay protection active, i.e., 882 * - macsec_replay_protect is enabled 883 * - the key server has decided to enable MACsec 884 * 885 * 0: No replay window, strict check (default) 886 * 1..2^32-1: number of packets that could be misordered 887 */ 888 u32 macsec_replay_window; 889 890 /** 891 * macsec_port - MACsec port (in SCI) 892 * 893 * Port component of the SCI. 894 * 895 * Range: 1-65534 (default: 1) 896 */ 897 int macsec_port; 898 899 /** 900 * mka_priority - Priority of MKA Actor 901 * 902 * Range: 0-255 (default: 255) 903 */ 904 int mka_priority; 905 906 /** 907 * mka_ckn - MKA pre-shared CKN 908 */ 909 #define MACSEC_CKN_MAX_LEN 32 910 size_t mka_ckn_len; 911 u8 mka_ckn[MACSEC_CKN_MAX_LEN]; 912 913 /** 914 * mka_cak - MKA pre-shared CAK 915 */ 916 #define MACSEC_CAK_MAX_LEN 32 917 size_t mka_cak_len; 918 u8 mka_cak[MACSEC_CAK_MAX_LEN]; 919 920 #define MKA_PSK_SET_CKN BIT(0) 921 #define MKA_PSK_SET_CAK BIT(1) 922 #define MKA_PSK_SET (MKA_PSK_SET_CKN | MKA_PSK_SET_CAK) 923 /** 924 * mka_psk_set - Whether mka_ckn and mka_cak are set 925 */ 926 u8 mka_psk_set; 927 #endif /* CONFIG_MACSEC */ 928 929 #ifdef CONFIG_HS20 930 int update_identifier; 931 932 /** 933 * roaming_consortium_selection - Roaming Consortium Selection 934 * 935 * The matching Roaming Consortium OI that was used to generate this 936 * network profile. 937 */ 938 u8 *roaming_consortium_selection; 939 940 /** 941 * roaming_consortium_selection_len - roaming_consortium_selection len 942 */ 943 size_t roaming_consortium_selection_len; 944 #endif /* CONFIG_HS20 */ 945 946 unsigned int wps_run; 947 948 /** 949 * mac_addr - MAC address policy 950 * 951 * 0 = use permanent MAC address 952 * 1 = use random MAC address for each ESS connection 953 * 2 = like 1, but maintain OUI (with local admin bit set) 954 * 955 * Internally, special value -1 is used to indicate that the parameter 956 * was not specified in the configuration (i.e., default behavior is 957 * followed). 958 */ 959 int mac_addr; 960 961 /** 962 * no_auto_peer - Do not automatically peer with compatible mesh peers 963 * 964 * When unset, the reception of a beacon from a another mesh peer in 965 * this MBSS will trigger a peering attempt. 966 */ 967 int no_auto_peer; 968 969 /** 970 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm) 971 * 972 * -255..-1 = threshold value in dBm 973 * 0 = not using RSSI threshold 974 * 1 = do not change driver default 975 */ 976 int mesh_rssi_threshold; 977 978 /** 979 * wps_disabled - WPS disabled in AP mode 980 * 981 * 0 = WPS enabled and configured (default) 982 * 1 = WPS disabled 983 */ 984 int wps_disabled; 985 986 /** 987 * fils_dh_group - FILS DH Group 988 * 989 * 0 = PFS disabled with FILS shared key authentication 990 * 1-65535 DH Group to use for FILS PFS 991 */ 992 int fils_dh_group; 993 994 /** 995 * dpp_connector - DPP Connector (signedConnector as string) 996 */ 997 char *dpp_connector; 998 999 /** 1000 * dpp_netaccesskey - DPP netAccessKey (own private key) 1001 */ 1002 u8 *dpp_netaccesskey; 1003 1004 /** 1005 * dpp_netaccesskey_len - DPP netAccessKey length in octets 1006 */ 1007 size_t dpp_netaccesskey_len; 1008 1009 /** 1010 * net_access_key_expiry - DPP netAccessKey expiry in UNIX time stamp 1011 * 1012 * 0 indicates no expiration. 1013 */ 1014 unsigned int dpp_netaccesskey_expiry; 1015 1016 /** 1017 * dpp_csign - C-sign-key (Configurator public key) 1018 */ 1019 u8 *dpp_csign; 1020 1021 /** 1022 * dpp_csign_len - C-sign-key length in octets 1023 */ 1024 size_t dpp_csign_len; 1025 1026 /** 1027 * dpp_pp_key - ppKey (Configurator privacy protection public key) 1028 */ 1029 u8 *dpp_pp_key; 1030 1031 /** 1032 * dpp_pp_key_len - ppKey length in octets 1033 */ 1034 size_t dpp_pp_key_len; 1035 1036 /** 1037 * dpp_pfs - DPP PFS 1038 * 0: allow PFS to be used or not used 1039 * 1: require PFS to be used (note: not compatible with DPP R1) 1040 * 2: do not allow PFS to be used 1041 */ 1042 int dpp_pfs; 1043 1044 /** 1045 * dpp_pfs_fallback - DPP PFS fallback selection 1046 * 1047 * This is an internally used variable (i.e., not used in external 1048 * configuration) to track state of the DPP PFS fallback mechanism. 1049 */ 1050 int dpp_pfs_fallback; 1051 1052 /** 1053 * owe_group - OWE DH Group 1054 * 1055 * 0 = use default (19) first and then try all supported groups one by 1056 * one if AP rejects the selected group 1057 * 1-65535 DH Group to use for OWE 1058 * 1059 * Groups 19 (NIST P-256), 20 (NIST P-384), and 21 (NIST P-521) are 1060 * currently supported. 1061 */ 1062 int owe_group; 1063 1064 /** 1065 * owe_only - OWE-only mode (disable transition mode) 1066 * 1067 * 0 = enable transition mode (allow connection to either OWE or open 1068 * BSS) 1069 * 1 = disable transition mode (allow connection only with OWE) 1070 */ 1071 int owe_only; 1072 1073 /** 1074 * owe_ptk_workaround - OWE PTK derivation workaround 1075 * 1076 * Initial OWE implementation used SHA256 when deriving the PTK for all 1077 * OWE groups. This was supposed to change to SHA384 for group 20 and 1078 * SHA512 for group 21. This parameter can be used to enable older 1079 * behavior mainly for testing purposes. There is no impact to group 19 1080 * behavior, but if enabled, this will make group 20 and 21 cases use 1081 * SHA256-based PTK derivation which will not work with the updated 1082 * OWE implementation on the AP side. 1083 */ 1084 int owe_ptk_workaround; 1085 1086 /** 1087 * owe_transition_bss_select_count - OWE transition BSS select count 1088 * 1089 * This is an internally used variable (i.e., not used in external 1090 * configuration) to track the number of selection attempts done for 1091 * OWE BSS in transition mode. This allows fallback to an open BSS if 1092 * the selection attempts for OWE BSS exceed the configured threshold. 1093 */ 1094 int owe_transition_bss_select_count; 1095 1096 /** 1097 * multi_ap_backhaul_sta - Multi-AP backhaul STA 1098 * 0 = normal (non-Multi-AP) station 1099 * 1 = Multi-AP backhaul station 1100 */ 1101 int multi_ap_backhaul_sta; 1102 1103 /** 1104 * ft_eap_pmksa_caching - Whether FT-EAP PMKSA caching is allowed 1105 * 0 = do not try to use PMKSA caching with FT-EAP 1106 * 1 = try to use PMKSA caching with FT-EAP 1107 * 1108 * This controls whether to try to use PMKSA caching with FT-EAP for the 1109 * FT initial mobility domain association. 1110 */ 1111 int ft_eap_pmksa_caching; 1112 1113 /** 1114 * beacon_prot - Whether Beacon protection is enabled 1115 * 1116 * This depends on management frame protection (ieee80211w) being 1117 * enabled. 1118 */ 1119 int beacon_prot; 1120 1121 /** 1122 * transition_disable - Transition Disable indication 1123 * The AP can notify authenticated stations to disable transition mode 1124 * in their network profiles when the network has completed transition 1125 * steps, i.e., once sufficiently large number of APs in the ESS have 1126 * been updated to support the more secure alternative. When this 1127 * indication is used, the stations are expected to automatically 1128 * disable transition mode and less secure security options. This 1129 * includes use of WEP, TKIP (including use of TKIP as the group 1130 * cipher), and connections without PMF. 1131 * Bitmap bits: 1132 * bit 0 (0x01): WPA3-Personal (i.e., disable WPA2-Personal = WPA-PSK 1133 * and only allow SAE to be used) 1134 * bit 1 (0x02): SAE-PK (disable SAE without use of SAE-PK) 1135 * bit 2 (0x04): WPA3-Enterprise (move to requiring PMF) 1136 * bit 3 (0x08): Enhanced Open (disable use of open network; require 1137 * OWE) 1138 */ 1139 u8 transition_disable; 1140 1141 /** 1142 * sae_pk - SAE-PK mode 1143 * 0 = automatic SAE/SAE-PK selection based on password; enable 1144 * transition mode (allow SAE authentication without SAE-PK) 1145 * 1 = SAE-PK only (disable transition mode; allow SAE authentication 1146 * only with SAE-PK) 1147 * 2 = disable SAE-PK (allow SAE authentication only without SAE-PK) 1148 */ 1149 enum sae_pk_mode sae_pk; 1150 1151 /** 1152 * was_recently_reconfigured - Whether this SSID config has been changed 1153 * recently 1154 * 1155 * This is an internally used variable, i.e., not used in external 1156 * configuration. 1157 */ 1158 bool was_recently_reconfigured; 1159 }; 1160 1161 #endif /* CONFIG_SSID_H */ 1162