Add driver status information to control interface
[mech_eap.git] / src / drivers / driver.h
index 0847d37..ad62c47 100644 (file)
@@ -1,15 +1,9 @@
 /*
  * Driver interface definition
- * Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  *
  * This file defines a driver interface used by both %wpa_supplicant and
  * hostapd. The first part of the file defines data structures used in various
@@ -26,6 +20,7 @@
 #define WPA_SUPPLICANT_DRIVER_VERSION 4
 
 #include "common/defs.h"
+#include "utils/list.h"
 
 #define HOSTAPD_CHAN_DISABLED 0x00000001
 #define HOSTAPD_CHAN_PASSIVE_SCAN 0x00000002
 #define HOSTAPD_CHAN_HT40PLUS 0x00000010
 #define HOSTAPD_CHAN_HT40MINUS 0x00000020
 #define HOSTAPD_CHAN_HT40 0x00000040
+#define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED 0x00000080
+
+#define HOSTAPD_CHAN_DFS_UNKNOWN 0x00000000
+#define HOSTAPD_CHAN_DFS_USABLE 0x00000100
+#define HOSTAPD_CHAN_DFS_UNAVAILABLE 0x00000200
+#define HOSTAPD_CHAN_DFS_AVAILABLE 0x00000300
+#define HOSTAPD_CHAN_DFS_MASK 0x00000300
 
 /**
  * struct hostapd_channel_data - Channel information
@@ -47,7 +49,7 @@ struct hostapd_channel_data {
        /**
         * freq - Frequency in MHz
         */
-       short freq;
+       int freq;
 
        /**
         * flag - Channel flags (HOSTAPD_CHAN_*)
@@ -55,11 +57,34 @@ struct hostapd_channel_data {
        int flag;
 
        /**
-        * max_tx_power - maximum transmit power in dBm
+        * max_tx_power - Maximum transmit power in dBm
         */
        u8 max_tx_power;
+
+       /*
+        * survey_list - Linked list of surveys
+        */
+       struct dl_list survey_list;
+
+       /**
+        * min_nf - Minimum observed noise floor, in dBm, based on all
+        * surveyed channel data
+        */
+       s8 min_nf;
+
+#ifdef CONFIG_ACS
+       /**
+        * interference_factor - Computed interference factor on this
+        * channel (used internally in src/ap/acs.c; driver wrappers do not
+        * need to set this)
+        */
+       long double interference_factor;
+#endif /* CONFIG_ACS */
 };
 
+#define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
+#define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
+
 /**
  * struct hostapd_hw_modes - Supported hardware mode information
  */
@@ -103,6 +128,18 @@ struct hostapd_hw_modes {
         * a_mpdu_params - A-MPDU (IEEE 802.11n) parameters
         */
        u8 a_mpdu_params;
+
+       /**
+        * vht_capab - VHT (IEEE 802.11ac) capabilities
+        */
+       u32 vht_capab;
+
+       /**
+        * vht_mcs_set - VHT MCS (IEEE 802.11ac) rate parameters
+        */
+       u8 vht_mcs_set[8];
+
+       unsigned int flags; /* HOSTAPD_MODE_FLAG_* */
 };
 
 
