Remove ap_config.h dependency from driver_i.h
authorJouni Malinen <j@w1.fi>
Fri, 25 Dec 2009 22:12:25 +0000 (00:12 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 25 Dec 2009 22:12:25 +0000 (00:12 +0200)
This adds explicit #include line for ap_config.h into the src/ap/*.c
files that actually use the definitions from there.

src/ap/ap_drv_ops.c
src/ap/ap_drv_ops.h
src/ap/driver_i.h
src/ap/drv_callbacks.c
src/ap/hostapd.c
src/ap/wpa_auth_glue.c

index 7ad32c6..381a3a7 100644 (file)
  * 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);
+}
index d8da7ad..e0762d6 100644 (file)
 #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 */
index 9ab1b4a..ff0e1e6 100644 (file)
@@ -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)
index abf9163..fd7a366 100644 (file)
@@ -26,6 +26,7 @@
 #include "wpa_auth.h"
 #include "wmm.h"
 #include "wps_hostapd.h"
+#include "ap_config.h"
 #include "driver_i.h"
 
 
index e6151d5..b77ff27 100644 (file)
@@ -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);
index 82e4bbf..a8284b5 100644 (file)
 #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,