1189251Ssam/*
2189251Ssam * WPA Supplicant / Network configuration structures
3189251Ssam * Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi>
4189251Ssam *
5252726Srpaulo * This software may be distributed under the terms of the BSD license.
6252726Srpaulo * See README for more details.
7189251Ssam */
8189251Ssam
9189251Ssam#ifndef CONFIG_SSID_H
10189251Ssam#define CONFIG_SSID_H
11189251Ssam
12214734Srpaulo#include "common/defs.h"
13189251Ssam#include "eap_peer/eap_config.h"
14189251Ssam
15189251Ssam#define MAX_SSID_LEN 32
16189251Ssam
17189251Ssam
18189251Ssam#define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
19189251Ssam#define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \
20189251Ssam			     EAPOL_FLAG_REQUIRE_KEY_BROADCAST)
21189251Ssam#define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN)
22189251Ssam#define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X)
23189251Ssam#define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP)
24189251Ssam#define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP | \
25189251Ssam		       WPA_CIPHER_WEP104 | WPA_CIPHER_WEP40)
26189251Ssam#define DEFAULT_FRAGMENT_SIZE 1398
27189251Ssam
28252726Srpaulo#define DEFAULT_BG_SCAN_PERIOD -1
29252726Srpaulo#define DEFAULT_DISABLE_HT 0
30252726Srpaulo#define DEFAULT_DISABLE_HT40 0
31252726Srpaulo#define DEFAULT_DISABLE_SGI 0
32252726Srpaulo#define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */
33252726Srpaulo#define DEFAULT_AMPDU_FACTOR -1 /* no change */
34252726Srpaulo#define DEFAULT_AMPDU_DENSITY -1 /* no change */
35252726Srpaulo
36189251Ssam/**
37189251Ssam * struct wpa_ssid - Network configuration data
38189251Ssam *
39189251Ssam * This structure includes all the configuration variables for a network. This
40189251Ssam * data is included in the per-interface configuration data as an element of
41189251Ssam * the network list, struct wpa_config::ssid. Each network block in the
42189251Ssam * configuration is mapped to a struct wpa_ssid instance.
43189251Ssam */
44189251Ssamstruct wpa_ssid {
45189251Ssam	/**
46189251Ssam	 * next - Next network in global list
47189251Ssam	 *
48189251Ssam	 * This pointer can be used to iterate over all networks. The head of
49189251Ssam	 * this list is stored in the ssid field of struct wpa_config.
50189251Ssam	 */
51189251Ssam	struct wpa_ssid *next;
52189251Ssam
53189251Ssam	/**
54189251Ssam	 * pnext - Next network in per-priority list
55189251Ssam	 *
56189251Ssam	 * This pointer can be used to iterate over all networks in the same
57189251Ssam	 * priority class. The heads of these list are stored in the pssid
58189251Ssam	 * fields of struct wpa_config.
59189251Ssam	 */
60189251Ssam	struct wpa_ssid *pnext;
61189251Ssam
62189251Ssam	/**
63189251Ssam	 * id - Unique id for the network
64189251Ssam	 *
65189251Ssam	 * This identifier is used as a unique identifier for each network
66189251Ssam	 * block when using the control interface. Each network is allocated an
67189251Ssam	 * id when it is being created, either when reading the configuration
68189251Ssam	 * file or when a new network is added through the control interface.
69189251Ssam	 */
70189251Ssam	int id;
71189251Ssam
72189251Ssam	/**
73189251Ssam	 * priority - Priority group
74189251Ssam	 *
75189251Ssam	 * By default, all networks will get same priority group (0). If some
76189251Ssam	 * of the networks are more desirable, this field can be used to change
77189251Ssam	 * the order in which wpa_supplicant goes through the networks when
78189251Ssam	 * selecting a BSS. The priority groups will be iterated in decreasing
79189251Ssam	 * priority (i.e., the larger the priority value, the sooner the
80189251Ssam	 * network is matched against the scan results). Within each priority
81189251Ssam	 * group, networks will be selected based on security policy, signal
82189251Ssam	 * strength, etc.
83189251Ssam	 *
84189251Ssam	 * Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are
85189251Ssam	 * not using this priority to select the order for scanning. Instead,
86189251Ssam	 * they try the networks in the order that used in the configuration
87189251Ssam	 * file.
88189251Ssam	 */
89189251Ssam	int priority;
90189251Ssam
91189251Ssam	/**
92189251Ssam	 * ssid - Service set identifier (network name)
93189251Ssam	 *
94189251Ssam	 * This is the SSID for the network. For wireless interfaces, this is
95189251Ssam	 * used to select which network will be used. If set to %NULL (or
96189251Ssam	 * ssid_len=0), any SSID can be used. For wired interfaces, this must
97189251Ssam	 * be set to %NULL. Note: SSID may contain any characters, even nul
98189251Ssam	 * (ASCII 0) and as such, this should not be assumed to be a nul
99189251Ssam	 * terminated string. ssid_len defines how many characters are valid
100189251Ssam	 * and the ssid field is not guaranteed to be nul terminated.
101189251Ssam	 */
102189251Ssam	u8 *ssid;
103189251Ssam
104189251Ssam	/**
105189251Ssam	 * ssid_len - Length of the SSID
106189251Ssam	 */
107189251Ssam	size_t ssid_len;
108189251Ssam
109189251Ssam	/**
110189251Ssam	 * bssid - BSSID
111189251Ssam	 *
112189251Ssam	 * If set, this network block is used only when associating with the AP
113189251Ssam	 * using the configured BSSID
114252726Srpaulo	 *
115252726Srpaulo	 * If this is a persistent P2P group (disabled == 2), this is the GO
116252726Srpaulo	 * Device Address.
117189251Ssam	 */
118189251Ssam	u8 bssid[ETH_ALEN];
119189251Ssam
120189251Ssam	/**
121189251Ssam	 * bssid_set - Whether BSSID is configured for this network
122189251Ssam	 */
123189251Ssam	int bssid_set;
124189251Ssam
125189251Ssam	/**
126189251Ssam	 * psk - WPA pre-shared key (256 bits)
127189251Ssam	 */
128189251Ssam	u8 psk[32];
129189251Ssam
130189251Ssam	/**
131189251Ssam	 * psk_set - Whether PSK field is configured
132189251Ssam	 */
133189251Ssam	int psk_set;
134189251Ssam
135189251Ssam	/**
136189251Ssam	 * passphrase - WPA ASCII passphrase
137189251Ssam	 *
138189251Ssam	 * If this is set, psk will be generated using the SSID and passphrase
139189251Ssam	 * configured for the network. ASCII passphrase must be between 8 and
140189251Ssam	 * 63 characters (inclusive).
141189251Ssam	 */
142189251Ssam	char *passphrase;
143189251Ssam
144189251Ssam	/**
145252726Srpaulo	 * ext_psk - PSK/passphrase name in external storage
146252726Srpaulo	 *
147252726Srpaulo	 * If this is set, PSK/passphrase will be fetched from external storage
148252726Srpaulo	 * when requesting association with the network.
149252726Srpaulo	 */
150252726Srpaulo	char *ext_psk;
151252726Srpaulo
152252726Srpaulo	/**
153189251Ssam	 * pairwise_cipher - Bitfield of allowed pairwise ciphers, WPA_CIPHER_*
154189251Ssam	 */
155189251Ssam	int pairwise_cipher;
156189251Ssam
157189251Ssam	/**
158189251Ssam	 * group_cipher - Bitfield of allowed group ciphers, WPA_CIPHER_*
159189251Ssam	 */
160189251Ssam	int group_cipher;
161189251Ssam
162189251Ssam	/**
163189251Ssam	 * key_mgmt - Bitfield of allowed key management protocols
164189251Ssam	 *
165189251Ssam	 * WPA_KEY_MGMT_*
166189251Ssam	 */
167189251Ssam	int key_mgmt;
168189251Ssam
169189251Ssam	/**
170252726Srpaulo	 * bg_scan_period - Background scan period in seconds, 0 to disable, or
171252726Srpaulo	 * -1 to indicate no change to default driver configuration
172252726Srpaulo	 */
173252726Srpaulo	int bg_scan_period;
174252726Srpaulo
175252726Srpaulo	/**
176189251Ssam	 * proto - Bitfield of allowed protocols, WPA_PROTO_*
177189251Ssam	 */
178189251Ssam	int proto;
179189251Ssam
180189251Ssam	/**
181189251Ssam	 * auth_alg -  Bitfield of allowed authentication algorithms
182189251Ssam	 *
183189251Ssam	 * WPA_AUTH_ALG_*
184189251Ssam	 */
185189251Ssam	int auth_alg;
186189251Ssam
187189251Ssam	/**
188189251Ssam	 * scan_ssid - Scan this SSID with Probe Requests
189189251Ssam	 *
190189251Ssam	 * scan_ssid can be used to scan for APs using hidden SSIDs.
191189251Ssam	 * Note: Many drivers do not support this. ap_mode=2 can be used with
192189251Ssam	 * such drivers to use hidden SSIDs.
193189251Ssam	 */
194189251Ssam	int scan_ssid;
195189251Ssam
196189251Ssam#ifdef IEEE8021X_EAPOL
197189251Ssam#define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0)
198189251Ssam#define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1)
199189251Ssam	/**
200189251Ssam	 * eapol_flags - Bit field of IEEE 802.1X/EAPOL options (EAPOL_FLAG_*)
201189251Ssam	 */
202189251Ssam	int eapol_flags;
203189251Ssam
204189251Ssam	/**
205189251Ssam	 * eap - EAP peer configuration for this network
206189251Ssam	 */
207189251Ssam	struct eap_peer_config eap;
208189251Ssam#endif /* IEEE8021X_EAPOL */
209189251Ssam
210189251Ssam#define NUM_WEP_KEYS 4
211189251Ssam#define MAX_WEP_KEY_LEN 16
212189251Ssam	/**
213189251Ssam	 * wep_key - WEP keys
214189251Ssam	 */
215189251Ssam	u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN];
216189251Ssam
217189251Ssam	/**
218189251Ssam	 * wep_key_len - WEP key lengths
219189251Ssam	 */
220189251Ssam	size_t wep_key_len[NUM_WEP_KEYS];
221189251Ssam
222189251Ssam	/**
223189251Ssam	 * wep_tx_keyidx - Default key index for TX frames using WEP
224189251Ssam	 */
225189251Ssam	int wep_tx_keyidx;
226189251Ssam
227189251Ssam	/**
228189251Ssam	 * proactive_key_caching - Enable proactive key caching
229189251Ssam	 *
230189251Ssam	 * This field can be used to enable proactive key caching which is also
231189251Ssam	 * known as opportunistic PMKSA caching for WPA2. This is disabled (0)
232252726Srpaulo	 * by default unless default value is changed with the global okc=1
233252726Srpaulo	 * parameter. Enable by setting this to 1.
234189251Ssam	 *
235189251Ssam	 * Proactive key caching is used to make supplicant assume that the APs
236189251Ssam	 * are using the same PMK and generate PMKSA cache entries without
237189251Ssam	 * doing RSN pre-authentication. This requires support from the AP side
238189251Ssam	 * and is normally used with wireless switches that co-locate the
239189251Ssam	 * authenticator.
240252726Srpaulo	 *
241252726Srpaulo	 * Internally, special value -1 is used to indicate that the parameter
242252726Srpaulo	 * was not specified in the configuration (i.e., default behavior is
243252726Srpaulo	 * followed).
244189251Ssam	 */
245189251Ssam	int proactive_key_caching;
246189251Ssam
247189251Ssam	/**
248189251Ssam	 * mixed_cell - Whether mixed cells are allowed
249189251Ssam	 *
250189251Ssam	 * This option can be used to configure whether so called mixed cells,
251189251Ssam	 * i.e., networks that use both plaintext and encryption in the same
252189251Ssam	 * SSID, are allowed. This is disabled (0) by default. Enable by
253189251Ssam	 * setting this to 1.
254189251Ssam	 */
255189251Ssam	int mixed_cell;
256189251Ssam
257189251Ssam#ifdef IEEE8021X_EAPOL
258189251Ssam
259189251Ssam	/**
260189251Ssam	 * leap - Number of EAP methods using LEAP
261189251Ssam	 *
262189251Ssam	 * This field should be set to 1 if LEAP is enabled. This is used to
263189251Ssam	 * select IEEE 802.11 authentication algorithm.
264189251Ssam	 */
265189251Ssam	int leap;
266189251Ssam
267189251Ssam	/**
268189251Ssam	 * non_leap - Number of EAP methods not using LEAP
269189251Ssam	 *
270189251Ssam	 * This field should be set to >0 if any EAP method other than LEAP is
271189251Ssam	 * enabled. This is used to select IEEE 802.11 authentication
272189251Ssam	 * algorithm.
273189251Ssam	 */
274189251Ssam	int non_leap;
275189251Ssam
276189251Ssam	/**
277189251Ssam	 * eap_workaround - EAP workarounds enabled
278189251Ssam	 *
279189251Ssam	 * wpa_supplicant supports number of "EAP workarounds" to work around
280189251Ssam	 * interoperability issues with incorrectly behaving authentication
281189251Ssam	 * servers. This is recommended to be enabled by default because some
282189251Ssam	 * of the issues are present in large number of authentication servers.
283189251Ssam	 *
284189251Ssam	 * Strict EAP conformance mode can be configured by disabling
285189251Ssam	 * workarounds with eap_workaround = 0.
286189251Ssam	 */
287189251Ssam	unsigned int eap_workaround;
288189251Ssam
289189251Ssam#endif /* IEEE8021X_EAPOL */
290189251Ssam
291189251Ssam	/**
292189251Ssam	 * mode - IEEE 802.11 operation mode (Infrastucture/IBSS)
293189251Ssam	 *
294189251Ssam	 * 0 = infrastructure (Managed) mode, i.e., associate with an AP.
295189251Ssam	 *
296189251Ssam	 * 1 = IBSS (ad-hoc, peer-to-peer)
297189251Ssam	 *
298214734Srpaulo	 * 2 = AP (access point)
299214734Srpaulo	 *
300252726Srpaulo	 * 3 = P2P Group Owner (can be set in the configuration file)
301252726Srpaulo	 *
302252726Srpaulo	 * 4 = P2P Group Formation (used internally; not in configuration
303252726Srpaulo	 * files)
304252726Srpaulo	 *
305189251Ssam	 * Note: IBSS can only be used with key_mgmt NONE (plaintext and
306189251Ssam	 * static WEP) and key_mgmt=WPA-NONE (fixed group key TKIP/CCMP). In
307189251Ssam	 * addition, ap_scan has to be set to 2 for IBSS. WPA-None requires
308189251Ssam	 * following network block options: proto=WPA, key_mgmt=WPA-NONE,
309189251Ssam	 * pairwise=NONE, group=TKIP (or CCMP, but not both), and psk must also
310189251Ssam	 * be set (either directly or using ASCII passphrase).
311189251Ssam	 */
312214734Srpaulo	enum wpas_mode {
313214734Srpaulo		WPAS_MODE_INFRA = 0,
314214734Srpaulo		WPAS_MODE_IBSS = 1,
315214734Srpaulo		WPAS_MODE_AP = 2,
316252726Srpaulo		WPAS_MODE_P2P_GO = 3,
317252726Srpaulo		WPAS_MODE_P2P_GROUP_FORMATION = 4,
318214734Srpaulo	} mode;
319189251Ssam
320189251Ssam	/**
321189251Ssam	 * disabled - Whether this network is currently disabled
322189251Ssam	 *
323189251Ssam	 * 0 = this network can be used (default).
324189251Ssam	 * 1 = this network block is disabled (can be enabled through
325189251Ssam	 * ctrl_iface, e.g., with wpa_cli or wpa_gui).
326252726Srpaulo	 * 2 = this network block includes parameters for a persistent P2P
327252726Srpaulo	 * group (can be used with P2P ctrl_iface commands)
328189251Ssam	 */
329189251Ssam	int disabled;
330189251Ssam
331189251Ssam	/**
332252726Srpaulo	 * disabled_for_connect - Whether this network was temporarily disabled
333252726Srpaulo	 *
334252726Srpaulo	 * This flag is used to reenable all the temporarily disabled networks
335252726Srpaulo	 * after either the success or failure of a WPS connection.
336252726Srpaulo	 */
337252726Srpaulo	int disabled_for_connect;
338252726Srpaulo
339252726Srpaulo	/**
340189251Ssam	 * peerkey -  Whether PeerKey handshake for direct links is allowed
341189251Ssam	 *
342189251Ssam	 * This is only used when both RSN/WPA2 and IEEE 802.11e (QoS) are
343189251Ssam	 * enabled.
344189251Ssam	 *
345189251Ssam	 * 0 = disabled (default)
346189251Ssam	 * 1 = enabled
347189251Ssam	 */
348189251Ssam	int peerkey;
349189251Ssam
350189251Ssam	/**
351189251Ssam	 * id_str - Network identifier string for external scripts
352189251Ssam	 *
353189251Ssam	 * This value is passed to external ctrl_iface monitors in
354189251Ssam	 * WPA_EVENT_CONNECTED event and wpa_cli sets this as WPA_ID_STR
355189251Ssam	 * environment variable for action scripts.
356189251Ssam	 */
357189251Ssam	char *id_str;
358189251Ssam
359189251Ssam#ifdef CONFIG_IEEE80211W
360189251Ssam	/**
361189251Ssam	 * ieee80211w - Whether management frame protection is enabled
362189251Ssam	 *
363189251Ssam	 * This value is used to configure policy for management frame
364189251Ssam	 * protection (IEEE 802.11w). 0 = disabled, 1 = optional, 2 = required.
365252726Srpaulo	 * This is disabled by default unless the default value has been changed
366252726Srpaulo	 * with the global pmf=1/2 parameter.
367252726Srpaulo	 *
368252726Srpaulo	 * Internally, special value 3 is used to indicate that the parameter
369252726Srpaulo	 * was not specified in the configuration (i.e., default behavior is
370252726Srpaulo	 * followed).
371189251Ssam	 */
372214734Srpaulo	enum mfp_options ieee80211w;
373189251Ssam#endif /* CONFIG_IEEE80211W */
374189251Ssam
375189251Ssam	/**
376189251Ssam	 * frequency - Channel frequency in megahertz (MHz) for IBSS
377189251Ssam	 *
378189251Ssam	 * This value is used to configure the initial channel for IBSS (adhoc)
379189251Ssam	 * networks, e.g., 2412 = IEEE 802.11b/g channel 1. It is ignored in
380189251Ssam	 * the infrastructure mode. In addition, this value is only used by the
381189251Ssam	 * station that creates the IBSS. If an IBSS network with the
382189251Ssam	 * configured SSID is already present, the frequency of the network
383189251Ssam	 * will be used instead of this configured value.
384189251Ssam	 */
385189251Ssam	int frequency;
386189251Ssam
387252726Srpaulo	int ht40;
388252726Srpaulo
389189251Ssam	/**
390189251Ssam	 * wpa_ptk_rekey - Maximum lifetime for PTK in seconds
391189251Ssam	 *
392189251Ssam	 * This value can be used to enforce rekeying of PTK to mitigate some
393189251Ssam	 * attacks against TKIP deficiencies.
394189251Ssam	 */
395189251Ssam	int wpa_ptk_rekey;
396214734Srpaulo
397214734Srpaulo	/**
398214734Srpaulo	 * scan_freq - Array of frequencies to scan or %NULL for all
399214734Srpaulo	 *
400214734Srpaulo	 * This is an optional zero-terminated array of frequencies in
401214734Srpaulo	 * megahertz (MHz) to include in scan requests when searching for this
402214734Srpaulo	 * network. This can be used to speed up scanning when the network is
403214734Srpaulo	 * known to not use all possible channels.
404214734Srpaulo	 */
405214734Srpaulo	int *scan_freq;
406214734Srpaulo
407214734Srpaulo	/**
408214734Srpaulo	 * bgscan - Background scan and roaming parameters or %NULL if none
409214734Srpaulo	 *
410214734Srpaulo	 * This is an optional set of parameters for background scanning and
411214734Srpaulo	 * roaming within a network (ESS) in following format:
412214734Srpaulo	 * <bgscan module name>:<module parameters>
413214734Srpaulo	 */
414214734Srpaulo	char *bgscan;
415214734Srpaulo
416214734Srpaulo	/**
417252726Srpaulo	 * ignore_broadcast_ssid - Hide SSID in AP mode
418252726Srpaulo	 *
419252726Srpaulo	 * Send empty SSID in beacons and ignore probe request frames that do
420252726Srpaulo	 * not specify full SSID, i.e., require stations to know SSID.
421252726Srpaulo	 * default: disabled (0)
422252726Srpaulo	 * 1 = send empty (length=0) SSID in beacon and ignore probe request
423252726Srpaulo	 * for broadcast SSID
424252726Srpaulo	 * 2 = clear SSID (ASCII 0), but keep the original length (this may be
425252726Srpaulo	 * required with some clients that do not support empty SSID) and
426252726Srpaulo	 * ignore probe requests for broadcast SSID
427252726Srpaulo	 */
428252726Srpaulo	int ignore_broadcast_ssid;
429252726Srpaulo
430252726Srpaulo	/**
431214734Srpaulo	 * freq_list - Array of allowed frequencies or %NULL for all
432214734Srpaulo	 *
433214734Srpaulo	 * This is an optional zero-terminated array of frequencies in
434214734Srpaulo	 * megahertz (MHz) to allow for selecting the BSS. If set, scan results
435214734Srpaulo	 * that do not match any of the specified frequencies are not
436214734Srpaulo	 * considered when selecting a BSS.
437214734Srpaulo	 */
438214734Srpaulo	int *freq_list;
439252726Srpaulo
440252726Srpaulo	/**
441252726Srpaulo	 * p2p_client_list - List of P2P Clients in a persistent group (GO)
442252726Srpaulo	 *
443252726Srpaulo	 * This is a list of P2P Clients (P2P Device Address) that have joined
444252726Srpaulo	 * the persistent group. This is maintained on the GO for persistent
445252726Srpaulo	 * group entries (disabled == 2).
446252726Srpaulo	 */
447252726Srpaulo	u8 *p2p_client_list;
448252726Srpaulo
449252726Srpaulo	/**
450252726Srpaulo	 * num_p2p_clients - Number of entries in p2p_client_list
451252726Srpaulo	 */
452252726Srpaulo	size_t num_p2p_clients;
453252726Srpaulo
454252726Srpaulo#ifndef P2P_MAX_STORED_CLIENTS
455252726Srpaulo#define P2P_MAX_STORED_CLIENTS 100
456252726Srpaulo#endif /* P2P_MAX_STORED_CLIENTS */
457252726Srpaulo
458252726Srpaulo	/**
459252726Srpaulo	 * p2p_group - Network generated as a P2P group (used internally)
460252726Srpaulo	 */
461252726Srpaulo	int p2p_group;
462252726Srpaulo
463252726Srpaulo	/**
464252726Srpaulo	 * p2p_persistent_group - Whether this is a persistent group
465252726Srpaulo	 */
466252726Srpaulo	int p2p_persistent_group;
467252726Srpaulo
468252726Srpaulo	/**
469252726Srpaulo	 * temporary - Whether this network is temporary and not to be saved
470252726Srpaulo	 */
471252726Srpaulo	int temporary;
472252726Srpaulo
473252726Srpaulo	/**
474252726Srpaulo	 * export_keys - Whether keys may be exported
475252726Srpaulo	 *
476252726Srpaulo	 * This attribute will be set when keys are determined through
477252726Srpaulo	 * WPS or similar so that they may be exported.
478252726Srpaulo	 */
479252726Srpaulo	int export_keys;
480252726Srpaulo
481252726Srpaulo#ifdef CONFIG_HT_OVERRIDES
482252726Srpaulo	/**
483252726Srpaulo	 * disable_ht - Disable HT (IEEE 802.11n) for this network
484252726Srpaulo	 *
485252726Srpaulo	 * By default, use it if it is available, but this can be configured
486252726Srpaulo	 * to 1 to have it disabled.
487252726Srpaulo	 */
488252726Srpaulo	int disable_ht;
489252726Srpaulo
490252726Srpaulo	/**
491252726Srpaulo	 * disable_ht40 - Disable HT40 for this network
492252726Srpaulo	 *
493252726Srpaulo	 * By default, use it if it is available, but this can be configured
494252726Srpaulo	 * to 1 to have it disabled.
495252726Srpaulo	 */
496252726Srpaulo	int disable_ht40;
497252726Srpaulo
498252726Srpaulo	/**
499252726Srpaulo	 * disable_sgi - Disable SGI (Short Guard Interval) for this network
500252726Srpaulo	 *
501252726Srpaulo	 * By default, use it if it is available, but this can be configured
502252726Srpaulo	 * to 1 to have it disabled.
503252726Srpaulo	 */
504252726Srpaulo	int disable_sgi;
505252726Srpaulo
506252726Srpaulo	/**
507252726Srpaulo	 * disable_max_amsdu - Disable MAX A-MSDU
508252726Srpaulo	 *
509252726Srpaulo	 * A-MDSU will be 3839 bytes when disabled, or 7935
510252726Srpaulo	 * when enabled (assuming it is otherwise supported)
511252726Srpaulo	 * -1 (default) means do not apply any settings to the kernel.
512252726Srpaulo	 */
513252726Srpaulo	int disable_max_amsdu;
514252726Srpaulo
515252726Srpaulo	/**
516252726Srpaulo	 * ampdu_factor - Maximum A-MPDU Length Exponent
517252726Srpaulo	 *
518252726Srpaulo	 * Value: 0-3, see 7.3.2.56.3 in IEEE Std 802.11n-2009.
519252726Srpaulo	 */
520252726Srpaulo	int ampdu_factor;
521252726Srpaulo
522252726Srpaulo	/**
523252726Srpaulo	 * ampdu_density - Minimum A-MPDU Start Spacing
524252726Srpaulo	 *
525252726Srpaulo	 * Value: 0-7, see 7.3.2.56.3 in IEEE Std 802.11n-2009.
526252726Srpaulo	 */
527252726Srpaulo	int ampdu_density;
528252726Srpaulo
529252726Srpaulo	/**
530252726Srpaulo	 * ht_mcs - Allowed HT-MCS rates, in ASCII hex: ffff0000...
531252726Srpaulo	 *
532252726Srpaulo	 * By default (empty string): Use whatever the OS has configured.
533252726Srpaulo	 */
534252726Srpaulo	char *ht_mcs;
535252726Srpaulo#endif /* CONFIG_HT_OVERRIDES */
536252726Srpaulo
537252726Srpaulo	/**
538252726Srpaulo	 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
539252726Srpaulo	 *
540252726Srpaulo	 * This timeout value is used in AP mode to clean up inactive stations.
541252726Srpaulo	 * By default: 300 seconds.
542252726Srpaulo	 */
543252726Srpaulo	int ap_max_inactivity;
544252726Srpaulo
545252726Srpaulo	/**
546252726Srpaulo	 * dtim_period - DTIM period in Beacon intervals
547252726Srpaulo	 * By default: 2
548252726Srpaulo	 */
549252726Srpaulo	int dtim_period;
550252726Srpaulo
551252726Srpaulo	/**
552252726Srpaulo	 * auth_failures - Number of consecutive authentication failures
553252726Srpaulo	 */
554252726Srpaulo	unsigned int auth_failures;
555252726Srpaulo
556252726Srpaulo	/**
557252726Srpaulo	 * disabled_until - Network block disabled until this time if non-zero
558252726Srpaulo	 */
559252726Srpaulo	struct os_time disabled_until;
560252726Srpaulo
561252726Srpaulo	/**
562252726Srpaulo	 * parent_cred - Pointer to parent wpa_cred entry
563252726Srpaulo	 *
564252726Srpaulo	 * This pointer can be used to delete temporary networks when a wpa_cred
565252726Srpaulo	 * that was used to create them is removed. This pointer should not be
566252726Srpaulo	 * dereferences since it may not be updated in all cases.
567252726Srpaulo	 */
568252726Srpaulo	void *parent_cred;
569189251Ssam};
570189251Ssam
571189251Ssam#endif /* CONFIG_SSID_H */
572