]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow wpa_supplicant to use libnl-2.0
authorJon Loeliger <jdl@bigfootnetworks.com>
Sat, 25 Jul 2009 14:21:52 +0000 (17:21 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 25 Jul 2009 14:21:52 +0000 (17:21 +0300)
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@bigfootnetworks.com>
---

src/drivers/driver_nl80211.c
wpa_supplicant/Makefile

index 26ee21e2499a99a02554702793298a890efab638..962b8c3ad832eab6b96e5ea0a457b5cb83260591 100644 (file)
 
 #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         */
index 1f23643eedf1e257236495ad3c782564cdf76e92..9f0cc7d6a919c97cc4292d7b990855b53dfd0438 100644 (file)
@@ -135,6 +135,10 @@ ifdef CONFIG_DRIVER_NL80211
 CFLAGS += -DCONFIG_DRIVER_NL80211
 OBJS_d += ../src/drivers/driver_nl80211.o
 LIBS += -lnl
+ifdef CONFIG_LIBNL20
+LIBS += -lnl-genl
+CFLAGS += -DCONFIG_LIBNL20
+endif
 ifdef CONFIG_CLIENT_MLME
 OBJS_d += ../src/utils/radiotap.o
 endif