Remove unused set_retry() driver op
[wpasupplicant] / src / drivers / driver.h
index 10afd0d..8339127 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,20 @@ 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;
+
+       u8 *own_addr; /* buffer for writing own MAC address */
 };
 
 
@@ -1197,8 +1203,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,8 +1248,10 @@ 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,
@@ -1257,7 +1265,6 @@ struct wpa_driver_ops {
        int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
        int (*set_rts)(void *priv, int rts);
        int (*set_frag)(void *priv, int frag);
-       int (*set_retry)(void *priv, int short_retry, int long_retry);
 
        int (*sta_set_flags)(void *priv, const u8 *addr,
                             int total_flags, int flags_or, int flags_and);
@@ -1275,7 +1282,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
@@ -1291,9 +1297,6 @@ struct wpa_driver_ops {
        int (*bss_add)(void *priv, const char *ifname, const u8 *bssid);
        int (*bss_remove)(void *priv, const char *ifname);
        int (*valid_bss_mask)(void *priv, const u8 *addr, const u8 *mask);
-       int (*passive_scan)(void *priv, int now, int our_mode_only,
-                           int interval, int _listen, int *channel,
-                           int *last_rx);
        int (*if_add)(const char *iface, void *priv,
                      enum hostapd_driver_if_type type, char *ifname,
                      const u8 *addr);
@@ -1330,9 +1333,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);
 };
 
 /**
@@ -1578,6 +1578,7 @@ union wpa_event_data {
         */
        struct michael_mic_failure {
                int unicast;
+               const u8 *src;
        } michael_mic_failure;
 
        /**
@@ -1723,12 +1724,14 @@ void wpa_scan_sort_results(struct wpa_scan_results *res);
 /* hostapd functions for driver wrappers */
 
 struct sta_info;
+struct ieee80211_hdr;
 
 void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
                           int reassoc);
 void hostapd_tx_status(struct hostapd_data *hapd, const u8 *addr,
                       const u8 *buf, size_t len, int ack);
-void hostapd_rx_from_unknown_sta(struct hostapd_data *hapd, const u8 *addr);
+void hostapd_rx_from_unknown_sta(struct hostapd_data *hapd,
+                                const struct ieee80211_hdr *hdr, size_t len);
 int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
                        const u8 *ie, size_t ielen);
 void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr);
@@ -1740,8 +1743,6 @@ struct hostapd_frame_info {
        u32 channel;
        u32 datarate;
        u32 ssi_signal;
-
-       unsigned int passive_scan:1;
 };
 
 void hostapd_mgmt_rx(struct hostapd_data *hapd, u8 *buf, size_t len,