* 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"
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);
+}
#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 */
#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)
}
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)
{
}
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)
{
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)
#include "wpa_auth.h"
#include "wmm.h"
#include "wps_hostapd.h"
+#include "ap_config.h"
#include "driver_i.h"
#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);
#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,