diff options
author | Antonio Quartulli <a@unstable.cc> | 2016-07-03 12:46:33 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-08-09 07:54:29 +0200 |
commit | 34d99cfefaac596adfe9b69f5e7c2cd291af2334 (patch) | |
tree | 3499da74782f91678e0601f61512e3fbfa05a6f5 /net/batman-adv/gateway_common.c | |
parent | batman-adv: make the GW selection class algorithm specific (diff) | |
download | linux-34d99cfefaac596adfe9b69f5e7c2cd291af2334.tar.xz linux-34d99cfefaac596adfe9b69f5e7c2cd291af2334.zip |
batman-adv: make GW election code protocol specific
Each routing protocol may have its own specific logic about
gateway election which is potentially based on the metric being
used.
Create two GW specific API functions and move the current election
logic in the B.A.T.M.A.N. IV specific code.
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/gateway_common.c')
-rw-r--r-- | net/batman-adv/gateway_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index d7bc6a87bcc9..21184810d89f 100644 --- a/net/batman-adv/gateway_common.c +++ b/net/batman-adv/gateway_common.c @@ -241,10 +241,9 @@ static void batadv_gw_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, batadv_gw_node_update(bat_priv, orig, &gateway); - /* restart gateway selection if fast or late switching was enabled */ + /* restart gateway selection */ if ((gateway.bandwidth_down != 0) && - (atomic_read(&bat_priv->gw.mode) == BATADV_GW_MODE_CLIENT) && - (atomic_read(&bat_priv->gw.sel_class) > 2)) + (atomic_read(&bat_priv->gw.mode) == BATADV_GW_MODE_CLIENT)) batadv_gw_check_election(bat_priv, orig); } |