Move wps_hostapd.c into src/ap
authorJouni Malinen <j@w1.fi>
Thu, 24 Dec 2009 23:26:37 +0000 (01:26 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 24 Dec 2009 23:26:37 +0000 (01:26 +0200)
hostapd/Makefile
hostapd/ctrl_iface.c
hostapd/ctrl_iface_ap.c
hostapd/drv_callbacks.c
hostapd/hostapd.c
hostapd/main.c
src/ap/hostapd.h
src/ap/wps_hostapd.c [moved from hostapd/wps_hostapd.c with 99% similarity]
src/ap/wps_hostapd.h [moved from hostapd/wps_hostapd.h with 100% similarity]
wpa_supplicant/Makefile

index b50a230..900bd26 100644 (file)
@@ -38,6 +38,7 @@ OBJS += config_file.o
 OBJS += drv_callbacks.o
 OBJS += ap_drv_ops.o
 
+OBJS += ../src/ap/utils.o
 OBJS += ../src/ap/ieee802_1x.o
 OBJS += ../src/ap/config.o
 OBJS += ../src/ap/ieee802_11_auth.o
@@ -289,7 +290,7 @@ endif
 ifdef CONFIG_WPS
 CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
 OBJS += ../src/utils/uuid.o
-OBJS += wps_hostapd.o
+OBJS += ../src/ap/wps_hostapd.o
 OBJS += ../src/eap_server/eap_wsc.o ../src/eap_common/eap_wsc_common.o
 OBJS += ../src/wps/wps.o
 OBJS += ../src/wps/wps_common.o
index d0aac0e..479724c 100644 (file)
@@ -31,8 +31,8 @@
 #include "ap/ieee802_11.h"
 #include "ap/sta_info.h"
 #include "ap/accounting.h"
+#include "ap/wps_hostapd.h"
 #include "ctrl_iface.h"
-#include "wps_hostapd.h"
 #include "ctrl_iface_ap.h"
 
 
index 3c1f8aa..7940f80 100644 (file)
@@ -20,7 +20,7 @@
 #include "ap/wpa.h"
 #include "ap/ieee802_11.h"
 #include "ap/sta_info.h"
-#include "wps_hostapd.h"
+#include "ap/wps_hostapd.h"
 #include "ctrl_iface_ap.h"
 
 
index 9b652b3..81c1b82 100644 (file)
@@ -24,9 +24,9 @@
 #include "ap/ieee802_1x.h"
 #include "ap/wpa.h"
 #include "ap/wmm.h"
+#include "ap/wps_hostapd.h"
 #include "driver_i.h"
 #include "iapp.h"
-#include "wps_hostapd.h"
 
 
 int hostapd_notif_new_sta(struct hostapd_data *hapd, const u8 *addr)
index f480291..15efd50 100644 (file)
 #include "ap/tkip_countermeasures.h"
 #include "ap/vlan_init.h"
 #include "ap/wpa.h"
+#include "ap/wps_hostapd.h"
 #include "hw_features.h"
 #include "iapp.h"
 #include "driver_i.h"
 #include "ctrl_iface.h"
-#include "wps_hostapd.h"
 
 
 static int hostapd_flush_old_stations(struct hostapd_data *hapd);
@@ -1466,29 +1466,6 @@ void hostapd_interface_deinit(struct hostapd_iface *iface)
 }
 
 
-int hostapd_register_probereq_cb(struct hostapd_data *hapd,
-                                void (*cb)(void *ctx, const u8 *sa,
-                                           const u8 *ie, size_t ie_len),
-                                void *ctx)
-{
-       struct hostapd_probereq_cb *n;
-
-       n = os_realloc(hapd->probereq_cb, (hapd->num_probereq_cb + 1) *
-                      sizeof(struct hostapd_probereq_cb));
-       if (n == NULL)
-               return -1;
-
-       hapd->probereq_cb = n;
-       n = &hapd->probereq_cb[hapd->num_probereq_cb];
-       hapd->num_probereq_cb++;
-
-       n->cb = cb;
-       n->ctx = ctx;
-
-       return 0;
-}
-
-
 struct prune_data {
        struct hostapd_data *hapd;
        const u8 *addr;
index abbab18..a08da3a 100644 (file)
@@ -179,6 +179,7 @@ static struct hostapd_iface * hostapd_init(const char *config_file)
        if (hapd_iface == NULL)
                goto fail;
 
+       hapd_iface->reload_config = hostapd_reload_config;
        hapd_iface->config_read_cb = hostapd_config_read;
        hapd_iface->config_fname = os_strdup(config_file);
        if (hapd_iface->config_fname == NULL)
index 39dc640..b3c5266 100644 (file)
@@ -176,6 +176,7 @@ struct hostapd_data {
 struct hostapd_iface {
        struct hapd_interfaces *interfaces;
        void *owner;
+       int (*reload_config)(struct hostapd_iface *iface);
        struct hostapd_config * (*config_read_cb)(const char *config_fname);
        char *config_fname;
        struct hostapd_config *conf;
similarity index 99%
rename from hostapd/wps_hostapd.c
rename to src/ap/wps_hostapd.c
index f4a3909..965db26 100644 (file)
@@ -165,7 +165,7 @@ static void wps_reload_config(void *eloop_data, void *user_ctx)
        struct hostapd_iface *iface = eloop_data;
 
        wpa_printf(MSG_DEBUG, "WPS: Reload configuration data");
-       if (hostapd_reload_config(iface) < 0) {
+       if (iface->reload_config(iface) < 0) {
                wpa_printf(MSG_WARNING, "WPS: Failed to reload the updated "
                           "configuration");
        }
similarity index 100%
rename from hostapd/wps_hostapd.h
rename to src/ap/wps_hostapd.h
index adbae08..3616b14 100644 (file)
@@ -588,6 +588,7 @@ CFLAGS += -DCONFIG_NO_RADIUS
 CFLAGS += -DCONFIG_NO_ACCOUNTING
 CFLAGS += -DCONFIG_NO_VLAN
 OBJS += ../hostapd/hostapd.o
+OBJS += ../src/ap/utils.o
 OBJS += ../src/ap/config.o
 OBJS += ../src/utils/ip_addr.o
 OBJS += ../src/ap/sta_info.o
@@ -624,7 +625,7 @@ CFLAGS += -DNEED_AP_MLME
 endif
 ifdef CONFIG_WPS
 CFLAGS += -DEAP_SERVER_WSC
-OBJS += ../hostapd/wps_hostapd.o
+OBJS += ../src/ap/wps_hostapd.o
 OBJS += ../src/eap_server/eap_wsc.o
 endif
 endif