Add own_addr as a parameter to sta_deauth() and sta_disassoc()
[wpasupplicant] / src / drivers / driver.h
index 486cabf..db87a58 100644 (file)
@@ -61,6 +61,7 @@ struct hostapd_hw_modes {
 
 #define IEEE80211_MODE_INFRA   0
 #define IEEE80211_MODE_IBSS    1
+#define IEEE80211_MODE_AP      2
 
 #define IEEE80211_CAP_ESS      0x0001
 #define IEEE80211_CAP_IBSS     0x0002
@@ -491,15 +492,18 @@ struct hostapd_freq_params {
 };
 
 enum hostapd_driver_if_type {
-       HOSTAPD_IF_VLAN, HOSTAPD_IF_WDS
+       HOSTAPD_IF_VLAN
 };
 
-struct hostapd_neighbor_bss {
-       u8 bssid[ETH_ALEN];
-       int freq; /* MHz */
-       unsigned int ht:1;
-       int pri_chan;
-       int sec_chan; /* 0 for 20 MHz channels */
+struct wpa_init_params {
+       const u8 *bssid;
+       const char *ifname;
+       const u8 *ssid;
+       size_t ssid_len;
+       const char *test_socket;
+       int use_pae_group_addr;
+       char **bridge;
+       size_t num_bridge;
 };
 
 
@@ -1197,8 +1201,8 @@ struct wpa_driver_ops {
 
        int (*set_beacon_int)(void *priv, int value);
 
-       void * (*hapd_init)(struct hostapd_data *hapd);
-       void * (*init_bssid)(struct hostapd_data *hapd, const u8 *bssid);
+       void * (*hapd_init)(struct hostapd_data *hapd,
+                           struct wpa_init_params *params);
        void (*hapd_deinit)(void *priv);
 
        /**
@@ -1242,15 +1246,15 @@ struct wpa_driver_ops {
        int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data,
                               size_t data_len, int encrypt,
                               const u8 *own_addr);
-       int (*sta_deauth)(void *priv, const u8 *addr, int reason);
-       int (*sta_disassoc)(void *priv, const u8 *addr, int reason);
+       int (*sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr,
+                         int reason);
+       int (*sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr,
+                           int reason);
        int (*sta_remove)(void *priv, const u8 *addr);
        int (*hapd_get_ssid)(const char *ifname, void *priv, u8 *buf, int len);
        int (*hapd_set_ssid)(const char *ifname, void *priv, const u8 *buf,
                             int len);
        int (*hapd_set_countermeasures)(void *priv, int enabled);
-       int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
-                              int flags);
        int (*sta_add)(const char *ifname, void *priv,
                       struct hostapd_sta_add_params *params);
        int (*get_inact_sec)(void *priv, const u8 *addr);
@@ -1265,7 +1269,6 @@ struct wpa_driver_ops {
                             int total_flags, int flags_or, int flags_and);
        int (*set_rate_sets)(void *priv, int *supp_rates, int *basic_rates,
                             int mode);
-       int (*hapd_set_country)(void *priv, const char *country);
        int (*set_ieee80211d)(void *priv, int enabled);
        int (*hapd_set_beacon)(const char *ifname, void *priv,
                               const u8 *head, size_t head_len,
@@ -1278,7 +1281,6 @@ struct wpa_driver_ops {
         * 1 = enabled, i.e., bridge packets between associated STAs (default)
         */
        int (*set_internal_bridge)(void *priv, int value);
-       int (*hapd_set_beacon_int)(void *priv, int value);
        /* Configure broadcast SSID mode:
         * 0 = include SSID in Beacon frames and reply to Probe Request frames
         *     that use broadcast SSID
@@ -1297,9 +1299,6 @@ struct wpa_driver_ops {
        int (*passive_scan)(void *priv, int now, int our_mode_only,
                            int interval, int _listen, int *channel,
                            int *last_rx);
-       struct hostapd_hw_modes * (*hapd_get_hw_feature_data)(void *priv,
-                                                             u16 *num_modes,
-                                                             u16 *flags);
        int (*if_add)(const char *iface, void *priv,
                      enum hostapd_driver_if_type type, char *ifname,
                      const u8 *addr);
@@ -1336,9 +1335,6 @@ struct wpa_driver_ops {
                                 const u8 *ie, size_t len);
        int (*set_wps_probe_resp_ie)(const char *ifname, void *priv,
                                     const u8 *ie, size_t len);
-
-       const struct hostapd_neighbor_bss *
-       (*get_neighbor_bss)(void *priv, size_t *num);
 };
 
 /**
@@ -1584,6 +1580,7 @@ union wpa_event_data {
         */
        struct michael_mic_failure {
                int unicast;
+               const u8 *src;
        } michael_mic_failure;
 
        /**
@@ -1714,8 +1711,6 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
 
 void wpa_supplicant_sta_rx(void *ctx, const u8 *buf, size_t len,
                           struct ieee80211_rx_status *rx_status);
-void wpa_supplicant_sta_free_hw_features(struct hostapd_hw_modes *hw_features,
-                                        size_t num_hw_features);
 
 const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie);
 #define WPA_IE_VENDOR_TYPE 0x0050f201