b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Subject: [B.A.T.M.A.N.] [PATCHv2 next 3/3] batman-adv: fix misleading default throughput warning
Date: Mon,  1 Feb 2016 14:34:34 +0800	[thread overview]
Message-ID: <1454308474-23211-3-git-send-email-mareklindner@neomailbox.ch> (raw)
In-Reply-To: <1454308474-23211-1-git-send-email-mareklindner@neomailbox.ch>

BATADV_THROUGHPUT_DEFAULT_VALUE is expressed in multiples of 100kbps. Make
sure the warning text converts it properly.

Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
 net/batman-adv/bat_v_elp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 461a765..2a6a9a2 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -129,9 +129,10 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 default_throughput:
 	if (!(hard_iface->bat_v.flags & BATADV_WARNING_DEFAULT)) {
 		batadv_info(hard_iface->soft_iface,
-			    "WiFi driver or ethtool info does not provide information about link speeds on interface %s, therefore defaulting to hardcoded throughput values of %d kbit/s. Consider overriding the throughput manually or checking your driver.\n",
+			    "WiFi driver or ethtool info does not provide information about link speeds on interface %s, therefore defaulting to hardcoded throughput values of %u.%1u Mbps. Consider overriding the throughput manually or checking your driver.\n",
 			    hard_iface->net_dev->name,
-			    BATADV_THROUGHPUT_DEFAULT_VALUE / 10);
+			    BATADV_THROUGHPUT_DEFAULT_VALUE / 10,
+			    BATADV_THROUGHPUT_DEFAULT_VALUE % 10);
 		hard_iface->bat_v.flags |= BATADV_WARNING_DEFAULT;
 	}
 
-- 
2.7.0


  parent reply	other threads:[~2016-02-01  6:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01  6:34 [B.A.T.M.A.N.] [PATCHv2 next 1/3] batman-adv: add missing kernel doc Marek Lindner
2016-02-01  6:34 ` [B.A.T.M.A.N.] [PATCHv2 next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
2016-02-01 12:26   ` Sven Eckelmann
2016-02-01 14:45     ` Antonio Quartulli
2016-02-10 10:21   ` Marek Lindner
2016-02-01  6:34 ` Marek Lindner [this message]
2016-02-10 10:22   ` [B.A.T.M.A.N.] [PATCHv2 next 3/3] batman-adv: fix misleading default throughput warning Marek Lindner
2016-02-10 10:19 ` [B.A.T.M.A.N.] [PATCHv2 next 1/3] batman-adv: add missing kernel doc Marek Lindner

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=1454308474-23211-3-git-send-email-mareklindner@neomailbox.ch \
    --to=mareklindner@neomailbox.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).