aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'hostapd/driver.h')
-rw-r--r--hostapd/driver.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/hostapd/driver.h b/hostapd/driver.h
index 68ccc93..b8b1303 100644
--- a/hostapd/driver.h
+++ b/hostapd/driver.h
@@ -83,6 +83,8 @@ struct driver_ops {
unsigned char power_level,
unsigned char antenna_max);
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,
u8 *head, size_t head_len,
u8 *tail, size_t tail_len);
@@ -431,6 +433,23 @@ hostapd_set_regulatory_domain(struct hostapd_data *hapd, unsigned int rd)
return hapd->driver->set_regulatory_domain(hapd->driver, rd);
}
+static inline int
+hostapd_set_country(struct hostapd_data *hapd, const char *country)
+{
+ if (hapd->driver == NULL ||
+ hapd->driver->set_country == NULL)
+ return 0;
+ return hapd->driver->set_country(hapd->driver, country);
+}
+
+static inline int
+hostapd_set_ieee80211d(struct hostapd_data *hapd, int enabled)
+{
+ if (hapd->driver == NULL ||
+ hapd->driver->set_ieee80211d == NULL)
+ return 0;
+ return hapd->driver->set_ieee80211d(hapd->driver, enabled);
+}
void driver_register(const char *name, const struct driver_ops *ops);
void driver_unregister(const char *name);