* See README and COPYING for more details.
*/
-#ifndef DRIVER_H
-#define DRIVER_H
+#ifndef HOSTAPD_DRIVER_H
+#define HOSTAPD_DRIVER_H
+#include "defs.h"
#include "sta_flags.h"
struct hostapd_data;
struct hostapd_freq_params {
int mode;
int freq;
+ int channel;
int ht_enabled;
int sec_channel_offset; /* 0 = HT40 disabled, -1 = HT40 enabled,
* secondary channel below primary, 1 = HT40
int sec_chan; /* 0 for 20 MHz channels */
};
-struct wpa_driver_ops {
+struct hapd_driver_ops {
const char *name; /* as appears in the config file */
void * (*init)(struct hostapd_data *hapd);
void * (*init_bssid)(struct hostapd_data *hapd, const u8 *bssid);
void (*deinit)(void *priv);
- int (*wireless_event_init)(void *priv);
- void (*wireless_event_deinit)(void *priv);
-
/**
* set_8021x - enable/disable IEEE 802.1X support
* @ifname: Interface name (for multi-SSID/VLAN support)
*/
int (*set_privacy)(const char *ifname, void *priv, int enabled);
- int (*set_encryption)(const char *ifname, void *priv, const char *alg,
- const u8 *addr, int idx,
- const u8 *key, size_t key_len, int txkey);
+ int (*set_key)(const char *ifname, void *priv, wpa_alg alg,
+ const u8 *addr, int key_idx, int set_tx, const u8 *seq,
+ size_t seq_len, const u8 *key, size_t key_len);
int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
int idx, u8 *seq);
int (*get_seqnum_igtk)(const char *ifname, void *priv, const u8 *addr,
int (*set_countermeasures)(void *priv, int enabled);
int (*send_mgmt_frame)(void *priv, const void *msg, size_t len,
int flags);
- /* note: sta_add() is deprecated; use sta_add2() instead */
- int (*sta_add)(const char *ifname, void *priv, const u8 *addr, u16 aid,
- u16 capability, u8 *supp_rates, size_t supp_rates_len,
- int flags, u16 listen_interval);
- int (*sta_add2)(const char *ifname, void *priv,
- struct hostapd_sta_add_params *params);
+ int (*sta_add)(const char *ifname, void *priv,
+ struct hostapd_sta_add_params *params);
int (*get_inact_sec)(void *priv, const u8 *addr);
int (*sta_clear_stats)(void *priv, const u8 *addr);
int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
int (*set_rts)(void *priv, int rts);
- int (*get_rts)(void *priv, int *rts);
int (*set_frag)(void *priv, int frag);
- int (*get_frag)(void *priv, int *frag);
int (*set_retry)(void *priv, int short_retry, int long_retry);
- int (*get_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);
int (*set_country)(void *priv, const char *country);
int (*set_ieee80211d)(void *priv, int enabled);
int (*set_beacon)(const char *ifname, void *priv,
- u8 *head, size_t head_len,
- u8 *tail, size_t tail_len);
+ const u8 *head, size_t head_len,
+ const u8 *tail, size_t tail_len, int dtim_period);
/* Configure internal bridge:
* 0 = disabled, i.e., client separation is enabled (no bridging of
*/
int (*set_internal_bridge)(void *priv, int value);
int (*set_beacon_int)(void *priv, int value);
- int (*set_dtim_period)(const char *ifname, void *priv, int value);
/* Configure broadcast SSID mode:
* 0 = include SSID in Beacon frames and reply to Probe Request frames
* that use broadcast SSID
*/
int (*set_broadcast_ssid)(void *priv, int value);
int (*set_cts_protect)(void *priv, int value);
- int (*set_key_tx_rx_threshold)(void *priv, int value);
int (*set_preamble)(void *priv, int value);
int (*set_short_slot_time)(void *priv, int value);
int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
(*get_neighbor_bss)(void *priv, size_t *num);
};
+struct sta_info;
+
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,
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);
-#endif /* DRIVER_H */
+#endif /* HOSTAPD_DRIVER_H */