mesh: Add mesh interface creation command for mesh gate
[mech_eap.git] / src / drivers / driver.h
index 13bf718..f94f57a 100644 (file)
@@ -23,8 +23,7 @@
 #include "utils/list.h"
 
 #define HOSTAPD_CHAN_DISABLED 0x00000001
-#define HOSTAPD_CHAN_PASSIVE_SCAN 0x00000002
-#define HOSTAPD_CHAN_NO_IBSS 0x00000004
+#define HOSTAPD_CHAN_NO_IR 0x00000002
 #define HOSTAPD_CHAN_RADAR 0x00000008
 #define HOSTAPD_CHAN_HT40PLUS 0x00000010
 #define HOSTAPD_CHAN_HT40MINUS 0x00000020
@@ -42,6 +41,9 @@
 #define HOSTAPD_CHAN_VHT_50_30 0x00002000
 #define HOSTAPD_CHAN_VHT_70_10 0x00004000
 
+#define HOSTAPD_CHAN_INDOOR_ONLY 0x00010000
+#define HOSTAPD_CHAN_GO_CONCURRENT 0x00020000
+
 enum reg_change_initiator {
        REGDOM_SET_BY_CORE,
        REGDOM_SET_BY_USER,
@@ -170,10 +172,12 @@ struct hostapd_hw_modes {
 #define IEEE80211_MODE_INFRA   0
 #define IEEE80211_MODE_IBSS    1
 #define IEEE80211_MODE_AP      2
+#define IEEE80211_MODE_MESH    5
 
 #define IEEE80211_CAP_ESS      0x0001
 #define IEEE80211_CAP_IBSS     0x0002
 #define IEEE80211_CAP_PRIVACY  0x0010
+#define IEEE80211_CAP_RRM      0x1000
 
 /* DMG (60 GHz) IEEE 802.11ad */
 /* type - bits 0..1 */
@@ -351,7 +355,7 @@ struct wpa_driver_scan_params {
         * Mbps from the support rates element(s) in the Probe Request frames
         * and not to transmit the frames at any of those rates.
         */
-       u8 p2p_probe;
+       unsigned int p2p_probe:1;
 
        /**
         * only_new_results - Request driver to report only new results
@@ -360,7 +364,15 @@ struct wpa_driver_scan_params {
         * been detected after this scan request has been started, i.e., to
         * flush old cached BSS entries.
         */
-       int only_new_results;
+       unsigned int only_new_results:1;
+
+       /**
+        * low_priority - Requests driver to use a lower scan priority
+        *
+        * This is used to request the driver to use a lower scan priority
+        * if it supports such a thing.
+        */
+       unsigned int low_priority:1;
 
        /*
         * NOTE: Whenever adding new parameters here, please make sure
@@ -403,6 +415,25 @@ enum wps_mode {
                          */
 };
 
+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 wpa_driver_associate_params - Association parameters
  * Data for struct wpa_driver_ops::associate().
@@ -435,11 +466,9 @@ struct wpa_driver_associate_params {
        size_t ssid_len;
 
        /**
-        * freq - Frequency of the channel the selected AP is using
-        * Frequency that the selected AP is using (in MHz as
-        * reported in the scan results)
+        * freq - channel parameters
         */
-       int freq;
+       struct hostapd_freq_params freq;
 
        /**
         * freq_hint - Frequency of the channel the proposed AP is using
@@ -674,6 +703,20 @@ struct wpa_driver_associate_params {
        const struct ieee80211_vht_capabilities *vhtcaps;
        const struct ieee80211_vht_capabilities *vhtcaps_mask;
 #endif /* CONFIG_VHT_OVERRIDES */
+
+       /**
+        * req_key_mgmt_offload - Request key management offload for connection
+        *
+        * Request key management offload for this connection if the device
+        * supports it.
+        */
+       int req_key_mgmt_offload;
+
+       /**
+        * Flag for indicating whether this association includes support for
+        * RRM (Radio Resource Measurements)
+        */
+       int rrm_used;
 };
 
 enum hide_ssid {
@@ -682,6 +725,16 @@ enum hide_ssid {
        HIDDEN_SSID_ZERO_CONTENTS
 };
 
+struct wowlan_triggers {
+       u8 any;
+       u8 disconnect;
+       u8 magic_pkt;
+       u8 gtk_rekey_failure;
+       u8 eap_identity_req;
+       u8 four_way_handshake;
+       u8 rfkill_release;
+};
+
 struct wpa_driver_ap_params {
        /**
         * head - Beacon head from IEEE 802.11 header to IEs before TIM IE
@@ -860,6 +913,14 @@ struct wpa_driver_ap_params {
        int ap_max_inactivity;
 
        /**
+        * smps_mode - SMPS mode
+        *
+        * SMPS mode to be used by the AP, specified as the relevant bits of
+        * ht_capab (i.e. HT_CAP_INFO_SMPS_*).
+        */
+       unsigned int smps_mode;
+
+       /**
         * disable_dgaf - Whether group-addressed frames are disabled
         */
        int disable_dgaf;
@@ -868,6 +929,36 @@ struct wpa_driver_ap_params {
         * osen - Whether OSEN security is enabled
         */
        int osen;
+
+       /**
+        * freq - Channel parameters for dynamic bandwidth changes
+        */
+       struct hostapd_freq_params *freq;
+};
+
+struct wpa_driver_mesh_bss_params {
+#define WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS  0x00000001
+       /*
+        * TODO: Other mesh configuration parameters would go here.
+        * See NL80211_MESHCONF_* for all the mesh config parameters.
+        */
+       unsigned int flags;
+};
+
+struct wpa_driver_mesh_join_params {
+       const u8 *meshid;
+       int meshid_len;
+       const int *basic_rates;
+       const u8 *ies;
+       int ie_len;
+       int freq;
+       enum ht_mode ht_mode;
+       struct wpa_driver_mesh_bss_params conf;
+#define WPA_DRIVER_MESH_FLAG_USER_MPM  0x00000001
+#define WPA_DRIVER_MESH_FLAG_DRIVER_MPM        0x00000002
+#define WPA_DRIVER_MESH_FLAG_SAE_AUTH  0x00000004
+#define WPA_DRIVER_MESH_FLAG_AMPE      0x00000008
+       unsigned int flags;
 };
 
 /**
@@ -921,7 +1012,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_AP            0x00000040
 /* Driver needs static WEP key setup after association has been completed */
 #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE     0x00000080
-/* unused: 0x00000100 */
+/* Driver supports dynamic HT 20/40 MHz channel changes during BSS lifetime */
+#define WPA_DRIVER_FLAGS_HT_2040_COEX                  0x00000100
 /* Driver supports concurrent P2P operations */
 #define WPA_DRIVER_FLAGS_P2P_CONCURRENT        0x00000200
 /*
@@ -979,7 +1071,19 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_QOS_MAPPING                   0x40000000
 /* Driver supports CSA in AP mode */
 #define WPA_DRIVER_FLAGS_AP_CSA                                0x80000000
-       unsigned int flags;
+/* Driver supports mesh */
+#define WPA_DRIVER_FLAGS_MESH                  0x0000000100000000ULL
+/* Driver support ACS offload */
+#define WPA_DRIVER_FLAGS_ACS_OFFLOAD           0x0000000200000000ULL
+/* Driver supports key management offload */
+#define WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD      0x0000000400000000ULL
+       u64 flags;
+
+#define WPA_DRIVER_SMPS_MODE_STATIC                    0x00000001
+#define WPA_DRIVER_SMPS_MODE_DYNAMIC                   0x00000002
+       unsigned int smps_modes;
+
+       unsigned int wmm_ac_supported:1;
 
        int max_scan_ssids;
        int max_sched_scan_ssids;
@@ -1026,6 +1130,26 @@ struct wpa_driver_capa {
         */
        const u8 *extended_capa, *extended_capa_mask;
        unsigned int extended_capa_len;
+
+       struct wowlan_triggers wowlan_triggers;
+
+/* Driver adds the DS Params Set IE in Probe Request frames */
+#define WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES     0x00000001
+/* Driver adds the WFA TPC IE in Probe Request frames */
+#define WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES          0x00000002
+/* Driver handles quiet period requests */
+#define WPA_DRIVER_FLAGS_QUIET                         0x00000004
+/**
+ * Driver is capable of inserting the current TX power value into the body of
+ * transmitted frames.
+ * Background: Some Action frames include a TPC Report IE. This IE contains a
+ * TX power field, which has to be updated by lower layers. One such Action
+ * frame is Link Measurement Report (part of RRM). Another is TPC Report (part
+ * of spectrum management). Note that this insertion takes place at a fixed
+ * offset, namely the 6th byte in the Action frame body.
+ */
+#define WPA_DRIVER_FLAGS_TX_POWER_INSERTION            0x00000008
+       u32 rrm_flags;
 };
 
 
@@ -1055,6 +1179,10 @@ struct hostapd_sta_add_params {
        int vht_opmode_enabled;
        u8 vht_opmode;
        u32 flags; /* bitmask of WPA_STA_* flags */
+       u32 flags_mask; /* unset bits in flags */
+#ifdef CONFIG_MESH
+       enum mesh_plink_state plink_state;
+#endif /* CONFIG_MESH */
        int set; /* Set STA parameters instead of add */
        u8 qosinfo;
        const u8 *ext_capab;
@@ -1065,25 +1193,6 @@ struct hostapd_sta_add_params {
        size_t supp_oper_classes_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];
 };
@@ -1135,16 +1244,19 @@ enum wpa_driver_if_type {
         * WPA_IF_P2P_DEVICE - P2P Device interface is used to indentify the
         * abstracted P2P Device function in the driver
         */
-       WPA_IF_P2P_DEVICE
+       WPA_IF_P2P_DEVICE,
+
+       /*
+        * WPA_IF_MESH - Mesh interface
+        */
+       WPA_IF_MESH,
 };
 
 struct wpa_init_params {
        void *global_priv;
        const u8 *bssid;
        const char *ifname;
-       const u8 *ssid;
-       size_t ssid_len;
-       const char *test_socket;
+       const char *driver_params;
        int use_pae_group_addr;
        char **bridge;
        size_t num_bridge;
@@ -1173,6 +1285,7 @@ struct wpa_bss_params {
 #define WPA_STA_SHORT_PREAMBLE BIT(2)
 #define WPA_STA_MFP BIT(3)
 #define WPA_STA_TDLS_PEER BIT(4)
+#define WPA_STA_AUTHENTICATED BIT(5)
 
 enum tdls_oper {
        TDLS_DISCOVERY_REQ,
@@ -1287,6 +1400,52 @@ enum tdls_peer_capability {
        TDLS_PEER_WMM = BIT(2),
 };
 
+/* valid info in the wmm_params struct */
+enum wmm_params_valid_info {
+       WMM_PARAMS_UAPSD_QUEUES_INFO = BIT(0),
+};
+
+/**
+ * struct wmm_params - WMM parameterss configured for this association
+ * @info_bitmap: Bitmap of valid wmm_params info; indicates what fields
+ *     of the struct contain valid information.
+ * @uapsd_queues: Bitmap of ACs configured for uapsd (valid only if
+ *     %WMM_PARAMS_UAPSD_QUEUES_INFO is set)
+ */
+struct wmm_params {
+       u8 info_bitmap;
+       u8 uapsd_queues;
+};
+
+#ifdef CONFIG_MACSEC
+struct macsec_init_params {
+       Boolean always_include_sci;
+       Boolean use_es;
+       Boolean use_scb;
+};
+#endif /* CONFIG_MACSEC */
+
+enum drv_br_port_attr {
+       DRV_BR_PORT_ATTR_PROXYARP,
+       DRV_BR_PORT_ATTR_HAIRPIN_MODE,
+};
+
+enum drv_br_net_param {
+       DRV_BR_NET_PARAM_GARP_ACCEPT,
+};
+
+struct drv_acs_params {
+       /* Selected mode (HOSTAPD_MODE_*) */
+       enum hostapd_hw_mode hw_mode;
+
+       /* Indicates whether HT is enabled */
+       int ht_enabled;
+
+       /* Indicates whether HT40 is enabled */
+       int ht40_enabled;
+};
+
+
 /**
  * struct wpa_driver_ops - Driver interface API definition
  *
@@ -1572,27 +1731,6 @@ struct wpa_driver_ops {
        const u8 * (*get_mac_addr)(void *priv);
 
        /**
-        * send_eapol - Optional function for sending EAPOL packets
-        * @priv: private driver interface data
-        * @dest: Destination MAC address
-        * @proto: Ethertype
-        * @data: EAPOL packet starting with IEEE 802.1X header
-        * @data_len: Size of the EAPOL packet
-        *
-        * Returns: 0 on success, -1 on failure
-        *
-        * This optional function can be used to override l2_packet operations
-        * with driver specific functionality. If this function pointer is set,
-        * l2_packet module is not used at all and the driver interface code is
-        * responsible for receiving and sending all EAPOL packets. The
-        * received EAPOL packets are sent to core code with EVENT_EAPOL_RX
-        * event. The driver interface is required to implement get_mac_addr()
-        * handler if send_eapol() is used.
-        */
-       int (*send_eapol)(void *priv, const u8 *dest, u16 proto,
-                         const u8 *data, size_t data_len);
-
-       /**
         * set_operstate - Sets device operating state to DORMANT or UP
         * @priv: private driver interface data
         * @state: 0 = dormant, 1 = up
@@ -1667,22 +1805,6 @@ struct wpa_driver_ops {
                             size_t ies_len);
 
        /**
-        * send_ft_action - Send FT Action frame (IEEE 802.11r)
-        * @priv: Private driver interface data
-        * @action: Action field value
-        * @target_ap: Target AP address
-        * @ies: FT IEs (MDIE, FTIE, ...) (FT Request action frame body)
-        * @ies_len: Length of FT IEs in bytes
-        * Returns: 0 on success, -1 on failure
-        *
-        * The supplicant uses this callback to request the driver to transmit
-        * an FT Action frame (action category 6) for over-the-DS fast BSS
-        * transition.
-        */
-       int (*send_ft_action)(void *priv, u8 action, const u8 *target_ap,
-                             const u8 *ies, size_t ies_len);
-
-       /**
         * get_scan_results2 - Fetch the latest scan results
         * @priv: private driver interface data
         *
@@ -2164,7 +2286,7 @@ struct wpa_driver_ops {
         * @session_timeout: Session timeout for the station
         * Returns: 0 on success, -1 on failure
         */
-       int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted, 
+       int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
                                   u32 session_timeout);
 
        /**
@@ -2228,7 +2350,7 @@ struct wpa_driver_ops {
         * Returns: 0 on success, -1 on failure
         */
        int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
-                          const char *bridge_ifname, char *ifname_wds);
+                          const char *bridge_ifname, char *ifname_wds);
 
        /**
         * send_action - Transmit an Action frame
@@ -2468,6 +2590,7 @@ struct wpa_driver_ops {
         * @dialog_token: Dialog Token to use in the message (if needed)
         * @status_code: Status Code or Reason Code to use (if needed)
         * @peer_capab: TDLS peer capability (TDLS_PEER_* bitfield)
+        * @initiator: Is the current end the TDLS link initiator
         * @buf: TDLS IEs to add to the message
         * @len: Length of buf in octets
         * Returns: 0 on success, negative (<0) on failure
@@ -2477,7 +2600,7 @@ struct wpa_driver_ops {
         */
        int (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code,
                              u8 dialog_token, u16 status_code, u32 peer_capab,
-                             const u8 *buf, size_t len);
+                             int initiator, const u8 *buf, size_t len);
 
        /**
         * tdls_oper - Ask the driver to perform high-level TDLS operations
@@ -2513,10 +2636,56 @@ struct wpa_driver_ops {
                           u8 qos_map_set_len);
 
        /**
+        * br_add_ip_neigh - Add a neigh to the bridge ip neigh table
+        * @priv: Private driver interface data
+        * @version: IP version of the IP address, 4 or 6
+        * @ipaddr: IP address for the neigh entry
+        * @prefixlen: IP address prefix length
+        * @addr: Corresponding MAC address
+        * Returns: 0 on success, negative (<0) on failure
+        */
+       int (*br_add_ip_neigh)(void *priv, u8 version, const u8 *ipaddr,
+                              int prefixlen, const u8 *addr);
+
+       /**
+        * br_delete_ip_neigh - Remove a neigh from the bridge ip neigh table
+        * @priv: Private driver interface data
+        * @version: IP version of the IP address, 4 or 6
+        * @ipaddr: IP address for the neigh entry
+        * Returns: 0 on success, negative (<0) on failure
+        */
+       int (*br_delete_ip_neigh)(void *priv, u8 version, const u8 *ipaddr);
+
+       /**
+        * br_port_set_attr - Set a bridge port attribute
+        * @attr: Bridge port attribute to set
+        * @val: Value to be set
+        * Returns: 0 on success, negative (<0) on failure
+        */
+       int (*br_port_set_attr)(void *priv, enum drv_br_port_attr attr,
+                               unsigned int val);
+
+       /**
+        * br_port_set_attr - Set a bridge network parameter
+        * @param: Bridge parameter to set
+        * @val: Value to be set
+        * Returns: 0 on success, negative (<0) on failure
+        */
+       int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
+                               unsigned int val);
+
+       /**
+        * set_wowlan - Set wake-on-wireless triggers
+        * @priv: Private driver interface data
+        * @triggers: wowlan triggers
+        */
+       int (*set_wowlan)(void *priv, const struct wowlan_triggers *triggers);
+
+       /**
         * signal_poll - Get current connection information
         * @priv: Private driver interface data
         * @signal_info: Connection info structure
-         */
+        */
        int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info);
 
        /**
@@ -2710,6 +2879,28 @@ struct wpa_driver_ops {
        int (*switch_channel)(void *priv, struct csa_settings *settings);
 
        /**
+        * add_tx_ts - Add traffic stream
+        * @priv: Private driver interface data
+        * @tsid: Traffic stream ID
+        * @addr: Receiver address
+        * @user_prio: User priority of the traffic stream
+        * @admitted_time: Admitted time for this TS in units of
+        *      32 microsecond periods (per second).
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio,
+                        u16 admitted_time);
+
+       /**
+        * del_tx_ts - Delete traffic stream
+        * @priv: Private driver interface data
+        * @tsid: Traffic stream ID
+        * @addr: Receiver address
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*del_tx_ts)(void *priv, u8 tsid, const u8 *addr);
+
+       /**
         * start_dfs_cac - Listen for radar interference on the channel
         * @priv: Private driver interface data
         * @freq: Channel parameters
@@ -2761,6 +2952,261 @@ struct wpa_driver_ops {
         * Returns: Length of written status information or -1 on failure
         */
        int (*status)(void *priv, char *buf, size_t buflen);
+
+       /**
+        * roaming - Set roaming policy for driver-based BSS selection
+        * @priv: Private driver interface data
+        * @allowed: Whether roaming within ESS is allowed
+        * @bssid: Forced BSSID if roaming is disabled or %NULL if not set
+        * Returns: Length of written status information or -1 on failure
+        *
+        * This optional callback can be used to update roaming policy from the
+        * associate() command (bssid being set there indicates that the driver
+        * should not roam before getting this roaming() call to allow roaming.
+        * If the driver does not indicate WPA_DRIVER_FLAGS_BSS_SELECTION
+        * capability, roaming policy is handled within wpa_supplicant and there
+        * is no need to implement or react to this callback.
+        */
+       int (*roaming)(void *priv, int allowed, const u8 *bssid);
+
+       /**
+        * set_mac_addr - Set MAC address
+        * @priv: Private driver interface data
+        * @addr: MAC address to use or %NULL for setting back to permanent
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*set_mac_addr)(void *priv, const u8 *addr);
+
+#ifdef CONFIG_MACSEC
+       int (*macsec_init)(void *priv, struct macsec_init_params *params);
+
+       int (*macsec_deinit)(void *priv);
+
+       /**
+        * enable_protect_frames - Set protect frames status
+        * @priv: Private driver interface data
+        * @enabled: TRUE = protect frames enabled
+        *           FALSE = protect frames disabled
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*enable_protect_frames)(void *priv, Boolean enabled);
+
+       /**
+        * set_replay_protect - Set replay protect status and window size
+        * @priv: Private driver interface data
+        * @enabled: TRUE = replay protect enabled
+        *           FALSE = replay protect disabled
+        * @window: replay window size, valid only when replay protect enabled
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*set_replay_protect)(void *priv, Boolean enabled, u32 window);
+
+       /**
+        * set_current_cipher_suite - Set current cipher suite
+        * @priv: Private driver interface data
+        * @cs: EUI64 identifier
+        * @cs_len: Length of the cs buffer in octets
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*set_current_cipher_suite)(void *priv, const u8 *cs,
+                                       size_t cs_len);
+
+       /**
+        * enable_controlled_port - Set controlled port status
+        * @priv: Private driver interface data
+        * @enabled: TRUE = controlled port enabled
+        *           FALSE = controlled port disabled
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*enable_controlled_port)(void *priv, Boolean enabled);
+
+       /**
+        * get_receive_lowest_pn - Get receive lowest pn
+        * @priv: Private driver interface data
+        * @channel: secure channel
+        * @an: association number
+        * @lowest_pn: lowest accept pn
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*get_receive_lowest_pn)(void *priv, u32 channel, u8 an,
+                                    u32 *lowest_pn);
+
+       /**
+        * get_transmit_next_pn - Get transmit next pn
+        * @priv: Private driver interface data
+        * @channel: secure channel
+        * @an: association number
+        * @next_pn: next pn
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*get_transmit_next_pn)(void *priv, u32 channel, u8 an,
+                                   u32 *next_pn);
+
+       /**
+        * set_transmit_next_pn - Set transmit next pn
+        * @priv: Private driver interface data
+        * @channel: secure channel
+        * @an: association number
+        * @next_pn: next pn
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*set_transmit_next_pn)(void *priv, u32 channel, u8 an,
+                                   u32 next_pn);
+
+       /**
+        * get_available_receive_sc - get available receive channel
+        * @priv: Private driver interface data
+        * @channel: secure channel
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*get_available_receive_sc)(void *priv, u32 *channel);
+
+       /**
+        * create_receive_sc - create secure channel for receiving
+        * @priv: Private driver interface data
+        * @channel: secure channel
+        * @sci_addr: secure channel identifier - address
+        * @sci_port: secure channel identifier - port
+        * @conf_offset: confidentiality offset (0, 30, or 50)
+        * @validation: frame validation policy (0 = Disabled, 1 = Checked,
+        *      2 = Strict)
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*create_receive_sc)(void *priv, u32 channel, const u8 *sci_addr,
+                                u16 sci_port, unsigned int conf_offset,
+                                int validation);
+
+       /**
+        * delete_receive_sc - delete secure connection for receiving
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*delete_receive_sc)(void *priv, u32 channel);
+
+       /**
+        * create_receive_sa - create secure association for receive
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * @an: association number
+        * @lowest_pn: the lowest packet number can be received
+        * @sak: the secure association key
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*create_receive_sa)(void *priv, u32 channel, u8 an,
+                                u32 lowest_pn, const u8 *sak);
+
+       /**
+        * enable_receive_sa - enable the SA for receive
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * @an: association number
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*enable_receive_sa)(void *priv, u32 channel, u8 an);
+
+       /**
+        * disable_receive_sa - disable SA for receive
+        * @priv: private driver interface data from init()
+        * @channel: secure channel index
+        * @an: association number
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*disable_receive_sa)(void *priv, u32 channel, u8 an);
+
+       /**
+        * get_available_transmit_sc - get available transmit channel
+        * @priv: Private driver interface data
+        * @channel: secure channel
+        * Returns: 0 on success, -1 on failure (or if not supported)
+        */
+       int (*get_available_transmit_sc)(void *priv, u32 *channel);
+
+       /**
+        * create_transmit_sc - create secure connection for transmit
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * @sci_addr: secure channel identifier - address
+        * @sci_port: secure channel identifier - port
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*create_transmit_sc)(void *priv, u32 channel, const u8 *sci_addr,
+                                 u16 sci_port, unsigned int conf_offset);
+
+       /**
+        * delete_transmit_sc - delete secure connection for transmit
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*delete_transmit_sc)(void *priv, u32 channel);
+
+       /**
+        * create_transmit_sa - create secure association for transmit
+        * @priv: private driver interface data from init()
+        * @channel: secure channel index
+        * @an: association number
+        * @next_pn: the packet number used as next transmit packet
+        * @confidentiality: True if the SA is to provide confidentiality
+        *                   as well as integrity
+        * @sak: the secure association key
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*create_transmit_sa)(void *priv, u32 channel, u8 an, u32 next_pn,
+                                 Boolean confidentiality, const u8 *sak);
+
+       /**
+        * enable_transmit_sa - enable SA for transmit
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * @an: association number
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*enable_transmit_sa)(void *priv, u32 channel, u8 an);
+
+       /**
+        * disable_transmit_sa - disable SA for transmit
+        * @priv: private driver interface data from init()
+        * @channel: secure channel
+        * @an: association number
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*disable_transmit_sa)(void *priv, u32 channel, u8 an);
+#endif /* CONFIG_MACSEC */
+
+       /**
+        * init_mesh - Driver specific initialization for mesh
+        * @priv: Private driver interface data
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*init_mesh)(void *priv);
+
+       /**
+        * join_mesh - Join a mesh network
+        * @priv: Private driver interface data
+        * @params: Mesh configuration parameters
+        * Returns: 0 on success, -1 on failure
+        */
+       int (*join_mesh)(void *priv,
+                        struct wpa_driver_mesh_join_params *params);
+
+       /**
+        * leave_mesh - Leave a mesh network
+        * @priv: Private driver interface data
+        * Returns 0 on success, -1 on failure
+        */
+       int (*leave_mesh)(void *priv);
+
+       /**
+        * do_acs - Automatically select channel
+        * @priv: Private driver interface data
+        * @params: Parameters for ACS
+        * Returns 0 on success, -1 on failure
+        *
+        * This command can be used to offload ACS to the driver if the driver
+        * indicates support for such offloading (WPA_DRIVER_FLAGS_ACS_OFFLOAD).
+        */
+       int (*do_acs)(void *priv, struct drv_acs_params *params);
 };
 
 
