aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-25 01:12:50 +0200
committerJouni Malinen <j@w1.fi>2009-12-25 01:12:50 +0200
commit1057d78eb8aa08bd17f2e1d12ba92d7c0718f294 (patch)
treeb911c9cc542fb460f61a86b2d6698aa82eb5cca3
parent6d1278e9980e0f2b92aecdb23de5433d8eb2c652 (diff)
downloadexternal_wpa_supplicant_8_ti-1057d78eb8aa08bd17f2e1d12ba92d7c0718f294.zip
external_wpa_supplicant_8_ti-1057d78eb8aa08bd17f2e1d12ba92d7c0718f294.tar.gz
external_wpa_supplicant_8_ti-1057d78eb8aa08bd17f2e1d12ba92d7c0718f294.tar.bz2
Move generic AP functionality implementation into src/ap
This code can be shared by both hostapd and wpa_supplicant and this is an initial step in getting the generic code moved to be under the src directories. Couple of generic files still remain under the hostapd directory due to direct dependencies to files there. Once the dependencies have been removed, they will also be moved to the src/ap directory to allow wpa_supplicant to be built without requiring anything from the hostapd directory.
-rw-r--r--hostapd/Makefile38
-rw-r--r--hostapd/ap_drv_ops.c6
-rw-r--r--hostapd/config_file.c5
-rw-r--r--hostapd/ctrl_iface.c16
-rw-r--r--hostapd/ctrl_iface_ap.c10
-rw-r--r--hostapd/driver_i.h2
-rw-r--r--hostapd/drv_callbacks.c18
-rw-r--r--hostapd/dump_state.c6
-rw-r--r--hostapd/hostapd.c22
-rw-r--r--hostapd/hw_features.c12
-rw-r--r--hostapd/iapp.c14
-rw-r--r--hostapd/main.c4
-rw-r--r--hostapd/wps_hostapd.c14
-rw-r--r--src/Makefile2
-rw-r--r--src/ap/Makefile9
-rw-r--r--src/ap/accounting.c (renamed from hostapd/accounting.c)0
-rw-r--r--src/ap/accounting.h (renamed from hostapd/accounting.h)0
-rw-r--r--src/ap/ap_list.c (renamed from hostapd/ap_list.c)13
-rw-r--r--src/ap/ap_list.h (renamed from hostapd/ap_list.h)0
-rw-r--r--src/ap/beacon.c (renamed from hostapd/beacon.c)3
-rw-r--r--src/ap/beacon.h (renamed from hostapd/beacon.h)0
-rw-r--r--src/ap/config.c (renamed from hostapd/config.c)0
-rw-r--r--src/ap/config.h (renamed from hostapd/config.h)0
-rw-r--r--src/ap/hostapd.h (renamed from hostapd/hostapd.h)0
-rw-r--r--src/ap/ieee802_11.c (renamed from hostapd/ieee802_11.c)9
-rw-r--r--src/ap/ieee802_11.h (renamed from hostapd/ieee802_11.h)0
-rw-r--r--src/ap/ieee802_11_auth.c (renamed from hostapd/ieee802_11_auth.c)0
-rw-r--r--src/ap/ieee802_11_auth.h (renamed from hostapd/ieee802_11_auth.h)0
-rw-r--r--src/ap/ieee802_11_ht.c (renamed from hostapd/ieee802_11_ht.c)0
-rw-r--r--src/ap/ieee802_1x.c (renamed from hostapd/ieee802_1x.c)1
-rw-r--r--src/ap/ieee802_1x.h (renamed from hostapd/ieee802_1x.h)0
-rw-r--r--src/ap/mlme.c (renamed from hostapd/mlme.c)0
-rw-r--r--src/ap/mlme.h (renamed from hostapd/mlme.h)0
-rw-r--r--src/ap/peerkey.c (renamed from hostapd/peerkey.c)0
-rw-r--r--src/ap/pmksa_cache.c (renamed from hostapd/pmksa_cache.c)0
-rw-r--r--src/ap/pmksa_cache.h (renamed from hostapd/pmksa_cache.h)0
-rw-r--r--src/ap/preauth.c (renamed from hostapd/preauth.c)0
-rw-r--r--src/ap/preauth.h (renamed from hostapd/preauth.h)0
-rw-r--r--src/ap/sta_info.c (renamed from hostapd/sta_info.c)1
-rw-r--r--src/ap/sta_info.h (renamed from hostapd/sta_info.h)0
-rw-r--r--src/ap/tkip_countermeasures.c (renamed from hostapd/tkip_countermeasures.c)0
-rw-r--r--src/ap/tkip_countermeasures.h (renamed from hostapd/tkip_countermeasures.h)0
-rw-r--r--src/ap/vlan_init.c (renamed from hostapd/vlan_init.c)0
-rw-r--r--src/ap/vlan_init.h (renamed from hostapd/vlan_init.h)0
-rw-r--r--src/ap/wmm.c (renamed from hostapd/wme.c)2
-rw-r--r--src/ap/wmm.h (renamed from hostapd/wme.h)0
-rw-r--r--src/ap/wpa.c (renamed from hostapd/wpa.c)0
-rw-r--r--src/ap/wpa.h (renamed from hostapd/wpa.h)0
-rw-r--r--src/ap/wpa_auth_i.h (renamed from hostapd/wpa_auth_i.h)0
-rw-r--r--src/ap/wpa_auth_ie.c (renamed from hostapd/wpa_auth_ie.c)0
-rw-r--r--src/ap/wpa_auth_ie.h (renamed from hostapd/wpa_auth_ie.h)0
-rw-r--r--src/ap/wpa_ft.c (renamed from hostapd/wpa_ft.c)2
-rw-r--r--wpa_supplicant/Makefile44
-rw-r--r--wpa_supplicant/ap.c6
-rw-r--r--wpa_supplicant/ibss_rsn.c4
55 files changed, 140 insertions, 123 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index f3e4275..b50a230 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -32,14 +32,23 @@ CFLAGS += -DCONFIG_NATIVE_WINDOWS
LIBS += -lws2_32
endif
-OBJS = hostapd.o main.o ieee802_1x.o \
- config.o config_file.o ieee802_11_auth.o \
- sta_info.o wpa.o \
- preauth.o pmksa_cache.o \
- drv_callbacks.o \
- tkip_countermeasures.o \
- mlme.o wpa_auth_ie.o
+OBJS = hostapd.o
+OBJS += main.o
+OBJS += config_file.o
+OBJS += drv_callbacks.o
OBJS += ap_drv_ops.o
+
+OBJS += ../src/ap/ieee802_1x.o
+OBJS += ../src/ap/config.o
+OBJS += ../src/ap/ieee802_11_auth.o
+OBJS += ../src/ap/sta_info.o
+OBJS += ../src/ap/wpa.o
+OBJS += ../src/ap/tkip_countermeasures.o
+OBJS += ../src/ap/mlme.o
+OBJS += ../src/ap/wpa_auth_ie.o
+OBJS += ../src/ap/preauth.o
+OBJS += ../src/ap/pmksa_cache.o
+
NEED_RC4=y
NEED_AES=y
NEED_MD5=y
@@ -93,13 +102,13 @@ endif
ifdef CONFIG_NO_ACCOUNTING
CFLAGS += -DCONFIG_NO_ACCOUNTING
else
-OBJS += accounting.o
+OBJS += ../src/ap/accounting.o
endif
ifdef CONFIG_NO_VLAN
CFLAGS += -DCONFIG_NO_VLAN
else
-OBJS += vlan_init.o
+OBJS += ../src/ap/vlan_init.o
endif
ifdef CONFIG_NO_CTRL_IFACE
@@ -125,7 +134,7 @@ endif
ifdef CONFIG_PEERKEY
CFLAGS += -DCONFIG_PEERKEY
-OBJS += peerkey.o
+OBJS += ../src/ap/peerkey.o
endif
ifdef CONFIG_IEEE80211W
@@ -136,7 +145,7 @@ endif
ifdef CONFIG_IEEE80211R
CFLAGS += -DCONFIG_IEEE80211R
-OBJS += wpa_ft.o
+OBJS += ../src/ap/wpa_ft.o
NEED_SHA256=y
NEED_AES_OMAC1=y
NEED_AES_UNWRAP=y
@@ -677,10 +686,13 @@ OBJS += ../src/utils/base64.o
endif
ifdef NEED_AP_MLME
-OBJS += beacon.o wme.o ap_list.o ieee802_11.o
+OBJS += ../src/ap/beacon.o
+OBJS += ../src/ap/wmm.o
+OBJS += ../src/ap/ap_list.o
+OBJS += ../src/ap/ieee802_11.o
OBJS += hw_features.o
ifdef CONFIG_IEEE80211N
-OBJS += ieee802_11_ht.o
+OBJS += ../src/ap/ieee802_11_ht.o
endif
CFLAGS += -DNEED_AP_MLME
endif
diff --git a/hostapd/ap_drv_ops.c b/hostapd/ap_drv_ops.c
index 26e2f8c..2324dc4 100644
--- a/hostapd/ap_drv_ops.c
+++ b/hostapd/ap_drv_ops.c
@@ -15,9 +15,9 @@
#include "includes.h"
#include "common.h"
-#include "hostapd.h"
-#include "ieee802_11.h"
-#include "sta_info.h"
+#include "ap/hostapd.h"
+#include "ap/ieee802_11.h"
+#include "ap/sta_info.h"
#include "driver_i.h"
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index c0a59db..8983f44 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -23,8 +23,9 @@
#include "drivers/driver.h"
#include "eap_server/eap.h"
#include "radius/radius_client.h"
-#include "wpa.h"
-#include "config.h"
+#include "ap/wpa.h"
+#include "ap/config.h"
+#include "config_file.h"
extern struct wpa_driver_ops *wpa_drivers[];
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index c6edb42..d0aac0e 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -21,18 +21,18 @@
#include <stddef.h>
#include "common.h"
-#include "hostapd.h"
#include "eloop.h"
-#include "config.h"
-#include "ieee802_1x.h"
-#include "wpa.h"
+#include "drivers/driver.h"
#include "radius/radius_client.h"
-#include "ieee802_11.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
+#include "ap/ieee802_1x.h"
+#include "ap/wpa.h"
+#include "ap/ieee802_11.h"
+#include "ap/sta_info.h"
+#include "ap/accounting.h"
#include "ctrl_iface.h"
-#include "sta_info.h"
-#include "accounting.h"
#include "wps_hostapd.h"
-#include "drivers/driver.h"
#include "ctrl_iface_ap.h"
diff --git a/hostapd/ctrl_iface_ap.c b/hostapd/ctrl_iface_ap.c
index 2465f70..3c1f8aa 100644
--- a/hostapd/ctrl_iface_ap.c
+++ b/hostapd/ctrl_iface_ap.c
@@ -15,11 +15,11 @@
#include "includes.h"
#include "common.h"
-#include "hostapd.h"
-#include "ieee802_1x.h"
-#include "wpa.h"
-#include "ieee802_11.h"
-#include "sta_info.h"
+#include "ap/hostapd.h"
+#include "ap/ieee802_1x.h"
+#include "ap/wpa.h"
+#include "ap/ieee802_11.h"
+#include "ap/sta_info.h"
#include "wps_hostapd.h"
#include "ctrl_iface_ap.h"
diff --git a/hostapd/driver_i.h b/hostapd/driver_i.h
index 51aa4b1..3d80ad7 100644
--- a/hostapd/driver_i.h
+++ b/hostapd/driver_i.h
@@ -16,7 +16,7 @@
#define DRIVER_I_H
#include "drivers/driver.h"
-#include "config.h"
+#include "ap/config.h"
static inline void *
hostapd_driver_init(struct hostapd_data *hapd, const u8 *bssid)
diff --git a/hostapd/drv_callbacks.c b/hostapd/drv_callbacks.c
index 9d63f52..9b652b3 100644
--- a/hostapd/drv_callbacks.c
+++ b/hostapd/drv_callbacks.c
@@ -15,17 +15,17 @@
#include "includes.h"
#include "common.h"
-#include "hostapd.h"
-#include "driver_i.h"
-#include "ieee802_11.h"
#include "radius/radius.h"
-#include "sta_info.h"
-#include "accounting.h"
-#include "tkip_countermeasures.h"
-#include "ieee802_1x.h"
-#include "wpa.h"
+#include "ap/hostapd.h"
+#include "ap/ieee802_11.h"
+#include "ap/sta_info.h"
+#include "ap/accounting.h"
+#include "ap/tkip_countermeasures.h"
+#include "ap/ieee802_1x.h"
+#include "ap/wpa.h"
+#include "ap/wmm.h"
+#include "driver_i.h"
#include "iapp.h"
-#include "wme.h"
#include "wps_hostapd.h"
diff --git a/hostapd/dump_state.c b/hostapd/dump_state.c
index 0a191dc..0ef6f1c 100644
--- a/hostapd/dump_state.c
+++ b/hostapd/dump_state.c
@@ -21,9 +21,9 @@
#include "eapol_auth/eapol_auth_sm.h"
#include "eapol_auth/eapol_auth_sm_i.h"
#include "eap_server/eap.h"
-#include "hostapd.h"
-#include "config.h"
-#include "sta_info.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
+#include "ap/sta_info.h"
static void fprint_char(FILE *f, char c)
diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index 07b9423..f480291 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -26,22 +26,22 @@
#include "eap_server/eap.h"
#include "eap_server/tncs.h"
#include "l2_packet/l2_packet.h"
-#include "hostapd.h"
-#include "ieee802_1x.h"
-#include "beacon.h"
+#include "ap/hostapd.h"
+#include "ap/sta_info.h"
+#include "ap/accounting.h"
+#include "ap/ap_list.h"
+#include "ap/beacon.h"
+#include "ap/ieee802_1x.h"
+#include "ap/ieee802_11_auth.h"
+#include "ap/preauth.h"
+#include "ap/tkip_countermeasures.h"
+#include "ap/vlan_init.h"
+#include "ap/wpa.h"
#include "hw_features.h"
-#include "accounting.h"
#include "iapp.h"
-#include "ieee802_11_auth.h"
-#include "sta_info.h"
-#include "ap_list.h"
#include "driver_i.h"
-#include "wpa.h"
-#include "preauth.h"
-#include "vlan_init.h"
#include "ctrl_iface.h"
#include "wps_hostapd.h"
-#include "tkip_countermeasures.h"
static int hostapd_flush_old_stations(struct hostapd_data *hapd);
diff --git a/hostapd/hw_features.c b/hostapd/hw_features.c
index ef1e174..e89c9d7 100644
--- a/hostapd/hw_features.c
+++ b/hostapd/hw_features.c
@@ -2,7 +2,7 @@
* hostapd / Hardware feature query and different modes
* Copyright 2002-2003, Instant802 Networks, Inc.
* Copyright 2005-2006, Devicescape Software, Inc.
- * Copyright (c) 2008, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2008-2009, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -14,16 +14,16 @@
* See README and COPYING for more details.
*/
-#include "includes.h"
+#include "utils/includes.h"
-#include "common.h"
-#include "hostapd.h"
+#include "utils/common.h"
+#include "utils/eloop.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
-#include "eloop.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
#include "hw_features.h"
#include "driver_i.h"
-#include "config.h"
void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features,
diff --git a/hostapd/iapp.c b/hostapd/iapp.c
index 806dc19..4545bfa 100644
--- a/hostapd/iapp.c
+++ b/hostapd/iapp.c
@@ -37,7 +37,7 @@
* - IEEE 802.11 context transfer
*/
-#include "includes.h"
+#include "utils/includes.h"
#include <net/if.h>
#include <sys/ioctl.h>
#ifdef USE_KERNEL_HEADERS
@@ -46,13 +46,13 @@
#include <netpacket/packet.h>
#endif /* USE_KERNEL_HEADERS */
-#include "common.h"
-#include "hostapd.h"
-#include "config.h"
-#include "ieee802_11.h"
+#include "utils/common.h"
+#include "utils/eloop.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
+#include "ap/ieee802_11.h"
+#include "ap/sta_info.h"
#include "iapp.h"
-#include "eloop.h"
-#include "sta_info.h"
#define IAPP_MULTICAST "224.0.1.178"
diff --git a/hostapd/main.c b/hostapd/main.c
index 9c0b7e2..abbab18 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -23,8 +23,8 @@
#include "common/version.h"
#include "eap_server/eap.h"
#include "eap_server/tncs.h"
-#include "hostapd.h"
-#include "config.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
#include "config_file.h"
diff --git a/hostapd/wps_hostapd.c b/hostapd/wps_hostapd.c
index 3004ba1..f4a3909 100644
--- a/hostapd/wps_hostapd.c
+++ b/hostapd/wps_hostapd.c
@@ -12,11 +12,11 @@
* See README and COPYING for more details.
*/
-#include "includes.h"
+#include "utils/includes.h"
-#include "common.h"
-#include "eloop.h"
-#include "uuid.h"
+#include "utils/common.h"
+#include "utils/eloop.h"
+#include "utils/uuid.h"
#include "crypto/dh_groups.h"
#include "common/wpa_ctrl.h"
#include "common/ieee802_11_defs.h"
@@ -26,9 +26,9 @@
#include "wps/wps.h"
#include "wps/wps_defs.h"
#include "wps/wps_dev_attr.h"
-#include "hostapd.h"
-#include "config.h"
-#include "sta_info.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
+#include "ap/sta_info.h"
#include "wps_hostapd.h"
diff --git a/src/Makefile b/src/Makefile
index faa5893..f47da7b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS=common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
+SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
all:
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done
diff --git a/src/ap/Makefile b/src/ap/Makefile
new file mode 100644
index 0000000..cffba62
--- /dev/null
+++ b/src/ap/Makefile
@@ -0,0 +1,9 @@
+all:
+ @echo Nothing to be made.
+
+clean:
+ for d in $(SUBDIRS); do make -C $$d clean; done
+ rm -f *~ *.o *.d
+
+install:
+ @echo Nothing to be made.
diff --git a/hostapd/accounting.c b/src/ap/accounting.c
index 12678bc..12678bc 100644
--- a/hostapd/accounting.c
+++ b/src/ap/accounting.c
diff --git a/hostapd/accounting.h b/src/ap/accounting.h
index f3d60f0..f3d60f0 100644
--- a/hostapd/accounting.h
+++ b/src/ap/accounting.h
diff --git a/hostapd/ap_list.c b/src/ap/ap_list.c
index ec6c2c0..4878104 100644
--- a/hostapd/ap_list.c
+++ b/src/ap/ap_list.c
@@ -1,6 +1,6 @@
/*
* hostapd / AP table
- * Copyright (c) 2002-2003, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
* Copyright (c) 2003-2004, Instant802 Networks, Inc.
* Copyright (c) 2006, Devicescape Software, Inc.
*
@@ -14,18 +14,17 @@
* See README and COPYING for more details.
*/
-#include "includes.h"
+#include "utils/includes.h"
-#include "common.h"
+#include "utils/common.h"
+#include "utils/eloop.h"
+#include "drivers/driver.h"
#include "hostapd.h"
#include "config.h"
#include "ieee802_11.h"
-#include "eloop.h"
#include "sta_info.h"
-#include "ap_list.h"
-#include "hw_features.h"
#include "beacon.h"
-#include "drivers/driver.h"
+#include "ap_list.h"
/* AP list is a double linked list with head->prev pointing to the end of the
diff --git a/hostapd/ap_list.h b/src/ap/ap_list.h
index f49f58b..f49f58b 100644
--- a/hostapd/ap_list.h
+++ b/src/ap/ap_list.h
diff --git a/hostapd/beacon.c b/src/ap/beacon.c
index a796cc3..d2a012a 100644
--- a/hostapd/beacon.c
+++ b/src/ap/beacon.c
@@ -22,9 +22,8 @@
#include "hostapd.h"
#include "ieee802_11.h"
#include "wpa.h"
-#include "wme.h"
+#include "wmm.h"
#include "beacon.h"
-#include "hw_features.h"
#include "drivers/driver.h"
#include "config.h"
#include "sta_info.h"
diff --git a/hostapd/beacon.h b/src/ap/beacon.h
index c1510e1..c1510e1 100644
--- a/hostapd/beacon.h
+++ b/src/ap/beacon.h
diff --git a/hostapd/config.c b/src/ap/config.c
index e62a9c2..e62a9c2 100644
--- a/hostapd/config.c
+++ b/src/ap/config.c
diff --git a/hostapd/config.h b/src/ap/config.h
index b8ce830..b8ce830 100644
--- a/hostapd/config.h
+++ b/src/ap/config.h
diff --git a/hostapd/hostapd.h b/src/ap/hostapd.h
index 39dc640..39dc640 100644
--- a/hostapd/hostapd.h
+++ b/src/ap/hostapd.h
diff --git a/hostapd/ieee802_11.c b/src/ap/ieee802_11.c
index cf81add..316965b 100644
--- a/hostapd/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -12,12 +12,12 @@
* See README and COPYING for more details.
*/
-#include "includes.h"
+#include "utils/includes.h"
#ifndef CONFIG_NATIVE_WINDOWS
-#include "common.h"
-#include "eloop.h"
+#include "utils/common.h"
+#include "utils/eloop.h"
#include "crypto/crypto.h"
#include "drivers/driver.h"
#include "common/wpa_ctrl.h"
@@ -26,12 +26,11 @@
#include "hostapd.h"
#include "ieee802_11.h"
#include "beacon.h"
-#include "hw_features.h"
#include "ieee802_11_auth.h"
#include "sta_info.h"
#include "ieee802_1x.h"
#include "wpa.h"
-#include "wme.h"
+#include "wmm.h"
#include "ap_list.h"
#include "accounting.h"
#include "config.h"
diff --git a/hostapd/ieee802_11.h b/src/ap/ieee802_11.h
index 3347256..3347256 100644
--- a/hostapd/ieee802_11.h
+++ b/src/ap/ieee802_11.h
diff --git a/hostapd/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c
index 5155100..5155100 100644
--- a/hostapd/ieee802_11_auth.c
+++ b/src/ap/ieee802_11_auth.c
diff --git a/hostapd/ieee802_11_auth.h b/src/ap/ieee802_11_auth.h
index b2971e5..b2971e5 100644
--- a/hostapd/ieee802_11_auth.h
+++ b/src/ap/ieee802_11_auth.h
diff --git a/hostapd/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 1cf612b..1cf612b 100644
--- a/hostapd/ieee802_11_ht.c
+++ b/src/ap/ieee802_11_ht.c
diff --git a/hostapd/ieee802_1x.c b/src/ap/ieee802_1x.c
index a6c934a..a619b15 100644
--- a/hostapd/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c
@@ -32,7 +32,6 @@
#include "preauth.h"
#include "pmksa_cache.h"
#include "config.h"
-#include "hw_features.h"
#include "eap_server/eap.h"
diff --git a/hostapd/ieee802_1x.h b/src/ap/ieee802_1x.h
index e7be41b..e7be41b 100644
--- a/hostapd/ieee802_1x.h
+++ b/src/ap/ieee802_1x.h
diff --git a/hostapd/mlme.c b/src/ap/mlme.c
index adc7ce6..adc7ce6 100644
--- a/hostapd/mlme.c
+++ b/src/ap/mlme.c
diff --git a/hostapd/mlme.h b/src/ap/mlme.h
index c77a939..c77a939 100644
--- a/hostapd/mlme.h
+++ b/src/ap/mlme.h
diff --git a/hostapd/peerkey.c b/src/ap/peerkey.c
index 4bee2d9..4bee2d9 100644
--- a/hostapd/peerkey.c
+++ b/src/ap/peerkey.c
diff --git a/hostapd/pmksa_cache.c b/src/ap/pmksa_cache.c
index 2df6c81..2df6c81 100644
--- a/hostapd/pmksa_cache.c
+++ b/src/ap/pmksa_cache.c
diff --git a/hostapd/pmksa_cache.h b/src/ap/pmksa_cache.h
index 9628b13..9628b13 100644
--- a/hostapd/pmksa_cache.h
+++ b/src/ap/pmksa_cache.h
diff --git a/hostapd/preauth.c b/src/ap/preauth.c
index d544fc5..d544fc5 100644
--- a/hostapd/preauth.c
+++ b/src/ap/preauth.c
diff --git a/hostapd/preauth.h b/src/ap/preauth.h
index 5348bee..5348bee 100644
--- a/hostapd/preauth.h
+++ b/src/ap/preauth.h
diff --git a/hostapd/sta_info.c b/src/ap/sta_info.c
index 0c7acc3..4016bd8 100644
--- a/hostapd/sta_info.c
+++ b/src/ap/sta_info.c
@@ -28,7 +28,6 @@
#include "preauth.h"
#include "config.h"
#include "beacon.h"
-#include "hw_features.h"
#include "mlme.h"
#include "vlan_init.h"
diff --git a/hostapd/sta_info.h b/src/ap/sta_info.h
index 55faa5a..55faa5a 100644
--- a/hostapd/sta_info.h
+++ b/src/ap/sta_info.h
diff --git a/hostapd/tkip_countermeasures.c b/src/ap/tkip_countermeasures.c
index e3c9f1b..e3c9f1b 100644
--- a/hostapd/tkip_countermeasures.c
+++ b/src/ap/tkip_countermeasures.c
diff --git a/hostapd/tkip_countermeasures.h b/src/ap/tkip_countermeasures.h
index 5a1afce..5a1afce 100644
--- a/hostapd/tkip_countermeasures.h
+++ b/src/ap/tkip_countermeasures.h
diff --git a/hostapd/vlan_init.c b/src/ap/vlan_init.c
index 3bce50c..3bce50c 100644
--- a/hostapd/vlan_init.c
+++ b/src/ap/vlan_init.c
diff --git a/hostapd/vlan_init.h b/src/ap/vlan_init.h
index 382d5de..382d5de 100644
--- a/hostapd/vlan_init.h
+++ b/src/ap/vlan_init.h
diff --git a/hostapd/wme.c b/src/ap/wmm.c
index a575fbc..2db2d8d 100644
--- a/hostapd/wme.c
+++ b/src/ap/wmm.c
@@ -18,9 +18,9 @@
#include "common.h"
#include "hostapd.h"
#include "ieee802_11.h"
-#include "wme.h"
#include "sta_info.h"
#include "config.h"
+#include "wmm.h"
/* TODO: maintain separate sequence and fragment numbers for each AC
diff --git a/hostapd/wme.h b/src/ap/wmm.h
index fbaf8ad..fbaf8ad 100644
--- a/hostapd/wme.h
+++ b/src/ap/wmm.h
diff --git a/hostapd/wpa.c b/src/ap/wpa.c
index 4af26e9..4af26e9 100644
--- a/hostapd/wpa.c
+++ b/src/ap/wpa.c
diff --git a/hostapd/wpa.h b/src/ap/wpa.h
index 55d4ec2..55d4ec2 100644
--- a/hostapd/wpa.h
+++ b/src/ap/wpa.h
diff --git a/hostapd/wpa_auth_i.h b/src/ap/wpa_auth_i.h
index 925d3ee..925d3ee 100644
--- a/hostapd/wpa_auth_i.h
+++ b/src/ap/wpa_auth_i.h
diff --git a/hostapd/wpa_auth_ie.c b/src/ap/wpa_auth_ie.c
index da37f82..da37f82 100644
--- a/hostapd/wpa_auth_ie.c
+++ b/src/ap/wpa_auth_ie.c
diff --git a/hostapd/wpa_auth_ie.h b/src/ap/wpa_auth_ie.h
index 9968d2d..9968d2d 100644
--- a/hostapd/wpa_auth_ie.h
+++ b/src/ap/wpa_auth_ie.h
diff --git a/hostapd/wpa_ft.c b/src/ap/wpa_ft.c
index 65d673a..172a07c 100644
--- a/hostapd/wpa_ft.c
+++ b/src/ap/wpa_ft.c
@@ -19,7 +19,7 @@
#include "config.h"
#include "wpa.h"
#include "ieee802_11.h"
-#include "wme.h"
+#include "wmm.h"
#include "wpa_auth_i.h"
#include "wpa_auth_ie.h"
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 725d51f..adbae08 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -588,14 +588,14 @@ CFLAGS += -DCONFIG_NO_RADIUS
CFLAGS += -DCONFIG_NO_ACCOUNTING
CFLAGS += -DCONFIG_NO_VLAN
OBJS += ../hostapd/hostapd.o
-OBJS += ../hostapd/config.o
+OBJS += ../src/ap/config.o
OBJS += ../src/utils/ip_addr.o
-OBJS += ../hostapd/sta_info.o
-OBJS += ../hostapd/tkip_countermeasures.o
-OBJS += ../hostapd/mlme.o
-OBJS += ../hostapd/ieee802_1x.o
+OBJS += ../src/ap/sta_info.o
+OBJS += ../src/ap/tkip_countermeasures.o
+OBJS += ../src/ap/mlme.o
+OBJS += ../src/ap/ieee802_1x.o
OBJS += ../src/eapol_auth/eapol_auth_sm.o
-OBJS += ../hostapd/ieee802_11_auth.o
+OBJS += ../src/ap/ieee802_11_auth.o
OBJS += ../hostapd/drv_callbacks.o
OBJS += ../hostapd/ap_drv_ops.o
ifdef CONFIG_CTRL_IFACE
@@ -612,13 +612,13 @@ CFLAGS += -DCONFIG_IEEE80211N
endif
ifdef NEED_AP_MLME
-OBJS += ../hostapd/beacon.o
-OBJS += ../hostapd/wme.o
-OBJS += ../hostapd/ap_list.o
-OBJS += ../hostapd/ieee802_11.o
+OBJS += ../src/ap/beacon.o
+OBJS += ../src/ap/wmm.o
+OBJS += ../src/ap/ap_list.o
+OBJS += ../src/ap/ieee802_11.o
OBJS += ../hostapd/hw_features.o
ifdef CONFIG_IEEE80211N
-OBJS += ../hostapd/ieee802_11_ht.o
+OBJS += ../src/ap/ieee802_11_ht.o
endif
CFLAGS += -DNEED_AP_MLME
endif
@@ -632,14 +632,14 @@ endif
ifdef NEED_RSN_AUTHENTICATOR
CFLAGS += -DCONFIG_NO_RADIUS
NEED_AES_WRAP=y
-OBJS += ../hostapd/wpa.o
-OBJS += ../hostapd/wpa_auth_ie.o
-OBJS += ../hostapd/pmksa_cache.o
+OBJS += ../src/ap/wpa.o
+OBJS += ../src/ap/wpa_auth_ie.o
+OBJS += ../src/ap/pmksa_cache.o
ifdef CONFIG_IEEE80211R
-OBJS += ../hostapd/wpa_ft.o
+OBJS += ../src/ap/wpa_ft.o
endif
ifdef CONFIG_PEERKEY
-OBJS += ../hostapd/peerkey.o
+OBJS += ../src/ap/peerkey.o
endif
endif
@@ -658,18 +658,18 @@ endif
ifdef CONFIG_AUTHENTICATOR
OBJS_h += ../src/eapol_auth/eapol_auth_sm.o
-OBJS_h += ../hostapd/ieee802_1x.o
+OBJS_h += ../src/ap/ieee802_1x.o
endif
ifdef CONFIG_WPA_AUTHENTICATOR
-OBJS_h += ../hostapd/wpa.o
-OBJS_h += ../hostapd/wpa_auth_ie.o
-OBJS_h += ../hostapd/pmksa_cache.o
+OBJS_h += ../src/ap/wpa.o
+OBJS_h += ../src/ap/wpa_auth_ie.o
+OBJS_h += ../src/ap/pmksa_cache.o
ifdef CONFIG_IEEE80211R
-OBJS_h += ../hostapd/wpa_ft.o
+OBJS_h += ../src/ap/wpa_ft.o
endif
ifdef CONFIG_PEERKEY
-OBJS_h += ../hostapd/peerkey.o
+OBJS_h += ../src/ap/peerkey.o
endif
endif
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 1cbcde0..0713469 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -16,10 +16,10 @@
#include "includes.h"
#include "common.h"
-#include "../hostapd/hostapd.h"
-#include "../hostapd/config.h"
+#include "ap/hostapd.h"
+#include "ap/config.h"
#ifdef NEED_AP_MLME
-#include "../hostapd/ieee802_11.h"
+#include "ap/ieee802_11.h"
#endif /* NEED_AP_MLME */
#include "../hostapd/wps_hostapd.h"
#include "../hostapd/ctrl_iface_ap.h"
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index a9f49d9..8545eff 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -16,11 +16,11 @@
#include "common.h"
#include "l2_packet/l2_packet.h"
-#include "wpa_supplicant_i.h"
#include "rsn_supp/wpa.h"
#include "rsn_supp/wpa_ie.h"
+#include "ap/wpa.h"
+#include "wpa_supplicant_i.h"
#include "driver_i.h"
-#include "../hostapd/wpa.h"
#include "ibss_rsn.h"