aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-25 22:12:25 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-25 22:12:25 (GMT)
commit8b06c1ed0d4a59fc0652ca0185fcb087e3c61e5c (patch)
tree551ddf06a020945f0a7940baa42f657abb556b00 /src/ap
parent6226e38d002cac786709ef1c24fe09811f70b6d7 (diff)
downloadhostap-8b06c1ed0d4a59fc0652ca0185fcb087e3c61e5c.zip
hostap-8b06c1ed0d4a59fc0652ca0185fcb087e3c61e5c.tar.gz
hostap-8b06c1ed0d4a59fc0652ca0185fcb087e3c61e5c.tar.bz2
Remove ap_config.h dependency from driver_i.h
This adds explicit #include line for ap_config.h into the src/ap/*.c files that actually use the definitions from there.
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/ap_drv_ops.c67
-rw-r--r--src/ap/ap_drv_ops.h9
-rw-r--r--src/ap/driver_i.h57
-rw-r--r--src/ap/drv_callbacks.c1
-rw-r--r--src/ap/hostapd.c1
-rw-r--r--src/ap/wpa_auth_glue.c4
6 files changed, 76 insertions, 63 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 7ad32c6..381a3a7 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -12,12 +12,13 @@
* See README and COPYING for more details.
*/
-#include "includes.h"
+#include "utils/includes.h"
-#include "common.h"
-#include "ap/hostapd.h"
-#include "ap/ieee802_11.h"
-#include "ap/sta_info.h"
+#include "utils/common.h"
+#include "hostapd.h"
+#include "ieee802_11.h"
+#include "sta_info.h"
+#include "ap_config.h"
#include "driver_i.h"
#include "ap_drv_ops.h"
@@ -366,3 +367,59 @@ void hostapd_set_driver_ops(struct hostapd_driver_ops *ops)
ops->sta_remove = hostapd_sta_remove;
ops->set_countermeasures = hostapd_set_countermeasures;
}
+
+
+int hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
+{
+ if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
+ return 0;
+ return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
+ enabled);
+}
+
+
+int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
+ size_t elem_len)
+{
+ if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
+ return 0;
+ return hapd->driver->set_generic_elem(hapd->conf->iface,
+ hapd->drv_priv, elem, elem_len);
+}
+
+
+int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
+{
+ if (hapd->driver == NULL || hapd->driver->hapd_get_ssid == NULL)
+ return 0;
+ return hapd->driver->hapd_get_ssid(hapd->conf->iface, hapd->drv_priv,
+ buf, len);
+}
+
+
+int hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
+{
+ if (hapd->driver == NULL || hapd->driver->hapd_set_ssid == NULL)
+ return 0;
+ return hapd->driver->hapd_set_ssid(hapd->conf->iface, hapd->drv_priv,
+ buf, len);
+}
+
+
+int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type,
+ const char *ifname, const u8 *addr, void *bss_ctx)
+{
+ if (hapd->driver == NULL || hapd->driver->if_add == NULL)
+ return -1;
+ return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
+ ifname, addr, bss_ctx);
+}
+
+
+int hostapd_if_remove(struct hostapd_data *hapd, enum wpa_driver_if_type type,
+ const char *ifname)
+{
+ if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
+ return -1;
+ return hapd->driver->if_remove(hapd->drv_priv, type, ifname);
+}
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index d8da7ad..e0762d6 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -16,5 +16,14 @@
#define AP_DRV_OPS
void hostapd_set_driver_ops(struct hostapd_driver_ops *ops);
+int hostapd_set_privacy(struct hostapd_data *hapd, int enabled);
+int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
+ size_t elem_len);
+int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len);
+int hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len);
+int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type,
+ const char *ifname, const u8 *addr, void *bss_ctx);
+int hostapd_if_remove(struct hostapd_data *hapd, enum wpa_driver_if_type type,
+ const char *ifname);
#endif /* AP_DRV_OPS */
diff --git a/src/ap/driver_i.h b/src/ap/driver_i.h
index 9ab1b4a..ff0e1e6 100644
--- a/src/ap/driver_i.h
+++ b/src/ap/driver_i.h
@@ -16,7 +16,6 @@
#define DRIVER_I_H
#include "drivers/driver.h"
-#include "ap/ap_config.h"
static inline int
hostapd_set_ieee8021x(struct hostapd_data *hapd, struct wpa_bss_params *params)
@@ -27,15 +26,6 @@ hostapd_set_ieee8021x(struct hostapd_data *hapd, struct wpa_bss_params *params)
}
static inline int
-hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
-{
- if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
- return 0;
- return hapd->driver->set_privacy(hapd->conf->iface, hapd->drv_priv,
- enabled);
-}
-
-static inline int
hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
const u8 *addr, int idx, u8 *seq)
{
@@ -54,34 +44,6 @@ hostapd_flush(struct hostapd_data *hapd)
}
static inline int
-hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
- size_t elem_len)
-{
- if (hapd->driver == NULL || hapd->driver->set_generic_elem == NULL)
- return 0;
- return hapd->driver->set_generic_elem(hapd->conf->iface,
- hapd->drv_priv, elem, elem_len);
-}
-
-static inline int
-hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len)
-{
- if (hapd->driver == NULL || hapd->driver->hapd_get_ssid == NULL)
- return 0;
- return hapd->driver->hapd_get_ssid(hapd->conf->iface, hapd->drv_priv,
- buf, len);
-}
-
-static inline int
-hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len)
-{
- if (hapd->driver == NULL || hapd->driver->hapd_set_ssid == NULL)
- return 0;
- return hapd->driver->hapd_set_ssid(hapd->conf->iface, hapd->drv_priv,
- buf, len);
-}
-
-static inline int
hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, int channel,
int ht_enabled, int sec_channel_offset)
{
@@ -187,25 +149,6 @@ hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
return hapd->driver->valid_bss_mask(hapd->drv_priv, addr, mask);
}
-static inline int
-hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type,
- const char *ifname, const u8 *addr, void *bss_ctx)
-{
- if (hapd->driver == NULL || hapd->driver->if_add == NULL)
- return -1;
- return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
- ifname, addr, bss_ctx);
-}
-
-static inline int
-hostapd_if_remove(struct hostapd_data *hapd, enum wpa_driver_if_type type,
- const char *ifname)
-{
- if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
- return -1;
- return hapd->driver->if_remove(hapd->drv_priv, type, ifname);
-}
-
static inline struct hostapd_hw_modes *
hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
u16 *flags)
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index abf9163..fd7a366 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -26,6 +26,7 @@
#include "wpa_auth.h"
#include "wmm.h"
#include "wps_hostapd.h"
+#include "ap_config.h"
#include "driver_i.h"
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index e6151d5..b77ff27 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -34,6 +34,7 @@
#include "driver_i.h"
#include "wpa_auth_glue.h"
#include "ap_drv_ops.h"
+#include "ap_config.h"
static int hostapd_flush_old_stations(struct hostapd_data *hapd);
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index 82e4bbf..a8284b5 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -25,8 +25,10 @@
#include "preauth_auth.h"
#include "sta_info.h"
#include "tkip_countermeasures.h"
-#include "wpa_auth.h"
#include "driver_i.h"
+#include "ap_drv_ops.h"
+#include "ap_config.h"
+#include "wpa_auth.h"
static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,