@@ -2949,11 +3395,6 @@ enum wpa_event_type {
        EVENT_ASSOC_TIMED_OUT,
 
        /**
-        * EVENT_FT_RRB_RX - FT (IEEE 802.11r) RRB frame received
-        */
-       EVENT_FT_RRB_RX,
-
-       /**
         * EVENT_WPS_BUTTON_PUSHED - Report hardware push button press for WPS
         */
        EVENT_WPS_BUTTON_PUSHED,
@@ -2993,13 +3434,6 @@ enum wpa_event_type {
        EVENT_CANCEL_REMAIN_ON_CHANNEL,
 
        /**
-        * EVENT_MLME_RX - Report reception of frame for MLME (test use only)
-        *
-        * This event is used only by driver_test.c and userspace MLME.
-        */
-       EVENT_MLME_RX,
-
-       /**
         * EVENT_RX_PROBE_REQ - Indicate received Probe Request frame
         *
         * This event is used to indicate when a Probe Request frame has been
@@ -3027,9 +3461,7 @@ enum wpa_event_type {
         * EVENT_EAPOL_RX - Report received EAPOL frame
         *
         * When in AP mode with hostapd, this event is required to be used to
-        * deliver the receive EAPOL frames from the driver. With
-        * %wpa_supplicant, this event is used only if the send_eapol() handler
-        * is used to override the use of l2_packet for EAPOL frame TX.
+        * deliver the receive EAPOL frames from the driver.
         */
        EVENT_EAPOL_RX,
 
@@ -3077,7 +3509,8 @@ enum wpa_event_type {
         * the driver does not support radar detection and another virtual
         * interfaces caused the operating channel to change. Other similar
         * resource conflicts could also trigger this for station mode
-        * interfaces.
+        * interfaces. This event can be propagated when channel switching
+        * fails.
         */
        EVENT_INTERFACE_UNAVAILABLE,
 
@@ -3235,7 +3668,20 @@ enum wpa_event_type {
         * to reduce issues due to interference or internal co-existence
         * information in the driver.
         */
-       EVENT_AVOID_FREQUENCIES
+       EVENT_AVOID_FREQUENCIES,
+
+       /**
+        * EVENT_NEW_PEER_CANDIDATE - new (unknown) mesh peer notification
+        */
+       EVENT_NEW_PEER_CANDIDATE,
+
+       /**
+        * EVENT_ACS_CHANNEL_SELECTED - Received selected channels by ACS
+        *
+        * Indicates a pair of primary and secondary channels chosen by ACS
+        * in device.
+        */
+       EVENT_ACS_CHANNEL_SELECTED,
 };
 
 
@@ -3355,9 +3801,62 @@ union wpa_event_data {
                unsigned int freq;
 
                /**
+                * wmm_params - WMM parameters used in this association.
+                */
+               struct wmm_params wmm_params;
+
+               /**
                 * addr - Station address (for AP mode)
                 */
                const u8 *addr;
+
+               /**
+                * The following is the key management offload information
+                * @authorized
+                * @key_replay_ctr
+                * @key_replay_ctr_len
+                * @ptk_kck
+                * @ptk_kek_len
+                * @ptk_kek
+                * @ptk_kek_len
+                */
+
+               /**
+                * authorized - Status of key management offload,
+                * 1 = successful
+                */
+               int authorized;
+
+               /**
+                * key_replay_ctr - Key replay counter value last used
+                * in a valid EAPOL-Key frame
+                */
+               const u8 *key_replay_ctr;
+
+               /**
+                * key_replay_ctr_len - The length of key_replay_ctr
+                */
+               size_t key_replay_ctr_len;
+
+               /**
+                * ptk_kck - The derived PTK KCK
+                */
+               const u8 *ptk_kck;
+
+               /**
+                * ptk_kek_len - The length of ptk_kck
+                */
+               size_t ptk_kck_len;
+
+               /**
+                * ptk_kek - The derived PTK KEK
+                */
+               const u8 *ptk_kek;
+
+               /**
+                * ptk_kek_len - The length of ptk_kek
+                */
+               size_t ptk_kek_len;
        } assoc_info;
 
        /**
@@ -3567,15 +4066,6 @@ union wpa_event_data {
        } timeout_event;
 
        /**
-        * struct ft_rrb_rx - Data for EVENT_FT_RRB_RX events
-        */
-       struct ft_rrb_rx {
-               const u8 *src;
-               const u8 *data;
-               size_t data_len;
-       } ft_rrb_rx;
-
-       /**
         * struct tx_status - Data for EVENT_TX_STATUS events
         */
        struct tx_status {
@@ -3659,17 +4149,6 @@ union wpa_event_data {
        } scan_info;
 
        /**
-        * struct mlme_rx - Data for EVENT_MLME_RX events
-        */
-       struct mlme_rx {
-               const u8 *buf;
-               size_t len;
-               int freq;
-               int channel;
-               int ssi;
-       } mlme_rx;
-
-       /**
         * struct rx_probe_req - Data for EVENT_RX_PROBE_REQ events
         */
        struct rx_probe_req {
@@ -3874,6 +4353,31 @@ union wpa_event_data {
         * This is used as the data with EVENT_AVOID_FREQUENCIES.
         */
        struct wpa_freq_range_list freq_range;
+
+       /**
+        * struct mesh_peer
+        *
+        * @peer: Peer address
+        * @ies: Beacon IEs
+        * @ie_len: Length of @ies
+        *
+        * Notification of new candidate mesh peer.
+        */
+       struct mesh_peer {
+               const u8 *peer;
+               const u8 *ies;
+               size_t ie_len;
+       } mesh_peer;
+
+       /**
+        * struct acs_selected_channels - Data for EVENT_ACS_CHANNEL_SELECTED
+        * @pri_channel: Selected primary channel
+        * @sec_channel: Selected secondary channel
+        */
+       struct acs_selected_channels {
+               u8 pri_channel;
+               u8 sec_channel;
+       } acs_selected_channels;
 };
 
 /**
@@ -3932,6 +4436,16 @@ 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);
 
+/* Convert chan_width to a string for logging and control interfaces */
+const char * channel_width_to_string(enum chan_width width);
+
+int ht_supported(const struct hostapd_hw_modes *mode);
+int vht_supported(const struct hostapd_hw_modes *mode);
+
+struct wowlan_triggers *
+wpa_get_wowlan_triggers(const char *wowlan_triggers,
+                       const struct wpa_driver_capa *capa);
+
 /* NULL terminated array of linked in driver wrappers */
 extern struct wpa_driver_ops *wpa_drivers[];