From patchwork Tue Sep 20 13:59:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 16697 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 7FF9E80867; Tue, 20 Sep 2016 15:59:22 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received-SPF: None (no SPF record) identity=mailfrom; client-ip=138.201.29.205; helo=mail.aperture-lab.de; envelope-from=linus.luessing@c0d3.blue; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received: from mail.aperture-lab.de (mail.aperture-lab.de [138.201.29.205]) by open-mesh.org (Postfix) with ESMTPS id 308128031C for ; Tue, 20 Sep 2016 15:59:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id DFCAFE1084; Tue, 20 Sep 2016 15:59:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id llVvJat9rFxo; Tue, 20 Sep 2016 15:59:19 +0200 (CEST) Received: from localhost (unknown [IPv6:2001:67c:2d50:0:127:c2f0:dcac:d90b]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA; Tue, 20 Sep 2016 15:59:19 +0200 (CEST) From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 20 Sep 2016 15:59:17 +0200 Message-Id: <20160920135917.24290-1-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Allow selecting BATMAN V if CFG80211 is not built X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" With the new stub for cfg80211_get_station(), we can now build the BATMAN V protocol even with a kernel that was built without any wireless support. Signed-off-by: Linus Lüssing Reviewed-by: Sven Eckelmann --- compat-include/net/cfg80211.h | 24 ++++++++++++++++++++++++ net/batman-adv/Kconfig | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 compat-include/net/cfg80211.h diff --git a/compat-include/net/cfg80211.h b/compat-include/net/cfg80211.h new file mode 100644 index 0000000..8dbbf0e --- /dev/null +++ b/compat-include/net/cfg80211.h @@ -0,0 +1,24 @@ +#ifndef _NET_BATMAN_ADV_COMPAT_NET_CFG80211_H_ +#define _NET_BATMAN_ADV_COMPAT_NET_CFG80211_H_ + +#include +#include_next + +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) + +#if !IS_ENABLED(CONFIG_CFG80211) + +#define cfg80211_get_station(dev, mac_addr, sinfo) \ + batadv_cfg80211_get_station(dev, mac_addr, sinfo) + +static inline int batadv_cfg80211_get_station(struct net_device *dev, + const u8 *mac_addr, + struct station_info *sinfo) +{ + return -ENOENT; +} +#endif + +#endif /* < KERNEL_VERSION(4, 8, 0) */ + +#endif /* _NET_BATMAN_ADV_COMPAT_NET_CFG80211_H_ */ diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig index f20742c..b73b96a 100644 --- a/net/batman-adv/Kconfig +++ b/net/batman-adv/Kconfig @@ -17,7 +17,7 @@ config BATMAN_ADV config BATMAN_ADV_BATMAN_V bool "B.A.T.M.A.N. V protocol (experimental)" - depends on BATMAN_ADV && CFG80211=y || (CFG80211=m && BATMAN_ADV=m) + depends on BATMAN_ADV && !(CFG80211=m && BATMAN_ADV=y) default n help This option enables the B.A.T.M.A.N. V protocol, the successor