aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hostapd/common.h9
-rw-r--r--hostapd/config.h4
-rw-r--r--hostapd/hostapd.h9
-rw-r--r--hostapd/pmksa_cache.c4
-rw-r--r--hostapd/wme.h1
-rw-r--r--hostapd/wpa.c3
-rw-r--r--wpa_supplicant/config.c1
-rw-r--r--wpa_supplicant/config_ssid.h4
-rw-r--r--wpa_supplicant/ctrl_iface_dbus.c1
-rw-r--r--wpa_supplicant/ctrl_iface_dbus_handlers.c1
-rw-r--r--wpa_supplicant/driver_bsd.c1
-rw-r--r--wpa_supplicant/driver_hostap.c1
-rw-r--r--wpa_supplicant/driver_ipw.c1
-rw-r--r--wpa_supplicant/driver_ndis.c1
-rw-r--r--wpa_supplicant/driver_ndis_.c1
-rw-r--r--wpa_supplicant/driver_ndiswrapper.c1
-rw-r--r--wpa_supplicant/driver_prism54.c1
-rw-r--r--wpa_supplicant/driver_wext.c1
-rw-r--r--wpa_supplicant/eapol_sm.c1
-rw-r--r--wpa_supplicant/eapol_test.c1
-rw-r--r--wpa_supplicant/l2_packet.h11
-rw-r--r--wpa_supplicant/mlme.c1
-rw-r--r--wpa_supplicant/peerkey.c1
-rw-r--r--wpa_supplicant/pmksa_cache.c1
-rw-r--r--wpa_supplicant/wpa.c1
-rw-r--r--wpa_supplicant/wpa.h8
26 files changed, 25 insertions, 45 deletions
diff --git a/hostapd/common.h b/hostapd/common.h
index 3a2062c..b233734 100644
--- a/hostapd/common.h
+++ b/hostapd/common.h
@@ -523,4 +523,13 @@ TCHAR * wpa_strdup_tchar(const char *str);
const char * wpa_ssid_txt(u8 *ssid, size_t ssid_len);
+#ifndef MAC2STR
+#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
+#endif
+
+#ifndef BIT
+#define BIT(x) (1 << (x))
+#endif
+
#endif /* COMMON_H */
diff --git a/hostapd/config.h b/hostapd/config.h
index ab9e288..13a9efa 100644
--- a/hostapd/config.h
+++ b/hostapd/config.h
@@ -17,6 +17,10 @@
#include "ip_addr.h"
+#ifndef IFNAMSIZ
+#define IFNAMSIZ 16
+#endif
+
typedef u8 macaddr[ETH_ALEN];
struct hostapd_radius_servers;
diff --git a/hostapd/hostapd.h b/hostapd/hostapd.h
index bdde321..c0b8b4d 100644
--- a/hostapd/hostapd.h
+++ b/hostapd/hostapd.h
@@ -32,15 +32,6 @@
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
#endif /* ETH_P_PAE */
-#ifndef BIT
-#define BIT(x) (1 << (x))
-#endif
-
-#ifndef MAC2STR
-#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
-#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
-#endif
-
#include "config.h"
#ifdef _MSC_VER
diff --git a/hostapd/pmksa_cache.c b/hostapd/pmksa_cache.c
index 3ec2769..2a738ec 100644
--- a/hostapd/pmksa_cache.c
+++ b/hostapd/pmksa_cache.c
@@ -14,7 +14,9 @@
#include "includes.h"
-#include "hostapd.h"
+#include "common.h"
+#include "ap.h"
+#include "config.h"
#include "common.h"
#include "wpa.h"
#include "eloop.h"
diff --git a/hostapd/wme.h b/hostapd/wme.h
index 8c20883..367bb80 100644
--- a/hostapd/wme.h
+++ b/hostapd/wme.h
@@ -136,6 +136,7 @@ enum {
WME_AC_VO = 3
};
+struct ieee80211_mgmt;
u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid);
int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len);
diff --git a/hostapd/wpa.c b/hostapd/wpa.c
index 416f342..1b785d0 100644
--- a/hostapd/wpa.c
+++ b/hostapd/wpa.c
@@ -16,7 +16,8 @@
#ifndef CONFIG_NATIVE_WINDOWS
-#include "hostapd.h"
+#include "common.h"
+#include "config.h"
#include "eapol_sm.h"
#include "wpa.h"
#include "wme.h"
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index d48e761..b97263b 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -19,7 +19,6 @@
#include "sha1.h"
#include "eapol_sm.h"
#include "eap.h"
-#include "l2_packet.h"
#include "config.h"
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index 1c8873c..80aa97d 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -15,10 +15,6 @@
#ifndef CONFIG_SSID_H
#define CONFIG_SSID_H
-#ifndef BIT
-#define BIT(n) (1 << (n))
-#endif
-
#define WPA_CIPHER_NONE BIT(0)
#define WPA_CIPHER_WEP40 BIT(1)
#define WPA_CIPHER_WEP104 BIT(2)
diff --git a/wpa_supplicant/ctrl_iface_dbus.c b/wpa_supplicant/ctrl_iface_dbus.c
index bf4faed..49138a5 100644
--- a/wpa_supplicant/ctrl_iface_dbus.c
+++ b/wpa_supplicant/ctrl_iface_dbus.c
@@ -25,7 +25,6 @@
#include "wpa_supplicant_i.h"
#include "ctrl_iface_dbus.h"
#include "ctrl_iface_dbus_handlers.h"
-#include "l2_packet.h"
#include "preauth.h"
#include "wpa_ctrl.h"
#include "eap.h"
diff --git a/wpa_supplicant/ctrl_iface_dbus_handlers.c b/wpa_supplicant/ctrl_iface_dbus_handlers.c
index eea0ddb..ac96e8b 100644
--- a/wpa_supplicant/ctrl_iface_dbus_handlers.c
+++ b/wpa_supplicant/ctrl_iface_dbus_handlers.c
@@ -21,7 +21,6 @@
#include "wpa_supplicant_i.h"
#include "ctrl_iface_dbus.h"
#include "ctrl_iface_dbus_handlers.h"
-#include "l2_packet.h"
#include "eap_methods.h"
#include "dbus_dict_helpers.h"
#include "wpa.h"
diff --git a/wpa_supplicant/driver_bsd.c b/wpa_supplicant/driver_bsd.c
index 8862da7..04eaebf 100644
--- a/wpa_supplicant/driver_bsd.c
+++ b/wpa_supplicant/driver_bsd.c
@@ -19,7 +19,6 @@
#include "driver.h"
#include "eloop.h"
#include "wpa_supplicant.h"
-#include "l2_packet.h"
#include "wpa.h" /* XXX for RSN_INFO_ELEM */
#include <net/if.h>
diff --git a/wpa_supplicant/driver_hostap.c b/wpa_supplicant/driver_hostap.c
index e920432..9f28ac9 100644
--- a/wpa_supplicant/driver_hostap.c
+++ b/wpa_supplicant/driver_hostap.c
@@ -21,7 +21,6 @@
#include "driver_wext.h"
#include "eloop.h"
#include "driver_hostap.h"
-#include "l2_packet.h"
#include "wpa_supplicant.h"
diff --git a/wpa_supplicant/driver_ipw.c b/wpa_supplicant/driver_ipw.c
index 6e7a8e1..ba34220 100644
--- a/wpa_supplicant/driver_ipw.c
+++ b/wpa_supplicant/driver_ipw.c
@@ -20,7 +20,6 @@
#include "wireless_copy.h"
#include "common.h"
#include "driver.h"
-#include "l2_packet.h"
#include "driver_wext.h"
#include "wpa_supplicant.h"
diff --git a/wpa_supplicant/driver_ndis.c b/wpa_supplicant/driver_ndis.c
index 3d5e82c..06a74c8 100644
--- a/wpa_supplicant/driver_ndis.c
+++ b/wpa_supplicant/driver_ndis.c
@@ -36,7 +36,6 @@ int close(int fd);
#include "common.h"
#include "driver.h"
#include "wpa_supplicant.h"
-#include "l2_packet.h"
#include "eloop.h"
#include "wpa.h"
#include "driver_ndis.h"
diff --git a/wpa_supplicant/driver_ndis_.c b/wpa_supplicant/driver_ndis_.c
index 9ce0f4e..a564bcc 100644
--- a/wpa_supplicant/driver_ndis_.c
+++ b/wpa_supplicant/driver_ndis_.c
@@ -17,7 +17,6 @@
#include "common.h"
#include "driver.h"
#include "wpa_supplicant.h"
-#include "l2_packet.h"
#include "eloop.h"
#include "wpa.h"
diff --git a/wpa_supplicant/driver_ndiswrapper.c b/wpa_supplicant/driver_ndiswrapper.c
index 12ba967..7692c64 100644
--- a/wpa_supplicant/driver_ndiswrapper.c
+++ b/wpa_supplicant/driver_ndiswrapper.c
@@ -20,7 +20,6 @@
#include "wireless_copy.h"
#include "common.h"
#include "driver.h"
-#include "l2_packet.h"
#include "eloop.h"
#include "priv_netlink.h"
#include "driver_wext.h"
diff --git a/wpa_supplicant/driver_prism54.c b/wpa_supplicant/driver_prism54.c
index 08f0fee..aba92f2 100644
--- a/wpa_supplicant/driver_prism54.c
+++ b/wpa_supplicant/driver_prism54.c
@@ -21,7 +21,6 @@
#include "driver.h"
#include "driver_wext.h"
#include "driver_hostap.h"
-#include "l2_packet.h"
#include "wpa_supplicant.h"
struct wpa_driver_prism54_data {
diff --git a/wpa_supplicant/driver_wext.c b/wpa_supplicant/driver_wext.c
index a5a5781..64ef894 100644
--- a/wpa_supplicant/driver_wext.c
+++ b/wpa_supplicant/driver_wext.c
@@ -25,7 +25,6 @@
#include "wireless_copy.h"
#include "common.h"
#include "driver.h"
-#include "l2_packet.h"
#include "eloop.h"
#include "wpa_supplicant.h"
#include "priv_netlink.h"
diff --git a/wpa_supplicant/eapol_sm.c b/wpa_supplicant/eapol_sm.c
index e4d383e..0fb40a6 100644
--- a/wpa_supplicant/eapol_sm.c
+++ b/wpa_supplicant/eapol_sm.c
@@ -18,7 +18,6 @@
#include "eapol_sm.h"
#include "eap.h"
#include "eloop.h"
-#include "l2_packet.h"
#include "wpa.h"
#include "md5.h"
#include "rc4.h"
diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
index 8117bfd..60b33cb 100644
--- a/wpa_supplicant/eapol_test.c
+++ b/wpa_supplicant/eapol_test.c
@@ -29,7 +29,6 @@
#include "wpa_supplicant_i.h"
#include "radius.h"
#include "radius_client.h"
-#include "l2_packet.h"
#include "ctrl_iface.h"
#include "pcsc_funcs.h"
diff --git a/wpa_supplicant/l2_packet.h b/wpa_supplicant/l2_packet.h
index 5d2ac4e..e69df28 100644
--- a/wpa_supplicant/l2_packet.h
+++ b/wpa_supplicant/l2_packet.h
@@ -21,17 +21,6 @@
#ifndef L2_PACKET_H
#define L2_PACKET_H
-#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
-#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
-
-#ifndef ETH_P_EAPOL
-#define ETH_P_EAPOL 0x888e
-#endif
-
-#ifndef ETH_P_RSN_PREAUTH
-#define ETH_P_RSN_PREAUTH 0x88c7
-#endif
-
/**
* struct l2_packet_data - Internal l2_packet data structure
*
diff --git a/wpa_supplicant/mlme.c b/wpa_supplicant/mlme.c
index 5f9a88e..4f742a6 100644
--- a/wpa_supplicant/mlme.c
+++ b/wpa_supplicant/mlme.c
@@ -23,7 +23,6 @@
#include "wpa_supplicant_i.h"
#include "wpa.h"
#include "os.h"
-#include "l2_packet.h"
#include "driver.h"
#include "mlme.h"
diff --git a/wpa_supplicant/peerkey.c b/wpa_supplicant/peerkey.c
index 0caccb5..85d9365 100644
--- a/wpa_supplicant/peerkey.c
+++ b/wpa_supplicant/peerkey.c
@@ -23,7 +23,6 @@
#include "wpa.h"
#include "wpa_i.h"
#include "wpa_ie.h"
-#include "l2_packet.h"
#include "peerkey.h"
diff --git a/wpa_supplicant/pmksa_cache.c b/wpa_supplicant/pmksa_cache.c
index b21d42c..d9cfa09 100644
--- a/wpa_supplicant/pmksa_cache.c
+++ b/wpa_supplicant/pmksa_cache.c
@@ -20,7 +20,6 @@
#include "config_ssid.h"
#include "sha1.h"
#include "wpa_i.h"
-#include "l2_packet.h"
#include "eapol_sm.h"
#include "pmksa_cache.h"
diff --git a/wpa_supplicant/wpa.c b/wpa_supplicant/wpa.c
index 8971829..4056ff8 100644
--- a/wpa_supplicant/wpa.c
+++ b/wpa_supplicant/wpa.c
@@ -22,7 +22,6 @@
#include "wpa.h"
#include "eloop.h"
#include "config_ssid.h"
-#include "l2_packet.h"
#include "eapol_sm.h"
#include "preauth.h"
#include "pmksa_cache.h"
diff --git a/wpa_supplicant/wpa.h b/wpa_supplicant/wpa.h
index 2d06f74..3711e8e 100644
--- a/wpa_supplicant/wpa.h
+++ b/wpa_supplicant/wpa.h
@@ -18,8 +18,12 @@
#include "defs.h"
#include "wpa_common.h"
-#ifndef BIT
-#define BIT(n) (1 << (n))
+#ifndef ETH_P_EAPOL
+#define ETH_P_EAPOL 0x888e
+#endif
+
+#ifndef ETH_P_RSN_PREAUTH
+#define ETH_P_RSN_PREAUTH 0x88c7
#endif
#define WPA_CAPABILITY_PREAUTH BIT(0)