18dbcf02cSchristos /*
28dbcf02cSchristos  * wpa_supplicant - Internal definitions
336d97821Schristos  * Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi>
48dbcf02cSchristos  *
562a52023Schristos  * This software may be distributed under the terms of the BSD license.
662a52023Schristos  * See README for more details.
78dbcf02cSchristos  */
88dbcf02cSchristos 
98dbcf02cSchristos #ifndef WPA_SUPPLICANT_I_H
108dbcf02cSchristos #define WPA_SUPPLICANT_I_H
118dbcf02cSchristos 
12264891a8Schristos #include "utils/bitfield.h"
138dbcf02cSchristos #include "utils/list.h"
148dbcf02cSchristos #include "common/defs.h"
1536d97821Schristos #include "common/sae.h"
1636d97821Schristos #include "common/wpa_ctrl.h"
1736d97821Schristos #include "wps/wps_defs.h"
1842669be3Schristos #include "config_ssid.h"
199a53cbbeSchristos #include "wmm_ac.h"
208dbcf02cSchristos 
218d355d6fSchristos extern const char *const wpa_supplicant_version;
228d355d6fSchristos extern const char *const wpa_supplicant_license;
238dbcf02cSchristos #ifndef CONFIG_NO_STDOUT_DEBUG
248d355d6fSchristos extern const char *const wpa_supplicant_full_license1;
258d355d6fSchristos extern const char *const wpa_supplicant_full_license2;
268d355d6fSchristos extern const char *const wpa_supplicant_full_license3;
278d355d6fSchristos extern const char *const wpa_supplicant_full_license4;
288d355d6fSchristos extern const char *const wpa_supplicant_full_license5;
298dbcf02cSchristos #endif /* CONFIG_NO_STDOUT_DEBUG */
308dbcf02cSchristos 
318dbcf02cSchristos struct wpa_sm;
328dbcf02cSchristos struct wpa_supplicant;
338dbcf02cSchristos struct ibss_rsn;
348dbcf02cSchristos struct scan_info;
358dbcf02cSchristos struct wpa_bss;
368dbcf02cSchristos struct wpa_scan_results;
3742669be3Schristos struct hostapd_hw_modes;
3862a52023Schristos struct wpa_driver_associate_params;
398dbcf02cSchristos 
408dbcf02cSchristos /*
418dbcf02cSchristos  * Forward declarations of private structures used within the ctrl_iface
428dbcf02cSchristos  * backends. Other parts of wpa_supplicant do not have access to data stored in
438dbcf02cSchristos  * these structures.
448dbcf02cSchristos  */
458dbcf02cSchristos struct ctrl_iface_priv;
468dbcf02cSchristos struct ctrl_iface_global_priv;
478dbcf02cSchristos struct wpas_dbus_priv;
488d355d6fSchristos struct wpas_binder_priv;
498dbcf02cSchristos 
508dbcf02cSchristos /**
518dbcf02cSchristos  * struct wpa_interface - Parameters for wpa_supplicant_add_iface()
528dbcf02cSchristos  */
538dbcf02cSchristos struct wpa_interface {
548dbcf02cSchristos 	/**
558dbcf02cSchristos 	 * confname - Configuration name (file or profile) name
568dbcf02cSchristos 	 *
578dbcf02cSchristos 	 * This can also be %NULL when a configuration file is not used. In
588dbcf02cSchristos 	 * that case, ctrl_interface must be set to allow the interface to be
598dbcf02cSchristos 	 * configured.
608dbcf02cSchristos 	 */
618dbcf02cSchristos 	const char *confname;
628dbcf02cSchristos 
638dbcf02cSchristos 	/**
6436d97821Schristos 	 * confanother - Additional configuration name (file or profile) name
6536d97821Schristos 	 *
6636d97821Schristos 	 * This can also be %NULL when the additional configuration file is not
6736d97821Schristos 	 * used.
6836d97821Schristos 	 */
6936d97821Schristos 	const char *confanother;
7036d97821Schristos 
7136d97821Schristos 	/**
728dbcf02cSchristos 	 * ctrl_interface - Control interface parameter
738dbcf02cSchristos 	 *
748dbcf02cSchristos 	 * If a configuration file is not used, this variable can be used to
758dbcf02cSchristos 	 * set the ctrl_interface parameter that would have otherwise been read
768dbcf02cSchristos 	 * from the configuration file. If both confname and ctrl_interface are
778dbcf02cSchristos 	 * set, ctrl_interface is used to override the value from configuration
788dbcf02cSchristos 	 * file.
798dbcf02cSchristos 	 */
808dbcf02cSchristos 	const char *ctrl_interface;
818dbcf02cSchristos 
828dbcf02cSchristos 	/**
838dbcf02cSchristos 	 * driver - Driver interface name, or %NULL to use the default driver
848dbcf02cSchristos 	 */
858dbcf02cSchristos 	const char *driver;
868dbcf02cSchristos 
878dbcf02cSchristos 	/**
888dbcf02cSchristos 	 * driver_param - Driver interface parameters
898dbcf02cSchristos 	 *
908dbcf02cSchristos 	 * If a configuration file is not used, this variable can be used to
918dbcf02cSchristos 	 * set the driver_param parameters that would have otherwise been read
928dbcf02cSchristos 	 * from the configuration file. If both confname and driver_param are
938dbcf02cSchristos 	 * set, driver_param is used to override the value from configuration
948dbcf02cSchristos 	 * file.
958dbcf02cSchristos 	 */
968dbcf02cSchristos 	const char *driver_param;
978dbcf02cSchristos 
988dbcf02cSchristos 	/**
998dbcf02cSchristos 	 * ifname - Interface name
1008dbcf02cSchristos 	 */
1018dbcf02cSchristos 	const char *ifname;
1028dbcf02cSchristos 
1038dbcf02cSchristos 	/**
1048dbcf02cSchristos 	 * bridge_ifname - Optional bridge interface name
1058dbcf02cSchristos 	 *
1068dbcf02cSchristos 	 * If the driver interface (ifname) is included in a Linux bridge
1078dbcf02cSchristos 	 * device, the bridge interface may need to be used for receiving EAPOL
1088dbcf02cSchristos 	 * frames. This can be enabled by setting this variable to enable
1098dbcf02cSchristos 	 * receiving of EAPOL frames from an additional interface.
1108dbcf02cSchristos 	 */
1118dbcf02cSchristos 	const char *bridge_ifname;
11236d97821Schristos 
11336d97821Schristos 	/**
11436d97821Schristos 	 * p2p_mgmt - Interface used for P2P management (P2P Device operations)
11536d97821Schristos 	 *
11636d97821Schristos 	 * Indicates whether wpas_p2p_init() must be called for this interface.
11736d97821Schristos 	 * This is used only when the driver supports a dedicated P2P Device
11836d97821Schristos 	 * interface that is not a network interface.
11936d97821Schristos 	 */
12036d97821Schristos 	int p2p_mgmt;
12173e2f556Sroy 
12273e2f556Sroy #ifdef CONFIG_MATCH_IFACE
12373e2f556Sroy 	/**
12473e2f556Sroy 	 * matched - Interface was matched rather than specified
12573e2f556Sroy 	 *
12673e2f556Sroy 	 */
12773e2f556Sroy 	int matched;
12873e2f556Sroy #define WPA_IFACE_NOTMATCHED	0
12973e2f556Sroy #define WPA_IFACE_MATCHEDNULL	1
13073e2f556Sroy #define WPA_IFACE_MATCHED	2
13173e2f556Sroy #endif /* CONFIG_MATCH_IFACE */
1328dbcf02cSchristos };
1338dbcf02cSchristos 
1348dbcf02cSchristos /**
1358dbcf02cSchristos  * struct wpa_params - Parameters for wpa_supplicant_init()
1368dbcf02cSchristos  */
1378dbcf02cSchristos struct wpa_params {
1388dbcf02cSchristos 	/**
1398dbcf02cSchristos 	 * daemonize - Run %wpa_supplicant in the background
1408dbcf02cSchristos 	 */
1418dbcf02cSchristos 	int daemonize;
1428dbcf02cSchristos 
1438dbcf02cSchristos 	/**
1448dbcf02cSchristos 	 * wait_for_monitor - Wait for a monitor program before starting
1458dbcf02cSchristos 	 */
1468dbcf02cSchristos 	int wait_for_monitor;
1478dbcf02cSchristos 
1488dbcf02cSchristos 	/**
1498dbcf02cSchristos 	 * pid_file - Path to a PID (process ID) file
1508dbcf02cSchristos 	 *
1518dbcf02cSchristos 	 * If this and daemonize are set, process ID of the background process
1528dbcf02cSchristos 	 * will be written to the specified file.
1538dbcf02cSchristos 	 */
1548dbcf02cSchristos 	char *pid_file;
1558dbcf02cSchristos 
1568dbcf02cSchristos 	/**
1578dbcf02cSchristos 	 * wpa_debug_level - Debugging verbosity level (e.g., MSG_INFO)
1588dbcf02cSchristos 	 */
1598dbcf02cSchristos 	int wpa_debug_level;
1608dbcf02cSchristos 
1618dbcf02cSchristos 	/**
1628dbcf02cSchristos 	 * wpa_debug_show_keys - Whether keying material is included in debug
1638dbcf02cSchristos 	 *
1648dbcf02cSchristos 	 * This parameter can be used to allow keying material to be included
1658dbcf02cSchristos 	 * in debug messages. This is a security risk and this option should
1668dbcf02cSchristos 	 * not be enabled in normal configuration. If needed during
1678dbcf02cSchristos 	 * development or while troubleshooting, this option can provide more
1688dbcf02cSchristos 	 * details for figuring out what is happening.
1698dbcf02cSchristos 	 */
1708dbcf02cSchristos 	int wpa_debug_show_keys;
1718dbcf02cSchristos 
1728dbcf02cSchristos 	/**
1738dbcf02cSchristos 	 * wpa_debug_timestamp - Whether to include timestamp in debug messages
1748dbcf02cSchristos 	 */
1758dbcf02cSchristos 	int wpa_debug_timestamp;
1768dbcf02cSchristos 
1778dbcf02cSchristos 	/**
1788dbcf02cSchristos 	 * ctrl_interface - Global ctrl_iface path/parameter
1798dbcf02cSchristos 	 */
1808dbcf02cSchristos 	char *ctrl_interface;
1818dbcf02cSchristos 
1828dbcf02cSchristos 	/**
18336d97821Schristos 	 * ctrl_interface_group - Global ctrl_iface group
18436d97821Schristos 	 */
18536d97821Schristos 	char *ctrl_interface_group;
18636d97821Schristos 
18736d97821Schristos 	/**
1888dbcf02cSchristos 	 * dbus_ctrl_interface - Enable the DBus control interface
1898dbcf02cSchristos 	 */
1908dbcf02cSchristos 	int dbus_ctrl_interface;
1918dbcf02cSchristos 
1928dbcf02cSchristos 	/**
1938dbcf02cSchristos 	 * wpa_debug_file_path - Path of debug file or %NULL to use stdout
1948dbcf02cSchristos 	 */
1958dbcf02cSchristos 	const char *wpa_debug_file_path;
1968dbcf02cSchristos 
1978dbcf02cSchristos 	/**
1988dbcf02cSchristos 	 * wpa_debug_syslog - Enable log output through syslog
1998dbcf02cSchristos 	 */
2008dbcf02cSchristos 	int wpa_debug_syslog;
2018dbcf02cSchristos 
2028dbcf02cSchristos 	/**
20362a52023Schristos 	 * wpa_debug_tracing - Enable log output through Linux tracing
20462a52023Schristos 	 */
20562a52023Schristos 	int wpa_debug_tracing;
20662a52023Schristos 
20762a52023Schristos 	/**
2088dbcf02cSchristos 	 * override_driver - Optional driver parameter override
2098dbcf02cSchristos 	 *
2108dbcf02cSchristos 	 * This parameter can be used to override the driver parameter in
2118dbcf02cSchristos 	 * dynamic interface addition to force a specific driver wrapper to be
2128dbcf02cSchristos 	 * used instead.
2138dbcf02cSchristos 	 */
2148dbcf02cSchristos 	char *override_driver;
2158dbcf02cSchristos 
2168dbcf02cSchristos 	/**
2178dbcf02cSchristos 	 * override_ctrl_interface - Optional ctrl_interface override
2188dbcf02cSchristos 	 *
2198dbcf02cSchristos 	 * This parameter can be used to override the ctrl_interface parameter
2208dbcf02cSchristos 	 * in dynamic interface addition to force a control interface to be
2218dbcf02cSchristos 	 * created.
2228dbcf02cSchristos 	 */
2238dbcf02cSchristos 	char *override_ctrl_interface;
22442669be3Schristos 
22542669be3Schristos 	/**
22642669be3Schristos 	 * entropy_file - Optional entropy file
22742669be3Schristos 	 *
22842669be3Schristos 	 * This parameter can be used to configure wpa_supplicant to maintain
22942669be3Schristos 	 * its internal entropy store over restarts.
23042669be3Schristos 	 */
23142669be3Schristos 	char *entropy_file;
2326855b8beSroy 
2338d355d6fSchristos #ifdef CONFIG_P2P
2348d355d6fSchristos 	/**
2358d355d6fSchristos 	 * conf_p2p_dev - Configuration file used to hold the
2368d355d6fSchristos 	 * P2P Device configuration parameters.
2378d355d6fSchristos 	 *
2388d355d6fSchristos 	 * This can also be %NULL. In such a case, if a P2P Device dedicated
2398d355d6fSchristos 	 * interfaces is created, the main configuration file will be used.
2408d355d6fSchristos 	 */
2418d355d6fSchristos 	char *conf_p2p_dev;
2428d355d6fSchristos #endif /* CONFIG_P2P */
2438d355d6fSchristos 
2446855b8beSroy #ifdef CONFIG_MATCH_IFACE
2456855b8beSroy 	/**
2466855b8beSroy 	 * match_ifaces - Interface descriptions to match
2476855b8beSroy 	 */
2486855b8beSroy 	struct wpa_interface *match_ifaces;
2496855b8beSroy 
2506855b8beSroy 	/**
2516855b8beSroy 	 * match_iface_count - Number of defined matching interfaces
2526855b8beSroy 	 */
2536855b8beSroy 	int match_iface_count;
2546855b8beSroy #endif /* CONFIG_MATCH_IFACE */
25542669be3Schristos };
25642669be3Schristos 
25742669be3Schristos struct p2p_srv_bonjour {
25842669be3Schristos 	struct dl_list list;
25942669be3Schristos 	struct wpabuf *query;
26042669be3Schristos 	struct wpabuf *resp;
26142669be3Schristos };
26242669be3Schristos 
26342669be3Schristos struct p2p_srv_upnp {
26442669be3Schristos 	struct dl_list list;
26542669be3Schristos 	u8 version;
26642669be3Schristos 	char *service;
2678dbcf02cSchristos };
2688dbcf02cSchristos 
2698dbcf02cSchristos /**
2708dbcf02cSchristos  * struct wpa_global - Internal, global data for all %wpa_supplicant interfaces
2718dbcf02cSchristos  *
2728dbcf02cSchristos  * This structure is initialized by calling wpa_supplicant_init() when starting
2738dbcf02cSchristos  * %wpa_supplicant.
2748dbcf02cSchristos  */
2758dbcf02cSchristos struct wpa_global {
2768dbcf02cSchristos 	struct wpa_supplicant *ifaces;
2778dbcf02cSchristos 	struct wpa_params params;
2788dbcf02cSchristos 	struct ctrl_iface_global_priv *ctrl_iface;
2798dbcf02cSchristos 	struct wpas_dbus_priv *dbus;
2808d355d6fSchristos 	struct wpas_binder_priv *binder;
2818dbcf02cSchristos 	void **drv_priv;
2828dbcf02cSchristos 	size_t drv_count;
2838dbcf02cSchristos 	struct os_time suspend_time;
28442669be3Schristos 	struct p2p_data *p2p;
28521a80aedSadam 	struct wpa_supplicant *p2p_init_wpa_s;
28642669be3Schristos 	struct wpa_supplicant *p2p_group_formation;
28736d97821Schristos 	struct wpa_supplicant *p2p_invite_group;
28842669be3Schristos 	u8 p2p_dev_addr[ETH_ALEN];
28936d97821Schristos 	struct os_reltime p2p_go_wait_client;
29042669be3Schristos 	struct dl_list p2p_srv_bonjour; /* struct p2p_srv_bonjour */
29142669be3Schristos 	struct dl_list p2p_srv_upnp; /* struct p2p_srv_upnp */
29242669be3Schristos 	int p2p_disabled;
29342669be3Schristos 	int cross_connection;
29436d97821Schristos 	struct wpa_freq_range_list p2p_disallow_freq;
29536d97821Schristos 	struct wpa_freq_range_list p2p_go_avoid_freq;
29662a52023Schristos 	enum wpa_conc_pref {
29762a52023Schristos 		WPA_CONC_PREF_NOT_SET,
29862a52023Schristos 		WPA_CONC_PREF_STA,
29962a52023Schristos 		WPA_CONC_PREF_P2P
30062a52023Schristos 	} conc_pref;
30136d97821Schristos 	unsigned int p2p_per_sta_psk:1;
30236d97821Schristos 	unsigned int p2p_fail_on_wps_complete:1;
3039a53cbbeSchristos 	unsigned int p2p_24ghz_social_channels:1;
3049a53cbbeSchristos 	unsigned int pending_p2ps_group:1;
3059a53cbbeSchristos 	unsigned int pending_group_iface_for_p2ps:1;
3068d355d6fSchristos 	unsigned int pending_p2ps_group_freq;
30762a52023Schristos 
30862a52023Schristos #ifdef CONFIG_WIFI_DISPLAY
30962a52023Schristos 	int wifi_display;
310264891a8Schristos #define MAX_WFD_SUBELEMS 12
31162a52023Schristos 	struct wpabuf *wfd_subelem[MAX_WFD_SUBELEMS];
31262a52023Schristos #endif /* CONFIG_WIFI_DISPLAY */
31336d97821Schristos 
31436d97821Schristos 	struct psk_list_entry *add_psk; /* From group formation */
3158dbcf02cSchristos };
3168dbcf02cSchristos 
3178dbcf02cSchristos 
31862a52023Schristos /**
31936d97821Schristos  * struct wpa_radio - Internal data for per-radio information
32036d97821Schristos  *
32136d97821Schristos  * This structure is used to share data about configured interfaces
32236d97821Schristos  * (struct wpa_supplicant) that share the same physical radio, e.g., to allow
32336d97821Schristos  * better coordination of offchannel operations.
32436d97821Schristos  */
32536d97821Schristos struct wpa_radio {
32636d97821Schristos 	char name[16]; /* from driver_ops get_radio_name() or empty if not
32736d97821Schristos 			* available */
3289a53cbbeSchristos 	unsigned int external_scan_running:1;
3298d355d6fSchristos 	unsigned int num_active_works;
33036d97821Schristos 	struct dl_list ifaces; /* struct wpa_supplicant::radio_list entries */
33136d97821Schristos 	struct dl_list work; /* struct wpa_radio_work::list entries */
33236d97821Schristos };
33336d97821Schristos 
3348d355d6fSchristos #define MAX_ACTIVE_WORKS 2
3358d355d6fSchristos 
3368d355d6fSchristos 
33736d97821Schristos /**
33836d97821Schristos  * struct wpa_radio_work - Radio work item
33936d97821Schristos  */
34036d97821Schristos struct wpa_radio_work {
34136d97821Schristos 	struct dl_list list;
34236d97821Schristos 	unsigned int freq; /* known frequency (MHz) or 0 for multiple/unknown */
34336d97821Schristos 	const char *type;
34436d97821Schristos 	struct wpa_supplicant *wpa_s;
34536d97821Schristos 	void (*cb)(struct wpa_radio_work *work, int deinit);
34636d97821Schristos 	void *ctx;
34736d97821Schristos 	unsigned int started:1;
34836d97821Schristos 	struct os_reltime time;
3498d355d6fSchristos 	unsigned int bands;
35036d97821Schristos };
35136d97821Schristos 
35236d97821Schristos int radio_add_work(struct wpa_supplicant *wpa_s, unsigned int freq,
35336d97821Schristos 		   const char *type, int next,
35436d97821Schristos 		   void (*cb)(struct wpa_radio_work *work, int deinit),
35536d97821Schristos 		   void *ctx);
35636d97821Schristos void radio_work_done(struct wpa_radio_work *work);
35736d97821Schristos void radio_remove_works(struct wpa_supplicant *wpa_s,
35836d97821Schristos 			const char *type, int remove_all);
359264891a8Schristos void radio_remove_pending_work(struct wpa_supplicant *wpa_s, void *ctx);
36036d97821Schristos void radio_work_check_next(struct wpa_supplicant *wpa_s);
3619a53cbbeSchristos struct wpa_radio_work *
3629a53cbbeSchristos radio_work_pending(struct wpa_supplicant *wpa_s, const char *type);
36336d97821Schristos 
36436d97821Schristos struct wpa_connect_work {
36536d97821Schristos 	unsigned int sme:1;
3669a53cbbeSchristos 	unsigned int bss_removed:1;
36736d97821Schristos 	struct wpa_bss *bss;
36836d97821Schristos 	struct wpa_ssid *ssid;
36936d97821Schristos };
37036d97821Schristos 
37136d97821Schristos int wpas_valid_bss_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *test_bss,
37236d97821Schristos 			struct wpa_ssid *test_ssid);
37336d97821Schristos void wpas_connect_work_free(struct wpa_connect_work *cwork);
37436d97821Schristos void wpas_connect_work_done(struct wpa_supplicant *wpa_s);
37536d97821Schristos 
37636d97821Schristos struct wpa_external_work {
37736d97821Schristos 	unsigned int id;
37836d97821Schristos 	char type[100];
37936d97821Schristos 	unsigned int timeout;
38036d97821Schristos };
38136d97821Schristos 
3828d355d6fSchristos enum wpa_radio_work_band wpas_freq_to_band(int freq);
3838d355d6fSchristos unsigned int wpas_get_bands(struct wpa_supplicant *wpa_s, const int *freqs);
3848d355d6fSchristos 
38536d97821Schristos /**
38662a52023Schristos  * offchannel_send_action_result - Result of offchannel send Action frame
38762a52023Schristos  */
38842669be3Schristos enum offchannel_send_action_result {
38962a52023Schristos 	OFFCHANNEL_SEND_ACTION_SUCCESS /**< Frame was send and acknowledged */,
39062a52023Schristos 	OFFCHANNEL_SEND_ACTION_NO_ACK /**< Frame was sent, but not acknowledged
39142669be3Schristos 				       */,
39262a52023Schristos 	OFFCHANNEL_SEND_ACTION_FAILED /**< Frame was not sent due to a failure
39362a52023Schristos 				       */
39462a52023Schristos };
39562a52023Schristos 
39662a52023Schristos struct wps_ap_info {
39762a52023Schristos 	u8 bssid[ETH_ALEN];
39862a52023Schristos 	enum wps_ap_info_type {
39962a52023Schristos 		WPS_AP_NOT_SEL_REG,
40062a52023Schristos 		WPS_AP_SEL_REG,
40162a52023Schristos 		WPS_AP_SEL_REG_OUR
40262a52023Schristos 	} type;
40362a52023Schristos 	unsigned int tries;
40436d97821Schristos 	struct os_reltime last_attempt;
4058d355d6fSchristos 	unsigned int pbc_active;
4068d355d6fSchristos 	u8 uuid[WPS_UUID_LEN];
4078dbcf02cSchristos };
4088dbcf02cSchristos 
40936d97821Schristos #define WPA_FREQ_USED_BY_INFRA_STATION BIT(0)
41036d97821Schristos #define WPA_FREQ_USED_BY_P2P_CLIENT BIT(1)
41136d97821Schristos 
41236d97821Schristos struct wpa_used_freq_data {
41336d97821Schristos 	int freq;
41436d97821Schristos 	unsigned int flags;
41536d97821Schristos };
41636d97821Schristos 
4179a53cbbeSchristos #define RRM_NEIGHBOR_REPORT_TIMEOUT 1 /* 1 second for AP to send a report */
4189a53cbbeSchristos 
4199a53cbbeSchristos /*
4209a53cbbeSchristos  * struct rrm_data - Data used for managing RRM features
4219a53cbbeSchristos  */
4229a53cbbeSchristos struct rrm_data {
4239a53cbbeSchristos 	/* rrm_used - indication regarding the current connection */
4249a53cbbeSchristos 	unsigned int rrm_used:1;
4259a53cbbeSchristos 
4269a53cbbeSchristos 	/*
4279a53cbbeSchristos 	 * notify_neighbor_rep - Callback for notifying report requester
4289a53cbbeSchristos 	 */
4299a53cbbeSchristos 	void (*notify_neighbor_rep)(void *ctx, struct wpabuf *neighbor_rep);
4309a53cbbeSchristos 
4319a53cbbeSchristos 	/*
4329a53cbbeSchristos 	 * neighbor_rep_cb_ctx - Callback context
4339a53cbbeSchristos 	 * Received in the callback registration, and sent to the callback
4349a53cbbeSchristos 	 * function as a parameter.
4359a53cbbeSchristos 	 */
4369a53cbbeSchristos 	void *neighbor_rep_cb_ctx;
4379a53cbbeSchristos 
4389a53cbbeSchristos 	/* next_neighbor_rep_token - Next request's dialog token */
4399a53cbbeSchristos 	u8 next_neighbor_rep_token;
440264891a8Schristos 
441264891a8Schristos 	/* token - Dialog token of the current radio measurement */
442264891a8Schristos 	u8 token;
443264891a8Schristos 
444264891a8Schristos 	/* destination address of the current radio measurement request */
445264891a8Schristos 	u8 dst_addr[ETH_ALEN];
4469a53cbbeSchristos };
4479a53cbbeSchristos 
4489a53cbbeSchristos enum wpa_supplicant_test_failure {
4499a53cbbeSchristos 	WPAS_TEST_FAILURE_NONE,
4509a53cbbeSchristos 	WPAS_TEST_FAILURE_SCAN_TRIGGER,
4519a53cbbeSchristos };
4529a53cbbeSchristos 
4538d355d6fSchristos struct icon_entry {
4548d355d6fSchristos 	struct dl_list list;
4558d355d6fSchristos 	u8 bssid[ETH_ALEN];
4568d355d6fSchristos 	u8 dialog_token;
4578d355d6fSchristos 	char *file_name;
4588d355d6fSchristos 	u8 *image;
4598d355d6fSchristos 	size_t image_len;
4608d355d6fSchristos };
4618d355d6fSchristos 
4628d355d6fSchristos struct wpa_bss_tmp_disallowed {
4638d355d6fSchristos 	struct dl_list list;
4648d355d6fSchristos 	u8 bssid[ETH_ALEN];
465*0dddab58Schristos 	int rssi_threshold;
466264891a8Schristos };
467264891a8Schristos 
468264891a8Schristos struct beacon_rep_data {
469264891a8Schristos 	u8 token;
470*0dddab58Schristos 	u8 last_indication;
471264891a8Schristos 	struct wpa_driver_scan_params scan_params;
472264891a8Schristos 	u8 ssid[SSID_MAX_LEN];
473264891a8Schristos 	size_t ssid_len;
474264891a8Schristos 	u8 bssid[ETH_ALEN];
475264891a8Schristos 	enum beacon_report_detail report_detail;
476264891a8Schristos 	struct bitfield *eids;
477264891a8Schristos };
478264891a8Schristos 
479264891a8Schristos 
480264891a8Schristos struct external_pmksa_cache {
481264891a8Schristos 	struct dl_list list;
482264891a8Schristos 	void *pmksa_cache;
483264891a8Schristos };
484264891a8Schristos 
485264891a8Schristos struct fils_hlp_req {
486264891a8Schristos 	struct dl_list list;
487264891a8Schristos 	u8 dst[ETH_ALEN];
488264891a8Schristos 	struct wpabuf *pkt;
4898d355d6fSchristos };
4908d355d6fSchristos 
4918dbcf02cSchristos /**
4928dbcf02cSchristos  * struct wpa_supplicant - Internal data for wpa_supplicant interface
4938dbcf02cSchristos  *
4948dbcf02cSchristos  * This structure contains the internal data for core wpa_supplicant code. This
4958dbcf02cSchristos  * should be only used directly from the core code. However, a pointer to this
4968dbcf02cSchristos  * data is used from other files as an arbitrary context pointer in calls to
4978dbcf02cSchristos  * core functions.
4988dbcf02cSchristos  */
4998dbcf02cSchristos struct wpa_supplicant {
5008dbcf02cSchristos 	struct wpa_global *global;
50136d97821Schristos 	struct wpa_radio *radio; /* shared radio context */
50236d97821Schristos 	struct dl_list radio_list; /* list head: struct wpa_radio::ifaces */
50342669be3Schristos 	struct wpa_supplicant *parent;
5048d355d6fSchristos 	struct wpa_supplicant *p2pdev;
5058dbcf02cSchristos 	struct wpa_supplicant *next;
5068dbcf02cSchristos 	struct l2_packet_data *l2;
5078dbcf02cSchristos 	struct l2_packet_data *l2_br;
508*0dddab58Schristos 	struct os_reltime roam_start;
509*0dddab58Schristos 	struct os_reltime roam_time;
510*0dddab58Schristos 	struct os_reltime session_start;
511*0dddab58Schristos 	struct os_reltime session_length;
5128dbcf02cSchristos 	unsigned char own_addr[ETH_ALEN];
51336d97821Schristos 	unsigned char perm_addr[ETH_ALEN];
5148dbcf02cSchristos 	char ifname[100];
5156855b8beSroy #ifdef CONFIG_MATCH_IFACE
5166855b8beSroy 	int matched;
5176855b8beSroy #endif /* CONFIG_MATCH_IFACE */
5188dbcf02cSchristos #ifdef CONFIG_CTRL_IFACE_DBUS_NEW
5198dbcf02cSchristos 	char *dbus_new_path;
52042669be3Schristos 	char *dbus_groupobj_path;
52162a52023Schristos #ifdef CONFIG_AP
52262a52023Schristos 	char *preq_notify_peer;
52362a52023Schristos #endif /* CONFIG_AP */
5248dbcf02cSchristos #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
5258d355d6fSchristos #ifdef CONFIG_CTRL_IFACE_BINDER
5268d355d6fSchristos 	const void *binder_object_key;
5278d355d6fSchristos #endif /* CONFIG_CTRL_IFACE_BINDER */
5288dbcf02cSchristos 	char bridge_ifname[16];
5298dbcf02cSchristos 
5308dbcf02cSchristos 	char *confname;
53136d97821Schristos 	char *confanother;
53236d97821Schristos 
5338dbcf02cSchristos 	struct wpa_config *conf;
5348dbcf02cSchristos 	int countermeasures;
53536d97821Schristos 	struct os_reltime last_michael_mic_error;
5368dbcf02cSchristos 	u8 bssid[ETH_ALEN];
5378dbcf02cSchristos 	u8 pending_bssid[ETH_ALEN]; /* If wpa_state == WPA_ASSOCIATING, this
53842669be3Schristos 				     * field contains the target BSSID. */
5398dbcf02cSchristos 	int reassociate; /* reassociation requested */
5408d355d6fSchristos 	unsigned int reassoc_same_bss:1; /* reassociating to the same BSS */
5418d355d6fSchristos 	unsigned int reassoc_same_ess:1; /* reassociating to the same ESS */
5428dbcf02cSchristos 	int disconnected; /* all connections disabled; i.e., do no reassociate
5438dbcf02cSchristos 			   * before this has been cleared */
5448dbcf02cSchristos 	struct wpa_ssid *current_ssid;
54536d97821Schristos 	struct wpa_ssid *last_ssid;
5468dbcf02cSchristos 	struct wpa_bss *current_bss;
5478dbcf02cSchristos 	int ap_ies_from_associnfo;
5488dbcf02cSchristos 	unsigned int assoc_freq;
549264891a8Schristos 	u8 *last_con_fail_realm;
550264891a8Schristos 	size_t last_con_fail_realm_len;
5518dbcf02cSchristos 
5528dbcf02cSchristos 	/* Selected configuration (based on Beacon/ProbeResp WPA IE) */
5538dbcf02cSchristos 	int pairwise_cipher;
5548dbcf02cSchristos 	int group_cipher;
5558dbcf02cSchristos 	int key_mgmt;
55642669be3Schristos 	int wpa_proto;
5578dbcf02cSchristos 	int mgmt_group_cipher;
5588dbcf02cSchristos 
5598dbcf02cSchristos 	void *drv_priv; /* private data used by driver_ops */
5608dbcf02cSchristos 	void *global_drv_priv;
5618dbcf02cSchristos 
56262a52023Schristos 	u8 *bssid_filter;
56362a52023Schristos 	size_t bssid_filter_count;
56462a52023Schristos 
56562a52023Schristos 	u8 *disallow_aps_bssid;
56662a52023Schristos 	size_t disallow_aps_bssid_count;
56762a52023Schristos 	struct wpa_ssid_value *disallow_aps_ssid;
56862a52023Schristos 	size_t disallow_aps_ssid_count;
56962a52023Schristos 
5708d355d6fSchristos 	enum set_band setband;
57136d97821Schristos 
57236d97821Schristos 	/* Preferred network for the next connection attempt */
57336d97821Schristos 	struct wpa_ssid *next_ssid;
57436d97821Schristos 
57562a52023Schristos 	/* previous scan was wildcard when interleaving between
57662a52023Schristos 	 * wildcard scans and specific SSID scan when max_ssids=1 */
57762a52023Schristos 	int prev_scan_wildcard;
5788dbcf02cSchristos 	struct wpa_ssid *prev_scan_ssid; /* previously scanned SSID;
5798dbcf02cSchristos 					  * NULL = not yet initialized (start
5808dbcf02cSchristos 					  * with wildcard SSID)
5818dbcf02cSchristos 					  * WILDCARD_SSID_SCAN = wildcard
5828dbcf02cSchristos 					  * SSID was used in the previous scan
5838dbcf02cSchristos 					  */
5848dbcf02cSchristos #define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1)
5858dbcf02cSchristos 
58642669be3Schristos 	struct wpa_ssid *prev_sched_ssid; /* last SSID used in sched scan */
58742669be3Schristos 	int sched_scan_timeout;
58842669be3Schristos 	int first_sched_scan;
58942669be3Schristos 	int sched_scan_timed_out;
5908d355d6fSchristos 	struct sched_scan_plan *sched_scan_plans;
5918d355d6fSchristos 	size_t sched_scan_plans_num;
59242669be3Schristos 
5938dbcf02cSchristos 	void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
5948dbcf02cSchristos 				 struct wpa_scan_results *scan_res);
5958dbcf02cSchristos 	struct dl_list bss; /* struct wpa_bss::list */
5968dbcf02cSchristos 	struct dl_list bss_id; /* struct wpa_bss::list_id */
5978dbcf02cSchristos 	size_t num_bss;
5988dbcf02cSchristos 	unsigned int bss_update_idx;
5998dbcf02cSchristos 	unsigned int bss_next_id;
6008dbcf02cSchristos 
60162a52023Schristos 	 /*
60262a52023Schristos 	  * Pointers to BSS entries in the order they were in the last scan
60362a52023Schristos 	  * results.
60462a52023Schristos 	  */
60562a52023Schristos 	struct wpa_bss **last_scan_res;
60662a52023Schristos 	unsigned int last_scan_res_used;
60762a52023Schristos 	unsigned int last_scan_res_size;
60836d97821Schristos 	struct os_reltime last_scan;
60962a52023Schristos 
6108d355d6fSchristos 	const struct wpa_driver_ops *driver;
6118dbcf02cSchristos 	int interface_removed; /* whether the network interface has been
6128dbcf02cSchristos 				* removed */
6138dbcf02cSchristos 	struct wpa_sm *wpa;
6148dbcf02cSchristos 	struct eapol_sm *eapol;
6158dbcf02cSchristos 
6168dbcf02cSchristos 	struct ctrl_iface_priv *ctrl_iface;
6178dbcf02cSchristos 
6188dbcf02cSchristos 	enum wpa_states wpa_state;
61936d97821Schristos 	struct wpa_radio_work *scan_work;
6208dbcf02cSchristos 	int scanning;
62142669be3Schristos 	int sched_scanning;
6228d355d6fSchristos 	unsigned int sched_scan_stop_req:1;
6238dbcf02cSchristos 	int new_connection;
6248dbcf02cSchristos 
6258dbcf02cSchristos 	int eapol_received; /* number of EAPOL packets received after the
6268dbcf02cSchristos 			     * previous association event */
6278dbcf02cSchristos 
6288dbcf02cSchristos 	struct scard_data *scard;
62962a52023Schristos 	char imsi[20];
63062a52023Schristos 	int mnc_len;
6318dbcf02cSchristos 
6328dbcf02cSchristos 	unsigned char last_eapol_src[ETH_ALEN];
6338dbcf02cSchristos 
63436d97821Schristos 	unsigned int keys_cleared; /* bitfield of key indexes that the driver is
63536d97821Schristos 				    * known not to be configured with a key */
6368dbcf02cSchristos 
6378dbcf02cSchristos 	struct wpa_blacklist *blacklist;
6388dbcf02cSchristos 
63962a52023Schristos 	/**
64062a52023Schristos 	 * extra_blacklist_count - Sum of blacklist counts after last connection
64162a52023Schristos 	 *
64262a52023Schristos 	 * This variable is used to maintain a count of temporary blacklisting
64362a52023Schristos 	 * failures (maximum number for any BSS) over blacklist clear
64462a52023Schristos 	 * operations. This is needed for figuring out whether there has been
64562a52023Schristos 	 * failures prior to the last blacklist clear operation which happens
64662a52023Schristos 	 * whenever no other not-blacklisted BSS candidates are available. This
64762a52023Schristos 	 * gets cleared whenever a connection has been established successfully.
64862a52023Schristos 	 */
64962a52023Schristos 	int extra_blacklist_count;
65062a52023Schristos 
65162a52023Schristos 	/**
65262a52023Schristos 	 * scan_req - Type of the scan request
65362a52023Schristos 	 */
65462a52023Schristos 	enum scan_req_type {
65562a52023Schristos 		/**
65662a52023Schristos 		 * NORMAL_SCAN_REQ - Normal scan request
65762a52023Schristos 		 *
65862a52023Schristos 		 * This is used for scans initiated by wpa_supplicant to find an
65962a52023Schristos 		 * AP for a connection.
66062a52023Schristos 		 */
66162a52023Schristos 		NORMAL_SCAN_REQ,
66262a52023Schristos 
66362a52023Schristos 		/**
66462a52023Schristos 		 * INITIAL_SCAN_REQ - Initial scan request
66562a52023Schristos 		 *
66662a52023Schristos 		 * This is used for the first scan on an interface to force at
66762a52023Schristos 		 * least one scan to be run even if the configuration does not
66862a52023Schristos 		 * include any enabled networks.
66962a52023Schristos 		 */
67062a52023Schristos 		INITIAL_SCAN_REQ,
67162a52023Schristos 
67262a52023Schristos 		/**
67362a52023Schristos 		 * MANUAL_SCAN_REQ - Manual scan request
67462a52023Schristos 		 *
67562a52023Schristos 		 * This is used for scans where the user request a scan or
67662a52023Schristos 		 * a specific wpa_supplicant operation (e.g., WPS) requires scan
67762a52023Schristos 		 * to be run.
67862a52023Schristos 		 */
67962a52023Schristos 		MANUAL_SCAN_REQ
68036d97821Schristos 	} scan_req, last_scan_req;
6819a53cbbeSchristos 	enum wpa_states scan_prev_wpa_state;
68236d97821Schristos 	struct os_reltime scan_trigger_time, scan_start_time;
6838d355d6fSchristos 	/* Minimum freshness requirement for connection purposes */
6848d355d6fSchristos 	struct os_reltime scan_min_time;
6858dbcf02cSchristos 	int scan_runs; /* number of scan runs since WPS was started */
68642669be3Schristos 	int *next_scan_freqs;
687264891a8Schristos 	int *select_network_scan_freqs;
68836d97821Schristos 	int *manual_scan_freqs;
68936d97821Schristos 	int *manual_sched_scan_freqs;
69036d97821Schristos 	unsigned int manual_scan_passive:1;
69136d97821Schristos 	unsigned int manual_scan_use_id:1;
69236d97821Schristos 	unsigned int manual_scan_only_new:1;
69336d97821Schristos 	unsigned int own_scan_requested:1;
69436d97821Schristos 	unsigned int own_scan_running:1;
69536d97821Schristos 	unsigned int clear_driver_scan_cache:1;
69636d97821Schristos 	unsigned int manual_scan_id;
69742669be3Schristos 	int scan_interval; /* time in sec between scans to find suitable AP */
69862a52023Schristos 	int normal_scans; /* normal scans run before sched_scan */
69962a52023Schristos 	int scan_for_connection; /* whether the scan request was triggered for
70062a52023Schristos 				  * finding a connection */
701264891a8Schristos 	/*
702264891a8Schristos 	 * A unique cookie representing the vendor scan request. This cookie is
703264891a8Schristos 	 * returned from the driver interface. 0 indicates that there is no
704264891a8Schristos 	 * pending vendor scan request.
705264891a8Schristos 	 */
706264891a8Schristos 	u64 curr_scan_cookie;
70736d97821Schristos #define MAX_SCAN_ID 16
70836d97821Schristos 	int scan_id[MAX_SCAN_ID];
70936d97821Schristos 	unsigned int scan_id_count;
7108d355d6fSchristos 	u8 next_scan_bssid[ETH_ALEN];
7118d355d6fSchristos 
7128d355d6fSchristos 	struct wpa_ssid_value *ssids_from_scan_req;
7138d355d6fSchristos 	unsigned int num_ssids_from_scan_req;
7148dbcf02cSchristos 
7159a53cbbeSchristos 	u64 drv_flags;
71662a52023Schristos 	unsigned int drv_enc;
7179a53cbbeSchristos 	unsigned int drv_smps_modes;
7189a53cbbeSchristos 	unsigned int drv_rrm_flags;
71962a52023Schristos 
72062a52023Schristos 	/*
72162a52023Schristos 	 * A bitmap of supported protocols for probe response offload. See
72262a52023Schristos 	 * struct wpa_driver_capa in driver.h
72362a52023Schristos 	 */
72462a52023Schristos 	unsigned int probe_resp_offloads;
72562a52023Schristos 
72636d97821Schristos 	/* extended capabilities supported by the driver */
72736d97821Schristos 	const u8 *extended_capa, *extended_capa_mask;
72836d97821Schristos 	unsigned int extended_capa_len;
72936d97821Schristos 
7308dbcf02cSchristos 	int max_scan_ssids;
73142669be3Schristos 	int max_sched_scan_ssids;
7328d355d6fSchristos 	unsigned int max_sched_scan_plans;
7338d355d6fSchristos 	unsigned int max_sched_scan_plan_interval;
7348d355d6fSchristos 	unsigned int max_sched_scan_plan_iterations;
73542669be3Schristos 	int sched_scan_supported;
73642669be3Schristos 	unsigned int max_match_sets;
7378dbcf02cSchristos 	unsigned int max_remain_on_chan;
73842669be3Schristos 	unsigned int max_stations;
7398dbcf02cSchristos 
7408dbcf02cSchristos 	int pending_mic_error_report;
7418dbcf02cSchristos 	int pending_mic_error_pairwise;
7428dbcf02cSchristos 	int mic_errors_seen; /* Michael MIC errors with the current PTK */
7438dbcf02cSchristos 
7448dbcf02cSchristos 	struct wps_context *wps;
7458dbcf02cSchristos 	int wps_success; /* WPS success event received */
7468dbcf02cSchristos 	struct wps_er *wps_er;
74736d97821Schristos 	unsigned int wps_run;
7488d355d6fSchristos 	struct os_reltime wps_pin_start_time;
7498dbcf02cSchristos 	int blacklist_cleared;
7508dbcf02cSchristos 
7518dbcf02cSchristos 	struct wpabuf *pending_eapol_rx;
75236d97821Schristos 	struct os_reltime pending_eapol_rx_time;
7538dbcf02cSchristos 	u8 pending_eapol_rx_src[ETH_ALEN];
75462a52023Schristos 	unsigned int last_eapol_matches_bssid:1;
75536d97821Schristos 	unsigned int eap_expected_failure:1;
75636d97821Schristos 	unsigned int reattach:1; /* reassociation to the same BSS requested */
75736d97821Schristos 	unsigned int mac_addr_changed:1;
7588d355d6fSchristos 	unsigned int added_vif:1;
7598d355d6fSchristos 	unsigned int wnmsleep_used:1;
760264891a8Schristos 	unsigned int owe_transition_select:1;
761264891a8Schristos 	unsigned int owe_transition_search:1;
762*0dddab58Schristos 	unsigned int connection_set:1;
763*0dddab58Schristos 	unsigned int connection_ht:1;
764*0dddab58Schristos 	unsigned int connection_vht:1;
765*0dddab58Schristos 	unsigned int connection_he:1;
76636d97821Schristos 
76736d97821Schristos 	struct os_reltime last_mac_addr_change;
76836d97821Schristos 	int last_mac_addr_style;
7698dbcf02cSchristos 
7708dbcf02cSchristos 	struct ibss_rsn *ibss_rsn;
7718dbcf02cSchristos 
77242669be3Schristos 	int set_sta_uapsd;
77342669be3Schristos 	int sta_uapsd;
77442669be3Schristos 	int set_ap_uapsd;
77542669be3Schristos 	int ap_uapsd;
776264891a8Schristos 	int auth_alg;
777264891a8Schristos 	u16 last_owe_group;
77842669be3Schristos 
7798dbcf02cSchristos #ifdef CONFIG_SME
7808dbcf02cSchristos 	struct {
7818d355d6fSchristos 		u8 ssid[SSID_MAX_LEN];
7828dbcf02cSchristos 		size_t ssid_len;
7838dbcf02cSchristos 		int freq;
784264891a8Schristos 		u8 assoc_req_ie[1500];
7858dbcf02cSchristos 		size_t assoc_req_ie_len;
7868dbcf02cSchristos 		int mfp;
7878dbcf02cSchristos 		int ft_used;
7888dbcf02cSchristos 		u8 mobility_domain[2];
7898dbcf02cSchristos 		u8 *ft_ies;
7908dbcf02cSchristos 		size_t ft_ies_len;
7918dbcf02cSchristos 		u8 prev_bssid[ETH_ALEN];
7928dbcf02cSchristos 		int prev_bssid_set;
7938dbcf02cSchristos 		int auth_alg;
79442669be3Schristos 		int proto;
79542669be3Schristos 
79642669be3Schristos 		int sa_query_count; /* number of pending SA Query requests;
79742669be3Schristos 				     * 0 = no SA Query in progress */
79842669be3Schristos 		int sa_query_timed_out;
79942669be3Schristos 		u8 *sa_query_trans_id; /* buffer of WLAN_SA_QUERY_TR_ID_LEN *
80042669be3Schristos 					* sa_query_count octets of pending
80142669be3Schristos 					* SA Query transaction identifiers */
80236d97821Schristos 		struct os_reltime sa_query_start;
80336d97821Schristos 		struct os_reltime last_unprot_disconnect;
8049a53cbbeSchristos 		enum { HT_SEC_CHAN_UNKNOWN,
8059a53cbbeSchristos 		       HT_SEC_CHAN_ABOVE,
8069a53cbbeSchristos 		       HT_SEC_CHAN_BELOW } ht_sec_chan;
80762a52023Schristos 		u8 sched_obss_scan;
80862a52023Schristos 		u16 obss_scan_int;
80962a52023Schristos 		u16 bss_max_idle_period;
81036d97821Schristos #ifdef CONFIG_SAE
81136d97821Schristos 		struct sae_data sae;
81236d97821Schristos 		struct wpabuf *sae_token;
81336d97821Schristos 		int sae_group_index;
8149a53cbbeSchristos 		unsigned int sae_pmksa_caching:1;
815264891a8Schristos 		u16 seq_num;
816*0dddab58Schristos 		u8 ext_auth_bssid[ETH_ALEN];
817*0dddab58Schristos 		u8 ext_auth_ssid[SSID_MAX_LEN];
818*0dddab58Schristos 		size_t ext_auth_ssid_len;
81936d97821Schristos #endif /* CONFIG_SAE */
8208dbcf02cSchristos 	} sme;
8218dbcf02cSchristos #endif /* CONFIG_SME */
8228dbcf02cSchristos 
8238dbcf02cSchristos #ifdef CONFIG_AP
8248dbcf02cSchristos 	struct hostapd_iface *ap_iface;
8258dbcf02cSchristos 	void (*ap_configured_cb)(void *ctx, void *data);
8268dbcf02cSchristos 	void *ap_configured_cb_ctx;
8278dbcf02cSchristos 	void *ap_configured_cb_data;
8288dbcf02cSchristos #endif /* CONFIG_AP */
8298dbcf02cSchristos 
8309a53cbbeSchristos 	struct hostapd_iface *ifmsh;
8319a53cbbeSchristos #ifdef CONFIG_MESH
8329a53cbbeSchristos 	struct mesh_rsn *mesh_rsn;
8339a53cbbeSchristos 	int mesh_if_idx;
8349a53cbbeSchristos 	unsigned int mesh_if_created:1;
8359a53cbbeSchristos 	unsigned int mesh_ht_enabled:1;
8368d355d6fSchristos 	unsigned int mesh_vht_enabled:1;
837*0dddab58Schristos 	unsigned int mesh_he_enabled:1;
838*0dddab58Schristos 	struct wpa_driver_mesh_join_params *mesh_params;
839264891a8Schristos #ifdef CONFIG_PMKSA_CACHE_EXTERNAL
840264891a8Schristos 	/* struct external_pmksa_cache::list */
841264891a8Schristos 	struct dl_list mesh_external_pmksa_cache;
842264891a8Schristos #endif /* CONFIG_PMKSA_CACHE_EXTERNAL */
8439a53cbbeSchristos #endif /* CONFIG_MESH */
8449a53cbbeSchristos 
84542669be3Schristos 	unsigned int off_channel_freq;
84642669be3Schristos 	struct wpabuf *pending_action_tx;
84742669be3Schristos 	u8 pending_action_src[ETH_ALEN];
84842669be3Schristos 	u8 pending_action_dst[ETH_ALEN];
84942669be3Schristos 	u8 pending_action_bssid[ETH_ALEN];
85042669be3Schristos 	unsigned int pending_action_freq;
85142669be3Schristos 	int pending_action_no_cck;
85242669be3Schristos 	int pending_action_without_roc;
85336d97821Schristos 	unsigned int pending_action_tx_done:1;
85442669be3Schristos 	void (*pending_action_tx_status_cb)(struct wpa_supplicant *wpa_s,
85542669be3Schristos 					    unsigned int freq, const u8 *dst,
85642669be3Schristos 					    const u8 *src, const u8 *bssid,
85742669be3Schristos 					    const u8 *data, size_t data_len,
85842669be3Schristos 					    enum offchannel_send_action_result
85942669be3Schristos 					    result);
86042669be3Schristos 	unsigned int roc_waiting_drv_freq;
86142669be3Schristos 	int action_tx_wait_time;
862264891a8Schristos 	int action_tx_wait_time_used;
86342669be3Schristos 
86436d97821Schristos 	int p2p_mgmt;
86536d97821Schristos 
86642669be3Schristos #ifdef CONFIG_P2P
86742669be3Schristos 	struct p2p_go_neg_results *go_params;
86842669be3Schristos 	int create_p2p_iface;
86942669be3Schristos 	u8 pending_interface_addr[ETH_ALEN];
87042669be3Schristos 	char pending_interface_name[100];
87142669be3Schristos 	int pending_interface_type;
87242669be3Schristos 	int p2p_group_idx;
87342669be3Schristos 	unsigned int pending_listen_freq;
87442669be3Schristos 	unsigned int pending_listen_duration;
87542669be3Schristos 	enum {
87642669be3Schristos 		NOT_P2P_GROUP_INTERFACE,
87742669be3Schristos 		P2P_GROUP_INTERFACE_PENDING,
87842669be3Schristos 		P2P_GROUP_INTERFACE_GO,
87942669be3Schristos 		P2P_GROUP_INTERFACE_CLIENT
88042669be3Schristos 	} p2p_group_interface;
88142669be3Schristos 	struct p2p_group *p2p_group;
88242669be3Schristos 	int p2p_long_listen; /* remaining time in long Listen state in ms */
88342669be3Schristos 	char p2p_pin[10];
88442669be3Schristos 	int p2p_wps_method;
88542669be3Schristos 	u8 p2p_auth_invite[ETH_ALEN];
88642669be3Schristos 	int p2p_sd_over_ctrl_iface;
88742669be3Schristos 	int p2p_in_provisioning;
88836d97821Schristos 	int p2p_in_invitation;
88936d97821Schristos 	int p2p_invite_go_freq;
89042669be3Schristos 	int pending_invite_ssid_id;
89142669be3Schristos 	int show_group_started;
89242669be3Schristos 	u8 go_dev_addr[ETH_ALEN];
89342669be3Schristos 	int pending_pd_before_join;
89442669be3Schristos 	u8 pending_join_iface_addr[ETH_ALEN];
89542669be3Schristos 	u8 pending_join_dev_addr[ETH_ALEN];
89642669be3Schristos 	int pending_join_wps_method;
8978d355d6fSchristos 	u8 p2p_join_ssid[SSID_MAX_LEN];
89836d97821Schristos 	size_t p2p_join_ssid_len;
89942669be3Schristos 	int p2p_join_scan_count;
90062a52023Schristos 	int auto_pd_scan_retry;
90142669be3Schristos 	int force_long_sd;
90262a52023Schristos 	u16 pending_pd_config_methods;
90362a52023Schristos 	enum {
9049a53cbbeSchristos 		NORMAL_PD, AUTO_PD_GO_NEG, AUTO_PD_JOIN, AUTO_PD_ASP
90562a52023Schristos 	} pending_pd_use;
90642669be3Schristos 
90742669be3Schristos 	/*
90842669be3Schristos 	 * Whether cross connection is disallowed by the AP to which this
90942669be3Schristos 	 * interface is associated (only valid if there is an association).
91042669be3Schristos 	 */
91142669be3Schristos 	int cross_connect_disallowed;
91242669be3Schristos 
91342669be3Schristos 	/*
91442669be3Schristos 	 * Whether this P2P group is configured to use cross connection (only
91542669be3Schristos 	 * valid if this is P2P GO interface). The actual cross connect packet
91642669be3Schristos 	 * forwarding may not be configured depending on the uplink status.
91742669be3Schristos 	 */
91842669be3Schristos 	int cross_connect_enabled;
91942669be3Schristos 
92042669be3Schristos 	/* Whether cross connection forwarding is in use at the moment. */
92142669be3Schristos 	int cross_connect_in_use;
92242669be3Schristos 
92342669be3Schristos 	/*
92442669be3Schristos 	 * Uplink interface name for cross connection
92542669be3Schristos 	 */
92642669be3Schristos 	char cross_connect_uplink[100];
92742669be3Schristos 
92862a52023Schristos 	unsigned int p2p_auto_join:1;
92962a52023Schristos 	unsigned int p2p_auto_pd:1;
930264891a8Schristos 	unsigned int p2p_go_do_acs:1;
93162a52023Schristos 	unsigned int p2p_persistent_group:1;
93262a52023Schristos 	unsigned int p2p_fallback_to_go_neg:1;
93362a52023Schristos 	unsigned int p2p_pd_before_go_neg:1;
93462a52023Schristos 	unsigned int p2p_go_ht40:1;
93536d97821Schristos 	unsigned int p2p_go_vht:1;
936*0dddab58Schristos 	unsigned int p2p_go_he:1;
93762a52023Schristos 	unsigned int user_initiated_pd:1;
93836d97821Schristos 	unsigned int p2p_go_group_formation_completed:1;
9399a53cbbeSchristos 	unsigned int group_formation_reported:1;
94036d97821Schristos 	unsigned int waiting_presence_resp;
94136d97821Schristos 	int p2p_first_connection_timeout;
94236d97821Schristos 	unsigned int p2p_nfc_tag_enabled:1;
94336d97821Schristos 	unsigned int p2p_peer_oob_pk_hash_known:1;
94436d97821Schristos 	unsigned int p2p_disable_ip_addr_req:1;
9458d355d6fSchristos 	unsigned int p2ps_method_config_any:1;
9468d355d6fSchristos 	unsigned int p2p_cli_probe:1;
947264891a8Schristos 	enum hostapd_hw_mode p2p_go_acs_band;
94862a52023Schristos 	int p2p_persistent_go_freq;
94962a52023Schristos 	int p2p_persistent_id;
95062a52023Schristos 	int p2p_go_intent;
95162a52023Schristos 	int p2p_connect_freq;
95236d97821Schristos 	struct os_reltime p2p_auto_started;
95336d97821Schristos 	struct wpa_ssid *p2p_last_4way_hs_fail;
95436d97821Schristos 	struct wpa_radio_work *p2p_scan_work;
95536d97821Schristos 	struct wpa_radio_work *p2p_listen_work;
95636d97821Schristos 	struct wpa_radio_work *p2p_send_action_work;
95736d97821Schristos 
95836d97821Schristos 	u16 p2p_oob_dev_pw_id; /* OOB Device Password Id for group formation */
95936d97821Schristos 	struct wpabuf *p2p_oob_dev_pw; /* OOB Device Password for group
96036d97821Schristos 					* formation */
96136d97821Schristos 	u8 p2p_peer_oob_pubkey_hash[WPS_OOB_PUBKEY_HASH_LEN];
96236d97821Schristos 	u8 p2p_ip_addr_info[3 * 4];
9639a53cbbeSchristos 
9649a53cbbeSchristos 	/* group common frequencies */
9659a53cbbeSchristos 	int *p2p_group_common_freqs;
9669a53cbbeSchristos 	unsigned int p2p_group_common_freqs_num;
9679a53cbbeSchristos 	u8 p2ps_join_addr[ETH_ALEN];
9688d355d6fSchristos 
9698d355d6fSchristos 	unsigned int p2p_go_max_oper_chwidth;
9708d355d6fSchristos 	unsigned int p2p_go_vht_center_freq2;
9718d355d6fSchristos 	int p2p_lo_started;
97242669be3Schristos #endif /* CONFIG_P2P */
97342669be3Schristos 
9748dbcf02cSchristos 	struct wpa_ssid *bgscan_ssid;
9758dbcf02cSchristos 	const struct bgscan_ops *bgscan;
9768dbcf02cSchristos 	void *bgscan_priv;
9778dbcf02cSchristos 
97862a52023Schristos 	const struct autoscan_ops *autoscan;
97962a52023Schristos 	struct wpa_driver_scan_params *autoscan_params;
98062a52023Schristos 	void *autoscan_priv;
98162a52023Schristos 
98242669be3Schristos 	struct wpa_ssid *connect_without_scan;
9838dbcf02cSchristos 
98462a52023Schristos 	struct wps_ap_info *wps_ap;
98562a52023Schristos 	size_t num_wps_ap;
98662a52023Schristos 	int wps_ap_iter;
98762a52023Schristos 
9888dbcf02cSchristos 	int after_wps;
98962a52023Schristos 	int known_wps_freq;
9908dbcf02cSchristos 	unsigned int wps_freq;
99142669be3Schristos 	int wps_fragment_size;
99242669be3Schristos 	int auto_reconnect_disabled;
99342669be3Schristos 
99442669be3Schristos 	 /* Channel preferences for AP/P2P GO use */
99542669be3Schristos 	int best_24_freq;
99642669be3Schristos 	int best_5_freq;
99742669be3Schristos 	int best_overall_freq;
99842669be3Schristos 
99942669be3Schristos 	struct gas_query *gas;
1000264891a8Schristos 	struct gas_server *gas_server;
100142669be3Schristos 
100242669be3Schristos #ifdef CONFIG_INTERWORKING
100342669be3Schristos 	unsigned int fetch_anqp_in_progress:1;
100442669be3Schristos 	unsigned int network_select:1;
100542669be3Schristos 	unsigned int auto_select:1;
100662a52023Schristos 	unsigned int auto_network_select:1;
10079a53cbbeSchristos 	unsigned int interworking_fast_assoc_tried:1;
100862a52023Schristos 	unsigned int fetch_all_anqp:1;
100936d97821Schristos 	unsigned int fetch_osu_info:1;
10109a53cbbeSchristos 	unsigned int fetch_osu_waiting_scan:1;
101136d97821Schristos 	unsigned int fetch_osu_icon_in_progress:1;
101236d97821Schristos 	struct wpa_bss *interworking_gas_bss;
101336d97821Schristos 	unsigned int osu_icon_id;
10148d355d6fSchristos 	struct dl_list icon_head; /* struct icon_entry */
101536d97821Schristos 	struct osu_provider *osu_prov;
101636d97821Schristos 	size_t osu_prov_count;
101736d97821Schristos 	struct os_reltime osu_icon_fetch_start;
101836d97821Schristos 	unsigned int num_osu_scans;
101936d97821Schristos 	unsigned int num_prov_found;
102042669be3Schristos #endif /* CONFIG_INTERWORKING */
102142669be3Schristos 	unsigned int drv_capa_known;
102242669be3Schristos 
102342669be3Schristos 	struct {
102442669be3Schristos 		struct hostapd_hw_modes *modes;
102542669be3Schristos 		u16 num_modes;
102642669be3Schristos 		u16 flags;
102742669be3Schristos 	} hw;
10289a53cbbeSchristos 	enum local_hw_capab {
10299a53cbbeSchristos 		CAPAB_NO_HT_VHT,
10309a53cbbeSchristos 		CAPAB_HT,
10319a53cbbeSchristos 		CAPAB_HT40,
10329a53cbbeSchristos 		CAPAB_VHT,
10339a53cbbeSchristos 	} hw_capab;
103436d97821Schristos #ifdef CONFIG_MACSEC
103536d97821Schristos 	struct ieee802_1x_kay *kay;
103636d97821Schristos #endif /* CONFIG_MACSEC */
103762a52023Schristos 
103862a52023Schristos 	int pno;
103936d97821Schristos 	int pno_sched_pending;
104062a52023Schristos 
104162a52023Schristos 	/* WLAN_REASON_* reason codes. Negative if locally generated. */
104262a52023Schristos 	int disconnect_reason;
104362a52023Schristos 
1044*0dddab58Schristos 	/* WLAN_STATUS_* status codes from last received Authentication frame
1045*0dddab58Schristos 	 * from the AP. */
1046*0dddab58Schristos 	u16 auth_status_code;
1047*0dddab58Schristos 
10488d355d6fSchristos 	/* WLAN_STATUS_* status codes from (Re)Association Response frame. */
10498d355d6fSchristos 	u16 assoc_status_code;
10508d355d6fSchristos 
105162a52023Schristos 	struct ext_password_data *ext_pw;
105262a52023Schristos 
105336d97821Schristos 	struct wpabuf *last_gas_resp, *prev_gas_resp;
105436d97821Schristos 	u8 last_gas_addr[ETH_ALEN], prev_gas_addr[ETH_ALEN];
105536d97821Schristos 	u8 last_gas_dialog_token, prev_gas_dialog_token;
105662a52023Schristos 
105762a52023Schristos 	unsigned int no_keep_alive:1;
105836d97821Schristos 	unsigned int ext_mgmt_frame_handling:1;
10599a53cbbeSchristos 	unsigned int ext_eapol_frame_io:1;
10609a53cbbeSchristos 	unsigned int wmm_ac_supported:1;
10619a53cbbeSchristos 	unsigned int ext_work_in_progress:1;
10629a53cbbeSchristos 	unsigned int own_disconnect_req:1;
1063264891a8Schristos 	unsigned int ignore_post_flush_scan_res:1;
10649a53cbbeSchristos 
10659a53cbbeSchristos #define MAC_ADDR_RAND_SCAN       BIT(0)
10669a53cbbeSchristos #define MAC_ADDR_RAND_SCHED_SCAN BIT(1)
10679a53cbbeSchristos #define MAC_ADDR_RAND_PNO        BIT(2)
10689a53cbbeSchristos #define MAC_ADDR_RAND_ALL        (MAC_ADDR_RAND_SCAN | \
10699a53cbbeSchristos 				  MAC_ADDR_RAND_SCHED_SCAN | \
10709a53cbbeSchristos 				  MAC_ADDR_RAND_PNO)
10719a53cbbeSchristos 	unsigned int mac_addr_rand_supported;
10729a53cbbeSchristos 	unsigned int mac_addr_rand_enable;
10739a53cbbeSchristos 
10749a53cbbeSchristos 	/* MAC Address followed by mask (2 * ETH_ALEN) */
10759a53cbbeSchristos 	u8 *mac_addr_scan;
10769a53cbbeSchristos 	u8 *mac_addr_sched_scan;
10779a53cbbeSchristos 	u8 *mac_addr_pno;
107836d97821Schristos 
107936d97821Schristos #ifdef CONFIG_WNM
108036d97821Schristos 	u8 wnm_dialog_token;
108136d97821Schristos 	u8 wnm_reply;
108236d97821Schristos 	u8 wnm_num_neighbor_report;
108336d97821Schristos 	u8 wnm_mode;
108436d97821Schristos 	u16 wnm_dissoc_timer;
108536d97821Schristos 	u8 wnm_bss_termination_duration[12];
108636d97821Schristos 	struct neighbor_report *wnm_neighbor_report_elements;
10879a53cbbeSchristos 	struct os_reltime wnm_cand_valid_until;
10889a53cbbeSchristos 	u8 wnm_cand_from_bss[ETH_ALEN];
1089*0dddab58Schristos 	enum bss_trans_mgmt_status_code bss_tm_status;
1090264891a8Schristos 	struct wpabuf *coloc_intf_elems;
1091264891a8Schristos 	u8 coloc_intf_dialog_token;
1092264891a8Schristos 	u8 coloc_intf_auto_report;
1093264891a8Schristos 	u8 coloc_intf_timeout;
1094264891a8Schristos #ifdef CONFIG_MBO
1095264891a8Schristos 	unsigned int wnm_mbo_trans_reason_present:1;
1096264891a8Schristos 	u8 wnm_mbo_transition_reason;
1097264891a8Schristos #endif /* CONFIG_MBO */
109836d97821Schristos #endif /* CONFIG_WNM */
109936d97821Schristos 
110036d97821Schristos #ifdef CONFIG_TESTING_GET_GTK
110136d97821Schristos 	u8 last_gtk[32];
110236d97821Schristos 	size_t last_gtk_len;
110336d97821Schristos #endif /* CONFIG_TESTING_GET_GTK */
110436d97821Schristos 
110536d97821Schristos 	unsigned int num_multichan_concurrent;
110636d97821Schristos 	struct wpa_radio_work *connect_work;
110736d97821Schristos 
110836d97821Schristos 	unsigned int ext_work_id;
110936d97821Schristos 
111036d97821Schristos 	struct wpabuf *vendor_elem[NUM_VENDOR_ELEM_FRAMES];
11119a53cbbeSchristos 
11129a53cbbeSchristos #ifdef CONFIG_TESTING_OPTIONS
11139a53cbbeSchristos 	struct l2_packet_data *l2_test;
11149a53cbbeSchristos 	unsigned int extra_roc_dur;
11159a53cbbeSchristos 	enum wpa_supplicant_test_failure test_failure;
1116264891a8Schristos 	char *get_pref_freq_list_override;
11178d355d6fSchristos 	unsigned int reject_btm_req_reason;
11188d355d6fSchristos 	unsigned int p2p_go_csa_on_inv:1;
11198d355d6fSchristos 	unsigned int ignore_auth_resp:1;
11208d355d6fSchristos 	unsigned int ignore_assoc_disallow:1;
1121264891a8Schristos 	unsigned int testing_resend_assoc:1;
1122264891a8Schristos 	struct wpabuf *sae_commit_override;
1123264891a8Schristos 	enum wpa_alg last_tk_alg;
1124264891a8Schristos 	u8 last_tk_addr[ETH_ALEN];
1125264891a8Schristos 	int last_tk_key_idx;
1126264891a8Schristos 	u8 last_tk[WPA_TK_MAX_LEN];
1127264891a8Schristos 	size_t last_tk_len;
1128264891a8Schristos 	struct wpabuf *last_assoc_req_wpa_ie;
11299a53cbbeSchristos #endif /* CONFIG_TESTING_OPTIONS */
11309a53cbbeSchristos 
11319a53cbbeSchristos 	struct wmm_ac_assoc_data *wmm_ac_assoc_info;
11329a53cbbeSchristos 	struct wmm_tspec_element *tspecs[WMM_AC_NUM][TS_DIR_IDX_COUNT];
11339a53cbbeSchristos 	struct wmm_ac_addts_request *addts_request;
11349a53cbbeSchristos 	u8 wmm_ac_last_dialog_token;
11359a53cbbeSchristos 	struct wmm_tspec_element *last_tspecs;
11369a53cbbeSchristos 	u8 last_tspecs_count;
11379a53cbbeSchristos 
11389a53cbbeSchristos 	struct rrm_data rrm;
1139264891a8Schristos 	struct beacon_rep_data beacon_rep_data;
11408d355d6fSchristos 
11418d355d6fSchristos #ifdef CONFIG_FST
11428d355d6fSchristos 	struct fst_iface *fst;
11438d355d6fSchristos 	const struct wpabuf *fst_ies;
11448d355d6fSchristos 	struct wpabuf *received_mb_ies;
11458d355d6fSchristos #endif /* CONFIG_FST */
11468d355d6fSchristos 
11478d355d6fSchristos #ifdef CONFIG_MBO
11488d355d6fSchristos 	/* Multiband operation non-preferred channel */
11498d355d6fSchristos 	struct wpa_mbo_non_pref_channel {
11508d355d6fSchristos 		enum mbo_non_pref_chan_reason reason;
11518d355d6fSchristos 		u8 oper_class;
11528d355d6fSchristos 		u8 chan;
11538d355d6fSchristos 		u8 preference;
11548d355d6fSchristos 	} *non_pref_chan;
11558d355d6fSchristos 	size_t non_pref_chan_num;
11568d355d6fSchristos 	u8 mbo_wnm_token;
1157264891a8Schristos 	/**
1158264891a8Schristos 	 * enable_oce - Enable OCE if it is enabled by user and device also
1159264891a8Schristos 	 *		supports OCE.
1160264891a8Schristos 	 * User can enable OCE with wpa_config's 'oce' parameter as follows -
1161264891a8Schristos 	 *  - Set BIT(0) to enable OCE in non-AP STA mode.
1162264891a8Schristos 	 *  - Set BIT(1) to enable OCE in STA-CFON mode.
1163264891a8Schristos 	 */
1164264891a8Schristos 	u8 enable_oce;
11658d355d6fSchristos #endif /* CONFIG_MBO */
11668d355d6fSchristos 
11678d355d6fSchristos 	/*
11688d355d6fSchristos 	 * This should be under CONFIG_MBO, but it is left out to allow using
11698d355d6fSchristos 	 * the bss_temp_disallowed list for other purposes as well.
11708d355d6fSchristos 	 */
11718d355d6fSchristos 	struct dl_list bss_tmp_disallowed;
11728d355d6fSchristos 
11738d355d6fSchristos 	/*
11748d355d6fSchristos 	 * Content of a measurement report element with type 8 (LCI),
11758d355d6fSchristos 	 * own location.
11768d355d6fSchristos 	 */
11778d355d6fSchristos 	struct wpabuf *lci;
11788d355d6fSchristos 	struct os_reltime lci_time;
1179264891a8Schristos 
1180264891a8Schristos 	struct os_reltime beacon_rep_scan;
1181264891a8Schristos 
1182264891a8Schristos 	/* FILS HLP requests (struct fils_hlp_req) */
1183264891a8Schristos 	struct dl_list fils_hlp_req;
1184264891a8Schristos 
1185264891a8Schristos 	struct sched_scan_relative_params {
1186264891a8Schristos 		/**
1187264891a8Schristos 		 * relative_rssi_set - Enable relatively preferred BSS reporting
1188264891a8Schristos 		 *
1189264891a8Schristos 		 * 0 = Disable reporting relatively preferred BSSs
1190264891a8Schristos 		 * 1 = Enable reporting relatively preferred BSSs
1191264891a8Schristos 		 */
1192264891a8Schristos 		int relative_rssi_set;
1193264891a8Schristos 
1194264891a8Schristos 		/**
1195264891a8Schristos 		 * relative_rssi - Relative RSSI for reporting better BSSs
1196264891a8Schristos 		 *
1197264891a8Schristos 		 * Amount of RSSI by which a BSS should be better than the
1198264891a8Schristos 		 * current connected BSS so that the new BSS can be reported
1199264891a8Schristos 		 * to user space. This applies to sched_scan operations.
1200264891a8Schristos 		 */
1201264891a8Schristos 		int relative_rssi;
1202264891a8Schristos 
1203264891a8Schristos 		/**
1204264891a8Schristos 		 * relative_adjust_band - Band in which RSSI is to be adjusted
1205264891a8Schristos 		 */
1206264891a8Schristos 		enum set_band relative_adjust_band;
1207264891a8Schristos 
1208264891a8Schristos 		/**
1209264891a8Schristos 		 * relative_adjust_rssi - RSSI adjustment
1210264891a8Schristos 		 *
1211264891a8Schristos 		 * An amount of relative_adjust_rssi should be added to the
1212264891a8Schristos 		 * BSSs that belong to the relative_adjust_band while comparing
1213264891a8Schristos 		 * with other bands for BSS reporting.
1214264891a8Schristos 		 */
1215264891a8Schristos 		int relative_adjust_rssi;
1216264891a8Schristos 	} srp;
1217264891a8Schristos 
1218264891a8Schristos 	/* RIC elements for FT protocol */
1219264891a8Schristos 	struct wpabuf *ric_ies;
1220264891a8Schristos 
1221264891a8Schristos 	int last_auth_timeout_sec;
1222264891a8Schristos 
1223264891a8Schristos #ifdef CONFIG_DPP
1224*0dddab58Schristos 	struct dpp_global *dpp;
1225264891a8Schristos 	struct dpp_authentication *dpp_auth;
1226264891a8Schristos 	struct wpa_radio_work *dpp_listen_work;
1227264891a8Schristos 	unsigned int dpp_pending_listen_freq;
1228264891a8Schristos 	unsigned int dpp_listen_freq;
1229264891a8Schristos 	u8 dpp_allowed_roles;
1230264891a8Schristos 	int dpp_qr_mutual;
1231264891a8Schristos 	int dpp_netrole_ap;
1232264891a8Schristos 	int dpp_auth_ok_on_ack;
1233264891a8Schristos 	int dpp_in_response_listen;
1234264891a8Schristos 	int dpp_gas_client;
1235264891a8Schristos 	int dpp_gas_dialog_token;
1236264891a8Schristos 	u8 dpp_intro_bssid[ETH_ALEN];
1237264891a8Schristos 	void *dpp_intro_network;
1238264891a8Schristos 	struct dpp_pkex *dpp_pkex;
1239264891a8Schristos 	struct dpp_bootstrap_info *dpp_pkex_bi;
1240264891a8Schristos 	char *dpp_pkex_code;
1241264891a8Schristos 	char *dpp_pkex_identifier;
1242264891a8Schristos 	char *dpp_pkex_auth_cmd;
1243264891a8Schristos 	char *dpp_configurator_params;
1244264891a8Schristos 	struct os_reltime dpp_last_init;
1245264891a8Schristos 	struct os_reltime dpp_init_iter_start;
1246264891a8Schristos 	unsigned int dpp_init_max_tries;
1247264891a8Schristos 	unsigned int dpp_init_retry_time;
1248264891a8Schristos 	unsigned int dpp_resp_wait_time;
1249264891a8Schristos 	unsigned int dpp_resp_max_tries;
1250264891a8Schristos 	unsigned int dpp_resp_retry_time;
1251*0dddab58Schristos #ifdef CONFIG_DPP2
1252*0dddab58Schristos 	struct dpp_pfs *dpp_pfs;
1253*0dddab58Schristos #endif /* CONFIG_DPP2 */
1254264891a8Schristos #ifdef CONFIG_TESTING_OPTIONS
1255264891a8Schristos 	char *dpp_config_obj_override;
1256264891a8Schristos 	char *dpp_discovery_override;
1257264891a8Schristos 	char *dpp_groups_override;
1258264891a8Schristos 	unsigned int dpp_ignore_netaccesskey_mismatch:1;
1259264891a8Schristos #endif /* CONFIG_TESTING_OPTIONS */
1260264891a8Schristos #endif /* CONFIG_DPP */
1261264891a8Schristos 
1262264891a8Schristos #ifdef CONFIG_FILS
1263264891a8Schristos 	unsigned int disable_fils:1;
1264264891a8Schristos #endif /* CONFIG_FILS */
1265264891a8Schristos 	unsigned int ieee80211ac:1;
1266*0dddab58Schristos 	unsigned int enabled_4addr_mode:1;
1267*0dddab58Schristos 	unsigned int multi_bss_support:1;
12688dbcf02cSchristos };
12698dbcf02cSchristos 
12708dbcf02cSchristos 
12718dbcf02cSchristos /* wpa_supplicant.c */
127262a52023Schristos void wpa_supplicant_apply_ht_overrides(
127362a52023Schristos 	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
127462a52023Schristos 	struct wpa_driver_associate_params *params);
127536d97821Schristos void wpa_supplicant_apply_vht_overrides(
127636d97821Schristos 	struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
127736d97821Schristos 	struct wpa_driver_associate_params *params);
127862a52023Schristos 
12798dbcf02cSchristos int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
128036d97821Schristos int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
128136d97821Schristos 				    struct wpa_ssid *ssid);
12828dbcf02cSchristos 
12838dbcf02cSchristos int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s);
12848dbcf02cSchristos 
12858dbcf02cSchristos const char * wpa_supplicant_state_txt(enum wpa_states state);
128642669be3Schristos int wpa_supplicant_update_mac_addr(struct wpa_supplicant *wpa_s);
12878dbcf02cSchristos int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s);
12888dbcf02cSchristos int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
12898dbcf02cSchristos 			      struct wpa_bss *bss, struct wpa_ssid *ssid,
12908dbcf02cSchristos 			      u8 *wpa_ie, size_t *wpa_ie_len);
12918dbcf02cSchristos void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
12928dbcf02cSchristos 			      struct wpa_bss *bss,
12938dbcf02cSchristos 			      struct wpa_ssid *ssid);
12948dbcf02cSchristos void wpa_supplicant_set_non_wpa_policy(struct wpa_supplicant *wpa_s,
12958dbcf02cSchristos 				       struct wpa_ssid *ssid);
12968dbcf02cSchristos void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s);
12978dbcf02cSchristos void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr);
12988dbcf02cSchristos void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
12998dbcf02cSchristos 				     int sec, int usec);
1300264891a8Schristos void wpas_auth_timeout_restart(struct wpa_supplicant *wpa_s, int sec_diff);
130162a52023Schristos void wpa_supplicant_reinit_autoscan(struct wpa_supplicant *wpa_s);
13028dbcf02cSchristos void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
13038dbcf02cSchristos 			      enum wpa_states state);
13048dbcf02cSchristos struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
130542669be3Schristos const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s);
13068dbcf02cSchristos void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
13078dbcf02cSchristos void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
1308*0dddab58Schristos 				   u16 reason_code);
13098dbcf02cSchristos 
13108d355d6fSchristos struct wpa_ssid * wpa_supplicant_add_network(struct wpa_supplicant *wpa_s);
13118d355d6fSchristos int wpa_supplicant_remove_network(struct wpa_supplicant *wpa_s, int id);
13128dbcf02cSchristos void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
13138dbcf02cSchristos 				   struct wpa_ssid *ssid);
13148dbcf02cSchristos void wpa_supplicant_disable_network(struct wpa_supplicant *wpa_s,
13158dbcf02cSchristos 				    struct wpa_ssid *ssid);
13168dbcf02cSchristos void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
13178dbcf02cSchristos 				   struct wpa_ssid *ssid);
131836d97821Schristos int wpas_set_pkcs11_engine_and_module_path(struct wpa_supplicant *wpa_s,
131936d97821Schristos 					   const char *pkcs11_engine_path,
132036d97821Schristos 					   const char *pkcs11_module_path);
13218dbcf02cSchristos int wpa_supplicant_set_ap_scan(struct wpa_supplicant *wpa_s,
13228dbcf02cSchristos 			       int ap_scan);
132342669be3Schristos int wpa_supplicant_set_bss_expiration_age(struct wpa_supplicant *wpa_s,
132442669be3Schristos 					  unsigned int expire_age);
132542669be3Schristos int wpa_supplicant_set_bss_expiration_count(struct wpa_supplicant *wpa_s,
132642669be3Schristos 					    unsigned int expire_count);
132762a52023Schristos int wpa_supplicant_set_scan_interval(struct wpa_supplicant *wpa_s,
132862a52023Schristos 				     int scan_interval);
13298dbcf02cSchristos int wpa_supplicant_set_debug_params(struct wpa_global *global,
13308dbcf02cSchristos 				    int debug_level, int debug_timestamp,
13318dbcf02cSchristos 				    int debug_show_keys);
133242669be3Schristos void free_hw_features(struct wpa_supplicant *wpa_s);
13338dbcf02cSchristos 
13348dbcf02cSchristos void wpa_show_license(void);
13358dbcf02cSchristos 
13366855b8beSroy struct wpa_interface * wpa_supplicant_match_iface(struct wpa_global *global,
13376855b8beSroy 						  const char *ifname);
13388dbcf02cSchristos struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
13399a53cbbeSchristos 						 struct wpa_interface *iface,
13409a53cbbeSchristos 						 struct wpa_supplicant *parent);
13418dbcf02cSchristos int wpa_supplicant_remove_iface(struct wpa_global *global,
134262a52023Schristos 				struct wpa_supplicant *wpa_s,
134362a52023Schristos 				int terminate);
13448dbcf02cSchristos struct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global,
13458dbcf02cSchristos 						 const char *ifname);
13468dbcf02cSchristos struct wpa_global * wpa_supplicant_init(struct wpa_params *params);
13478dbcf02cSchristos int wpa_supplicant_run(struct wpa_global *global);
13488dbcf02cSchristos void wpa_supplicant_deinit(struct wpa_global *global);
13498dbcf02cSchristos 
13508dbcf02cSchristos int wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s,
13518dbcf02cSchristos 			      struct wpa_ssid *ssid);
13528dbcf02cSchristos void wpa_supplicant_terminate_proc(struct wpa_global *global);
13538dbcf02cSchristos void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
13548dbcf02cSchristos 			     const u8 *buf, size_t len);
135542669be3Schristos void wpa_supplicant_update_config(struct wpa_supplicant *wpa_s);
135642669be3Schristos void wpa_supplicant_clear_status(struct wpa_supplicant *wpa_s);
135742669be3Schristos void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid);
1358264891a8Schristos void fils_connection_failure(struct wpa_supplicant *wpa_s);
135942669be3Schristos int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s);
136062a52023Schristos int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s);
136136d97821Schristos void wpas_auth_failed(struct wpa_supplicant *wpa_s, char *reason);
136262a52023Schristos void wpas_clear_temp_disabled(struct wpa_supplicant *wpa_s,
136362a52023Schristos 			      struct wpa_ssid *ssid, int clear_failures);
136462a52023Schristos int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid);
136562a52023Schristos int disallowed_ssid(struct wpa_supplicant *wpa_s, const u8 *ssid,
136662a52023Schristos 		    size_t ssid_len);
136762a52023Schristos void wpas_request_connection(struct wpa_supplicant *wpa_s);
13688d355d6fSchristos void wpas_request_disconnection(struct wpa_supplicant *wpa_s);
136936d97821Schristos int wpas_build_ext_capab(struct wpa_supplicant *wpa_s, u8 *buf, size_t buflen);
137036d97821Schristos int wpas_update_random_addr(struct wpa_supplicant *wpa_s, int style);
137136d97821Schristos int wpas_update_random_addr_disassoc(struct wpa_supplicant *wpa_s);
13729a53cbbeSchristos void add_freq(int *freqs, int *num_freqs, int freq);
13739a53cbbeSchristos 
13749a53cbbeSchristos void wpas_rrm_reset(struct wpa_supplicant *wpa_s);
13759a53cbbeSchristos void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
13769a53cbbeSchristos 				   const u8 *report, size_t report_len);
13779a53cbbeSchristos int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
13788d355d6fSchristos 				       const struct wpa_ssid_value *ssid,
13798d355d6fSchristos 				       int lci, int civic,
13809a53cbbeSchristos 				       void (*cb)(void *ctx,
13819a53cbbeSchristos 						  struct wpabuf *neighbor_rep),
13829a53cbbeSchristos 				       void *cb_ctx);
13838d355d6fSchristos void wpas_rrm_handle_radio_measurement_request(struct wpa_supplicant *wpa_s,
1384264891a8Schristos 					       const u8 *src, const u8 *dst,
13858d355d6fSchristos 					       const u8 *frame, size_t len);
13869a53cbbeSchristos void wpas_rrm_handle_link_measurement_request(struct wpa_supplicant *wpa_s,
13879a53cbbeSchristos 					      const u8 *src,
13889a53cbbeSchristos 					      const u8 *frame, size_t len,
13899a53cbbeSchristos 					      int rssi);
1390264891a8Schristos void wpas_rrm_refuse_request(struct wpa_supplicant *wpa_s);
1391264891a8Schristos int wpas_beacon_rep_scan_process(struct wpa_supplicant *wpa_s,
1392264891a8Schristos 				 struct wpa_scan_results *scan_res,
1393264891a8Schristos 				 struct scan_info *info);
1394264891a8Schristos void wpas_clear_beacon_rep_data(struct wpa_supplicant *wpa_s);
1395264891a8Schristos void wpas_flush_fils_hlp_req(struct wpa_supplicant *wpa_s);
13968dbcf02cSchristos 
13978d355d6fSchristos 
13988d355d6fSchristos /* MBO functions */
1399264891a8Schristos int wpas_mbo_ie(struct wpa_supplicant *wpa_s, u8 *buf, size_t len,
1400264891a8Schristos 		int add_oce_capa);
1401264891a8Schristos const u8 * mbo_attr_from_mbo_ie(const u8 *mbo_ie, enum mbo_attr_id attr);
14028d355d6fSchristos const u8 * wpas_mbo_get_bss_attr(struct wpa_bss *bss, enum mbo_attr_id attr);
1403*0dddab58Schristos const u8 * mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
1404*0dddab58Schristos 				 enum mbo_attr_id attr);
14058d355d6fSchristos int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s,
14068d355d6fSchristos 				  const char *non_pref_chan);
14078d355d6fSchristos void wpas_mbo_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ie);
14088d355d6fSchristos void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *ie,
14098d355d6fSchristos 			   size_t len);
14108d355d6fSchristos size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos,
14118d355d6fSchristos 				    size_t len,
14128d355d6fSchristos 				    enum mbo_transition_reject_reason reason);
14138d355d6fSchristos void wpas_mbo_update_cell_capa(struct wpa_supplicant *wpa_s, u8 mbo_cell_capa);
14148d355d6fSchristos struct wpabuf * mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
1415264891a8Schristos 				   struct wpa_bss *bss, u32 mbo_subtypes);
1416264891a8Schristos void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
1417264891a8Schristos 			    struct wpa_bss *bss, const u8 *sa,
1418264891a8Schristos 			    const u8 *data, size_t slen);
1419*0dddab58Schristos void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s);
1420264891a8Schristos 
1421264891a8Schristos /* op_classes.c */
1422264891a8Schristos enum chan_allowed {
1423264891a8Schristos 	NOT_ALLOWED, NO_IR, ALLOWED
1424264891a8Schristos };
1425264891a8Schristos 
1426264891a8Schristos enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 channel,
1427264891a8Schristos 				 u8 bw);
1428*0dddab58Schristos size_t wpas_supp_op_class_ie(struct wpa_supplicant *wpa_s,
1429*0dddab58Schristos 			     struct wpa_ssid *ssid,
1430*0dddab58Schristos 			     int freq, u8 *pos, size_t len);
1431*0dddab58Schristos 
1432*0dddab58Schristos int wpas_enable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
1433*0dddab58Schristos 				       unsigned int type, const u8 *addr,
1434*0dddab58Schristos 				       const u8 *mask);
1435*0dddab58Schristos int wpas_disable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
1436*0dddab58Schristos 					unsigned int type);
14378d355d6fSchristos 
143821a80aedSadam /**
143921a80aedSadam  * wpa_supplicant_ctrl_iface_ctrl_rsp_handle - Handle a control response
144021a80aedSadam  * @wpa_s: Pointer to wpa_supplicant data
144121a80aedSadam  * @ssid: Pointer to the network block the reply is for
144221a80aedSadam  * @field: field the response is a reply for
144321a80aedSadam  * @value: value (ie, password, etc) for @field
144421a80aedSadam  * Returns: 0 on success, non-zero on error
144521a80aedSadam  *
144621a80aedSadam  * Helper function to handle replies to control interface requests.
144721a80aedSadam  */
144821a80aedSadam int wpa_supplicant_ctrl_iface_ctrl_rsp_handle(struct wpa_supplicant *wpa_s,
144921a80aedSadam 					      struct wpa_ssid *ssid,
145021a80aedSadam 					      const char *field,
145121a80aedSadam 					      const char *value);
145221a80aedSadam 
14539a53cbbeSchristos void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
14549a53cbbeSchristos 			  const struct wpa_ssid *ssid,
14559a53cbbeSchristos 			  struct hostapd_freq_params *freq);
14569a53cbbeSchristos 
14578dbcf02cSchristos /* events.c */
14588dbcf02cSchristos void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
145942669be3Schristos int wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
14608dbcf02cSchristos 			   struct wpa_bss *selected,
14618dbcf02cSchristos 			   struct wpa_ssid *ssid);
146242669be3Schristos void wpa_supplicant_stop_countermeasures(void *eloop_ctx, void *sock_ctx);
146342669be3Schristos void wpa_supplicant_delayed_mic_error_report(void *eloop_ctx, void *sock_ctx);
146462a52023Schristos void wnm_bss_keep_alive_deinit(struct wpa_supplicant *wpa_s);
146536d97821Schristos int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s);
146636d97821Schristos struct wpa_bss * wpa_supplicant_pick_network(struct wpa_supplicant *wpa_s,
146736d97821Schristos 					     struct wpa_ssid **selected_ssid);
1468264891a8Schristos int wpas_temp_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
1469*0dddab58Schristos void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
1470*0dddab58Schristos 					struct channel_list_changed *info);
14718dbcf02cSchristos 
14728dbcf02cSchristos /* eap_register.c */
14738dbcf02cSchristos int eap_register_methods(void);
14748dbcf02cSchristos 
147542669be3Schristos /**
14768d355d6fSchristos  * Utility method to tell if a given network is for persistent group storage
147742669be3Schristos  * @ssid: Network object
147842669be3Schristos  * Returns: 1 if network is a persistent group, 0 otherwise
147942669be3Schristos  */
network_is_persistent_group(struct wpa_ssid * ssid)148042669be3Schristos static inline int network_is_persistent_group(struct wpa_ssid *ssid)
148142669be3Schristos {
14828d355d6fSchristos 	return ssid->disabled == 2 && ssid->p2p_persistent_group;
148342669be3Schristos }
148442669be3Schristos 
1485*0dddab58Schristos 
wpas_mode_to_ieee80211_mode(enum wpas_mode mode)1486*0dddab58Schristos static inline int wpas_mode_to_ieee80211_mode(enum wpas_mode mode)
1487*0dddab58Schristos {
1488*0dddab58Schristos 	switch (mode) {
1489*0dddab58Schristos 	default:
1490*0dddab58Schristos 	case WPAS_MODE_INFRA:
1491*0dddab58Schristos 		return IEEE80211_MODE_INFRA;
1492*0dddab58Schristos 	case WPAS_MODE_IBSS:
1493*0dddab58Schristos 		return IEEE80211_MODE_IBSS;
1494*0dddab58Schristos 	case WPAS_MODE_AP:
1495*0dddab58Schristos 	case WPAS_MODE_P2P_GO:
1496*0dddab58Schristos 	case WPAS_MODE_P2P_GROUP_FORMATION:
1497*0dddab58Schristos 		return IEEE80211_MODE_AP;
1498*0dddab58Schristos 	case WPAS_MODE_MESH:
1499*0dddab58Schristos 		return IEEE80211_MODE_MESH;
1500*0dddab58Schristos 	}
1501*0dddab58Schristos }
1502*0dddab58Schristos 
1503*0dddab58Schristos 
150462a52023Schristos int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
15059a53cbbeSchristos int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
150662a52023Schristos 
150762a52023Schristos int wpas_init_ext_pw(struct wpa_supplicant *wpa_s);
150862a52023Schristos 
150936d97821Schristos void dump_freq_data(struct wpa_supplicant *wpa_s, const char *title,
151036d97821Schristos 		    struct wpa_used_freq_data *freqs_data,
151136d97821Schristos 		    unsigned int len);
151236d97821Schristos 
151336d97821Schristos int get_shared_radio_freqs_data(struct wpa_supplicant *wpa_s,
151436d97821Schristos 				struct wpa_used_freq_data *freqs_data,
151536d97821Schristos 				unsigned int len);
151636d97821Schristos int get_shared_radio_freqs(struct wpa_supplicant *wpa_s,
151736d97821Schristos 			   int *freq_array, unsigned int len);
151836d97821Schristos 
15198d355d6fSchristos void wpas_network_reenabled(void *eloop_ctx, void *timeout_ctx);
15208d355d6fSchristos 
15218d355d6fSchristos void wpas_vendor_elem_update(struct wpa_supplicant *wpa_s);
15228d355d6fSchristos struct wpa_supplicant * wpas_vendor_elem(struct wpa_supplicant *wpa_s,
15238d355d6fSchristos 					 enum wpa_vendor_elem_frame frame);
15248d355d6fSchristos int wpas_vendor_elem_remove(struct wpa_supplicant *wpa_s, int frame,
15258d355d6fSchristos 			    const u8 *elem, size_t len);
15268d355d6fSchristos 
15278d355d6fSchristos #ifdef CONFIG_FST
15288d355d6fSchristos 
15298d355d6fSchristos struct fst_wpa_obj;
15308d355d6fSchristos 
15318d355d6fSchristos void fst_wpa_supplicant_fill_iface_obj(struct wpa_supplicant *wpa_s,
15328d355d6fSchristos 				       struct fst_wpa_obj *iface_obj);
15338d355d6fSchristos 
15348d355d6fSchristos #endif /* CONFIG_FST */
15358d355d6fSchristos 
15368d355d6fSchristos int wpas_sched_scan_plans_set(struct wpa_supplicant *wpa_s, const char *cmd);
15378d355d6fSchristos 
15388d355d6fSchristos struct hostapd_hw_modes * get_mode(struct hostapd_hw_modes *modes,
15398d355d6fSchristos 				   u16 num_modes, enum hostapd_hw_mode mode);
15408d355d6fSchristos 
15418d355d6fSchristos void wpa_bss_tmp_disallow(struct wpa_supplicant *wpa_s, const u8 *bssid,
1542*0dddab58Schristos 			  unsigned int sec, int rssi_threshold);
1543*0dddab58Schristos int wpa_is_bss_tmp_disallowed(struct wpa_supplicant *wpa_s,
1544*0dddab58Schristos 			      struct wpa_bss *bss);
1545*0dddab58Schristos void free_bss_tmp_disallowed(struct wpa_supplicant *wpa_s);
15468d355d6fSchristos 
15478d355d6fSchristos struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
15488d355d6fSchristos 				     int i, struct wpa_bss *bss,
15498d355d6fSchristos 				     struct wpa_ssid *group,
1550264891a8Schristos 				     int only_first_ssid, int debug_print);
1551264891a8Schristos 
1552264891a8Schristos int wpas_ctrl_iface_get_pref_freq_list_override(struct wpa_supplicant *wpa_s,
1553264891a8Schristos 						enum wpa_driver_if_type xif_type,
1554264891a8Schristos 						unsigned int *num,
1555264891a8Schristos 						unsigned int *freq_list);
1556264891a8Schristos 
1557264891a8Schristos int wpa_is_fils_supported(struct wpa_supplicant *wpa_s);
1558264891a8Schristos int wpa_is_fils_sk_pfs_supported(struct wpa_supplicant *wpa_s);
15598d355d6fSchristos 
15608dbcf02cSchristos #endif /* WPA_SUPPLICANT_I_H */
1561