diff options
author | David S. Miller <davem@davemloft.net> | 2017-03-16 20:05:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-16 20:05:38 +0100 |
commit | b124f413323e90398b868a9848e63149d0fed8ce (patch) | |
tree | cefa770d1522702c92d94869fd51a22585357e9d /net/batman-adv/bat_v.c | |
parent | openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD (diff) | |
parent | batman-adv: Initialize gw sel_class via batadv_algo (diff) | |
download | linux-b124f413323e90398b868a9848e63149d0fed8ce.tar.xz linux-b124f413323e90398b868a9848e63149d0fed8ce.zip |
Merge tag 'batadv-net-for-davem-20170316' of git://git.open-mesh.org/linux-merge
Simon Wunderlich says:
====================
Here are two batman-adv bugfixes:
- Keep fragments equally sized, avoids some problems with too small fragments,
by Sven Eckelmann
- Initialize gateway class correctly when BATMAN V is compiled in,
by Sven Eckelmann
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/bat_v.c')
-rw-r--r-- | net/batman-adv/bat_v.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c index 0acd081dd286..a36c8e7291d6 100644 --- a/net/batman-adv/bat_v.c +++ b/net/batman-adv/bat_v.c @@ -668,6 +668,16 @@ err_ifinfo1: return ret; } +/** + * batadv_v_init_sel_class - initialize GW selection class + * @bat_priv: the bat priv with all the soft interface information + */ +static void batadv_v_init_sel_class(struct batadv_priv *bat_priv) +{ + /* set default throughput difference threshold to 5Mbps */ + atomic_set(&bat_priv->gw.sel_class, 50); +} + static ssize_t batadv_v_store_sel_class(struct batadv_priv *bat_priv, char *buff, size_t count) { @@ -1052,6 +1062,7 @@ static struct batadv_algo_ops batadv_batman_v __read_mostly = { .dump = batadv_v_orig_dump, }, .gw = { + .init_sel_class = batadv_v_init_sel_class, .store_sel_class = batadv_v_store_sel_class, .show_sel_class = batadv_v_show_sel_class, .get_best_gw_node = batadv_v_gw_get_best_gw_node, @@ -1092,9 +1103,6 @@ int batadv_v_mesh_init(struct batadv_priv *bat_priv) if (ret < 0) return ret; - /* set default throughput difference threshold to 5Mbps */ - atomic_set(&bat_priv->gw.sel_class, 50); - return 0; } |