WPS: Use WEP key index 1..4 instead of 0..3 when configuring AP
[wpasupplicant] / hostapd / driver.h
index 8a6d91b..3ea019e 100644 (file)
 #ifndef DRIVER_H
 #define DRIVER_H
 
+struct hostapd_data;
+
+struct hostap_sta_driver_data {
+       unsigned long rx_packets, tx_packets, rx_bytes, tx_bytes;
+       unsigned long current_tx_rate;
+       unsigned long inactive_msec;
+       unsigned long flags;
+       unsigned long num_ps_buf_frames;
+       unsigned long tx_retry_failed;
+       unsigned long tx_retry_count;
+       int last_rssi;
+       int last_ack_rssi;
+};
+
 struct hostapd_sta_add_params {
        const u8 *addr;
        u16 aid;
@@ -40,6 +54,14 @@ enum hostapd_driver_if_type {
        HOSTAPD_IF_VLAN, HOSTAPD_IF_WDS
 };
 
+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_driver_ops {
        const char *name;               /* as appears in the config file */
 
@@ -108,7 +130,7 @@ struct wpa_driver_ops {
        int (*get_inact_sec)(void *priv, const u8 *addr);
        int (*sta_clear_stats)(void *priv, const u8 *addr);
 
-       /* note: set_freq() is deprecated; use sta_freq() instead */
+       /* note: set_freq() is deprecated; use set_freq2() instead */
        int (*set_freq)(void *priv, int mode, int freq);
        int (*set_freq2)(void *priv, struct hostapd_freq_params *freq);
        int (*set_rts)(void *priv, int rts);
@@ -122,7 +144,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 (*set_regulatory_domain)(void *priv, unsigned int rd);
        int (*set_country)(void *priv, const char *country);
        int (*set_ieee80211d)(void *priv, int enabled);
        int (*set_beacon)(const char *ifname, void *priv,
@@ -195,6 +216,35 @@ 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);
+};
+
+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);
+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);
+void hostapd_eapol_receive(struct hostapd_data *hapd, const u8 *sa,
+                          const u8 *buf, size_t len);
+
+struct hostapd_frame_info {
+       u32 phytype;
+       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,
+                    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);
+
 #endif /* DRIVER_H */