Re: [PATCH] wpa_supplicant: fix libnl-tiny support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 02 Mar 2016 15:00:32 +0100
Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:

> the code already has the ability to deal with libnl 1.1
> (or compatible) API, so you don't need to redefine everything afaict.

It's compatible with 2.0 and 3.x, not with 1.1 as far as I see.

Here's a cleaner patch, more in line with the coding style:

Signed-off-by: Dima Krasner <dima@xxxxxxxxxxxxxxx>
---
 src/drivers/driver_nl80211.h | 7 +++++++
 src/drivers/drivers.mak      | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index 4fa7d5f..b385fb9 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -17,6 +17,13 @@
 #include "utils/list.h"
 #include "driver.h"
 
+#ifdef CONFIG_LIBNL_TINY
+/* libnl-tiny compatibility code */
+#define nl_handle nl_sock
+#define nl_handle_alloc_cb nl_socket_alloc_cb
+#define nl_handle_destroy nl_socket_free
+#endif
+
 #ifdef CONFIG_LIBNL20
 /* libnl 2.0 compatibility code */
 #define nl_handle nl_sock
diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index c4f5f97..d3b8185 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
@@ -56,6 +56,7 @@ endif
 else
   ifdef CONFIG_LIBNL_TINY
     DRV_LIBS += -lnl-tiny
+    DRV_CFLAGS += -DCONFIG_LIBNL_TINY
   else
     ifndef CONFIG_OSX
       DRV_LIBS += -lnl
@@ -172,6 +173,7 @@ ifdef CONFIG_LIBNL32
 else
   ifdef CONFIG_LIBNL_TINY
     DRV_LIBS += -lnl-tiny
+    DRV_CFLAGS += -DCONFIG_LIBNL_TINY
   else
     DRV_LIBS += -lnl
   endif
-- 
2.1.4


-- 
Dima Krasner <dima@xxxxxxxxxxxxxxx>


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux