aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hostapd/Android.mk2
-rw-r--r--hostapd/Makefile2
-rw-r--r--src/drivers/driver.h14
-rw-r--r--src/drivers/driver_common.c30
-rw-r--r--wpa_supplicant/Android.mk2
-rw-r--r--wpa_supplicant/Makefile2
-rw-r--r--wpa_supplicant/symbian/wpa_supplicant.mmp2
-rwxr-xr-xwpa_supplicant/vs2005/eapol_test/eapol_test.vcproj4
-rwxr-xr-xwpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj4
-rwxr-xr-xwpa_supplicant/vs2005/wpasvc/wpasvc.vcproj4
10 files changed, 53 insertions, 13 deletions
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 2b53f03..44bc2a1 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -766,6 +766,8 @@ L_CFLAGS += -DCONFIG_P2P_MANAGER
OBJS += src/ap/p2p_hostapd.c
endif
+OBJS += src/drivers/driver_common.c
+
ifdef CONFIG_NO_STDOUT_DEBUG
L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
endif
diff --git a/hostapd/Makefile b/hostapd/Makefile
index efa1011..e46561e 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -749,6 +749,8 @@ ifdef CONFIG_INTERWORKING
CFLAGS += -DCONFIG_INTERWORKING
endif
+OBJS += ../src/drivers/driver_common.o
+
ifdef CONFIG_WPA_CLI_EDIT
OBJS_c += ../src/utils/edit.o
else
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 06f2db3..e84fe44 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -3492,17 +3492,7 @@ static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
}
-static inline void wpa_scan_results_free(struct wpa_scan_results *res)
-{
- size_t i;
-
- if (res == NULL)
- return;
-
- for (i = 0; i < res->num; i++)
- os_free(res->res[i]);
- os_free(res->res);
- os_free(res);
-}
+/* driver_common.c */
+void wpa_scan_results_free(struct wpa_scan_results *res);
#endif /* DRIVER_H */
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
new file mode 100644
index 0000000..3ea16e9
--- /dev/null
+++ b/src/drivers/driver_common.c
@@ -0,0 +1,30 @@
+/*
+ * Common driver-related functions
+ * Copyright (c) 2003-2011, 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
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#include "includes.h"
+#include "utils/common.h"
+#include "driver.h"
+
+void wpa_scan_results_free(struct wpa_scan_results *res)
+{
+ size_t i;
+
+ if (res == NULL)
+ return;
+
+ for (i = 0; i < res->num; i++)
+ os_free(res->res[i]);
+ os_free(res->res);
+ os_free(res);
+}
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index a717be4..7a76bc4 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -1330,6 +1330,8 @@ OBJS += offchannel.c
L_CFLAGS += -DCONFIG_OFFCHANNEL
endif
+OBJS += src/drivers/driver_common.c
+
OBJS_wpa_rm := ctrl_iface.c ctrl_iface_unix.c
OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.c
ifdef CONFIG_AUTHENTICATOR
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 3641a58..bb04db4 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1305,6 +1305,8 @@ OBJS += offchannel.o
CFLAGS += -DCONFIG_OFFCHANNEL
endif
+OBJS += ../src/drivers/driver_common.o
+
OBJS_wpa_rm := ctrl_iface.o ctrl_iface_unix.o
OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.o
ifdef CONFIG_AUTHENTICATOR
diff --git a/wpa_supplicant/symbian/wpa_supplicant.mmp b/wpa_supplicant/symbian/wpa_supplicant.mmp
index 217908e..e018e05 100644
--- a/wpa_supplicant/symbian/wpa_supplicant.mmp
+++ b/wpa_supplicant/symbian/wpa_supplicant.mmp
@@ -15,7 +15,7 @@ SOURCE wpa_supplicant.c events.c
SOURCEPATH ..\..\src\rsn_supp
SOURCE wpa.c preauth.c pmksa_cache.c peerkey.c wpa_ie.c
SOURCEPATH ..\..\src\drivers
-SOURCE drivers.c
+SOURCE drivers.c driver_common.c
SOURCEPATH ..\..\src\common
SOURCE wpa_common.c
SOURCEPATH ..\..\src\utils
diff --git a/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj b/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj
index d96f661..38b29c4 100755
--- a/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj
+++ b/wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj
@@ -251,6 +251,10 @@
>
</File>
<File
+ RelativePath="..\..\..\src\drivers\driver_common.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\eap_peer\eap.c"
>
</File>
diff --git a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
index e59cc6c..e3886b7 100755
--- a/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
+++ b/wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj
@@ -251,6 +251,10 @@
>
</File>
<File
+ RelativePath="..\..\..\src\drivers\driver_common.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\drivers\driver_ndis.c"
>
</File>
diff --git a/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj b/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj
index 4d402e5..1034891 100755
--- a/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj
+++ b/wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj
@@ -251,6 +251,10 @@
>
</File>
<File
+ RelativePath="..\..\..\src\drivers\driver_common.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\src\drivers\driver_ndis.c"
>
</File>