diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 26ee21e24..962b8c3ad 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -45,15 +45,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 1f23643ee..9f0cc7d6a 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -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