@@ -114,6 +151,13 @@ struct hostapd_hw_modes {
 #define IEEE80211_CAP_IBSS     0x0002
 #define IEEE80211_CAP_PRIVACY  0x0010
 
+/* DMG (60 GHz) IEEE 802.11ad */
+/* type - bits 0..1 */
+#define IEEE80211_CAP_DMG_MASK 0x0003
+#define IEEE80211_CAP_DMG_IBSS 0x0001 /* Tx by: STA */
+#define IEEE80211_CAP_DMG_PBSS 0x0002 /* Tx by: PCP */
+#define IEEE80211_CAP_DMG_AP   0x0003 /* Tx by: AP */
+
 #define WPA_SCAN_QUAL_INVALID          BIT(0)
 #define WPA_SCAN_NOISE_INVALID         BIT(1)
 #define WPA_SCAN_LEVEL_INVALID         BIT(2)
@@ -172,10 +216,12 @@ struct wpa_scan_res {
  * struct wpa_scan_results - Scan results
  * @res: Array of pointers to allocated variable length scan result entries
  * @num: Number of entries in the scan result array
+ * @fetch_time: Time when the results were fetched from the driver
  */
 struct wpa_scan_results {
        struct wpa_scan_res **res;
        size_t num;
+       struct os_time fetch_time;
 };
 
 /**
@@ -266,6 +312,15 @@ struct wpa_driver_scan_params {
        size_t num_filter_ssids;
 
        /**
+        * filter_rssi - Filter by RSSI
+        *
+        * The driver may filter scan results in firmware to reduce host
+        * wakeups and thereby save power. Specify the RSSI threshold in s32
+        * dBm.
+        */
+       s32 filter_rssi;
+
+       /**
         * p2p_probe - Used to disable CCK (802.11b) rates for P2P probes
         *
         * When set, the driver is expected to remove rates 1, 2, 5.5, and 11
@@ -297,6 +352,9 @@ struct wpa_driver_auth_params {
         */
        int p2p;
 
+       const u8 *sae_data;
+       size_t sae_data_len;
+
 };
 
 enum wps_mode {
@@ -335,6 +393,13 @@ struct wpa_driver_associate_params {
        int freq;
 
        /**
+        * bg_scan_period - Background scan period in seconds, 0 to disable
+        * background scan, or -1 to indicate no change to default driver
+        * configuration
+        */
+       int bg_scan_period;
+
+       /**
         * wpa_ie - WPA information element for (Re)Association Request
         * WPA information element to be included in (Re)Association
         * Request (including information element id and length). Use
@@ -512,6 +577,39 @@ struct wpa_driver_associate_params {
         * STA mode: bits 0..3 UAPSD enabled for VO,VI,BK,BE
         */
        int uapsd;
+
+       /**
+        * fixed_bssid - Whether to force this BSSID in IBSS mode
+        * 1 = Fix this BSSID and prevent merges.
+        * 0 = Do not fix BSSID.
+        */
+       int fixed_bssid;
+
+       /**
+        * disable_ht - Disable HT (IEEE 802.11n) for this connection
+        */
+       int disable_ht;
+
+       /**
+        * HT Capabilities over-rides. Only bits set in the mask will be used,
+        * and not all values are used by the kernel anyway. Currently, MCS,
+        * MPDU and MSDU fields are used.
+        */
+       const u8 *htcaps;       /* struct ieee80211_ht_capabilities * */
+       const u8 *htcaps_mask;  /* struct ieee80211_ht_capabilities * */
+
+#ifdef CONFIG_VHT_OVERRIDES
+       /**
+        * disable_vht - Disable VHT for this connection
+        */
+       int disable_vht;
+
+       /**
+        * VHT capability overrides.
+        */
+       const struct ieee80211_vht_capabilities *vhtcaps;
+       const struct ieee80211_vht_capabilities *vhtcaps_mask;
+#endif /* CONFIG_VHT_OVERRIDES */
 };
 
 enum hide_ssid {
@@ -552,6 +650,27 @@ struct wpa_driver_ap_params {
        int beacon_int;
 
        /**
+        * basic_rates: -1 terminated array of basic rates in 100 kbps
+        *
+        * This parameter can be used to set a specific basic rate set for the
+        * BSS. If %NULL, default basic rate set is used.
+        */
+       int *basic_rates;
+
+       /**
+        * proberesp - Probe Response template
+        *
+        * This is used by drivers that reply to Probe Requests internally in
+        * AP mode and require the full Probe Response template.
+        */
+       const u8 *proberesp;
+
+       /**
+        * proberesp_len - Length of the proberesp buffer in octets
+        */
+       size_t proberesp_len;
+
+       /**
         * ssid - The SSID to use in Beacon/Probe Response frames
         */
        const u8 *ssid;
@@ -614,8 +733,72 @@ struct wpa_driver_ap_params {
 
        /**
         * assocresp_ies - WPS IE(s) for (Re)Association Response frames
+        *
+        * This is used to add IEs like WPS IE by drivers that reply to
+        * (Re)Association Request frames internally.
         */
        const struct wpabuf *assocresp_ies;
+
+       /**
+        * isolate - Whether to isolate frames between associated stations
+        *
+        * If this is non-zero, the AP is requested to disable forwarding of
+        * frames between associated stations.
+        */
+       int isolate;
+
+       /**
+        * cts_protect - Whether CTS protection is enabled
+        */
+       int cts_protect;
+
+       /**
+        * preamble - Whether short preamble is enabled
+        */
+       int preamble;
+
+       /**
+        * short_slot_time - Whether short slot time is enabled
+        *
+        * 0 = short slot time disable, 1 = short slot time enabled, -1 = do
+        * not set (e.g., when 802.11g mode is not in use)
+        */
+       int short_slot_time;
+
+       /**
+        * ht_opmode - HT operation mode or -1 if HT not in use
+        */
+       int ht_opmode;
+
+       /**
+        * interworking - Whether Interworking is enabled
+        */
+       int interworking;
+
+       /**
+        * hessid - Homogeneous ESS identifier or %NULL if not set
+        */
+       const u8 *hessid;
+
+       /**
+        * access_network_type - Access Network Type (0..15)
+        *
+        * This is used for filtering Probe Request frames when Interworking is
+        * enabled.
+        */
+       u8 access_network_type;
+
+       /**
+        * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
+        *
+        * This is used by driver which advertises this capability.
+        */
+       int ap_max_inactivity;
+
+       /**
+        * disable_dgaf - Whether group-addressed frames are disabled
+        */
+       int disable_dgaf;
 };
 
 /**
@@ -629,12 +812,15 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE      0x00000010
 #define WPA_DRIVER_CAPA_KEY_MGMT_FT            0x00000020
 #define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK                0x00000040
+#define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK      0x00000080
        unsigned int key_mgmt;
 
 #define WPA_DRIVER_CAPA_ENC_WEP40      0x00000001
 #define WPA_DRIVER_CAPA_ENC_WEP104     0x00000002
 #define WPA_DRIVER_CAPA_ENC_TKIP       0x00000004
 #define WPA_DRIVER_CAPA_ENC_CCMP       0x00000008
+#define WPA_DRIVER_CAPA_ENC_WEP128     0x00000010
+#define WPA_DRIVER_CAPA_ENC_GCMP       0x00000020
        unsigned int enc;
 
 #define WPA_DRIVER_AUTH_OPEN           0x00000001
@@ -646,7 +832,7 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_DRIVER_IE     0x00000001
 /* Driver needs static WEP key setup after association command */
 #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002
-#define WPA_DRIVER_FLAGS_USER_SPACE_MLME 0x00000004
+/* unused: 0x00000004 */
 /* Driver takes care of RSN 4-way handshake internally; PMK is configured with
  * struct wpa_driver_ops::set_key using alg = WPA_ALG_PMK */
 #define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008
@@ -667,10 +853,9 @@ struct wpa_driver_capa {
  * it cannot be used for P2P group operations or non-P2P purposes.
  */
 #define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE       0x00000400
-/* This interface is P2P capable (P2P Device, GO, or P2P Client */
+/* This interface is P2P capable (P2P GO or P2P Client) */
 #define WPA_DRIVER_FLAGS_P2P_CAPABLE   0x00000800
-/* Driver supports concurrent operations on multiple channels */
-#define WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT      0x00001000
+/* unused: 0x00001000 */
 /*
  * Driver uses the initial interface for P2P management interface and non-P2P
  * purposes (e.g., connect to infra AP), but this interface cannot be used for
@@ -691,6 +876,28 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS              0x00020000
 /* Driver supports roaming (BSS selection) in firmware */
 #define WPA_DRIVER_FLAGS_BSS_SELECTION                 0x00040000
+/* Driver supports operating as a TDLS peer */
+#define WPA_DRIVER_FLAGS_TDLS_SUPPORT                  0x00080000
+/* Driver requires external TDLS setup/teardown/discovery */
+#define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP           0x00100000
+/* Driver indicates support for Probe Response offloading in AP mode */
+#define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD            0x00200000
+/* Driver supports U-APSD in AP mode */
+#define WPA_DRIVER_FLAGS_AP_UAPSD                      0x00400000
+/* Driver supports inactivity timer in AP mode */
+#define WPA_DRIVER_FLAGS_INACTIVITY_TIMER              0x00800000
+/* Driver expects user space implementation of MLME in AP mode */
+#define WPA_DRIVER_FLAGS_AP_MLME                       0x01000000
+/* Driver supports SAE with user space SME */
+#define WPA_DRIVER_FLAGS_SAE                           0x02000000
+/* Driver makes use of OBSS scan mechanism in wpa_supplicant */
+#define WPA_DRIVER_FLAGS_OBSS_SCAN                     0x04000000
+/* Driver supports IBSS (Ad-hoc) mode */
+#define WPA_DRIVER_FLAGS_IBSS                          0x08000000
+/* Driver supports radar detection */
+#define WPA_DRIVER_FLAGS_RADAR                         0x10000000
+/* Driver supports a dedicated interface for P2P Device */
+#define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE          0x20000000
        unsigned int flags;
 
        int max_scan_ssids;
@@ -708,6 +915,36 @@ struct wpa_driver_capa {
         * supports in AP mode
         */
        unsigned int max_stations;
+
+       /**
+        * probe_resp_offloads - Bitmap of supported protocols by the driver
+        * for Probe Response offloading.
+        */
+/* Driver Probe Response offloading support for WPS ver. 1 */
+#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS              0x00000001
+/* Driver Probe Response offloading support for WPS ver. 2 */
+#define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2             0x00000002
+/* Driver Probe Response offloading support for P2P */
+#define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P              0x00000004
+/* Driver Probe Response offloading support for IEEE 802.11u (Interworking) */
+#define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING     0x00000008
+       unsigned int probe_resp_offloads;
+
+       unsigned int max_acl_mac_addrs;
+
+       /**
+        * Number of supported concurrent channels
+        */
+       unsigned int num_multichan_concurrent;
+
+       /**
+        * extended_capa - extended capabilities in driver/device
+        *
+        * Must be allocated and freed by driver and the pointers must be
+        * valid for the lifetime of the driver, i.e., freed in deinit()
+        */
+       const u8 *extended_capa, *extended_capa_mask;
+       unsigned int extended_capa_len;
 };
 
 
@@ -733,17 +970,41 @@ struct hostapd_sta_add_params {
        size_t supp_rates_len;
        u16 listen_interval;
        const struct ieee80211_ht_capabilities *ht_capabilities;
+       const struct ieee80211_vht_capabilities *vht_capabilities;
        u32 flags; /* bitmask of WPA_STA_* flags */
+       int set; /* Set STA parameters instead of add */
+       u8 qosinfo;
+       const u8 *ext_capab;
+       size_t ext_capab_len;
 };
 
 struct hostapd_freq_params {
        int mode;
        int freq;
        int channel;
+       /* for HT */
        int ht_enabled;
        int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled,
                                 * secondary channel below primary, 1 = HT40
                                 * enabled, secondary channel above primary */
+
+       /* for VHT */
+       int vht_enabled;
+
+       /* valid for both HT and VHT, center_freq2 is non-zero
+        * only for bandwidth 80 and an 80+80 channel */
+       int center_freq1, center_freq2;
+       int bandwidth;
+};
+
+struct mac_address {
+       u8 addr[ETH_ALEN];
+};
+
+struct hostapd_acl_params {
+       u8 acl_policy;
+       unsigned int num_mac_acl;
+       struct mac_address mac_acl[0];
 };
 
 enum wpa_driver_if_type {
@@ -781,10 +1042,17 @@ enum wpa_driver_if_type {
         * WPA_IF_P2P_GROUP - P2P Group interface (will become either
         * WPA_IF_P2P_GO or WPA_IF_P2P_CLIENT, but the role is not yet known)
         */
-       WPA_IF_P2P_GROUP
+       WPA_IF_P2P_GROUP,
+
+       /**
+        * WPA_IF_P2P_DEVICE - P2P Device interface is used to indentify the
+        * abstracted P2P Device function in the driver
+        */
+       WPA_IF_P2P_DEVICE
 };
 
 struct wpa_init_params {
+       void *global_priv;
        const u8 *bssid;
        const char *ifname;
        const u8 *ssid;
@@ -817,6 +1085,7 @@ struct wpa_bss_params {
 #define WPA_STA_WMM BIT(1)
 #define WPA_STA_SHORT_PREAMBLE BIT(2)
 #define WPA_STA_MFP BIT(3)
+#define WPA_STA_TDLS_PEER BIT(4)
 
 /**
  * struct p2p_params - P2P parameters for driver-based P2P management
@@ -839,6 +1108,34 @@ enum tdls_oper {
        TDLS_DISABLE
 };
 
+enum wnm_oper {
+       WNM_SLEEP_ENTER_CONFIRM,
+       WNM_SLEEP_ENTER_FAIL,
+       WNM_SLEEP_EXIT_CONFIRM,
+       WNM_SLEEP_EXIT_FAIL,
+       WNM_SLEEP_TFS_REQ_IE_ADD,   /* STA requests driver to add TFS req IE */
+       WNM_SLEEP_TFS_REQ_IE_NONE,  /* STA requests empty TFS req IE */
+       WNM_SLEEP_TFS_REQ_IE_SET,   /* AP requests driver to set TFS req IE for
+                                    * a STA */
+       WNM_SLEEP_TFS_RESP_IE_ADD,  /* AP requests driver to add TFS resp IE
+                                    * for a STA */
+       WNM_SLEEP_TFS_RESP_IE_NONE, /* AP requests empty TFS resp IE */
+       WNM_SLEEP_TFS_RESP_IE_SET,  /* AP requests driver to set TFS resp IE
+                                    * for a STA */
+       WNM_SLEEP_TFS_IE_DEL        /* AP delete the TFS IE */
+};
+
+/* enum chan_width - Channel width definitions */
+enum chan_width {
+       CHAN_WIDTH_20_NOHT,
+       CHAN_WIDTH_20,
+       CHAN_WIDTH_40,
+       CHAN_WIDTH_80,
+       CHAN_WIDTH_80P80,
+       CHAN_WIDTH_160,
+       CHAN_WIDTH_UNKNOWN
+};
+
 /**
  * struct wpa_signal_info - Information about channel signal quality
  */
@@ -846,8 +1143,12 @@ struct wpa_signal_info {
        u32 frequency;
        int above_threshold;
        int current_signal;
+       int avg_signal;
        int current_noise;
        int current_txrate;
+       enum chan_width chanwidth;
+       int center_frq1;
+       int center_frq2;
 };
 
 /**
@@ -898,7 +1199,8 @@ struct wpa_driver_ops {
         * @ifname: Interface name (for multi-SSID/VLAN support)
         * @priv: private driver interface data
         * @alg: encryption algorithm (%WPA_ALG_NONE, %WPA_ALG_WEP,
-        *      %WPA_ALG_TKIP, %WPA_ALG_CCMP, %WPA_ALG_IGTK, %WPA_ALG_PMK);
+        *      %WPA_ALG_TKIP, %WPA_ALG_CCMP, %WPA_ALG_IGTK, %WPA_ALG_PMK,
+        *      %WPA_ALG_GCMP);
         *      %WPA_ALG_NONE clears the key.
         * @addr: Address of the peer STA (BSSID of the current AP when setting
         *      pairwise key in station mode), ff:ff:ff:ff:ff:ff for
@@ -915,11 +1217,11 @@ struct wpa_driver_ops {
         *      for Rx keys (in most cases, this is only used with broadcast
         *      keys and set to zero for unicast keys); %NULL if not set
         * @seq_len: length of the seq, depends on the algorithm:
-        *      TKIP: 6 octets, CCMP: 6 octets, IGTK: 6 octets
+        *      TKIP: 6 octets, CCMP/GCMP: 6 octets, IGTK: 6 octets
         * @key: key buffer; TKIP: 16-byte temporal key, 8-byte Tx Mic key,
         *      8-byte Rx Mic Key
         * @key_len: length of the key buffer in octets (WEP: 5 or 13,
-        *      TKIP: 32, CCMP: 16, IGTK: 16)
+        *      TKIP: 32, CCMP/GCMP: 16, IGTK: 16)
         *
         * Returns: 0 on success, -1 on failure
         *
@@ -1016,17 +1318,6 @@ struct wpa_driver_ops {
        int (*deauthenticate)(void *priv, const u8 *addr, int reason_code);
 
        /**
-        * disassociate - Request driver to disassociate
-        * @priv: private driver interface data
-        * @addr: peer address (BSSID of the AP)
-        * @reason_code: 16-bit reason code to be sent in the disassociation
-        *      frame
-        *
-        * Returns: 0 on success, -1 on failure
-        */
-       int (*disassociate)(void *priv, const u8 *addr, int reason_code);
-
-       /**
         * associate - Request driver to associate
         * @priv: private driver interface data
         * @params: association parameters
@@ -1203,91 +1494,21 @@ struct wpa_driver_ops {
         * flags: Variable for returning hardware feature flags
         * Returns: Pointer to allocated hardware data on success or %NULL on
         * failure. Caller is responsible for freeing this.
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to %wpa_supplicant or hostapd.
         */
        struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
                                                         u16 *num_modes,
                                                         u16 *flags);
 
        /**
-        * set_channel - Set channel
-        * @priv: Private driver interface data
-        * @phymode: HOSTAPD_MODE_IEEE80211B, ..
-        * @chan: IEEE 802.11 channel number
-        * @freq: Frequency of the channel in MHz
-        * Returns: 0 on success, -1 on failure
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to wpa_supplicant.
-        */
-       int (*set_channel)(void *priv, enum hostapd_hw_mode phymode, int chan,
-                          int freq);
-
-       /**
-        * set_ssid - Set SSID
-        * @priv: Private driver interface data
-        * @ssid: SSID
-        * @ssid_len: SSID length
-        * Returns: 0 on success, -1 on failure
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to wpa_supplicant.
-        */
-       int (*set_ssid)(void *priv, const u8 *ssid, size_t ssid_len);
-
-       /**
-        * set_bssid - Set BSSID
-        * @priv: Private driver interface data
-        * @bssid: BSSID
-        * Returns: 0 on success, -1 on failure
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to wpa_supplicant.
-        */
-       int (*set_bssid)(void *priv, const u8 *bssid);
-
-       /**
         * send_mlme - Send management frame from MLME
         * @priv: Private driver interface data
         * @data: IEEE 802.11 management frame with IEEE 802.11 header
         * @data_len: Size of the management frame
+        * @noack: Do not wait for this frame to be acked (disable retries)
         * Returns: 0 on success, -1 on failure
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to wpa_supplicant.
-        */
-       int (*send_mlme)(void *priv, const u8 *data, size_t data_len);
-
-       /**
-        * mlme_add_sta - Add a STA entry into the driver/netstack
-        * @priv: Private driver interface data
-        * @addr: MAC address of the STA (e.g., BSSID of the AP)
-        * @supp_rates: Supported rate set (from (Re)AssocResp); in IEEE 802.11
-        * format (one octet per rate, 1 = 0.5 Mbps)
-        * @supp_rates_len: Number of entries in supp_rates
-        * Returns: 0 on success, -1 on failure
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to wpa_supplicant. When the MLME code
-        * completes association with an AP, this function is called to
-        * configure the driver/netstack with a STA entry for data frame
-        * processing (TX rate control, encryption/decryption).
-        */
-       int (*mlme_add_sta)(void *priv, const u8 *addr, const u8 *supp_rates,
-                           size_t supp_rates_len);
-
-       /**
-        * mlme_remove_sta - Remove a STA entry from the driver/netstack
-        * @priv: Private driver interface data
-        * @addr: MAC address of the STA (e.g., BSSID of the AP)
-        * Returns: 0 on success, -1 on failure
-        *
-        * This function is only needed for drivers that export MLME
-        * (management frame processing) to wpa_supplicant.
         */
-       int (*mlme_remove_sta)(void *priv, const u8 *addr);
+       int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
+                        int noack);
 
        /**
         * update_ft_ies - Update FT (IEEE 802.11r) IEs
@@ -1437,6 +1658,16 @@ struct wpa_driver_ops {
        int (*set_ap)(void *priv, struct wpa_driver_ap_params *params);
 
        /**
+        * set_acl - Set ACL in AP mode
+        * @priv: Private driver interface data
+        * @params: Parameters to configure ACL
+        * Returns: 0 on success, -1 on failure
+        *
+        * This is used only for the drivers which support MAC address ACL.
+        */
+       int (*set_acl)(void *priv, struct hostapd_acl_params *params);
+
+       /**
         * hapd_init - Initialize driver interface (hostapd only)
         * @hapd: Pointer to hostapd context
         * @params: Configuration for the driver wrapper
@@ -1465,6 +1696,8 @@ struct wpa_driver_ops {
         * can be left undefined (set to %NULL) if IEEE 802.1X support is
         * always enabled and the driver uses set_ap() to set WPA/RSN IE
         * for Beacon frames.
+        *
+        * DEPRECATED - use set_ap() instead
         */
        int (*set_ieee8021x)(void *priv, struct wpa_bss_params *params);
 
@@ -1477,6 +1710,8 @@ struct wpa_driver_ops {
         * This is an optional function to configure privacy field in the
         * kernel driver for Beacon frames. This can be left undefined (set to
         * %NULL) if the driver uses the Beacon template from set_ap().
+        *
+        * DEPRECATED - use set_ap() instead
         */
        int (*set_privacy)(void *priv, int enabled);
 
@@ -1490,9 +1725,9 @@ struct wpa_driver_ops {
         * Returns: 0 on success, -1 on failure
         *
         * This function is used to fetch the last used TSC/packet number for
-        * a TKIP, CCMP, or BIP/IGTK key. It is mainly used with group keys, so
-        * there is no strict requirement on implementing support for unicast
-        * keys (i.e., addr != %NULL).
+        * a TKIP, CCMP, GCMP, or BIP/IGTK key. It is mainly used with group
+        * keys, so there is no strict requirement on implementing support for
+        * unicast keys (i.e., addr != %NULL).
         */
        int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
                          int idx, u8 *seq);
@@ -1519,11 +1754,13 @@ struct wpa_driver_ops {
         * kernel driver for Beacon and Probe Response frames. This can be left
         * undefined (set to %NULL) if the driver uses the Beacon template from
         * set_ap().
+        *
+        * DEPRECATED - use set_ap() instead
         */
        int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
 
        /**
-        * read_sta_data - Fetch station data (AP only)
+        * read_sta_data - Fetch station data
         * @priv: Private driver interface data
         * @data: Buffer for returning station information
         * @addr: MAC address of the station
@@ -1602,6 +1839,8 @@ struct wpa_driver_ops {
         * @buf: SSID
         * @len: Length of the SSID in octets
         * Returns: 0 on success, -1 on failure
+        *
+        * DEPRECATED - use set_ap() instead
         */
        int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
 
@@ -1625,6 +1864,9 @@ struct wpa_driver_ops {
         * This function is used to add a station entry to the driver once the
         * station has completed association. This is only used if the driver
         * does not take care of association processing.
+        *
+        * With TDLS, this function is also used to add or set (params->set 1)
+        * TDLS peer entries.
         */
        int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
 
@@ -1681,41 +1923,6 @@ struct wpa_driver_ops {
                             int total_flags, int flags_or, int flags_and);
 
        /**
-        * set_rate_sets - Set supported and basic rate sets (AP only)
-        * @priv: Private driver interface data
-        * @supp_rates: -1 terminated array of supported rates in 100 kbps
-        * @basic_rates: -1 terminated array of basic rates in 100 kbps
-        * @mode: hardware mode (HOSTAPD_MODE_*)
-        * Returns: 0 on success, -1 on failure
-        */
-       int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
-                            int mode);
-
-       /**
-        * set_cts_protect - Set CTS protection mode (AP only)
-        * @priv: Private driver interface data
-        * @value: Whether CTS protection is enabled
-        * Returns: 0 on success, -1 on failure
-        */
-       int (*set_cts_protect)(void *priv, int value);
-
-       /**
-        * set_preamble - Set preamble mode (AP only)
-        * @priv: Private driver interface data
-        * @value: Whether short preamble is enabled
-        * Returns: 0 on success, -1 on failure
-        */
-       int (*set_preamble)(void *priv, int value);
-
-       /**
-        * set_short_slot_time - Set short slot time (AP only)
-        * @priv: Private driver interface data
-        * @value: Whether short slot time is enabled
-        * Returns: 0 on success, -1 on failure
-        */
-       int (*set_short_slot_time)(void *priv, int value);
-
-       /**
         * set_tx_queue_params - Set TX queue parameters
         * @priv: Private driver interface data
         * @queue: Queue number (0 = VO, 1 = VI, 2 = BE, 3 = BK)
@@ -1728,17 +1935,6 @@ struct wpa_driver_ops {
                                   int cw_max, int burst_time);
 
        /**
-        * valid_bss_mask - Validate BSSID mask
-        * @priv: Private driver interface data
-        * @addr: Address
-        * @mask: Mask
-        * Returns: 0 if mask is valid, -1 if mask is not valid, 1 if mask can
-        * be used, but the main interface address must be the first address in
-        * the block if mask is applied
-        */
-       int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
-
-       /**
         * if_add - Add a virtual interface
         * @priv: Private driver interface data
         * @type: Interface type
@@ -1833,19 +2029,6 @@ struct wpa_driver_ops {
        int (*set_radius_acl_expire)(void *priv, const u8 *mac);
 
        /**
-        * set_ht_params - Set HT parameters (AP only)
-        * @priv: Private driver interface data
-        * @ht_capab: HT Capabilities IE
-        * @ht_capab_len: Length of ht_capab in octets
-        * @ht_oper: HT Operation IE
-        * @ht_oper_len: Length of ht_oper in octets
-        * Returns: 0 on success, -1 on failure
-        */
-       int (*set_ht_params)(void *priv,
-                            const u8 *ht_capab, size_t ht_capab_len,
-                            const u8 *ht_oper, size_t ht_oper_len);
-
-       /**
         * set_ap_wps_ie - Add WPS IE(s) into Beacon/Probe Response frames (AP)
         * @priv: Private driver interface data
         * @beacon: WPS IE(s) for Beacon frames or %NULL to remove extra IE(s)
@@ -1870,6 +2053,8 @@ struct wpa_driver_ops {
         * also used to provide Probe Response IEs for P2P Listen state
         * operations for drivers that generate the Probe Response frames
         * internally.
+        *
+        * DEPRECATED - use set_ap() instead
         */
        int (*set_ap_wps_ie)(void *priv, const struct wpabuf *beacon,
                             const struct wpabuf *proberesp,
@@ -1891,10 +2076,12 @@ struct wpa_driver_ops {
         * @val: 1 = bind to 4-address WDS; 0 = unbind
         * @bridge_ifname: Bridge interface to use for the WDS station or %NULL
         *      to indicate that bridge is not to be used
+        * @ifname_wds: Buffer to return the interface name for the new WDS
+        *      station or %NULL to indicate name is not returned.
         * Returns: 0 on success, -1 on failure
         */
        int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
-                          const char *bridge_ifname);
+                          const char *bridge_ifname, char *ifname_wds);
 
        /**
         * send_action - Transmit an Action frame
@@ -1906,6 +2093,7 @@ struct wpa_driver_ops {
         * @bssid: BSSID (Address 3)
         * @data: Frame body
         * @data_len: data length in octets
+        @ @no_cck: Whether CCK rates must not be used to transmit this frame
         * Returns: 0 on success, -1 on failure
         *
         * This command can be used to request the driver to transmit an action
@@ -1923,7 +2111,7 @@ struct wpa_driver_ops {
         */
        int (*send_action)(void *priv, unsigned int freq, unsigned int wait,
                           const u8 *dst, const u8 *src, const u8 *bssid,
-                          const u8 *data, size_t data_len);
+                          const u8 *data, size_t data_len, int no_cck);
 
        /**
         * send_action_cancel_wait - Cancel action frame TX wait
@@ -1990,28 +2178,27 @@ struct wpa_driver_ops {
        int (*probe_req_report)(void *priv, int report);
 
        /**
-        * disable_11b_rates - Set whether IEEE 802.11b rates are used for TX
+        * deinit_ap - Deinitialize AP mode
         * @priv: Private driver interface data
-        * @disabled: Whether IEEE 802.11b rates are disabled
         * Returns: 0 on success, -1 on failure (or if not supported)
         *
-        * This command is used to disable IEEE 802.11b rates (1, 2, 5.5, and
-        * 11 Mbps) as TX rates for data and management frames. This can be
-        * used to optimize channel use when there is no need to support IEEE
-        * 802.11b-only devices.
+        * This optional function can be used to disable AP mode related
+        * configuration. If the interface was not dynamically added,
+        * change the driver mode to station mode to allow normal station
+        * operations like scanning to be completed.
         */
-       int (*disable_11b_rates)(void *priv, int disabled);
+       int (*deinit_ap)(void *priv);
 
        /**
-        * deinit_ap - Deinitialize AP mode
+        * deinit_p2p_cli - Deinitialize P2P client mode
         * @priv: Private driver interface data
         * Returns: 0 on success, -1 on failure (or if not supported)
         *
-        * This optional function can be used to disable AP mode related
-        * configuration and change the driver mode to station mode to allow
-        * normal station operations like scanning to be completed.
+        * This optional function can be used to disable P2P client mode. If the
+        * interface was not dynamically added, change the interface type back
+        * to station mode.
         */
-       int (*deinit_ap)(void *priv);
+       int (*deinit_p2p_cli)(void *priv);
 
        /**
         * suspend - Notification on system suspend/hibernate event
@@ -2114,11 +2301,6 @@ struct wpa_driver_ops {
        int (*ampdu)(void *priv, int ampdu);
 
        /**
-        * set_intra_bss - Enables/Disables intra BSS bridging
-        */
-       int (*set_intra_bss)(void *priv, int enabled);
-
-       /**
         * get_radio_name - Get physical radio name for the device
         * @priv: Private driver interface data
         * Returns: Radio name or %NULL if not known
@@ -2256,7 +2438,7 @@ struct wpa_driver_ops {
         * struct wpa_driver_capa.
         */
        int (*p2p_prov_disc_req)(void *priv, const u8 *peer_addr,
-                                u16 config_methods);
+                                u16 config_methods, int join);
 
        /**
         * p2p_sd_request - Schedule a service discovery query
@@ -2356,7 +2538,7 @@ struct wpa_driver_ops {
         * @status_code: Status Code or Reason Code to use (if needed)
         * @buf: TDLS IEs to add to the message
         * @len: Length of buf in octets
-        * Returns: 0 on success, -1 on failure
+        * Returns: 0 on success, negative (<0) on failure
         *
         * This optional function can be used to send packet to driver which is
         * responsible for receiving and sending all TDLS packets.
@@ -2365,9 +2547,31 @@ struct wpa_driver_ops {
                              u8 dialog_token, u16 status_code,
                              const u8 *buf, size_t len);
 
+       /**
+        * tdls_oper - Ask the driver to perform high-level TDLS operations
+        * @priv: Private driver interface data
+        * @oper: TDLS high-level operation. See %enum tdls_oper
+        * @peer: Destination (peer) MAC address
+        * Returns: 0 on success, negative (<0) on failure
+        *
+        * This optional function can be used to send high-level TDLS commands
+        * to the driver.
+        */
        int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer);
 
        /**
+        * wnm_oper - Notify driver of the WNM frame reception
+        * @priv: Private driver interface data
+        * @oper: WNM operation. See %enum wnm_oper
+        * @peer: Destination (peer) MAC address
+        * @buf: Buffer for the driver to fill in (for getting IE)
+        * @buf_len: Return the len of buf
+        * Returns: 0 on success, negative (<0) on failure
+        */
+       int (*wnm_oper)(void *priv, enum wnm_oper oper, const u8 *peer,
+                       u8 *buf, u16 *buf_len);
+
+       /**
         * signal_poll - Get current connection information
         * @priv: Private driver interface data
         * @signal_info: Connection info structure
@@ -2383,6 +2587,8 @@ struct wpa_driver_ops {
         * This function can be used to set authentication algorithms for AP
         * mode when static WEP is used. If the driver uses user space MLME/SME
         * implementation, there is no need to implement this function.
+        *
+        * DEPRECATED - use set_ap() instead
         */
        int (*set_authmode)(void *priv, int authmode);
 
@@ -2487,6 +2693,97 @@ struct wpa_driver_ops {
         * sched_scan is supported.
         */
        int (*stop_sched_scan)(void *priv);
+
+       /**
+        * poll_client - Probe (null data or such) the given station
+        * @priv: Private driver interface data
+        * @own_addr: MAC address of sending interface
+        * @addr: MAC address of the station to probe
+        * @qos: Indicates whether station is QoS station
+        *
+        * This function is used to verify whether an associated station is
+        * still present. This function does not need to be implemented if the
+        * driver provides such inactivity polling mechanism.
+        */
+       void (*poll_client)(void *priv, const u8 *own_addr,
+                           const u8 *addr, int qos);
+
+       /**
+        * radio_disable - Disable/enable radio
+        * @priv: Private driver interface data
+        * @disabled: 1=disable 0=enable radio
+        * Returns: 0 on success, -1 on failure
+        *
+        * This optional command is for testing purposes. It can be used to
+        * disable the radio on a testbed device to simulate out-of-radio-range
+        * conditions.
+        */
+       int (*radio_disable)(void *priv, int disabled);
+
+       /**
+        * switch_channel - Announce channel switch and migrate the GO to the
+        * given frequency
+        * @priv: Private driver interface data
+        * @freq: Frequency in MHz
+        * Returns: 0 on success, -1 on failure
+        *
+        * This function is used to move the GO to the legacy STA channel to
+        * avoid frequency conflict in single channel concurrency.
+        */
+       int (*switch_channel)(void *priv, unsigned int freq);
+
+       /**
+        * start_dfs_cac - Listen for radar interference on the channel
+        * @priv: Private driver interface data
+        * @freq: Frequency (in MHz) of the channel
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*start_dfs_cac)(void *priv, int freq);
+
+       /**
+        * stop_ap - Removes beacon from AP
+        * @priv: Private driver interface data
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        *
+        * This optional function can be used to disable AP mode related
+        * configuration. Unlike deinit_ap, it does not change to station
+        * mode.
+        */
+       int (*stop_ap)(void *priv);
+
+       /**
+        * get_survey - Retrieve survey data
+        * @priv: Private driver interface data
+        * @freq: If set, survey data for the specified frequency is only
+        *      being requested. If not set, all survey data is requested.
+        * Returns: 0 on success, -1 on failure
+        *
+        * Use this to retrieve:
+        *
+        * - the observed channel noise floor
+        * - the amount of time we have spent on the channel
+        * - the amount of time during which we have spent on the channel that
+        *   the radio has determined the medium is busy and we cannot
+        *   transmit
+        * - the amount of time we have spent receiving data
+        * - the amount of time we have spent transmitting data
+        *
+        * This data can be used for spectrum heuristics. One example is
+        * Automatic Channel Selection (ACS). The channel survey data is
+        * kept on a linked list on the channel data, one entry is added
+        * for each survey. The min_nf of the channel is updated for each
+        * survey.
+        */
+       int (*get_survey)(void *priv, unsigned int freq);
+
+       /**
+        * status - Get driver interface status information
+        * @priv: Private driver interface data
+        * @buf: Buffer for printing tou the status information
+        * @buflen: Maximum length of the buffer
+        * Returns: Length of written status information or -1 on failure
+        */
+       int (*status)(void *priv, char *buf, size_t buflen);
 };
 
 
@@ -2904,9 +3201,122 @@ enum wpa_event_type {
        /**
         * EVENT_SCHED_SCAN_STOPPED - Scheduled scan was stopped
         */
-       EVENT_SCHED_SCAN_STOPPED
+       EVENT_SCHED_SCAN_STOPPED,
+
+       /**
+        * EVENT_DRIVER_CLIENT_POLL_OK - Station responded to poll
+        *
+        * This event indicates that the station responded to the poll
+        * initiated with @poll_client.
+        */
+       EVENT_DRIVER_CLIENT_POLL_OK,
+
+       /**
+        * EVENT_EAPOL_TX_STATUS - notify of EAPOL TX status
+        */
+       EVENT_EAPOL_TX_STATUS,
+
+       /**
+        * EVENT_CH_SWITCH - AP or GO decided to switch channels
+        *
+        * Described in wpa_event_data.ch_switch
+        * */
+       EVENT_CH_SWITCH,
+
+       /**
+        * EVENT_WNM - Request WNM operation
+        *
+        * This event can be used to request a WNM operation to be performed.
+        */
+       EVENT_WNM,
+
+       /**
+        * EVENT_CONNECT_FAILED_REASON - Connection failure reason in AP mode
+        *
+        * This event indicates that the driver reported a connection failure
+        * with the specified client (for example, max client reached, etc.) in
+        * AP mode.
+        */
+       EVENT_CONNECT_FAILED_REASON,
+
+       /**
+        * EVENT_RADAR_DETECTED - Notify of radar detection
+        *
+        * A radar has been detected on the supplied frequency, hostapd should
+        * react accordingly (e.g., change channel).
+        */
+       EVENT_DFS_RADAR_DETECTED,
+
+       /**
+        * EVENT_CAC_FINISHED - Notify that channel availability check has been completed
+        *
+        * After a successful CAC, the channel can be marked clear and used.
+        */
+       EVENT_DFS_CAC_FINISHED,
+
+       /**
+        * EVENT_CAC_ABORTED - Notify that channel availability check has been aborted
+        *
+        * The CAC was not successful, and the channel remains in the previous
+        * state. This may happen due to a radar beeing detected or other
+        * external influences.
+        */
+       EVENT_DFS_CAC_ABORTED,
+
+       /**
+        * EVENT_DFS_CAC_NOP_FINISHED - Notify that non-occupancy period is over
+        *
+        * The channel which was previously unavailable is now available again.
+        */
+       EVENT_DFS_NOP_FINISHED,
+
+       /*
+       * EVENT_SURVEY - Received survey data
+       *
+       * This event gets triggered when a driver query is issued for survey
+       * data and the requested data becomes available. The returned data is
+       * stored in struct survey_results. The results provide at most one
+       * survey entry for each frequency and at minimum will provide one survey
+       * entry for one frequency. The survey data can be os_malloc()'d and
+       * then os_free()'d, so the event callback must only copy data.
+       */
+       EVENT_SURVEY
+};
+
+
+/**
+ * struct freq_survey - Channel survey info
+ *
+ * @ifidx: Interface index in which this survey was observed
+ * @freq: Center of frequency of the surveyed channel
+ * @nf: Channel noise floor in dBm
+ * @channel_time: Amount of time in ms the radio spent on the channel
+ * @channel_time_busy: Amount of time in ms the radio detected some signal
+ *     that indicated to the radio the channel was not clear
+ * @channel_time_rx: Amount of time the radio spent receiving data
+ * @channel_time_tx: Amount of time the radio spent transmitting data
+ * @filled: bitmask indicating which fields have been reported, see
+ *     SURVEY_HAS_* defines.
+ * @list: Internal list pointers
+ */
+struct freq_survey {
+       u32 ifidx;
+       unsigned int freq;
+       s8 nf;
+       u64 channel_time;
+       u64 channel_time_busy;
+       u64 channel_time_rx;
+       u64 channel_time_tx;
+       unsigned int filled;
+       struct dl_list list;
 };
 
+#define SURVEY_HAS_NF BIT(0)
+#define SURVEY_HAS_CHAN_TIME BIT(1)
+#define SURVEY_HAS_CHAN_TIME_BUSY BIT(2)
+#define SURVEY_HAS_CHAN_TIME_RX BIT(3)
+#define SURVEY_HAS_CHAN_TIME_TX BIT(4)
+
 
 /**
  * union wpa_event_data - Additional data for wpa_supplicant_event() calls
@@ -3019,6 +3429,11 @@ union wpa_event_data {
                 * ie_len - Length of ie buffer in octets
                 */
                size_t ie_len;
+
+               /**
+                * locally_generated - Whether the frame was locally generated
+                */
+               int locally_generated;
        } disassoc_info;
 
        /**
@@ -3045,6 +3460,11 @@ union wpa_event_data {
                 * ie_len - Length of ie buffer in octets
                 */
                size_t ie_len;
+
+               /**
+                * locally_generated - Whether the frame was locally generated
+                */
+               int locally_generated;
        } deauth_info;
 
        /**
@@ -3097,6 +3517,24 @@ union wpa_event_data {
        } tdls;
 
        /**
+        * struct wnm - Data for EVENT_WNM
+        */
+       struct wnm {
+               u8 addr[ETH_ALEN];
+               enum {
+                       WNM_OPER_SLEEP,
+               } oper;
+               enum {
+                       WNM_SLEEP_ENTER,
+                       WNM_SLEEP_EXIT
+               } sleep_action;
+               int sleep_intval;
+               u16 reason_code;
+               u8 *buf;
+               u16 buf_len;
+       } wnm;
+
+       /**
         * struct ft_ies - FT information elements (EVENT_FT_RESPONSE)
         *
         * During FT (IEEE 802.11r) authentication sequence, the driver is
@@ -3198,8 +3636,9 @@ union wpa_event_data {
         * struct rx_from_unknown - Data for EVENT_RX_FROM_UNKNOWN events
         */
        struct rx_from_unknown {
-               const u8 *frame;
-               size_t len;
+               const u8 *bssid;
+               const u8 *addr;
+               int wds;
        } rx_from_unknown;
 
        /**
@@ -3209,7 +3648,7 @@ union wpa_event_data {
                const u8 *frame;
                size_t frame_len;
                u32 datarate;
-               u32 ssi_signal;
+               int ssi_signal; /* dBm */
        } rx_mgmt;
 
        /**
@@ -3327,6 +3766,11 @@ union wpa_event_data {
                 * ie_len - Length of ie buffer in octets
                 */
                size_t ie_len;
+
+               /**
+                * signal - signal strength in dBm (or 0 if not available)
+                */
+               int ssi_signal;
        } rx_probe_req;
 
        /**
@@ -3458,6 +3902,75 @@ union wpa_event_data {
                const u8 *bssid;
                const u8 *replay_ctr;
        } driver_gtk_rekey;
+
+       /**
+        * struct client_poll - Data for EVENT_DRIVER_CLIENT_POLL_OK events
+        * @addr: station address
+        */
+       struct client_poll {
+               u8 addr[ETH_ALEN];
+       } client_poll;
+
+       /**
+        * struct eapol_tx_status
+        * @dst: Original destination
+        * @data: Data starting with IEEE 802.1X header (!)
+        * @data_len: Length of data
+        * @ack: Indicates ack or lost frame
+        *
+        * This corresponds to hapd_send_eapol if the frame sent
+        * there isn't just reported as EVENT_TX_STATUS.
+        */
+       struct eapol_tx_status {
+               const u8 *dst;
+               const u8 *data;
+               int data_len;
+               int ack;
+       } eapol_tx_status;
+
+       /**
+        * struct ch_switch
+        * @freq: Frequency of new channel in MHz
+        * @ht_enabled: Whether this is an HT channel
+        * @ch_offset: Secondary channel offset
+        */
+       struct ch_switch {
+               int freq;
+               int ht_enabled;
+               int ch_offset;
+       } ch_switch;
+
+       /**
+        * struct connect_failed - Data for EVENT_CONNECT_FAILED_REASON
+        * @addr: Remote client address
+        * @code: Reason code for connection failure
+        */
+       struct connect_failed_reason {
+               u8 addr[ETH_ALEN];
+               enum {
+                       MAX_CLIENT_REACHED,
+                       BLOCKED_CLIENT
+               } code;
+       } connect_failed_reason;
+
+       /**
+        * struct dfs_event - Data for radar detected events
+        * @freq: Frequency of the channel in MHz
+        */
+       struct dfs_event {
+               int freq;
+       } dfs_event;
+
+       /**
+        * survey_results - Survey result data for EVENT_SURVEY
+        * @freq_filter: Requested frequency survey filter, 0 if request
+        *      was for all survey data
+        * @survey_list: Linked list of survey data
+        */
+       struct survey_results {
+               unsigned int freq_filter;
+               struct dl_list survey_list; /* struct freq_survey */
+       } survey_results;
 };
 
 /**
@@ -3510,4 +4023,10 @@ static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
        wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
 }
 
+/* driver_common.c */
+void wpa_scan_results_free(struct wpa_scan_results *res);
+
+/* Convert wpa_event_type to a string for logging */
+const char * event_to_string(enum wpa_event_type event);
+
 #endif /* DRIVER_H */