diff options
Diffstat (limited to 'contrib/hostapd/driver.h')
-rw-r--r-- | contrib/hostapd/driver.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/contrib/hostapd/driver.h b/contrib/hostapd/driver.h index 365deda..ed9ecbf 100644 --- a/contrib/hostapd/driver.h +++ b/contrib/hostapd/driver.h @@ -11,14 +11,14 @@ struct driver_ops { void (*wireless_event_deinit)(void *priv); /** - * set_8021x - enable/disable 802.1x support + * set_8021x - enable/disable IEEE 802.1X support * @priv: driver private data * @enabled: 1 = enable, 0 = disable * * Returns: 0 on success, -1 on failure * - * Configure the kernel driver to enable/disable 802.1x support. - * This may be an empty function if 802.1x support is always enabled. + * Configure the kernel driver to enable/disable 802.1X support. + * This may be an empty function if 802.1X support is always enabled. */ int (*set_ieee8021x)(void *priv, int enabled); @@ -49,6 +49,7 @@ struct driver_ops { int (*sta_remove)(void *priv, u8 *addr); int (*get_ssid)(void *priv, u8 *buf, int len); int (*set_ssid)(void *priv, u8 *buf, int len); + int (*set_countermeasures)(void *priv, int enabled); int (*send_mgmt_frame)(void *priv, const void *msg, size_t len, int flags); int (*set_assoc_ap)(void *priv, u8 *addr); @@ -228,6 +229,14 @@ hostapd_set_assoc_ap(struct hostapd_data *hapd, u8 *addr) return hapd->driver->set_assoc_ap(hapd->driver, addr); } +static inline int +hostapd_set_countermeasures(struct hostapd_data *hapd, int enabled) +{ + if (hapd->driver == NULL || hapd->driver->set_countermeasures == NULL) + return 0; + return hapd->driver->set_countermeasures(hapd->driver, enabled); +} + static inline int hostapd_sta_add(struct hostapd_data *hapd, u8 *addr, u16 aid, u16 capability, u8 tx_supp_rates) |