btfilter: add patch to support libnl-3

Now that btfilter supports libnl-3, remove DEL's preferred version of
libnl on 2.0

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-01-31 12:08:00 +01:00
parent 28e2e69733
commit 97777f8363
3 changed files with 76 additions and 1 deletions

View File

@ -32,7 +32,6 @@ PREFERRED_VERSION_linux-yocto_qemux86-64 ?= "3.4%"
PREFERRED_VERSION_linux-yocto_qemuarm ?= "3.4%"
PREFERRED_VERSION_linux-yocto_qemumips ?= "3.4%"
PREFERRED_VERSION_linux-yocto_qemuppc ?= "3.4%"
PREFERRED_VERSION_libnl ?= "2.0"
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}"
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"

View File

@ -0,0 +1,75 @@
From: Javier Viguera <javier.viguera@digi.com>
Date: Thu, 31 Jan 2013 11:23:37 +0100
Subject: [PATCH] enable-libnl3
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
Makefile | 8 +++++++-
nl80211_utils.c | 4 ++--
nl80211_utils.h | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 797dc51..66f469e 100644
--- a/Makefile
+++ b/Makefile
@@ -55,17 +55,23 @@ LIBS= -ldbus-1 -lpthread -lrt -lbluetooth
NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y)
NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y)
+NL3FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.0 && echo Y)
ifeq ($(NL1FOUND),Y)
+CFLAGS += -DCONFIG_LIBNL1
NLLIBNAME = libnl-1
endif
ifeq ($(NL2FOUND),Y)
-CFLAGS += -DCONFIG_LIBNL20
LIBS += -lnl-genl
NLLIBNAME = libnl-2.0
endif
+ifeq ($(NL3FOUND),Y)
+LIBS += -lnl-genl
+NLLIBNAME = libnl-3.0
+endif
+
#ifeq ($(NLLIBNAME),)
#$(error Cannot find development files for any supported version of libnl)
#endif
diff --git a/nl80211_utils.c b/nl80211_utils.c
index 4689044..2957f2e 100644
--- a/nl80211_utils.c
+++ b/nl80211_utils.c
@@ -9,7 +9,7 @@
#include <net/if.h>
#include "nl80211_utils.h"
-#ifndef CONFIG_LIBNL20
+#ifdef CONFIG_LIBNL1
/* libnl 2.0 compatibility code */
static inline int __genl_ctrl_alloc_cache(struct nl_sock *h, struct nl_cache **cache)
@@ -24,7 +24,7 @@ static inline int __genl_ctrl_alloc_cache(struct nl_sock *h, struct nl_cache **c
#define nl_socket_alloc nl_handle_alloc
#define nl_socket_free nl_handle_destroy
-#endif /* CONFIG_LIBNL20 */
+#endif /* CONFIG_LIBNL1 */
int iw_debug = 0;
diff --git a/nl80211_utils.h b/nl80211_utils.h
index e58767a..e8c482a 100644
--- a/nl80211_utils.h
+++ b/nl80211_utils.h
@@ -11,7 +11,7 @@
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
-#ifndef CONFIG_LIBNL20
+#ifdef CONFIG_LIBNL1
#define nl_sock nl_handle
#endif

View File

@ -9,6 +9,7 @@ PR = "r0"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "${DIGI_LOG_MIRROR}${PN}-${PV}.tar.bz2 \
file://0001-enable-libnl3.patch \
file://S65bluez-bg.sh"
S = "${WORKDIR}/${PN}-${PV}"