The following commit has been merged in the merge/master branch: commit ffd2f27908e5bb532aadcc6bcc5a69dbeba758dd Author: Sven Eckelmann sven.eckelmann@open-mesh.com Date: Wed May 11 09:36:40 2016 +0200
batman-adv: Only init ELP tweaking options when BATMAN_V is enabled
The build currently fails with CONFIG_BATMAN_ADV_BATMAN_V=n because hard_iface->bat_v is only defined when CONFIG_BATMAN_ADV_BATMAN_V=y is set. The initialization of bat_v.throughput_override/bat_v.elp_interval must therefore only be compiled in when also BATMAN_V is enabled.
Fixes: 71e957cd30a0 ("batman-adv: init ELP tweaking options only once") Signed-off-by: Sven Eckelmann sven.eckelmann@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index dd6a5a2e..a8cda76 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -683,12 +683,14 @@ batadv_hardif_add_interface(struct net_device *net_dev) if (batadv_is_wifi_netdev(net_dev)) hard_iface->num_bcasts = BATADV_NUM_BCASTS_WIRELESS;
+#ifdef CONFIG_BATMAN_ADV_BATMAN_V /* enable link throughput auto-detection by setting the throughput * override to zero */ atomic_set(&hard_iface->bat_v.throughput_override, 0);
atomic_set(&hard_iface->bat_v.elp_interval, 500); +#endif
/* extra reference for return */ kref_init(&hard_iface->refcount);