From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Allow selecting BATMAN V if CFG80211 is not built
Date: Tue, 20 Sep 2016 15:59:17 +0200 [thread overview]
Message-ID: <20160920135917.24290-1-linus.luessing@c0d3.blue> (raw)
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 <linus.luessing@c0d3.blue>
---
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 <linux/version.h>
+#include_next <net/cfg80211.h>
+
+#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
--
2.1.4
next reply other threads:[~2016-09-20 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 13:59 Linus Lüssing [this message]
2016-09-20 15:51 ` [B.A.T.M.A.N.] [PATCH] batman-adv: Allow selecting BATMAN V if CFG80211 is not built Sven Eckelmann
2016-10-18 11:31 ` [B.A.T.M.A.N.] " Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160920135917.24290-1-linus.luessing@c0d3.blue \
--to=linus.luessing@c0d3.blue \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.