From: Ruben Wisniewski <ruben@freifunk-nrw.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] fix algorithm, which was unintentional changed on update from 2013 to 2014
Date: Sun, 17 May 2015 11:37:26 +0200 [thread overview]
Message-ID: <20150517113726.47de614d@i3.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
This patch restores the unintentional change on commit
http://www.open-mesh.org/projects/batman-adv/repository/revisions/0853ec7fafe0a195754454832993c6b35e22b842/diff/gateway_client.c
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;
--
2.4.0
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
next reply other threads:[~2015-05-17 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-17 9:37 Ruben Wisniewski [this message]
2015-05-17 9:49 ` [B.A.T.M.A.N.] [PATCH] fix algorithm, which was unintentional changed on update from 2013 to 2014 Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150517113726.47de614d@i3.local \
--to=ruben@freifunk-nrw.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.