This patch restores the unintentional change on commit
http://www.open-mesh.org/projects/batman-adv/repository/revisions/0853ec7faf...
Original the algorithm uses kbit for calculation, now the values are stored as "mbit*10" so we have to multiply it with 100 to restore the old behavior.
Signed-off-by: Ruben Wisniewsi ruben@vfn-nrw.de --- net/batman-adv/gateway_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 1f50661..6f00584 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@ -185,7 +185,7 @@ batadv_gw_get_best_gw_node(struct batadv_priv *bat_priv) switch (atomic_read(&bat_priv->gw_sel_class)) { case 1: /* fast connection */ tmp_gw_factor = tq_avg * tq_avg; - tmp_gw_factor *= gw_node->bandwidth_down; + tmp_gw_factor *= gw_node->bandwidth_down * 100; tmp_gw_factor *= 100 * 100; tmp_gw_factor /= gw_divisor;