[PATCH v2] Allow wpa_supplicant to use libnl-2.0.
Jon Loeliger
jdl
Mon Jul 6 07:50:25 PDT 2009
[PATCH] Allow wpa_supplicant to use libnl-2.0.
Change existing CONFIG_LIBNL20 compatibility code in
driver_nl80211.c to be used by both wpa_supplicant
and hostapd, but take care of nl_handle too now.
Propagate CONFIG_LIBNL20 out of .config file and onto
CFLAGS in the Makefile.
Use libnl-gen now too.
Signed-off-by: Jon Loeliger <jdl at bigfootnetworks.com>
---
V2 - Reworked to apply on hostap.git instead of hostap-06.git
This patch applies on:
git://w1.fi/srv/git/hostap.git
c8878307c4a5a163c459ecb5e83f6f61a2f33eb7
src/drivers/driver_nl80211.c | 5 +++--
wpa_supplicant/Makefile | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 26ee21e..0ed2d4b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -46,14 +46,15 @@
#ifdef HOSTAPD
#include "ieee802_11_common.h"
+#endif /* HOSTAPD */
+
#ifdef CONFIG_LIBNL20
/* libnl 2.0 compatibility code */
+#define nl_handle nl_sock
#define nl_handle_alloc_cb nl_socket_alloc_cb
#define nl_handle_destroy nl_socket_free
#endif /* CONFIG_LIBNL20 */
-#endif /* HOSTAPD */
-
#ifndef IFF_LOWER_UP
#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 1f23643..c2945f6 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -134,7 +134,10 @@ endif
ifdef CONFIG_DRIVER_NL80211
CFLAGS += -DCONFIG_DRIVER_NL80211
OBJS_d += ../src/drivers/driver_nl80211.o
-LIBS += -lnl
+LIBS += -lnl -lnl-genl
+ifdef CONFIG_LIBNL20
+CFLAGS += -DCONFIG_LIBNL20
+endif
ifdef CONFIG_CLIENT_MLME
OBJS_d += ../src/utils/radiotap.o
endif
--
1.6.3.GIT
More information about the Hostap
mailing list