Replace hostapd_michael_mic_failure() with generic driver event
[libeap.git] / src / drivers / driver.h
index 0362e1a..228ce6b 100644 (file)
@@ -430,7 +430,6 @@ struct hostapd_sta_add_params {
        u16 capability;
        const u8 *supp_rates;
        size_t supp_rates_len;
-       int flags;
        u16 listen_interval;
        const struct ieee80211_ht_capabilities *ht_capabilities;
 };
@@ -486,8 +485,19 @@ struct wpa_bss_params {
        const char *ifname;
        /** Whether IEEE 802.1X or WPA/WPA2 is enabled */
        int enabled;
+
+       int wpa;
+       int ieee802_1x;
+       int wpa_group;
+       int wpa_pairwise;
+       int wpa_key_mgmt;
+       int rsn_preauth;
 };
 
+#define WPA_STA_AUTHORIZED BIT(0)
+#define WPA_STA_WMM BIT(1)
+#define WPA_STA_SHORT_PREAMBLE BIT(2)
+#define WPA_STA_MFP BIT(3)
 
 /**
  * struct wpa_driver_ops - Driver interface API definition
@@ -1314,9 +1324,9 @@ struct wpa_driver_ops {
         * sta_set_flags - Set station flags (AP only)
         * @priv: Private driver interface data
         * @addr: Station address
-        * @total_flags: Bitmap of all WLAN_STA_* flags currently set
-        * @flags_or: Bitmap of WLAN_STA_* flags to add
-        * @flags_and: Bitmap of WLAN_STA_* flags to us as a mask
+        * @total_flags: Bitmap of all WPA_STA_* flags currently set
+        * @flags_or: Bitmap of WPA_STA_* flags to add
+        * @flags_and: Bitmap of WPA_STA_* flags to us as a mask
         * Returns: 0 on success, -1 on failure
         */
        int (*sta_set_flags)(void *priv, const u8 *addr,
@@ -1388,11 +1398,12 @@ struct wpa_driver_ops {
         * @ifname: Interface name for the new virtual interface
         * @addr: Local address to use for the interface or %NULL to use the
         *      parent interface address
+        * @bss_ctx: BSS context for %WPA_IF_AP_BSS interfaces
         * Returns: 0 on success, -1 on failure
         */
        int (*if_add)(const char *iface, void *priv,
                      enum wpa_driver_if_type type, const char *ifname,
-                     const u8 *addr);
+                     const u8 *addr, void *bss_ctx);
 
        /**
         * if_remove - Remove a virtual interface
@@ -1958,7 +1969,6 @@ void hostapd_mgmt_rx(struct hostapd_data *hapd, u8 *buf, size_t len,
                     u16 stype, struct hostapd_frame_info *fi);
 void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
                        u16 stype, int ok);
-void hostapd_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr);
 struct hostapd_data * hostapd_sta_get_bss(struct hostapd_data *hapd,
                                          const u8 *addr);
 void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,