summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hard-interface.c
diff options
context:
space:
mode:
authorMarek Lindner <mareklindner@neomailbox.ch>2016-05-10 22:31:59 +0800
committerSimon Wunderlich <sw@simonwunderlich.de>2016-06-30 10:29:43 +0200
commit7db682d1c39b2198a9c9d0bee5812d9c4329123d (patch)
tree14f9eef1514bf90cdfdc6f95c92ec5c7fd4afd8c /net/batman-adv/hard-interface.c
parent3a24a63e74af1bffc7aeb5d83adcd63b37e38425 (diff)
downloadlinux-7db682d1c39b2198a9c9d0bee5812d9c4329123d.tar.bz2
batman-adv: init ELP tweaking options only once
The ELP interval and throughput override interface settings are initialized with default settings on every time an interface is added to a mesh. This patch prevents this behavior by moving the configuration init to the interface detection routine which runs only once per interface. Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> [a@unstable.cc: move initialization to batadv_v_hardif_init] Signed-off-by: Antonio Quartulli <a@unstable.cc> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r--net/batman-adv/hard-interface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index db2009d84a25..3696929e5692 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -37,6 +37,7 @@
#include <linux/spinlock.h>
#include <linux/workqueue.h>
+#include "bat_algo.h"
#include "bridge_loop_avoidance.h"
#include "debugfs.h"
#include "distributed-arp-table.h"
@@ -683,6 +684,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
if (batadv_is_wifi_netdev(net_dev))
hard_iface->num_bcasts = BATADV_NUM_BCASTS_WIRELESS;
+ batadv_v_hardif_init(hard_iface);
+
/* extra reference for return */
kref_init(&hard_iface->refcount);
kref_get(&hard_iface->refcount);