]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/wpa_supplicant_i.h
tests: Verify behavior during externally triggered scan
[thirdparty/hostap.git] / wpa_supplicant / wpa_supplicant_i.h
index 8563b18385debffa187579bab054077dbbd68770..1c10a036a97dd72cc0f053150f3c004a4156e30a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant - Internal definitions
- * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi>
  *
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
@@ -257,7 +257,6 @@ struct wpa_global {
                WPA_CONC_PREF_STA,
                WPA_CONC_PREF_P2P
        } conc_pref;
-       unsigned int p2p_cb_on_scan_complete:1;
        unsigned int p2p_per_sta_psk:1;
 
 #ifdef CONFIG_WIFI_DISPLAY
@@ -281,8 +280,43 @@ struct wpa_radio {
        char name[16]; /* from driver_ops get_radio_name() or empty if not
                        * available */
        struct dl_list ifaces; /* struct wpa_supplicant::radio_list entries */
+       struct dl_list work; /* struct wpa_radio_work::list entries */
 };
 
+/**
+ * struct wpa_radio_work - Radio work item
+ */
+struct wpa_radio_work {
+       struct dl_list list;
+       unsigned int freq; /* known frequency (MHz) or 0 for multiple/unknown */
+       const char *type;
+       struct wpa_supplicant *wpa_s;
+       void (*cb)(struct wpa_radio_work *work, int deinit);
+       void *ctx;
+       unsigned int started:1;
+       struct os_reltime time;
+};
+
+int radio_add_work(struct wpa_supplicant *wpa_s, unsigned int freq,
+                  const char *type, int next,
+                  void (*cb)(struct wpa_radio_work *work, int deinit),
+                  void *ctx);
+void radio_work_done(struct wpa_radio_work *work);
+void radio_remove_unstarted_work(struct wpa_supplicant *wpa_s,
+                                const char *type);
+void radio_work_check_next(struct wpa_supplicant *wpa_s);
+
+struct wpa_connect_work {
+       unsigned int sme:1;
+       struct wpa_bss *bss;
+       struct wpa_ssid *ssid;
+};
+
+int wpas_valid_bss_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *test_bss,
+                       struct wpa_ssid *test_ssid);
+void wpas_connect_work_free(struct wpa_connect_work *cwork);
+void wpas_connect_work_done(struct wpa_supplicant *wpa_s);
+
 /**
  * offchannel_send_action_result - Result of offchannel send Action frame
  */
@@ -419,6 +453,7 @@ struct wpa_supplicant {
        struct ctrl_iface_priv *ctrl_iface;
 
        enum wpa_states wpa_state;
+       struct wpa_radio_work *scan_work;
        int scanning;
        int sched_scanning;
        int new_connection;
@@ -432,7 +467,8 @@ struct wpa_supplicant {
 
        unsigned char last_eapol_src[ETH_ALEN];
 
-       int keys_cleared;
+       unsigned int keys_cleared; /* bitfield of key indexes that the driver is
+                                   * known not to be configured with a key */
 
        struct wpa_blacklist *blacklist;
 
@@ -655,7 +691,6 @@ struct wpa_supplicant {
         */
        char cross_connect_uplink[100];
 
-       unsigned int sta_scan_pending:1;
        unsigned int p2p_auto_join:1;
        unsigned int p2p_auto_pd:1;
        unsigned int p2p_persistent_group:1;
@@ -673,6 +708,9 @@ struct wpa_supplicant {
        int p2p_connect_freq;
        struct os_reltime p2p_auto_started;
        struct wpa_ssid *p2p_last_4way_hs_fail;
+       struct wpa_radio_work *p2p_scan_work;
+       struct wpa_radio_work *p2p_listen_work;
+       struct wpa_radio_work *p2p_send_action_work;
 #endif /* CONFIG_P2P */
 
        struct wpa_ssid *bgscan_ssid;
@@ -749,6 +787,7 @@ struct wpa_supplicant {
 #endif /* CONFIG_TESTING_GET_GTK */
 
        unsigned int num_multichan_concurrent;
+       struct wpa_radio_work *connect_work;
 };
 
 
@@ -843,7 +882,6 @@ int disallowed_ssid(struct wpa_supplicant *wpa_s, const u8 *ssid,
                    size_t ssid_len);
 void wpas_request_connection(struct wpa_supplicant *wpa_s);
 int wpas_build_ext_capab(struct wpa_supplicant *wpa_s, u8 *buf);
-int wpas_wpa_is_in_progress(struct wpa_supplicant *wpa_s, int include_current);
 
 /**
  * wpa_supplicant_ctrl_iface_ctrl_rsp_handle - Handle a control response