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