b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [RFC PATCH 1/2] cfg80211: Add stub for cfg80211_get_station()
@ 2016-08-18  2:17 Linus Lüssing
  2016-08-18  2:17 ` [B.A.T.M.A.N.] [RFC PATCH 2/2] batman-adv: Allow selecting BATMAN V if CFG80211 is not built Linus Lüssing
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Lüssing @ 2016-08-18  2:17 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

This allows modules using this function (currently: batman-adv) to
compile even if cfg80211 is not built at all, thus relaxing
dependencies.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
 include/net/cfg80211.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9c23f4d3..beb7610 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1102,6 +1102,7 @@ struct station_info {
 	struct cfg80211_tid_stats pertid[IEEE80211_NUM_TIDS + 1];
 };
 
+#if IS_ENABLED(CONFIG_CFG80211)
 /**
  * cfg80211_get_station - retrieve information about a given station
  * @dev: the device where the station is supposed to be connected to
@@ -1114,6 +1115,14 @@ struct station_info {
  */
 int cfg80211_get_station(struct net_device *dev, const u8 *mac_addr,
 			 struct station_info *sinfo);
+#else
+static inline int cfg80211_get_station(struct net_device *dev,
+				       const u8 *mac_addr,
+				       struct station_info *sinfo)
+{
+	return -ENOENT;
+}
+#endif
 
 /**
  * enum monitor_flags - monitor flags
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [B.A.T.M.A.N.] [RFC PATCH 2/2] batman-adv: Allow selecting BATMAN V if CFG80211 is not built
  2016-08-18  2:17 [B.A.T.M.A.N.] [RFC PATCH 1/2] cfg80211: Add stub for cfg80211_get_station() Linus Lüssing
@ 2016-08-18  2:17 ` Linus Lüssing
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Lüssing @ 2016-08-18  2:17 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

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>

---
ToDo: compat-code
---
 net/batman-adv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
index 833bb14..01ea6e3 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-18  2:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-18  2:17 [B.A.T.M.A.N.] [RFC PATCH 1/2] cfg80211: Add stub for cfg80211_get_station() Linus Lüssing
2016-08-18  2:17 ` [B.A.T.M.A.N.] [RFC PATCH 2/2] batman-adv: Allow selecting BATMAN V if CFG80211 is not built Linus Lüssing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).